import { entityKind } from 'drizzle-orm'; import { NamespaceConfig, PodTableOptions, PodTableMapping, TableHooks } from './defs'; import { PodColumnBase } from './columns'; import { InferTableData, InferInsertData, InferUpdateData, ColumnInput, ResolvedColumns } from './types'; import { SolidSchema } from './solid-schema'; import { type PodResourceReference, type PodResourceTarget } from '../resource-reference'; /** * PodTable with columns accessible as direct properties. * This type combines PodTable with its column definitions. */ export type PodTableWithColumns>> = PodTable & TColumns; /** * Resource-narrative alias for shared models. Table naming remains for * drizzle-compatible internals; model packages should expose resources. */ export type PodResource> = Record>> = PodTable; export type PodResourceWithColumns>> = PodTableWithColumns; export interface PodTableInitializer { registerTable(table: PodTable): Promise; } export declare class PodTable> = Record>> { static readonly [entityKind] = "PodTable"; config: { name: string; base: string; type: string; namespace?: NamespaceConfig; typeIndex?: 'private' | 'public'; saiRegistryPath?: string; subClassOf?: string[]; /** * @deprecated Present only when a legacy/explicit subjectTemplate is set. * Omitted means exact-id mode. */ subjectTemplate?: string; containerPath?: string; resourcePath?: string; autoRegister?: boolean; hooks?: TableHooks; }; mapping: PodTableMapping; relations?: Record; private resourcePath; private containerPath; private initialized; private subjectTemplate?; private hasCustomSubjectTemplate; private resourceMode?; private sparqlEndpoint?; private registerTypeIndexEnabled; private parentClasses; columns: TColumns; readonly $inferSelect: InferTableData>; readonly $inferInsert: InferInsertData>; readonly $inferUpdate: InferUpdateData>; readonly _: { readonly brand: 'Table'; readonly config: PodTableOptions; readonly name: string; readonly schema: string | undefined; readonly columns: TColumns; readonly inferSelect: InferTableData>; readonly inferInsert: InferInsertData>; readonly inferUpdate: InferUpdateData>; }; constructor(name: string, columns: TColumns, options: PodTableOptions); getContainerPath(): string; getType(): string; getRdfClass(): string; getNamespace(): NamespaceConfig | undefined; /** * @deprecated subjectTemplate is compatibility-only. Omitted means exact-id mode. */ getSubjectTemplate(): string | undefined; buildId(target: PodResourceTarget): string; buildIri(webIdOrPodUrl: string, target: PodResourceTarget): string; buildIriForDatabase(database: unknown, target: PodResourceTarget): string; resolveIriForDatabase(database: unknown, target: PodResourceTarget | null | undefined): string | null; parseRef(ref: string | null | undefined): PodResourceReference | null; extractTemplateValue(ref: string | null | undefined, field?: string): string | null; hasCustomTemplate(): boolean; getSubClassOf(): string[]; getMapping(): PodTableMapping; get $schema(): SolidSchema; resolveUri(id: string): string; private resolveBase; private normalizeBaseInput; private normalizeResourcePath; private deriveContainerPath; private ensureTrailingSlash; getResourcePath(): string; getResourceMode(): 'ldp' | 'sparql' | undefined; getSparqlEndpoint(): string | undefined; shouldRegisterTypeIndex(): boolean; init(initializer: PodTableInitializer): Promise; isInitialized(): boolean; markInitialized(initialized?: boolean): void; setBase(base: string): void; setSubjectTemplate(template: string): void; setSparqlEndpoint(endpoint: string): void; getColumns(): TColumns; getColumn(name: TKey): TColumns[TKey]; getColumn(name: string): PodColumnBase | undefined; hasColumn(name: string): boolean; private resolveSubjectTemplate; /** * No subjectTemplate means exact-id mode: public id is already a * base-relative resource id. Callers must pass subjectTemplate explicitly * for document/fragment template behavior. */ private buildTableMapping; private buildColumnMapping; private inferColumnDatatype; private normalizeParents; } export declare function alias>>(table: PodTableWithColumns, aliasName: string): PodTableWithColumns; export declare function podTable>(name: TName, columns: TColumns, options: PodTableOptions): PodTableWithColumns>; //# sourceMappingURL=pod-table.d.ts.map