declare const postgresColumnSchema: import("arktype/internal/variants/object.ts").ObjectType<{ table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }, {}>; export type PostgresColumn = typeof postgresColumnSchema.infer; declare const postgresForeignTableSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; schema: string; name: string; comment: string | null; columns?: { table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }[] | undefined; }, {}>; export type PostgresForeignTable = typeof postgresForeignTableSchema.infer; declare const postgresFunctionSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; schema: string; name: string; language: string; definition: string; complete_statement: string; args: { mode: "in" | "inout" | "out" | "table" | "variadic"; name: string; type_id: number; has_default: boolean | null; }[]; argument_types: string; identity_argument_types: string; return_type_id: number; return_type: string; return_type_relation_id: number | null; is_set_returning_function: boolean; prorows: number | null; behavior: "IMMUTABLE" | "STABLE" | "VOLATILE"; security_definer: boolean; config_params: { [x: string]: string; } | null; }, {}>; export type PostgresFunction = typeof postgresFunctionSchema.infer; declare const postgresMaterializedViewSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; schema: string; name: string; is_populated: boolean; comment: string | null; columns?: { table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }[] | undefined; }, {}>; export type PostgresMaterializedView = typeof postgresMaterializedViewSchema.infer; declare const postgresPrimaryKeySchema: import("arktype/internal/variants/object.ts").ObjectType<{ schema: string; table_name: string; name: string; table_id: number; }, {}>; export type PostgresPrimaryKey = typeof postgresPrimaryKeySchema.infer; declare const postgresRelationshipSchema: import("arktype/internal/variants/object.ts").ObjectType<{ foreign_key_name: string; schema: string; relation: string; columns: string[]; is_one_to_one: boolean; referenced_schema: string; referenced_relation: string; referenced_columns: string[]; }, {}>; export type PostgresRelationship = typeof postgresRelationshipSchema.infer; declare const postgresSchemaSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; name: string; owner: string; }, {}>; export type PostgresSchema = typeof postgresSchemaSchema.infer; declare const postgresTableSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; schema: string; name: string; rls_enabled: boolean; rls_forced: boolean; replica_identity: "DEFAULT" | "FULL" | "INDEX" | "NOTHING"; bytes: number; size: string; live_rows_estimate: number; dead_rows_estimate: number; comment: string | null; columns?: { table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }[] | undefined; }, {}>; export type PostgresTable = typeof postgresTableSchema.infer; declare const postgresTypeSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; name: string; schema: string; format: string; enums: string[]; attributes: { name: string; type_id: number; }[]; comment: string | null; type_relation_id: number | null; }, {}>; export type PostgresType = typeof postgresTypeSchema.infer; declare const postgresViewSchema: import("arktype/internal/variants/object.ts").ObjectType<{ id: number; schema: string; name: string; is_updatable: boolean; is_insert_enabled?: boolean | undefined; is_update_enabled?: boolean | undefined; comment: string | null; columns?: { table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }[] | undefined; }, {}>; export type PostgresView = typeof postgresViewSchema.infer; /** * A reference to a `types` entry by oid. `format` is the type's `name` (the * same spelling `PostgresColumn.format` uses, `_` prefixed for arrays) and * `type_schema` its schema; both are `null` when the type is not in `types`, * which never happens in a document produced by `introspect()`. */ declare const rpcTypeReferenceSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type_id: number; format: string | null; type_schema: string | null; }, {}>; export type RpcTypeReference = typeof rpcTypeReferenceSchema.infer; declare const rpcFunctionArgSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type_id: number; format: string | null; type_schema: string | null; name: string; mode: "in" | "inout" | "variadic"; has_default: boolean; relation_id: number | null; }, {}>; export type RpcFunctionArg = typeof rpcFunctionArgSchema.infer; declare const rpcFunctionReturnsSchema: import("arktype/internal/variants/object.ts").ObjectType<{ type_id: number; format: string | null; type_schema: string | null; relation_id: number | null; columns: { type_id: number; format: string | null; type_schema: string | null; name: string; }[] | null; }, {}>; export type RpcFunctionReturns = typeof rpcFunctionReturnsSchema.infer; declare const rpcFunctionOverloadSchema: import("arktype/internal/variants/object.ts").ObjectType<{ function_id: number; args: { type_id: number; format: string | null; type_schema: string | null; name: string; mode: "in" | "inout" | "variadic"; has_default: boolean; relation_id: number | null; }[]; returns: { type_id: number; format: string | null; type_schema: string | null; relation_id: number | null; columns: { type_id: number; format: string | null; type_schema: string | null; name: string; }[] | null; }; is_set_returning: boolean; rows_estimate: number | null; setof_options: { from: string; to: string; is_one_to_one: boolean; is_setof_return: boolean; } | null; computed_field_of: number | null; error: string | null; }, {}>; export type RpcFunctionOverload = typeof rpcFunctionOverloadSchema.infer; /** * A function PostgREST exposes under `/rpc`, with its overloads resolved. * Produced by `resolveRpcFunctions` from the raw `functions` collection. */ declare const rpcFunctionSchema: import("arktype/internal/variants/object.ts").ObjectType<{ schema: string; name: string; overloads: { function_id: number; args: { type_id: number; format: string | null; type_schema: string | null; name: string; mode: "in" | "inout" | "variadic"; has_default: boolean; relation_id: number | null; }[]; returns: { type_id: number; format: string | null; type_schema: string | null; relation_id: number | null; columns: { type_id: number; format: string | null; type_schema: string | null; name: string; }[] | null; }; is_set_returning: boolean; rows_estimate: number | null; setof_options: { from: string; to: string; is_one_to_one: boolean; is_setof_return: boolean; } | null; computed_field_of: number | null; error: string | null; }[]; }, {}>; export type RpcFunction = typeof rpcFunctionSchema.infer; /** * Bumped whenever `GeneratorMetadata`'s shape changes in a way a consumer * should branch on. Out-of-process consumers (a generator in another * language's SDK repo, fed JSON over a process boundary) only see the * serialized document, so a shape change is otherwise undetectable until * something breaks at read time. */ export declare const GENERATOR_METADATA_VERSION = 1; /** * The complete set of introspected metadata required to generate types. * Produced by `introspect()` (the default SQL-based producer) or any other * source able to satisfy this shape. The table-like collections drop the * optional `columns` field (mirroring `Omit<…, "columns">`); columns are * carried separately on `columns`. */ export declare const generatorMetadataSchema: import("arktype/internal/variants/object.ts").ObjectType<{ version: 1; schemas: { id: number; name: string; owner: string; }[]; tables: { bytes: number; comment: string | null; dead_rows_estimate: number; id: number; live_rows_estimate: number; name: string; replica_identity: "DEFAULT" | "FULL" | "INDEX" | "NOTHING"; rls_enabled: boolean; rls_forced: boolean; schema: string; size: string; }[]; foreignTables: { comment: string | null; id: number; name: string; schema: string; }[]; views: { comment: string | null; id: number; is_insert_enabled?: boolean | undefined; is_updatable: boolean; is_update_enabled?: boolean | undefined; name: string; schema: string; }[]; materializedViews: { comment: string | null; id: number; is_populated: boolean; name: string; schema: string; }[]; columns: { table_id: number; schema: string; table: string; id: string; ordinal_position: number; name: string; default_value: unknown; data_type: string; format: string; type_schema: string; is_identity: boolean; identity_generation: "ALWAYS" | "BY DEFAULT" | null; is_generated: boolean; is_nullable: boolean; is_updatable: boolean; is_unique: boolean; enums: string[]; check: string | null; comment: string | null; }[]; primaryKeys: { schema: string; table_name: string; name: string; table_id: number; }[]; relationships: { foreign_key_name: string; schema: string; relation: string; columns: string[]; is_one_to_one: boolean; referenced_schema: string; referenced_relation: string; referenced_columns: string[]; }[]; functions: { id: number; schema: string; name: string; language: string; definition: string; complete_statement: string; args: { mode: "in" | "inout" | "out" | "table" | "variadic"; name: string; type_id: number; has_default: boolean | null; }[]; argument_types: string; identity_argument_types: string; return_type_id: number; return_type: string; return_type_relation_id: number | null; is_set_returning_function: boolean; prorows: number | null; behavior: "IMMUTABLE" | "STABLE" | "VOLATILE"; security_definer: boolean; config_params: { [x: string]: string; } | null; }[]; types: { id: number; name: string; schema: string; format: string; enums: string[]; attributes: { name: string; type_id: number; }[]; comment: string | null; type_relation_id: number | null; }[]; rpcFunctions?: { schema: string; name: string; overloads: { function_id: number; args: { type_id: number; format: string | null; type_schema: string | null; name: string; mode: "in" | "inout" | "variadic"; has_default: boolean; relation_id: number | null; }[]; returns: { type_id: number; format: string | null; type_schema: string | null; relation_id: number | null; columns: { type_id: number; format: string | null; type_schema: string | null; name: string; }[] | null; }; is_set_returning: boolean; rows_estimate: number | null; setof_options: { from: string; to: string; is_one_to_one: boolean; is_setof_return: boolean; } | null; computed_field_of: number | null; error: string | null; }[]; }[] | undefined; }, {}>; export type GeneratorMetadata = typeof generatorMetadataSchema.infer; /** * JSON Schema for {@link generatorMetadataSchema}, published so out-of-process * consumers (a generator living in its own SDK repo, not this package) can * validate or generate types against the contract without depending on * ArkType or this package's TypeScript types. */ export declare const generatorMetadataJsonSchema: import("arktype").JsonSchema.NonBooleanBranch; /** * Serialize a {@link GeneratorMetadata} value to the JSON document that * crosses the process boundary to an out-of-process generator (e.g. `dart * run supabase_typegen`). `GeneratorMetadata` is plain, JSON-safe data, so * this is a thin, explicit boundary rather than a transform, kept as a named * export so every caller serializes the contract the same way. */ export declare function serializeGeneratorMetadata(metadata: GeneratorMetadata): string; /** * Validate an unknown value against the {@link generatorMetadataSchema} and * return it typed as {@link GeneratorMetadata}. Throws a `TypeError` with * ArkType's human-readable summary if validation fails. * * Offered as an opt-in helper so any integrator producing `GeneratorMetadata` * through an injected adapter can verify the result at runtime instead of * casting. `introspect()` does not call this — wrap its result yourself when * you want the guarantee: * * ```ts * const metadata = parseGeneratorMetadata(await introspect(db)); * ``` */ export declare function parseGeneratorMetadata(data: unknown): GeneratorMetadata; export {};