import { $Fetch } from 'ofetch'; import { IPublicMarketsData } from './settings.type'; export interface ISettingsServiceOptions { /** The CMS `$Fetch` instance (one of `sdk.apis`). */ api: $Fetch; /** Lazy flag — when true, the service returns fake data. */ mock: () => boolean; } export interface ISettingsService { getMonitoredGroups(): Promise; setMonitoredGroups(groups: string[]): Promise; /** * Anonymous UI defaults from `setting.public.markets` (api-inventory §5.7.5): * the default MT5 server id + the curated common-symbol list (order is * significant). Readable without a JWT — the backend returns the schema * defaults when no record has been written yet. */ getPublicMarkets(): Promise; } /** * Settings service. The CMS is the source of truth for monitored groups; * the service reads/writes the generic setting * `setting.dashboard.monitored_groups`. * * Endpoint contract (`eaera_cms/settings/routes.py`): * GET /api/v1/settings/{typeName} → { typeName, displayName, data, exists } * PUT /api/v1/settings/{typeName} → { ..., data } (body = key/value pairs) * * NOTE: the CT `setting.dashboard.monitored_groups` (schema `{ groups: string[] }`) * must be registered in the CMS settings catalog for these calls to succeed. * * While `mock()` returns true, all methods resolve against the local fake * dataset and never touch `api`. */ export declare function createSettingsService(opts: ISettingsServiceOptions): ISettingsService; //# sourceMappingURL=index.d.ts.map