@devtable/dashboard 6.47.0 → 7.0.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.
@@ -22,6 +22,20 @@ interface IQueryBySQL {
22
22
  filterValues: FilterValuesType;
23
23
  }
24
24
  export declare function queryBySQL({ context, mock_context, sqlSnippets, title, query, filterValues }: IQueryBySQL, signal: AbortSignal): Promise<any>;
25
+ interface IQueryByHTTP {
26
+ context: ContextInfoType;
27
+ mock_context: Record<string, $TSFixMe>;
28
+ query: {
29
+ type: DataSourceType;
30
+ key: string;
31
+ name: string;
32
+ pre_process: string;
33
+ post_process: string;
34
+ };
35
+ filterValues: FilterValuesType;
36
+ datasource: IDataSource;
37
+ }
38
+ export declare function queryByHTTP({ context, mock_context, query, filterValues, datasource }: IQueryByHTTP, signal: AbortSignal): Promise<any>;
25
39
  export declare type TQuerySources = Record<string, string[]>;
26
40
  export declare function listDataSources(): Promise<IDataSource[]>;
27
41
  export {};
@@ -4,8 +4,18 @@ export declare type PaginationResponse<T> = {
4
4
  offset: number;
5
5
  data: T[];
6
6
  };
7
+ export declare type TDataSourceConfig_DB = Record<string, never>;
8
+ export declare type TDataSourceConfig_HTTP = {
9
+ host: string;
10
+ processing: {
11
+ pre: TFunctionString;
12
+ post: TFunctionString;
13
+ };
14
+ };
15
+ export declare type TDataSourceConfig = TDataSourceConfig_DB | TDataSourceConfig_HTTP;
7
16
  export interface IDataSource {
8
17
  id: string;
9
18
  type: DataSourceType;
10
19
  key: string;
20
+ config: TDataSourceConfig;
11
21
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IFunctionEditor {
3
+ value: TFunctionString;
4
+ onChange: (v: TFunctionString) => void;
5
+ }
6
+ export declare const FunctionEditor: ({ value, onChange }: IFunctionEditor) => JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface IInlineFunctionInput {
3
+ value: TFunctionString;
4
+ onChange: (v: TFunctionString) => void;
5
+ defaultValue: TFunctionString;
6
+ label: string;
7
+ }
8
+ export declare const InlineFunctionInput: import("react").ForwardRefExoticComponent<IInlineFunctionInput & import("react").RefAttributes<unknown>>;
9
+ export {};