Creating Plot Twists
    Preparing search index...

    Type Alias SyncUpdate

    SyncUpdate:
        | NewActivityWithNotes
        | { activityId: string; update?: ActivityUpdate; notes?: NewNote[] }

    Represents a sync update from a tool.

    Tools that sync from external sources can send either:

    • A new activity with notes (for newly discovered items)
    • An update to an existing activity with optional new notes (for changed items)

    This allows tools to manage their own update detection logic locally, providing Plot with the appropriate operation to perform.

    Type Declaration

    // Send a new activity
    const newItem: SyncUpdate = {
    type: ActivityType.Event,
    title: "New Meeting",
    id: Uuid.Generate(), // Tool-generated ID
    notes: [{ id: Uuid.Generate(), content: "Description" }]
    };

    // Send an update to existing activity
    const update: SyncUpdate = {
    activityId: existingActivityId,
    update: { title: "Updated Meeting Title" },
    notes: [{ id: Uuid.Generate(), content: "New comment" }]
    };