import { Job, JobResult } from './index'; import { WorkflowEventData } from './workflowEventData'; /** * Job promise model used for resolution and/or rejection of Promise */ export declare class JobPromise implements Promise { job: Job; [Symbol.toStringTag]: string; private promise; /** * Default constructor * @param job Job to be wrapped with promise */ constructor(job: Job); then(onfulfilled?: ((value: JobResult) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined): Promise; catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; finally(onfinally?: (() => void) | null | undefined): Promise; /** * Method to attach job status event handlers. * @param eventHanlder Attaches callback which is invoked on job status change. */ onStatus: (eventHanlder: (argument?: any) => void) => this; /** * Method to attach job workflow event handlers. * @param eventHandler Attaches callback which is invoked on job workflow event. */ onWorkflowEvent: (eventHandler: (argument: WorkflowEventData) => void) => this; }