UNPKG

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.

33 lines (32 loc) 1.09 kB
import { z } from "zod"; export const DatabaseBackupReferenceSchema = z.object({ databaseId: z.string(), databaseName: z.string(), backupFileId: z.string(), manifestFileId: z.string(), collectionCount: z.number(), documentCount: z.number(), sizeBytes: z.number(), status: z.enum(['completed', 'partial', 'failed']), error: z.string().optional() }); export const BucketBackupReferenceSchema = z.object({ bucketId: z.string(), bucketName: z.string(), backupFileId: z.string(), manifestFileId: z.string(), fileCount: z.number(), sizeBytes: z.number(), status: z.enum(['completed', 'partial', 'failed']), error: z.string().optional() }); export const ComprehensiveManifestSchema = z.object({ version: z.string().default("1.0"), backupId: z.string(), createdAt: z.string(), databases: z.array(DatabaseBackupReferenceSchema), buckets: z.array(BucketBackupReferenceSchema), totalSizeBytes: z.number(), status: z.enum(['completed', 'partial', 'failed']), errors: z.array(z.string()).optional() });