@hpcc-js/ddl-shim 2.17.25 → 2.18.1
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/LICENSE +43 -43
- package/dist/cli.js +1048 -1103
- package/dist/cli.js.map +1 -1
- package/dist/index.es6.js +1327 -1406
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +1332 -1411
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +9 -24
- package/schema/v1.json +26 -78
- package/schema/v2.json +40 -120
- package/src/__package__.ts +2 -2
- package/src/cli.ts +60 -60
- package/src/ddl/v0_0_22.ts +344 -344
- package/src/ddl/v1.ts +313 -313
- package/src/ddl/v2.ts +426 -426
- package/src/ddl/v2_0_23.ts +395 -395
- package/src/ddl/v2_1_0.ts +406 -406
- package/src/dermatology.ts +229 -229
- package/src/index.ts +11 -11
- package/src/upgrade.ts +734 -734
- package/src/validate.ts +39 -39
- package/types/__package__.d.ts +3 -3
- package/types/__package__.d.ts.map +1 -1
- package/types/cli.d.ts +1 -1
- package/types/ddl/v0_0_22.d.ts +270 -270
- package/types/ddl/v1.d.ts +234 -234
- package/types/ddl/v2.d.ts +338 -338
- package/types/ddl/v2_0_23.d.ts +314 -314
- package/types/ddl/v2_1_0.d.ts +321 -321
- package/types/dermatology.d.ts +10 -10
- package/types/index.d.ts +7 -7
- package/types/upgrade.d.ts +3 -3
- package/types/validate.d.ts +7 -7
package/src/validate.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import * as _Ajv from "ajv";
|
|
2
|
-
import * as DDL from "./ddl/v1";
|
|
3
|
-
import * as DDL2 from "./ddl/v2";
|
|
4
|
-
|
|
5
|
-
const Ajv = (_Ajv as any).default || _Ajv;
|
|
6
|
-
|
|
7
|
-
export const ddl2Schema: object = _ddl2Schema;
|
|
8
|
-
|
|
9
|
-
const options: _Ajv.Options = {
|
|
10
|
-
allErrors: false,
|
|
11
|
-
verbose: true,
|
|
12
|
-
jsonPointers: false
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function doValidate(ddl: DDL.DDLSchema | DDL2.Schema, schema: DDL.DDLSchema | DDL2.Schema) {
|
|
16
|
-
const ajv: _Ajv.Ajv = new Ajv(options);
|
|
17
|
-
const validate = ajv.compile(schema);
|
|
18
|
-
const success = validate(ddl);
|
|
19
|
-
return {
|
|
20
|
-
success,
|
|
21
|
-
errors: validate.errors
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Not needed ---
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
import * as ddlSchema from "../schema/v1.json";
|
|
28
|
-
|
|
29
|
-
export function validate(ddl: DDL.DDLSchema) {
|
|
30
|
-
return doValidate(ddl, ddlSchema);
|
|
31
|
-
}
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
import * as _ddl2Schema from "../schema/v2.json";
|
|
36
|
-
|
|
37
|
-
export function validate2(ddl: DDL2.Schema) {
|
|
38
|
-
return doValidate(ddl, _ddl2Schema);
|
|
39
|
-
}
|
|
1
|
+
import * as _Ajv from "ajv";
|
|
2
|
+
import * as DDL from "./ddl/v1";
|
|
3
|
+
import * as DDL2 from "./ddl/v2";
|
|
4
|
+
|
|
5
|
+
const Ajv = (_Ajv as any).default || _Ajv;
|
|
6
|
+
|
|
7
|
+
export const ddl2Schema: object = _ddl2Schema;
|
|
8
|
+
|
|
9
|
+
const options: _Ajv.Options = {
|
|
10
|
+
allErrors: false,
|
|
11
|
+
verbose: true,
|
|
12
|
+
jsonPointers: false
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function doValidate(ddl: DDL.DDLSchema | DDL2.Schema, schema: DDL.DDLSchema | DDL2.Schema) {
|
|
16
|
+
const ajv: _Ajv.Ajv = new Ajv(options);
|
|
17
|
+
const validate = ajv.compile(schema);
|
|
18
|
+
const success = validate(ddl);
|
|
19
|
+
return {
|
|
20
|
+
success,
|
|
21
|
+
errors: validate.errors
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Not needed ---
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import * as ddlSchema from "../schema/v1.json";
|
|
28
|
+
|
|
29
|
+
export function validate(ddl: DDL.DDLSchema) {
|
|
30
|
+
return doValidate(ddl, ddlSchema);
|
|
31
|
+
}
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
import * as _ddl2Schema from "../schema/v2.json";
|
|
36
|
+
|
|
37
|
+
export function validate2(ddl: DDL2.Schema) {
|
|
38
|
+
return doValidate(ddl, _ddl2Schema);
|
|
39
|
+
}
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2
|
-
export declare const PKG_VERSION = "2.
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
1
|
+
export declare const PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2
|
+
export declare const PKG_VERSION = "2.18.1";
|
|
3
|
+
export declare const BUILD_VERSION = "2.102.1";
|
|
4
4
|
//# sourceMappingURL=__package__.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__package__.d.ts","sourceRoot":"","sources":["../src/__package__.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,sBAAsB,CAAC;AAC5C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"__package__.d.ts","sourceRoot":"","sources":["../src/__package__.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,sBAAsB,CAAC;AAC5C,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC"}
|
package/types/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=cli.d.ts.map
|
package/types/ddl/v0_0_22.d.ts
CHANGED
|
@@ -1,271 +1,271 @@
|
|
|
1
|
-
export declare type RowType = {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
};
|
|
4
|
-
export declare type IServiceType = "wuresult" | "hipie" | "roxie";
|
|
5
|
-
export declare type IDatasourceType = IServiceType | "logicalfile" | "form" | "databomb";
|
|
6
|
-
export declare type DatasourceType = ILogicalFile | IForm | IDatabomb | IWUResult | IHipieService | IRoxieService;
|
|
7
|
-
export declare type IPrimative = boolean | number | string;
|
|
8
|
-
export declare type IRange = [undefined | IPrimative, undefined | IPrimative];
|
|
9
|
-
export declare type IFieldType = "boolean" | "number" | "number64" | "string" | "range" | "dataset" | "object";
|
|
10
|
-
export interface IField {
|
|
11
|
-
id: string;
|
|
12
|
-
type: IFieldType;
|
|
13
|
-
default?: IPrimative | IRange | IField[];
|
|
14
|
-
children?: IField[];
|
|
15
|
-
}
|
|
16
|
-
export interface IProperties {
|
|
17
|
-
[propID: string]: any;
|
|
18
|
-
}
|
|
19
|
-
export interface IDatasource {
|
|
20
|
-
type: IDatasourceType;
|
|
21
|
-
id: string;
|
|
22
|
-
fields: IField[];
|
|
23
|
-
}
|
|
24
|
-
export interface IESPService extends IDatasource {
|
|
25
|
-
url: string;
|
|
26
|
-
}
|
|
27
|
-
export interface IService {
|
|
28
|
-
type: IServiceType;
|
|
29
|
-
id: string;
|
|
30
|
-
url: string;
|
|
31
|
-
}
|
|
32
|
-
export interface IOutput {
|
|
33
|
-
fields: IField[];
|
|
34
|
-
}
|
|
35
|
-
export declare type OutputDict = {
|
|
36
|
-
[key: string]: IOutput;
|
|
37
|
-
};
|
|
38
|
-
export interface IWUResult extends IService {
|
|
39
|
-
type: "wuresult";
|
|
40
|
-
wuid: string;
|
|
41
|
-
outputs: OutputDict;
|
|
42
|
-
}
|
|
43
|
-
export interface ILogicalFile extends IESPService {
|
|
44
|
-
type: "logicalfile";
|
|
45
|
-
logicalFile: string;
|
|
46
|
-
}
|
|
47
|
-
export interface IRoxieService extends IService {
|
|
48
|
-
type: "roxie";
|
|
49
|
-
querySet: string;
|
|
50
|
-
queryID: string;
|
|
51
|
-
inputs: IField[];
|
|
52
|
-
outputs: OutputDict;
|
|
53
|
-
}
|
|
54
|
-
export interface IHipieService extends IService {
|
|
55
|
-
type: "hipie";
|
|
56
|
-
querySet: string;
|
|
57
|
-
queryID: string;
|
|
58
|
-
inputs: IField[];
|
|
59
|
-
outputs: OutputDict;
|
|
60
|
-
}
|
|
61
|
-
export interface IForm extends IDatasource {
|
|
62
|
-
type: "form";
|
|
63
|
-
}
|
|
64
|
-
export declare type IDatabombFormat = "csv" | "tsv" | "json";
|
|
65
|
-
export interface IDatabomb extends IDatasource {
|
|
66
|
-
type: "databomb";
|
|
67
|
-
format: IDatabombFormat;
|
|
68
|
-
payload?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface IDatasourceBaseRef {
|
|
71
|
-
id: string;
|
|
72
|
-
}
|
|
73
|
-
export interface IDatabombRef extends IDatasourceBaseRef {
|
|
74
|
-
}
|
|
75
|
-
export interface IWUResultRef extends IDatasourceBaseRef {
|
|
76
|
-
output: string;
|
|
77
|
-
}
|
|
78
|
-
export interface IRequestField {
|
|
79
|
-
source: string;
|
|
80
|
-
remoteFieldID: string;
|
|
81
|
-
localFieldID: string;
|
|
82
|
-
}
|
|
83
|
-
export interface IRoxieServiceRef extends IDatasourceBaseRef {
|
|
84
|
-
request: IRequestField[];
|
|
85
|
-
output: string;
|
|
86
|
-
}
|
|
87
|
-
export declare type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef;
|
|
88
|
-
export declare function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef;
|
|
89
|
-
export declare function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef;
|
|
90
|
-
export declare function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef;
|
|
91
|
-
export declare type IActivityType = "filter" | "project" | "groupby" | "sort" | "limit" | "mappings";
|
|
92
|
-
export declare type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;
|
|
93
|
-
export interface IActivity {
|
|
94
|
-
type: IActivityType;
|
|
95
|
-
}
|
|
96
|
-
export declare type IMappingConditionType = "==" | "!=" | ">" | ">=" | "<" | "<=" | "range" | "in";
|
|
97
|
-
export interface IMapping {
|
|
98
|
-
remoteFieldID: string;
|
|
99
|
-
localFieldID: string;
|
|
100
|
-
condition: IMappingConditionType;
|
|
101
|
-
nullable: boolean;
|
|
102
|
-
}
|
|
103
|
-
export interface IFilterCondition {
|
|
104
|
-
viewID: string;
|
|
105
|
-
mappings: IMapping[];
|
|
106
|
-
}
|
|
107
|
-
export interface IFilter extends IActivity {
|
|
108
|
-
type: "filter";
|
|
109
|
-
conditions: IFilterCondition[];
|
|
110
|
-
}
|
|
111
|
-
export declare function isFilterActivity(activity: IActivity): activity is IFilter;
|
|
112
|
-
export interface IEquals {
|
|
113
|
-
fieldID: string;
|
|
114
|
-
type: "=";
|
|
115
|
-
sourceFieldID: string;
|
|
116
|
-
transformations?: MultiTransformationType[];
|
|
117
|
-
}
|
|
118
|
-
export declare type ICalculatedType = "+" | "-" | "*" | "/";
|
|
119
|
-
export interface ICalculated {
|
|
120
|
-
fieldID: string;
|
|
121
|
-
type: ICalculatedType;
|
|
122
|
-
sourceFieldID1: string;
|
|
123
|
-
sourceFieldID2: string;
|
|
124
|
-
}
|
|
125
|
-
export interface IScale {
|
|
126
|
-
fieldID: string;
|
|
127
|
-
type: "scale";
|
|
128
|
-
sourceFieldID: string;
|
|
129
|
-
factor: number;
|
|
130
|
-
}
|
|
131
|
-
export interface ITemplate {
|
|
132
|
-
fieldID: string;
|
|
133
|
-
type: "template";
|
|
134
|
-
template: string;
|
|
135
|
-
}
|
|
136
|
-
export interface IMapMapping {
|
|
137
|
-
value: any;
|
|
138
|
-
newValue: any;
|
|
139
|
-
}
|
|
140
|
-
export interface IMap {
|
|
141
|
-
fieldID: string;
|
|
142
|
-
type: "map";
|
|
143
|
-
sourceFieldID: string;
|
|
144
|
-
default: any;
|
|
145
|
-
mappings: IMapMapping[];
|
|
146
|
-
}
|
|
147
|
-
export declare type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;
|
|
148
|
-
export interface IMulti {
|
|
149
|
-
fieldID: string;
|
|
150
|
-
type: "multi";
|
|
151
|
-
transformations: MultiTransformationType[];
|
|
152
|
-
}
|
|
153
|
-
export declare type ProjectTransformationType = MultiTransformationType | IMulti;
|
|
154
|
-
export interface IProject extends IActivity {
|
|
155
|
-
type: "project";
|
|
156
|
-
transformations: ProjectTransformationType[];
|
|
157
|
-
}
|
|
158
|
-
export declare function isProjectActivity(activity: IActivity): activity is IProject;
|
|
159
|
-
export interface IMappings extends IActivity {
|
|
160
|
-
type: "mappings";
|
|
161
|
-
transformations: ProjectTransformationType[];
|
|
162
|
-
}
|
|
163
|
-
export declare function isMappingsActivity(activity: IActivity): activity is IMappings;
|
|
164
|
-
export declare type IAggregateType = "min" | "max" | "sum" | "mean" | "variance" | "deviation";
|
|
165
|
-
export interface IAggregate {
|
|
166
|
-
fieldID: string;
|
|
167
|
-
type: IAggregateType;
|
|
168
|
-
inFieldID: string;
|
|
169
|
-
baseCountFieldID?: string;
|
|
170
|
-
}
|
|
171
|
-
export interface ICount {
|
|
172
|
-
fieldID: string;
|
|
173
|
-
type: "count";
|
|
174
|
-
}
|
|
175
|
-
export declare type AggregateType = IAggregate | ICount;
|
|
176
|
-
export interface IGroupBy extends IActivity {
|
|
177
|
-
type: "groupby";
|
|
178
|
-
groupByIDs: string[];
|
|
179
|
-
aggregates: AggregateType[];
|
|
180
|
-
}
|
|
181
|
-
export declare function isGroupByActivity(activity: IActivity): activity is IGroupBy;
|
|
182
|
-
export interface ISortCondition {
|
|
183
|
-
fieldID: string;
|
|
184
|
-
descending: boolean;
|
|
185
|
-
}
|
|
186
|
-
export interface ISort extends IActivity {
|
|
187
|
-
type: "sort";
|
|
188
|
-
conditions: ISortCondition[];
|
|
189
|
-
}
|
|
190
|
-
export declare function isSortActivity(activity: IActivity): activity is ISort;
|
|
191
|
-
export interface ILimit extends IActivity {
|
|
192
|
-
type: "limit";
|
|
193
|
-
limit: number;
|
|
194
|
-
}
|
|
195
|
-
export declare function isLimitActivity(activity: IActivity): activity is ILimit;
|
|
196
|
-
export interface IWidgetProperties {
|
|
197
|
-
__class: string;
|
|
198
|
-
[propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];
|
|
199
|
-
}
|
|
200
|
-
export interface IWidget {
|
|
201
|
-
id: string;
|
|
202
|
-
chartType: string;
|
|
203
|
-
__class: string;
|
|
204
|
-
properties: IWidgetProperties;
|
|
205
|
-
}
|
|
206
|
-
export declare type VisibilityType = "normal" | "flyout";
|
|
207
|
-
export declare const VisibilitySet: VisibilityType[];
|
|
208
|
-
export interface IVisualization extends IWidget {
|
|
209
|
-
title: string;
|
|
210
|
-
description: string;
|
|
211
|
-
visibility: VisibilityType;
|
|
212
|
-
mappings: IMappings;
|
|
213
|
-
}
|
|
214
|
-
export interface IView {
|
|
215
|
-
id: string;
|
|
216
|
-
datasource: IDatasourceRef;
|
|
217
|
-
activities: ActivityType[];
|
|
218
|
-
visualization: IVisualization;
|
|
219
|
-
}
|
|
220
|
-
export interface Schema {
|
|
221
|
-
version: "0.0.22";
|
|
222
|
-
createdBy: {
|
|
223
|
-
name: string;
|
|
224
|
-
version: string;
|
|
225
|
-
};
|
|
226
|
-
datasources: DatasourceType[];
|
|
227
|
-
dataviews: IView[];
|
|
228
|
-
properties?: IProperties;
|
|
229
|
-
hipieProperties?: IProperties;
|
|
230
|
-
defs?: {
|
|
231
|
-
fieldTypes: {
|
|
232
|
-
field: IField;
|
|
233
|
-
primative: IPrimative;
|
|
234
|
-
range: IRange;
|
|
235
|
-
};
|
|
236
|
-
datasourceTypes: {
|
|
237
|
-
datasource: IDatasource;
|
|
238
|
-
logicalFile: ILogicalFile;
|
|
239
|
-
form: IForm;
|
|
240
|
-
databomb: IDatabomb;
|
|
241
|
-
wuresult: IWUResult;
|
|
242
|
-
hipieService: IHipieService;
|
|
243
|
-
roxieService: IRoxieService;
|
|
244
|
-
};
|
|
245
|
-
datasourceRefTypes: {
|
|
246
|
-
wuResultRef: IWUResultRef;
|
|
247
|
-
roxieServiceRef: IRoxieServiceRef;
|
|
248
|
-
};
|
|
249
|
-
activityTypes: {
|
|
250
|
-
filter: IFilter;
|
|
251
|
-
project: IProject;
|
|
252
|
-
groupby: IGroupBy;
|
|
253
|
-
sort: ISort;
|
|
254
|
-
limit: ILimit;
|
|
255
|
-
mappings: IMappings;
|
|
256
|
-
};
|
|
257
|
-
aggregateTypes: {
|
|
258
|
-
aggregate: IAggregate;
|
|
259
|
-
count: ICount;
|
|
260
|
-
};
|
|
261
|
-
transformationTypes: {
|
|
262
|
-
equals: IEquals;
|
|
263
|
-
calculated: ICalculated;
|
|
264
|
-
scale: IScale;
|
|
265
|
-
template: ITemplate;
|
|
266
|
-
map: IMap;
|
|
267
|
-
multi: IMulti;
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
}
|
|
1
|
+
export declare type RowType = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
export declare type IServiceType = "wuresult" | "hipie" | "roxie";
|
|
5
|
+
export declare type IDatasourceType = IServiceType | "logicalfile" | "form" | "databomb";
|
|
6
|
+
export declare type DatasourceType = ILogicalFile | IForm | IDatabomb | IWUResult | IHipieService | IRoxieService;
|
|
7
|
+
export declare type IPrimative = boolean | number | string;
|
|
8
|
+
export declare type IRange = [undefined | IPrimative, undefined | IPrimative];
|
|
9
|
+
export declare type IFieldType = "boolean" | "number" | "number64" | "string" | "range" | "dataset" | "object";
|
|
10
|
+
export interface IField {
|
|
11
|
+
id: string;
|
|
12
|
+
type: IFieldType;
|
|
13
|
+
default?: IPrimative | IRange | IField[];
|
|
14
|
+
children?: IField[];
|
|
15
|
+
}
|
|
16
|
+
export interface IProperties {
|
|
17
|
+
[propID: string]: any;
|
|
18
|
+
}
|
|
19
|
+
export interface IDatasource {
|
|
20
|
+
type: IDatasourceType;
|
|
21
|
+
id: string;
|
|
22
|
+
fields: IField[];
|
|
23
|
+
}
|
|
24
|
+
export interface IESPService extends IDatasource {
|
|
25
|
+
url: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IService {
|
|
28
|
+
type: IServiceType;
|
|
29
|
+
id: string;
|
|
30
|
+
url: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IOutput {
|
|
33
|
+
fields: IField[];
|
|
34
|
+
}
|
|
35
|
+
export declare type OutputDict = {
|
|
36
|
+
[key: string]: IOutput;
|
|
37
|
+
};
|
|
38
|
+
export interface IWUResult extends IService {
|
|
39
|
+
type: "wuresult";
|
|
40
|
+
wuid: string;
|
|
41
|
+
outputs: OutputDict;
|
|
42
|
+
}
|
|
43
|
+
export interface ILogicalFile extends IESPService {
|
|
44
|
+
type: "logicalfile";
|
|
45
|
+
logicalFile: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IRoxieService extends IService {
|
|
48
|
+
type: "roxie";
|
|
49
|
+
querySet: string;
|
|
50
|
+
queryID: string;
|
|
51
|
+
inputs: IField[];
|
|
52
|
+
outputs: OutputDict;
|
|
53
|
+
}
|
|
54
|
+
export interface IHipieService extends IService {
|
|
55
|
+
type: "hipie";
|
|
56
|
+
querySet: string;
|
|
57
|
+
queryID: string;
|
|
58
|
+
inputs: IField[];
|
|
59
|
+
outputs: OutputDict;
|
|
60
|
+
}
|
|
61
|
+
export interface IForm extends IDatasource {
|
|
62
|
+
type: "form";
|
|
63
|
+
}
|
|
64
|
+
export declare type IDatabombFormat = "csv" | "tsv" | "json";
|
|
65
|
+
export interface IDatabomb extends IDatasource {
|
|
66
|
+
type: "databomb";
|
|
67
|
+
format: IDatabombFormat;
|
|
68
|
+
payload?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface IDatasourceBaseRef {
|
|
71
|
+
id: string;
|
|
72
|
+
}
|
|
73
|
+
export interface IDatabombRef extends IDatasourceBaseRef {
|
|
74
|
+
}
|
|
75
|
+
export interface IWUResultRef extends IDatasourceBaseRef {
|
|
76
|
+
output: string;
|
|
77
|
+
}
|
|
78
|
+
export interface IRequestField {
|
|
79
|
+
source: string;
|
|
80
|
+
remoteFieldID: string;
|
|
81
|
+
localFieldID: string;
|
|
82
|
+
}
|
|
83
|
+
export interface IRoxieServiceRef extends IDatasourceBaseRef {
|
|
84
|
+
request: IRequestField[];
|
|
85
|
+
output: string;
|
|
86
|
+
}
|
|
87
|
+
export declare type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef;
|
|
88
|
+
export declare function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef;
|
|
89
|
+
export declare function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef;
|
|
90
|
+
export declare function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef;
|
|
91
|
+
export declare type IActivityType = "filter" | "project" | "groupby" | "sort" | "limit" | "mappings";
|
|
92
|
+
export declare type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;
|
|
93
|
+
export interface IActivity {
|
|
94
|
+
type: IActivityType;
|
|
95
|
+
}
|
|
96
|
+
export declare type IMappingConditionType = "==" | "!=" | ">" | ">=" | "<" | "<=" | "range" | "in";
|
|
97
|
+
export interface IMapping {
|
|
98
|
+
remoteFieldID: string;
|
|
99
|
+
localFieldID: string;
|
|
100
|
+
condition: IMappingConditionType;
|
|
101
|
+
nullable: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface IFilterCondition {
|
|
104
|
+
viewID: string;
|
|
105
|
+
mappings: IMapping[];
|
|
106
|
+
}
|
|
107
|
+
export interface IFilter extends IActivity {
|
|
108
|
+
type: "filter";
|
|
109
|
+
conditions: IFilterCondition[];
|
|
110
|
+
}
|
|
111
|
+
export declare function isFilterActivity(activity: IActivity): activity is IFilter;
|
|
112
|
+
export interface IEquals {
|
|
113
|
+
fieldID: string;
|
|
114
|
+
type: "=";
|
|
115
|
+
sourceFieldID: string;
|
|
116
|
+
transformations?: MultiTransformationType[];
|
|
117
|
+
}
|
|
118
|
+
export declare type ICalculatedType = "+" | "-" | "*" | "/";
|
|
119
|
+
export interface ICalculated {
|
|
120
|
+
fieldID: string;
|
|
121
|
+
type: ICalculatedType;
|
|
122
|
+
sourceFieldID1: string;
|
|
123
|
+
sourceFieldID2: string;
|
|
124
|
+
}
|
|
125
|
+
export interface IScale {
|
|
126
|
+
fieldID: string;
|
|
127
|
+
type: "scale";
|
|
128
|
+
sourceFieldID: string;
|
|
129
|
+
factor: number;
|
|
130
|
+
}
|
|
131
|
+
export interface ITemplate {
|
|
132
|
+
fieldID: string;
|
|
133
|
+
type: "template";
|
|
134
|
+
template: string;
|
|
135
|
+
}
|
|
136
|
+
export interface IMapMapping {
|
|
137
|
+
value: any;
|
|
138
|
+
newValue: any;
|
|
139
|
+
}
|
|
140
|
+
export interface IMap {
|
|
141
|
+
fieldID: string;
|
|
142
|
+
type: "map";
|
|
143
|
+
sourceFieldID: string;
|
|
144
|
+
default: any;
|
|
145
|
+
mappings: IMapMapping[];
|
|
146
|
+
}
|
|
147
|
+
export declare type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;
|
|
148
|
+
export interface IMulti {
|
|
149
|
+
fieldID: string;
|
|
150
|
+
type: "multi";
|
|
151
|
+
transformations: MultiTransformationType[];
|
|
152
|
+
}
|
|
153
|
+
export declare type ProjectTransformationType = MultiTransformationType | IMulti;
|
|
154
|
+
export interface IProject extends IActivity {
|
|
155
|
+
type: "project";
|
|
156
|
+
transformations: ProjectTransformationType[];
|
|
157
|
+
}
|
|
158
|
+
export declare function isProjectActivity(activity: IActivity): activity is IProject;
|
|
159
|
+
export interface IMappings extends IActivity {
|
|
160
|
+
type: "mappings";
|
|
161
|
+
transformations: ProjectTransformationType[];
|
|
162
|
+
}
|
|
163
|
+
export declare function isMappingsActivity(activity: IActivity): activity is IMappings;
|
|
164
|
+
export declare type IAggregateType = "min" | "max" | "sum" | "mean" | "variance" | "deviation";
|
|
165
|
+
export interface IAggregate {
|
|
166
|
+
fieldID: string;
|
|
167
|
+
type: IAggregateType;
|
|
168
|
+
inFieldID: string;
|
|
169
|
+
baseCountFieldID?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface ICount {
|
|
172
|
+
fieldID: string;
|
|
173
|
+
type: "count";
|
|
174
|
+
}
|
|
175
|
+
export declare type AggregateType = IAggregate | ICount;
|
|
176
|
+
export interface IGroupBy extends IActivity {
|
|
177
|
+
type: "groupby";
|
|
178
|
+
groupByIDs: string[];
|
|
179
|
+
aggregates: AggregateType[];
|
|
180
|
+
}
|
|
181
|
+
export declare function isGroupByActivity(activity: IActivity): activity is IGroupBy;
|
|
182
|
+
export interface ISortCondition {
|
|
183
|
+
fieldID: string;
|
|
184
|
+
descending: boolean;
|
|
185
|
+
}
|
|
186
|
+
export interface ISort extends IActivity {
|
|
187
|
+
type: "sort";
|
|
188
|
+
conditions: ISortCondition[];
|
|
189
|
+
}
|
|
190
|
+
export declare function isSortActivity(activity: IActivity): activity is ISort;
|
|
191
|
+
export interface ILimit extends IActivity {
|
|
192
|
+
type: "limit";
|
|
193
|
+
limit: number;
|
|
194
|
+
}
|
|
195
|
+
export declare function isLimitActivity(activity: IActivity): activity is ILimit;
|
|
196
|
+
export interface IWidgetProperties {
|
|
197
|
+
__class: string;
|
|
198
|
+
[propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];
|
|
199
|
+
}
|
|
200
|
+
export interface IWidget {
|
|
201
|
+
id: string;
|
|
202
|
+
chartType: string;
|
|
203
|
+
__class: string;
|
|
204
|
+
properties: IWidgetProperties;
|
|
205
|
+
}
|
|
206
|
+
export declare type VisibilityType = "normal" | "flyout";
|
|
207
|
+
export declare const VisibilitySet: VisibilityType[];
|
|
208
|
+
export interface IVisualization extends IWidget {
|
|
209
|
+
title: string;
|
|
210
|
+
description: string;
|
|
211
|
+
visibility: VisibilityType;
|
|
212
|
+
mappings: IMappings;
|
|
213
|
+
}
|
|
214
|
+
export interface IView {
|
|
215
|
+
id: string;
|
|
216
|
+
datasource: IDatasourceRef;
|
|
217
|
+
activities: ActivityType[];
|
|
218
|
+
visualization: IVisualization;
|
|
219
|
+
}
|
|
220
|
+
export interface Schema {
|
|
221
|
+
version: "0.0.22";
|
|
222
|
+
createdBy: {
|
|
223
|
+
name: string;
|
|
224
|
+
version: string;
|
|
225
|
+
};
|
|
226
|
+
datasources: DatasourceType[];
|
|
227
|
+
dataviews: IView[];
|
|
228
|
+
properties?: IProperties;
|
|
229
|
+
hipieProperties?: IProperties;
|
|
230
|
+
defs?: {
|
|
231
|
+
fieldTypes: {
|
|
232
|
+
field: IField;
|
|
233
|
+
primative: IPrimative;
|
|
234
|
+
range: IRange;
|
|
235
|
+
};
|
|
236
|
+
datasourceTypes: {
|
|
237
|
+
datasource: IDatasource;
|
|
238
|
+
logicalFile: ILogicalFile;
|
|
239
|
+
form: IForm;
|
|
240
|
+
databomb: IDatabomb;
|
|
241
|
+
wuresult: IWUResult;
|
|
242
|
+
hipieService: IHipieService;
|
|
243
|
+
roxieService: IRoxieService;
|
|
244
|
+
};
|
|
245
|
+
datasourceRefTypes: {
|
|
246
|
+
wuResultRef: IWUResultRef;
|
|
247
|
+
roxieServiceRef: IRoxieServiceRef;
|
|
248
|
+
};
|
|
249
|
+
activityTypes: {
|
|
250
|
+
filter: IFilter;
|
|
251
|
+
project: IProject;
|
|
252
|
+
groupby: IGroupBy;
|
|
253
|
+
sort: ISort;
|
|
254
|
+
limit: ILimit;
|
|
255
|
+
mappings: IMappings;
|
|
256
|
+
};
|
|
257
|
+
aggregateTypes: {
|
|
258
|
+
aggregate: IAggregate;
|
|
259
|
+
count: ICount;
|
|
260
|
+
};
|
|
261
|
+
transformationTypes: {
|
|
262
|
+
equals: IEquals;
|
|
263
|
+
calculated: ICalculated;
|
|
264
|
+
scale: IScale;
|
|
265
|
+
template: ITemplate;
|
|
266
|
+
map: IMap;
|
|
267
|
+
multi: IMulti;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
271
|
//# sourceMappingURL=v0_0_22.d.ts.map
|