Creating Plot Twists
    Preparing search index...

    Type Alias NewNote

    NewNote: Partial<
        Omit<Note, "author" | "activity" | "tags" | "mentions" | "id" | "key">,
    > & ({ id: Uuid } | { key: string } | {}) & {
        activity: Pick<Activity, "id"> | { source: string };
        author?: NewActor;
        contentType?: ContentType;
        tags?: NewTags;
        mentions?: NewActor[];
        unread?: boolean;
    }

    Type for creating new notes.

    Requires the activity reference, with all other fields optional. Can provide id, key, or neither for note identification:

    • id: Provide a specific UUID for the note
    • key: Provide an external identifier for upsert within the activity
    • neither: A new note with auto-generated UUID will be created

    Type Declaration

    • { id: Uuid }
    • { key: string }
    • {}
    • activity: Pick<Activity, "id"> | { source: string }

      Reference to the parent activity (required)

    • Optionalauthor?: NewActor

      The person that created the item, or leave undefined to use the twist as author.

    • OptionalcontentType?: ContentType

      Format of the note content. Determines how the note is processed:

      • 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
      • 'markdown': Already in markdown format (default, no conversion)
      • 'html': HTML content that will be converted to markdown
    • Optionaltags?: NewTags

      Tags to change on the activity. Use an empty array of NewActor to remove a tag. Use twistTags to add/remove the twist from tags to avoid clearing other actors' tags.

    • Optionalmentions?: NewActor[]

      Change the mentions on the note.

    • Optionalunread?: boolean

      Whether the note should mark the parent activity as unread for users.

      • true (default): Activity becomes unread for users who haven't authored the note
      • false: Activity is marked as read for all users in the priority at note creation time

      Use false for historical imports to avoid marking old items as unread.