Manage AI Workflows in Wacht
fetchWorkflows(options?: ListWorkflowsOptions)
options
(optional): An object containing pagination and filtering options.
page
(number): The page number to retrieve.per_page
(number): The number of items per page.search
(string): Search term for workflows.is_active
(boolean): Filter by active status.Promise<WorkflowListResponse>
: A promise that resolves to a list of AI workflows and pagination information.
createWorkflow(request: CreateAiWorkflowRequest)
request
(CreateAiWorkflowRequest): The request body containing the details of the new AI workflow.Promise<AiWorkflow>
: A promise that resolves to the newly created AI workflow object.
fetchWorkflow(workflowId: string)
workflowId
(string): The unique identifier of the AI workflow.Promise<AiWorkflow>
: A promise that resolves to the AI workflow object.
updateWorkflow(workflowId: string, request: UpdateAiWorkflowRequest)
workflowId
(string): The unique identifier of the AI workflow to update.request
(UpdateAiWorkflowRequest): The request body containing the updated details of the AI workflow.Promise<AiWorkflow>
: A promise that resolves to the updated AI workflow object.
deleteWorkflow(workflowId: string)
workflowId
(string): The unique identifier of the AI workflow to delete.Promise<void>
: A promise that resolves when the workflow is successfully deleted.