import type { Config } from "./config"; import type { Result } from "./result"; export declare type InitFunction = (cfg: TConfig) => Promise | void; export declare type GetItemsFunction = (cfg: TConfig) => TItem[] | Promise | AsyncGenerator | Generator | TItem, void, void>; export declare type GetItemIdFunction = (item: TItem, cfg: TConfig) => string; export declare type ProcessFunction = (item: TItem, cfg: TConfig, attempt: number) => Promise | Result | string | void; export declare type FinalizeFunction = (cfg: TConfig, dsp: Disposition) => Promise | void; export declare enum Disposition { NotComplete = "Not Complete", Successful = "Successful", Failed = "Failed", Cancelled = "Cancelled" } export declare enum JobFunction { Init = "init", GetItems = "getItems", GetItemId = "getItemId", Process = "process", Finalize = "finalize" } export interface Job { defaultConfig?: Config; init?: InitFunction; getItems: GetItemsFunction; getItemId?: GetItemIdFunction; process: ProcessFunction; finalize?: FinalizeFunction; }