@stoker-platform/types 0.5.30 → 0.5.31

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.30",
3
+ "version": "0.5.31",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
package/src/types/app.ts CHANGED
@@ -178,12 +178,14 @@ export interface AdminConfig {
178
178
  homePage?: Record<StokerRole, StokerCollection> | (() => Record<StokerRole, StokerCollection>)
179
179
  }
180
180
 
181
- export type GenerateGlobalConfig = (
182
- sdk: "web" | "node",
183
- config?: WebUtilities | NodeUtilities,
181
+ export interface GenerateGlobalConfigParams {
182
+ sdk: "web" | "node"
183
+ utils?: WebUtilities | NodeUtilities
184
184
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
185
- context?: any,
186
- ) => GlobalConfig
185
+ context?: any
186
+ }
187
+
188
+ export type GenerateGlobalConfig = (params: GenerateGlobalConfigParams) => GlobalConfig
187
189
 
188
190
  export type Region =
189
191
  | "asia-east1"
@@ -225,7 +225,7 @@ export interface CollectionAccess {
225
225
  export type PreOperationHookArgs = {
226
226
  operation: "read" | "create" | "update" | "delete"
227
227
  data?: StokerRecord
228
- docId?: string
228
+ recordId?: string
229
229
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
230
230
  context?: any
231
231
  batch?: WriteBatch
@@ -242,7 +242,7 @@ export type PostReadHookArgs = {
242
242
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
243
243
  context: any
244
244
  refs: unknown[]
245
- doc?: StokerRecord
245
+ record?: StokerRecord
246
246
  listener?: boolean
247
247
  }
248
248
  export type PreDuplicateHookArgs = { data: Partial<StokerRecord> }
@@ -257,7 +257,7 @@ export type PreValidateHookArgs = {
257
257
  export type PreWriteHookArgs = {
258
258
  operation: "create" | "update" | "delete"
259
259
  data: StokerRecord
260
- docId: string
260
+ recordId: string
261
261
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
262
262
  context: any
263
263
  batch?: WriteBatch
@@ -266,7 +266,7 @@ export type PreWriteHookArgs = {
266
266
  export type PostWriteHookArgs = {
267
267
  operation: "create" | "update" | "delete"
268
268
  data: StokerRecord
269
- docId: string
269
+ recordId: string
270
270
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
271
271
  context: any
272
272
  retry?: boolean
@@ -275,7 +275,7 @@ export type PostWriteHookArgs = {
275
275
  export type PostWriteErrorHookArgs = {
276
276
  operation: "create" | "update" | "delete"
277
277
  data: StokerRecord
278
- docId: string
278
+ recordId: string
279
279
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
280
280
  context: any
281
281
  error: unknown
@@ -287,7 +287,7 @@ export type PostWriteErrorHookArgs = {
287
287
  export type PostOperationHookArgs = {
288
288
  operation: "read" | "create" | "update" | "delete"
289
289
  data?: StokerRecord
290
- docId?: string
290
+ recordId?: string
291
291
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
292
292
  context?: any
293
293
  retry?: boolean
@@ -1119,12 +1119,13 @@ export interface CollectionsSchema {
1119
1119
  version: number
1120
1120
  }
1121
1121
 
1122
- export type GenerateSchema = (
1123
- sdk: "web" | "node",
1124
- config?: WebUtilities | NodeUtilities,
1122
+ export interface GenerateSchemaParams {
1123
+ sdk: "web" | "node"
1124
+ utils?: WebUtilities | NodeUtilities
1125
1125
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1126
- context?: any,
1127
- ) => CollectionSchema
1126
+ context?: any
1127
+ }
1128
+ export type GenerateSchema = (params: GenerateSchemaParams) => CollectionSchema
1128
1129
 
1129
1130
  export interface RoleGroup {
1130
1131
  key: string