import type { Models } from "@appwrite.io/console"; import type { BucketType, CollectionType, FunctionType, ConfigType, SettingsType, SiteType, TableType, TeamType, TopicType, WebhookType } from "./commands/config.js"; import type { SessionData, ConfigData, Entity, GlobalConfigData } from "./types.js"; import { CONFIG_RESOURCE_KEYS } from "./constants.js"; type ConfigResourceKey = (typeof CONFIG_RESOURCE_KEYS)[number]; declare const KeysSite: Set; declare const KeysFunction: Set; declare const KeysCollection: Set; declare const KeysTable: Set; declare const KeysStorage: Set; declare const KeysTopics: Set; declare const KeysTeams: Set; declare const KeysWebhooks: Set; declare const KeysAttributes: Set; export declare function normalizeCloudConsoleEndpoint(endpoint: string): string; export declare function readLocalConfigFile(filePath: string): ConfigType; export declare function getLocalConfigResourceDirname(filePath: string, resource: "functions" | "sites"): string; export declare function getLocalConfigResourceDirnames(filePath: string): Record<"functions" | "sites", string>; export declare function resolveLocalConfigResourcePaths(config: ConfigType, filePath: string): ConfigType; export declare function writeLocalConfigFile(config: ConfigType, filePath: string): void; declare function whitelistKeys(value: T, keys: Set, nestedKeys?: Record>): T; declare class Config { path: string; protected data: T; constructor(path: string, autoRead?: boolean); read(): void; write(): void; get(key: K): T[K]; set(key: K, value: T[K]): void; delete(key: string): void; clear(): void; has(key: string): boolean; keys(): string[]; values(): unknown[]; toString(): string; protected _getDBEntities(entityType: string): Entity[]; protected _getDBEntity(entityType: string, $id: string): Entity | Record; protected _addDBEntity(entityType: string, props: Entity, keysSet: Set, nestedKeys?: Record>): void; } declare class Local extends Config { static CONFIG_FILE_PATH: string; static CONFIG_FILE_PATH_LEGACY: string; private rootData; private includePaths; private includePathHints; configDirectoryPath: string; constructor(path?: string, legacyPath?: string); useCwdConfig(path?: string, legacyPath?: string): void; read(): void; write(): void; clear(): void; static findConfigFile(filename: string): string | null; static findConfigFileInCwd(filename: string): string | null; getDirname(): string; getResourceDirname(resource: ConfigResourceKey): string; resolveResourcePath(resource: ConfigResourceKey, resourcePath: string): string; getEndpoint(): string; setEndpoint(endpoint: string): void; getSites(): SiteType[]; getSite($id: string): SiteType | Record; addSite(props: SiteType): void; getFunctions(): FunctionType[]; getFunction($id: string): FunctionType | Record; addFunction(props: FunctionType): void; getCollections(): CollectionType[]; getCollection($id: string): CollectionType | Record; addCollection(props: CollectionType): void; getTables(): TableType[]; getTable($id: string): TableType | Record; addTable(props: TableType): void; getBuckets(): BucketType[]; getBucket($id: string): BucketType | Record; addBucket(props: BucketType): void; getMessagingTopics(): TopicType[]; getMessagingTopic($id: string): TopicType | Record; addMessagingTopic(props: TopicType): void; getTablesDBs(): any[]; getTablesDB($id: string): any; addTablesDB(props: any): void; getDatabases(): any[]; getDatabase($id: string): any; addDatabase(props: any): void; getTeams(): TeamType[]; getTeam($id: string): TeamType | Record; addTeam(props: TeamType): void; getWebhooks(): WebhookType[]; getWebhook($id: string): WebhookType | Record; addWebhook(props: WebhookType): void; getProject(): { projectId?: string; projectName?: string; projectSettings?: SettingsType; }; setProject(projectId: string, projectName?: string, project?: Models.Project): void; } declare class Global extends Config { static CONFIG_FILE_PATH: string; static PREFERENCE_CURRENT: "current"; static PREFERENCE_ENDPOINT: "endpoint"; static PREFERENCE_EMAIL: "email"; static PREFERENCE_SELF_SIGNED: "selfSigned"; static PREFERENCE_COOKIE: "cookie"; static PREFERENCE_PROJECT: "project"; static PREFERENCE_KEY: "key"; static PREFERENCE_LOCALE: "locale"; static PREFERENCE_MODE: "mode"; static IGNORE_ATTRIBUTES: readonly string[]; static MODE_ADMIN: string; static MODE_DEFAULT: string; static PROJECT_CONSOLE: string; constructor(path?: string); getCurrentSession(): string; setCurrentSession(session: string): void; getSessionIds(): string[]; getSessions(): Array<{ id: string; endpoint: string; email: string; }>; addSession(session: string, data: SessionData): void; removeSession(session: string): void; getEmail(): string; setEmail(email: string): void; getEndpoint(): string; setEndpoint(endpoint: string): void; getSelfSigned(): boolean; setSelfSigned(selfSigned: boolean): void; getCookie(): string; setCookie(cookie: string): void; getProject(): string; setProject(project: string): void; getKey(): string; setKey(key: string): void; hasFrom(key: string): boolean; getFrom(key: string): any; setTo(key: string, value: any): void; } export declare const localConfig: Local; export declare const globalConfig: Global; export { KeysAttributes, KeysSite, KeysFunction, KeysTopics, KeysStorage, KeysTeams, KeysWebhooks, KeysCollection, KeysTable, whitelistKeys, }; //# sourceMappingURL=config.d.ts.map