UNPKG

abc-charts

Version:

Widget render for using in 'ABC consulting' projects

37 lines (36 loc) 1.45 kB
import 'whatwg-fetch'; import { IChartData, WidgetTemplate, DataSourceInfo } from "../interfaces"; import { IDataProvider } from "./IDataProvider"; export declare class DataProvider implements IDataProvider { private readonly apiUrl; private cache; private get gqlLink(); private get templatesLink(); private get authHeaders(); constructor(apiUrl: string); getTemplate(templateId: string): Promise<WidgetTemplate>; parseTemplate(template: WidgetTemplate, hasEntity?: boolean): Promise<IChartData | null>; /** * Возвращает список запросов для graphQL по каждому dataSet * Также используется для экспорта данных */ templateToRequests(template: WidgetTemplate, hasEntity?: boolean): Promise<{ request: string; resultProp: string; }[]>; getDataSourceInfo(dataSourceName: string): Promise<DataSourceInfo>; getDataSources(): Promise<DataSourceInfo[]>; private handleError; /** * @return null - если не распознан тип dataSource или name === '' */ private serializeDataSource; private serializeDynamicGQL; private serializeTableGQL; private serializeReportGQL; private serializeStaticGQL; private serializeProfileGQL; private serializeDistributionGQL; private getPeriod; private makeGqlRequest; }