Represents a schedule in the ESP Rainmaker Neo SDK. Provides instance methods for schedule operations.

Constructors

Properties

enabled: boolean
groupId: string
id: string
name?: string
nodeId: string
triggers: ScheduleTrigger[]
validity?: { end?: number; start?: number }

Methods

  • Enables or disables this schedule.

    Parameters

    • enabled: boolean

      true to enable the schedule, false to disable it.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response when the change succeeds.

    If the node or schedule is not found.

    If the update fails or the API request fails.

  • Gets the node instance for this schedule. Returns the direct node reference when set, otherwise resolves it via the group. Returns null when neither path yields a node.

    Returns Promise<null | ESPRMNeoNode>

  • Updates this schedule with partial changes.

    Parameters

    • updates: Partial<ScheduleItem>

      Partial schedule data containing fields to update.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response when the schedule is successfully updated.

    If the node or schedule is not found.

    If the update fails or the API request fails.