// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; /** * Execute workflow actions like sending emails, Slack messages, and notifications */ export class WorkflowActionExecutions extends APIResource { /** * Execute a workflow action from Rippling Functions * * @example HTTP * Representative request and response shapes. * ``` * POST /workflow-action-executions/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "action_type": "run_query", * "payload": { * "query": "query" * }, * "workflow_definition_id": "workflow_definition_id" * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "result": {} * } * ``` */ create( body: WorkflowActionExecutionCreateParams, options?: RequestOptions, ): APIPromise { return this._client.post('/workflow-action-executions/', { body, ...options }); } } export interface WorkflowActionExecutionCreateResponse { /** * Result of the workflow action execution */ result: unknown; } export interface WorkflowActionExecutionCreateParams { action_type: 'run_query'; payload: WorkflowActionExecutionCreateParams.Payload; workflow_definition_id: string; } export namespace WorkflowActionExecutionCreateParams { export interface Payload { query: string; product_name?: string | null; } } export declare namespace WorkflowActionExecutions { export { type WorkflowActionExecutionCreateResponse as WorkflowActionExecutionCreateResponse, type WorkflowActionExecutionCreateParams as WorkflowActionExecutionCreateParams, }; }