/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 72bfd98dad7d */ import { workflowsExecutionsBatchCancelWorkflowExecutions } from "../funcs/workflowsExecutionsBatchCancelWorkflowExecutions.js"; import { workflowsExecutionsBatchTerminateWorkflowExecutions } from "../funcs/workflowsExecutionsBatchTerminateWorkflowExecutions.js"; import { workflowsExecutionsCancelWorkflowExecution } from "../funcs/workflowsExecutionsCancelWorkflowExecution.js"; import { workflowsExecutionsGetWorkflowExecution } from "../funcs/workflowsExecutionsGetWorkflowExecution.js"; import { workflowsExecutionsGetWorkflowExecutionHistory } from "../funcs/workflowsExecutionsGetWorkflowExecutionHistory.js"; import { workflowsExecutionsGetWorkflowExecutionLogs } from "../funcs/workflowsExecutionsGetWorkflowExecutionLogs.js"; import { workflowsExecutionsGetWorkflowExecutionTraceEvents } from "../funcs/workflowsExecutionsGetWorkflowExecutionTraceEvents.js"; import { workflowsExecutionsGetWorkflowExecutionTraceInfo } from "../funcs/workflowsExecutionsGetWorkflowExecutionTraceInfo.js"; import { workflowsExecutionsGetWorkflowExecutionTraceOtel } from "../funcs/workflowsExecutionsGetWorkflowExecutionTraceOtel.js"; import { workflowsExecutionsGetWorkflowExecutionTraceSummary } from "../funcs/workflowsExecutionsGetWorkflowExecutionTraceSummary.js"; import { workflowsExecutionsQueryWorkflowExecution } from "../funcs/workflowsExecutionsQueryWorkflowExecution.js"; import { workflowsExecutionsResetWorkflow } from "../funcs/workflowsExecutionsResetWorkflow.js"; import { workflowsExecutionsSignalWorkflowExecution } from "../funcs/workflowsExecutionsSignalWorkflowExecution.js"; import { workflowsExecutionsStream } from "../funcs/workflowsExecutionsStream.js"; import { workflowsExecutionsStreamWorkflowExecutionLogs } from "../funcs/workflowsExecutionsStreamWorkflowExecutionLogs.js"; import { workflowsExecutionsTerminateWorkflowExecution } from "../funcs/workflowsExecutionsTerminateWorkflowExecution.js"; import { workflowsExecutionsUpdateWorkflowExecution } from "../funcs/workflowsExecutionsUpdateWorkflowExecution.js"; import { EventStream } from "../lib/event-streams.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 Executions extends ClientSDK { /** * Get Workflow Execution */ async getWorkflowExecution( request: operations.GetWorkflowExecutionV1WorkflowsExecutionsExecutionIdGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecution( this, request, options, )); } /** * Get Workflow Execution History */ async getWorkflowExecutionHistory( request: operations.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionHistory( this, request, options, )); } /** * Signal Workflow Execution */ async signalWorkflowExecution( request: operations.SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIdSignalsPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsSignalWorkflowExecution( this, request, options, )); } /** * Query Workflow Execution */ async queryWorkflowExecution( request: operations.QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsQueryWorkflowExecution( this, request, options, )); } /** * Terminate Workflow Execution */ async terminateWorkflowExecution( request: operations.TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIdTerminatePostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsTerminateWorkflowExecution( this, request, options, )); } /** * Batch Terminate Workflow Executions */ async batchTerminateWorkflowExecutions( request: components.BatchExecutionBody, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsBatchTerminateWorkflowExecutions( this, request, options, )); } /** * Cancel Workflow Execution */ async cancelWorkflowExecution( request: operations.CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIdCancelPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsCancelWorkflowExecution( this, request, options, )); } /** * Batch Cancel Workflow Executions */ async batchCancelWorkflowExecutions( request: components.BatchExecutionBody, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsBatchCancelWorkflowExecutions( this, request, options, )); } /** * Reset Workflow */ async resetWorkflow( request: operations.ResetWorkflowV1WorkflowsExecutionsExecutionIdResetPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsResetWorkflow( this, request, options, )); } /** * Update Workflow Execution */ async updateWorkflowExecution( request: operations.UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIdUpdatesPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsUpdateWorkflowExecution( this, request, options, )); } /** * Get Workflow Execution Trace Info */ async getWorkflowExecutionTraceInfo( request: operations.GetWorkflowExecutionTraceInfoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionTraceInfo( this, request, options, )); } /** * Get Workflow Execution Trace Otel */ async getWorkflowExecutionTraceOtel( request: operations.GetWorkflowExecutionTraceOtelRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionTraceOtel( this, request, options, )); } /** * Get Workflow Execution Trace Summary */ async getWorkflowExecutionTraceSummary( request: operations.GetWorkflowExecutionTraceSummaryRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionTraceSummary( this, request, options, )); } /** * Get Workflow Execution Trace Events */ async getWorkflowExecutionTraceEvents( request: operations.GetWorkflowExecutionTraceEventsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionTraceEvents( this, request, options, )); } /** * Stream */ async stream( request: operations.StreamV1WorkflowsExecutionsExecutionIdStreamGetRequest, options?: RequestOptions, ): Promise< EventStream< operations.StreamV1WorkflowsExecutionsExecutionIdStreamGetResponseBody > > { return unwrapAsync(workflowsExecutionsStream( this, request, options, )); } /** * Get Workflow Execution Logs * * @remarks * Retrieve logs for a workflow execution. * * Use `after`/`before`/`order` on the first request to set the time range and sort order; for * the next pages pass the `cursor` from the previous response (it remembers the range and order). */ async getWorkflowExecutionLogs( request: operations.GetWorkflowExecutionLogsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsExecutionsGetWorkflowExecutionLogs( this, request, options, )); } /** * Stream Workflow Execution Logs * * @remarks * Stream logs for a workflow execution via SSE. * * Resume cursor comes from the `Last-Event-ID` header or `last_event_id` query param (header wins) * and takes precedence over `after`; omit all to tail from the execution start. */ async streamWorkflowExecutionLogs( request: operations.StreamWorkflowExecutionLogsRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(workflowsExecutionsStreamWorkflowExecutionLogs( this, request, options, )); } }