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.
21 lines (20 loc) • 769 B
TypeScript
import type { AppwriteConfig, Attribute } from "appwrite-utils";
export declare class SchemaGenerator {
private relationshipMap;
private config;
private appwriteFolderPath;
constructor(config: AppwriteConfig, appwriteFolderPath: string);
updateYamlCollections(): void;
updateTsSchemas(): void;
updateConfig(config: AppwriteConfig, isYamlConfig?: boolean): Promise<void>;
private updateYamlConfig;
private updateTypeScriptConfig;
private extractRelationships;
private addRelationship;
generateSchemas(options?: {
format?: "zod" | "json" | "both";
verbose?: boolean;
}): void;
createSchemaString: (name: string, attributes: Attribute[]) => string;
typeToZod: (attribute: Attribute) => string;
}