/** * @fractary/core - Google Drive Storage Implementation * * Google Drive storage backend for file operations. * Uses googleapis with lazy loading. * * Note: Google Drive doesn't use traditional file paths. This implementation * maps path-like identifiers to Google Drive files by name within a folder. */ import { Storage, GDriveStorageConfig } from './types'; /** * Google Drive storage implementation */ export declare class GDriveStorage implements Storage { private config; private driveClient; constructor(config: GDriveStorageConfig); /** * Get or create the Google Drive client (lazy loaded) */ private getClient; /** * Get the parent folder ID (internal helper) */ private getParentFolderId; /** * Extract file name from path-like ID */ private getFileName; /** * Escape a string for use in Google Drive query syntax * Single quotes must be escaped with backslash */ private escapeQueryString; /** * Check if a string looks like a Google Drive file ID * Drive file IDs are typically 28-44 characters, alphanumeric with - and _ */ private isFileId; /** * Check if an error is a "not found" error * Google APIs uses error.code (number) or error.errors[].reason */ private isNotFoundError; /** * Find a file by name in the configured folder */ private findFile; /** * Write content to Google Drive */ write(id: string, content: string | Buffer): Promise; /** * Read content from Google Drive */ read(id: string): Promise; /** * Check if file exists in Google Drive */ exists(id: string): Promise; /** * List files in the configured Google Drive folder */ list(prefix?: string): Promise; /** * Delete file from Google Drive */ delete(id: string): Promise; /** * Get a shareable URL for the file */ getUrl(id: string, _expiresIn?: number): Promise; /** * Get the configured folder ID */ getFolderId(): string; } //# sourceMappingURL=gdrive.d.ts.map