UNPKG

@xtcry/bull-arena

Version:

An interactive UI dashboard for Bee/Bull Queue

91 lines (90 loc) 2.47 kB
declare type Redis = any; declare type RedisClientOptions = any; declare type BeeQueue = any; declare type BullQueue = any; declare type BullMQQueue = any; declare type FlowProducer = any; export declare type IArenaConfig = { /** The base path of the application. */ appBasePath?: string; /** The path to the custom CSS file. */ customCssPath?: string; /** The path to the custom JS file. */ customJsPath?: string; queues: QueueConfigType[]; flows?: FlowConfigType[]; defaultRedis?: ConnectionOptions; Bull?: QueueCtr; Bee?: QueueCtr; BullMQ?: QueueCtr; FlowBullMQ?: FlowCtr; } & ({ Bull: QueueCtr; } | { Bee: QueueCtr; } | { BullMQ: QueueCtr; }); export interface IListenOptions { port?: number; host?: string; useCdn?: boolean | any; basePath?: string; disableListen?: boolean; } export interface QueueCtr { new (queueName: string, options?: any): IQueue; new (queueName: string, url: string, options?: any): IQueue; } export interface FlowCtr { new (options?: any, Connection?: any): IFlow; } export declare type IQueue = { IS_BEE?: boolean; IS_BULL?: boolean; IS_BULLMQ?: boolean; } & Queues; declare type Queues = (BeeQueue & { IS_BEE: true; }) | (BullQueue & { IS_BULL: true; }) | (BullMQQueue & { IS_BULLMQ: true; }); export declare type QueueConfigType = { name: string; hostId: string; type?: 'bee' | 'bull' | 'bullmq'; prefix?: string; createClient?: (options: RedisClientOptions) => Redis; } & Partial<ConnectionOptions>; export declare type FlowConfigType = { name: string; hostId: string; type?: 'bullmq'; prefix?: string; createClient?: (options: RedisClientOptions) => Redis; } & Partial<ConnectionOptions>; export declare type IFlow = { IS_BULLMQ?: boolean; } & Flows; declare type Flows = FlowProducer & { IS_BULLMQ: true; }; declare type ConnectionOptions = RedisPortHostConnectionOptions | RedisUrlConnectionOptions | RedisClientConnectionOptions; interface RedisPortHostConnectionOptions { host: string; port?: number; password?: string; username?: string; tls?: string; db?: string | number; [key: string]: any; } interface RedisUrlConnectionOptions { url: string; } interface RedisClientConnectionOptions { redis: RedisClientOptions | Redis; } export {};