import type { AgZoomEventSource } from './eventOptions'; import type { ContextDefault, DatumDefault } from './types'; export type AgDataSourceRequestSource = AgZoomEventSource | 'mini-chart'; export interface AgDataSourceOptions { /** Asynchronous callback to load data into the chart. */ getData: (params: AgDataSourceCallbackParams) => Promise; } export interface AgDataSourceCallbackParams { /** The start of the visible window on the x-axis. `undefined` on the initial load if no axis bounds have been established. */ windowStart?: Date | number | string; /** The end of the visible window on the x-axis. `undefined` on the initial load if no axis bounds have been established. */ windowEnd?: Date | number | string; /** Chart context object. */ context?: TContext; /** What triggered the request. */ source?: AgDataSourceRequestSource; }