@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/types/ddl/v1.d.ts CHANGED
@@ -1,235 +1,235 @@
1
- export declare type StringStringDict = {
2
- [key: string]: string;
3
- };
4
- export declare type IFilterRule = "==" | "!=" | "<" | "<=" | ">" | ">=" | "set" | "notequals";
5
- export interface IFilter {
6
- fieldid: string;
7
- nullable: boolean;
8
- rule: IFilterRule;
9
- minid?: string;
10
- maxid?: string;
11
- }
12
- export interface IOutput {
13
- id: string;
14
- from?: string;
15
- filter?: IFilter[];
16
- notify?: string[];
17
- }
18
- export interface IDatasource {
19
- id: string;
20
- filter?: IFilter[];
21
- outputs: IOutput[];
22
- }
23
- export interface IWorkunitDatasource extends IDatasource {
24
- WUID: boolean;
25
- }
26
- export declare function isWorkunitDatasource(ref: IAnyDatasource): ref is IWorkunitDatasource;
27
- export interface IDatabombDatasource extends IDatasource {
28
- databomb: true;
29
- }
30
- export declare function isDatabombDatasource(ref: IAnyDatasource): ref is IDatabombDatasource;
31
- export interface IHipieDatasource extends IDatasource {
32
- URL: string;
33
- }
34
- export declare function isHipieDatasource(ref: IAnyDatasource): ref is IHipieDatasource;
35
- export declare type IAnyDatasource = IWorkunitDatasource | IDatabombDatasource | IHipieDatasource;
36
- export interface IEventUpdate {
37
- visualization: string;
38
- instance?: string;
39
- datasource: string;
40
- col?: string;
41
- merge: boolean;
42
- mappings?: StringStringDict;
43
- }
44
- export interface IEvent {
45
- mappings?: StringStringDict;
46
- updates: IEventUpdate[];
47
- }
48
- export interface IPieMapping {
49
- label: string;
50
- weight: string;
51
- }
52
- export interface ILineMapping {
53
- x: string[];
54
- y: string[];
55
- }
56
- export interface ITableMapping {
57
- value: string[];
58
- }
59
- export interface IChoroMapping {
60
- weight: string | string[];
61
- }
62
- export interface IChoroUSStateMapping extends IChoroMapping {
63
- state: string;
64
- }
65
- export interface IChoroUSCountyMapping extends IChoroMapping {
66
- county: string;
67
- }
68
- export interface IChoroGeohashMapping extends IChoroMapping {
69
- geohash: string;
70
- }
71
- export interface IGraphMapping {
72
- uid: string;
73
- label: string;
74
- weight: string;
75
- flags: string;
76
- }
77
- export interface IGraphLinkMapping {
78
- uid: string;
79
- }
80
- export interface IHeatMapMapping {
81
- x: string;
82
- y: string;
83
- weight: string;
84
- }
85
- export interface ISliderMapping {
86
- label: string;
87
- }
88
- export interface ISource {
89
- id: string;
90
- output: string;
91
- sort?: string[];
92
- first?: string | number;
93
- reverse?: boolean;
94
- properties?: StringStringDict;
95
- }
96
- export interface IPieSource extends ISource {
97
- mappings: IPieMapping;
98
- }
99
- export interface ILineSource extends ISource {
100
- mappings: ILineMapping;
101
- }
102
- export interface ITableSource extends ISource {
103
- mappings: ITableMapping;
104
- }
105
- export interface IGraphLink {
106
- mappings: IGraphLinkMapping;
107
- childfile: string;
108
- }
109
- export interface IGraphSource extends ISource {
110
- mappings: IGraphMapping;
111
- link: IGraphLink;
112
- }
113
- export interface IHeatMapSource extends ISource {
114
- mappings: IHeatMapMapping;
115
- }
116
- export interface IChoroSource extends ISource {
117
- mappings: IAnyChoroMapping;
118
- }
119
- export interface ISliderSource extends ISource {
120
- mappings: ISliderMapping;
121
- }
122
- export declare type VisualizationType = "PIE" | "LINE" | "BAR" | "TABLE" | "CHORO" | "GRAPH" | "HEAT_MAP" | "SLIDER" | "SUMMARY" | "FORM" | "2DCHART" | "WORD_CLOUD" | "BUBBLE";
123
- export declare type VisualizationFieldDataType = "bool" | "boolean" | "integer" | "integer4" | "integer8" | "unsigned" | "unsigned4" | "unsigned8" | "float" | "double" | "real" | "real4" | "real8" | "string" | "date" | "time" | "geohash" | "dataset" | "visualization";
124
- export declare type VisualizationFieldType = VisualizationFieldDataType | "range";
125
- export declare type VisualizationFieldFuncitonType = "SUM" | "AVE" | "MIN" | "MAX" | "SCALE";
126
- export interface IVisualizationField {
127
- id: string;
128
- properties: {
129
- label?: string;
130
- datatype: VisualizationFieldDataType;
131
- default?: any[];
132
- function?: VisualizationFieldFuncitonType;
133
- params?: {
134
- param1: string;
135
- param2: string;
136
- };
137
- type: VisualizationFieldType;
138
- };
139
- }
140
- export interface IVisualization {
141
- id: string;
142
- title?: string;
143
- type: VisualizationType;
144
- fields?: IVisualizationField[];
145
- properties?: {
146
- charttype?: string;
147
- [key: string]: any;
148
- };
149
- events?: {
150
- [key: string]: IEvent;
151
- };
152
- onSelect?: any;
153
- color?: any;
154
- }
155
- export interface IPieVisualization extends IVisualization {
156
- type: "PIE" | "BAR";
157
- source: IPieSource;
158
- }
159
- export declare function isPieVisualization(viz: IAnyVisualization): viz is IPieVisualization;
160
- export interface ILineVisualization extends IVisualization {
161
- type: "LINE";
162
- source: ILineSource;
163
- }
164
- export declare function isLineVisualization(viz: IAnyVisualization): viz is ILineVisualization;
165
- export declare type ChoroColor = "default" | "YlGn" | "YlGnBu" | "GnBu" | "BuGn" | "PuBuGn" | "PuBu" | "BuPu" | "RdPu" | "PuRd" | "OrRd" | "YlOrRd" | "YlOrBr" | "Purples" | "Blues" | "Greens" | "Oranges" | "Reds" | "Greys" | "PuOr" | "BrBG" | "PRGn" | "PiYG" | "RdBu" | "RdGy" | "RdYlBu" | "Spectral" | "RdYlGn" | "RdWhGr";
166
- export interface IChoroVisualization extends IVisualization {
167
- type: "CHORO";
168
- source: IChoroSource;
169
- visualizations?: IChoroVisualization[];
170
- color?: ChoroColor;
171
- }
172
- export declare function isChoroVisualization(viz: IAnyVisualization): viz is IChoroVisualization;
173
- export interface ITableVisualization extends IVisualization {
174
- type: "TABLE";
175
- label: string[];
176
- source: ITableSource;
177
- }
178
- export declare function isTableVisualization(viz: IAnyVisualization): viz is ITableVisualization;
179
- export interface ISliderVisualization extends IVisualization {
180
- type: "SLIDER";
181
- source: ISliderSource;
182
- range?: number[];
183
- }
184
- export declare function isSliderVisualization(viz: IAnyVisualization): viz is ISliderVisualization;
185
- export interface IIcon {
186
- [id: string]: string | number | boolean;
187
- }
188
- export declare type IValueMappings = {
189
- [key: string]: IIcon;
190
- };
191
- export interface IVisualizationIcon {
192
- fieldid?: string;
193
- faChar?: string;
194
- valuemappings?: IValueMappings;
195
- }
196
- export interface IGraphVisualization extends IVisualization {
197
- type: "GRAPH";
198
- source: IGraphSource;
199
- label: string[];
200
- icon: IVisualizationIcon;
201
- flag: IVisualizationIcon[];
202
- }
203
- export declare function isGraphVisualization(viz: IAnyVisualization): viz is IGraphVisualization;
204
- export interface IHeatMapVisualization extends IVisualization {
205
- type: "HEAT_MAP";
206
- source: IHeatMapSource;
207
- }
208
- export declare function isHeatMapVisualization(viz: IAnyVisualization): viz is IHeatMapVisualization;
209
- export interface IFormVisualization extends IVisualization {
210
- type: "FORM";
211
- }
212
- export declare function isFormVisualization(viz: IAnyVisualization): viz is IFormVisualization;
213
- export interface IDashboard {
214
- id?: string;
215
- title?: string;
216
- enable?: string;
217
- label?: string;
218
- primary?: boolean;
219
- visualizations: IAnyVisualization[];
220
- }
221
- export interface IDDL {
222
- dashboards: IDashboard[];
223
- datasources: IAnyDatasource[];
224
- hipieversion: string;
225
- visualizationversion: string;
226
- }
227
- export declare type DDLSchema = IDDL;
228
- export declare type IAnyChoroMapping = IChoroUSStateMapping | IChoroUSCountyMapping | IChoroGeohashMapping;
229
- export declare function isUSStateMapping(mappings: IAnyChoroMapping): boolean;
230
- export declare function isUSCountyMapping(mappings: IAnyChoroMapping): boolean;
231
- export declare function isGeohashMapping(mappings: IAnyChoroMapping): boolean;
232
- export declare type IAnyMapping = IPieMapping | ILineMapping | IGraphMapping | IAnyChoroMapping | ITableMapping | IHeatMapMapping;
233
- export declare type IAnySource = IPieSource | ILineSource | ITableSource | IChoroSource | IGraphSource | IHeatMapSource;
234
- export declare type IAnyVisualization = IPieVisualization | ILineVisualization | ITableVisualization | IChoroVisualization | IGraphVisualization | IHeatMapVisualization | ISliderVisualization | IFormVisualization;
1
+ export declare type StringStringDict = {
2
+ [key: string]: string;
3
+ };
4
+ export declare type IFilterRule = "==" | "!=" | "<" | "<=" | ">" | ">=" | "set" | "notequals";
5
+ export interface IFilter {
6
+ fieldid: string;
7
+ nullable: boolean;
8
+ rule: IFilterRule;
9
+ minid?: string;
10
+ maxid?: string;
11
+ }
12
+ export interface IOutput {
13
+ id: string;
14
+ from?: string;
15
+ filter?: IFilter[];
16
+ notify?: string[];
17
+ }
18
+ export interface IDatasource {
19
+ id: string;
20
+ filter?: IFilter[];
21
+ outputs: IOutput[];
22
+ }
23
+ export interface IWorkunitDatasource extends IDatasource {
24
+ WUID: boolean;
25
+ }
26
+ export declare function isWorkunitDatasource(ref: IAnyDatasource): ref is IWorkunitDatasource;
27
+ export interface IDatabombDatasource extends IDatasource {
28
+ databomb: true;
29
+ }
30
+ export declare function isDatabombDatasource(ref: IAnyDatasource): ref is IDatabombDatasource;
31
+ export interface IHipieDatasource extends IDatasource {
32
+ URL: string;
33
+ }
34
+ export declare function isHipieDatasource(ref: IAnyDatasource): ref is IHipieDatasource;
35
+ export declare type IAnyDatasource = IWorkunitDatasource | IDatabombDatasource | IHipieDatasource;
36
+ export interface IEventUpdate {
37
+ visualization: string;
38
+ instance?: string;
39
+ datasource: string;
40
+ col?: string;
41
+ merge: boolean;
42
+ mappings?: StringStringDict;
43
+ }
44
+ export interface IEvent {
45
+ mappings?: StringStringDict;
46
+ updates: IEventUpdate[];
47
+ }
48
+ export interface IPieMapping {
49
+ label: string;
50
+ weight: string;
51
+ }
52
+ export interface ILineMapping {
53
+ x: string[];
54
+ y: string[];
55
+ }
56
+ export interface ITableMapping {
57
+ value: string[];
58
+ }
59
+ export interface IChoroMapping {
60
+ weight: string | string[];
61
+ }
62
+ export interface IChoroUSStateMapping extends IChoroMapping {
63
+ state: string;
64
+ }
65
+ export interface IChoroUSCountyMapping extends IChoroMapping {
66
+ county: string;
67
+ }
68
+ export interface IChoroGeohashMapping extends IChoroMapping {
69
+ geohash: string;
70
+ }
71
+ export interface IGraphMapping {
72
+ uid: string;
73
+ label: string;
74
+ weight: string;
75
+ flags: string;
76
+ }
77
+ export interface IGraphLinkMapping {
78
+ uid: string;
79
+ }
80
+ export interface IHeatMapMapping {
81
+ x: string;
82
+ y: string;
83
+ weight: string;
84
+ }
85
+ export interface ISliderMapping {
86
+ label: string;
87
+ }
88
+ export interface ISource {
89
+ id: string;
90
+ output: string;
91
+ sort?: string[];
92
+ first?: string | number;
93
+ reverse?: boolean;
94
+ properties?: StringStringDict;
95
+ }
96
+ export interface IPieSource extends ISource {
97
+ mappings: IPieMapping;
98
+ }
99
+ export interface ILineSource extends ISource {
100
+ mappings: ILineMapping;
101
+ }
102
+ export interface ITableSource extends ISource {
103
+ mappings: ITableMapping;
104
+ }
105
+ export interface IGraphLink {
106
+ mappings: IGraphLinkMapping;
107
+ childfile: string;
108
+ }
109
+ export interface IGraphSource extends ISource {
110
+ mappings: IGraphMapping;
111
+ link: IGraphLink;
112
+ }
113
+ export interface IHeatMapSource extends ISource {
114
+ mappings: IHeatMapMapping;
115
+ }
116
+ export interface IChoroSource extends ISource {
117
+ mappings: IAnyChoroMapping;
118
+ }
119
+ export interface ISliderSource extends ISource {
120
+ mappings: ISliderMapping;
121
+ }
122
+ export declare type VisualizationType = "PIE" | "LINE" | "BAR" | "TABLE" | "CHORO" | "GRAPH" | "HEAT_MAP" | "SLIDER" | "SUMMARY" | "FORM" | "2DCHART" | "WORD_CLOUD" | "BUBBLE";
123
+ export declare type VisualizationFieldDataType = "bool" | "boolean" | "integer" | "integer4" | "integer8" | "unsigned" | "unsigned4" | "unsigned8" | "float" | "double" | "real" | "real4" | "real8" | "string" | "date" | "time" | "geohash" | "dataset" | "visualization";
124
+ export declare type VisualizationFieldType = VisualizationFieldDataType | "range";
125
+ export declare type VisualizationFieldFuncitonType = "SUM" | "AVE" | "MIN" | "MAX" | "SCALE";
126
+ export interface IVisualizationField {
127
+ id: string;
128
+ properties: {
129
+ label?: string;
130
+ datatype: VisualizationFieldDataType;
131
+ default?: any[];
132
+ function?: VisualizationFieldFuncitonType;
133
+ params?: {
134
+ param1: string;
135
+ param2: string;
136
+ };
137
+ type: VisualizationFieldType;
138
+ };
139
+ }
140
+ export interface IVisualization {
141
+ id: string;
142
+ title?: string;
143
+ type: VisualizationType;
144
+ fields?: IVisualizationField[];
145
+ properties?: {
146
+ charttype?: string;
147
+ [key: string]: any;
148
+ };
149
+ events?: {
150
+ [key: string]: IEvent;
151
+ };
152
+ onSelect?: any;
153
+ color?: any;
154
+ }
155
+ export interface IPieVisualization extends IVisualization {
156
+ type: "PIE" | "BAR";
157
+ source: IPieSource;
158
+ }
159
+ export declare function isPieVisualization(viz: IAnyVisualization): viz is IPieVisualization;
160
+ export interface ILineVisualization extends IVisualization {
161
+ type: "LINE";
162
+ source: ILineSource;
163
+ }
164
+ export declare function isLineVisualization(viz: IAnyVisualization): viz is ILineVisualization;
165
+ export declare type ChoroColor = "default" | "YlGn" | "YlGnBu" | "GnBu" | "BuGn" | "PuBuGn" | "PuBu" | "BuPu" | "RdPu" | "PuRd" | "OrRd" | "YlOrRd" | "YlOrBr" | "Purples" | "Blues" | "Greens" | "Oranges" | "Reds" | "Greys" | "PuOr" | "BrBG" | "PRGn" | "PiYG" | "RdBu" | "RdGy" | "RdYlBu" | "Spectral" | "RdYlGn" | "RdWhGr";
166
+ export interface IChoroVisualization extends IVisualization {
167
+ type: "CHORO";
168
+ source: IChoroSource;
169
+ visualizations?: IChoroVisualization[];
170
+ color?: ChoroColor;
171
+ }
172
+ export declare function isChoroVisualization(viz: IAnyVisualization): viz is IChoroVisualization;
173
+ export interface ITableVisualization extends IVisualization {
174
+ type: "TABLE";
175
+ label: string[];
176
+ source: ITableSource;
177
+ }
178
+ export declare function isTableVisualization(viz: IAnyVisualization): viz is ITableVisualization;
179
+ export interface ISliderVisualization extends IVisualization {
180
+ type: "SLIDER";
181
+ source: ISliderSource;
182
+ range?: number[];
183
+ }
184
+ export declare function isSliderVisualization(viz: IAnyVisualization): viz is ISliderVisualization;
185
+ export interface IIcon {
186
+ [id: string]: string | number | boolean;
187
+ }
188
+ export declare type IValueMappings = {
189
+ [key: string]: IIcon;
190
+ };
191
+ export interface IVisualizationIcon {
192
+ fieldid?: string;
193
+ faChar?: string;
194
+ valuemappings?: IValueMappings;
195
+ }
196
+ export interface IGraphVisualization extends IVisualization {
197
+ type: "GRAPH";
198
+ source: IGraphSource;
199
+ label: string[];
200
+ icon: IVisualizationIcon;
201
+ flag: IVisualizationIcon[];
202
+ }
203
+ export declare function isGraphVisualization(viz: IAnyVisualization): viz is IGraphVisualization;
204
+ export interface IHeatMapVisualization extends IVisualization {
205
+ type: "HEAT_MAP";
206
+ source: IHeatMapSource;
207
+ }
208
+ export declare function isHeatMapVisualization(viz: IAnyVisualization): viz is IHeatMapVisualization;
209
+ export interface IFormVisualization extends IVisualization {
210
+ type: "FORM";
211
+ }
212
+ export declare function isFormVisualization(viz: IAnyVisualization): viz is IFormVisualization;
213
+ export interface IDashboard {
214
+ id?: string;
215
+ title?: string;
216
+ enable?: string;
217
+ label?: string;
218
+ primary?: boolean;
219
+ visualizations: IAnyVisualization[];
220
+ }
221
+ export interface IDDL {
222
+ dashboards: IDashboard[];
223
+ datasources: IAnyDatasource[];
224
+ hipieversion: string;
225
+ visualizationversion: string;
226
+ }
227
+ export declare type DDLSchema = IDDL;
228
+ export declare type IAnyChoroMapping = IChoroUSStateMapping | IChoroUSCountyMapping | IChoroGeohashMapping;
229
+ export declare function isUSStateMapping(mappings: IAnyChoroMapping): boolean;
230
+ export declare function isUSCountyMapping(mappings: IAnyChoroMapping): boolean;
231
+ export declare function isGeohashMapping(mappings: IAnyChoroMapping): boolean;
232
+ export declare type IAnyMapping = IPieMapping | ILineMapping | IGraphMapping | IAnyChoroMapping | ITableMapping | IHeatMapMapping;
233
+ export declare type IAnySource = IPieSource | ILineSource | ITableSource | IChoroSource | IGraphSource | IHeatMapSource;
234
+ export declare type IAnyVisualization = IPieVisualization | ILineVisualization | ITableVisualization | IChoroVisualization | IGraphVisualization | IHeatMapVisualization | ISliderVisualization | IFormVisualization;
235
235
  //# sourceMappingURL=v1.d.ts.map