@stoker-platform/types 0.2.4 → 0.2.6
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 +2 -2
- package/src/types/schema.ts +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/types",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "src/main.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"tsconfig": "*"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": "22",
|
|
21
|
+
"node": ">=22",
|
|
22
22
|
"npm": "11"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
package/src/types/schema.ts
CHANGED
|
@@ -336,6 +336,8 @@ export type PostFileUpdateHookArgs = [
|
|
|
336
336
|
},
|
|
337
337
|
]
|
|
338
338
|
|
|
339
|
+
export type SetEmbeddingHookArgs = [record: StokerRecord]
|
|
340
|
+
|
|
339
341
|
export type HookArgs =
|
|
340
342
|
| PreOperationHookArgs
|
|
341
343
|
| PreReadHookArgs
|
|
@@ -350,6 +352,7 @@ export type HookArgs =
|
|
|
350
352
|
| PreFileUpdateHookArgs
|
|
351
353
|
| PostFileAddHookArgs
|
|
352
354
|
| PostFileUpdateHookArgs
|
|
355
|
+
| SetEmbeddingHookArgs
|
|
353
356
|
|
|
354
357
|
export type PreOperationHook = (...args: PreOperationHookArgs) => boolean | void | Promise<boolean | void>
|
|
355
358
|
export type PreReadHook = (...args: PreReadHookArgs) => void | Promise<void>
|
|
@@ -368,6 +371,8 @@ export type PreFileUpdateHook = (...args: PreFileUpdateHookArgs) => boolean | vo
|
|
|
368
371
|
export type PostFileAddHook = (...args: PostFileAddHookArgs) => boolean | void | Promise<boolean | void>
|
|
369
372
|
export type PostFileUpdateHook = (...args: PostFileUpdateHookArgs) => boolean | void | Promise<boolean | void>
|
|
370
373
|
|
|
374
|
+
export type SetEmbeddingHook = (...args: SetEmbeddingHookArgs) => string | Promise<string>
|
|
375
|
+
|
|
371
376
|
export type Hook =
|
|
372
377
|
| PreOperationHook
|
|
373
378
|
| PreReadHook
|
|
@@ -382,6 +387,7 @@ export type Hook =
|
|
|
382
387
|
| PreFileUpdateHook
|
|
383
388
|
| PostFileAddHook
|
|
384
389
|
| PostFileUpdateHook
|
|
390
|
+
| SetEmbeddingHook
|
|
385
391
|
|
|
386
392
|
export type Hooks = {
|
|
387
393
|
preOperation?: PreOperationHook
|
|
@@ -397,6 +403,7 @@ export type Hooks = {
|
|
|
397
403
|
preFileUpdate?: PreFileUpdateHook
|
|
398
404
|
postFileAdd?: PostFileAddHook
|
|
399
405
|
postFileUpdate?: PostFileUpdateHook
|
|
406
|
+
setEmbedding?: SetEmbeddingHook
|
|
400
407
|
}
|
|
401
408
|
|
|
402
409
|
export interface PreloadCacheRange {
|
|
@@ -1005,13 +1012,10 @@ export interface CollectionSchema {
|
|
|
1005
1012
|
roleSystemFields?: RoleSystemField[]
|
|
1006
1013
|
skipRulesValidation?: boolean
|
|
1007
1014
|
ai?: {
|
|
1008
|
-
embedding?:
|
|
1009
|
-
inputField: string
|
|
1010
|
-
outputField: string
|
|
1011
|
-
defaultQueryLimit?: number
|
|
1012
|
-
}
|
|
1015
|
+
embedding?: boolean
|
|
1013
1016
|
chat?: {
|
|
1014
1017
|
name: string
|
|
1018
|
+
defaultQueryLimit?: number
|
|
1015
1019
|
roles: StokerRole[]
|
|
1016
1020
|
}
|
|
1017
1021
|
}
|