Creating Plot Twists
    Preparing search index...

    Type Alias Link

    Represents an external entity linked to a thread.

    Links are created by sources to represent external entities (issues, emails, calendar events) attached to a thread container. A thread can have multiple links (1:many). Links store source-specific data like type, status, metadata, and embeddings.

    // A link representing a Linear issue
    const link: Link = {
    threadId: "..." as Uuid,
    source: "linear:issue:549dd8bd-2bc9-43d1-95d5-4b4af0c5af1b",
    created: new Date(),
    author: { id: "..." as ActorId, type: ActorType.Contact, name: "Alice" },
    title: "Fix login bug",
    type: "issue",
    status: "open",
    meta: { projectId: "TEAM", url: "https://linear.app/team/TEAM-123" },
    assignee: null,
    actions: null,
    };
    type Link = {
        threadId: Uuid;
        source: string | null;
        created: Date;
        author: Actor | null;
        title: string;
        preview: string | null;
        assignee: Actor | null;
        type: string | null;
        status: string | null;
        actions: Action[] | null;
        meta: ThreadMeta | null;
        sourceUrl: string | null;
        channelId: string | null;
        relatedSource: string | null;
    }
    Index

    Properties

    threadId: Uuid

    The thread this link belongs to

    source: string | null

    External source identifier for dedup/upsert

    created: Date

    When this link was originally created in its source system

    author: Actor | null

    The actor credited with creating this link

    title: string

    Display title

    preview: string | null

    Truncated preview

    assignee: Actor | null

    The actor assigned to this link

    type: string | null

    Source-defined type string (e.g., issue, pull_request, email, event)

    status: string | null

    Source-defined status string (e.g., open, done, closed)

    actions: Action[] | null

    Interactive action buttons

    meta: ThreadMeta | null

    Source metadata

    sourceUrl: string | null

    URL to open the original item in its source application (e.g., "Open in Linear")

    channelId: string | null

    Channel ID that produced this link (matches source_channel.channel_id)

    relatedSource: string | null

    Cross-connector thread bundling key. When set, this link shares a thread with any link whose source matches this value (or whose relatedSource matches this link's source). Works regardless of creation order.