import { CollectionRegistry } from "@rebasepro/common"; import { type CollectionConfig } from "@rebasepro/types"; import { PgEnum, PgTable } from "drizzle-orm/pg-core"; import { Relations } from "drizzle-orm"; import { CollectionRegistryInterface } from "../interfaces"; /** * PostgreSQL-specific collection registry. * Extends the base CollectionRegistry with support for Drizzle ORM tables, enums, and relations. * * Satisfies CollectionRegistryInterface through inheritance from CollectionRegistry. */ export declare class PostgresCollectionRegistry extends CollectionRegistry implements CollectionRegistryInterface { private tables; private enums; private relations; registerTable(table: PgTable, tableName: string): void; getTable(tableName: string): PgTable | undefined; /** * Checks if a specific collection has a registered table */ hasTableForCollection(tableName: string): boolean; /** * Returns all registered table names. */ getTableNames(): string[]; /** * Finds collections assigned to a specific data source that do not have a registered table. */ getCollectionsWithoutTables(dataSourceKey?: string): CollectionConfig[]; registerEnums(enums: Record>): void; registerRelations(relations: Record): void; getEnum(name: string): PgEnum<[string, ...string[]]> | undefined; getRelation(name: string): Relations | undefined; getAllEnums(): Record>; getAllRelations(): Record; /** * Get the merged schema object (tables + relations) for use with Drizzle's * relational query API (`db.query`). */ getMergedSchema(): Record; /** * Get the available Drizzle relation keys for a given collection path. * Maps from the collection's relation property names to the Drizzle relation names * defined in the schema. */ getRelationKeysForCollection(collectionPath: string): string[]; }