@stoker-platform/types 0.5.30 → 0.5.32
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 +1 -1
- package/src/types/app.ts +7 -5
- package/src/types/schema.ts +15 -12
package/package.json
CHANGED
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
|
|
182
|
-
sdk: "web" | "node"
|
|
183
|
-
|
|
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
|
-
|
|
185
|
+
context?: any
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type GenerateGlobalConfig = (params: GenerateGlobalConfigParams) => GlobalConfig
|
|
187
189
|
|
|
188
190
|
export type Region =
|
|
189
191
|
| "asia-east1"
|
package/src/types/schema.ts
CHANGED
|
@@ -225,7 +225,7 @@ export interface CollectionAccess {
|
|
|
225
225
|
export type PreOperationHookArgs = {
|
|
226
226
|
operation: "read" | "create" | "update" | "delete"
|
|
227
227
|
data?: StokerRecord
|
|
228
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
290
|
+
recordId?: string
|
|
291
291
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
292
292
|
context?: any
|
|
293
293
|
retry?: boolean
|
|
@@ -466,8 +466,8 @@ export interface CollectionCustomCache {
|
|
|
466
466
|
disableOfflineDelete?: boolean
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
470
469
|
export interface ListConfig {
|
|
470
|
+
roles?: StokerRole[]
|
|
471
471
|
title?: string
|
|
472
472
|
}
|
|
473
473
|
|
|
@@ -940,6 +940,8 @@ export interface StandardField {
|
|
|
940
940
|
required?: boolean
|
|
941
941
|
nullable?: boolean
|
|
942
942
|
|
|
943
|
+
addToAuthToken?: boolean
|
|
944
|
+
|
|
943
945
|
access?: StokerRole[]
|
|
944
946
|
restrictCreate?: StokerRole[] | boolean
|
|
945
947
|
restrictUpdate?: StokerRole[] | boolean
|
|
@@ -1119,12 +1121,13 @@ export interface CollectionsSchema {
|
|
|
1119
1121
|
version: number
|
|
1120
1122
|
}
|
|
1121
1123
|
|
|
1122
|
-
export
|
|
1123
|
-
sdk: "web" | "node"
|
|
1124
|
-
|
|
1124
|
+
export interface GenerateSchemaParams {
|
|
1125
|
+
sdk: "web" | "node"
|
|
1126
|
+
utils?: WebUtilities | NodeUtilities
|
|
1125
1127
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1126
|
-
context?: any
|
|
1127
|
-
|
|
1128
|
+
context?: any
|
|
1129
|
+
}
|
|
1130
|
+
export type GenerateSchema = (params: GenerateSchemaParams) => CollectionSchema
|
|
1128
1131
|
|
|
1129
1132
|
export interface RoleGroup {
|
|
1130
1133
|
key: string
|