UNPKG

@villedemontreal/workit-stepfunction-client

Version:

Camunda BPM client for WorkIt that works with Camunda platform powered by TypeScript

23 lines (22 loc) 1.76 kB
import { ICamundaConfig, ICamundaService, IClient, ICreateWorkflowInstance, ICreateWorkflowInstanceResponse, IDeployWorkflowResponse, IMessage, IPagination, IPaginationOptions, IPublishMessage, IUpdateWorkflowRetry, IUpdateWorkflowVariables, IWorkflow, IWorkflowClient, IWorkflowDefinition, IWorkflowDefinitionRequest, IWorkflowOptions, IStepFunctionClientConfig } from '@villedemontreal/workit-types'; import { StepFunctionRepository } from './repositories/stepFunctionRepository'; export type IConfig = Partial<ICamundaConfig> & IStepFunctionClientConfig; export declare class SFnSQSClient implements IClient<ICamundaService>, IWorkflowClient { private _topicSubscription; private readonly _config; private readonly _repo; constructor(config: IConfig, repo?: StepFunctionRepository); subscribe(onMessageReceived: (message: IMessage, service: ICamundaService) => Promise<void>): Promise<void>; unsubscribe(): Promise<void>; deployWorkflow(absPath: string, override?: any): Promise<IDeployWorkflowResponse>; getWorkflows(options?: Partial<IWorkflowOptions & IPaginationOptions>): Promise<IPagination<IWorkflow>>; getWorkflow(payload: IWorkflowDefinitionRequest): Promise<IWorkflowDefinition>; updateVariables<T = any>(model: IUpdateWorkflowVariables<Partial<T>>): Promise<void>; updateJobRetries({ jobKey, retries }: IUpdateWorkflowRetry): Promise<void>; publishMessage<T, K>(payload: IPublishMessage<T, K>): Promise<void>; createWorkflowInstance<T>(model: ICreateWorkflowInstance<T>): Promise<ICreateWorkflowInstanceResponse>; cancelWorkflowInstance(instanceId: string): Promise<void>; resolveIncident(incidentKey: string): Promise<void>; private _startSubscriber; private _getLogger; }