import { _ as RpcFunctionDefinitionAny, c as RpcDumpClientOptions, l as RpcDumpCollectionOptions, m as RpcDumpStore, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecordError } from "./types-BkkQ0Txg.mjs"; //#region src/rpc/dump/static.d.ts type StaticRpcDumpSerialization = 'json' | 'structured-clone'; interface StaticRpcDumpManifestStaticEntry { type: 'static'; path: string; /** Encoder used when this entry's file was written. Default: `'json'`. */ serialization?: StaticRpcDumpSerialization; } interface StaticRpcDumpManifestQueryEntry { type: 'query'; records: Record; fallback?: string; /** Encoder used when each record/fallback file was written. Default: `'json'`. */ serialization?: StaticRpcDumpSerialization; } type StaticRpcDumpManifestValue = StaticRpcDumpManifestStaticEntry | StaticRpcDumpManifestQueryEntry | any; type StaticRpcDumpManifest = Record; interface StaticRpcDumpFile { /** Whether this file was written via `JSON.stringify` or `structured-clone-es.stringify`. */ serialization: StaticRpcDumpSerialization; /** Function name the file belongs to — used to scope `DF0019` errors during write. */ fnName: string; /** Payload to encode. */ data: unknown; } interface StaticRpcDumpCollection { manifest: StaticRpcDumpManifest; files: Record; } declare function collectStaticRpcDump(definitions: Iterable, context: any): Promise; //#endregion //#region src/rpc/dump/collect.d.ts /** * Collects pre-computed dumps by executing functions with their defined input combinations. * Static functions without dump config automatically get `{ inputs: [[]] }`. * * @example * ```ts * const store = await dumpFunctions([greet], context, { concurrency: 10 }) * ``` */ declare function dumpFunctions(definitions: T, context?: any, options?: RpcDumpCollectionOptions): Promise>>; /** * Creates a client that serves pre-computed results from a dump store. * Uses argument hashing to match calls to stored records. * * @example * ```ts * const client = createClientFromDump(store) * await client.greet('Alice') * ``` */ declare function createClientFromDump>(store: RpcDumpStore, options?: RpcDumpClientOptions): BirpcReturn; /** * Filters function definitions to only those with dump definitions. * Note: Only checks the definition itself, not setup results. */ declare function getDefinitionsWithDumps(definitions: T): RpcFunctionDefinitionAny[]; //#endregion //#region src/rpc/dump/error.d.ts /** * Normalize a thrown value into a plain object suitable for storage in * a dump record. Preserves `message`, `name`, `cause`, and any own * enumerable properties of an `Error` so consumers reading the dump can * reconstruct a richer Error than just `{ message, name }`. * * Non-`Error` throws are wrapped as `{ name: 'Error', message: String(thrown) }`. */ declare function serializeDumpError(error: unknown): RpcDumpRecordError; /** * Inverse of {@link serializeDumpError}: rebuild a thrown `Error` from * the plain object stored in a dump record. Preserves `cause`, restores * the original `name`, and re-attaches any custom own properties. */ declare function reviveDumpError(stored: RpcDumpRecordError): Error; //#endregion export { getDefinitionsWithDumps as a, StaticRpcDumpManifest as c, StaticRpcDumpManifestValue as d, StaticRpcDumpSerialization as f, dumpFunctions as i, StaticRpcDumpManifestQueryEntry as l, serializeDumpError as n, StaticRpcDumpCollection as o, collectStaticRpcDump as p, createClientFromDump as r, StaticRpcDumpFile as s, reviveDumpError as t, StaticRpcDumpManifestStaticEntry as u };