@devtable/dashboard 10.37.2 → 10.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,31 @@
1
- import { AxiosRequestConfig, Method } from 'axios';
2
1
  import { DataSourceType } from '~/model';
3
2
  import { AnyObject, IDashboardConfig } from '..';
3
+ import { DefaultApiClient, IAPIClient } from '../shared';
4
+ import { Method } from 'axios';
5
+ export { FacadeApiClient, DefaultApiClient } from '../shared';
6
+ export type { IAPIClient, IAPIClientRequestOptions } from '../shared';
4
7
  export declare type TQueryPayload = {
5
8
  type: DataSourceType;
6
9
  key: string;
7
10
  query: string;
8
11
  env?: AnyObject;
9
12
  };
10
- export interface IAPIClientRequestOptions {
11
- string?: boolean;
12
- params?: AnyObject;
13
- headers?: AnyObject;
14
- }
15
- export interface IAPIClient {
16
- getRequest: <T = $TSFixMe>(method: Method, signal?: AbortSignal) => (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<T>;
13
+ export interface IDashboardAPIClient extends IAPIClient {
17
14
  query: <T = $TSFixMe>(signal?: AbortSignal) => (data: TQueryPayload, options?: AnyObject) => Promise<T>;
18
15
  }
19
- export declare class DefaultApiClient implements IAPIClient {
20
- baseURL: string;
21
- app_id: string;
22
- app_secret: string;
23
- makeQueryENV: (() => AnyObject) | null;
24
- constructor();
25
- getAuthentication(params: Record<string, unknown>): {
26
- app_id: string;
27
- nonce_str: string;
28
- sign: string;
29
- } | undefined;
30
- getRequest(method: Method, signal?: AbortSignal): (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<any>;
31
- buildAxiosConfig(method: Method, url: string, data: AnyObject, options: IAPIClientRequestOptions, headers: AnyObject, signal: AbortSignal | undefined): AxiosRequestConfig<any>;
32
- buildHeader(options: IAPIClientRequestOptions): AnyObject;
33
- query(signal?: AbortSignal): (data: TQueryPayload, options?: AnyObject) => Promise<any>;
16
+ export declare class DashboardApiClient extends DefaultApiClient implements IDashboardAPIClient {
17
+ makeQueryENV?: (() => AnyObject) | null;
18
+ query<T>(signal: AbortSignal | undefined): (data: TQueryPayload, options?: AnyObject) => Promise<T>;
34
19
  }
35
- export declare function configureAPIClient(config: IDashboardConfig): void;
36
- export declare class FacadeApiClient implements IAPIClient {
37
- implementation: IAPIClient;
38
- getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<T>;
39
- query<T>(signal?: AbortSignal): (data: TQueryPayload, options?: AnyObject) => Promise<T>;
20
+ export declare class DashboardApiFacadeClient implements IDashboardAPIClient {
21
+ implementation: IDashboardAPIClient;
22
+ constructor(implementation: IDashboardAPIClient);
23
+ query<T>(signal?: AbortSignal): (data: TQueryPayload, options?: AnyObject | undefined) => Promise<T>;
24
+ getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: import("../shared").AnyObject, options?: import("..").IAPIClientRequestOptions | undefined) => Promise<T>;
40
25
  }
26
+ export declare function configureAPIClient(config: IDashboardConfig): void;
41
27
  /**
42
28
  * @example facadeApiClient.implementation = new MyAPIClient();
43
29
  */
44
- export declare const facadeApiClient: FacadeApiClient;
45
- export declare const APIClient: IAPIClient;
30
+ export declare const facadeApiClient: DashboardApiFacadeClient;
31
+ export declare const APIClient: IDashboardAPIClient;
@@ -1,11 +1,12 @@
1
1
  import { ITemplateVariable } from '~/utils/template';
2
- import { ICartesianReferenceLine } from '../../type';
3
- export declare function getReferenceLines(reference_lines: ICartesianReferenceLine[], variables: ITemplateVariable[], variableValueMap: Record<string, string | number>, data: TPanelData, xAxisData: string[]): {
2
+ import { ICartesianChartConf, ICartesianReferenceLine } from '../../type';
3
+ export declare function getReferenceLines(reference_lines: ICartesianReferenceLine[], variables: ITemplateVariable[], variableValueMap: Record<string, string | number>, data: TPanelData, xAxisData: string[], xAxisType: ICartesianChartConf['x_axis']['type']): {
4
4
  name: string;
5
5
  type: string;
6
6
  hide_in_legend: boolean;
7
+ xAxisId: string;
7
8
  yAxisIndex: number;
8
- data: (string | number)[];
9
+ data: (string | number)[] | (string | number)[][];
9
10
  symbol: string;
10
11
  silent: boolean;
11
12
  tooltip: {