Creating Plot Twists
    Preparing search index...

    Type Alias NewNote

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

    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.

      • undefined/omitted (default): Activity is unread for users, except auto-marked as read for the author if they are the twist owner (user)
      • true: Activity is explicitly unread for ALL users (use sparingly)
      • false: Activity 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.

    • 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