/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { workflowsCreate } from "../funcs/workflowsCreate.js"; import { workflowsDelete } from "../funcs/workflowsDelete.js"; import { workflowsGet } from "../funcs/workflowsGet.js"; import { workflowsList } from "../funcs/workflowsList.js"; import { workflowsUpdate } from "../funcs/workflowsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Workflows extends ClientSDK { /** * ListWorkflows Workflows V2 * * @remarks * List all workflows */ async list( options?: RequestOptions, ): Promise { return unwrapAsync(workflowsList( this, options, )); } /** * CreateWorkflow Workflows V2 * * @remarks * Create a new workflow */ async create( request: components.CreateWorkflowRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsCreate( this, request, options, )); } /** * DestroyWorkflow Workflows V2 * * @remarks * Archives a workflow */ async delete( request: operations.WorkflowsV2NumberDestroyWorkflowRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDelete( this, request, options, )); } /** * ShowWorkflow Workflows V2 * * @remarks * Show a workflow by ID */ async get( request: operations.WorkflowsV2NumberShowWorkflowRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsGet( this, request, options, )); } /** * UpdateWorkflow Workflows V2 * * @remarks * Updates a workflow */ async update( request: operations.WorkflowsV2NumberUpdateWorkflowRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsUpdate( this, request, options, )); } }