export type LabelOperator = '=' | '!=' | '=~' | '!~'; export type Label = { name: string; value: string; op: LabelOperator; }; export interface Metric { name: string; help: string; type: string; } export interface PromMetricsMetadataItem { type: string; help: string; unit?: string; } export interface PromMetricsMetadata { [metric: string]: PromMetricsMetadataItem; } type FetchFn = (input: RequestInfo, init?: RequestInit) => Promise; export interface DataProviderParams { url?: string; lookbackInterval?: number; variablesNames?: string[]; durationVariablesCompletion?: boolean; request: FetchFn; httpMethod?: 'POST' | 'GET'; apiPrefix?: string; httpErrorHandler?: (error: any) => void; // When false, DataProvider will not send any network requests. enableRequests?: boolean; }