import type { Work, WorkData, WorkResult } from '@unchainedshop/core-worker'; import { type IBaseDirector } from '@unchainedshop/utils'; import type { ScheduleData } from '../utils/schedule.ts'; import type { IWorkerAdapter } from './WorkerAdapter.ts'; import type { Modules } from '../modules.ts'; export type WorkScheduleConfiguration = Pick & { type: string; input?: (workData: Omit) => Promise | null>; schedule?: ScheduleData; scheduleId?: string; }; export type IWorkerDirector = IBaseDirector> & { getActivePluginTypes: (options?: { external?: boolean; }) => string[]; getAdapterByType: (type: string) => IWorkerAdapter; disableAutoscheduling: (scheduleId: string) => void; configureAutoscheduling: (workScheduleConfiguration: WorkScheduleConfiguration) => void; getAutoSchedules: () => [string, WorkScheduleConfiguration][]; doWork: (work: Work, unchainedAPI: any) => Promise; processNextWork: (unchainedAPI: { modules: Modules; }, workerId?: string) => Promise; }; export declare const WorkerDirector: IWorkerDirector;