Creating Plot Twists
    Preparing search index...

    Type Alias Schedule

    Represents a schedule entry for a thread.

    Schedules define when a thread occurs in time. A thread may have zero or more schedules:

    • Shared schedules (userId is null): visible to all members of the thread's priority
    • Per-user schedules (userId set): private ordering/scheduling for a specific user

    For recurring events in the SDK, start/end represent the first occurrence's time. In the database, the at/on range is expanded to span from the first occurrence start to the last occurrence end (or open-ended if no fixed end). The duration column stores the per-occurrence duration, enabling range overlap queries to correctly find all recurring events with occurrences in a given window.

    type Schedule = {
        created: Date;
        archived: boolean;
        userId: ActorId | null;
        order: number | null;
        start: Date | string | null;
        end: Date | string | null;
        recurrenceRule: string | null;
        duration: number | null;
        recurrenceExdates: Date[] | null;
        occurrence: Date | string | null;
        contacts: ScheduleContact[];
    }
    Index

    Properties

    created: Date

    When this schedule was created

    archived: boolean

    Whether this schedule has been archived

    userId: ActorId | null

    If set, this is a per-user schedule visible only to this user

    order: number | null

    Per-user ordering within a day (only set for per-user schedules)

    start: Date | string | null

    Start time of the schedule. Date object for timed events, date string in "YYYY-MM-DD" format for all-day events.

    end: Date | string | null

    End time of the schedule. Date object for timed events, date string in "YYYY-MM-DD" format for all-day events.

    recurrenceRule: string | null

    Recurrence rule in RFC 5545 RRULE format (e.g., "FREQ=WEEKLY;BYDAY=MO,WE,FR")

    duration: number | null

    Duration of each occurrence in milliseconds (required for recurring schedules)

    recurrenceExdates: Date[] | null

    Array of dates to exclude from the recurrence pattern

    occurrence: Date | string | null

    For occurrence exceptions: the original date/time of this occurrence in the series. Format: Date object or "YYYY-MM-DD" for all-day events.

    contacts: ScheduleContact[]

    Contacts invited to this schedule (attendees/participants)