@stoker-platform/types 0.5.22 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/types",
3
- "version": "0.5.22",
3
+ "version": "0.5.24",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
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 {
@@ -265,8 +275,9 @@ export interface GlobalConfigCache {
265
275
  timezone?: string
266
276
  auth?: {
267
277
  enableMultiFactorAuth?: boolean | StokerRole[]
268
- autoRefreshAppCheckToken?: boolean
269
278
  authPersistenceType?: "LOCAL" | "SESSION" | "NONE"
279
+ signOutOnPermissionsChange?: boolean
280
+ clearPersistenceOnSignOut?: boolean
270
281
  offlinePersistenceType?: "ALL" | "WRITE" | "NONE"
271
282
  tabManager?: "SINGLE" | "MULTI"
272
283
  garbageCollectionStrategy?: "LRU" | "EAGER"
@@ -274,6 +285,7 @@ export interface GlobalConfigCache {
274
285
  maxWriteCacheSize?: number
275
286
  }
276
287
  firebase?: {
288
+ enableEmulators?: boolean
277
289
  disableIndividualEmulators?: ("Auth" | "Database" | "Firestore" | "Storage" | "Functions")[]
278
290
  GDPRSettings?: boolean
279
291
  enableAnalytics?: boolean
@@ -294,15 +306,18 @@ export interface GlobalConfigCache {
294
306
  }
295
307
  enableUserIDLogging?: boolean
296
308
  admin?: {
309
+ access?: StokerRole[]
310
+ background?: Background
297
311
  logo?: {
298
- small?: string
299
- large?: string
312
+ navbar?: string
313
+ login?: string
300
314
  }
301
315
  menu?: {
302
- groups?: string[]
316
+ groups?: MenuGroup[]
303
317
  }
304
318
  dateFormat?: string
305
319
  meta?: {
320
+ description?: string
306
321
  icons?: MetaIcon[]
307
322
  }
308
323
  dashboard?: DashboardItem[]
@@ -685,6 +685,13 @@ export interface Assignable {
685
685
  unavailableField?: string
686
686
  }
687
687
 
688
+ export interface CustomListAction {
689
+ title: string
690
+ icon?: React.FC<{ className?: string }>
691
+ action: () => void | Promise<void>
692
+ condition?: () => boolean
693
+ }
694
+
688
695
  export interface CollectionAdmin {
689
696
  hidden?: boolean | (() => boolean | Promise<boolean>)
690
697
  navbarPosition?: number | (() => number)
@@ -771,8 +778,10 @@ export interface CollectionAdmin {
771
778
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
772
779
  retriever?: () => any | Promise<any>
773
780
  assignable?: Assignable[] | (() => Assignable[] | Promise<Assignable[]>)
781
+ customListActions?: CustomListAction[] | (() => CustomListAction[] | Promise<CustomListAction[]>)
774
782
  }
775
783
  export interface CollectionAdminCache {
784
+ hidden?: boolean
776
785
  navbarPosition?: number
777
786
  titles?: {
778
787
  collection: string
@@ -787,6 +796,8 @@ export interface CollectionAdminCache {
787
796
  active?: unknown[]
788
797
  archived?: unknown[]
789
798
  }
799
+ defaultView?: "list" | "cards" | "images" | "map" | "calendar"
800
+ defaultRoute?: string
790
801
  defaultSort?: {
791
802
  field: string
792
803
  direction?: "asc" | "desc"
@@ -798,6 +809,8 @@ export interface CollectionAdminCache {
798
809
  map?: MapConfig
799
810
  calendar?: CalendarConfig
800
811
  filters?: Filter[]
812
+ rangeSelectorValues?: "range" | "week" | "month" | ("range" | "week" | "month")[]
813
+ defaultRangeSelector?: "range" | "week" | "month"
801
814
  restrictExport?: StokerRole[]
802
815
  metrics?: (Metric | Chart)[]
803
816
  meta?: CollectionMeta
@@ -810,6 +823,10 @@ export interface CollectionAdminCache {
810
823
  formImages?: boolean
811
824
  formLists?: FormList[]
812
825
  hideCreate?: boolean
826
+ disableUpdate?: boolean
827
+ disableRangeSelector?: boolean
828
+ assignable?: Assignable[]
829
+ customListActions?: CustomListAction[]
813
830
  }
814
831
 
815
832
  export interface FieldCustom extends Hooks {