@stoker-platform/types 0.5.23 → 0.5.24
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/package.json +1 -1
- package/src/types/app.ts +11 -1
package/package.json
CHANGED
package/src/types/app.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
RoleGroup,
|
|
20
20
|
StokerCollection,
|
|
21
21
|
StokerPermissions,
|
|
22
|
+
StokerRecord,
|
|
22
23
|
StokerRole,
|
|
23
24
|
} from "./schema"
|
|
24
25
|
|
|
@@ -110,6 +111,7 @@ export interface DashboardMetric {
|
|
|
110
111
|
prefix?: string
|
|
111
112
|
suffix?: string
|
|
112
113
|
textSize?: "text-xl" | "text-2xl" | "text-3xl"
|
|
114
|
+
constraints?: [string, WhereFilterOp, unknown][]
|
|
113
115
|
}
|
|
114
116
|
export interface DashboardChart {
|
|
115
117
|
kind: "chart"
|
|
@@ -118,9 +120,17 @@ export interface DashboardChart {
|
|
|
118
120
|
dateField: string
|
|
119
121
|
metricField1?: string
|
|
120
122
|
metricField2?: string
|
|
121
|
-
|
|
123
|
+
formula1?: (record: StokerRecord) => number
|
|
124
|
+
formula2?: (record: StokerRecord) => number
|
|
125
|
+
label1?: string | (() => string)
|
|
126
|
+
label2?: string | (() => string)
|
|
127
|
+
yAxis?: { show?: boolean | (() => boolean) }
|
|
122
128
|
roles?: StokerRole[]
|
|
123
129
|
title?: string
|
|
130
|
+
constraints?: [string, WhereFilterOp, unknown][]
|
|
131
|
+
interval?: "day" | "month" | "year"
|
|
132
|
+
numberOfIntervals?: number
|
|
133
|
+
offset?: number
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
export interface DashboardReminder {
|