Creating Plot Twists
    Preparing search index...

    Type Alias Note

    Note: ThreadCommon & {
        author: Actor;
        key: string | null;
        thread: Thread;
        content: string | null;
        actions: Action[] | null;
        reNote: { id: Uuid } | null;
        accessContacts: ActorId[] | null;
        recipients?: ResolvedRecipient[] | null;
        mentions: ActorId[];
        sectionKey: string | null;
        sectionLabel: string | null;
        sectionPosition: string | null;
        itemPosition: string | null;
        tagActors: Record<ActorId, Actor>;
    }

    Type Declaration

    • author: Actor

      The author of this note

    • key: string | null

      Globally unique, stable identifier for the note within its thread + link. Can be used to upsert without knowing the id.

      Note keys are scoped to a (thread, link) pair — two links on the same thread (e.g. after a merge) can each carry a "description" note without colliding. The runtime infers the link from the surrounding saveLink call. For bare saveNote calls outside a saveLink, the runtime resolves the link by looking up the connector's links on the thread and errors if more than one matches.

      Use one of these patterns:

      • Hardcoded semantic keys for fixed note types: "description", "cancellation"
      • External service IDs for dynamic collections: comment:${immutableId}

      Examples:

      • "description" (for a Jira issue's description note)
      • "comment:12345" (for a specific comment by ID)
      • "gmail:msg:18d4e5f2a3b1c9d7" (for a Gmail message within a thread)

      Ensure IDs are immutable - avoid human-readable slugs or titles.

    • thread: Thread

      The parent thread this note belongs to

    • content: string | null

      Primary content for the note (markdown)

    • actions: Action[] | null

      Array of interactive actions attached to the note

    • reNote: { id: Uuid } | null

      The note this is a reply to, or null if not a reply

    • accessContacts: ActorId[] | null

      Contacts who can see this note, or null if the note inherits thread visibility. When set (even to []), the note is private to the listed contacts plus the creator.

    • Optionalrecipients?: ResolvedRecipient[] | null

      Outbound recipients for this note, pre-resolved by the runtime — the reply-path analogue of CreateLinkDraft.recipients. Populated only for connectors whose link type addresses by recipient (compose.targets: "contacts" or "addresses", e.g. email) AND only when the user curated the recipient set (accessContacts is non-null). null when the note inherits the conversation's recipients — a plain "reply-all" where the connector should address the external conversation's existing participants itself.

      Each entry carries the platform account id / email to address (externalAccountId) and the to/cc/bcc role. The runtime has already removed the acting user's own identities (every linked contact, not just the connected account), so this is the complete, self-excluded recipient list — a connector should send to exactly these and never re-derive recipients from the message headers when this is set.

      Optional (may be undefined on note shapes the runtime builds for other purposes); treat undefined the same as null. Test with != null.

    • mentions: ActorId[]

      Focus twist IDs (twists/connectors) mentioned for dispatch routing. Does not include user contacts.

    • sectionKey: string | null

      Group this note belongs to within its thread (e.g. a Trello checklist id). Null = ordinary note.

    • sectionLabel: string | null

      Display label for the group (e.g. the checklist name).

    • sectionPosition: string | null

      Sort position of the group among the thread's groups (fractional index).

    • itemPosition: string | null

      Sort position of this item within its group (fractional index).

    • tagActors: Record<ActorId, Actor>

      Actors referenced by this note's tags, hydrated with source.accountId for the connector receiving this dispatch. Populated by the runtime only on connector dispatch (so a connector can resolve an assignee to its external id without a lookup); {} elsewhere.