@stoker-platform/types 0.5.67 → 0.5.69

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.67",
3
+ "version": "0.5.69",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
@@ -22,9 +22,9 @@
22
22
  "npm": "11"
23
23
  },
24
24
  "dependencies": {
25
- "@fullcalendar/core": "^6.1.20",
26
- "@google-cloud/storage": "^7.19.0",
27
- "firebase": "^12.14.0",
28
- "firebase-admin": "^13.10.0"
25
+ "@fullcalendar/core": "^6.1.21",
26
+ "@google-cloud/storage": "^8.0.1",
27
+ "firebase": "^12.18.0",
28
+ "firebase-admin": "^14.3.0"
29
29
  }
30
30
  }
package/src/types/app.ts CHANGED
@@ -35,10 +35,7 @@ import { FirebaseError } from "firebase-admin"
35
35
  export interface AuthConfig {
36
36
  enableMultiFactorAuth: boolean | StokerRole[]
37
37
  authPersistenceType:
38
- | "LOCAL"
39
- | "SESSION"
40
- | "NONE"
41
- | (() => "LOCAL" | "SESSION" | "NONE" | Promise<"LOCAL" | "SESSION" | "NONE">)
38
+ "LOCAL" | "SESSION" | "NONE" | (() => "LOCAL" | "SESSION" | "NONE" | Promise<"LOCAL" | "SESSION" | "NONE">)
42
39
  signOutOnPermissionsChange?: boolean
43
40
  clearPersistenceOnSignOut?: boolean
44
41
  offlinePersistenceType:
@@ -3,6 +3,7 @@ import { Timestamp, WhereFilterOp, WriteBatch } from "firebase/firestore"
3
3
  import { NodeUtilities, WebUtilities } from "./app"
4
4
  import { CalendarOptions } from "@fullcalendar/core"
5
5
  import { SearchOptions } from "minisearch"
6
+ import { UserRecord } from "firebase-admin/auth"
6
7
 
7
8
  export type StokerRole = string
8
9
  export type StokerCollection = string
@@ -175,9 +176,7 @@ export interface ParentPropertyEntityParentFilter {
175
176
  roles: EntityRestrictionRole[]
176
177
  }
177
178
  export type EntityParentFilter =
178
- | IndividualEntityParentFilter
179
- | ParentEntityParentFilter
180
- | ParentPropertyEntityParentFilter
179
+ IndividualEntityParentFilter | ParentEntityParentFilter | ParentPropertyEntityParentFilter
181
180
 
182
181
  export interface AccessOperations {
183
182
  assignable?: boolean | StokerRole[]
@@ -453,10 +452,15 @@ export interface PreloadCacheInitial {
453
452
 
454
453
  export interface CollectionCustom extends Hooks {
455
454
  serverAccess?: {
456
- read?: (role: StokerRole, record?: StokerRecord) => boolean | Promise<boolean>
457
- create?: (role: StokerRole, record: StokerRecord) => boolean | Promise<boolean>
458
- update?: (role: StokerRole, record: StokerRecord, originalRecord?: StokerRecord) => boolean | Promise<boolean>
459
- delete?: (role: StokerRole, record: StokerRecord) => boolean | Promise<boolean>
455
+ read?: (permissions: StokerPermissions, user: UserRecord, record?: StokerRecord) => boolean | Promise<boolean>
456
+ create?: (permissions: StokerPermissions, user: UserRecord, record: StokerRecord) => boolean | Promise<boolean>
457
+ update?: (
458
+ permissions: StokerPermissions,
459
+ user: UserRecord,
460
+ record: StokerRecord,
461
+ originalRecord?: StokerRecord,
462
+ ) => boolean | Promise<boolean>
463
+ delete?: (permissions: StokerPermissions, user: UserRecord, record: StokerRecord) => boolean | Promise<boolean>
460
464
  }
461
465
  preloadCacheConstraints?:
462
466
  | [string, WhereFilterOp, unknown][]
@@ -904,9 +908,14 @@ export interface CollectionAdminCache {
904
908
  export interface FieldCustom extends Hooks {
905
909
  initialValue?: unknown | ((record?: StokerRecord) => unknown | Promise<unknown>)
906
910
  serverAccess?: {
907
- read?: (role: StokerRole, record?: StokerRecord) => boolean | Promise<boolean>
908
- create?: (role: StokerRole, record: StokerRecord) => boolean | Promise<boolean>
909
- update?: (role: StokerRole, record: StokerRecord, originalRecord?: StokerRecord) => boolean | Promise<boolean>
911
+ read?: (permissions: StokerPermissions, user: UserRecord, record?: StokerRecord) => boolean | Promise<boolean>
912
+ create?: (permissions: StokerPermissions, user: UserRecord, record: StokerRecord) => boolean | Promise<boolean>
913
+ update?: (
914
+ permissions: StokerPermissions,
915
+ user: UserRecord,
916
+ record: StokerRecord,
917
+ originalRecord?: StokerRecord,
918
+ ) => boolean | Promise<boolean>
910
919
  }
911
920
  }
912
921