@stoker-platform/types 0.5.23 → 0.5.25

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/types/app.ts +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/types",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@fullcalendar/core": "^6.1.20",
26
26
  "@google-cloud/storage": "^7.19.0",
27
- "firebase": "^12.10.0",
27
+ "firebase": "^12.11.0",
28
28
  "firebase-admin": "^13.7.0"
29
29
  }
30
30
  }
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
- defaultRange: "90d" | "30d" | "7d"
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 {