@adminforth/dashboard 1.7.0 → 1.9.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 +81 -55
- package/custom/model/dashboard.types.ts +17 -9
- package/custom/skills/adminforth-dashboard/SKILL.md +28 -12
- package/dist/custom/model/dashboard.types.d.ts +15 -8
- package/dist/custom/model/dashboard.types.ts +17 -9
- package/dist/custom/queries/useDashboardConfig.d.ts +222 -4
- package/dist/custom/queries/useWidgetData.d.ts +222 -4
- package/dist/custom/skills/adminforth-dashboard/SKILL.md +28 -12
- package/dist/schema/api.d.ts +5440 -941
- package/dist/schema/api.js +2 -2
- package/dist/schema/widget.d.ts +432 -23
- package/dist/schema/widget.js +1 -1
- package/dist/schema/widgets/charts.d.ts +558 -28
- package/dist/schema/widgets/charts.js +2 -2
- package/dist/schema/widgets/common.d.ts +17 -6
- package/dist/schema/widgets/common.js +16 -7
- package/dist/schema/widgets/gauge-card.d.ts +38 -2
- package/dist/schema/widgets/kpi-card.d.ts +38 -2
- package/dist/schema/widgets/pivot-table.d.ts +38 -2
- package/dist/schema/widgets/table.d.ts +38 -2
- package/dist/services/calc-evaluator.d.ts +1 -0
- package/dist/services/calc-evaluator.js +28 -0
- package/dist/services/dashboardFilterService.d.ts +5 -0
- package/dist/services/dashboardFilterService.js +125 -0
- package/dist/services/widgetDataService.js +53 -201
- package/package.json +2 -1
- package/schema/api.ts +1 -2
- package/schema/widget.ts +0 -1
- package/schema/widgets/charts.ts +1 -2
- package/schema/widgets/common.ts +16 -7
- package/services/calc-evaluator.ts +33 -0
- package/services/dashboardFilterService.ts +162 -0
- package/services/widgetDataService.ts +88 -263
package/dist/schema/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toJSONSchema, z } from 'zod';
|
|
2
|
-
import { BarChartSchema, FunnelChartSchema,
|
|
2
|
+
import { BarChartSchema, FunnelChartSchema, GaugeCardViewConfigSchema, HistogramChartSchema, KpiCardViewConfigSchema, LineChartSchema, PieChartSchema, PivotTableViewConfigSchema, QueryConfigSchema, StackedBarChartSchema, TableViewConfigSchema, WidgetEditableBaseSchema, WidgetConfigSchema, } from './widget.js';
|
|
3
3
|
export const DashboardErrorResponseZodSchema = z.object({
|
|
4
4
|
error: z.string(),
|
|
5
5
|
validationErrors: z.array(z.object({
|
|
@@ -115,7 +115,7 @@ const ConfigurableHistogramChartWidgetConfigSchema = WidgetEditableBaseSchema.ex
|
|
|
115
115
|
const ConfigurableFunnelChartWidgetConfigSchema = WidgetEditableBaseSchema.extend({
|
|
116
116
|
target: z.literal('chart'),
|
|
117
117
|
chart: FunnelChartSchema,
|
|
118
|
-
query:
|
|
118
|
+
query: QueryConfigSchema,
|
|
119
119
|
});
|
|
120
120
|
const ConfigurablePivotTableWidgetConfigSchema = WidgetEditableBaseSchema.extend({
|
|
121
121
|
target: z.literal('pivot_table'),
|
package/dist/schema/widget.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { GaugeCardWidgetConfigSchema, GaugeCardViewConfigSchema, } from './widge
|
|
|
5
5
|
export { KpiCardViewConfigSchema, KpiCardWidgetConfigSchema, } from './widgets/kpi-card.js';
|
|
6
6
|
export { PivotTableViewConfigSchema, PivotTableWidgetConfigSchema, } from './widgets/pivot-table.js';
|
|
7
7
|
export { TableViewConfigSchema, TableWidgetConfigSchema, } from './widgets/table.js';
|
|
8
|
-
export { EmptyWidgetConfigSchema,
|
|
8
|
+
export { EmptyWidgetConfigSchema, QueryConfigSchema, WidgetEditableBaseSchema, } from './widgets/common.js';
|
|
9
9
|
export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
10
10
|
id: z.ZodString;
|
|
11
11
|
group_id: z.ZodString;
|
|
@@ -60,7 +60,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
60
60
|
pagination: z.ZodOptional<z.ZodBoolean>;
|
|
61
61
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
62
62
|
}, z.core.$strict>>;
|
|
63
|
-
query: z.ZodObject<{
|
|
63
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
64
65
|
resource: z.ZodString;
|
|
65
66
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
66
67
|
field: z.ZodString;
|
|
@@ -133,7 +134,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
133
134
|
as: z.ZodString;
|
|
134
135
|
}, z.core.$strict>>>;
|
|
135
136
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
136
|
-
}, z.core.$strict
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
source: z.ZodLiteral<"steps">;
|
|
139
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
resource: z.ZodString;
|
|
142
|
+
select: z.ZodArray<z.ZodObject<{
|
|
143
|
+
agg: z.ZodEnum<{
|
|
144
|
+
sum: "sum";
|
|
145
|
+
count: "count";
|
|
146
|
+
count_distinct: "count_distinct";
|
|
147
|
+
avg: "avg";
|
|
148
|
+
min: "min";
|
|
149
|
+
max: "max";
|
|
150
|
+
median: "median";
|
|
151
|
+
}>;
|
|
152
|
+
field: z.ZodOptional<z.ZodString>;
|
|
153
|
+
as: z.ZodString;
|
|
154
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
157
|
+
}, z.core.$strict>>;
|
|
158
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
159
|
+
calc: z.ZodString;
|
|
160
|
+
as: z.ZodString;
|
|
161
|
+
}, z.core.$strict>>>;
|
|
162
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
163
|
+
field: z.ZodString;
|
|
164
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
165
|
+
asc: "asc";
|
|
166
|
+
desc: "desc";
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.core.$strict>>>;
|
|
169
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
172
|
+
}, z.core.$strict>]>;
|
|
137
173
|
}, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
|
|
138
174
|
id: z.ZodString;
|
|
139
175
|
group_id: z.ZodString;
|
|
@@ -190,7 +226,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
190
226
|
color: z.ZodOptional<z.ZodString>;
|
|
191
227
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
228
|
}, z.core.$strict>;
|
|
193
|
-
query: z.ZodObject<{
|
|
229
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
230
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
194
231
|
resource: z.ZodString;
|
|
195
232
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
196
233
|
field: z.ZodString;
|
|
@@ -263,7 +300,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
263
300
|
as: z.ZodString;
|
|
264
301
|
}, z.core.$strict>>>;
|
|
265
302
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
266
|
-
}, z.core.$strict
|
|
303
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
304
|
+
source: z.ZodLiteral<"steps">;
|
|
305
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
resource: z.ZodString;
|
|
308
|
+
select: z.ZodArray<z.ZodObject<{
|
|
309
|
+
agg: z.ZodEnum<{
|
|
310
|
+
sum: "sum";
|
|
311
|
+
count: "count";
|
|
312
|
+
count_distinct: "count_distinct";
|
|
313
|
+
avg: "avg";
|
|
314
|
+
min: "min";
|
|
315
|
+
max: "max";
|
|
316
|
+
median: "median";
|
|
317
|
+
}>;
|
|
318
|
+
field: z.ZodOptional<z.ZodString>;
|
|
319
|
+
as: z.ZodString;
|
|
320
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
321
|
+
}, z.core.$strict>>;
|
|
322
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
323
|
+
}, z.core.$strict>>;
|
|
324
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
325
|
+
calc: z.ZodString;
|
|
326
|
+
as: z.ZodString;
|
|
327
|
+
}, z.core.$strict>>>;
|
|
328
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
329
|
+
field: z.ZodString;
|
|
330
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
331
|
+
asc: "asc";
|
|
332
|
+
desc: "desc";
|
|
333
|
+
}>>;
|
|
334
|
+
}, z.core.$strict>>>;
|
|
335
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
338
|
+
}, z.core.$strict>]>;
|
|
267
339
|
}, z.core.$strict>, z.ZodObject<{
|
|
268
340
|
id: z.ZodString;
|
|
269
341
|
group_id: z.ZodString;
|
|
@@ -315,7 +387,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
315
387
|
}, z.core.$strict>;
|
|
316
388
|
color: z.ZodOptional<z.ZodString>;
|
|
317
389
|
}, z.core.$strict>;
|
|
318
|
-
query: z.ZodObject<{
|
|
390
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
391
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
319
392
|
resource: z.ZodString;
|
|
320
393
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
321
394
|
field: z.ZodString;
|
|
@@ -388,7 +461,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
388
461
|
as: z.ZodString;
|
|
389
462
|
}, z.core.$strict>>>;
|
|
390
463
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
391
|
-
}, z.core.$strict
|
|
464
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
465
|
+
source: z.ZodLiteral<"steps">;
|
|
466
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
467
|
+
name: z.ZodString;
|
|
468
|
+
resource: z.ZodString;
|
|
469
|
+
select: z.ZodArray<z.ZodObject<{
|
|
470
|
+
agg: z.ZodEnum<{
|
|
471
|
+
sum: "sum";
|
|
472
|
+
count: "count";
|
|
473
|
+
count_distinct: "count_distinct";
|
|
474
|
+
avg: "avg";
|
|
475
|
+
min: "min";
|
|
476
|
+
max: "max";
|
|
477
|
+
median: "median";
|
|
478
|
+
}>;
|
|
479
|
+
field: z.ZodOptional<z.ZodString>;
|
|
480
|
+
as: z.ZodString;
|
|
481
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
482
|
+
}, z.core.$strict>>;
|
|
483
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
484
|
+
}, z.core.$strict>>;
|
|
485
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
486
|
+
calc: z.ZodString;
|
|
487
|
+
as: z.ZodString;
|
|
488
|
+
}, z.core.$strict>>>;
|
|
489
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
490
|
+
field: z.ZodString;
|
|
491
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
492
|
+
asc: "asc";
|
|
493
|
+
desc: "desc";
|
|
494
|
+
}>>;
|
|
495
|
+
}, z.core.$strict>>>;
|
|
496
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
498
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
499
|
+
}, z.core.$strict>]>;
|
|
392
500
|
}, z.core.$strict>, z.ZodObject<{
|
|
393
501
|
id: z.ZodString;
|
|
394
502
|
group_id: z.ZodString;
|
|
@@ -457,7 +565,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
457
565
|
}, z.core.$strict>>;
|
|
458
566
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
459
567
|
}, z.core.$strict>;
|
|
460
|
-
query: z.ZodObject<{
|
|
568
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
569
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
461
570
|
resource: z.ZodString;
|
|
462
571
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
463
572
|
field: z.ZodString;
|
|
@@ -530,7 +639,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
530
639
|
as: z.ZodString;
|
|
531
640
|
}, z.core.$strict>>>;
|
|
532
641
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
533
|
-
}, z.core.$strict
|
|
642
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
643
|
+
source: z.ZodLiteral<"steps">;
|
|
644
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
645
|
+
name: z.ZodString;
|
|
646
|
+
resource: z.ZodString;
|
|
647
|
+
select: z.ZodArray<z.ZodObject<{
|
|
648
|
+
agg: z.ZodEnum<{
|
|
649
|
+
sum: "sum";
|
|
650
|
+
count: "count";
|
|
651
|
+
count_distinct: "count_distinct";
|
|
652
|
+
avg: "avg";
|
|
653
|
+
min: "min";
|
|
654
|
+
max: "max";
|
|
655
|
+
median: "median";
|
|
656
|
+
}>;
|
|
657
|
+
field: z.ZodOptional<z.ZodString>;
|
|
658
|
+
as: z.ZodString;
|
|
659
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
660
|
+
}, z.core.$strict>>;
|
|
661
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
662
|
+
}, z.core.$strict>>;
|
|
663
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
664
|
+
calc: z.ZodString;
|
|
665
|
+
as: z.ZodString;
|
|
666
|
+
}, z.core.$strict>>>;
|
|
667
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
668
|
+
field: z.ZodString;
|
|
669
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
670
|
+
asc: "asc";
|
|
671
|
+
desc: "desc";
|
|
672
|
+
}>>;
|
|
673
|
+
}, z.core.$strict>>>;
|
|
674
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
676
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
677
|
+
}, z.core.$strict>]>;
|
|
534
678
|
}, z.core.$strict>, z.ZodObject<{
|
|
535
679
|
id: z.ZodString;
|
|
536
680
|
group_id: z.ZodString;
|
|
@@ -582,7 +726,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
582
726
|
}, z.core.$strict>;
|
|
583
727
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
584
728
|
}, z.core.$strict>;
|
|
585
|
-
query: z.ZodObject<{
|
|
729
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
730
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
586
731
|
resource: z.ZodString;
|
|
587
732
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
588
733
|
field: z.ZodString;
|
|
@@ -655,7 +800,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
655
800
|
as: z.ZodString;
|
|
656
801
|
}, z.core.$strict>>>;
|
|
657
802
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
658
|
-
}, z.core.$strict
|
|
803
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
804
|
+
source: z.ZodLiteral<"steps">;
|
|
805
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
806
|
+
name: z.ZodString;
|
|
807
|
+
resource: z.ZodString;
|
|
808
|
+
select: z.ZodArray<z.ZodObject<{
|
|
809
|
+
agg: z.ZodEnum<{
|
|
810
|
+
sum: "sum";
|
|
811
|
+
count: "count";
|
|
812
|
+
count_distinct: "count_distinct";
|
|
813
|
+
avg: "avg";
|
|
814
|
+
min: "min";
|
|
815
|
+
max: "max";
|
|
816
|
+
median: "median";
|
|
817
|
+
}>;
|
|
818
|
+
field: z.ZodOptional<z.ZodString>;
|
|
819
|
+
as: z.ZodString;
|
|
820
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
821
|
+
}, z.core.$strict>>;
|
|
822
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
823
|
+
}, z.core.$strict>>;
|
|
824
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
825
|
+
calc: z.ZodString;
|
|
826
|
+
as: z.ZodString;
|
|
827
|
+
}, z.core.$strict>>>;
|
|
828
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
829
|
+
field: z.ZodString;
|
|
830
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
831
|
+
asc: "asc";
|
|
832
|
+
desc: "desc";
|
|
833
|
+
}>>;
|
|
834
|
+
}, z.core.$strict>>>;
|
|
835
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
836
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
837
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
838
|
+
}, z.core.$strict>]>;
|
|
659
839
|
}, z.core.$strict>, z.ZodObject<{
|
|
660
840
|
id: z.ZodString;
|
|
661
841
|
group_id: z.ZodString;
|
|
@@ -712,7 +892,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
712
892
|
}, z.core.$strict>>>;
|
|
713
893
|
color: z.ZodOptional<z.ZodString>;
|
|
714
894
|
}, z.core.$strict>;
|
|
715
|
-
query: z.ZodObject<{
|
|
895
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
896
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
716
897
|
resource: z.ZodString;
|
|
717
898
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
718
899
|
field: z.ZodString;
|
|
@@ -785,7 +966,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
785
966
|
as: z.ZodString;
|
|
786
967
|
}, z.core.$strict>>>;
|
|
787
968
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
788
|
-
}, z.core.$strict
|
|
969
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
970
|
+
source: z.ZodLiteral<"steps">;
|
|
971
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
972
|
+
name: z.ZodString;
|
|
973
|
+
resource: z.ZodString;
|
|
974
|
+
select: z.ZodArray<z.ZodObject<{
|
|
975
|
+
agg: z.ZodEnum<{
|
|
976
|
+
sum: "sum";
|
|
977
|
+
count: "count";
|
|
978
|
+
count_distinct: "count_distinct";
|
|
979
|
+
avg: "avg";
|
|
980
|
+
min: "min";
|
|
981
|
+
max: "max";
|
|
982
|
+
median: "median";
|
|
983
|
+
}>;
|
|
984
|
+
field: z.ZodOptional<z.ZodString>;
|
|
985
|
+
as: z.ZodString;
|
|
986
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
987
|
+
}, z.core.$strict>>;
|
|
988
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
989
|
+
}, z.core.$strict>>;
|
|
990
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
991
|
+
calc: z.ZodString;
|
|
992
|
+
as: z.ZodString;
|
|
993
|
+
}, z.core.$strict>>>;
|
|
994
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
995
|
+
field: z.ZodString;
|
|
996
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
997
|
+
asc: "asc";
|
|
998
|
+
desc: "desc";
|
|
999
|
+
}>>;
|
|
1000
|
+
}, z.core.$strict>>>;
|
|
1001
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1003
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1004
|
+
}, z.core.$strict>]>;
|
|
789
1005
|
}, z.core.$strict>, z.ZodObject<{
|
|
790
1006
|
id: z.ZodString;
|
|
791
1007
|
group_id: z.ZodString;
|
|
@@ -837,11 +1053,86 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
837
1053
|
}, z.core.$strict>>;
|
|
838
1054
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
839
1055
|
}, z.core.$strict>;
|
|
840
|
-
query: z.ZodObject<{
|
|
1056
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
1057
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
1058
|
+
resource: z.ZodString;
|
|
1059
|
+
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1060
|
+
field: z.ZodString;
|
|
1061
|
+
as: z.ZodOptional<z.ZodString>;
|
|
1062
|
+
grain: z.ZodOptional<z.ZodEnum<{
|
|
1063
|
+
day: "day";
|
|
1064
|
+
week: "week";
|
|
1065
|
+
month: "month";
|
|
1066
|
+
year: "year";
|
|
1067
|
+
}>>;
|
|
1068
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1069
|
+
agg: z.ZodEnum<{
|
|
1070
|
+
sum: "sum";
|
|
1071
|
+
count: "count";
|
|
1072
|
+
count_distinct: "count_distinct";
|
|
1073
|
+
avg: "avg";
|
|
1074
|
+
min: "min";
|
|
1075
|
+
max: "max";
|
|
1076
|
+
median: "median";
|
|
1077
|
+
}>;
|
|
1078
|
+
field: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
as: z.ZodString;
|
|
1080
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1081
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1082
|
+
calc: z.ZodString;
|
|
1083
|
+
as: z.ZodString;
|
|
1084
|
+
}, z.core.$strict>]>>>;
|
|
1085
|
+
sparkline: z.ZodOptional<z.ZodObject<{
|
|
1086
|
+
field: z.ZodString;
|
|
1087
|
+
grain: z.ZodEnum<{
|
|
1088
|
+
day: "day";
|
|
1089
|
+
week: "week";
|
|
1090
|
+
month: "month";
|
|
1091
|
+
year: "year";
|
|
1092
|
+
}>;
|
|
1093
|
+
as: z.ZodString;
|
|
1094
|
+
fill_missing: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1095
|
+
}, z.core.$strict>>;
|
|
1096
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1097
|
+
group_by: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1098
|
+
field: z.ZodString;
|
|
1099
|
+
as: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
grain: z.ZodOptional<z.ZodEnum<{
|
|
1101
|
+
day: "day";
|
|
1102
|
+
week: "week";
|
|
1103
|
+
month: "month";
|
|
1104
|
+
year: "year";
|
|
1105
|
+
}>>;
|
|
1106
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
1107
|
+
}, z.core.$strict>]>>>;
|
|
1108
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1109
|
+
field: z.ZodString;
|
|
1110
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
1111
|
+
asc: "asc";
|
|
1112
|
+
desc: "desc";
|
|
1113
|
+
}>>;
|
|
1114
|
+
}, z.core.$strict>>>;
|
|
1115
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1116
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1117
|
+
bucket: z.ZodOptional<z.ZodObject<{
|
|
1118
|
+
field: z.ZodString;
|
|
1119
|
+
buckets: z.ZodArray<z.ZodObject<{
|
|
1120
|
+
label: z.ZodString;
|
|
1121
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1122
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1123
|
+
}, z.core.$strict>>;
|
|
1124
|
+
}, z.core.$strict>>;
|
|
1125
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1126
|
+
calc: z.ZodString;
|
|
1127
|
+
as: z.ZodString;
|
|
1128
|
+
}, z.core.$strict>>>;
|
|
1129
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1130
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1131
|
+
source: z.ZodLiteral<"steps">;
|
|
841
1132
|
steps: z.ZodArray<z.ZodObject<{
|
|
842
1133
|
name: z.ZodString;
|
|
843
1134
|
resource: z.ZodString;
|
|
844
|
-
|
|
1135
|
+
select: z.ZodArray<z.ZodObject<{
|
|
845
1136
|
agg: z.ZodEnum<{
|
|
846
1137
|
sum: "sum";
|
|
847
1138
|
count: "count";
|
|
@@ -854,14 +1145,24 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
854
1145
|
field: z.ZodOptional<z.ZodString>;
|
|
855
1146
|
as: z.ZodString;
|
|
856
1147
|
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
857
|
-
}, z.core.$strict
|
|
1148
|
+
}, z.core.$strict>>;
|
|
858
1149
|
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
859
1150
|
}, z.core.$strict>>;
|
|
860
1151
|
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
861
1152
|
calc: z.ZodString;
|
|
862
1153
|
as: z.ZodString;
|
|
863
1154
|
}, z.core.$strict>>>;
|
|
864
|
-
|
|
1155
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1156
|
+
field: z.ZodString;
|
|
1157
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
1158
|
+
asc: "asc";
|
|
1159
|
+
desc: "desc";
|
|
1160
|
+
}>>;
|
|
1161
|
+
}, z.core.$strict>>>;
|
|
1162
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1163
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1164
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1165
|
+
}, z.core.$strict>]>;
|
|
865
1166
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
866
1167
|
id: z.ZodString;
|
|
867
1168
|
group_id: z.ZodString;
|
|
@@ -939,7 +1240,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
939
1240
|
}, z.core.$strict>>;
|
|
940
1241
|
}, z.core.$strict>>;
|
|
941
1242
|
}, z.core.$strict>;
|
|
942
|
-
query: z.ZodObject<{
|
|
1243
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
1244
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
943
1245
|
resource: z.ZodString;
|
|
944
1246
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
945
1247
|
field: z.ZodString;
|
|
@@ -1012,7 +1314,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1012
1314
|
as: z.ZodString;
|
|
1013
1315
|
}, z.core.$strict>>>;
|
|
1014
1316
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1015
|
-
}, z.core.$strict
|
|
1317
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1318
|
+
source: z.ZodLiteral<"steps">;
|
|
1319
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1320
|
+
name: z.ZodString;
|
|
1321
|
+
resource: z.ZodString;
|
|
1322
|
+
select: z.ZodArray<z.ZodObject<{
|
|
1323
|
+
agg: z.ZodEnum<{
|
|
1324
|
+
sum: "sum";
|
|
1325
|
+
count: "count";
|
|
1326
|
+
count_distinct: "count_distinct";
|
|
1327
|
+
avg: "avg";
|
|
1328
|
+
min: "min";
|
|
1329
|
+
max: "max";
|
|
1330
|
+
median: "median";
|
|
1331
|
+
}>;
|
|
1332
|
+
field: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
as: z.ZodString;
|
|
1334
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1335
|
+
}, z.core.$strict>>;
|
|
1336
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1337
|
+
}, z.core.$strict>>;
|
|
1338
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1339
|
+
calc: z.ZodString;
|
|
1340
|
+
as: z.ZodString;
|
|
1341
|
+
}, z.core.$strict>>>;
|
|
1342
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1343
|
+
field: z.ZodString;
|
|
1344
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
1345
|
+
asc: "asc";
|
|
1346
|
+
desc: "desc";
|
|
1347
|
+
}>>;
|
|
1348
|
+
}, z.core.$strict>>>;
|
|
1349
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1350
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1351
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1352
|
+
}, z.core.$strict>]>;
|
|
1016
1353
|
}, z.core.$strict>, z.ZodObject<{
|
|
1017
1354
|
id: z.ZodString;
|
|
1018
1355
|
group_id: z.ZodString;
|
|
@@ -1070,7 +1407,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1070
1407
|
}, z.core.$strict>>;
|
|
1071
1408
|
color: z.ZodOptional<z.ZodString>;
|
|
1072
1409
|
}, z.core.$strict>;
|
|
1073
|
-
query: z.ZodObject<{
|
|
1410
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
1411
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
1074
1412
|
resource: z.ZodString;
|
|
1075
1413
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1076
1414
|
field: z.ZodString;
|
|
@@ -1143,7 +1481,42 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1143
1481
|
as: z.ZodString;
|
|
1144
1482
|
}, z.core.$strict>>>;
|
|
1145
1483
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1146
|
-
}, z.core.$strict
|
|
1484
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1485
|
+
source: z.ZodLiteral<"steps">;
|
|
1486
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1487
|
+
name: z.ZodString;
|
|
1488
|
+
resource: z.ZodString;
|
|
1489
|
+
select: z.ZodArray<z.ZodObject<{
|
|
1490
|
+
agg: z.ZodEnum<{
|
|
1491
|
+
sum: "sum";
|
|
1492
|
+
count: "count";
|
|
1493
|
+
count_distinct: "count_distinct";
|
|
1494
|
+
avg: "avg";
|
|
1495
|
+
min: "min";
|
|
1496
|
+
max: "max";
|
|
1497
|
+
median: "median";
|
|
1498
|
+
}>;
|
|
1499
|
+
field: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
as: z.ZodString;
|
|
1501
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1502
|
+
}, z.core.$strict>>;
|
|
1503
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1504
|
+
}, z.core.$strict>>;
|
|
1505
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1506
|
+
calc: z.ZodString;
|
|
1507
|
+
as: z.ZodString;
|
|
1508
|
+
}, z.core.$strict>>>;
|
|
1509
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1510
|
+
field: z.ZodString;
|
|
1511
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
1512
|
+
asc: "asc";
|
|
1513
|
+
desc: "desc";
|
|
1514
|
+
}>>;
|
|
1515
|
+
}, z.core.$strict>>>;
|
|
1516
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1517
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1518
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1519
|
+
}, z.core.$strict>]>;
|
|
1147
1520
|
}, z.core.$strict>, z.ZodObject<{
|
|
1148
1521
|
id: z.ZodString;
|
|
1149
1522
|
group_id: z.ZodString;
|
|
@@ -1213,7 +1586,8 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1213
1586
|
}>>;
|
|
1214
1587
|
}, z.core.$strict>>;
|
|
1215
1588
|
}, z.core.$strict>;
|
|
1216
|
-
query: z.ZodObject<{
|
|
1589
|
+
query: z.ZodUnion<readonly [z.ZodObject<{
|
|
1590
|
+
source: z.ZodOptional<z.ZodLiteral<"resource">>;
|
|
1217
1591
|
resource: z.ZodString;
|
|
1218
1592
|
select: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1219
1593
|
field: z.ZodString;
|
|
@@ -1286,5 +1660,40 @@ export declare const WidgetConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1286
1660
|
as: z.ZodString;
|
|
1287
1661
|
}, z.core.$strict>>>;
|
|
1288
1662
|
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1289
|
-
}, z.core.$strict
|
|
1663
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1664
|
+
source: z.ZodLiteral<"steps">;
|
|
1665
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
1666
|
+
name: z.ZodString;
|
|
1667
|
+
resource: z.ZodString;
|
|
1668
|
+
select: z.ZodArray<z.ZodObject<{
|
|
1669
|
+
agg: z.ZodEnum<{
|
|
1670
|
+
sum: "sum";
|
|
1671
|
+
count: "count";
|
|
1672
|
+
count_distinct: "count_distinct";
|
|
1673
|
+
avg: "avg";
|
|
1674
|
+
min: "min";
|
|
1675
|
+
max: "max";
|
|
1676
|
+
median: "median";
|
|
1677
|
+
}>;
|
|
1678
|
+
field: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
as: z.ZodString;
|
|
1680
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1681
|
+
}, z.core.$strict>>;
|
|
1682
|
+
filters: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
1683
|
+
}, z.core.$strict>>;
|
|
1684
|
+
calcs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1685
|
+
calc: z.ZodString;
|
|
1686
|
+
as: z.ZodString;
|
|
1687
|
+
}, z.core.$strict>>>;
|
|
1688
|
+
order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1689
|
+
field: z.ZodString;
|
|
1690
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
1691
|
+
asc: "asc";
|
|
1692
|
+
desc: "desc";
|
|
1693
|
+
}>>;
|
|
1694
|
+
}, z.core.$strict>>>;
|
|
1695
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1696
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1697
|
+
formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1698
|
+
}, z.core.$strict>]>;
|
|
1290
1699
|
}, z.core.$strict>]>;
|
package/dist/schema/widget.js
CHANGED
|
@@ -4,7 +4,7 @@ export { GaugeCardWidgetConfigSchema, GaugeCardViewConfigSchema, } from './widge
|
|
|
4
4
|
export { KpiCardViewConfigSchema, KpiCardWidgetConfigSchema, } from './widgets/kpi-card.js';
|
|
5
5
|
export { PivotTableViewConfigSchema, PivotTableWidgetConfigSchema, } from './widgets/pivot-table.js';
|
|
6
6
|
export { TableViewConfigSchema, TableWidgetConfigSchema, } from './widgets/table.js';
|
|
7
|
-
export { EmptyWidgetConfigSchema,
|
|
7
|
+
export { EmptyWidgetConfigSchema, QueryConfigSchema, WidgetEditableBaseSchema, } from './widgets/common.js';
|
|
8
8
|
import { ChartWidgetTargetConfigSchema } from './widgets/charts.js';
|
|
9
9
|
import { GaugeCardWidgetConfigSchema } from './widgets/gauge-card.js';
|
|
10
10
|
import { KpiCardWidgetConfigSchema } from './widgets/kpi-card.js';
|