@adminforth/dashboard 1.0.0 → 1.1.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 +116 -54
- package/custom/api/dashboardApi.ts +9 -0
- package/custom/model/dashboard.types.ts +158 -1
- package/custom/queries/useWidgetData.ts +8 -4
- package/custom/runtime/WidgetShell.vue +8 -4
- package/custom/widgets/chart/chart.utils.ts +2 -2
- package/custom/widgets/gauge-card/GaugeCardWidget.vue +94 -12
- package/custom/widgets/pivot-table/PivotTableWidget.vue +27 -5
- package/custom/widgets/table/TableWidget.vue +155 -30
- package/dist/custom/api/dashboardApi.d.ts +7 -1
- package/dist/custom/api/dashboardApi.js +4 -6
- package/dist/custom/api/dashboardApi.ts +9 -0
- package/dist/custom/model/dashboard.types.d.ts +45 -0
- package/dist/custom/model/dashboard.types.js +82 -1
- package/dist/custom/model/dashboard.types.ts +158 -1
- package/dist/custom/queries/useDashboardConfig.d.ts +42 -0
- package/dist/custom/queries/useWidgetData.d.ts +44 -1
- package/dist/custom/queries/useWidgetData.js +3 -3
- package/dist/custom/queries/useWidgetData.ts +8 -4
- package/dist/custom/runtime/WidgetShell.vue +8 -4
- package/dist/custom/widgets/chart/chart.utils.d.ts +1 -1
- package/dist/custom/widgets/chart/chart.utils.js +2 -2
- package/dist/custom/widgets/chart/chart.utils.ts +2 -2
- package/dist/custom/widgets/gauge-card/GaugeCardWidget.vue +94 -12
- package/dist/custom/widgets/pivot-table/PivotTableWidget.vue +27 -5
- package/dist/custom/widgets/table/TableWidget.vue +155 -30
- package/dist/endpoint/widgets.d.ts +6 -1
- package/dist/endpoint/widgets.js +22 -4
- package/dist/schema/api.d.ts +882 -212
- package/dist/schema/api.js +11 -2
- package/dist/schema/widget.d.ts +542 -4
- package/dist/schema/widget.js +111 -1
- package/dist/services/widgetConfigValidator.js +32 -6
- package/dist/services/widgetDataService.d.ts +8 -6
- package/dist/services/widgetDataService.js +133 -11
- package/endpoint/widgets.ts +31 -4
- package/package.json +1 -1
- package/schema/api.ts +11 -1
- package/schema/widget.ts +114 -1
- package/services/widgetConfigValidator.ts +45 -6
- package/services/widgetDataService.ts +201 -19
package/dist/schema/widget.d.ts
CHANGED
|
@@ -3,6 +3,112 @@ export type DashboardWidgetConfigValidationError = {
|
|
|
3
3
|
field: string;
|
|
4
4
|
message: string;
|
|
5
5
|
};
|
|
6
|
+
export declare const AggregationOperationZodSchema: z.ZodEnum<{
|
|
7
|
+
sum: "sum";
|
|
8
|
+
count: "count";
|
|
9
|
+
avg: "avg";
|
|
10
|
+
min: "min";
|
|
11
|
+
max: "max";
|
|
12
|
+
median: "median";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const AggregationRuleZodSchema: z.ZodObject<{
|
|
15
|
+
operation: z.ZodEnum<{
|
|
16
|
+
sum: "sum";
|
|
17
|
+
count: "count";
|
|
18
|
+
avg: "avg";
|
|
19
|
+
min: "min";
|
|
20
|
+
max: "max";
|
|
21
|
+
median: "median";
|
|
22
|
+
}>;
|
|
23
|
+
field: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const GroupByRuleZodSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"field">;
|
|
27
|
+
field: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
30
|
+
field: z.ZodString;
|
|
31
|
+
truncation: z.ZodEnum<{
|
|
32
|
+
day: "day";
|
|
33
|
+
week: "week";
|
|
34
|
+
month: "month";
|
|
35
|
+
year: "year";
|
|
36
|
+
}>;
|
|
37
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>], "type">;
|
|
39
|
+
export declare const AggregateDataSourceZodSchema: z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"aggregate">;
|
|
41
|
+
resourceId: z.ZodString;
|
|
42
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
43
|
+
operation: z.ZodEnum<{
|
|
44
|
+
sum: "sum";
|
|
45
|
+
count: "count";
|
|
46
|
+
avg: "avg";
|
|
47
|
+
min: "min";
|
|
48
|
+
max: "max";
|
|
49
|
+
median: "median";
|
|
50
|
+
}>;
|
|
51
|
+
field: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"field">;
|
|
55
|
+
field: z.ZodString;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
58
|
+
field: z.ZodString;
|
|
59
|
+
truncation: z.ZodEnum<{
|
|
60
|
+
day: "day";
|
|
61
|
+
week: "week";
|
|
62
|
+
month: "month";
|
|
63
|
+
year: "year";
|
|
64
|
+
}>;
|
|
65
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>], "type">>;
|
|
67
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export declare const ResourceDataSourceZodSchema: z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"resource">;
|
|
71
|
+
resourceId: z.ZodString;
|
|
72
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
74
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export declare const WidgetDataSourceZodSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"resource">;
|
|
78
|
+
resourceId: z.ZodString;
|
|
79
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
81
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"aggregate">;
|
|
84
|
+
resourceId: z.ZodString;
|
|
85
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
86
|
+
operation: z.ZodEnum<{
|
|
87
|
+
sum: "sum";
|
|
88
|
+
count: "count";
|
|
89
|
+
avg: "avg";
|
|
90
|
+
min: "min";
|
|
91
|
+
max: "max";
|
|
92
|
+
median: "median";
|
|
93
|
+
}>;
|
|
94
|
+
field: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<"field">;
|
|
98
|
+
field: z.ZodString;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
101
|
+
field: z.ZodString;
|
|
102
|
+
truncation: z.ZodEnum<{
|
|
103
|
+
day: "day";
|
|
104
|
+
week: "week";
|
|
105
|
+
month: "month";
|
|
106
|
+
year: "year";
|
|
107
|
+
}>;
|
|
108
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>], "type">>;
|
|
110
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
111
|
+
}, z.core.$strict>], "type">;
|
|
6
112
|
export declare const ChartConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
113
|
title: z.ZodOptional<z.ZodString>;
|
|
8
114
|
type: z.ZodLiteral<"line">;
|
|
@@ -85,6 +191,42 @@ export declare const EmptyWidgetConfigSchema: z.ZodObject<{
|
|
|
85
191
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
86
192
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
87
193
|
order: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
195
|
+
type: z.ZodLiteral<"resource">;
|
|
196
|
+
resourceId: z.ZodString;
|
|
197
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
198
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
199
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
200
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"aggregate">;
|
|
202
|
+
resourceId: z.ZodString;
|
|
203
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
204
|
+
operation: z.ZodEnum<{
|
|
205
|
+
sum: "sum";
|
|
206
|
+
count: "count";
|
|
207
|
+
avg: "avg";
|
|
208
|
+
min: "min";
|
|
209
|
+
max: "max";
|
|
210
|
+
median: "median";
|
|
211
|
+
}>;
|
|
212
|
+
field: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
215
|
+
type: z.ZodLiteral<"field">;
|
|
216
|
+
field: z.ZodString;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
219
|
+
field: z.ZodString;
|
|
220
|
+
truncation: z.ZodEnum<{
|
|
221
|
+
day: "day";
|
|
222
|
+
week: "week";
|
|
223
|
+
month: "month";
|
|
224
|
+
year: "year";
|
|
225
|
+
}>;
|
|
226
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
227
|
+
}, z.core.$strip>], "type">>;
|
|
228
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
229
|
+
}, z.core.$strict>], "type">>;
|
|
88
230
|
target: z.ZodLiteral<"empty">;
|
|
89
231
|
}, z.core.$strip>;
|
|
90
232
|
export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -103,6 +245,42 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
103
245
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
104
246
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
105
247
|
order: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"resource">;
|
|
250
|
+
resourceId: z.ZodString;
|
|
251
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
253
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
255
|
+
type: z.ZodLiteral<"aggregate">;
|
|
256
|
+
resourceId: z.ZodString;
|
|
257
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
258
|
+
operation: z.ZodEnum<{
|
|
259
|
+
sum: "sum";
|
|
260
|
+
count: "count";
|
|
261
|
+
avg: "avg";
|
|
262
|
+
min: "min";
|
|
263
|
+
max: "max";
|
|
264
|
+
median: "median";
|
|
265
|
+
}>;
|
|
266
|
+
field: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
269
|
+
type: z.ZodLiteral<"field">;
|
|
270
|
+
field: z.ZodString;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
273
|
+
field: z.ZodString;
|
|
274
|
+
truncation: z.ZodEnum<{
|
|
275
|
+
day: "day";
|
|
276
|
+
week: "week";
|
|
277
|
+
month: "month";
|
|
278
|
+
year: "year";
|
|
279
|
+
}>;
|
|
280
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
281
|
+
}, z.core.$strip>], "type">>;
|
|
282
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
283
|
+
}, z.core.$strict>], "type">>;
|
|
106
284
|
target: z.ZodLiteral<"table">;
|
|
107
285
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
108
286
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -133,6 +311,42 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
133
311
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
134
312
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
135
313
|
order: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
315
|
+
type: z.ZodLiteral<"resource">;
|
|
316
|
+
resourceId: z.ZodString;
|
|
317
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
318
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
319
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
320
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
321
|
+
type: z.ZodLiteral<"aggregate">;
|
|
322
|
+
resourceId: z.ZodString;
|
|
323
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
324
|
+
operation: z.ZodEnum<{
|
|
325
|
+
sum: "sum";
|
|
326
|
+
count: "count";
|
|
327
|
+
avg: "avg";
|
|
328
|
+
min: "min";
|
|
329
|
+
max: "max";
|
|
330
|
+
median: "median";
|
|
331
|
+
}>;
|
|
332
|
+
field: z.ZodOptional<z.ZodString>;
|
|
333
|
+
}, z.core.$strip>>;
|
|
334
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
335
|
+
type: z.ZodLiteral<"field">;
|
|
336
|
+
field: z.ZodString;
|
|
337
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
339
|
+
field: z.ZodString;
|
|
340
|
+
truncation: z.ZodEnum<{
|
|
341
|
+
day: "day";
|
|
342
|
+
week: "week";
|
|
343
|
+
month: "month";
|
|
344
|
+
year: "year";
|
|
345
|
+
}>;
|
|
346
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
347
|
+
}, z.core.$strip>], "type">>;
|
|
348
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
349
|
+
}, z.core.$strict>], "type">>;
|
|
136
350
|
target: z.ZodLiteral<"chart">;
|
|
137
351
|
chart: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
138
352
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -188,7 +402,7 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
188
402
|
value_field: z.ZodOptional<z.ZodString>;
|
|
189
403
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
404
|
}, z.core.$strip>], "type">;
|
|
191
|
-
query: z.ZodObject<{
|
|
405
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
192
406
|
resource: z.ZodString;
|
|
193
407
|
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
408
|
order: z.ZodOptional<z.ZodObject<{
|
|
@@ -199,7 +413,7 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
199
413
|
}>;
|
|
200
414
|
}, z.core.$strip>>;
|
|
201
415
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
202
|
-
}, z.core.$strip
|
|
416
|
+
}, z.core.$strip>>;
|
|
203
417
|
}, z.core.$strip>, z.ZodObject<{
|
|
204
418
|
id: z.ZodOptional<z.ZodString>;
|
|
205
419
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -216,6 +430,42 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
216
430
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
217
431
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
218
432
|
order: z.ZodOptional<z.ZodNumber>;
|
|
433
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
434
|
+
type: z.ZodLiteral<"resource">;
|
|
435
|
+
resourceId: z.ZodString;
|
|
436
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
437
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
438
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
439
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
440
|
+
type: z.ZodLiteral<"aggregate">;
|
|
441
|
+
resourceId: z.ZodString;
|
|
442
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
443
|
+
operation: z.ZodEnum<{
|
|
444
|
+
sum: "sum";
|
|
445
|
+
count: "count";
|
|
446
|
+
avg: "avg";
|
|
447
|
+
min: "min";
|
|
448
|
+
max: "max";
|
|
449
|
+
median: "median";
|
|
450
|
+
}>;
|
|
451
|
+
field: z.ZodOptional<z.ZodString>;
|
|
452
|
+
}, z.core.$strip>>;
|
|
453
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
454
|
+
type: z.ZodLiteral<"field">;
|
|
455
|
+
field: z.ZodString;
|
|
456
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
457
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
458
|
+
field: z.ZodString;
|
|
459
|
+
truncation: z.ZodEnum<{
|
|
460
|
+
day: "day";
|
|
461
|
+
week: "week";
|
|
462
|
+
month: "month";
|
|
463
|
+
year: "year";
|
|
464
|
+
}>;
|
|
465
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
466
|
+
}, z.core.$strip>], "type">>;
|
|
467
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
468
|
+
}, z.core.$strict>], "type">>;
|
|
219
469
|
target: z.ZodLiteral<"kpi_card">;
|
|
220
470
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
221
471
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -246,6 +496,42 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
246
496
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
247
497
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
248
498
|
order: z.ZodOptional<z.ZodNumber>;
|
|
499
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
500
|
+
type: z.ZodLiteral<"resource">;
|
|
501
|
+
resourceId: z.ZodString;
|
|
502
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
503
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
504
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
505
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
506
|
+
type: z.ZodLiteral<"aggregate">;
|
|
507
|
+
resourceId: z.ZodString;
|
|
508
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
509
|
+
operation: z.ZodEnum<{
|
|
510
|
+
sum: "sum";
|
|
511
|
+
count: "count";
|
|
512
|
+
avg: "avg";
|
|
513
|
+
min: "min";
|
|
514
|
+
max: "max";
|
|
515
|
+
median: "median";
|
|
516
|
+
}>;
|
|
517
|
+
field: z.ZodOptional<z.ZodString>;
|
|
518
|
+
}, z.core.$strip>>;
|
|
519
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
520
|
+
type: z.ZodLiteral<"field">;
|
|
521
|
+
field: z.ZodString;
|
|
522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
523
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
524
|
+
field: z.ZodString;
|
|
525
|
+
truncation: z.ZodEnum<{
|
|
526
|
+
day: "day";
|
|
527
|
+
week: "week";
|
|
528
|
+
month: "month";
|
|
529
|
+
year: "year";
|
|
530
|
+
}>;
|
|
531
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
532
|
+
}, z.core.$strip>], "type">>;
|
|
533
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
534
|
+
}, z.core.$strict>], "type">>;
|
|
249
535
|
target: z.ZodLiteral<"gauge_card">;
|
|
250
536
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
251
537
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -276,6 +562,42 @@ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
276
562
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
277
563
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
278
564
|
order: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
566
|
+
type: z.ZodLiteral<"resource">;
|
|
567
|
+
resourceId: z.ZodString;
|
|
568
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
569
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
570
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
type: z.ZodLiteral<"aggregate">;
|
|
573
|
+
resourceId: z.ZodString;
|
|
574
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
575
|
+
operation: z.ZodEnum<{
|
|
576
|
+
sum: "sum";
|
|
577
|
+
count: "count";
|
|
578
|
+
avg: "avg";
|
|
579
|
+
min: "min";
|
|
580
|
+
max: "max";
|
|
581
|
+
median: "median";
|
|
582
|
+
}>;
|
|
583
|
+
field: z.ZodOptional<z.ZodString>;
|
|
584
|
+
}, z.core.$strip>>;
|
|
585
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
586
|
+
type: z.ZodLiteral<"field">;
|
|
587
|
+
field: z.ZodString;
|
|
588
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
589
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
590
|
+
field: z.ZodString;
|
|
591
|
+
truncation: z.ZodEnum<{
|
|
592
|
+
day: "day";
|
|
593
|
+
week: "week";
|
|
594
|
+
month: "month";
|
|
595
|
+
year: "year";
|
|
596
|
+
}>;
|
|
597
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
598
|
+
}, z.core.$strip>], "type">>;
|
|
599
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
600
|
+
}, z.core.$strict>], "type">>;
|
|
279
601
|
target: z.ZodLiteral<"pivot_table">;
|
|
280
602
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
281
603
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -307,6 +629,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
307
629
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
308
630
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
309
631
|
order: z.ZodOptional<z.ZodNumber>;
|
|
632
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
633
|
+
type: z.ZodLiteral<"resource">;
|
|
634
|
+
resourceId: z.ZodString;
|
|
635
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
636
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
637
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
638
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
639
|
+
type: z.ZodLiteral<"aggregate">;
|
|
640
|
+
resourceId: z.ZodString;
|
|
641
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
642
|
+
operation: z.ZodEnum<{
|
|
643
|
+
sum: "sum";
|
|
644
|
+
count: "count";
|
|
645
|
+
avg: "avg";
|
|
646
|
+
min: "min";
|
|
647
|
+
max: "max";
|
|
648
|
+
median: "median";
|
|
649
|
+
}>;
|
|
650
|
+
field: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
653
|
+
type: z.ZodLiteral<"field">;
|
|
654
|
+
field: z.ZodString;
|
|
655
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
656
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
657
|
+
field: z.ZodString;
|
|
658
|
+
truncation: z.ZodEnum<{
|
|
659
|
+
day: "day";
|
|
660
|
+
week: "week";
|
|
661
|
+
month: "month";
|
|
662
|
+
year: "year";
|
|
663
|
+
}>;
|
|
664
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
665
|
+
}, z.core.$strip>], "type">>;
|
|
666
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
667
|
+
}, z.core.$strict>], "type">>;
|
|
310
668
|
target: z.ZodLiteral<"empty">;
|
|
311
669
|
}, z.core.$strip>, z.ZodObject<{
|
|
312
670
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -324,6 +682,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
324
682
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
325
683
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
326
684
|
order: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
686
|
+
type: z.ZodLiteral<"resource">;
|
|
687
|
+
resourceId: z.ZodString;
|
|
688
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
689
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
690
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
691
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
692
|
+
type: z.ZodLiteral<"aggregate">;
|
|
693
|
+
resourceId: z.ZodString;
|
|
694
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
695
|
+
operation: z.ZodEnum<{
|
|
696
|
+
sum: "sum";
|
|
697
|
+
count: "count";
|
|
698
|
+
avg: "avg";
|
|
699
|
+
min: "min";
|
|
700
|
+
max: "max";
|
|
701
|
+
median: "median";
|
|
702
|
+
}>;
|
|
703
|
+
field: z.ZodOptional<z.ZodString>;
|
|
704
|
+
}, z.core.$strip>>;
|
|
705
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
706
|
+
type: z.ZodLiteral<"field">;
|
|
707
|
+
field: z.ZodString;
|
|
708
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
709
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
710
|
+
field: z.ZodString;
|
|
711
|
+
truncation: z.ZodEnum<{
|
|
712
|
+
day: "day";
|
|
713
|
+
week: "week";
|
|
714
|
+
month: "month";
|
|
715
|
+
year: "year";
|
|
716
|
+
}>;
|
|
717
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
718
|
+
}, z.core.$strip>], "type">>;
|
|
719
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
720
|
+
}, z.core.$strict>], "type">>;
|
|
327
721
|
target: z.ZodLiteral<"table">;
|
|
328
722
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
329
723
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -354,6 +748,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
354
748
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
355
749
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
356
750
|
order: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
752
|
+
type: z.ZodLiteral<"resource">;
|
|
753
|
+
resourceId: z.ZodString;
|
|
754
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
755
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
756
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
757
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
758
|
+
type: z.ZodLiteral<"aggregate">;
|
|
759
|
+
resourceId: z.ZodString;
|
|
760
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
761
|
+
operation: z.ZodEnum<{
|
|
762
|
+
sum: "sum";
|
|
763
|
+
count: "count";
|
|
764
|
+
avg: "avg";
|
|
765
|
+
min: "min";
|
|
766
|
+
max: "max";
|
|
767
|
+
median: "median";
|
|
768
|
+
}>;
|
|
769
|
+
field: z.ZodOptional<z.ZodString>;
|
|
770
|
+
}, z.core.$strip>>;
|
|
771
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
772
|
+
type: z.ZodLiteral<"field">;
|
|
773
|
+
field: z.ZodString;
|
|
774
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
775
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
776
|
+
field: z.ZodString;
|
|
777
|
+
truncation: z.ZodEnum<{
|
|
778
|
+
day: "day";
|
|
779
|
+
week: "week";
|
|
780
|
+
month: "month";
|
|
781
|
+
year: "year";
|
|
782
|
+
}>;
|
|
783
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
784
|
+
}, z.core.$strip>], "type">>;
|
|
785
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
786
|
+
}, z.core.$strict>], "type">>;
|
|
357
787
|
target: z.ZodLiteral<"chart">;
|
|
358
788
|
chart: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
359
789
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -409,7 +839,7 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
409
839
|
value_field: z.ZodOptional<z.ZodString>;
|
|
410
840
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
841
|
}, z.core.$strip>], "type">;
|
|
412
|
-
query: z.ZodObject<{
|
|
842
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
413
843
|
resource: z.ZodString;
|
|
414
844
|
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
415
845
|
order: z.ZodOptional<z.ZodObject<{
|
|
@@ -420,7 +850,7 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
420
850
|
}>;
|
|
421
851
|
}, z.core.$strip>>;
|
|
422
852
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
423
|
-
}, z.core.$strip
|
|
853
|
+
}, z.core.$strip>>;
|
|
424
854
|
}, z.core.$strip>, z.ZodObject<{
|
|
425
855
|
id: z.ZodOptional<z.ZodString>;
|
|
426
856
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -437,6 +867,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
437
867
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
438
868
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
439
869
|
order: z.ZodOptional<z.ZodNumber>;
|
|
870
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
871
|
+
type: z.ZodLiteral<"resource">;
|
|
872
|
+
resourceId: z.ZodString;
|
|
873
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
874
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
875
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
876
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
877
|
+
type: z.ZodLiteral<"aggregate">;
|
|
878
|
+
resourceId: z.ZodString;
|
|
879
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
880
|
+
operation: z.ZodEnum<{
|
|
881
|
+
sum: "sum";
|
|
882
|
+
count: "count";
|
|
883
|
+
avg: "avg";
|
|
884
|
+
min: "min";
|
|
885
|
+
max: "max";
|
|
886
|
+
median: "median";
|
|
887
|
+
}>;
|
|
888
|
+
field: z.ZodOptional<z.ZodString>;
|
|
889
|
+
}, z.core.$strip>>;
|
|
890
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
891
|
+
type: z.ZodLiteral<"field">;
|
|
892
|
+
field: z.ZodString;
|
|
893
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
894
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
895
|
+
field: z.ZodString;
|
|
896
|
+
truncation: z.ZodEnum<{
|
|
897
|
+
day: "day";
|
|
898
|
+
week: "week";
|
|
899
|
+
month: "month";
|
|
900
|
+
year: "year";
|
|
901
|
+
}>;
|
|
902
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
903
|
+
}, z.core.$strip>], "type">>;
|
|
904
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
905
|
+
}, z.core.$strict>], "type">>;
|
|
440
906
|
target: z.ZodLiteral<"kpi_card">;
|
|
441
907
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
442
908
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -467,6 +933,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
467
933
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
468
934
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
469
935
|
order: z.ZodOptional<z.ZodNumber>;
|
|
936
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
937
|
+
type: z.ZodLiteral<"resource">;
|
|
938
|
+
resourceId: z.ZodString;
|
|
939
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
940
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
941
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
942
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
943
|
+
type: z.ZodLiteral<"aggregate">;
|
|
944
|
+
resourceId: z.ZodString;
|
|
945
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
946
|
+
operation: z.ZodEnum<{
|
|
947
|
+
sum: "sum";
|
|
948
|
+
count: "count";
|
|
949
|
+
avg: "avg";
|
|
950
|
+
min: "min";
|
|
951
|
+
max: "max";
|
|
952
|
+
median: "median";
|
|
953
|
+
}>;
|
|
954
|
+
field: z.ZodOptional<z.ZodString>;
|
|
955
|
+
}, z.core.$strip>>;
|
|
956
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
957
|
+
type: z.ZodLiteral<"field">;
|
|
958
|
+
field: z.ZodString;
|
|
959
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
960
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
961
|
+
field: z.ZodString;
|
|
962
|
+
truncation: z.ZodEnum<{
|
|
963
|
+
day: "day";
|
|
964
|
+
week: "week";
|
|
965
|
+
month: "month";
|
|
966
|
+
year: "year";
|
|
967
|
+
}>;
|
|
968
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
969
|
+
}, z.core.$strip>], "type">>;
|
|
970
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
971
|
+
}, z.core.$strict>], "type">>;
|
|
470
972
|
target: z.ZodLiteral<"gauge_card">;
|
|
471
973
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
472
974
|
query: z.ZodOptional<z.ZodObject<{
|
|
@@ -497,6 +999,42 @@ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
497
999
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
498
1000
|
maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
499
1001
|
order: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
dataSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1003
|
+
type: z.ZodLiteral<"resource">;
|
|
1004
|
+
resourceId: z.ZodString;
|
|
1005
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1006
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
1007
|
+
sort: z.ZodOptional<z.ZodUnknown>;
|
|
1008
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1009
|
+
type: z.ZodLiteral<"aggregate">;
|
|
1010
|
+
resourceId: z.ZodString;
|
|
1011
|
+
aggregations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1012
|
+
operation: z.ZodEnum<{
|
|
1013
|
+
sum: "sum";
|
|
1014
|
+
count: "count";
|
|
1015
|
+
avg: "avg";
|
|
1016
|
+
min: "min";
|
|
1017
|
+
max: "max";
|
|
1018
|
+
median: "median";
|
|
1019
|
+
}>;
|
|
1020
|
+
field: z.ZodOptional<z.ZodString>;
|
|
1021
|
+
}, z.core.$strip>>;
|
|
1022
|
+
groupBy: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1023
|
+
type: z.ZodLiteral<"field">;
|
|
1024
|
+
field: z.ZodString;
|
|
1025
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1026
|
+
type: z.ZodLiteral<"date_trunc">;
|
|
1027
|
+
field: z.ZodString;
|
|
1028
|
+
truncation: z.ZodEnum<{
|
|
1029
|
+
day: "day";
|
|
1030
|
+
week: "week";
|
|
1031
|
+
month: "month";
|
|
1032
|
+
year: "year";
|
|
1033
|
+
}>;
|
|
1034
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
1035
|
+
}, z.core.$strip>], "type">>;
|
|
1036
|
+
filters: z.ZodOptional<z.ZodUnknown>;
|
|
1037
|
+
}, z.core.$strict>], "type">>;
|
|
500
1038
|
target: z.ZodLiteral<"pivot_table">;
|
|
501
1039
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
502
1040
|
query: z.ZodOptional<z.ZodObject<{
|