@adminforth/dashboard 1.2.0 → 1.4.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.
Files changed (60) hide show
  1. package/README.md +116 -39
  2. package/custom/api/dashboardApi.ts +4 -0
  3. package/custom/composables/useElementSize.ts +17 -2
  4. package/custom/model/dashboard.types.ts +337 -236
  5. package/custom/skills/adminforth-dashboard/SKILL.md +113 -2
  6. package/custom/widgets/chart/ChartWidget.vue +38 -53
  7. package/custom/widgets/chart/bar/BarChart.vue +20 -12
  8. package/custom/widgets/chart/chart.types.ts +17 -66
  9. package/custom/widgets/chart/chart.utils.ts +11 -0
  10. package/custom/widgets/chart/funnel/FunnelChart.vue +6 -4
  11. package/custom/widgets/chart/line/LineChart.vue +23 -15
  12. package/custom/widgets/chart/stacked-bar/StackedBarChart.vue +28 -43
  13. package/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -12
  14. package/custom/widgets/kpi-card/KpiCardWidget.vue +6 -8
  15. package/custom/widgets/pivot-table/PivotTableWidget.vue +8 -7
  16. package/custom/widgets/table/TableWidget.vue +8 -3
  17. package/dist/custom/api/dashboardApi.d.ts +1 -0
  18. package/dist/custom/api/dashboardApi.js +5 -0
  19. package/dist/custom/api/dashboardApi.ts +4 -0
  20. package/dist/custom/composables/useElementSize.js +14 -2
  21. package/dist/custom/composables/useElementSize.ts +17 -2
  22. package/dist/custom/model/dashboard.types.d.ts +181 -61
  23. package/dist/custom/model/dashboard.types.js +82 -93
  24. package/dist/custom/model/dashboard.types.ts +337 -236
  25. package/dist/custom/queries/useDashboardConfig.d.ts +852 -66
  26. package/dist/custom/queries/useWidgetData.d.ts +848 -62
  27. package/dist/custom/skills/adminforth-dashboard/SKILL.md +113 -2
  28. package/dist/custom/widgets/chart/ChartWidget.vue +38 -53
  29. package/dist/custom/widgets/chart/bar/BarChart.vue +20 -12
  30. package/dist/custom/widgets/chart/chart.types.d.ts +13 -22
  31. package/dist/custom/widgets/chart/chart.types.js +2 -25
  32. package/dist/custom/widgets/chart/chart.types.ts +17 -66
  33. package/dist/custom/widgets/chart/chart.utils.d.ts +1 -0
  34. package/dist/custom/widgets/chart/chart.utils.js +7 -0
  35. package/dist/custom/widgets/chart/chart.utils.ts +11 -0
  36. package/dist/custom/widgets/chart/funnel/FunnelChart.vue +6 -4
  37. package/dist/custom/widgets/chart/line/LineChart.vue +23 -15
  38. package/dist/custom/widgets/chart/stacked-bar/StackedBarChart.vue +28 -43
  39. package/dist/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -12
  40. package/dist/custom/widgets/kpi-card/KpiCardWidget.vue +6 -8
  41. package/dist/custom/widgets/pivot-table/PivotTableWidget.vue +8 -7
  42. package/dist/custom/widgets/table/TableWidget.vue +8 -3
  43. package/dist/endpoint/dashboard.d.ts +7 -2
  44. package/dist/endpoint/dashboard.js +45 -1
  45. package/dist/endpoint/widgets.d.ts +2 -1
  46. package/dist/endpoint/widgets.js +6 -2
  47. package/dist/schema/api.d.ts +2773 -736
  48. package/dist/schema/api.js +5 -0
  49. package/dist/schema/widget.d.ts +1648 -476
  50. package/dist/schema/widget.js +208 -139
  51. package/dist/services/widgetConfigValidator.js +16 -40
  52. package/dist/services/widgetDataService.d.ts +2 -1
  53. package/dist/services/widgetDataService.js +389 -82
  54. package/endpoint/dashboard.ts +77 -4
  55. package/endpoint/widgets.ts +11 -4
  56. package/package.json +1 -1
  57. package/schema/api.ts +6 -0
  58. package/schema/widget.ts +225 -139
  59. package/services/widgetConfigValidator.ts +29 -53
  60. package/services/widgetDataService.ts +522 -100
