Creating Plot Twists
    Preparing search index...

    Type Alias NewSchedule

    Type for creating new schedules.

    Requires threadId and start. All other fields are optional.

    // Simple timed event
    const schedule: NewSchedule = {
    threadId: threadId,
    start: new Date("2025-03-15T10:00:00Z"),
    end: new Date("2025-03-15T11:00:00Z")
    };

    // All-day event
    const allDay: NewSchedule = {
    threadId: threadId,
    start: "2025-03-15",
    end: "2025-03-16"
    };

    // Recurring weekly event
    const recurring: NewSchedule = {
    threadId: threadId,
    start: new Date("2025-01-20T14:00:00Z"),
    end: new Date("2025-01-20T15:00:00Z"),
    recurrenceRule: "FREQ=WEEKLY;BYDAY=MO",
    recurrenceUntil: new Date("2025-06-30")
    };
    type NewSchedule = {
        threadId: Uuid;
        start: Date | string;
        end?: Date | string | null;
        recurrenceRule?: string | null;
        recurrenceUntil?: Date | string | null;
        recurrenceCount?: number | null;
        recurrenceExdates?: Date[] | null;
        occurrence?: Date | string | null;
        userId?: ActorId | null;
        order?: number | null;
        archived?: boolean;
        contacts?: NewScheduleContact[];
    }
    Index

    Properties

    threadId: Uuid

    The thread this schedule belongs to

    start: Date | string

    Start time. Date for timed events, "YYYY-MM-DD" for all-day. Determines whether the schedule uses at (timed) or on (all-day) storage.

    end?: Date | string | null

    End time. Date for timed events, "YYYY-MM-DD" for all-day.

    recurrenceRule?: string | null

    Recurrence rule in RFC 5545 RRULE format

    recurrenceUntil?: Date | string | null

    For recurring schedules, the last occurrence date (inclusive). When both recurrenceCount and recurrenceUntil are provided, recurrenceCount takes precedence.

    recurrenceCount?: number | null

    For recurring schedules, the number of occurrences to generate. Takes precedence over recurrenceUntil if both are provided.

    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.

    userId?: ActorId | null

    If set, this is a per-user schedule for the specified user

    order?: number | null

    Per-user ordering (only valid with userId)

    archived?: boolean

    Whether to archive this schedule

    contacts?: NewScheduleContact[]

    Contacts to upsert on this schedule. Upserted by contact identity.