import { type DataSourceApi, type DataSourceInstanceSettings, type DataSourceRef } from '@grafana/data'; import { type GetDataSourceListFilters } from '../dataSourceSrv'; /** * @public */ export interface UseDataSourceInstanceSettingsResult { isLoading: boolean; error?: Error; settings?: DataSourceInstanceSettings; } /** * @public */ export interface UseDataSourceInstanceSettingsListResult { isLoading: boolean; error?: Error; items: DataSourceInstanceSettings[]; } /** * @public */ export interface UseDataSourceInstanceResult { isLoading: boolean; error?: Error; dataSource?: DataSourceApi; } /** * React hook wrapping {@link getDataSourceInstanceSettings}. Re-fetches when `ref` * changes (compared by value, so inline objects are safe). * * Template variable strings (e.g. `$ds` or `${ds}`) are not supported — interpolate * them before passing the resolved uid or name to this hook. * * @public */ export declare function useDataSourceInstanceSettings(ref?: DataSourceRef | string | null): UseDataSourceInstanceSettingsResult; /** * React hook wrapping {@link getDataSourceInstanceSettingsList}. Re-fetches when * `filters` changes (compared by value, so inline objects are safe). * When `filters.filter` (a callback) is set, the hook re-fetches when the * function reference changes. Wrap inline filter callbacks in `useCallback` * to avoid unnecessary re-fetches. * * @internal */ export declare function useDataSourceInstanceSettingsList(filters?: GetDataSourceListFilters): UseDataSourceInstanceSettingsListResult; /** * React hook wrapping {@link getDataSourceInstance}. Re-fetches when `ref` * changes (compared by value, so inline objects are safe). * * Template variable strings (e.g. `$ds` or `${ds}`) are not supported — interpolate * them before passing the resolved uid or name to this hook. * * @public */ export declare function useDataSourceInstance(ref?: DataSourceRef | string | null): UseDataSourceInstanceResult;