@adminforth/dashboard 1.1.0 → 1.2.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 +11 -28
- package/custom/model/dashboard.types.ts +236 -42
- package/custom/runtime/DashboardRuntime.vue +2 -1
- package/custom/runtime/WidgetRenderer.vue +2 -1
- package/custom/skills/adminforth-dashboard/SKILL.md +4 -4
- package/custom/widgets/chart/ChartWidget.vue +45 -12
- package/custom/widgets/chart/chart.types.ts +83 -0
- package/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -38
- package/custom/widgets/kpi-card/KpiCardWidget.vue +6 -8
- package/custom/widgets/pivot-table/PivotTableWidget.vue +8 -10
- package/custom/widgets/table/TableWidget.vue +1 -1
- package/dist/custom/model/dashboard.types.d.ts +25 -1
- package/dist/custom/model/dashboard.types.js +133 -42
- package/dist/custom/model/dashboard.types.ts +236 -42
- package/dist/custom/queries/useDashboardConfig.d.ts +0 -2
- package/dist/custom/queries/useWidgetData.d.ts +0 -2
- package/dist/custom/runtime/DashboardRuntime.vue +2 -1
- package/dist/custom/runtime/WidgetRenderer.vue +2 -1
- package/dist/custom/skills/adminforth-dashboard/SKILL.md +4 -4
- package/dist/custom/widgets/chart/ChartWidget.vue +45 -12
- package/dist/custom/widgets/chart/chart.types.d.ts +15 -0
- package/dist/custom/widgets/chart/chart.types.js +46 -0
- package/dist/custom/widgets/chart/chart.types.ts +83 -0
- package/dist/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -38
- package/dist/custom/widgets/kpi-card/KpiCardWidget.vue +6 -8
- package/dist/custom/widgets/pivot-table/PivotTableWidget.vue +8 -10
- package/dist/custom/widgets/table/TableWidget.vue +1 -1
- package/dist/endpoint/widgets.js +20 -3
- package/dist/schema/api.d.ts +0 -240
- package/dist/schema/widget.d.ts +0 -132
- package/dist/schema/widget.js +30 -16
- package/dist/services/widgetConfigValidator.js +9 -49
- package/dist/services/widgetDataService.d.ts +0 -9
- package/dist/services/widgetDataService.js +12 -30
- package/endpoint/widgets.ts +26 -3
- package/package.json +1 -1
- package/schema/widget.ts +34 -17
- package/services/widgetConfigValidator.ts +10 -57
- package/services/widgetDataService.ts +10 -45
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, watch } from 'vue'
|
|
3
3
|
import { useWidgetData } from '../../queries/useWidgetData.js'
|
|
4
|
+
import {
|
|
5
|
+
normalizeGaugeCardWidgetConfig,
|
|
6
|
+
} from '../../model/dashboard.types.js'
|
|
4
7
|
import type { DashboardWidgetConfig, DashboardWidgetTableData } from '../../model/dashboard.types.js'
|
|
5
8
|
import { CHART_COLORS, formatChartValue, toFiniteNumber } from '../chart/chart.utils.js'
|
|
6
9
|
|
|
@@ -18,40 +21,6 @@ const {
|
|
|
18
21
|
refetch,
|
|
19
22
|
} = useWidgetData(dashboardSlugRef, widgetIdRef)
|
|
20
23
|
|
|
21
|
-
type GaugeCardConfig = {
|
|
22
|
-
value_field?: string
|
|
23
|
-
valueField?: string
|
|
24
|
-
min?: number | string
|
|
25
|
-
max?: number | string
|
|
26
|
-
min_field?: string
|
|
27
|
-
minField?: string
|
|
28
|
-
max_field?: string
|
|
29
|
-
maxField?: string
|
|
30
|
-
suffix?: string
|
|
31
|
-
color?: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
35
|
-
return typeof value === 'object' && value !== null
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function parseGaugeCardConfig(value: unknown): GaugeCardConfig | undefined {
|
|
39
|
-
if (isRecord(value)) {
|
|
40
|
-
return value as GaugeCardConfig
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (typeof value !== 'string') {
|
|
44
|
-
return undefined
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
const parsed = JSON.parse(value) as unknown
|
|
49
|
-
return isRecord(parsed) ? parsed as GaugeCardConfig : undefined
|
|
50
|
-
} catch {
|
|
51
|
-
return undefined
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
24
|
function parseOptionalNumber(value: unknown): number | undefined {
|
|
56
25
|
if (value === null || value === undefined || value === '') {
|
|
57
26
|
return undefined
|
|
@@ -86,13 +55,13 @@ watch(
|
|
|
86
55
|
{ deep: true },
|
|
87
56
|
)
|
|
88
57
|
|
|
89
|
-
const gaugeConfig = computed(() =>
|
|
58
|
+
const gaugeConfig = computed(() => normalizeGaugeCardWidgetConfig(props.widget.gauge_card))
|
|
90
59
|
const widgetData = computed(() => data.value?.data as DashboardWidgetTableData | null)
|
|
91
60
|
const columns = computed(() => widgetData.value?.columns ?? [])
|
|
92
61
|
const firstRow = computed(() => widgetData.value?.rows[0] ?? {})
|
|
93
|
-
const valueField = computed(() => gaugeConfig.value?.
|
|
94
|
-
const minField = computed(() => gaugeConfig.value?.
|
|
95
|
-
const maxField = computed(() => gaugeConfig.value?.
|
|
62
|
+
const valueField = computed(() => gaugeConfig.value?.valueField || columns.value[0])
|
|
63
|
+
const minField = computed(() => gaugeConfig.value?.minField)
|
|
64
|
+
const maxField = computed(() => gaugeConfig.value?.maxField)
|
|
96
65
|
const minValue = computed(() => {
|
|
97
66
|
const dynamicMin = minField.value ? parseOptionalNumber(firstRow.value[minField.value]) : undefined
|
|
98
67
|
return dynamicMin ?? parseOptionalNumber(gaugeConfig.value?.min) ?? 0
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, watch } from 'vue'
|
|
3
3
|
import { useWidgetData } from '../../queries/useWidgetData.js'
|
|
4
|
+
import {
|
|
5
|
+
normalizeKpiCardWidgetConfig,
|
|
6
|
+
} from '../../model/dashboard.types.js'
|
|
4
7
|
import type { DashboardWidgetConfig, DashboardWidgetTableData } from '../../model/dashboard.types.js'
|
|
5
8
|
import { formatChartValue, toFiniteNumber } from '../chart/chart.utils.js'
|
|
6
9
|
|
|
@@ -26,17 +29,12 @@ watch(
|
|
|
26
29
|
{ deep: true },
|
|
27
30
|
)
|
|
28
31
|
|
|
29
|
-
const kpiConfig = computed(() => props.widget.kpi_card
|
|
30
|
-
value_field?: string
|
|
31
|
-
label_field?: string
|
|
32
|
-
prefix?: string
|
|
33
|
-
suffix?: string
|
|
34
|
-
} | undefined)
|
|
32
|
+
const kpiConfig = computed(() => normalizeKpiCardWidgetConfig(props.widget.kpi_card))
|
|
35
33
|
const widgetData = computed(() => data.value?.data as DashboardWidgetTableData | null)
|
|
36
34
|
const columns = computed(() => widgetData.value?.columns ?? [])
|
|
37
35
|
const firstRow = computed(() => widgetData.value?.rows[0] ?? {})
|
|
38
|
-
const valueField = computed(() => kpiConfig.value?.
|
|
39
|
-
const labelField = computed(() => kpiConfig.value?.
|
|
36
|
+
const valueField = computed(() => kpiConfig.value?.valueField || columns.value[0])
|
|
37
|
+
const labelField = computed(() => kpiConfig.value?.labelField)
|
|
40
38
|
const value = computed(() => toFiniteNumber(firstRow.value[valueField.value]))
|
|
41
39
|
const label = computed(() => labelField.value ? String(firstRow.value[labelField.value]) : props.widget.label)
|
|
42
40
|
const formattedValue = computed(() => `${kpiConfig.value?.prefix ?? ''}${formatChartValue(value.value)}${kpiConfig.value?.suffix ?? ''}`)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, watch } from 'vue'
|
|
3
3
|
import { useWidgetData } from '../../queries/useWidgetData.js'
|
|
4
|
+
import {
|
|
5
|
+
normalizePivotTableWidgetConfig,
|
|
6
|
+
} from '../../model/dashboard.types.js'
|
|
4
7
|
import type { DashboardWidgetConfig, DashboardWidgetData } from '../../model/dashboard.types.js'
|
|
5
8
|
import { formatChartLabel, formatChartValue, toFiniteNumber } from '../chart/chart.utils.js'
|
|
6
9
|
|
|
@@ -26,20 +29,15 @@ watch(
|
|
|
26
29
|
{ deep: true },
|
|
27
30
|
)
|
|
28
31
|
|
|
29
|
-
const pivotConfig = computed(() => props.widget.pivot_table
|
|
30
|
-
row_field?: string
|
|
31
|
-
column_field?: string
|
|
32
|
-
value_field?: string
|
|
33
|
-
aggregation?: 'count' | 'sum'
|
|
34
|
-
} | undefined)
|
|
32
|
+
const pivotConfig = computed(() => normalizePivotTableWidgetConfig(props.widget.pivot_table))
|
|
35
33
|
const widgetData = computed(() => data.value?.data as DashboardWidgetData | null)
|
|
36
34
|
const rows = computed(() => widgetData.value?.rows ?? [])
|
|
37
35
|
const columns = computed(() => widgetData.value?.columns ?? [])
|
|
38
36
|
const isAggregateData = computed(() => widgetData.value?.kind === 'aggregate')
|
|
39
|
-
const shouldRenderAggregateMatrix = computed(() => isAggregateData.value && !pivotConfig.value?.
|
|
40
|
-
const rowField = computed(() => pivotConfig.value?.
|
|
41
|
-
const columnField = computed(() => pivotConfig.value?.
|
|
42
|
-
const valueField = computed(() => pivotConfig.value?.
|
|
37
|
+
const shouldRenderAggregateMatrix = computed(() => isAggregateData.value && !pivotConfig.value?.columnField)
|
|
38
|
+
const rowField = computed(() => pivotConfig.value?.rowField || (isAggregateData.value ? 'group' : columns.value[0]))
|
|
39
|
+
const columnField = computed(() => pivotConfig.value?.columnField || columns.value[1])
|
|
40
|
+
const valueField = computed(() => pivotConfig.value?.valueField || columns.value[2] || columns.value[1])
|
|
43
41
|
const aggregation = computed(() => pivotConfig.value?.aggregation || (valueField.value ? 'sum' : 'count'))
|
|
44
42
|
const pivotColumnLabels = computed(() => {
|
|
45
43
|
if (shouldRenderAggregateMatrix.value) {
|
|
@@ -132,7 +132,7 @@ const currentPage = ref(1)
|
|
|
132
132
|
const currentPageInput = ref(1)
|
|
133
133
|
const tableConfig = computed(() => props.widget.table as TableWidgetConfig | undefined)
|
|
134
134
|
const isPaginationEnabled = computed(() => tableConfig.value?.pagination !== false)
|
|
135
|
-
const pageSize = computed(() => tableConfig.value?.pageSize ??
|
|
135
|
+
const pageSize = computed(() => tableConfig.value?.pageSize ?? DEFAULT_PAGE_SIZE)
|
|
136
136
|
const dashboardSlugRef = computed(() => props.dashboardSlug)
|
|
137
137
|
const widgetIdRef = computed(() => props.widget.id)
|
|
138
138
|
const widgetDataRequest = computed(() => (
|
package/dist/endpoint/widgets.js
CHANGED
|
@@ -13,10 +13,27 @@ import { DashboardApiResponseSchema, DashboardWidgetDataResponseSchema, GroupIdR
|
|
|
13
13
|
import { StoredWidgetConfigSchema } from '../schema/widget.js';
|
|
14
14
|
function formatWidgetConfigValidationErrors(error) {
|
|
15
15
|
return error.issues.map((issue) => ({
|
|
16
|
-
field: issue.path.length ? issue.path.map(String).join('.') : 'config',
|
|
16
|
+
field: issue.path.length ? formatWidgetConfigFieldPath(issue.path.map(String).join('.')) : 'config',
|
|
17
17
|
message: issue.message,
|
|
18
18
|
}));
|
|
19
19
|
}
|
|
20
|
+
function formatWidgetConfigApiValidationErrors(errors) {
|
|
21
|
+
return errors.map((error) => (Object.assign(Object.assign({}, error), { field: formatWidgetConfigFieldPath(error.field) })));
|
|
22
|
+
}
|
|
23
|
+
function formatWidgetConfigFieldPath(field) {
|
|
24
|
+
const fieldAliases = new Map([
|
|
25
|
+
['minWidth', 'min_width'],
|
|
26
|
+
['maxWidth', 'max_width'],
|
|
27
|
+
['dataSource', 'data_source'],
|
|
28
|
+
['resourceId', 'resource_id'],
|
|
29
|
+
['groupBy', 'group_by'],
|
|
30
|
+
['pageSize', 'page_size'],
|
|
31
|
+
]);
|
|
32
|
+
return field
|
|
33
|
+
.split('.')
|
|
34
|
+
.map((segment) => { var _a; return (_a = fieldAliases.get(segment)) !== null && _a !== void 0 ? _a : segment; })
|
|
35
|
+
.join('.');
|
|
36
|
+
}
|
|
20
37
|
export function registerWidgetEndpoints(server, ctx) {
|
|
21
38
|
server.endpoint({
|
|
22
39
|
method: 'POST',
|
|
@@ -162,7 +179,7 @@ export function registerWidgetEndpoints(server, ctx) {
|
|
|
162
179
|
response.setStatus(422);
|
|
163
180
|
return {
|
|
164
181
|
error: 'Invalid widget config',
|
|
165
|
-
validationErrors: apiValidationErrors,
|
|
182
|
+
validationErrors: formatWidgetConfigApiValidationErrors(apiValidationErrors),
|
|
166
183
|
};
|
|
167
184
|
}
|
|
168
185
|
return ctx.persistDashboardConfig(dashboard, Object.assign(Object.assign({}, config), { widgets: config.widgets.map((item) => item.id === widgetId
|
|
@@ -172,7 +189,7 @@ export function registerWidgetEndpoints(server, ctx) {
|
|
|
172
189
|
server.endpoint({
|
|
173
190
|
method: 'POST',
|
|
174
191
|
path: '/dashboard/get_dashboard_widget_data',
|
|
175
|
-
description: 'Loads
|
|
192
|
+
description: 'Loads widget data for one dashboard widget by dashboard slug and widget id.',
|
|
176
193
|
request_schema: WidgetDataRequestSchema,
|
|
177
194
|
response_schema: DashboardWidgetDataResponseSchema,
|
|
178
195
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, response }) {
|
package/dist/schema/api.d.ts
CHANGED
|
@@ -125,18 +125,6 @@ export declare const DashboardConfigZodSchema: z.ZodObject<{
|
|
|
125
125
|
}, z.core.$strict>], "type">>;
|
|
126
126
|
target: z.ZodLiteral<"table">;
|
|
127
127
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
128
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
129
|
-
resource: z.ZodString;
|
|
130
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
132
|
-
field: z.ZodString;
|
|
133
|
-
direction: z.ZodEnum<{
|
|
134
|
-
asc: "asc";
|
|
135
|
-
desc: "desc";
|
|
136
|
-
}>;
|
|
137
|
-
}, z.core.$strip>>;
|
|
138
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
139
|
-
}, z.core.$strip>>;
|
|
140
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
141
129
|
id: z.ZodOptional<z.ZodString>;
|
|
142
130
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -244,18 +232,6 @@ export declare const DashboardConfigZodSchema: z.ZodObject<{
|
|
|
244
232
|
value_field: z.ZodOptional<z.ZodString>;
|
|
245
233
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
234
|
}, z.core.$strip>], "type">;
|
|
247
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
248
|
-
resource: z.ZodString;
|
|
249
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
251
|
-
field: z.ZodString;
|
|
252
|
-
direction: z.ZodEnum<{
|
|
253
|
-
asc: "asc";
|
|
254
|
-
desc: "desc";
|
|
255
|
-
}>;
|
|
256
|
-
}, z.core.$strip>>;
|
|
257
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
258
|
-
}, z.core.$strip>>;
|
|
259
235
|
}, z.core.$strip>, z.ZodObject<{
|
|
260
236
|
id: z.ZodOptional<z.ZodString>;
|
|
261
237
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -310,18 +286,6 @@ export declare const DashboardConfigZodSchema: z.ZodObject<{
|
|
|
310
286
|
}, z.core.$strict>], "type">>;
|
|
311
287
|
target: z.ZodLiteral<"kpi_card">;
|
|
312
288
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
313
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
314
|
-
resource: z.ZodString;
|
|
315
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
316
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
317
|
-
field: z.ZodString;
|
|
318
|
-
direction: z.ZodEnum<{
|
|
319
|
-
asc: "asc";
|
|
320
|
-
desc: "desc";
|
|
321
|
-
}>;
|
|
322
|
-
}, z.core.$strip>>;
|
|
323
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
324
|
-
}, z.core.$strip>>;
|
|
325
289
|
}, z.core.$strip>, z.ZodObject<{
|
|
326
290
|
id: z.ZodOptional<z.ZodString>;
|
|
327
291
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -376,18 +340,6 @@ export declare const DashboardConfigZodSchema: z.ZodObject<{
|
|
|
376
340
|
}, z.core.$strict>], "type">>;
|
|
377
341
|
target: z.ZodLiteral<"gauge_card">;
|
|
378
342
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
379
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
380
|
-
resource: z.ZodString;
|
|
381
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
383
|
-
field: z.ZodString;
|
|
384
|
-
direction: z.ZodEnum<{
|
|
385
|
-
asc: "asc";
|
|
386
|
-
desc: "desc";
|
|
387
|
-
}>;
|
|
388
|
-
}, z.core.$strip>>;
|
|
389
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
390
|
-
}, z.core.$strip>>;
|
|
391
343
|
}, z.core.$strip>, z.ZodObject<{
|
|
392
344
|
id: z.ZodOptional<z.ZodString>;
|
|
393
345
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -442,18 +394,6 @@ export declare const DashboardConfigZodSchema: z.ZodObject<{
|
|
|
442
394
|
}, z.core.$strict>], "type">>;
|
|
443
395
|
target: z.ZodLiteral<"pivot_table">;
|
|
444
396
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
445
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
446
|
-
resource: z.ZodString;
|
|
447
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
448
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
449
|
-
field: z.ZodString;
|
|
450
|
-
direction: z.ZodEnum<{
|
|
451
|
-
asc: "asc";
|
|
452
|
-
desc: "desc";
|
|
453
|
-
}>;
|
|
454
|
-
}, z.core.$strip>>;
|
|
455
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
456
|
-
}, z.core.$strip>>;
|
|
457
397
|
}, z.core.$strip>], "target">>;
|
|
458
398
|
}, z.core.$strip>;
|
|
459
399
|
export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
@@ -575,18 +515,6 @@ export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
|
575
515
|
}, z.core.$strict>], "type">>;
|
|
576
516
|
target: z.ZodLiteral<"table">;
|
|
577
517
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
578
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
579
|
-
resource: z.ZodString;
|
|
580
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
581
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
582
|
-
field: z.ZodString;
|
|
583
|
-
direction: z.ZodEnum<{
|
|
584
|
-
asc: "asc";
|
|
585
|
-
desc: "desc";
|
|
586
|
-
}>;
|
|
587
|
-
}, z.core.$strip>>;
|
|
588
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
589
|
-
}, z.core.$strip>>;
|
|
590
518
|
}, z.core.$strip>, z.ZodObject<{
|
|
591
519
|
id: z.ZodOptional<z.ZodString>;
|
|
592
520
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -694,18 +622,6 @@ export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
|
694
622
|
value_field: z.ZodOptional<z.ZodString>;
|
|
695
623
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
696
624
|
}, z.core.$strip>], "type">;
|
|
697
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
698
|
-
resource: z.ZodString;
|
|
699
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
700
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
701
|
-
field: z.ZodString;
|
|
702
|
-
direction: z.ZodEnum<{
|
|
703
|
-
asc: "asc";
|
|
704
|
-
desc: "desc";
|
|
705
|
-
}>;
|
|
706
|
-
}, z.core.$strip>>;
|
|
707
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
708
|
-
}, z.core.$strip>>;
|
|
709
625
|
}, z.core.$strip>, z.ZodObject<{
|
|
710
626
|
id: z.ZodOptional<z.ZodString>;
|
|
711
627
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -760,18 +676,6 @@ export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
|
760
676
|
}, z.core.$strict>], "type">>;
|
|
761
677
|
target: z.ZodLiteral<"kpi_card">;
|
|
762
678
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
763
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
764
|
-
resource: z.ZodString;
|
|
765
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
766
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
767
|
-
field: z.ZodString;
|
|
768
|
-
direction: z.ZodEnum<{
|
|
769
|
-
asc: "asc";
|
|
770
|
-
desc: "desc";
|
|
771
|
-
}>;
|
|
772
|
-
}, z.core.$strip>>;
|
|
773
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
774
|
-
}, z.core.$strip>>;
|
|
775
679
|
}, z.core.$strip>, z.ZodObject<{
|
|
776
680
|
id: z.ZodOptional<z.ZodString>;
|
|
777
681
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -826,18 +730,6 @@ export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
|
826
730
|
}, z.core.$strict>], "type">>;
|
|
827
731
|
target: z.ZodLiteral<"gauge_card">;
|
|
828
732
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
829
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
830
|
-
resource: z.ZodString;
|
|
831
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
832
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
833
|
-
field: z.ZodString;
|
|
834
|
-
direction: z.ZodEnum<{
|
|
835
|
-
asc: "asc";
|
|
836
|
-
desc: "desc";
|
|
837
|
-
}>;
|
|
838
|
-
}, z.core.$strip>>;
|
|
839
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
840
|
-
}, z.core.$strip>>;
|
|
841
733
|
}, z.core.$strip>, z.ZodObject<{
|
|
842
734
|
id: z.ZodOptional<z.ZodString>;
|
|
843
735
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -892,18 +784,6 @@ export declare const DashboardResponseZodSchema: z.ZodObject<{
|
|
|
892
784
|
}, z.core.$strict>], "type">>;
|
|
893
785
|
target: z.ZodLiteral<"pivot_table">;
|
|
894
786
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
895
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
896
|
-
resource: z.ZodString;
|
|
897
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
898
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
899
|
-
field: z.ZodString;
|
|
900
|
-
direction: z.ZodEnum<{
|
|
901
|
-
asc: "asc";
|
|
902
|
-
desc: "desc";
|
|
903
|
-
}>;
|
|
904
|
-
}, z.core.$strip>>;
|
|
905
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
906
|
-
}, z.core.$strip>>;
|
|
907
787
|
}, z.core.$strip>], "target">>;
|
|
908
788
|
}, z.core.$strip>;
|
|
909
789
|
}, z.core.$strip>;
|
|
@@ -1026,18 +906,6 @@ export declare const DashboardApiResponseZodSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
1026
906
|
}, z.core.$strict>], "type">>;
|
|
1027
907
|
target: z.ZodLiteral<"table">;
|
|
1028
908
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
1029
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1030
|
-
resource: z.ZodString;
|
|
1031
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1032
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1033
|
-
field: z.ZodString;
|
|
1034
|
-
direction: z.ZodEnum<{
|
|
1035
|
-
asc: "asc";
|
|
1036
|
-
desc: "desc";
|
|
1037
|
-
}>;
|
|
1038
|
-
}, z.core.$strip>>;
|
|
1039
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1040
|
-
}, z.core.$strip>>;
|
|
1041
909
|
}, z.core.$strip>, z.ZodObject<{
|
|
1042
910
|
id: z.ZodOptional<z.ZodString>;
|
|
1043
911
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1145,18 +1013,6 @@ export declare const DashboardApiResponseZodSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
1145
1013
|
value_field: z.ZodOptional<z.ZodString>;
|
|
1146
1014
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1147
1015
|
}, z.core.$strip>], "type">;
|
|
1148
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1149
|
-
resource: z.ZodString;
|
|
1150
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1151
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1152
|
-
field: z.ZodString;
|
|
1153
|
-
direction: z.ZodEnum<{
|
|
1154
|
-
asc: "asc";
|
|
1155
|
-
desc: "desc";
|
|
1156
|
-
}>;
|
|
1157
|
-
}, z.core.$strip>>;
|
|
1158
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1159
|
-
}, z.core.$strip>>;
|
|
1160
1016
|
}, z.core.$strip>, z.ZodObject<{
|
|
1161
1017
|
id: z.ZodOptional<z.ZodString>;
|
|
1162
1018
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1211,18 +1067,6 @@ export declare const DashboardApiResponseZodSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
1211
1067
|
}, z.core.$strict>], "type">>;
|
|
1212
1068
|
target: z.ZodLiteral<"kpi_card">;
|
|
1213
1069
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
1214
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1215
|
-
resource: z.ZodString;
|
|
1216
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1217
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1218
|
-
field: z.ZodString;
|
|
1219
|
-
direction: z.ZodEnum<{
|
|
1220
|
-
asc: "asc";
|
|
1221
|
-
desc: "desc";
|
|
1222
|
-
}>;
|
|
1223
|
-
}, z.core.$strip>>;
|
|
1224
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1225
|
-
}, z.core.$strip>>;
|
|
1226
1070
|
}, z.core.$strip>, z.ZodObject<{
|
|
1227
1071
|
id: z.ZodOptional<z.ZodString>;
|
|
1228
1072
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1277,18 +1121,6 @@ export declare const DashboardApiResponseZodSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
1277
1121
|
}, z.core.$strict>], "type">>;
|
|
1278
1122
|
target: z.ZodLiteral<"gauge_card">;
|
|
1279
1123
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
1280
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1281
|
-
resource: z.ZodString;
|
|
1282
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1283
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1284
|
-
field: z.ZodString;
|
|
1285
|
-
direction: z.ZodEnum<{
|
|
1286
|
-
asc: "asc";
|
|
1287
|
-
desc: "desc";
|
|
1288
|
-
}>;
|
|
1289
|
-
}, z.core.$strip>>;
|
|
1290
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1291
|
-
}, z.core.$strip>>;
|
|
1292
1124
|
}, z.core.$strip>, z.ZodObject<{
|
|
1293
1125
|
id: z.ZodOptional<z.ZodString>;
|
|
1294
1126
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1343,18 +1175,6 @@ export declare const DashboardApiResponseZodSchema: z.ZodUnion<readonly [z.ZodOb
|
|
|
1343
1175
|
}, z.core.$strict>], "type">>;
|
|
1344
1176
|
target: z.ZodLiteral<"pivot_table">;
|
|
1345
1177
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
1346
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1347
|
-
resource: z.ZodString;
|
|
1348
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1349
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1350
|
-
field: z.ZodString;
|
|
1351
|
-
direction: z.ZodEnum<{
|
|
1352
|
-
asc: "asc";
|
|
1353
|
-
desc: "desc";
|
|
1354
|
-
}>;
|
|
1355
|
-
}, z.core.$strip>>;
|
|
1356
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1357
|
-
}, z.core.$strip>>;
|
|
1358
1178
|
}, z.core.$strip>], "target">>;
|
|
1359
1179
|
}, z.core.$strip>;
|
|
1360
1180
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1472,18 +1292,6 @@ export declare const DashboardWidgetDataResponseZodSchema: z.ZodUnion<readonly [
|
|
|
1472
1292
|
}, z.core.$strict>], "type">>;
|
|
1473
1293
|
target: z.ZodLiteral<"table">;
|
|
1474
1294
|
table: z.ZodOptional<z.ZodUnknown>;
|
|
1475
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1476
|
-
resource: z.ZodString;
|
|
1477
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1478
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1479
|
-
field: z.ZodString;
|
|
1480
|
-
direction: z.ZodEnum<{
|
|
1481
|
-
asc: "asc";
|
|
1482
|
-
desc: "desc";
|
|
1483
|
-
}>;
|
|
1484
|
-
}, z.core.$strip>>;
|
|
1485
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1486
|
-
}, z.core.$strip>>;
|
|
1487
1295
|
}, z.core.$strip>, z.ZodObject<{
|
|
1488
1296
|
id: z.ZodOptional<z.ZodString>;
|
|
1489
1297
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1591,18 +1399,6 @@ export declare const DashboardWidgetDataResponseZodSchema: z.ZodUnion<readonly [
|
|
|
1591
1399
|
value_field: z.ZodOptional<z.ZodString>;
|
|
1592
1400
|
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1593
1401
|
}, z.core.$strip>], "type">;
|
|
1594
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1595
|
-
resource: z.ZodString;
|
|
1596
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1597
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1598
|
-
field: z.ZodString;
|
|
1599
|
-
direction: z.ZodEnum<{
|
|
1600
|
-
asc: "asc";
|
|
1601
|
-
desc: "desc";
|
|
1602
|
-
}>;
|
|
1603
|
-
}, z.core.$strip>>;
|
|
1604
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1605
|
-
}, z.core.$strip>>;
|
|
1606
1402
|
}, z.core.$strip>, z.ZodObject<{
|
|
1607
1403
|
id: z.ZodOptional<z.ZodString>;
|
|
1608
1404
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1657,18 +1453,6 @@ export declare const DashboardWidgetDataResponseZodSchema: z.ZodUnion<readonly [
|
|
|
1657
1453
|
}, z.core.$strict>], "type">>;
|
|
1658
1454
|
target: z.ZodLiteral<"kpi_card">;
|
|
1659
1455
|
kpi_card: z.ZodOptional<z.ZodUnknown>;
|
|
1660
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1661
|
-
resource: z.ZodString;
|
|
1662
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1663
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1664
|
-
field: z.ZodString;
|
|
1665
|
-
direction: z.ZodEnum<{
|
|
1666
|
-
asc: "asc";
|
|
1667
|
-
desc: "desc";
|
|
1668
|
-
}>;
|
|
1669
|
-
}, z.core.$strip>>;
|
|
1670
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1671
|
-
}, z.core.$strip>>;
|
|
1672
1456
|
}, z.core.$strip>, z.ZodObject<{
|
|
1673
1457
|
id: z.ZodOptional<z.ZodString>;
|
|
1674
1458
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1723,18 +1507,6 @@ export declare const DashboardWidgetDataResponseZodSchema: z.ZodUnion<readonly [
|
|
|
1723
1507
|
}, z.core.$strict>], "type">>;
|
|
1724
1508
|
target: z.ZodLiteral<"gauge_card">;
|
|
1725
1509
|
gauge_card: z.ZodOptional<z.ZodUnknown>;
|
|
1726
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1727
|
-
resource: z.ZodString;
|
|
1728
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1729
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1730
|
-
field: z.ZodString;
|
|
1731
|
-
direction: z.ZodEnum<{
|
|
1732
|
-
asc: "asc";
|
|
1733
|
-
desc: "desc";
|
|
1734
|
-
}>;
|
|
1735
|
-
}, z.core.$strip>>;
|
|
1736
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1737
|
-
}, z.core.$strip>>;
|
|
1738
1510
|
}, z.core.$strip>, z.ZodObject<{
|
|
1739
1511
|
id: z.ZodOptional<z.ZodString>;
|
|
1740
1512
|
group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1789,18 +1561,6 @@ export declare const DashboardWidgetDataResponseZodSchema: z.ZodUnion<readonly [
|
|
|
1789
1561
|
}, z.core.$strict>], "type">>;
|
|
1790
1562
|
target: z.ZodLiteral<"pivot_table">;
|
|
1791
1563
|
pivot_table: z.ZodOptional<z.ZodUnknown>;
|
|
1792
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
1793
|
-
resource: z.ZodString;
|
|
1794
|
-
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1795
|
-
order: z.ZodOptional<z.ZodObject<{
|
|
1796
|
-
field: z.ZodString;
|
|
1797
|
-
direction: z.ZodEnum<{
|
|
1798
|
-
asc: "asc";
|
|
1799
|
-
desc: "desc";
|
|
1800
|
-
}>;
|
|
1801
|
-
}, z.core.$strip>>;
|
|
1802
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
1803
|
-
}, z.core.$strip>>;
|
|
1804
1564
|
}, z.core.$strip>], "target">;
|
|
1805
1565
|
data: z.ZodUnknown;
|
|
1806
1566
|
}, z.core.$strip>, z.ZodObject<{
|