import type { PluginInstallation, PluginRecord, PluginUserSetting } from '../../types/plugins'; import type { ApiAdapter } from '../ports/apiAdapter'; export declare const PLUGIN_INSTALLATIONS_KEY: readonly ["pluginInstallations"]; /** * Enablement state for the plugins page. Both lists are bounded by the plugin count, so they are * fetched whole and revalidated; writes are plain async functions, not one `useSWRMutation` per plugin. */ export declare function createPluginHooks(adapter: ApiAdapter): { usePluginInstallations: () => { installations: PluginInstallation[]; isLoading: boolean; isError: any; }; usePluginUserSettings: () => { userSettings: PluginUserSetting[]; isLoading: boolean; isError: any; }; usePluginRecords: (pluginId: string, collection: string) => { records: PluginRecord[]; isLoading: boolean; isError: any; /** Create or replace one document. `key` is the plugin's own identifier. */ put: (recordKey: string, value: unknown) => Promise; remove: (recordKey: string) => Promise; }; pluginActions: { setInstallation(pluginId: string, patch: Partial): Promise; removeInstallation(pluginId: string): Promise; setUserSetting(pluginId: string, patch: Partial): Promise; }; }; //# sourceMappingURL=createPluginHooks.d.ts.map