import { Client } from "@appwrite.io/console"; import type { ConfigType } from "./config.js"; import { PullOptions } from "./pull.js"; import { PushOptions } from "./push.js"; import { TypeScriptDatabasesGenerator } from "./generators/typescript/databases.js"; export declare class Schema { private pullCommand; private pushCommand; private pullCommandSilent; private configPaths; db: TypeScriptDatabasesGenerator; constructor({ projectClient, consoleClient, }: { projectClient: Client; consoleClient: Client; }); /** * Validates the provided configuration object against the schema. * * @param config - The configuration object to validate. * @returns The validated and possibly transformed configuration object. * @throws If the configuration does not match the schema. */ validate(config: ConfigType): ConfigType; /** * Pulls the current schema and resources from the remote Appwrite project. * * @param config - The local configuration object. * @param options - Optional settings for the pull operation. * @returns A Promise that resolves to the updated configuration object reflecting the remote state. * @param configPath - Optional path to the config file. If provided, the config will be synced after pull. */ pull(config: ConfigType, options: PullOptions, configPath?: string): Promise; /** * Pushes the local configuration and schema to the remote Appwrite project. * Optionally syncs the config file by pulling the updated state from the server after push. * * @param config - The local configuration object to push. * @param options - Optional settings for the push operation. Use `force: true` to allow destructive changes. * @param configPath - Optional path to the config file. If provided, the config will be synced after push. * @returns A Promise that resolves when the push operation is complete. * @throws {DestructiveChangeError} When destructive changes are detected and force is not enabled. */ push(config: ConfigType, options: PushOptions, configPath?: string): Promise; /** * Reads the configuration object from a file. * * @param path - The path to the file to read. * @returns The configuration object. */ read(filePath: string): ConfigType; /** * Writes the configuration object to a file. * * @param config - The configuration object to write. * @param filePath - The path to the file to write. * @returns void */ write(config: ConfigType, filePath: string): void; private withResourceDirectories; } //# sourceMappingURL=schema.d.ts.map