import { TableDefinition, DatabaseSchema, JoinOptions } from '../shared/types'; import { FakeServerTable } from './fake-table'; /** * Fake ORM instance for server-side development mode * Mimics ServerORMInstance API but uses in-memory storage instead of Appwrite */ export declare class FakeServerORMInstance { private schemas; private collectionIds; private tables; private fakeDb; constructor(databaseId: string, schemas: Map, collectionIds?: Map); /** * Get a table instance by name */ table(name: K): FakeServerTable['schema'], any>; /** * Legacy method - Create a new document * @deprecated Use table(name).create() instead */ create(collection: K, data: any): Promise; /** * Legacy method - Update a document * @deprecated Use table(name).update() instead */ update(collection: K, documentId: string, data: any): Promise; /** * Legacy method - Get a document by ID * @deprecated Use table(name).get() instead */ get(collection: K, documentId: string): Promise; /** * Legacy method - List documents * @deprecated Use table(name).query() or table(name).all() instead */ list(collection: K, queries?: string[]): Promise<{ documents: any[]; total: number; }>; /** * Legacy method - Delete a document * @deprecated Use table(name).delete() instead */ delete(collection: K, documentId: string): Promise; /** * Legacy method - Create a new collection (server-only feature) * @deprecated Use table(name).createCollection() instead */ createCollection(collectionId: K, name: string, permissions?: string[]): Promise; /** * Legacy method - Delete a collection (server-only feature) * @deprecated Use table(name).deleteCollection() instead */ deleteCollection(collectionId: K): Promise; /** * Join two collections (simplified in development mode) */ join(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Left join two collections */ leftJoin(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Inner join two collections */ innerJoin(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Export schema to SQL format (not supported in fake mode) */ exportToSQL(): string; /** * Export schema to Firebase format (not supported in fake mode) */ exportToFirebase(): string; /** * Export schema to text format (not supported in fake mode) */ exportToText(): string; /** * Export all data from all tables to JSON * Returns a JSON string with all collections and their documents */ exportDataToJSON(): Promise; /** * Export all data from all tables as an object * Returns an object with collection names as keys and document arrays as values */ exportDataToObject(): Promise>; /** * Export data from specific tables to JSON */ exportTablesDataToJSON(tableNames: string[]): Promise; /** * Export data from specific tables as an object */ exportTablesDataToObject(tableNames: string[]): Promise>; /** * Clear all development data */ clearAll(): void; /** * Close all listeners across all tables (useful for test cleanup) */ closeListeners(): void; } //# sourceMappingURL=fake-orm-instance.d.ts.map