import { DatasourceResource, DatasourceSelector, GlobalDatasourceResource } from './datasource'; /** * Parameters for building a datasource proxy URL */ export interface BuildDatasourceProxyUrlParams { project?: string; dashboard?: string; name: string; } /** * Function type for building datasource proxy URLs */ export type BuildDatasourceProxyUrlFunc = (params: BuildDatasourceProxyUrlParams) => string; /** * The external API contract for fetching datasource resources. * This defines the interface that must be implemented to provide * datasource functionality to the dashboard. */ export interface DatasourceApi { /** * Optional function to build proxy URLs for datasources */ buildProxyUrl?: BuildDatasourceProxyUrlFunc; /** * Get a datasource resource for a specific project */ getDatasource: (project: string, selector: DatasourceSelector) => Promise; /** * Get a global datasource resource */ getGlobalDatasource: (selector: DatasourceSelector) => Promise; /** * List all datasources for a project, optionally filtered by plugin kind */ listDatasources: (project: string, pluginKind?: string) => Promise; /** * List all global datasources, optionally filtered by plugin kind */ listGlobalDatasources: (pluginKind?: string) => Promise; } //# sourceMappingURL=datasource-api.d.ts.map