Creating Plot Twists
    Preparing search index...

    Type Alias NewNote

    NewNote: Partial<
        Omit<
            Note,
            | "author"
            | "thread"
            | "tags"
            | "mentions"
            | "accessContacts"
            | "id"
            | "key"
            | "reNote",
        >,
    > & ({ id: Uuid } | { key: string } | {}) & {
        thread: Pick<Thread, "id"> | { source: string };
        author?: NewActor;
        contentType?: ContentType;
        tags?: NewTags;
        accessContacts?: (ActorId | NewContact)[] | null;
        mentions?: NewActor[];
        unread?: boolean;
        checkForTasks?: boolean;
        reNote?: { id: Uuid } | { key: string } | null;
    }

    Type for creating new notes.

    Requires the thread 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 thread
    • neither: A new note with auto-generated UUID will be created

    Type Declaration

    • { id: Uuid }
    • { key: string }
    • {}
    • thread: Pick<Thread, "id"> | { source: string }

      Reference to the parent thread (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 thread. 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.

    • OptionalaccessContacts?: (ActorId | NewContact)[] | null

      Contacts who can see this note, or null/undefined to inherit thread visibility. Accepts resolved ActorId UUIDs or email-based NewContact objects (resolved server-side). Include all participants who should see the note (sender + recipients). The note author is NOT implicitly included — add them explicitly. When set (even to []), the note is private to the listed contacts plus the creator.

    • Optionalmentions?: NewActor[]

      Twist/connector IDs to mention for dispatch routing. Does not include user contacts — use accessContacts for visibility.

    • Optionalunread?: boolean

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

      • undefined/omitted (default): Thread is unread for users, except auto-marked as read for the author if they are the twist owner (user)
      • true: Thread is explicitly unread for ALL users (use sparingly)
      • false: Thread is marked as read for all users in the priority at note creation time

      For the default behavior, omit this field entirely. Use false for initial sync to avoid marking historical items as unread.

    • OptionalcheckForTasks?: boolean

      When true, the server will use AI to detect tasks in this note's content and create separate Plot-authored reply notes for each detected task. Use for messaging connectors (email, chat) where tasks are implicit in conversation rather than explicitly structured.

    • OptionalreNote?: { id: Uuid } | { key: string } | null

      Reference to a parent note this note is a reply to.

      • { id }: reply by UUID
      • { key }: reply by key, resolved after creation (for batch ops)
      • null: explicitly not a reply
      • undefined (omitted): not a reply