import { type FlowCtxOf, type FlowInputOf, type FlowName, type FlowStagesOf, type HookEntry, type HookRecord, type HookType, type ScopeEntry, type Token } from '../common'; import type ProviderRegistry from '../provider/provider.registry'; import { RegistryAbstract, type RegistryBuildMapResult } from '../regsitry'; export default class HookRegistry extends RegistryAbstract { scope: ScopeEntry; /** Historical records by class (kept if you still want access to raw records) */ recordsByCls: Map; /** Fast O(1) indexes of *instances*, sorted by priority (desc) */ private entriesByCls; private hooksByFlow; private hooksByFlowStage; constructor(providers: ProviderRegistry, list: HookType[]); protected buildMap(): RegistryBuildMapResult; protected buildGraph(): void; initialize(): Promise; /** Priority helper (default 0) */ private getPriority; /** Binary insert by priority (desc). Stable for equal priorities. */ private insertSorted; private upsert; private indexByClass; private indexByFlow; private indexByFlowStage; private initializeOne; registerHooks(embedded: boolean, ...records: HookRecord[]): Promise; /** Hooks for a given *flow*, filtered by owner if provided, sorted by priority (desc). */ getFlowHooksForOwner(flow: Name, ownerId?: string): HookEntry, Name, FlowStagesOf, FlowCtxOf>[]; /** Hooks defined on a given *class* (metadata.target), sorted by priority (desc). */ getClsHooks(token: Token): HookEntry[]; /** All hooks (instances, unordered) */ getHooks(): HookEntry[]; /** Hooks for a given *flow*, sorted by priority (desc). */ getFlowHooks(flow: Name): HookEntry, Name, FlowStagesOf, FlowCtxOf>[]; /** Hooks for a specific *flow + stage*, sorted by priority (desc). */ getFlowStageHooks(flow: Name, stage: FlowStagesOf | string): HookEntry, Name, FlowStagesOf, FlowCtxOf>[]; } //# sourceMappingURL=hook.registry.d.ts.map