import { Databases, Storage, type Models } from "node-appwrite"; import { type AppwriteConfig } from "appwrite-utils"; export declare const getStorage: (config: AppwriteConfig) => Storage; export declare const listBuckets: (storage: Storage, queries?: string[], search?: string) => Promise; export declare const getBucket: (storage: Storage, bucketId: string) => Promise; export declare const createBucket: (storage: Storage, bucket: Omit, bucketId?: string) => Promise; export declare const updateBucket: (storage: Storage, bucket: Models.Bucket, bucketId: string) => Promise; export declare const deleteBucket: (storage: Storage, bucketId: string) => Promise<{}>; export declare const getFile: (storage: Storage, bucketId: string, fileId: string) => Promise; export declare const listFiles: (storage: Storage, bucketId: string, queries?: string[], search?: string) => Promise; export declare const deleteFile: (storage: Storage, bucketId: string, fileId: string) => Promise<{}>; /** * Convert permission objects ({permission, target}) to Appwrite Permission strings. */ export declare const buildPermissionStrings: (permissions: Array<{ permission: string; target: string; }> | undefined) => string[]; export declare const ensureDatabaseConfigBucketsExist: (storage: Storage, config: AppwriteConfig, databases?: Models.Database[]) => Promise; /** * Ensure global/root-level buckets from config.buckets[] exist on remote. * Optionally filter to only push selected bucket IDs. */ export declare const ensureGlobalBucketsExist: (storage: Storage, config: AppwriteConfig, selectedBucketIds?: string[]) => Promise; export declare const wipeDocumentStorage: (storage: Storage, bucketId: string, options?: { skipConfirmation?: boolean; }) => Promise; export declare const initOrGetDocumentStorage: (storage: Storage, config: AppwriteConfig, dbId: string, bucketName?: string) => Promise; /** * Initializes or gets the centralized backup bucket * All backups are stored in a single "appwrite-backups" bucket */ export declare const initBackupBucket: (storage: Storage) => Promise; export interface DatabaseBackupResult { backupFileId: string; backupFileName: string; backupSizeBytes: number; databaseId: string; databaseName: string; collectionCount: number; documentCount: number; format: 'json' | 'zip'; } export declare const backupDatabase: (config: AppwriteConfig, database: Databases, databaseId: string, storage: Storage, format?: "json" | "zip") => Promise;