Creating Plot Twists
    Preparing search index...

    Type Alias NewThread

    NewThread: Partial<
        Omit<ThreadFields, "priority" | "tags" | "id" | "accessContacts">,
    > & ({ id: Uuid } | {}) & { priority?: Pick<Priority, "id"> } & {
        tags?: NewTags;
        type?: ThreadType;
        accessContacts?: NewContact[];
        unread?: boolean;
        archived?: boolean;
        preview?: string | null;
        schedules?: Omit<NewSchedule, "threadId">[];
        scheduleOccurrences?: NewScheduleOccurrence[];
    }

    Type for creating new threads.

    Threads are simple containers. All other fields are optional.

    Type Declaration

    • { id: Uuid }
      • id: Uuid

        Unique identifier for the thread, generated by Uuid.Generate().

    • {}
    • Optionalpriority?: Pick<Priority, "id">

      Explicit priority - disables automatic priority matching. When omitted, the server classifies the thread using the user's priority rules.

    • Optionaltags?: NewTags

      All tags to set on the new thread.

    • Optionaltype?: ThreadType

      The thread's sub-type/category. Sets the thread's icon. If omitted, defaults to "notes" (private) or "discussion" (shared).

    • OptionalaccessContacts?: NewContact[]

      Contacts who can see a private thread. Pass email-based NewContact objects; they are resolved to contact IDs by the API. If omitted for a private thread, defaults to the connection owner.

    • Optionalunread?: boolean

      Whether the thread should be marked 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 creation time
    • Optionalarchived?: boolean

      Whether the thread is archived.

      • true: Archive the thread
      • false: Unarchive the thread
      • undefined (default): Preserve current archive state
    • Optionalpreview?: string | null

      Optional preview content for the thread. Can be Markdown formatted. The preview will be automatically generated from this content (truncated to 100 chars).

    • Optionalschedules?: Omit<NewSchedule, "threadId">[]

      Optional schedules to create alongside the thread.

    • OptionalscheduleOccurrences?: NewScheduleOccurrence[]

      Optional schedule occurrence overrides.

    const thread: NewThread = {
    title: "Review pull request"
    };