@visactor/vbi 0.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.
- package/README.md +0 -0
- package/dist/builder/connector.d.ts +7 -0
- package/dist/builder/index.d.ts +3 -0
- package/dist/builder/sub-builders/chart-type/chart-type-builder.d.ts +39 -0
- package/dist/builder/sub-builders/chart-type/index.d.ts +1 -0
- package/dist/builder/sub-builders/dimensions/dim-builder.d.ts +48 -0
- package/dist/builder/sub-builders/dimensions/dim-node-builder.d.ts +22 -0
- package/dist/builder/sub-builders/dimensions/index.d.ts +2 -0
- package/dist/builder/sub-builders/havingFilters/having-builder.d.ts +55 -0
- package/dist/builder/sub-builders/havingFilters/having-node-builder.d.ts +27 -0
- package/dist/builder/sub-builders/havingFilters/index.d.ts +2 -0
- package/dist/builder/sub-builders/index.d.ts +5 -0
- package/dist/builder/sub-builders/measures/index.d.ts +2 -0
- package/dist/builder/sub-builders/measures/mea-builder.d.ts +52 -0
- package/dist/builder/sub-builders/measures/mea-node-builder.d.ts +32 -0
- package/dist/builder/sub-builders/whereFilters/index.d.ts +1 -0
- package/dist/builder/sub-builders/whereFilters/where-builder.d.ts +55 -0
- package/dist/builder/sub-builders/whereFilters/where-node-builder.d.ts +27 -0
- package/dist/builder/vbi-builder.d.ts +32 -0
- package/dist/builder/vbi.d.ts +16 -0
- package/dist/index.cjs +689 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +628 -0
- package/dist/pipeline/index.d.ts +1 -0
- package/dist/pipeline/vqueryDSL/buildVQuery.d.ts +4 -0
- package/dist/pipeline/vqueryDSL/index.d.ts +1 -0
- package/dist/types/builder/VBIInterface.d.ts +21 -0
- package/dist/types/builder/context.d.ts +4 -0
- package/dist/types/builder/index.d.ts +2 -0
- package/dist/types/builder/observe.d.ts +2 -0
- package/dist/types/connector/connector.d.ts +9 -0
- package/dist/types/connector/index.d.ts +3 -0
- package/dist/types/connector/query.d.ts +15 -0
- package/dist/types/connector/schema.d.ts +8 -0
- package/dist/types/dsl/dimensions/dimensions.d.ts +16 -0
- package/dist/types/dsl/encoding.d.ts +11 -0
- package/dist/types/dsl/havingFilters/having.d.ts +13 -0
- package/dist/types/dsl/index.d.ts +6 -0
- package/dist/types/dsl/locale/locale.d.ts +6 -0
- package/dist/types/dsl/measures/aggregate.d.ts +7 -0
- package/dist/types/dsl/measures/measures.d.ts +30 -0
- package/dist/types/dsl/theme/theme.d.ts +6 -0
- package/dist/types/dsl/vbi/vbi.d.ts +41 -0
- package/dist/types/dsl/whereFilters/filters.d.ts +7 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/tree/index.d.ts +1 -0
- package/dist/utils/tree/traverse.d.ts +1 -0
- package/package.json +55 -0
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VBIConnector, VBIConnectorId } from '../types/connector/connector';
|
|
2
|
+
export declare const connectorMap: Map<VBIConnectorId, VBIConnector | (() => Promise<VBIConnector>)>;
|
|
3
|
+
export declare const registerConnector: (id: VBIConnectorId, connector: VBIConnector | (() => Promise<VBIConnector>)) => void;
|
|
4
|
+
export declare const getConnector: (id: VBIConnectorId) => Promise<{
|
|
5
|
+
discoverSchema: () => Promise<import("..").VBISchema>;
|
|
6
|
+
query: (queryProps: import("..").VBIQueryProps) => Promise<import("..").VBIQueryResult>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ObserveCallback } from '../../../types';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
/**
|
|
4
|
+
* @description 图表类型构建器,用于切换和获取图表类型。支持表格、柱状图、折线图、饼图、散点图等多种图表类型
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChartTypeBuilder {
|
|
7
|
+
private dsl;
|
|
8
|
+
/**
|
|
9
|
+
* @description 构造函数
|
|
10
|
+
*/
|
|
11
|
+
constructor(_doc: Y.Doc, dsl: Y.Map<any>);
|
|
12
|
+
/**
|
|
13
|
+
* @description 监听图表类型变化
|
|
14
|
+
* @param callback - 回调函数
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @description 监听图表类型变化,返回取消监听的函数
|
|
18
|
+
* @param callback - 回调函数
|
|
19
|
+
* @returns 取消监听的函数
|
|
20
|
+
*/
|
|
21
|
+
observe(callback: ObserveCallback): () => void;
|
|
22
|
+
/**
|
|
23
|
+
* @description 设置图表类型
|
|
24
|
+
* @param chartType - 图表类型
|
|
25
|
+
*/
|
|
26
|
+
changeChartType(chartType: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* @description 获取当前图表类型
|
|
29
|
+
*/
|
|
30
|
+
getChartType(): string;
|
|
31
|
+
/**
|
|
32
|
+
* @description 导出为 JSON
|
|
33
|
+
*/
|
|
34
|
+
toJson(): string;
|
|
35
|
+
/**
|
|
36
|
+
* @description 获取所有支持的图表类型
|
|
37
|
+
*/
|
|
38
|
+
getAvailableChartTypes(): string[];
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartTypeBuilder } from './chart-type-builder';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { ObserveCallback, VBIDimension, VBIDimensionGroup, VBIDimensionTree } from '../../../types';
|
|
3
|
+
import { DimensionNodeBuilder } from './dim-node-builder';
|
|
4
|
+
/**
|
|
5
|
+
* @description 维度构建器,用于添加、修改、删除维度配置。维度是数据的分类字段,如:时间、地区、产品类别
|
|
6
|
+
*/
|
|
7
|
+
export declare class DimensionsBuilder {
|
|
8
|
+
private dsl;
|
|
9
|
+
constructor(_doc: Y.Doc, dsl: Y.Map<any>);
|
|
10
|
+
/**
|
|
11
|
+
* @description 添加一个维度
|
|
12
|
+
* @param field - 字段名
|
|
13
|
+
* @param callback - 回调函数
|
|
14
|
+
*/
|
|
15
|
+
add(field: string, callback: (node: DimensionNodeBuilder) => void): DimensionsBuilder;
|
|
16
|
+
/**
|
|
17
|
+
* @description 删除指定字段的维度
|
|
18
|
+
* @param field - 字段名
|
|
19
|
+
*/
|
|
20
|
+
remove(field: VBIDimension['field']): DimensionsBuilder;
|
|
21
|
+
/**
|
|
22
|
+
* @description 更新指定维度字段的配置
|
|
23
|
+
* @param field - 字段名
|
|
24
|
+
* @param callback - 回调函数
|
|
25
|
+
*/
|
|
26
|
+
update(field: string, callback: (node: DimensionNodeBuilder) => void): DimensionsBuilder;
|
|
27
|
+
/**
|
|
28
|
+
* @description 根据字段名查找维度
|
|
29
|
+
* @param field - 字段名
|
|
30
|
+
*/
|
|
31
|
+
find(field: VBIDimension['field']): DimensionNodeBuilder | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* @description 获取所有维度
|
|
34
|
+
*/
|
|
35
|
+
findAll(): DimensionNodeBuilder[];
|
|
36
|
+
/**
|
|
37
|
+
* @description 导出所有维度为 JSON 数组
|
|
38
|
+
*/
|
|
39
|
+
toJson(): VBIDimension[];
|
|
40
|
+
/**
|
|
41
|
+
* @description 监听维度变化,返回取消监听的函数
|
|
42
|
+
* @param callback - 回调函数
|
|
43
|
+
* @returns 取消监听的函数
|
|
44
|
+
*/
|
|
45
|
+
observe(callback: ObserveCallback): () => void;
|
|
46
|
+
static isDimensionNode(node: VBIDimensionTree[0]): node is VBIDimension;
|
|
47
|
+
static isDimensionGroup(node: VBIDimensionTree[0]): node is VBIDimensionGroup;
|
|
48
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import { VBIDimension } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @description 维度节点构建器,用于配置单个维度
|
|
5
|
+
*/
|
|
6
|
+
export declare class DimensionNodeBuilder {
|
|
7
|
+
private yMap;
|
|
8
|
+
constructor(yMap: Y.Map<any>);
|
|
9
|
+
/**
|
|
10
|
+
* @description 获取字段名
|
|
11
|
+
*/
|
|
12
|
+
getField(): string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 设置显示名称
|
|
15
|
+
* @param alias - 显示名称
|
|
16
|
+
*/
|
|
17
|
+
setAlias(alias: string): this;
|
|
18
|
+
/**
|
|
19
|
+
* @description 导出为 JSON
|
|
20
|
+
*/
|
|
21
|
+
toJson(): VBIDimension;
|
|
22
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { VBIHavingFilter } from '../../../types';
|
|
3
|
+
import { HavingFiltersNodeBuilder } from './having-node-builder';
|
|
4
|
+
import type { YArrayEvent, Transaction } from 'yjs';
|
|
5
|
+
/**
|
|
6
|
+
* @description Having 过滤构建器,用于添加、修改、删除分组后过滤条件。Having 过滤在数据聚合后生效,用于筛选分组结果
|
|
7
|
+
*/
|
|
8
|
+
export declare class HavingFiltersBuilder {
|
|
9
|
+
private dsl;
|
|
10
|
+
constructor(_doc: Y.Doc, dsl: Y.Map<any>);
|
|
11
|
+
/**
|
|
12
|
+
* @description 添加一个 Having 过滤条件
|
|
13
|
+
* @param field - 字段名
|
|
14
|
+
* @param callback - 回调函数
|
|
15
|
+
*/
|
|
16
|
+
add(field: string, callback: (node: HavingFiltersNodeBuilder) => void): HavingFiltersBuilder;
|
|
17
|
+
/**
|
|
18
|
+
* @description 更新指定字段的过滤条件
|
|
19
|
+
* @param field - 字段名
|
|
20
|
+
* @param callback - 回调函数
|
|
21
|
+
*/
|
|
22
|
+
update(field: string, callback: (node: HavingFiltersNodeBuilder) => void): HavingFiltersBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* @description 根据字段名删除 Having 过滤条件
|
|
25
|
+
* @param field - 字段名
|
|
26
|
+
*/
|
|
27
|
+
remove(field: string): HavingFiltersBuilder;
|
|
28
|
+
/**
|
|
29
|
+
* @description 根据字段名查找 Having 过滤条件
|
|
30
|
+
* @param field - 字段名
|
|
31
|
+
*/
|
|
32
|
+
find(field: string): HavingFiltersNodeBuilder | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* @description 获取所有 Having 过滤条件
|
|
35
|
+
*/
|
|
36
|
+
findAll(): HavingFiltersNodeBuilder[];
|
|
37
|
+
/**
|
|
38
|
+
* @description 清空所有 Having 过滤条件
|
|
39
|
+
*/
|
|
40
|
+
clear(): this;
|
|
41
|
+
/**
|
|
42
|
+
* @description 导出所有 Having 过滤条件为 JSON 数组
|
|
43
|
+
*/
|
|
44
|
+
toJson(): VBIHavingFilter[];
|
|
45
|
+
/**
|
|
46
|
+
* @description 监听过滤条件变化
|
|
47
|
+
* @param callback - 回调函数
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* @description 监听过滤条件变化,返回取消监听的函数
|
|
51
|
+
* @param callback - 回调函数
|
|
52
|
+
* @returns 取消监听的函数
|
|
53
|
+
*/
|
|
54
|
+
observe(callback: (e: YArrayEvent<any>, trans: Transaction | null) => void): () => void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import { VBIHavingFilter } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @description Having 过滤节点构建器,用于配置单个 Having 过滤条件
|
|
5
|
+
*/
|
|
6
|
+
export declare class HavingFiltersNodeBuilder {
|
|
7
|
+
private yMap;
|
|
8
|
+
constructor(yMap: Y.Map<any>);
|
|
9
|
+
/**
|
|
10
|
+
* @description 获取字段名
|
|
11
|
+
*/
|
|
12
|
+
getField(): string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 设置过滤条件的值
|
|
15
|
+
* @param value - 过滤值
|
|
16
|
+
*/
|
|
17
|
+
setValue(value: unknown): this;
|
|
18
|
+
/**
|
|
19
|
+
* @description 设置过滤操作符
|
|
20
|
+
* @param operator - 操作符
|
|
21
|
+
*/
|
|
22
|
+
setOperator(operator: string): this;
|
|
23
|
+
/**
|
|
24
|
+
* @description 导出为 JSON
|
|
25
|
+
*/
|
|
26
|
+
toJson(): VBIHavingFilter;
|
|
27
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { ObserveCallback, VBIMeasure, VBIMeasureGroup, VBIMeasureTree } from '../../../types';
|
|
3
|
+
import { MeasureNodeBuilder } from './mea-node-builder';
|
|
4
|
+
/**
|
|
5
|
+
* @description 度量构建器,用于添加、修改、删除度量配置。度量是数据的数值字段,如:销售额、利润、数量
|
|
6
|
+
*/
|
|
7
|
+
export declare class MeasuresBuilder {
|
|
8
|
+
private dsl;
|
|
9
|
+
constructor(_doc: Y.Doc, dsl: Y.Map<any>);
|
|
10
|
+
/**
|
|
11
|
+
* @description 添加一个度量
|
|
12
|
+
* @param field - 字段名
|
|
13
|
+
* @param callback - 回调函数
|
|
14
|
+
*/
|
|
15
|
+
add(field: string, callback: (node: MeasureNodeBuilder) => void): MeasuresBuilder;
|
|
16
|
+
/**
|
|
17
|
+
* @description 删除指定字段的度量
|
|
18
|
+
* @param field - 字段名
|
|
19
|
+
*/
|
|
20
|
+
remove(field: VBIMeasure['field']): MeasuresBuilder;
|
|
21
|
+
/**
|
|
22
|
+
* @description 更新度量配置
|
|
23
|
+
* @param field - 字段名
|
|
24
|
+
* @param callback - 回调函数
|
|
25
|
+
*/
|
|
26
|
+
update(field: string, callback: (node: MeasureNodeBuilder) => void): MeasuresBuilder;
|
|
27
|
+
/**
|
|
28
|
+
* @description 根据字段名查找度量
|
|
29
|
+
* @param field - 字段名
|
|
30
|
+
*/
|
|
31
|
+
find(field: VBIMeasure['field']): MeasureNodeBuilder | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* @description 获取所有度量
|
|
34
|
+
*/
|
|
35
|
+
findAll(): MeasureNodeBuilder[];
|
|
36
|
+
/**
|
|
37
|
+
* @description 导出所有度量为 JSON 数组
|
|
38
|
+
*/
|
|
39
|
+
toJson(): VBIMeasure[];
|
|
40
|
+
/**
|
|
41
|
+
* @description 监听度量变化
|
|
42
|
+
* @param callback - 回调函数
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* @description 监听度量变化,返回取消监听的函数
|
|
46
|
+
* @param callback - 回调函数
|
|
47
|
+
* @returns 取消监听的函数
|
|
48
|
+
*/
|
|
49
|
+
observe(callback: ObserveCallback): () => void;
|
|
50
|
+
static isMeasureNode(node: VBIMeasureTree[0]): node is VBIMeasure;
|
|
51
|
+
static isMeasureGroup(node: VBIMeasureTree[0]): node is VBIMeasureGroup;
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import { VBIMeasure } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @description 度量节点构建器,用于配置单个度量
|
|
5
|
+
*/
|
|
6
|
+
export declare class MeasureNodeBuilder {
|
|
7
|
+
private yMap;
|
|
8
|
+
constructor(yMap: Y.Map<any>);
|
|
9
|
+
/**
|
|
10
|
+
* @description 获取字段名
|
|
11
|
+
*/
|
|
12
|
+
getField(): string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 设置显示名称
|
|
15
|
+
* @param alias - 显示名称
|
|
16
|
+
*/
|
|
17
|
+
setAlias(alias: string): this;
|
|
18
|
+
/**
|
|
19
|
+
* @description 设置图表编码位置
|
|
20
|
+
* @param encoding - 编码位置(yAxis/xAxis/color/size)
|
|
21
|
+
*/
|
|
22
|
+
setEncoding(encoding: VBIMeasure['encoding']): this;
|
|
23
|
+
/**
|
|
24
|
+
* @description 设置聚合函数
|
|
25
|
+
* @param aggregate - 聚合配置
|
|
26
|
+
*/
|
|
27
|
+
setAggregate(aggregate: VBIMeasure['aggregate']): this;
|
|
28
|
+
/**
|
|
29
|
+
* @description 导出为 JSON
|
|
30
|
+
*/
|
|
31
|
+
toJson(): VBIMeasure;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WhereFiltersBuilder } from './where-builder';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { VBIFilter, ObserveCallback } from '../../../types';
|
|
3
|
+
import { WhereFilterNodeBuilder } from './where-node-builder';
|
|
4
|
+
/**
|
|
5
|
+
* @description Where 过滤构建器,用于添加、修改、删除行级过滤条件。Where 过滤在数据查询前生效,用于筛选原始数据
|
|
6
|
+
*/
|
|
7
|
+
export declare class WhereFiltersBuilder {
|
|
8
|
+
private dsl;
|
|
9
|
+
private doc;
|
|
10
|
+
constructor(doc: Y.Doc, dsl: Y.Map<any>);
|
|
11
|
+
/**
|
|
12
|
+
* @description 添加一个 Where 过滤条件
|
|
13
|
+
* @param field - 字段名
|
|
14
|
+
* @param callback - 回调函数
|
|
15
|
+
*/
|
|
16
|
+
add(field: string, callback: (node: WhereFilterNodeBuilder) => void): WhereFiltersBuilder;
|
|
17
|
+
/**
|
|
18
|
+
* @description 更新指定字段的过滤条件
|
|
19
|
+
* @param field - 字段名
|
|
20
|
+
* @param callback - 回调函数
|
|
21
|
+
*/
|
|
22
|
+
update(field: string, callback: (node: WhereFilterNodeBuilder) => void): WhereFiltersBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* @description 删除指定字段的过滤条件
|
|
25
|
+
* @param field - 字段名
|
|
26
|
+
*/
|
|
27
|
+
remove(field: string): WhereFiltersBuilder;
|
|
28
|
+
/**
|
|
29
|
+
* @description 根据字段名查找过滤条件
|
|
30
|
+
* @param field - 字段名
|
|
31
|
+
*/
|
|
32
|
+
find(field: string): WhereFilterNodeBuilder | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* @description 获取所有 Where 过滤条件
|
|
35
|
+
*/
|
|
36
|
+
findAll(): WhereFilterNodeBuilder[];
|
|
37
|
+
/**
|
|
38
|
+
* @description 清空所有 Where 过滤条件
|
|
39
|
+
*/
|
|
40
|
+
clear(): this;
|
|
41
|
+
/**
|
|
42
|
+
* @description 导出所有 Where 过滤条件为 JSON 数组
|
|
43
|
+
*/
|
|
44
|
+
toJson(): VBIFilter[];
|
|
45
|
+
/**
|
|
46
|
+
* @description 监听过滤条件变化
|
|
47
|
+
* @param callback - 回调函数
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* @description 监听过滤条件变化,返回取消监听的函数
|
|
51
|
+
* @param callback - 回调函数
|
|
52
|
+
* @returns 取消监听的函数
|
|
53
|
+
*/
|
|
54
|
+
observe(callback: ObserveCallback): () => void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import { VBIFilter } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @description Where 过滤节点构建器,用于配置单个 Where 过滤条件
|
|
5
|
+
*/
|
|
6
|
+
export declare class WhereFilterNodeBuilder {
|
|
7
|
+
private yMap;
|
|
8
|
+
constructor(yMap: Y.Map<any>);
|
|
9
|
+
/**
|
|
10
|
+
* @description 获取字段名
|
|
11
|
+
*/
|
|
12
|
+
getField(): string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 设置过滤操作符
|
|
15
|
+
* @param operator - 操作符
|
|
16
|
+
*/
|
|
17
|
+
setOperator(operator: string): this;
|
|
18
|
+
/**
|
|
19
|
+
* @description 设置过滤值
|
|
20
|
+
* @param value - 过滤值
|
|
21
|
+
*/
|
|
22
|
+
setValue(value: unknown): this;
|
|
23
|
+
/**
|
|
24
|
+
* @description 导出为 JSON
|
|
25
|
+
*/
|
|
26
|
+
toJson(): VBIFilter;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import { VSeedDSL } from '@visactor/vseed';
|
|
3
|
+
import { VQueryDSL } from '@visactor/vquery';
|
|
4
|
+
import { DimensionsBuilder } from './sub-builders/dimensions';
|
|
5
|
+
import { MeasuresBuilder } from './sub-builders/measures';
|
|
6
|
+
import { HavingFiltersBuilder } from './sub-builders/havingFilters';
|
|
7
|
+
import { WhereFiltersBuilder } from './sub-builders';
|
|
8
|
+
import { ChartTypeBuilder } from './sub-builders';
|
|
9
|
+
import { VBIDSL, VBIBuilderInterface } from '../types';
|
|
10
|
+
export declare class VBIBuilder implements VBIBuilderInterface {
|
|
11
|
+
doc: Y.Doc;
|
|
12
|
+
dsl: Y.Map<any>;
|
|
13
|
+
undoManager: Y.UndoManager;
|
|
14
|
+
chartType: ChartTypeBuilder;
|
|
15
|
+
measures: MeasuresBuilder;
|
|
16
|
+
dimensions: DimensionsBuilder;
|
|
17
|
+
havingFilters: HavingFiltersBuilder;
|
|
18
|
+
whereFilters: WhereFiltersBuilder;
|
|
19
|
+
constructor(doc: Y.Doc);
|
|
20
|
+
applyUpdate(update: Uint8Array): void;
|
|
21
|
+
encodeStateAsUpdate(targetStateVector?: Uint8Array): Uint8Array<ArrayBufferLike>;
|
|
22
|
+
buildVSeed: () => Promise<VSeedDSL>;
|
|
23
|
+
buildVQuery: () => VQueryDSL;
|
|
24
|
+
build: () => VBIDSL;
|
|
25
|
+
getSchema: () => Promise<{
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
setLimit(limit: number): this;
|
|
30
|
+
setLocale(locale: string): this;
|
|
31
|
+
setTheme(theme: string): this;
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VBIConnectorId } from '../types/connector/connector';
|
|
2
|
+
import { VBIDSL } from '../types';
|
|
3
|
+
import { VBIBuilder } from './vbi-builder';
|
|
4
|
+
export declare const VBI: {
|
|
5
|
+
connectorMap: Map<string, {
|
|
6
|
+
discoverSchema: () => Promise<import("../types").VBISchema>;
|
|
7
|
+
query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
|
|
8
|
+
} | (() => Promise<import("../types").VBIConnector>)>;
|
|
9
|
+
registerConnector: (id: VBIConnectorId, connector: import("../types").VBIConnector | (() => Promise<import("../types").VBIConnector>)) => void;
|
|
10
|
+
getConnector: (id: VBIConnectorId) => Promise<{
|
|
11
|
+
discoverSchema: () => Promise<import("../types").VBISchema>;
|
|
12
|
+
query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
|
|
13
|
+
}>;
|
|
14
|
+
generateEmptyDSL: (connectorId: VBIConnectorId) => VBIDSL;
|
|
15
|
+
from: (vbi: VBIDSL) => VBIBuilder;
|
|
16
|
+
};
|