/** * Custom type definition * Allows defining custom PostgreSQL types with TypeScript mapping */ export interface CustomType { /** * PostgreSQL type name */ dataType: string; /** * Convert TypeScript value to database value */ toDriver(value: TData): TDriver; /** * Convert database value to TypeScript value */ fromDriver(value: TDriver): TData; } /** * Custom type builder */ export declare class CustomTypeBuilder { private config; constructor(config: { dataType: string; toDriver: (value: TData) => TDriver; fromDriver: (value: TDriver) => TData; }); /** * Gets the custom type definition */ getType(): CustomType; /** * Gets the PostgreSQL type name */ get dataType(): string; } /** * Creates a custom type */ export declare function customType(config: { dataType: string; toDriver: (value: TData) => TDriver; fromDriver: (value: TDriver) => TData; }): CustomTypeBuilder; /** * Common custom types */ /** * JSON type with automatic serialization * Note: PostgreSQL drivers return jsonb as already-parsed objects */ export declare const json: () => CustomTypeBuilder; export declare const array: (itemType: string) => CustomTypeBuilder; /** * Enum type */ export declare const enumType: (enumName: string, values: readonly T[]) => CustomTypeBuilder; /** * Point type (geometric) */ export interface Point { x: number; y: number; } export declare const point: () => CustomTypeBuilder; /** * Vector type (for pgvector extension) */ export declare const vector: (dimensions: number) => CustomTypeBuilder; /** * Interval type */ export interface Interval { years?: number; months?: number; days?: number; hours?: number; minutes?: number; seconds?: number; } export declare const interval: () => CustomTypeBuilder; //# sourceMappingURL=custom-types.d.ts.map