import type { GraphPointer } from 'clownface'; import type { Kopflos, KopflosResponse, ResultEnvelope } from './Kopflos.js'; import type { HandlerArgs } from './handler.js'; import type { KopflosEnvironment } from './env/index.js'; export interface DecoratorCallback { (): Promise; } export interface RequestDecorator { applicable?: (args: HandlerArgs) => boolean | Promise; run(args: HandlerArgs, next: DecoratorCallback): Promise | KopflosResponse; } export interface RequestDecoratorConstructor { new (instance: Kopflos): RequestDecorator; } interface DecoratorLookupArgs { api: GraphPointer; env: KopflosEnvironment; } export interface DecoratorLookup { (arg: DecoratorLookupArgs): Promise; } export declare const loadDecorators: ({ api, env }: DecoratorLookupArgs) => Promise; export {};