import { BaseApi } from "../base-api"; import type { CreateWorkflowRequest, CreateWorkflowResponse, ListRunsParams, ListRunsResponse, ListWorkflowsParams, ListWorkflowsResponse, ScheduleWorkflowRequest, ScheduleWorkflowResponse, TriggerWorkflowResponse, WorkflowResponse, WorkflowRun, WorkflowRunStatus, WorkflowStatus } from "./types"; /** * @module WorkflowsApi * @description This module provides methods for creating, scheduling, triggering, and archiving workflows. * @extends BaseApi */ declare class WorkflowsApi extends BaseApi { /** * List all active workflows for the authenticated company. * * @param {ListWorkflowsParams} [params] - Optional pagination parameters, plus * `data_plane_id` to return only the workflows on that data plane. * @returns {Promise} A promise that resolves to a paginated list of workflows. */ listWorkflows(params?: ListWorkflowsParams): Promise; /** * Create a new workflow from a YAML specification. * The specification is parsed and validated before the workflow is persisted. * * @param {CreateWorkflowRequest} request - The workflow creation request. * @returns {Promise} A promise that resolves to the created workflow. */ createWorkflow(request: CreateWorkflowRequest): Promise; /** * Retrieve a workflow by its ID. * * @param {string} workflowId - The unique identifier for the workflow. * @returns {Promise} A promise that resolves to the workflow. */ getWorkflow(workflowId: string): Promise; /** * Archive a workflow. This terminates any active schedule and running execution, * then marks the workflow as archived. * * @param {string} workflowId - The unique identifier for the workflow to archive. * @returns {Promise} A promise that resolves when the workflow is archived. */ archiveWorkflow(workflowId: string): Promise; /** * Trigger an immediate execution of a workflow. * * @param {string} workflowId - The unique identifier for the workflow to trigger. * @returns {Promise} A promise that resolves to the run ID of the new execution. */ triggerWorkflow(workflowId: string): Promise; /** * Create a schedule for a workflow based on the cron expression defined in its specification. * Optionally, the workflow can also be triggered immediately. * * @param {string} workflowId - The unique identifier for the workflow to schedule. * @param {ScheduleWorkflowRequest} [request] - Optional request body with trigger_immediately flag. * @returns {Promise} A promise that resolves to the schedule response. */ scheduleWorkflow(workflowId: string, request?: ScheduleWorkflowRequest): Promise; /** * List execution runs for a workflow. Results are ordered by start time descending. * * @param {string} workflowId - The unique identifier for the workflow. * @param {ListRunsParams} [params] - Optional pagination parameters (per_page, page_token). * @returns {Promise} A promise that resolves to a paginated list of workflow runs. */ listWorkflowRuns(workflowId: string, params?: ListRunsParams): Promise; } export { type CreateWorkflowRequest, type CreateWorkflowResponse, type ListRunsParams, type ListRunsResponse, type ListWorkflowsParams, type ListWorkflowsResponse, type ScheduleWorkflowRequest, type ScheduleWorkflowResponse, type TriggerWorkflowResponse, type WorkflowResponse, type WorkflowRun, type WorkflowRunStatus, type WorkflowStatus, WorkflowsApi, };