import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Execute workflow actions like sending emails, Slack messages, and notifications */ export declare class Executions extends APIResource { /** * Launches a new execution of the workflow's current published version. The * workflow must use a manual trigger and be published and enabled, and the * caller's role must have permission to run it. The request body must be empty: * manual workflow executions accept no input parameters. Executions are not * idempotent: every successful call starts a real execution with real side effects * (messages, callbacks), and a duplicate request starts a second execution. Do not * retry automatically; check an execution's status with GET * /workflows/{id}/executions/{execution_id} instead. * * @example HTTP * Representative request and response shapes. * ``` * POST /workflows/{id}/executions/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 201 Created * Content-Type: application/json * * { * "id": "string", * "workflow_id": "string", * "version_id": "string", * "status": "pending", * "created_at": "2025-01-01T00:00:00Z" * } * ``` */ create(id: string, options?: RequestOptions): APIPromise; /** * Returns a workflow execution's current status. Poll until the status reaches a * terminal value (`completed`, `failed`, or `cancelled`); all other values are * transitional. * * @example HTTP * Representative request and response shapes. * ``` * GET /workflows/{id}/executions/{execution_id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "workflow_id": "string", * "version_id": "string", * "status": "pending", * "created_at": "2025-01-01T00:00:00Z" * } * ``` */ retrieve(id: string, executionID: string, options?: RequestOptions): APIPromise; } /** * A single execution of a workflow: one launch of the workflow's current published * version, with a status to poll until it reaches a terminal value. */ export interface ExecutionCreateResponse { /** * Unique identifier for this workflow execution. Poll it with GET * /workflows/{id}/executions/{execution_id}. */ id: string; /** * When the workflow was launched, in UTC (ISO 8601). */ created_at: string; /** * The execution status. Transitional values are `pending`, `in_progress`, * `waiting_for_response`, and `cancellation_pending`; terminal values are * `completed`, `failed`, and `cancelled`. Poll until the status reaches a terminal * value. * * - `pending`: The execution is queued and has not started. * - `in_progress`: The workflow is executing. * - `waiting_for_response`: The execution is paused on a human input or approval * step. * - `cancellation_pending`: A cancellation was requested and is being applied. * - `completed`: Every step finished successfully. * - `failed`: The execution stopped on an error. * - `cancelled`: The execution was cancelled before completing. * - `unknown`: The status could not be mapped. Contact support if this persists. */ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'cancellation_pending' | 'waiting_for_response' | 'unknown'; /** * The workflow version that ran. An execution always runs the workflow's current * published version; the current version_id is available from GET /workflows/{id}. */ version_id: string; /** * The ID of the workflow this execution belongs to. Matches the {id} path * parameter. */ workflow_id: string; } /** * A single execution of a workflow: one launch of the workflow's current published * version, with a status to poll until it reaches a terminal value. */ export interface ExecutionRetrieveResponse { /** * Unique identifier for this workflow execution. Poll it with GET * /workflows/{id}/executions/{execution_id}. */ id: string; /** * When the workflow was launched, in UTC (ISO 8601). */ created_at: string; /** * The execution status. Transitional values are `pending`, `in_progress`, * `waiting_for_response`, and `cancellation_pending`; terminal values are * `completed`, `failed`, and `cancelled`. Poll until the status reaches a terminal * value. * * - `pending`: The execution is queued and has not started. * - `in_progress`: The workflow is executing. * - `waiting_for_response`: The execution is paused on a human input or approval * step. * - `cancellation_pending`: A cancellation was requested and is being applied. * - `completed`: Every step finished successfully. * - `failed`: The execution stopped on an error. * - `cancelled`: The execution was cancelled before completing. * - `unknown`: The status could not be mapped. Contact support if this persists. */ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'cancellation_pending' | 'waiting_for_response' | 'unknown'; /** * The workflow version that ran. An execution always runs the workflow's current * published version; the current version_id is available from GET /workflows/{id}. */ version_id: string; /** * The ID of the workflow this execution belongs to. Matches the {id} path * parameter. */ workflow_id: string; } export declare namespace Executions { export { type ExecutionCreateResponse as ExecutionCreateResponse, type ExecutionRetrieveResponse as ExecutionRetrieveResponse, }; } //# sourceMappingURL=executions.d.ts.map