import type * as t from '@sinclair/typebox'; import type { Table, View } from 'drizzle-orm'; import type { PgEnum } from 'drizzle-orm/pg-core'; import type { EnumValuesToEnum } from './column.types.js'; import type { BuildRefine, BuildSchema, NoUnknownKeys } from './schema.types.internal.js'; export interface CreateSelectSchema { (table: TTable): BuildSchema<'select', TTable['_']['columns'], undefined>; >(table: TTable, refine?: NoUnknownKeys): BuildSchema<'select', TTable['_']['columns'], TRefine>; (view: TView): BuildSchema<'select', TView['_']['selectedFields'], undefined>; >(view: TView, refine: NoUnknownKeys): BuildSchema<'select', TView['_']['selectedFields'], TRefine>; >(enum_: TEnum): t.TEnum>; } export interface CreateInsertSchema { (table: TTable): BuildSchema<'insert', TTable['_']['columns'], undefined>; >>(table: TTable, refine?: NoUnknownKeys): BuildSchema<'insert', TTable['_']['columns'], TRefine>; } export interface CreateUpdateSchema { (table: TTable): BuildSchema<'update', TTable['_']['columns'], undefined>; >>(table: TTable, refine?: TRefine): BuildSchema<'update', TTable['_']['columns'], TRefine>; } export interface CreateSchemaFactoryOptions { typeboxInstance?: any; }