import { hookResultData } from "../hook-reads.js"; import { bootFollowUpFailed, bootFollowUpSkipped, bootFollowUpSucceeded, type BootFollowUpOutcomeDetails } from "./outcomes.js"; import { readBootBoolean, readBootRecord, readBootRecordBoolean, readBootRecordById, type BootEntityReaderInput } from "./read.js"; import type { RuntimeBootFollowUpOutcome, RuntimeFollowUp, RuntimeFollowUpRegistry } from "../types.js"; import type { MaybePromise, StoreContext, StoreContextInput, StoreLogger, StoreLoggerAdapter, StoreReadOptions, StoreRecord, StoreWhere } from "../../types.js"; declare const BOOT_FOLLOW_UP_DISPATCH: unique symbol; interface BootFollowUpDispatcherOptions { logger?: StoreLogger; loggerAdapter?: StoreLoggerAdapter; reader?: BootEntityReaderInput; guards?: Record; handlers: Record; } type BootFollowUpHandler = BootFollowUpFunction | BootFollowUpHandlerConfig; type BootFollowUpFunction = (input: BootFollowUpHandlerInput) => MaybePromise; interface BootFollowUpHandlerConfig { guard?: string; policy?: string | { field: string; fallback?: boolean; }; run: BootFollowUpFunction; } interface BootFollowUpGuard { timeoutMs?: number; pollMs?: number; resolveTarget(input: BootFollowUpHandlerInput): MaybePromise; isReady(targetId: string, input: BootFollowUpHandlerInput): MaybePromise; } interface BootFollowUpHandlerInput { call: string; entity: string; record: StoreRecord; config?: StoreWhere; context?: StoreContext; api: BootFollowUpHandlerApi; } interface BootFollowUpHandlerApi { readBoolean(record: StoreRecord, path: string, fallback?: boolean): boolean; readById(entity: string, id: string, context?: StoreContextInput, options?: StoreReadOptions): Promise; readRecord(entity: string, where: StoreWhere, context?: StoreContextInput, options?: StoreReadOptions): Promise; readRecordBoolean(entity: string, where: StoreWhere, path: string, fallback?: boolean, context?: StoreContextInput, options?: StoreReadOptions): Promise; skipped(details?: BootFollowUpOutcomeDetails): RuntimeBootFollowUpOutcome; succeeded(value?: unknown): RuntimeBootFollowUpOutcome; failed(error?: unknown): RuntimeBootFollowUpOutcome; } type BootFollowUpDispatcherRegistry = RuntimeFollowUpRegistry & { [BOOT_FOLLOW_UP_DISPATCH]: RuntimeFollowUp; }; declare function createBootFollowUpDispatcher(options: BootFollowUpDispatcherOptions): BootFollowUpDispatcherRegistry; declare function finishBootFollowUp(api: Pick, output: unknown): RuntimeBootFollowUpOutcome; declare const bootResultData: typeof hookResultData; export { BOOT_FOLLOW_UP_DISPATCH, bootFollowUpFailed, bootResultData, bootFollowUpSkipped, bootFollowUpSucceeded, createBootFollowUpDispatcher, finishBootFollowUp, readBootRecord, readBootRecordBoolean, readBootRecordById, readBootBoolean, }; export type { BootEntityReaderInput, BootFollowUpDispatcherOptions, BootFollowUpDispatcherRegistry, BootFollowUpFunction, BootFollowUpGuard, BootFollowUpHandler, BootFollowUpHandlerApi, BootFollowUpHandlerConfig, BootFollowUpHandlerInput, BootFollowUpOutcomeDetails, }; //# sourceMappingURL=followups.d.ts.map