@@ -6,60 +6,453 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
6
6
  id: string;
7
7
  group_id: string;
8
8
  label?: string | undefined;
9
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
9
10
  size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
10
11
  width?: number | undefined;
11
12
  height?: number | undefined;
12
13
  minWidth?: number | undefined;
13
14
  maxWidth?: number | null | undefined;
14
15
  order: number;
15
- target: import("../model/dashboard.types.js").DashboardWidgetTarget;
16
- dataSource?: {
17
- type: "resource";
18
- resourceId: string;
19
- columns?: string[] | undefined;
20
- sort?: unknown;
21
- filters?: unknown;
22
- } | {
23
- type: "aggregate";
24
- resourceId: string;
25
- aggregations: Record<string, import("../model/dashboard.types.js").AggregationRule>;
26
- groupBy?: {
27
- type: "field";
16
+ target: "empty";
17
+ } | {
18
+ id: string;
19
+ group_id: string;
20
+ label?: string | undefined;
21
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
22
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
23
+ width?: number | undefined;
24
+ height?: number | undefined;
25
+ minWidth?: number | undefined;
26
+ maxWidth?: number | null | undefined;
27
+ order: number;
28
+ target: "table";
29
+ table?: {
30
+ columns?: (string | {
28
31
  field: string;
32
+ label?: string | undefined;
33
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
34
+ })[] | undefined;
35
+ pagination?: boolean | undefined;
36
+ pageSize?: number | undefined;
37
+ } | undefined;
38
+ query: {
39
+ resource: string;
40
+ select?: ({
41
+ field: string;
42
+ as?: string | undefined;
43
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
44
+ } | {
45
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
46
+ field?: string | undefined;
47
+ as: string;
48
+ filters?: any;
29
49
  } | {
30
- type: "date_trunc";
50
+ calc: string;
51
+ as: string;
52
+ })[] | undefined;
53
+ filters?: any;
54
+ groupBy?: (string | {
31
55
  field: string;
32
- truncation: "day" | "week" | "month" | "year";
56
+ as?: string | undefined;
57
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
58
+ timezone?: string | undefined;
59
+ })[] | undefined;
60
+ orderBy?: {
61
+ field: string;
62
+ direction?: "asc" | "desc" | undefined;
63
+ }[] | undefined;
64
+ limit?: number | undefined;
65
+ offset?: number | undefined;
66
+ timeSeries?: {
67
+ field: string;
68
+ grain: import("../model/dashboard.types.js").TimeGrain;
33
69
  timezone?: string | undefined;
34
70
  } | undefined;
35
- filters?: unknown;
36
- } | undefined;
37
- chart?: {
71
+ period?: {
72
+ field: string;
73
+ gte?: unknown;
74
+ lt?: unknown;
75
+ } | undefined;
76
+ bucket?: {
77
+ field: string;
78
+ buckets: {
79
+ label: string;
80
+ min?: number | undefined;
81
+ max?: number | undefined;
82
+ }[];
83
+ } | undefined;
84
+ calcs?: {
85
+ calc: string;
86
+ as: string;
87
+ }[] | undefined;
88
+ formatting?: Record<string, unknown> | undefined;
89
+ };
90
+ } | {
91
+ id: string;
92
+ group_id: string;
93
+ label?: string | undefined;
94
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
95
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
96
+ width?: number | undefined;
97
+ height?: number | undefined;
98
+ minWidth?: number | undefined;
99
+ maxWidth?: number | null | undefined;
100
+ order: number;
101
+ target: "chart";
102
+ chart: {
38
103
  type: import("../widgets/chart/chart.types.js").ChartWidgetType;
39
104
  title?: string | undefined;
40
- x_field?: string | undefined;
41
- y_field?: string | undefined;
42
- label_field?: string | undefined;
43
- value_field?: string | undefined;
44
- bucket_field?: string | undefined;
105
+ x?: {
106
+ field: string;
107
+ label?: string | undefined;
108
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
109
+ } | undefined;
110
+ y?: {
111
+ field: string;
112
+ label?: string | undefined;
113
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
114
+ } | {
115
+ field: string;
116
+ label?: string | undefined;
117
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
118
+ }[] | undefined;
119
+ label?: {
120
+ field: string;
121
+ label?: string | undefined;
122
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
123
+ } | undefined;
124
+ value?: {
125
+ field: string;
126
+ label?: string | undefined;
127
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
128
+ } | undefined;
45
129
  buckets?: {
46
130
  label: string;
47
131
  min?: number | undefined;
48
132
  max?: number | undefined;
49
133
  }[] | undefined;
50
134
  series?: {
51
- name: string;
52
135
  field: string;
136
+ label?: string | undefined;
53
137
  color?: string | undefined;
54
- }[] | undefined;
55
- series_name?: string | undefined;
138
+ } | undefined;
56
139
  color?: string | undefined;
57
140
  colors?: string[] | undefined;
58
- } | undefined;
59
- table?: unknown;
60
- kpi_card?: unknown;
61
- pivot_table?: unknown;
62
- gauge_card?: unknown;
141
+ };
142
+ query: {
143
+ resource: string;
144
+ select?: ({
145
+ field: string;
146
+ as?: string | undefined;
147
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
148
+ } | {
149
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
150
+ field?: string | undefined;
151
+ as: string;
152
+ filters?: any;
153
+ } | {
154
+ calc: string;
155
+ as: string;
156
+ })[] | undefined;
157
+ filters?: any;
158
+ groupBy?: (string | {
159
+ field: string;
160
+ as?: string | undefined;
161
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
162
+ timezone?: string | undefined;
163
+ })[] | undefined;
164
+ orderBy?: {
165
+ field: string;
166
+ direction?: "asc" | "desc" | undefined;
167
+ }[] | undefined;
168
+ limit?: number | undefined;
169
+ offset?: number | undefined;
170
+ timeSeries?: {
171
+ field: string;
172
+ grain: import("../model/dashboard.types.js").TimeGrain;
173
+ timezone?: string | undefined;
174
+ } | undefined;
175
+ period?: {
176
+ field: string;
177
+ gte?: unknown;
178
+ lt?: unknown;
179
+ } | undefined;
180
+ bucket?: {
181
+ field: string;
182
+ buckets: {
183
+ label: string;
184
+ min?: number | undefined;
185
+ max?: number | undefined;
186
+ }[];
187
+ } | undefined;
188
+ calcs?: {
189
+ calc: string;
190
+ as: string;
191
+ }[] | undefined;
192
+ formatting?: Record<string, unknown> | undefined;
193
+ } | {
194
+ steps: {
195
+ name: string;
196
+ resource: string;
197
+ metric: {
198
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
199
+ field?: string | undefined;
200
+ as: string;
201
+ filters?: any;
202
+ };
203
+ filters?: any;
204
+ }[];
205
+ calcs?: {
206
+ calc: string;
207
+ as: string;
208
+ }[] | undefined;
209
+ };
210
+ } | {
211
+ id: string;
212
+ group_id: string;
213
+ label?: string | undefined;
214
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
215
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
216
+ width?: number | undefined;
217
+ height?: number | undefined;
218
+ minWidth?: number | undefined;
219
+ maxWidth?: number | null | undefined;
220
+ order: number;
221
+ target: "kpi_card";
222
+ card: {
223
+ title?: string | undefined;
224
+ value: {
225
+ field: string;
226
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
227
+ prefix?: string | undefined;
228
+ suffix?: string | undefined;
229
+ };
230
+ subtitle?: {
231
+ text?: string | undefined;
232
+ field?: string | undefined;
233
+ } | undefined;
234
+ comparison?: unknown;
235
+ sparkline?: unknown;
236
+ };
237
+ query: {
238
+ resource: string;
239
+ select?: ({
240
+ field: string;
241
+ as?: string | undefined;
242
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
243
+ } | {
244
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
245
+ field?: string | undefined;
246
+ as: string;
247
+ filters?: any;
248
+ } | {
249
+ calc: string;
250
+ as: string;
251
+ })[] | undefined;
252
+ filters?: any;
253
+ groupBy?: (string | {
254
+ field: string;
255
+ as?: string | undefined;
256
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
257
+ timezone?: string | undefined;
258
+ })[] | undefined;
259
+ orderBy?: {
260
+ field: string;
261
+ direction?: "asc" | "desc" | undefined;
262
+ }[] | undefined;
263
+ limit?: number | undefined;
264
+ offset?: number | undefined;
265
+ timeSeries?: {
266
+ field: string;
267
+ grain: import("../model/dashboard.types.js").TimeGrain;
268
+ timezone?: string | undefined;
269
+ } | undefined;
270
+ period?: {
271
+ field: string;
272
+ gte?: unknown;
273
+ lt?: unknown;
274
+ } | undefined;
275
+ bucket?: {
276
+ field: string;
277
+ buckets: {
278
+ label: string;
279
+ min?: number | undefined;
280
+ max?: number | undefined;
281
+ }[];
282
+ } | undefined;
283
+ calcs?: {
284
+ calc: string;
285
+ as: string;
286
+ }[] | undefined;
287
+ formatting?: Record<string, unknown> | undefined;
288
+ };
289
+ } | {
290
+ id: string;
291
+ group_id: string;
292
+ label?: string | undefined;
293
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
294
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
295
+ width?: number | undefined;
296
+ height?: number | undefined;
297
+ minWidth?: number | undefined;
298
+ maxWidth?: number | null | undefined;
299
+ order: number;
300
+ target: "gauge_card";
301
+ card: {
302
+ title?: string | undefined;
303
+ value: {
304
+ field: string;
305
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
306
+ prefix?: string | undefined;
307
+ suffix?: string | undefined;
308
+ };
309
+ target?: {
310
+ value?: number | undefined;
311
+ field?: string | undefined;
312
+ label?: string | undefined;
313
+ } | undefined;
314
+ progress?: {
315
+ valueField: string;
316
+ targetValue?: number | undefined;
317
+ targetField?: string | undefined;
318
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
319
+ } | undefined;
320
+ color?: string | undefined;
321
+ };
322
+ query: {
323
+ resource: string;
324
+ select?: ({
325
+ field: string;
326
+ as?: string | undefined;
327
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
328
+ } | {
329
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
330
+ field?: string | undefined;
331
+ as: string;
332
+ filters?: any;
333
+ } | {
334
+ calc: string;
335
+ as: string;
336
+ })[] | undefined;
337
+ filters?: any;
338
+ groupBy?: (string | {
339
+ field: string;
340
+ as?: string | undefined;
341
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
342
+ timezone?: string | undefined;
343
+ })[] | undefined;
344
+ orderBy?: {
345
+ field: string;
346
+ direction?: "asc" | "desc" | undefined;
347
+ }[] | undefined;
348
+ limit?: number | undefined;
349
+ offset?: number | undefined;
350
+ timeSeries?: {
351
+ field: string;
352
+ grain: import("../model/dashboard.types.js").TimeGrain;
353
+ timezone?: string | undefined;
354
+ } | undefined;
355
+ period?: {
356
+ field: string;
357
+ gte?: unknown;
358
+ lt?: unknown;
359
+ } | undefined;
360
+ bucket?: {
361
+ field: string;
362
+ buckets: {
363
+ label: string;
364
+ min?: number | undefined;
365
+ max?: number | undefined;
366
+ }[];
367
+ } | undefined;
368
+ calcs?: {
369
+ calc: string;
370
+ as: string;
371
+ }[] | undefined;
372
+ formatting?: Record<string, unknown> | undefined;
373
+ };
374
+ } | {
375
+ id: string;
376
+ group_id: string;
377
+ label?: string | undefined;
378
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
379
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
380
+ width?: number | undefined;
381
+ height?: number | undefined;
382
+ minWidth?: number | undefined;
383
+ maxWidth?: number | null | undefined;
384
+ order: number;
385
+ target: "pivot_table";
386
+ pivot: {
387
+ rows: (string | {
388
+ field: string;
389
+ label?: string | undefined;
390
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
391
+ })[];
392
+ columns?: (string | {
393
+ field: string;
394
+ label?: string | undefined;
395
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
396
+ })[] | undefined;
397
+ values: {
398
+ field: string;
399
+ label?: string | undefined;
400
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
401
+ aggregation?: "sum" | "count" | "avg" | "min" | "max" | undefined;
402
+ }[];
403
+ };
404
+ query: {
405
+ resource: string;
406
+ select?: ({
407
+ field: string;
408
+ as?: string | undefined;
409
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
410
+ } | {
411
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
412
+ field?: string | undefined;
413
+ as: string;
414
+ filters?: any;
415
+ } | {
416
+ calc: string;
417
+ as: string;
418
+ })[] | undefined;
419
+ filters?: any;
420
+ groupBy?: (string | {
421
+ field: string;
422
+ as?: string | undefined;
423
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
424
+ timezone?: string | undefined;
425
+ })[] | undefined;
426
+ orderBy?: {
427
+ field: string;
428
+ direction?: "asc" | "desc" | undefined;
429
+ }[] | undefined;
430
+ limit?: number | undefined;
431
+ offset?: number | undefined;
432
+ timeSeries?: {
433
+ field: string;
434
+ grain: import("../model/dashboard.types.js").TimeGrain;
435
+ timezone?: string | undefined;
436
+ } | undefined;
437
+ period?: {
438
+ field: string;
439
+ gte?: unknown;
440
+ lt?: unknown;
441
+ } | undefined;
442
+ bucket?: {
443
+ field: string;
444
+ buckets: {
445
+ label: string;
446
+ min?: number | undefined;
447
+ max?: number | undefined;
448
+ }[];
449
+ } | undefined;
450
+ calcs?: {
451
+ calc: string;
452
+ as: string;
453
+ }[] | undefined;
454
+ formatting?: Record<string, unknown> | undefined;
455
+ };
63
456
  };
