import type { AnyRouter } from '@orpc/server'; import type { ExposedApiTables } from '../api/types.js'; /** Shape of the `$inferClient` phantom `createBunderstack` puts on the app. */ export type ClientCarrier = { schema: Record; access: unknown; buckets: string; api: AnyRouter; }; export type AnyBunderstackApp = { $inferClient?: ClientCarrier | undefined; }; export type InferCarrier = NonNullable; export type InferSchema = InferCarrier['schema']; export type InferBuckets = InferCarrier['buckets']; export type InferSelect = T extends { $inferSelect: infer R; } ? R : never; export type InferInsert = T extends { $inferInsert: infer R; } ? R : never; export type InferApiRouter = InferCarrier['api']; export type ExposedTables, TAccess = undefined> = ExposedApiTables; export type InferTables = ExposedTables, InferCarrier['access']> & keyof InferSchema & string; //# sourceMappingURL=infer.d.ts.map