import { Databases } from 'appwrite'; import { TableDefinition, DatabaseSchema, JoinOptions } from '../shared/types'; import { WebTable } from './table'; export declare class WebORMInstance { private databases; private databaseId; private schemas; private collectionIds; private client?; private config?; private tables; constructor(databases: Databases, databaseId: string, schemas: Map, collectionIds?: Map, client?: any | undefined, config?: any | undefined); /** * Get a table instance by name (similar to SQLAlchemy's table access) */ table(name: K): WebTable['schema'], any>; /** * Legacy method - Create a new document with validation * @deprecated Use table(name).create() instead */ create(collection: K, data: any): Promise; /** * Legacy method - Update a document with validation * @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 with optional queries * @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; /** * Join two collections by fetching related documents * This performs a client-side join by fetching documents from both collections */ join(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Left join two collections - includes all documents from collection1 even if no match in collection2 */ leftJoin(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Inner join two collections - only includes documents where there's a match in both collections */ innerJoin(collection1: K1, collection2: K2, options: JoinOptions, filters1?: Record, filters2?: Record): Promise; /** * Close all listeners across all tables (useful for test cleanup) */ closeListeners(): void; /** * 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>; } //# sourceMappingURL=orm-instance.d.ts.map