durabull
Version:
A durable workflow engine built on top of BullMQ and Redis
35 lines (34 loc) • 1.58 kB
TypeScript
/**
* Decorators for workflow methods
*/
export declare const SIGNAL_METHODS: unique symbol;
export declare const QUERY_METHODS: unique symbol;
export declare const WEBHOOK_METHODS: unique symbol;
type WorkflowMethod = (this: unknown, ...args: unknown[]) => unknown;
export declare function SignalMethod(): (targetOrValue: unknown, propertyKeyOrContext: string | symbol | ClassMethodDecoratorContext<unknown, WorkflowMethod>) => PropertyDescriptor | void;
/**
* Mark a workflow method as a query (read-only, does not advance replay)
*/
export declare function QueryMethod(): (targetOrValue: unknown, propertyKeyOrContext: string | symbol | ClassMethodDecoratorContext<unknown, WorkflowMethod>) => PropertyDescriptor | void;
/**
* Get signal methods for a workflow class
*/
export declare function getSignalMethods(workflowClass: unknown): string[];
/**
* Get query methods for a workflow class
*/
export declare function getQueryMethods(workflowClass: unknown): string[];
/**
* Mark a workflow method as webhook-accessible
* Can be applied to workflow start (execute) or signal methods
*/
export declare function WebhookMethod(): (targetOrValue: unknown, propertyKeyOrContext: string | symbol | ClassMethodDecoratorContext<unknown, WorkflowMethod>) => PropertyDescriptor | void;
/**
* Get webhook methods for a workflow class
*/
export declare function getWebhookMethods(workflowClass: unknown): string[];
/**
* Check if a specific method is webhook-accessible
*/
export declare function isWebhookMethod(workflowClass: unknown, methodName: string): boolean;
export {};