appwrite-utils-cli
Version:
Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.
19 lines (18 loc) • 1.82 kB
TypeScript
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<Models.BucketList>;
export declare const getBucket: (storage: Storage, bucketId: string) => Promise<Models.Bucket>;
export declare const createBucket: (storage: Storage, bucket: Omit<Models.Bucket, "$id" | "$createdAt" | "$updatedAt">, bucketId?: string) => Promise<Models.Bucket>;
export declare const updateBucket: (storage: Storage, bucket: Models.Bucket, bucketId: string) => Promise<Models.Bucket>;
export declare const deleteBucket: (storage: Storage, bucketId: string) => Promise<{}>;
export declare const getFile: (storage: Storage, bucketId: string, fileId: string) => Promise<Models.File>;
export declare const listFiles: (storage: Storage, bucketId: string, queries?: string[], search?: string) => Promise<Models.FileList>;
export declare const deleteFile: (storage: Storage, bucketId: string, fileId: string) => Promise<{}>;
export declare const ensureDatabaseConfigBucketsExist: (storage: Storage, config: AppwriteConfig, databases?: Models.Database[]) => Promise<void>;
export declare const wipeDocumentStorage: (storage: Storage, bucketId: string, options?: {
skipConfirmation?: boolean;
}) => Promise<void>;
export declare const initOrGetDocumentStorage: (storage: Storage, config: AppwriteConfig, dbId: string, bucketName?: string) => Promise<Models.Bucket>;
export declare const initOrGetBackupStorage: (config: AppwriteConfig, storage: Storage) => Promise<Models.Bucket>;
export declare const backupDatabase: (config: AppwriteConfig, database: Databases, databaseId: string, storage: Storage) => Promise<void>;