import { FindConfig } from "../common"; import { ContainerLike, IModuleService } from "../modules-sdk"; import { Context } from "../shared-context"; import { FilterableWorkflowExecutionProps, WorkflowExecutionDTO } from "./common"; type FlowRunOptions = { input?: TData; context?: Context; resultFrom?: string | string[] | Symbol; throwOnError?: boolean; logOnError?: boolean; events?: Record; }; export type Acknowledgement = { workflowId: string; transactionId: string; parentStepIdempotencyKey?: string; hasFinished: boolean; hasFailed: boolean; }; export interface WorkflowOrchestratorRunDTO extends FlowRunOptions { transactionId?: string; } export interface WorkflowOrchestratorCancelOptionsDTO { transactionId: string; context?: Context; throwOnError?: boolean; logOnError?: boolean; events?: Record; container?: ContainerLike; } export type IdempotencyKeyParts = { workflowId: string; transactionId: string; stepId: string; action: "invoke" | "compensate"; }; export interface IWorkflowEngineService extends IModuleService { retrieveWorkflowExecution(idOrObject: string | { workflow_id: string; transaction_id: string; }, config?: FindConfig, sharedContext?: Context): Promise; listWorkflowExecutions(filters?: FilterableWorkflowExecutionProps, config?: FindConfig, sharedContext?: Context): Promise; listAndCountWorkflowExecutions(filters?: FilterableWorkflowExecutionProps, config?: FindConfig, sharedContext?: Context): Promise<[WorkflowExecutionDTO[], number]>; run(workflowId: string, options?: WorkflowOrchestratorRunDTO, sharedContext?: Context): any; getRunningTransaction(workflowId: string, transactionId: string, sharedContext?: Context): Promise; setStepSuccess({ idempotencyKey, stepResponse, options, }: { idempotencyKey: string | IdempotencyKeyParts; stepResponse: unknown; options?: Record; }, sharedContext?: Context): any; setStepFailure({ idempotencyKey, stepResponse, options, }: { idempotencyKey: string | IdempotencyKeyParts; stepResponse: unknown; options?: Record; }, sharedContext?: Context): any; subscribe(args: { workflowId: string; transactionId?: string; subscriber: Function; subscriberId?: string; }, sharedContext?: Context): Promise; unsubscribe(args: { workflowId: string; transactionId?: string; subscriberOrId: string | Function; }, sharedContext?: Context): any; cancel(workflowId: string, options: WorkflowOrchestratorCancelOptionsDTO, sharedContext?: Context): any; } export {}; //# sourceMappingURL=service.d.ts.map