import type { PluginInstallation, PluginRecord, PluginUserSetting } from '../../types/plugins'; import type { ApiAdapter } from '../ports/apiAdapter'; /** * Enablement state for the plugins page. * * Both lists are small — bounded by the number of plugins a deployment has — so * they are fetched whole and mutated by revalidation rather than by patching the * cache. The page applies its own optimistic override on top, so the switch does * not wait for the round trip. * * Writes are plain async functions, not `useSWRMutation`: every one of them is a * per-plugin upsert triggered from a switch, and the mutation-hook-per-key shape * the other domains use would mean one hook per plugin per control. */ 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