Represents an automation in the ESP Rainmaker Neo SDK. Provides instance methods for automation operations.

Constructors

Properties

groupId: string
id: string
name: string
retrigger?: boolean

Enable/disable flag. Defaults to "enabled" when absent (backend default).

Methods

  • Adds a condition (trigger id) to this automation. The instance is updated only after the API call succeeds.

    Parameters

    • triggerId: string

      The trigger id to add to conditions.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response.

    If triggerId is missing or empty.

  • Deletes this automation. After a successful delete, the instance is stale — callers should discard it.

    Calls DELETE /v1/groups/{groupId}/service/automations/{automationId}.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response when the automation is successfully deleted.

    If the API request fails.

  • Removes an action from this automation by index. The instance is updated only after the API call succeeds.

    Parameters

    • index: number

      The index of the action to remove.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response.

    If the index is out of range.

  • Removes a condition (trigger id) from this automation. The instance is updated only after the API call succeeds.

    Parameters

    • triggerId: string

      The trigger id to remove from conditions.

    Returns Promise<ESPAPIResponse>

    A promise that resolves with the API response.

    If triggerId is missing or empty.