/** * Framework-agnostic core logic shared by sdk-react and sdk-vue. * * Each function returns a plain Promise. Framework wrappers (React hooks / * Vue composables) are responsible only for binding these to their reactive * state primitives (useState/ref) and lifecycle hooks (useEffect/onMounted). */ import type { ZveltioClient } from './client.js'; import type { ZveltioRealtime } from './realtime.js'; export interface CollectionOptions { page?: number; limit?: number; sort?: string; order?: 'asc' | 'desc'; filter?: Record; search?: string; } export interface CollectionResult { records: T[]; pagination: { total: number; page: number; limit: number; pages: number; }; } export interface AuthState { user: any | null; session: any | null; } export interface StorageFile { id: string; filename: string; url: string; size: number; mime_type: string; [key: string]: any; } export interface SyncStatus { pendingOps: number; isSyncing: boolean; lastSyncAt: Date | null; isOnline: boolean; } export declare function fetchCollection(client: ZveltioClient, collectionName: string, options?: CollectionOptions): Promise; export declare function fetchRecord(client: ZveltioClient, collectionName: string, id: string): Promise; export declare function createRecord(client: ZveltioClient, collectionName: string, data: Partial): Promise; export declare function updateRecord(client: ZveltioClient, collectionName: string, id: string, data: Partial): Promise; export declare function deleteRecord(client: ZveltioClient, collectionName: string, id: string): Promise; export declare function fetchSession(client: ZveltioClient): Promise; export declare function loginUser(client: ZveltioClient, email: string, password: string): Promise; export declare function logoutUser(client: ZveltioClient): Promise; export declare function signupUser(client: ZveltioClient, email: string, password: string, name: string): Promise; export declare function uploadFile(client: ZveltioClient, file: File, folder?: string): Promise; export declare function listFiles(client: ZveltioClient, folder?: string): Promise; export declare function removeFile(client: ZveltioClient, fileId: string): Promise; export declare function subscribeToCollection(realtime: ZveltioRealtime, collection: string, callback: (event: { type: string; data: any; }) => void): () => void; //# sourceMappingURL=core.d.ts.map