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) 1.21 kB
import { type Index, type CollectionCreate } from "appwrite-utils"; import { Databases, type Models } from "node-appwrite"; export declare const indexesSame: (databaseIndex: Models.Index, configIndex: Index) => boolean; export declare const createOrUpdateIndex: (dbId: string, db: Databases, collectionId: string, index: Index, options?: { verbose?: boolean; forceRecreate?: boolean; }) => Promise<Models.Index | null>; export declare const createOrUpdateIndexes: (dbId: string, db: Databases, collectionId: string, indexes: Index[], options?: { verbose?: boolean; forceRecreate?: boolean; }) => Promise<void>; export declare const createUpdateCollectionIndexes: (db: Databases, dbId: string, collection: Models.Collection, collectionConfig: CollectionCreate, options?: { verbose?: boolean; forceRecreate?: boolean; }) => Promise<void>; export declare const deleteObsoleteIndexes: (db: Databases, dbId: string, collection: Models.Collection, collectionConfig: CollectionCreate, options?: { verbose?: boolean; }) => Promise<void>; export declare const validateIndexConfiguration: (indexes: Index[], options?: { verbose?: boolean; }) => { valid: boolean; errors: string[]; };