export interface BaseFlowConfig { url: string; apiKey?: string; serviceRoleKey?: string; mode?: 'local' | 'cloud'; } export interface AuthUser { id: string; email: string; name?: string; created_at: string; updated_at: string; last_sign_in?: string; email_confirmed?: boolean; user_metadata?: Record; } export interface AuthSession { access_token: string; user: AuthUser; } export interface QueryOptions { select?: string; where?: string; order?: string; limit?: number; offset?: number; } export interface StorageFile { name: string; path: string; size: number; type: 'file' | 'folder'; modified: string; } /** * BaseFlow Client - Universal client for local and cloud BaseFlow */ export declare class BaseFlowClient { private config; private authToken; constructor(config: BaseFlowConfig); /** * Make authenticated API request */ private request; /** * Get API base path based on mode */ private getApiPath; auth: { /** * Sign up new user */ signUp: (email: string, password: string, options?: { name?: string; data?: Record; }) => Promise; /** * Sign in user */ signIn: (email: string, password: string) => Promise; /** * Sign out user */ signOut: () => Promise; /** * Get current user */ getUser: () => Promise; /** * Set auth token manually */ setToken: (token: string) => void; /** * Get current auth token */ getToken: () => string | null; }; database: { /** * Query table data */ from: (table: string) => { select: (columns?: string) => { eq: (column: string, value: any) => Promise; neq: (column: string, value: any) => Promise; gt: (column: string, value: any) => Promise; gte: (column: string, value: any) => Promise; lt: (column: string, value: any) => Promise; lte: (column: string, value: any) => Promise; like: (column: string, pattern: string) => Promise; in: (column: string, values: any[]) => Promise; order: (column: string, ascending?: boolean) => Promise; limit: (count: number) => Promise; offset: (count: number) => Promise; execute: () => Promise; }; insert: (data: Record | Record[]) => Promise; update: (data: Record) => { eq: (column: string, value: any) => Promise; neq: (column: string, value: any) => Promise; gt: (column: string, value: any) => Promise; gte: (column: string, value: any) => Promise; lt: (column: string, value: any) => Promise; lte: (column: string, value: any) => Promise; }; delete: () => { eq: (column: string, value: any) => Promise; neq: (column: string, value: any) => Promise; gt: (column: string, value: any) => Promise; gte: (column: string, value: any) => Promise; lt: (column: string, value: any) => Promise; lte: (column: string, value: any) => Promise; }; }; }; /** * Execute query */ private query; /** * Insert data */ private insert; /** * Update data */ private update; /** * Delete data */ private delete; storage: { /** * Upload file */ upload: (path: string, file: File | Blob) => Promise; /** * List files */ list: (path?: string) => Promise; /** * Get file URL */ getUrl: (path: string) => Promise; /** * Delete file */ delete: (path: string) => Promise; /** * Create folder */ createFolder: (path: string) => Promise; }; rpc: { /** * Call remote procedure */ call: (functionName: string, params?: Record) => Promise; }; } /** * Create BaseFlow client for local development */ export declare function createLocalClient(url?: string): BaseFlowClient; /** * Create BaseFlow client for cloud projects */ export declare function createCloudClient(config: { url: string; apiKey?: string; serviceRoleKey?: string; }): BaseFlowClient; /** * Auto-detect client type based on deployment info */ export declare function createClient(): Promise; export default BaseFlowClient;