64
457
  data: unknown;
65
458
  } | null, import("../api/dashboardApi.js").DashboardWidgetDataResponse | {
@@ -67,60 +460,453 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
67
460
  id: string;
68
461
  group_id: string;
69
462
  label?: string | undefined;
463
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
70
464
  size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
71
465
  width?: number | undefined;
72
466
  height?: number | undefined;
73
467
  minWidth?: number | undefined;
74
468
  maxWidth?: number | null | undefined;
75
469
  order: number;
76
- target: import("../model/dashboard.types.js").DashboardWidgetTarget;
77
- dataSource?: {
78
- type: "resource";
79
- resourceId: string;
80
- columns?: string[] | undefined;
81
- sort?: unknown;
82
- filters?: unknown;
83
- } | {
84
- type: "aggregate";
85
- resourceId: string;
86
- aggregations: Record<string, import("../model/dashboard.types.js").AggregationRule>;
87
- groupBy?: {
88
- type: "field";
470
+ target: "empty";
471
+ } | {
472
+ id: string;
473
+ group_id: string;
474
+ label?: string | undefined;
475
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
476
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
477
+ width?: number | undefined;
478
+ height?: number | undefined;
479
+ minWidth?: number | undefined;
480
+ maxWidth?: number | null | undefined;
481
+ order: number;
482
+ target: "table";
483
+ table?: {
484
+ columns?: (string | {
89
485
  field: string;
486
+ label?: string | undefined;
487
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
488
+ })[] | undefined;
489
+ pagination?: boolean | undefined;
490
+ pageSize?: number | undefined;
491
+ } | undefined;
492
+ query: {
493
+ resource: string;
494
+ select?: ({
495
+ field: string;
496
+ as?: string | undefined;
497
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
498
+ } | {
499
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
500
+ field?: string | undefined;
501
+ as: string;
502
+ filters?: any;
90
503
  } | {
91
- type: "date_trunc";
504
+ calc: string;
505
+ as: string;
506
+ })[] | undefined;
507
+ filters?: any;
508
+ groupBy?: (string | {
92
509
  field: string;
93
- truncation: "day" | "week" | "month" | "year";
510
+ as?: string | undefined;
511
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
512
+ timezone?: string | undefined;
513
+ })[] | undefined;
514
+ orderBy?: {
515
+ field: string;
516
+ direction?: "asc" | "desc" | undefined;
517
+ }[] | undefined;
518
+ limit?: number | undefined;
519
+ offset?: number | undefined;
520
+ timeSeries?: {
521
+ field: string;
522
+ grain: import("../model/dashboard.types.js").TimeGrain;
94
523
  timezone?: string | undefined;
95
524
  } | undefined;
96
- filters?: unknown;
97
- } | undefined;
98
- chart?: {
525
+ period?: {
526
+ field: string;
527
+ gte?: unknown;
528
+ lt?: unknown;
529
+ } | undefined;
530
+ bucket?: {
531
+ field: string;
532
+ buckets: {
533
+ label: string;
534
+ min?: number | undefined;
535
+ max?: number | undefined;
536
+ }[];
537
+ } | undefined;
538
+ calcs?: {
539
+ calc: string;
540
+ as: string;
541
+ }[] | undefined;
542
+ formatting?: Record<string, unknown> | undefined;
543
+ };
544
+ } | {
545
+ id: string;
546
+ group_id: string;
547
+ label?: string | undefined;
548
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
549
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
550
+ width?: number | undefined;
551
+ height?: number | undefined;
552
+ minWidth?: number | undefined;
553
+ maxWidth?: number | null | undefined;
554
+ order: number;
555
+ target: "chart";
556
+ chart: {
99
557
  type: import("../widgets/chart/chart.types.js").ChartWidgetType;
100
558
  title?: string | undefined;
101
- x_field?: string | undefined;
102
- y_field?: string | undefined;
103
- label_field?: string | undefined;
104
- value_field?: string | undefined;
105
- bucket_field?: string | undefined;
559
+ x?: {
560
+ field: string;
561
+ label?: string | undefined;
562
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
563
+ } | undefined;
564
+ y?: {
565
+ field: string;
566
+ label?: string | undefined;
567
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
568
+ } | {
569
+ field: string;
570
+ label?: string | undefined;
571
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
572
+ }[] | undefined;
573
+ label?: {
574
+ field: string;
575
+ label?: string | undefined;
576
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
577
+ } | undefined;
578
+ value?: {
579
+ field: string;
580
+ label?: string | undefined;
581
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
582
+ } | undefined;
106
583
  buckets?: {
107
584
  label: string;
108
585
  min?: number | undefined;
109
586
  max?: number | undefined;
110
587
  }[] | undefined;
111
588
  series?: {
112
- name: string;
113
589
  field: string;
590
+ label?: string | undefined;
114
591
  color?: string | undefined;
115
- }[] | undefined;
116
- series_name?: string | undefined;
592
+ } | undefined;
117
593
  color?: string | undefined;
118
594
  colors?: string[] | undefined;
119
- } | undefined;
120
- table?: unknown;
121
- kpi_card?: unknown;
122
- pivot_table?: unknown;
123
- gauge_card?: unknown;
595
+ };
596
+ query: {
597
+ resource: string;
598
+ select?: ({
599
+ field: string;
600
+ as?: string | undefined;
601
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
602
+ } | {
603
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
604
+ field?: string | undefined;
605
+ as: string;
606
+ filters?: any;
607
+ } | {
608
+ calc: string;
609
+ as: string;
610
+ })[] | undefined;
611
+ filters?: any;
612
+ groupBy?: (string | {
613
+ field: string;
614
+ as?: string | undefined;
615
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
616
+ timezone?: string | undefined;
617
+ })[] | undefined;
618
+ orderBy?: {
619
+ field: string;
620
+ direction?: "asc" | "desc" | undefined;
621
+ }[] | undefined;
622
+ limit?: number | undefined;
623
+ offset?: number | undefined;
624
+ timeSeries?: {
625
+ field: string;
626
+ grain: import("../model/dashboard.types.js").TimeGrain;
627
+ timezone?: string | undefined;
628
+ } | undefined;
629
+ period?: {
630
+ field: string;
631
+ gte?: unknown;
632
+ lt?: unknown;
633
+ } | undefined;
634
+ bucket?: {
635
+ field: string;
636
+ buckets: {
637
+ label: string;
638
+ min?: number | undefined;
639
+ max?: number | undefined;
640
+ }[];
641
+ } | undefined;
642
+ calcs?: {
643
+ calc: string;
644
+ as: string;
645
+ }[] | undefined;
646
+ formatting?: Record<string, unknown> | undefined;
647
+ } | {
648
+ steps: {
649
+ name: string;
650
+ resource: string;
651
+ metric: {
652
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
653
+ field?: string | undefined;
654
+ as: string;
655
+ filters?: any;
656
+ };
657
+ filters?: any;
658
+ }[];
659
+ calcs?: {
660
+ calc: string;
661
+ as: string;
662
+ }[] | undefined;
663
+ };
664
+ } | {
665
+ id: string;
666
+ group_id: string;
667
+ label?: string | undefined;
668
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
669
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
670
+ width?: number | undefined;
671
+ height?: number | undefined;
672
+ minWidth?: number | undefined;
673
+ maxWidth?: number | null | undefined;
674
+ order: number;
675
+ target: "kpi_card";
676
+ card: {
677
+ title?: string | undefined;
678
+ value: {
679
+ field: string;
680
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
681
+ prefix?: string | undefined;
682
+ suffix?: string | undefined;
683
+ };
684
+ subtitle?: {
685
+ text?: string | undefined;
686
+ field?: string | undefined;
687
+ } | undefined;
688
+ comparison?: unknown;
689
+ sparkline?: unknown;
690
+ };
691
+ query: {
692
+ resource: string;
693
+ select?: ({
694
+ field: string;
695
+ as?: string | undefined;
696
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
697
+ } | {
698
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
699
+ field?: string | undefined;
700
+ as: string;
701
+ filters?: any;
702
+ } | {
703
+ calc: string;
704
+ as: string;
705
+ })[] | undefined;
706
+ filters?: any;
707
+ groupBy?: (string | {
708
+ field: string;
709
+ as?: string | undefined;
710
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
711
+ timezone?: string | undefined;
712
+ })[] | undefined;
713
+ orderBy?: {
714
+ field: string;
715
+ direction?: "asc" | "desc" | undefined;
716
+ }[] | undefined;
717
+ limit?: number | undefined;
718
+ offset?: number | undefined;
719
+ timeSeries?: {
720
+ field: string;
721
+ grain: import("../model/dashboard.types.js").TimeGrain;
722
+ timezone?: string | undefined;
723
+ } | undefined;
724
+ period?: {
725
+ field: string;
726
+ gte?: unknown;
727
+ lt?: unknown;
728
+ } | undefined;
729
+ bucket?: {
730
+ field: string;
731
+ buckets: {
732
+ label: string;
733
+ min?: number | undefined;
734
+ max?: number | undefined;
735
+ }[];
736
+ } | undefined;
737
+ calcs?: {
738
+ calc: string;
739
+ as: string;
740
+ }[] | undefined;
741
+ formatting?: Record<string, unknown> | undefined;
742
+ };
743
+ } | {
744
+ id: string;
745
+ group_id: string;
746
+ label?: string | undefined;
747
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
748
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
749
+ width?: number | undefined;
750
+ height?: number | undefined;
751
+ minWidth?: number | undefined;
752
+ maxWidth?: number | null | undefined;
753
+ order: number;
754
+ target: "gauge_card";
755
+ card: {
756
+ title?: string | undefined;
757
+ value: {
758
+ field: string;
759
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
760
+ prefix?: string | undefined;
761
+ suffix?: string | undefined;
762
+ };
763
+ target?: {
764
+ value?: number | undefined;
765
+ field?: string | undefined;
766
+ label?: string | undefined;
767
+ } | undefined;
768
+ progress?: {
769
+ valueField: string;
770
+ targetValue?: number | undefined;
771
+ targetField?: string | undefined;
772
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
773
+ } | undefined;
774
+ color?: string | undefined;
775
+ };
776
+ query: {
777
+ resource: string;
778
+ select?: ({
779
+ field: string;
780
+ as?: string | undefined;
781
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
782
+ } | {
783
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
784
+ field?: string | undefined;
785
+ as: string;
786
+ filters?: any;
787
+ } | {
788
+ calc: string;
789
+ as: string;
790
+ })[] | undefined;
791
+ filters?: any;
792
+ groupBy?: (string | {
793
+ field: string;
794
+ as?: string | undefined;
795
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
796
+ timezone?: string | undefined;
797
+ })[] | undefined;
798
+ orderBy?: {
799
+ field: string;
800
+ direction?: "asc" | "desc" | undefined;
801
+ }[] | undefined;
802
+ limit?: number | undefined;
803
+ offset?: number | undefined;
804
+ timeSeries?: {
805
+ field: string;
806
+ grain: import("../model/dashboard.types.js").TimeGrain;
807
+ timezone?: string | undefined;
808
+ } | undefined;
809
+ period?: {
810
+ field: string;
811
+ gte?: unknown;
812
+ lt?: unknown;
813
+ } | undefined;
814
+ bucket?: {
815
+ field: string;
816
+ buckets: {
817
+ label: string;
818
+ min?: number | undefined;
819
+ max?: number | undefined;
820
+ }[];
821
+ } | undefined;
822
+ calcs?: {
823
+ calc: string;
824
+ as: string;
825
+ }[] | undefined;
826
+ formatting?: Record<string, unknown> | undefined;
827
+ };
828
+ } | {
829
+ id: string;
830
+ group_id: string;
831
+ label?: string | undefined;
832
+ variables?: import("../model/dashboard.types.js").DashboardVariables | undefined;
833
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
834
+ width?: number | undefined;
835
+ height?: number | undefined;
836
+ minWidth?: number | undefined;
837
+ maxWidth?: number | null | undefined;
838
+ order: number;
839
+ target: "pivot_table";
840
+ pivot: {
841
+ rows: (string | {
842
+ field: string;
843
+ label?: string | undefined;
844
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
845
+ })[];
846
+ columns?: (string | {
847
+ field: string;
848
+ label?: string | undefined;
849
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
850
+ })[] | undefined;
851
+ values: {
852
+ field: string;
853
+ label?: string | undefined;
854
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
855
+ aggregation?: "sum" | "count" | "avg" | "min" | "max" | undefined;
856
+ }[];
857
+ };
858
+ query: {
859
+ resource: string;
860
+ select?: ({
861
+ field: string;
862
+ as?: string | undefined;
863
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
864
+ } | {
865
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
866
+ field?: string | undefined;
867
+ as: string;
868
+ filters?: any;
869
+ } | {
870
+ calc: string;
871
+ as: string;
872
+ })[] | undefined;
873
+ filters?: any;
874
+ groupBy?: (string | {
875
+ field: string;
876
+ as?: string | undefined;
877
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
878
+ timezone?: string | undefined;
879
+ })[] | undefined;
880
+ orderBy?: {
881
+ field: string;
882
+ direction?: "asc" | "desc" | undefined;
883
+ }[] | undefined;
884
+ limit?: number | undefined;
885
+ offset?: number | undefined;
886
+ timeSeries?: {
887
+ field: string;
888
+ grain: import("../model/dashboard.types.js").TimeGrain;
889
+ timezone?: string | undefined;
890
+ } | undefined;
891
+ period?: {
892
+ field: string;
893
+ gte?: unknown;
894
+ lt?: unknown;
895
+ } | undefined;
896
+ bucket?: {
897
+ field: string;
898
+ buckets: {
899
+ label: string;
900
+ min?: number | undefined;
901
+ max?: number | undefined;
902
+ }[];
903
+ } | undefined;
904
+ calcs?: {
905
+ calc: string;
906
+ as: string;
907
+ }[] | undefined;
908
+ formatting?: Record<string, unknown> | undefined;
909
+ };
124
910
  };
125
911
  data: unknown;
126
912
  } | null>;