import { FactoryProvider, ModuleMetadata } from '@nestjs/common'; import { RunnerOptions, JobHelpers } from 'graphile-worker'; export declare const RUNNER_OPTIONS_KEY: unique symbol; /** * Job middleware function type. * Middleware can modify payload, execute side effects, and control job execution. */ export type JobMiddleware = (payload: any, helpers: JobHelpers, next: (payload: any) => Promise) => Promise; /** * We use `events` internally for decorators. */ export type GraphileWorkerConfiguration = Omit; export interface GraphileWorkerConfigurationFactory { createSharedConfiguration(): Promise | GraphileWorkerConfiguration; } export interface GraphileWorkerAsyncConfiguration extends Pick { /** * Factory function that returns an instance of the provider to be injected. */ useFactory: (...args: any[]) => Promise | GraphileWorkerConfiguration; /** * Optional list of providers to be injected into the context of the Factory function. */ inject?: FactoryProvider['inject']; }