import type { GenericDocument, GenericFieldPaths, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes, IdField, SystemFields, SystemIndexes } from "convex/server"; import type { GenericValidator } from "convex/values"; import type { Schema, Types } from "effect"; import type { WithSystemFields } from "@confect/core/SystemFields"; import type * as Document_ from "./Document"; import type * as Table from "./Table"; export declare const TypeId: "~@confect/server/TableInfo"; export type TypeId = typeof TypeId; export type TableInfo = Table_ extends Table.Table ? { readonly [TypeId]: TypeId; readonly document: WithSystemFields>; readonly encodedDocument: WithSystemFields>; readonly convexDocument: ExtractConvexDocument; readonly fieldPaths: keyof IdField | ExtractFieldPaths; readonly indexes: Types.Simplify; readonly searchIndexes: SearchIndexes; readonly vectorIndexes: VectorIndexes; } : never; export interface Any { readonly [TypeId]: TypeId; } export interface AnyWithProps extends Any { readonly document: Document_.Any; readonly encodedDocument: Document_.AnyEncoded; readonly convexDocument: GenericDocument; readonly fieldPaths: GenericFieldPaths; readonly indexes: GenericTableIndexes; readonly searchIndexes: GenericTableSearchIndexes; readonly vectorIndexes: GenericTableVectorIndexes; } export type ConvexTableInfo = { document: TableInfo_["convexDocument"]; fieldPaths: TableInfo_["fieldPaths"]; indexes: TableInfo_["indexes"]; searchIndexes: TableInfo_["searchIndexes"]; vectorIndexes: TableInfo_["vectorIndexes"]; }; export type TableSchema = Schema.Codec; export type Document = TableInfo_["document"]; type ExtractFieldPaths = T["fieldPaths"] | keyof SystemFields; type ExtractConvexDocument = WithSystemFields extends GenericDocument ? WithSystemFields : never; export {}; //# sourceMappingURL=TableInfo.d.ts.map