import { z } from 'zod/v4'; import { parse } from './parse.js'; import { tryParse } from './parse.js'; import { toJsonSchema } from './json-schema.js'; import { branded } from './branded.js'; import * as col from '../db/col/index.js'; import * as idx from '../db/idx/index.js'; import * as schemaFeatures from '../db/schema-features.js'; export type { Schema, Infer } from './types.js'; export type { JsonSchema } from './json-schema.js'; /** Schema definition and validation namespace — wraps zod for validation, drizzle for table/column/index definitions. */ export declare const schema: { /** Column type builders for table definitions — text, uuid, integer, timestamp, jsonb, boolean, varchar, etc. */ readonly col: typeof col; /** Index and constraint builders — index, uniqueIndex, primaryKey, foreignKey, unique, check. */ readonly idx: typeof idx; readonly table: import("../query/pg-core/table.js").PgTableFn; readonly view: typeof schemaFeatures.view; readonly materializedView: typeof schemaFeatures.materializedView; readonly pgSchema: typeof schemaFeatures.pgSchema; readonly sequence: typeof schemaFeatures.sequence; readonly policy: typeof schemaFeatures.policy; readonly role: typeof schemaFeatures.role; readonly tableCreator: typeof schemaFeatures.tableCreator; readonly withReplicas: , TSchema extends import("../query/relations.js").TablesRelationalConfig, Q extends import("../query/pg-core/db.js").PgDatabase ? import("../query/relations.js").ExtractTablesWithRelations : TSchema>>(primary: Q, replicas: [Q, ...Q[]], getReplica?: (replicas: Q[]) => Q) => import("../query/pg-core/db.js").PgWithReplicas; /** Validation sub-namespace — type constructors, combinators, formats, coerce, parse, tryParse, toJsonSchema, branded. */ readonly check: { /** Enum schema from a list of string literals. */ readonly enum: typeof z.enum; /** Coercion sub-namespace — coerce.number(), coerce.boolean(), etc. */ readonly coerce: typeof z.coerce; /** Validates data against a schema, throws ValidationError with actionable message on failure. */ readonly parse: typeof parse; /** Validates data, returns { success, data } or { success: false, error } without throwing. */ readonly tryParse: typeof tryParse; /** Converts a schema to JSON Schema for OpenAPI or external validation. */ readonly toJsonSchema: typeof toJsonSchema; /** Creates a branded type — nominal typing for IDs, slugs, etc. */ readonly branded: typeof branded; readonly getErrorMap: typeof z.getErrorMap; readonly setErrorMap: typeof z.setErrorMap; readonly decode: (schema: T, value: z.core.input, _ctx?: z.core.ParseContext) => z.core.output; readonly decodeAsync: (schema: T, value: z.core.input, _ctx?: z.core.ParseContext) => Promise>; readonly encode: (schema: T, value: z.core.output, _ctx?: z.core.ParseContext) => z.core.input; readonly encodeAsync: (schema: T, value: z.core.output, _ctx?: z.core.ParseContext) => Promise>; readonly safeDecode: (schema: T, value: z.core.input, _ctx?: z.core.ParseContext) => z.ZodSafeParseResult>; readonly safeDecodeAsync: (schema: T, value: z.core.input, _ctx?: z.core.ParseContext) => Promise>>; readonly safeEncode: (schema: T, value: z.core.output, _ctx?: z.core.ParseContext) => z.ZodSafeParseResult>; readonly safeEncodeAsync: (schema: T, value: z.core.output, _ctx?: z.core.ParseContext) => Promise>>; readonly base64: typeof z.base64; readonly base64url: typeof z.base64url; readonly cidrv4: typeof z.cidrv4; readonly cidrv6: typeof z.cidrv6; readonly cuid: typeof z.cuid; readonly cuid2: typeof z.cuid2; readonly e164: typeof z.e164; readonly email: typeof z.email; readonly emoji: typeof z.emoji; readonly float32: typeof z.float32; readonly float64: typeof z.float64; readonly guid: typeof z.guid; readonly hex: typeof z.hex; readonly hostname: typeof z.hostname; readonly httpUrl: typeof z.httpUrl; readonly int32: typeof z.int32; readonly int64: typeof z.int64; readonly ipv4: typeof z.ipv4; readonly ipv6: typeof z.ipv6; readonly jwt: typeof z.jwt; readonly ksuid: typeof z.ksuid; readonly mac: typeof z.mac; readonly nanoid: typeof z.nanoid; readonly stringbool: (_params?: string | z.core.$ZodStringBoolParams) => z.ZodCodec; readonly stringFormat: typeof z.stringFormat; readonly uint32: typeof z.uint32; readonly uint64: typeof z.uint64; readonly ulid: typeof z.ulid; readonly url: typeof z.url; readonly uuid: typeof z.uuid; readonly uuidv4: typeof z.uuidv4; readonly uuidv6: typeof z.uuidv6; readonly uuidv7: typeof z.uuidv7; readonly xid: typeof z.xid; readonly _default: typeof z._default; readonly check: typeof z.check; readonly codec: typeof z.codec; readonly describe: typeof z.core.describe; readonly discriminatedUnion: typeof z.discriminatedUnion; readonly exactOptional: typeof z.exactOptional; readonly intersection: typeof z.intersection; readonly invertCodec: typeof z.invertCodec; readonly keyof: typeof z.keyof; readonly looseObject: typeof z.looseObject; readonly looseRecord: typeof z.looseRecord; readonly meta: typeof z.core.meta; readonly nonoptional: typeof z.nonoptional; readonly nullable: typeof z.nullable; readonly nullish: typeof z.nullish; readonly optional: typeof z.optional; readonly partialRecord: typeof z.partialRecord; readonly pipe: typeof z.pipe; readonly prefault: typeof z.prefault; readonly preprocess: typeof z.preprocess; readonly readonly: typeof z.readonly; readonly refine: typeof z.refine; readonly strictObject: typeof z.strictObject; readonly superRefine: typeof z.superRefine; readonly templateLiteral: typeof z.templateLiteral; readonly transform: typeof z.transform; readonly union: typeof z.union; readonly xor: typeof z.xor; readonly _function: typeof z._function; readonly any: typeof z.any; readonly array: typeof z.array; readonly bigint: typeof z.bigint; readonly boolean: typeof z.boolean; readonly custom: typeof z.custom; readonly date: typeof z.date; readonly file: typeof z.file; readonly int: typeof z.int; readonly json: typeof z.json; readonly lazy: typeof z.lazy; readonly literal: typeof z.literal; readonly map: typeof z.map; readonly nan: typeof z.nan; readonly nativeEnum: typeof z.nativeEnum; readonly never: typeof z.never; readonly number: typeof z.number; readonly object: typeof z.object; readonly promise: typeof z.promise; readonly record: typeof z.record; readonly set: typeof z.set; readonly string: typeof z.string; readonly symbol: typeof z.symbol; readonly tuple: typeof z.tuple; readonly unknown: typeof z.unknown; }; }; //# sourceMappingURL=namespace.d.ts.map