Creating Plot Twists
    Preparing search index...

    Type Alias NewLink

    NewLink: ({ source: string } | {}) & Partial<
        Omit<Link, "source" | "author" | "assignee" | "threadId">,
    > & {
        author?: NewActor;
        assignee?: NewActor | null;
        access?: ThreadAccessLevel;
        accessContacts?: NewContact[];
        unread?: boolean;
        archived?: boolean;
        priority?: Pick<Priority, "id">;
    }

    Type for creating new links.

    Links are created by sources to represent external entities. Requires a source identifier for dedup/upsert.

    Type Declaration

    • { source: string }
      • source: string

        Canonical ID for the item in an external system. When set, uniquely identifies the link within a priority tree. This performs an upsert.

    • {}
    • Optionalauthor?: NewActor

      The person that created the item. By default, it will be the twist itself.

    • Optionalassignee?: NewActor | null

      The person assigned to the item.

    • Optionalaccess?: ThreadAccessLevel

      Thread access level: "public", "members" (default), or "private". When "private", thread visibility is limited to the creator and contacts in accessContacts.

    • 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)
      • 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
    • Optionalpriority?: Pick<Priority, "id">

      Explicit priority (disables automatic priority matching). Only used when the link creates a new thread. When omitted, the server classifies the thread using the user's priority rules.