1 | import { DoneCallback, Job } from 'bull';
|
2 | import { BullQueueAdvancedProcessor, BullQueueAdvancedSeparateProcessor } from './interfaces/bull.interfaces';
|
3 | export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
4 | [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
5 | }[Keys];
|
6 | export declare type BullQueueProcessor = BullQueueProcessorCallback | BullQueueAdvancedProcessor | BullQueueSeparateProcessor | BullQueueAdvancedSeparateProcessor;
|
7 | export declare type BullQueueProcessorCallback = (job: Job, done?: DoneCallback) => void;
|
8 | export declare type BullQueueSeparateProcessor = string;
|
9 | export declare type BullQueueEvent = 'error' | 'waiting' | 'active' | 'stalled' | 'progress' | 'completed' | 'failed' | 'paused' | 'resumed' | 'cleaned' | 'drained' | 'removed' | 'global:error' | 'global:waiting' | 'global:active' | 'global:stalled' | 'global:progress' | 'global:completed' | 'global:failed' | 'global:paused' | 'global:resumed' | 'global:cleaned' | 'global:drained' | 'global:removed';
|
10 | export declare type BullQueueEventOptions = RequireOnlyOne<{
|
11 | eventName: BullQueueEvent;
|
12 | name?: string;
|
13 | id?: string;
|
14 | }, 'id' | 'name'>;
|
15 | export declare type QueueEventDecoratorOptions = RequireOnlyOne<{
|
16 | id?: string;
|
17 | name?: string;
|
18 | }, 'id' | 'name'>;
|
19 |
|
\ | No newline at end of file |