@stoker-platform/types 0.5.21 → 0.5.23

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.21",
3
+ "version": "0.5.23",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
package/src/types/app.ts CHANGED
@@ -265,8 +265,9 @@ export interface GlobalConfigCache {
265
265
  timezone?: string
266
266
  auth?: {
267
267
  enableMultiFactorAuth?: boolean | StokerRole[]
268
- autoRefreshAppCheckToken?: boolean
269
268
  authPersistenceType?: "LOCAL" | "SESSION" | "NONE"
269
+ signOutOnPermissionsChange?: boolean
270
+ clearPersistenceOnSignOut?: boolean
270
271
  offlinePersistenceType?: "ALL" | "WRITE" | "NONE"
271
272
  tabManager?: "SINGLE" | "MULTI"
272
273
  garbageCollectionStrategy?: "LRU" | "EAGER"
@@ -274,6 +275,7 @@ export interface GlobalConfigCache {
274
275
  maxWriteCacheSize?: number
275
276
  }
276
277
  firebase?: {
278
+ enableEmulators?: boolean
277
279
  disableIndividualEmulators?: ("Auth" | "Database" | "Firestore" | "Storage" | "Functions")[]
278
280
  GDPRSettings?: boolean
279
281
  enableAnalytics?: boolean
@@ -294,15 +296,18 @@ export interface GlobalConfigCache {
294
296
  }
295
297
  enableUserIDLogging?: boolean
296
298
  admin?: {
299
+ access?: StokerRole[]
300
+ background?: Background
297
301
  logo?: {
298
- small?: string
299
- large?: string
302
+ navbar?: string
303
+ login?: string
300
304
  }
301
305
  menu?: {
302
- groups?: string[]
306
+ groups?: MenuGroup[]
303
307
  }
304
308
  dateFormat?: string
305
309
  meta?: {
310
+ description?: string
306
311
  icons?: MetaIcon[]
307
312
  }
308
313
  dashboard?: DashboardItem[]
@@ -493,9 +493,26 @@ export interface CardsConfig {
493
493
  export interface ImagesConfig {
494
494
  roles?: StokerRole[]
495
495
  imageField: string
496
- size: "sm" | "md" | "lg"
496
+ size: "sm" | "md" | "lg" | "xl"
497
497
  maxHeaderLines?: 1 | 2
498
498
  title?: string
499
+ customComponent?: {
500
+ component: React.FC<{
501
+ record: StokerRecord | undefined
502
+ parentRecord?: StokerRecord
503
+ collection: CollectionSchema
504
+ parentCollection?: CollectionSchema
505
+ isAssigning?: boolean
506
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
507
+ components: any
508
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
509
+ hooks: any
510
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
511
+ utils: any
512
+ }>
513
+ height: number
514
+ condition?: (parentCollection?: CollectionSchema, parentRecord?: StokerRecord, isAssigning?: boolean) => boolean
515
+ }
499
516
  }
500
517
 
501
518
  export interface MapConfig {
@@ -668,6 +685,13 @@ export interface Assignable {
668
685
  unavailableField?: string
669
686
  }
670
687
 
688
+ export interface CustomListAction {
689
+ title: string
690
+ icon?: React.FC<{ className?: string }>
691
+ action: () => void | Promise<void>
692
+ condition?: () => boolean
693
+ }
694
+
671
695
  export interface CollectionAdmin {
672
696
  hidden?: boolean | (() => boolean | Promise<boolean>)
673
697
  navbarPosition?: number | (() => number)
@@ -754,8 +778,10 @@ export interface CollectionAdmin {
754
778
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
755
779
  retriever?: () => any | Promise<any>
756
780
  assignable?: Assignable[] | (() => Assignable[] | Promise<Assignable[]>)
781
+ customListActions?: CustomListAction[] | (() => CustomListAction[] | Promise<CustomListAction[]>)
757
782
  }
758
783
  export interface CollectionAdminCache {
784
+ hidden?: boolean
759
785
  navbarPosition?: number
760
786
  titles?: {
761
787
  collection: string
@@ -770,6 +796,8 @@ export interface CollectionAdminCache {
770
796
  active?: unknown[]
771
797
  archived?: unknown[]
772
798
  }
799
+ defaultView?: "list" | "cards" | "images" | "map" | "calendar"
800
+ defaultRoute?: string
773
801
  defaultSort?: {
774
802
  field: string
775
803
  direction?: "asc" | "desc"
@@ -781,6 +809,8 @@ export interface CollectionAdminCache {
781
809
  map?: MapConfig
782
810
  calendar?: CalendarConfig
783
811
  filters?: Filter[]
812
+ rangeSelectorValues?: "range" | "week" | "month" | ("range" | "week" | "month")[]
813
+ defaultRangeSelector?: "range" | "week" | "month"
784
814
  restrictExport?: StokerRole[]
785
815
  metrics?: (Metric | Chart)[]
786
816
  meta?: CollectionMeta
@@ -793,6 +823,10 @@ export interface CollectionAdminCache {
793
823
  formImages?: boolean
794
824
  formLists?: FormList[]
795
825
  hideCreate?: boolean
826
+ disableUpdate?: boolean
827
+ disableRangeSelector?: boolean
828
+ assignable?: Assignable[]
829
+ customListActions?: CustomListAction[]
796
830
  }
797
831
 
798
832
  export interface FieldCustom extends Hooks {