@hpcc-js/ddl-shim 2.18.1 → 2.20.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,322 +1,322 @@
1
- export declare type RowType = {
2
- [key: string]: any;
3
- };
4
- export declare type Number64 = string;
5
- export declare type Range = [number | string, number | string];
6
- export declare type Dataset = any[];
7
- export declare type IFieldType = "boolean" | "number" | "number64" | "string" | "range" | "dataset" | "object";
8
- export interface IFieldBoolean {
9
- type: "boolean";
10
- id: string;
11
- default?: boolean;
12
- }
13
- export interface IFieldNumber {
14
- type: "number";
15
- id: string;
16
- default?: number;
17
- }
18
- export interface IFieldNumber64 {
19
- type: "number64";
20
- id: string;
21
- default?: Number64;
22
- }
23
- export interface IFieldString {
24
- type: "string";
25
- id: string;
26
- default?: string;
27
- }
28
- export interface IFieldRange {
29
- type: "range";
30
- id: string;
31
- default?: Range;
32
- }
33
- export interface IFieldDataset {
34
- type: "dataset";
35
- id: string;
36
- default?: Dataset;
37
- children: IField[];
38
- }
39
- export interface IFieldObject {
40
- type: "object";
41
- id: string;
42
- default?: object;
43
- fields: {
44
- [key: string]: IField;
45
- };
46
- }
47
- export declare type IField = IFieldBoolean | IFieldNumber | IFieldNumber64 | IFieldString | IFieldRange | IFieldDataset | IFieldObject;
48
- export declare type IServiceType = "wuresult" | "hipie" | "roxie";
49
- export declare type IDatasourceType = IServiceType | "logicalfile" | "form" | "databomb";
50
- export declare type DatasourceType = ILogicalFile | IForm | IDatabomb | IWUResult | IHipieService | IRoxieService;
51
- export interface IDatasource {
52
- type: IDatasourceType;
53
- id: string;
54
- fields: IField[];
55
- }
56
- export interface IESPService extends IDatasource {
57
- url: string;
58
- }
59
- export interface IService {
60
- type: IServiceType;
61
- id: string;
62
- url: string;
63
- }
64
- export interface IOutput {
65
- fields: IField[];
66
- }
67
- export declare type OutputDict = {
68
- [key: string]: IOutput;
69
- };
70
- export interface IWUResult extends IService {
71
- type: "wuresult";
72
- wuid: string;
73
- outputs: OutputDict;
74
- }
75
- export interface ILogicalFile extends IESPService {
76
- type: "logicalfile";
77
- logicalFile: string;
78
- }
79
- export interface IRoxieService extends IService {
80
- type: "roxie";
81
- querySet: string;
82
- queryID: string;
83
- inputs: IField[];
84
- outputs: OutputDict;
85
- }
86
- export interface IHipieService extends IService {
87
- type: "hipie";
88
- querySet: string;
89
- queryID: string;
90
- inputs: IField[];
91
- outputs: OutputDict;
92
- }
93
- export interface IForm extends IDatasource {
94
- type: "form";
95
- }
96
- export declare type IDatabombFormat = "csv" | "tsv" | "json";
97
- export interface IDatabomb extends IDatasource {
98
- type: "databomb";
99
- format: IDatabombFormat;
100
- payload?: string;
101
- }
102
- export interface IDatasourceBaseRef {
103
- id: string;
104
- }
105
- export interface IDatabombRef extends IDatasourceBaseRef {
106
- }
107
- export interface IWUResultRef extends IDatasourceBaseRef {
108
- output: string;
109
- }
110
- export interface IRequestField {
111
- source: string;
112
- remoteFieldID: string;
113
- localFieldID: string;
114
- }
115
- export interface IRoxieServiceRef extends IDatasourceBaseRef {
116
- request: IRequestField[];
117
- output: string;
118
- }
119
- export declare type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef;
120
- export declare function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef;
121
- export declare function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef;
122
- export declare function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef;
123
- export declare type IActivityType = "filter" | "project" | "groupby" | "sort" | "limit" | "mappings";
124
- export declare type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;
125
- export interface IActivity {
126
- type: IActivityType;
127
- }
128
- export declare type IMappingConditionType = "==" | "!=" | ">" | ">=" | "<" | "<=" | "range" | "in";
129
- export interface IMapping {
130
- remoteFieldID: string;
131
- localFieldID: string;
132
- condition: IMappingConditionType;
133
- nullable: boolean;
134
- }
135
- export interface IFilterCondition {
136
- viewID: string;
137
- mappings: IMapping[];
138
- }
139
- export interface IFilterStaticCondition {
140
- localFieldID: string;
141
- condition: IMappingConditionType;
142
- value: string | number;
143
- }
144
- export declare type FilterCondition = IFilterCondition | IFilterStaticCondition;
145
- export declare function isIFilterCondition(fc: FilterCondition): fc is IFilterCondition;
146
- export interface IFilter extends IActivity {
147
- type: "filter";
148
- conditions: FilterCondition[];
149
- }
150
- export declare function isFilterActivity(activity: IActivity): activity is IFilter;
151
- export interface IEquals {
152
- fieldID: string;
153
- type: "=";
154
- sourceFieldID: string;
155
- transformations?: MultiTransformationType[];
156
- }
157
- export declare type ICalculatedType = "+" | "-" | "*" | "/";
158
- export interface ICalculated {
159
- fieldID: string;
160
- type: ICalculatedType;
161
- sourceFieldID1: string;
162
- sourceFieldID2: string;
163
- }
164
- export interface IScale {
165
- fieldID: string;
166
- type: "scale";
167
- sourceFieldID: string;
168
- factor: number;
169
- }
170
- export interface ITemplate {
171
- fieldID: string;
172
- type: "template";
173
- template: string;
174
- }
175
- export interface IMapMapping {
176
- value: any;
177
- newValue: any;
178
- }
179
- export interface IMap {
180
- fieldID: string;
181
- type: "map";
182
- sourceFieldID: string;
183
- default: any;
184
- mappings: IMapMapping[];
185
- }
186
- export declare type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;
187
- export interface IMulti {
188
- fieldID: string;
189
- type: "multi";
190
- transformations: MultiTransformationType[];
191
- }
192
- export declare type ProjectTransformationType = MultiTransformationType | IMulti;
193
- export interface IProject extends IActivity {
194
- type: "project";
195
- transformations: ProjectTransformationType[];
196
- }
197
- export declare function isProjectActivity(activity: IActivity): activity is IProject;
198
- export interface IMappings extends IActivity {
199
- type: "mappings";
200
- transformations: ProjectTransformationType[];
201
- }
202
- export declare function isMappingsActivity(activity: IActivity): activity is IMappings;
203
- export declare type IAggregateType = "min" | "max" | "sum" | "mean" | "variance" | "deviation";
204
- export interface IAggregate {
205
- fieldID: string;
206
- type: IAggregateType;
207
- inFieldID: string;
208
- baseCountFieldID?: string;
209
- }
210
- export interface ICount {
211
- fieldID: string;
212
- type: "count";
213
- }
214
- export declare type AggregateType = IAggregate | ICount;
215
- export interface IGroupBy extends IActivity {
216
- type: "groupby";
217
- groupByIDs: string[];
218
- aggregates: AggregateType[];
219
- }
220
- export declare function isGroupByActivity(activity: IActivity): activity is IGroupBy;
221
- export interface ISortCondition {
222
- fieldID: string;
223
- descending: boolean;
224
- }
225
- export interface ISort extends IActivity {
226
- type: "sort";
227
- conditions: ISortCondition[];
228
- }
229
- export declare function isSortActivity(activity: IActivity): activity is ISort;
230
- export interface ILimit extends IActivity {
231
- type: "limit";
232
- limit: number;
233
- }
234
- export declare function isLimitActivity(activity: IActivity): activity is ILimit;
235
- export interface IWidgetProperties {
236
- __class: string;
237
- [propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];
238
- }
239
- export interface IWidget {
240
- id: string;
241
- chartType: string;
242
- __class: string;
243
- properties: IWidgetProperties;
244
- }
245
- export declare type VisibilityType = "normal" | "flyout";
246
- export declare const VisibilitySet: VisibilityType[];
247
- export interface IVisualization extends IWidget {
248
- title: string;
249
- description?: string;
250
- visibility: VisibilityType;
251
- mappings: IMappings;
252
- }
253
- export interface IView {
254
- id: string;
255
- datasource: IDatasourceRef;
256
- activities: ActivityType[];
257
- visualization: IVisualization;
258
- }
259
- export interface IProperties {
260
- [propID: string]: any;
261
- }
262
- export interface Schema {
263
- version: "2.1.0";
264
- createdBy: {
265
- name: string;
266
- version: string;
267
- };
268
- datasources: DatasourceType[];
269
- dataviews: IView[];
270
- properties?: IProperties;
271
- hipieProperties?: IProperties;
272
- defs?: {
273
- fieldTypes: {
274
- number64: Number64;
275
- range: Range;
276
- dataset: Dataset;
277
- fieldType: IFieldType;
278
- fieldBoolean: IFieldBoolean;
279
- fieldNumber: IFieldNumber;
280
- fieldNumber64: IFieldNumber64;
281
- fieldString: IFieldString;
282
- fieldRange: IFieldRange;
283
- fieldDataset: IFieldDataset;
284
- fieldObject: IFieldObject;
285
- field: IField;
286
- };
287
- datasourceTypes: {
288
- datasource: IDatasource;
289
- logicalFile: ILogicalFile;
290
- form: IForm;
291
- databomb: IDatabomb;
292
- wuresult: IWUResult;
293
- hipieService: IHipieService;
294
- roxieService: IRoxieService;
295
- };
296
- datasourceRefTypes: {
297
- wuResultRef: IWUResultRef;
298
- roxieServiceRef: IRoxieServiceRef;
299
- };
300
- activityTypes: {
301
- filter: IFilter;
302
- project: IProject;
303
- groupby: IGroupBy;
304
- sort: ISort;
305
- limit: ILimit;
306
- mappings: IMappings;
307
- };
308
- aggregateTypes: {
309
- aggregate: IAggregate;
310
- count: ICount;
311
- };
312
- transformationTypes: {
313
- equals: IEquals;
314
- calculated: ICalculated;
315
- scale: IScale;
316
- template: ITemplate;
317
- map: IMap;
318
- multi: IMulti;
319
- };
320
- };
321
- }
1
+ export declare type RowType = {
2
+ [key: string]: any;
3
+ };
4
+ export declare type Number64 = string;
5
+ export declare type Range = [number | string, number | string];
6
+ export declare type Dataset = any[];
7
+ export declare type IFieldType = "boolean" | "number" | "number64" | "string" | "range" | "dataset" | "object";
8
+ export interface IFieldBoolean {
9
+ type: "boolean";
10
+ id: string;
11
+ default?: boolean;
12
+ }
13
+ export interface IFieldNumber {
14
+ type: "number";
15
+ id: string;
16
+ default?: number;
17
+ }
18
+ export interface IFieldNumber64 {
19
+ type: "number64";
20
+ id: string;
21
+ default?: Number64;
22
+ }
23
+ export interface IFieldString {
24
+ type: "string";
25
+ id: string;
26
+ default?: string;
27
+ }
28
+ export interface IFieldRange {
29
+ type: "range";
30
+ id: string;
31
+ default?: Range;
32
+ }
33
+ export interface IFieldDataset {
34
+ type: "dataset";
35
+ id: string;
36
+ default?: Dataset;
37
+ children: IField[];
38
+ }
39
+ export interface IFieldObject {
40
+ type: "object";
41
+ id: string;
42
+ default?: object;
43
+ fields: {
44
+ [key: string]: IField;
45
+ };
46
+ }
47
+ export declare type IField = IFieldBoolean | IFieldNumber | IFieldNumber64 | IFieldString | IFieldRange | IFieldDataset | IFieldObject;
48
+ export declare type IServiceType = "wuresult" | "hipie" | "roxie";
49
+ export declare type IDatasourceType = IServiceType | "logicalfile" | "form" | "databomb";
50
+ export declare type DatasourceType = ILogicalFile | IForm | IDatabomb | IWUResult | IHipieService | IRoxieService;
51
+ export interface IDatasource {
52
+ type: IDatasourceType;
53
+ id: string;
54
+ fields: IField[];
55
+ }
56
+ export interface IESPService extends IDatasource {
57
+ url: string;
58
+ }
59
+ export interface IService {
60
+ type: IServiceType;
61
+ id: string;
62
+ url: string;
63
+ }
64
+ export interface IOutput {
65
+ fields: IField[];
66
+ }
67
+ export declare type OutputDict = {
68
+ [key: string]: IOutput;
69
+ };
70
+ export interface IWUResult extends IService {
71
+ type: "wuresult";
72
+ wuid: string;
73
+ outputs: OutputDict;
74
+ }
75
+ export interface ILogicalFile extends IESPService {
76
+ type: "logicalfile";
77
+ logicalFile: string;
78
+ }
79
+ export interface IRoxieService extends IService {
80
+ type: "roxie";
81
+ querySet: string;
82
+ queryID: string;
83
+ inputs: IField[];
84
+ outputs: OutputDict;
85
+ }
86
+ export interface IHipieService extends IService {
87
+ type: "hipie";
88
+ querySet: string;
89
+ queryID: string;
90
+ inputs: IField[];
91
+ outputs: OutputDict;
92
+ }
93
+ export interface IForm extends IDatasource {
94
+ type: "form";
95
+ }
96
+ export declare type IDatabombFormat = "csv" | "tsv" | "json";
97
+ export interface IDatabomb extends IDatasource {
98
+ type: "databomb";
99
+ format: IDatabombFormat;
100
+ payload?: string;
101
+ }
102
+ export interface IDatasourceBaseRef {
103
+ id: string;
104
+ }
105
+ export interface IDatabombRef extends IDatasourceBaseRef {
106
+ }
107
+ export interface IWUResultRef extends IDatasourceBaseRef {
108
+ output: string;
109
+ }
110
+ export interface IRequestField {
111
+ source: string;
112
+ remoteFieldID: string;
113
+ localFieldID: string;
114
+ }
115
+ export interface IRoxieServiceRef extends IDatasourceBaseRef {
116
+ request: IRequestField[];
117
+ output: string;
118
+ }
119
+ export declare type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef;
120
+ export declare function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef;
121
+ export declare function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef;
122
+ export declare function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef;
123
+ export declare type IActivityType = "filter" | "project" | "groupby" | "sort" | "limit" | "mappings";
124
+ export declare type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;
125
+ export interface IActivity {
126
+ type: IActivityType;
127
+ }
128
+ export declare type IMappingConditionType = "==" | "!=" | ">" | ">=" | "<" | "<=" | "range" | "in";
129
+ export interface IMapping {
130
+ remoteFieldID: string;
131
+ localFieldID: string;
132
+ condition: IMappingConditionType;
133
+ nullable: boolean;
134
+ }
135
+ export interface IFilterCondition {
136
+ viewID: string;
137
+ mappings: IMapping[];
138
+ }
139
+ export interface IFilterStaticCondition {
140
+ localFieldID: string;
141
+ condition: IMappingConditionType;
142
+ value: string | number;
143
+ }
144
+ export declare type FilterCondition = IFilterCondition | IFilterStaticCondition;
145
+ export declare function isIFilterCondition(fc: FilterCondition): fc is IFilterCondition;
146
+ export interface IFilter extends IActivity {
147
+ type: "filter";
148
+ conditions: FilterCondition[];
149
+ }
150
+ export declare function isFilterActivity(activity: IActivity): activity is IFilter;
151
+ export interface IEquals {
152
+ fieldID: string;
153
+ type: "=";
154
+ sourceFieldID: string;
155
+ transformations?: MultiTransformationType[];
156
+ }
157
+ export declare type ICalculatedType = "+" | "-" | "*" | "/";
158
+ export interface ICalculated {
159
+ fieldID: string;
160
+ type: ICalculatedType;
161
+ sourceFieldID1: string;
162
+ sourceFieldID2: string;
163
+ }
164
+ export interface IScale {
165
+ fieldID: string;
166
+ type: "scale";
167
+ sourceFieldID: string;
168
+ factor: number;
169
+ }
170
+ export interface ITemplate {
171
+ fieldID: string;
172
+ type: "template";
173
+ template: string;
174
+ }
175
+ export interface IMapMapping {
176
+ value: any;
177
+ newValue: any;
178
+ }
179
+ export interface IMap {
180
+ fieldID: string;
181
+ type: "map";
182
+ sourceFieldID: string;
183
+ default: any;
184
+ mappings: IMapMapping[];
185
+ }
186
+ export declare type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;
187
+ export interface IMulti {
188
+ fieldID: string;
189
+ type: "multi";
190
+ transformations: MultiTransformationType[];
191
+ }
192
+ export declare type ProjectTransformationType = MultiTransformationType | IMulti;
193
+ export interface IProject extends IActivity {
194
+ type: "project";
195
+ transformations: ProjectTransformationType[];
196
+ }
197
+ export declare function isProjectActivity(activity: IActivity): activity is IProject;
198
+ export interface IMappings extends IActivity {
199
+ type: "mappings";
200
+ transformations: ProjectTransformationType[];
201
+ }
202
+ export declare function isMappingsActivity(activity: IActivity): activity is IMappings;
203
+ export declare type IAggregateType = "min" | "max" | "sum" | "mean" | "variance" | "deviation";
204
+ export interface IAggregate {
205
+ fieldID: string;
206
+ type: IAggregateType;
207
+ inFieldID: string;
208
+ baseCountFieldID?: string;
209
+ }
210
+ export interface ICount {
211
+ fieldID: string;
212
+ type: "count";
213
+ }
214
+ export declare type AggregateType = IAggregate | ICount;
215
+ export interface IGroupBy extends IActivity {
216
+ type: "groupby";
217
+ groupByIDs: string[];
218
+ aggregates: AggregateType[];
219
+ }
220
+ export declare function isGroupByActivity(activity: IActivity): activity is IGroupBy;
221
+ export interface ISortCondition {
222
+ fieldID: string;
223
+ descending: boolean;
224
+ }
225
+ export interface ISort extends IActivity {
226
+ type: "sort";
227
+ conditions: ISortCondition[];
228
+ }
229
+ export declare function isSortActivity(activity: IActivity): activity is ISort;
230
+ export interface ILimit extends IActivity {
231
+ type: "limit";
232
+ limit: number;
233
+ }
234
+ export declare function isLimitActivity(activity: IActivity): activity is ILimit;
235
+ export interface IWidgetProperties {
236
+ __class: string;
237
+ [propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];
238
+ }
239
+ export interface IWidget {
240
+ id: string;
241
+ chartType: string;
242
+ __class: string;
243
+ properties: IWidgetProperties;
244
+ }
245
+ export declare type VisibilityType = "normal" | "flyout";
246
+ export declare const VisibilitySet: VisibilityType[];
247
+ export interface IVisualization extends IWidget {
248
+ title: string;
249
+ description?: string;
250
+ visibility: VisibilityType;
251
+ mappings: IMappings;
252
+ }
253
+ export interface IView {
254
+ id: string;
255
+ datasource: IDatasourceRef;
256
+ activities: ActivityType[];
257
+ visualization: IVisualization;
258
+ }
259
+ export interface IProperties {
260
+ [propID: string]: any;
261
+ }
262
+ export interface Schema {
263
+ version: "2.1.0";
264
+ createdBy: {
265
+ name: string;
266
+ version: string;
267
+ };
268
+ datasources: DatasourceType[];
269
+ dataviews: IView[];
270
+ properties?: IProperties;
271
+ hipieProperties?: IProperties;
272
+ defs?: {
273
+ fieldTypes: {
274
+ number64: Number64;
275
+ range: Range;
276
+ dataset: Dataset;
277
+ fieldType: IFieldType;
278
+ fieldBoolean: IFieldBoolean;
279
+ fieldNumber: IFieldNumber;
280
+ fieldNumber64: IFieldNumber64;
281
+ fieldString: IFieldString;
282
+ fieldRange: IFieldRange;
283
+ fieldDataset: IFieldDataset;
284
+ fieldObject: IFieldObject;
285
+ field: IField;
286
+ };
287
+ datasourceTypes: {
288
+ datasource: IDatasource;
289
+ logicalFile: ILogicalFile;
290
+ form: IForm;
291
+ databomb: IDatabomb;
292
+ wuresult: IWUResult;
293
+ hipieService: IHipieService;
294
+ roxieService: IRoxieService;
295
+ };
296
+ datasourceRefTypes: {
297
+ wuResultRef: IWUResultRef;
298
+ roxieServiceRef: IRoxieServiceRef;
299
+ };
300
+ activityTypes: {
301
+ filter: IFilter;
302
+ project: IProject;
303
+ groupby: IGroupBy;
304
+ sort: ISort;
305
+ limit: ILimit;
306
+ mappings: IMappings;
307
+ };
308
+ aggregateTypes: {
309
+ aggregate: IAggregate;
310
+ count: ICount;
311
+ };
312
+ transformationTypes: {
313
+ equals: IEquals;
314
+ calculated: ICalculated;
315
+ scale: IScale;
316
+ template: ITemplate;
317
+ map: IMap;
318
+ multi: IMulti;
319
+ };
320
+ };
321
+ }
322
322
  //# sourceMappingURL=v2_1_0.d.ts.map
