@villedemontreal/workit-types
Version:
TypeScript types for Workit
48 lines (47 loc) • 1.48 kB
TypeScript
import { IPlugins } from '../plugin';
import { ISubscriptionOptions } from './subscriptionOptions';
export interface ICamundaConfig {
/**
* Path to the engine api
*/
baseUrl: string;
/**
* The id of the worker on which behalf tasks are fetched. The returned tasks are locked for that worker and can only be completed when providing the same worker id.
*/
workerId: string;
/**
* topic name for which external tasks should be fetched
*/
topicName: string;
/**
* Options about subscription
* Like filtering what Camunda will send to the worker
*/
subscriptionOptions?: ISubscriptionOptions;
/**
* The default duration to lock the external tasks for in milliseconds.
*/
lockDuration?: number;
/**
* Interval of time to wait before making a new poll.
*
*/
interval?: number;
/**
* Function(s) that have access to the client instance as soon as it is created and before any polling happens. Check out logger for a better understanding of the usage of middlewares.
*/
use?: Function | Function[];
bpmnKey?: string;
autoPoll?: boolean;
/**
* The maximum number of tasks to fetch
*/
maxTasks?: number;
/**
* The Long Polling timeout in milliseconds.
*/
asyncResponseTimeout?: number;
interceptors?: Function | Function[];
/** load librairies containing workflow tasks */
plugins?: IPlugins;
}