import { Pools } from "./pools.js"; import type { Client } from "@appwrite.io/console"; export interface AttributeChange { key: string; attribute: any; reason: string; action: string; } export interface Collection { $id: string; databaseId: string; name: string; attributes?: any[]; indexes?: any[]; columns?: any[]; [key: string]: any; } export declare class Attributes { private pools; private skipConfirmation; private client?; constructor(pools?: Pools, skipConfirmation?: boolean, client?: Client); private getConfirmation; private isEmpty; private isEqual; private compareAttribute; /** * Check if attribute non-changeable fields has been changed * If so return the differences as an object. */ private checkAttributeChanges; /** * Check if attributes contain the given attribute */ private attributesContains; private generateChangesObject; createAttribute: (databaseId: string, collectionId: string, attribute: any) => Promise; updateAttribute: (databaseId: string, collectionId: string, attribute: any) => Promise; deleteAttribute: (collection: Collection, attribute: any, isIndex?: boolean) => Promise; /** * Check if attribute is a child-side relationship * Child-side relationships are auto-generated by Appwrite and should be skipped */ private isChildSideRelationship; /** * Filter deleted and recreated attributes, * return list of attributes to create and whether any changes were made */ attributesToCreate: (remoteAttributes: any[], localAttributes: any[], collection: Collection, isIndex?: boolean) => Promise<{ attributes: any[]; hasChanges: boolean; }>; createIndexes: (indexes: any[], collection: Collection) => Promise; createAttributes: (attributes: any[], collection: Collection) => Promise; createColumns: (columns: any[], table: Collection) => Promise; } //# sourceMappingURL=attributes.d.ts.map