import { type DataSourceInstanceSettings, type DataSourceRef, type ScopedVars } from '@grafana/data'; import { type GetDataSourceListFilters } from '../dataSourceSrv'; /** * Populate the instance-settings cache from boot data. Intended to be called * exactly once at application startup via the `@grafana/runtime/internal` export. * * @internal */ export declare function initDataSourceInstanceSettings(settings: Record, defaultDsName: string): void; export declare function reloadDataSourceInstanceSettings(): Promise; interface SyncDataSourceSettings { datasources: Record; defaultDatasource: string; } /** * Sync the instance-settings cache from an already-fetched `/api/frontend/settings` * payload, without issuing another backend request. Built-in (e.g. expression) and * runtime data sources survive because `populateMaps` re-applies them. * * Transition-period helper: while both the legacy `DataSourceSrv` and the new async * datasource APIs exist, `DataSourceSrv.reload()` calls this so a single fetch updates * both caches. Remove once `DataSourceSrv` is gone. * * @internal */ export declare function syncDataSourceInstanceSettings(settings: SyncDataSourceSettings): void; /** * Look up the instance settings for a data source from the in-memory cache * populated at boot. Call {@link reloadDataSourceInstanceSettings} to refresh * the cache from the backend. * * `scopedVars` are used when `ref` contains a template variable (e.g. `$ds`). * * @public */ export declare function getDataSourceInstanceSettings(ref?: DataSourceRef | string | null, scopedVars?: ScopedVars): Promise; /** * Search and filter data source instance settings from the in-memory cache. * * @internal */ export declare function getDataSourceInstanceSettingsList(filters?: GetDataSourceListFilters): Promise; /** * Register the instance settings for a runtime data source so it is returned * by future lookups. Throws if the uid is already in use. * * @internal */ export declare function upsertRuntimeDataSourceInstanceSettings(settings: DataSourceInstanceSettings): void; /** * Test helper — resets all module state. Should only be called from tests. * * @internal */ export declare function _resetForTests(): void; export {};