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.

533 lines (532 loc) 28.8 kB
import { z } from "zod"; import { type AppwriteConfig, type AppwriteFunction } from "appwrite-utils"; declare const YamlConfigSchema: z.ZodObject<{ appwrite: z.ZodObject<{ endpoint: z.ZodDefault<z.ZodString>; project: z.ZodString; key: z.ZodString; }, "strip", z.ZodTypeAny, { endpoint: string; project: string; key: string; }, { project: string; key: string; endpoint?: string | undefined; }>; logging: z.ZodDefault<z.ZodOptional<z.ZodObject<{ enabled: z.ZodDefault<z.ZodBoolean>; level: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "debug"]>>; directory: z.ZodOptional<z.ZodString>; console: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { enabled: boolean; level: "error" | "warn" | "info" | "debug"; console: boolean; directory?: string | undefined; }, { enabled?: boolean | undefined; level?: "error" | "warn" | "info" | "debug" | undefined; directory?: string | undefined; console?: boolean | undefined; }>>>; backups: z.ZodDefault<z.ZodOptional<z.ZodObject<{ enabled: z.ZodDefault<z.ZodBoolean>; interval: z.ZodDefault<z.ZodNumber>; retention: z.ZodDefault<z.ZodNumber>; cleanup: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { enabled: boolean; interval: number; retention: number; cleanup: boolean; }, { enabled?: boolean | undefined; interval?: number | undefined; retention?: number | undefined; cleanup?: boolean | undefined; }>>>; data: z.ZodDefault<z.ZodOptional<z.ZodObject<{ enableMockData: z.ZodDefault<z.ZodBoolean>; documentBucketId: z.ZodDefault<z.ZodString>; usersCollectionName: z.ZodDefault<z.ZodString>; importDirectory: z.ZodDefault<z.ZodString>; }, "strip", z.ZodTypeAny, { enableMockData: boolean; documentBucketId: string; usersCollectionName: string; importDirectory: string; }, { enableMockData?: boolean | undefined; documentBucketId?: string | undefined; usersCollectionName?: string | undefined; importDirectory?: string | undefined; }>>>; schemas: z.ZodDefault<z.ZodOptional<z.ZodObject<{ outputDirectory: z.ZodDefault<z.ZodString>; yamlSchemaDirectory: z.ZodDefault<z.ZodString>; }, "strip", z.ZodTypeAny, { outputDirectory: string; yamlSchemaDirectory: string; }, { outputDirectory?: string | undefined; yamlSchemaDirectory?: string | undefined; }>>>; migrations: z.ZodDefault<z.ZodOptional<z.ZodObject<{ enabled: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { enabled: boolean; }, { enabled?: boolean | undefined; }>>>; databases: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; bucket: z.ZodOptional<z.ZodObject<{ id: z.ZodString; name: z.ZodString; permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{ permission: z.ZodString; target: z.ZodString; }, "strip", z.ZodTypeAny, { permission: string; target: string; }, { permission: string; target: string; }>, z.ZodEffects<z.ZodString, { permission: string; target: string; }, string>]>, "many">>; fileSecurity: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; maximumFileSize: z.ZodOptional<z.ZodNumber>; allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; compression: z.ZodOptional<z.ZodEnum<["none", "gzip", "zstd"]>>; encryption: z.ZodOptional<z.ZodBoolean>; antivirus: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }, { name: string; id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }>>; }, "strip", z.ZodTypeAny, { name: string; id: string; bucket?: { name: string; id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }, { name: string; id: string; bucket?: { name: string; id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }>, "many">>>; buckets: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{ permission: z.ZodString; target: z.ZodString; }, "strip", z.ZodTypeAny, { permission: string; target: string; }, { permission: string; target: string; }>, z.ZodEffects<z.ZodString, { permission: string; target: string; }, string>]>, "many">>; fileSecurity: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; maximumFileSize: z.ZodOptional<z.ZodNumber>; allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; compression: z.ZodOptional<z.ZodEnum<["none", "gzip", "zstd"]>>; encryption: z.ZodOptional<z.ZodBoolean>; antivirus: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }, { name: string; id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }>, "many">>>; functions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; runtime: z.ZodEnum<["node-14.5", "node-16.0", "node-18.0", "node-19.0", "node-20.0", "node-21.0", "node-22", "bun-1.0", "bun-1.1", "deno-1.21", "deno-1.24", "deno-1.35", "deno-1.40", "deno-1.46", "deno-2.0", "go-1.23", "python-3.8", "python-3.9", "python-3.10", "python-3.11", "python-3.12", "python-ml-3.11", "dart-2.15", "dart-2.16", "dart-2.17", "dart-2.18", "dart-3.0", "dart-3.1", "dart-3.3", "dart-3.5", "php-8.0", "php-8.1", "php-8.2", "php-8.3", "ruby-3.0", "ruby-3.1", "ruby-3.2", "ruby-3.3", "dotnet-6.0", "dotnet-7.0", "dotnet-8.0", "java-8.0", "java-11.0", "java-17.0", "java-18.0", "java-21.0", "java-22", "swift-5.5", "swift-5.8", "swift-5.9", "swift-5.10", "kotlin-1.6", "kotlin-1.8", "kotlin-1.9", "kotlin-2.0", "cpp-17", "cpp-20"]>; execute: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; schedule: z.ZodOptional<z.ZodString>; timeout: z.ZodOptional<z.ZodNumber>; enabled: z.ZodOptional<z.ZodBoolean>; logging: z.ZodOptional<z.ZodBoolean>; entrypoint: z.ZodOptional<z.ZodString>; commands: z.ZodOptional<z.ZodString>; scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["users.read", "users.write", "sessions.read", "sessions.write", "teams.read", "teams.write", "databases.read", "databases.write", "collections.read", "collections.write", "attributes.read", "attributes.write", "indexes.read", "indexes.write", "documents.read", "documents.write", "files.read", "files.write", "buckets.read", "buckets.write", "functions.read", "functions.write", "execution.read", "execution.write", "locale.read", "avatars.read", "health.read", "rules.read", "rules.write", "migrations.read", "migrations.write", "sites.read", "sites.write", "log.read", "log.write", "tokens.read", "tokens.write", "vcs.read", "vcs.write", "assistant.read", "messages.read", "messages.write", "targets.read", "targets.write", "providers.read", "providers.write", "topics.read", "topics.write", "subscribers.read", "subscribers.write"]>, "many">>; installationId: z.ZodOptional<z.ZodString>; providerRepositoryId: z.ZodOptional<z.ZodString>; providerBranch: z.ZodOptional<z.ZodString>; providerSilentMode: z.ZodOptional<z.ZodBoolean>; providerRootDirectory: z.ZodOptional<z.ZodString>; templateRepository: z.ZodOptional<z.ZodString>; templateOwner: z.ZodOptional<z.ZodString>; templateRootDirectory: z.ZodOptional<z.ZodString>; templateBranch: z.ZodOptional<z.ZodString>; specification: z.ZodOptional<z.ZodEnum<["s-0.5vcpu-512mb", "s-1vcpu-512mb", "s-1vcpu-1gb", "s-2vcpu-2gb", "s-2vcpu-4gb", "s-4vcpu-4gb", "s-4vcpu-8gb", "s-8vcpu-4gb", "s-8vcpu-8gb"]>>; dirPath: z.ZodOptional<z.ZodString>; predeployCommands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; deployDir: z.ZodOptional<z.ZodString>; ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; templateVersion: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "node-22" | "bun-1.0" | "bun-1.1" | "deno-1.21" | "deno-1.24" | "deno-1.35" | "deno-1.40" | "deno-1.46" | "deno-2.0" | "go-1.23" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dart-3.5" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "dotnet-6.0" | "dotnet-7.0" | "dotnet-8.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "java-22" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "swift-5.10" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "kotlin-2.0" | "cpp-17" | "cpp-20"; enabled?: boolean | undefined; logging?: boolean | undefined; execute?: string[] | undefined; events?: string[] | undefined; schedule?: string | undefined; timeout?: number | undefined; entrypoint?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | undefined; templateRepository?: string | undefined; templateOwner?: string | undefined; templateRootDirectory?: string | undefined; templateBranch?: string | undefined; specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined; dirPath?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; ignore?: string[] | undefined; templateVersion?: string | undefined; }, { name: string; id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "node-22" | "bun-1.0" | "bun-1.1" | "deno-1.21" | "deno-1.24" | "deno-1.35" | "deno-1.40" | "deno-1.46" | "deno-2.0" | "go-1.23" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dart-3.5" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "dotnet-6.0" | "dotnet-7.0" | "dotnet-8.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "java-22" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "swift-5.10" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "kotlin-2.0" | "cpp-17" | "cpp-20"; enabled?: boolean | undefined; logging?: boolean | undefined; execute?: string[] | undefined; events?: string[] | undefined; schedule?: string | undefined; timeout?: number | undefined; entrypoint?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | undefined; templateRepository?: string | undefined; templateOwner?: string | undefined; templateRootDirectory?: string | undefined; templateBranch?: string | undefined; specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined; dirPath?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; ignore?: string[] | undefined; templateVersion?: string | undefined; }>, "many">>>; }, "strip", z.ZodTypeAny, { appwrite: { endpoint: string; project: string; key: string; }; logging: { enabled: boolean; level: "error" | "warn" | "info" | "debug"; console: boolean; directory?: string | undefined; }; backups: { enabled: boolean; interval: number; retention: number; cleanup: boolean; }; data: { enableMockData: boolean; documentBucketId: string; usersCollectionName: string; importDirectory: string; }; schemas: { outputDirectory: string; yamlSchemaDirectory: string; }; migrations: { enabled: boolean; }; databases: { name: string; id: string; bucket?: { name: string; id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }[]; buckets: { name: string; id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }[]; functions: { name: string; id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "node-22" | "bun-1.0" | "bun-1.1" | "deno-1.21" | "deno-1.24" | "deno-1.35" | "deno-1.40" | "deno-1.46" | "deno-2.0" | "go-1.23" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dart-3.5" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "dotnet-6.0" | "dotnet-7.0" | "dotnet-8.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "java-22" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "swift-5.10" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "kotlin-2.0" | "cpp-17" | "cpp-20"; enabled?: boolean | undefined; logging?: boolean | undefined; execute?: string[] | undefined; events?: string[] | undefined; schedule?: string | undefined; timeout?: number | undefined; entrypoint?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | undefined; templateRepository?: string | undefined; templateOwner?: string | undefined; templateRootDirectory?: string | undefined; templateBranch?: string | undefined; specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined; dirPath?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; ignore?: string[] | undefined; templateVersion?: string | undefined; }[]; }, { appwrite: { project: string; key: string; endpoint?: string | undefined; }; logging?: { enabled?: boolean | undefined; level?: "error" | "warn" | "info" | "debug" | undefined; directory?: string | undefined; console?: boolean | undefined; } | undefined; backups?: { enabled?: boolean | undefined; interval?: number | undefined; retention?: number | undefined; cleanup?: boolean | undefined; } | undefined; data?: { enableMockData?: boolean | undefined; documentBucketId?: string | undefined; usersCollectionName?: string | undefined; importDirectory?: string | undefined; } | undefined; schemas?: { outputDirectory?: string | undefined; yamlSchemaDirectory?: string | undefined; } | undefined; migrations?: { enabled?: boolean | undefined; } | undefined; databases?: { name: string; id: string; bucket?: { name: string; id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }[] | undefined; buckets?: { name: string; id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }[] | undefined; functions?: { name: string; id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "node-22" | "bun-1.0" | "bun-1.1" | "deno-1.21" | "deno-1.24" | "deno-1.35" | "deno-1.40" | "deno-1.46" | "deno-2.0" | "go-1.23" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dart-3.5" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "dotnet-6.0" | "dotnet-7.0" | "dotnet-8.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "java-22" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "swift-5.10" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "kotlin-2.0" | "cpp-17" | "cpp-20"; enabled?: boolean | undefined; logging?: boolean | undefined; execute?: string[] | undefined; events?: string[] | undefined; schedule?: string | undefined; timeout?: number | undefined; entrypoint?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | undefined; templateRepository?: string | undefined; templateOwner?: string | undefined; templateRootDirectory?: string | undefined; templateBranch?: string | undefined; specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined; dirPath?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; ignore?: string[] | undefined; templateVersion?: string | undefined; }[] | undefined; }>; export type YamlConfig = z.infer<typeof YamlConfigSchema>; export declare const convertYamlToAppwriteConfig: (yamlConfig: YamlConfig) => AppwriteConfig; export declare const loadYamlConfig: (configPath: string) => Promise<AppwriteConfig | null>; export declare const findYamlConfig: (startDir: string) => string | null; export declare const generateYamlConfigTemplate: (outputPath: string) => void; /** * Converts AppwriteConfig back to YAML format and writes to file * @param configPath Path to the YAML config file * @param config The AppwriteConfig to convert and save */ export declare const writeYamlConfig: (configPath: string, config: AppwriteConfig) => Promise<void>; /** * Adds a new function to the YAML config file * @param configPath Path to the YAML config file * @param newFunction The function configuration to add */ export declare const addFunctionToYamlConfig: (configPath: string, newFunction: AppwriteFunction) => Promise<void>; export {};