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.

25 lines (24 loc) 959 B
import { Databases } from "node-appwrite"; import type { AppwriteConfig } from "appwrite-utils"; /** * Finds collections that have defined relationship attributes. */ export declare const findCollectionsWithRelationships: (config: AppwriteConfig) => Map<string, { type: "relationship"; key: string; relatedCollection: string; relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany"; twoWay: boolean; twoWayKey: string; onDelete: "setNull" | "cascade" | "restrict"; side: "parent" | "child"; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; importMapping?: { originalIdField: string; targetField?: string | undefined; } | undefined; }[]>; export declare function resolveAndUpdateRelationships(dbId: string, database: Databases, config: AppwriteConfig): Promise<void>;