@@ -1,11 +1,11 @@
1
- import * as DDL2 from "./ddl/v2";
2
- declare type CellPosition = {
3
- id: string;
4
- position: [number, number, number, number];
5
- };
6
- declare type DDLProperties = {
7
- layout: CellPosition[];
8
- };
9
- export declare function upgrade(ddl2: DDL2.Schema, dermObj: any): DDLProperties;
10
- export {};
1
+ import * as DDL2 from "./ddl/v2";
2
+ declare type CellPosition = {
3
+ id: string;
4
+ position: [number, number, number, number];
5
+ };
6
+ declare type DDLProperties = {
7
+ layout: CellPosition[];
8
+ };
9
+ export declare function upgrade(ddl2: DDL2.Schema, dermObj: any): DDLProperties;
10
+ export {};
11
11
  //# sourceMappingURL=dermatology.d.ts.map
package/types/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from "./__package__";
2
- import * as DDL1 from "./ddl/v1";
3
- import * as DDL2 from "./ddl/v2";
4
- export * from "./upgrade";
5
- export * from "./validate";
6
- export { DDL1, DDL2 };
7
- export declare function isDDL2Schema(ref: DDL1.DDLSchema | DDL2.Schema): ref is DDL2.Schema;
1
+ export * from "./__package__";
2
+ import * as DDL1 from "./ddl/v1";
3
+ import * as DDL2 from "./ddl/v2";
4
+ export * from "./upgrade";
5
+ export * from "./validate";
6
+ export { DDL1, DDL2 };
7
+ export declare function isDDL2Schema(ref: DDL1.DDLSchema | DDL2.Schema): ref is DDL2.Schema;
8
8
  //# sourceMappingURL=index.d.ts.map