import type { Handler, CheckpointFn } from './types.js'; import type { DB } from '../../data/db/types.js'; import type { Flow } from '../context/types.js'; import type { HttpRequest, HttpResponse } from '../http/types.js'; export interface ResolveOptions { readonly request?: HttpRequest; readonly response?: HttpResponse; readonly rawBody?: Buffer; /** * The `checkpoint` primitive for a manual-transaction job. Injected as the * `checkpoint` dep; the top-level database deps are then NOT injected, since * a non-transactional handle outside a checkpoint would be a footgun. */ readonly checkpoint?: CheckpointFn; } /** * Resolves the database deps a handler declared with `.use()` into the deps * record keyed as the handler sees them ('db' for the default database, the * name otherwise). Each handle is the context's bound transaction when one is * active (request/job/checkpoint), otherwise a pooled connection. * * `scoped` (default `true`) wraps each handle in the tenant scope/guard proxy — * the safe builder surface used for request and auto-mode job deps. The * manual-mode `checkpoint` primitive passes `scoped: false` to hand the handler * the raw bound transaction: a checkpointed job owns its own boundaries and runs * arbitrary SQL, with tenant isolation enforced by the RLS session vars the * checkpoint sets (`SET LOCAL pipework.tenant_id`), exactly as `pipe.transaction` * already exposes a raw `tx`. Shared by both paths so they cannot drift. */ export declare function resolveDatabaseDeps(databases: readonly string[], ctx: Flow, options?: { readonly scoped?: boolean; }): Record; export declare function resolveAndExecute, TReturn>(handler: Handler, rawInput?: unknown, rawQuery?: unknown, rawParams?: unknown, options?: ResolveOptions): Promise; //# sourceMappingURL=resolve.d.ts.map