UNPKG

@zingage/postgres-multi-tenant-ids

Version:

PostgreSQL IDs for secure multi-tenant applications

9 lines 667 B
import { z } from "zod/v4"; import type { ScopedId, TenantId, UnscopedId } from "./helpers/config-agnostic-types.js"; import type { EntityTypesConfig } from "./index.js"; export declare function makeZodSchemas<T extends EntityTypesConfig>(_entityConfigs: T): { tenantIdSchema: z.ZodCustom<TenantId, TenantId>; unscopedIdSchemaOfType: <K extends keyof T["crossTenant"] & string>() => z.ZodCustom<UnscopedId<T["crossTenant"], K>, UnscopedId<T["crossTenant"], K>>; scopedIdSchemaOfType: <K extends keyof T["tenantScoped"] & string>() => z.ZodCustom<ScopedId<T["tenantScoped"], K>, ScopedId<T["tenantScoped"], K>>; }; //# sourceMappingURL=zod-schemas.d.ts.map