@junobuild/functions 0.5.6 → 0.6.0-next-2026-03-13
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/README.md +753 -323
- package/canisters/_canister.d.ts +1 -1
- package/canisters/cmc/index.js +1 -1
- package/canisters/index.js +1 -1
- package/canisters/ledger/icp/index.js +1 -1
- package/canisters/ledger/icrc/index.js +1 -1
- package/canisters/ledger/icrc/schemas.d.ts +1 -1
- package/canisters/schemas.d.ts +1 -1
- package/{chunk-5NZMOUKF.js → chunk-2LVPADWI.js} +2 -2
- package/chunk-7JYM2CKB.js +2 -0
- package/chunk-7JYM2CKB.js.map +7 -0
- package/chunk-HVIYPRXX.js +2 -0
- package/chunk-HVIYPRXX.js.map +7 -0
- package/{chunk-EMQQE34V.js → chunk-W42LR3ZN.js} +2 -2
- package/chunk-XRHVLXYG.js +2 -0
- package/functions/constants.d.ts +8 -0
- package/functions/query.d.ts +49 -0
- package/functions/schemas/function.d.ts +170 -0
- package/functions/update.d.ts +49 -0
- package/functions/wrappers.d.ts +1 -0
- package/global.d.ts +1 -0
- package/hooks/assertions.d.ts +57 -57
- package/hooks/hooks.d.ts +116 -116
- package/hooks/schemas/context.d.ts +1 -1
- package/hooks/schemas/db/context.d.ts +26 -26
- package/hooks/schemas/db/payload.d.ts +9 -9
- package/hooks/schemas/storage/context.d.ts +19 -19
- package/hooks/schemas/storage/payload.d.ts +3 -3
- package/ic-cdk/caller.ic-cdk.d.ts +15 -0
- package/ic-cdk/id.ic-cdk.d.ts +11 -1
- package/ic-cdk/schemas/call.d.ts +1 -1
- package/ic-cdk.d.ts +1 -0
- package/ic-cdk.js +1 -1
- package/ic-cdk.js.map +4 -4
- package/index.d.ts +5 -1
- package/index.js +1 -1
- package/index.js.map +4 -4
- package/package.json +6 -5
- package/schemas/candid.d.ts +5 -6
- package/schemas/db.d.ts +7 -8
- package/schemas/list.d.ts +1 -1
- package/schemas/satellite.d.ts +4 -3
- package/schemas/storage.d.ts +9 -9
- package/sdk/schemas/controllers.d.ts +4 -4
- package/sdk/schemas/db.d.ts +10 -10
- package/sdk/schemas/params.d.ts +2 -2
- package/sdk/schemas/storage.d.ts +12 -12
- package/sdk.js +1 -1
- package/sdk.js.map +4 -4
- package/src/global.d.ts +1 -0
- package/utils/zod.utils.d.ts +4 -1
- package/chunk-7B6WU32N.js +0 -2
- package/chunk-7B6WU32N.js.map +0 -7
- package/chunk-KVADXJMF.js +0 -2
- package/chunk-KVADXJMF.js.map +0 -7
- package/chunk-TZVF5LQY.js +0 -2
- /package/{chunk-5NZMOUKF.js.map → chunk-2LVPADWI.js.map} +0 -0
- /package/{chunk-EMQQE34V.js.map → chunk-W42LR3ZN.js.map} +0 -0
- /package/{chunk-TZVF5LQY.js.map → chunk-XRHVLXYG.js.map} +0 -0
- /package/{hooks/schemas → schemas}/satellite.env.d.ts +0 -0
package/README.md
CHANGED
|
@@ -15,6 +15,18 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
15
15
|
### :toolbox: Functions
|
|
16
16
|
|
|
17
17
|
- [createFunctionSchema](#gear-createfunctionschema)
|
|
18
|
+
- [QueryFnSchema](#gear-queryfnschema)
|
|
19
|
+
- [QueryFnOrObjectSchema](#gear-queryfnorobjectschema)
|
|
20
|
+
- [defineQuery](#gear-definequery)
|
|
21
|
+
- [defineQuery](#gear-definequery)
|
|
22
|
+
- [defineQuery](#gear-definequery)
|
|
23
|
+
- [defineQuery](#gear-definequery)
|
|
24
|
+
- [UpdateFnSchema](#gear-updatefnschema)
|
|
25
|
+
- [UpdateFnOrObjectSchema](#gear-updatefnorobjectschema)
|
|
26
|
+
- [defineUpdate](#gear-defineupdate)
|
|
27
|
+
- [defineUpdate](#gear-defineupdate)
|
|
28
|
+
- [defineUpdate](#gear-defineupdate)
|
|
29
|
+
- [defineUpdate](#gear-defineupdate)
|
|
18
30
|
- [HookContextSchema](#gear-hookcontextschema)
|
|
19
31
|
- [AssertFunctionSchema](#gear-assertfunctionschema)
|
|
20
32
|
- [RunFunctionSchema](#gear-runfunctionschema)
|
|
@@ -32,6 +44,8 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
32
44
|
- [defineHook](#gear-definehook)
|
|
33
45
|
- [defineHook](#gear-definehook)
|
|
34
46
|
- [createListResultsSchema](#gear-createlistresultsschema)
|
|
47
|
+
- [decodeDocData](#gear-decodedocdata)
|
|
48
|
+
- [encodeDocData](#gear-encodedocdata)
|
|
35
49
|
- [normalizeCaller](#gear-normalizecaller)
|
|
36
50
|
- [getAdminControllers](#gear-getadmincontrollers)
|
|
37
51
|
- [getControllers](#gear-getcontrollers)
|
|
@@ -45,8 +59,6 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
45
59
|
- [countDocsStore](#gear-countdocsstore)
|
|
46
60
|
- [deleteDocsStore](#gear-deletedocsstore)
|
|
47
61
|
- [deleteFilteredDocsStore](#gear-deletefiltereddocsstore)
|
|
48
|
-
- [decodeDocData](#gear-decodedocdata)
|
|
49
|
-
- [encodeDocData](#gear-encodedocdata)
|
|
50
62
|
- [countCollectionAssetsStore](#gear-countcollectionassetsstore)
|
|
51
63
|
- [countAssetsStore](#gear-countassetsstore)
|
|
52
64
|
- [setAssetHandler](#gear-setassethandler)
|
|
@@ -58,7 +70,11 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
58
70
|
- [listAssetsStore](#gear-listassetsstore)
|
|
59
71
|
- [getContentChunksStore](#gear-getcontentchunksstore)
|
|
60
72
|
- [call](#gear-call)
|
|
73
|
+
- [msgCaller](#gear-msgcaller)
|
|
74
|
+
- [caller](#gear-caller)
|
|
75
|
+
- [canisterSelf](#gear-canisterself)
|
|
61
76
|
- [id](#gear-id)
|
|
77
|
+
- [satelliteSelf](#gear-satelliteself)
|
|
62
78
|
- [time](#gear-time)
|
|
63
79
|
|
|
64
80
|
#### :gear: createFunctionSchema
|
|
@@ -81,19 +97,118 @@ parse time, but the returned value is the **original function** you passed
|
|
|
81
97
|
in — no runtime wrapper, no sync/async mismatch.
|
|
82
98
|
|
|
83
99
|
Reference:
|
|
84
|
-
https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
|
|
100
|
+
https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
|
|
101
|
+
|
|
102
|
+
Note: We need the function for this library, see following comment
|
|
103
|
+
https://github.com/colinhacks/zod/issues/4143#issuecomment-3335735535
|
|
85
104
|
|
|
86
105
|
| Function | Type |
|
|
87
106
|
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
88
107
|
| `createFunctionSchema` | `<T extends z.ZodFunction>(schema: T) => ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]>` |
|
|
89
108
|
|
|
90
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/utils/zod.utils.ts#
|
|
109
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/utils/zod.utils.ts#L27)
|
|
110
|
+
|
|
111
|
+
#### :gear: QueryFnSchema
|
|
112
|
+
|
|
113
|
+
| Function | Type |
|
|
114
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `QueryFnSchema` | `<T extends z.ZodTypeAny>(querySchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>` |
|
|
116
|
+
|
|
117
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L66)
|
|
118
|
+
|
|
119
|
+
#### :gear: QueryFnOrObjectSchema
|
|
120
|
+
|
|
121
|
+
| Function | Type |
|
|
122
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
123
|
+
| `QueryFnOrObjectSchema` | `<T extends z.ZodTypeAny>(querySchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]>` |
|
|
124
|
+
|
|
125
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L76)
|
|
126
|
+
|
|
127
|
+
#### :gear: defineQuery
|
|
128
|
+
|
|
129
|
+
| Function | Type |
|
|
130
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| `defineQuery` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: Query<TArgs, TResult>): QueryDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: QueryFn<...>): (env: Record<...>) => QueryDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(qu...` |
|
|
132
|
+
|
|
133
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L86)
|
|
134
|
+
|
|
135
|
+
#### :gear: defineQuery
|
|
136
|
+
|
|
137
|
+
| Function | Type |
|
|
138
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `defineQuery` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: Query<TArgs, TResult>): QueryDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: QueryFn<...>): (env: Record<...>) => QueryDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(qu...` |
|
|
140
|
+
|
|
141
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L89)
|
|
142
|
+
|
|
143
|
+
#### :gear: defineQuery
|
|
144
|
+
|
|
145
|
+
| Function | Type |
|
|
146
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
147
|
+
| `defineQuery` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: Query<TArgs, TResult>): QueryDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: QueryFn<...>): (env: Record<...>) => QueryDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(qu...` |
|
|
148
|
+
|
|
149
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L92)
|
|
150
|
+
|
|
151
|
+
#### :gear: defineQuery
|
|
152
|
+
|
|
153
|
+
| Function | Type |
|
|
154
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `defineQuery` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: Query<TArgs, TResult>): QueryDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(query: QueryFn<...>): (env: Record<...>) => QueryDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(qu...` |
|
|
156
|
+
|
|
157
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L95)
|
|
158
|
+
|
|
159
|
+
#### :gear: UpdateFnSchema
|
|
160
|
+
|
|
161
|
+
| Function | Type |
|
|
162
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
163
|
+
| `UpdateFnSchema` | `<T extends z.ZodTypeAny>(updateSchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>` |
|
|
164
|
+
|
|
165
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L66)
|
|
166
|
+
|
|
167
|
+
#### :gear: UpdateFnOrObjectSchema
|
|
168
|
+
|
|
169
|
+
| Function | Type |
|
|
170
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
171
|
+
| `UpdateFnOrObjectSchema` | `<T extends z.ZodTypeAny>(updateSchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]>` |
|
|
172
|
+
|
|
173
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L76)
|
|
174
|
+
|
|
175
|
+
#### :gear: defineUpdate
|
|
176
|
+
|
|
177
|
+
| Function | Type |
|
|
178
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
179
|
+
| `defineUpdate` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: Update<TArgs, TResult>): UpdateDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: UpdateFn<...>): (env: Record<...>) => UpdateDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawSha...` |
|
|
180
|
+
|
|
181
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L86)
|
|
182
|
+
|
|
183
|
+
#### :gear: defineUpdate
|
|
184
|
+
|
|
185
|
+
| Function | Type |
|
|
186
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
187
|
+
| `defineUpdate` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: Update<TArgs, TResult>): UpdateDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: UpdateFn<...>): (env: Record<...>) => UpdateDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawSha...` |
|
|
188
|
+
|
|
189
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L89)
|
|
190
|
+
|
|
191
|
+
#### :gear: defineUpdate
|
|
192
|
+
|
|
193
|
+
| Function | Type |
|
|
194
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `defineUpdate` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: Update<TArgs, TResult>): UpdateDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: UpdateFn<...>): (env: Record<...>) => UpdateDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawSha...` |
|
|
196
|
+
|
|
197
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L92)
|
|
198
|
+
|
|
199
|
+
#### :gear: defineUpdate
|
|
200
|
+
|
|
201
|
+
| Function | Type |
|
|
202
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
203
|
+
| `defineUpdate` | `{ <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: Update<TArgs, TResult>): UpdateDefinition<TArgs, TResult>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawShape>(update: UpdateFn<...>): (env: Record<...>) => UpdateDefinition<...>; <TArgs extends z.ZodRawShape, TResult extends z.ZodRawSha...` |
|
|
204
|
+
|
|
205
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L95)
|
|
91
206
|
|
|
92
207
|
#### :gear: HookContextSchema
|
|
93
208
|
|
|
94
|
-
| Function | Type
|
|
95
|
-
| ------------------- |
|
|
96
|
-
| `HookContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
209
|
+
| Function | Type |
|
|
210
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
211
|
+
| `HookContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: T; }, $strict>` |
|
|
97
212
|
|
|
98
213
|
References:
|
|
99
214
|
|
|
@@ -247,13 +362,49 @@ References:
|
|
|
247
362
|
|
|
248
363
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L128)
|
|
249
364
|
|
|
365
|
+
#### :gear: decodeDocData
|
|
366
|
+
|
|
367
|
+
Decodes the raw data of a document into a JavaScript object.
|
|
368
|
+
|
|
369
|
+
| Function | Type |
|
|
370
|
+
| --------------- | ------------------------- |
|
|
371
|
+
| `decodeDocData` | `<T>(data: RawData) => T` |
|
|
372
|
+
|
|
373
|
+
Parameters:
|
|
374
|
+
|
|
375
|
+
- `data`: - The raw data to be decoded.
|
|
376
|
+
|
|
377
|
+
Returns:
|
|
378
|
+
|
|
379
|
+
The parsed JavaScript object.
|
|
380
|
+
|
|
381
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L11)
|
|
382
|
+
|
|
383
|
+
#### :gear: encodeDocData
|
|
384
|
+
|
|
385
|
+
Encodes a JavaScript object into a raw data format to be applied to a document.
|
|
386
|
+
|
|
387
|
+
| Function | Type |
|
|
388
|
+
| --------------- | ------------------------- |
|
|
389
|
+
| `encodeDocData` | `<T>(data: T) => RawData` |
|
|
390
|
+
|
|
391
|
+
Parameters:
|
|
392
|
+
|
|
393
|
+
- `data`: - The data to be encoded.
|
|
394
|
+
|
|
395
|
+
Returns:
|
|
396
|
+
|
|
397
|
+
The serialized raw data.
|
|
398
|
+
|
|
399
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L21)
|
|
400
|
+
|
|
250
401
|
#### :gear: normalizeCaller
|
|
251
402
|
|
|
252
403
|
Normalizes a user ID into a raw `Uint8Array` representation.
|
|
253
404
|
|
|
254
|
-
| Function | Type
|
|
255
|
-
| ----------------- |
|
|
256
|
-
| `normalizeCaller` | `(caller: any) =>
|
|
405
|
+
| Function | Type |
|
|
406
|
+
| ----------------- | ------------------------------- |
|
|
407
|
+
| `normalizeCaller` | `(caller: any) => RawPrincipal` |
|
|
257
408
|
|
|
258
409
|
Parameters:
|
|
259
410
|
|
|
@@ -270,9 +421,9 @@ The raw user ID as a `Uint8Array`.
|
|
|
270
421
|
|
|
271
422
|
Gets the list of admin controllers from the Satellite.
|
|
272
423
|
|
|
273
|
-
| Function | Type
|
|
274
|
-
| --------------------- |
|
|
275
|
-
| `getAdminControllers` | `() => [Uint8Array<
|
|
424
|
+
| Function | Type |
|
|
425
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
426
|
+
| `getAdminControllers` | `() => [Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` |
|
|
276
427
|
|
|
277
428
|
Returns:
|
|
278
429
|
|
|
@@ -284,9 +435,9 @@ The list of admin controllers.
|
|
|
284
435
|
|
|
285
436
|
Gets the list of controllers from the Satellite.
|
|
286
437
|
|
|
287
|
-
| Function | Type
|
|
288
|
-
| ---------------- |
|
|
289
|
-
| `getControllers` | `() => [Uint8Array<
|
|
438
|
+
| Function | Type |
|
|
439
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
440
|
+
| `getControllers` | `() => [Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` |
|
|
290
441
|
|
|
291
442
|
Returns:
|
|
292
443
|
|
|
@@ -478,42 +629,6 @@ The context resulting of the deletion of documents that match the provided filte
|
|
|
478
629
|
|
|
479
630
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L175)
|
|
480
631
|
|
|
481
|
-
#### :gear: decodeDocData
|
|
482
|
-
|
|
483
|
-
Decodes the raw data of a document into a JavaScript object.
|
|
484
|
-
|
|
485
|
-
| Function | Type |
|
|
486
|
-
| --------------- | --------------------------------------------- |
|
|
487
|
-
| `decodeDocData` | `<T>(data: Uint8Array<ArrayBufferLike>) => T` |
|
|
488
|
-
|
|
489
|
-
Parameters:
|
|
490
|
-
|
|
491
|
-
- `data`: - The raw data to be decoded.
|
|
492
|
-
|
|
493
|
-
Returns:
|
|
494
|
-
|
|
495
|
-
The parsed JavaScript object.
|
|
496
|
-
|
|
497
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L11)
|
|
498
|
-
|
|
499
|
-
#### :gear: encodeDocData
|
|
500
|
-
|
|
501
|
-
Encodes a JavaScript object into a raw data format to be applied to a document.
|
|
502
|
-
|
|
503
|
-
| Function | Type |
|
|
504
|
-
| --------------- | --------------------------------------------- |
|
|
505
|
-
| `encodeDocData` | `<T>(data: T) => Uint8Array<ArrayBufferLike>` |
|
|
506
|
-
|
|
507
|
-
Parameters:
|
|
508
|
-
|
|
509
|
-
- `data`: - The data to be encoded.
|
|
510
|
-
|
|
511
|
-
Returns:
|
|
512
|
-
|
|
513
|
-
The serialized raw data.
|
|
514
|
-
|
|
515
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L21)
|
|
516
|
-
|
|
517
632
|
#### :gear: countCollectionAssetsStore
|
|
518
633
|
|
|
519
634
|
Counts the number of assets in a specific collection.
|
|
@@ -706,23 +821,71 @@ Returns `undefined` if the canister response is empty.
|
|
|
706
821
|
|
|
707
822
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/call.ic-cdk.ts#L20)
|
|
708
823
|
|
|
709
|
-
#### :gear:
|
|
824
|
+
#### :gear: msgCaller
|
|
825
|
+
|
|
826
|
+
Retrieves the caller's Principal ID.
|
|
827
|
+
|
|
828
|
+
This function is a JavaScript binding for the Rust function
|
|
829
|
+
[`ic_cdk::api::msg_caller()`](https://docs.rs/ic-cdk/latest/ic_cdk/api/fn.msg_caller.html), which returns
|
|
830
|
+
the Principal of the caller of the current call.
|
|
831
|
+
|
|
832
|
+
| Function | Type |
|
|
833
|
+
| ----------- | ----------------- |
|
|
834
|
+
| `msgCaller` | `() => Principal` |
|
|
835
|
+
|
|
836
|
+
Returns:
|
|
837
|
+
|
|
838
|
+
The Principal ID of the caller.
|
|
839
|
+
|
|
840
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/caller.ic-cdk.ts#L12)
|
|
841
|
+
|
|
842
|
+
#### :gear: caller
|
|
843
|
+
|
|
844
|
+
| Function | Type |
|
|
845
|
+
| -------- | ----------------- |
|
|
846
|
+
| `caller` | `() => Principal` |
|
|
847
|
+
|
|
848
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/caller.ic-cdk.ts#L21)
|
|
849
|
+
|
|
850
|
+
#### :gear: canisterSelf
|
|
710
851
|
|
|
711
852
|
Retrieves the Satellite's Principal ID.
|
|
712
853
|
|
|
713
854
|
This function is a JavaScript binding for the Rust function
|
|
714
|
-
[`ic_cdk::
|
|
855
|
+
[`ic_cdk::api::canister_self()`](https://docs.rs/ic-cdk/latest/ic_cdk/api/fn.canister_self.html), which returns
|
|
715
856
|
the Principal of the executing canister.
|
|
716
857
|
|
|
858
|
+
| Function | Type |
|
|
859
|
+
| -------------- | ----------------- |
|
|
860
|
+
| `canisterSelf` | `() => Principal` |
|
|
861
|
+
|
|
862
|
+
Returns:
|
|
863
|
+
|
|
864
|
+
The Principal ID of the Satellite.
|
|
865
|
+
|
|
866
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#L12)
|
|
867
|
+
|
|
868
|
+
#### :gear: id
|
|
869
|
+
|
|
717
870
|
| Function | Type |
|
|
718
871
|
| -------- | ----------------- |
|
|
719
872
|
| `id` | `() => Principal` |
|
|
720
873
|
|
|
874
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#L24)
|
|
875
|
+
|
|
876
|
+
#### :gear: satelliteSelf
|
|
877
|
+
|
|
878
|
+
Retrieves the Satellite's Principal ID.
|
|
879
|
+
|
|
880
|
+
| Function | Type |
|
|
881
|
+
| --------------- | ----------------- |
|
|
882
|
+
| `satelliteSelf` | `() => Principal` |
|
|
883
|
+
|
|
721
884
|
Returns:
|
|
722
885
|
|
|
723
886
|
The Principal ID of the Satellite.
|
|
724
887
|
|
|
725
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#
|
|
888
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#L31)
|
|
726
889
|
|
|
727
890
|
#### :gear: time
|
|
728
891
|
|
|
@@ -744,6 +907,15 @@ The current timestamp.
|
|
|
744
907
|
|
|
745
908
|
### :wrench: Constants
|
|
746
909
|
|
|
910
|
+
- [SatelliteEnvSchema](#gear-satelliteenvschema)
|
|
911
|
+
- [JUNO_FUNCTION_TYPE](#gear-juno_function_type)
|
|
912
|
+
- [CustomFunctionWithArgsAndResultSchema](#gear-customfunctionwithargsandresultschema)
|
|
913
|
+
- [CustomFunctionWithArgsSchema](#gear-customfunctionwithargsschema)
|
|
914
|
+
- [CustomFunctionWithResultSchema](#gear-customfunctionwithresultschema)
|
|
915
|
+
- [CustomFunctionWithoutArgsAndResultSchema](#gear-customfunctionwithoutargsandresultschema)
|
|
916
|
+
- [CustomFunctionSchema](#gear-customfunctionschema)
|
|
917
|
+
- [QuerySchema](#gear-queryschema)
|
|
918
|
+
- [UpdateSchema](#gear-updateschema)
|
|
747
919
|
- [Uint8ArraySchema](#gear-uint8arrayschema)
|
|
748
920
|
- [RawPrincipalSchema](#gear-rawprincipalschema)
|
|
749
921
|
- [PrincipalSchema](#gear-principalschema)
|
|
@@ -770,7 +942,6 @@ The current timestamp.
|
|
|
770
942
|
- [OnDeleteFilteredDocsContextSchema](#gear-ondeletefiltereddocscontextschema)
|
|
771
943
|
- [AssertSetDocContextSchema](#gear-assertsetdoccontextschema)
|
|
772
944
|
- [AssertDeleteDocContextSchema](#gear-assertdeletedoccontextschema)
|
|
773
|
-
- [SatelliteEnvSchema](#gear-satelliteenvschema)
|
|
774
945
|
- [HeaderFieldsSchema](#gear-headerfieldsschema)
|
|
775
946
|
- [BlobSchema](#gear-blobschema)
|
|
776
947
|
- [AssetKeySchema](#gear-assetkeyschema)
|
|
@@ -844,39 +1015,146 @@ The current timestamp.
|
|
|
844
1015
|
- [CallResultSchema](#gear-callresultschema)
|
|
845
1016
|
- [CallParamsSchema](#gear-callparamsschema)
|
|
846
1017
|
|
|
1018
|
+
#### :gear: SatelliteEnvSchema
|
|
1019
|
+
|
|
1020
|
+
| Constant | Type |
|
|
1021
|
+
| -------------------- | --------------------------------- |
|
|
1022
|
+
| `SatelliteEnvSchema` | `ZodRecord<ZodString, ZodString>` |
|
|
1023
|
+
|
|
1024
|
+
References:
|
|
1025
|
+
|
|
1026
|
+
- SatelliteEnv
|
|
1027
|
+
|
|
1028
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.env.ts#L6)
|
|
1029
|
+
|
|
1030
|
+
#### :gear: JUNO_FUNCTION_TYPE
|
|
1031
|
+
|
|
1032
|
+
Internal constant used by Juno's tooling to discover serverless functions.
|
|
1033
|
+
Not intended for direct use by developers.
|
|
1034
|
+
|
|
1035
|
+
| Constant | Type |
|
|
1036
|
+
| -------------------- | ----------------------------------------------------------------------------------------- |
|
|
1037
|
+
| `JUNO_FUNCTION_TYPE` | `{ readonly QUERY: "__juno_function_query"; readonly UPDATE: "__juno_function_update"; }` |
|
|
1038
|
+
|
|
1039
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/constants.ts#L5)
|
|
1040
|
+
|
|
1041
|
+
#### :gear: CustomFunctionWithArgsAndResultSchema
|
|
1042
|
+
|
|
1043
|
+
| Constant | Type |
|
|
1044
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1045
|
+
| `CustomFunctionWithArgsAndResultSchema` | `ZodObject<{ args: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; result: ZodCustom<...>; handler: ZodCustom<...>; type: ZodEnum<...>; }, $strict>` |
|
|
1046
|
+
|
|
1047
|
+
References:
|
|
1048
|
+
|
|
1049
|
+
- CustomFunctionWithArgsAndResult
|
|
1050
|
+
|
|
1051
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L18)
|
|
1052
|
+
|
|
1053
|
+
#### :gear: CustomFunctionWithArgsSchema
|
|
1054
|
+
|
|
1055
|
+
| Constant | Type |
|
|
1056
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1057
|
+
| `CustomFunctionWithArgsSchema` | `ZodObject<{ args: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; handler: ZodCustom<...>; type: ZodEnum<...>; }, $strict>` |
|
|
1058
|
+
|
|
1059
|
+
References:
|
|
1060
|
+
|
|
1061
|
+
- CustomFunctionWithArgs
|
|
1062
|
+
|
|
1063
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L33)
|
|
1064
|
+
|
|
1065
|
+
#### :gear: CustomFunctionWithResultSchema
|
|
1066
|
+
|
|
1067
|
+
| Constant | Type |
|
|
1068
|
+
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1069
|
+
| `CustomFunctionWithResultSchema` | `ZodObject<{ result: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; handler: ZodCustom<...>; type: ZodEnum<...>; }, $strict>` |
|
|
1070
|
+
|
|
1071
|
+
References:
|
|
1072
|
+
|
|
1073
|
+
- CustomFunctionWithResult
|
|
1074
|
+
|
|
1075
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L47)
|
|
1076
|
+
|
|
1077
|
+
#### :gear: CustomFunctionWithoutArgsAndResultSchema
|
|
1078
|
+
|
|
1079
|
+
| Constant | Type |
|
|
1080
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1081
|
+
| `CustomFunctionWithoutArgsAndResultSchema` | `ZodObject<{ handler: ZodCustom<$InferInnerFunctionType<ZodTuple<[], null>, ZodUnion<readonly [ZodVoid, ZodPromise<ZodVoid>]>>, $InferInnerFunctionType<...>>; type: ZodEnum<...>; }, $strict>` |
|
|
1082
|
+
|
|
1083
|
+
References:
|
|
1084
|
+
|
|
1085
|
+
- CustomFunctionWithoutArgsAndResult
|
|
1086
|
+
|
|
1087
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L61)
|
|
1088
|
+
|
|
1089
|
+
#### :gear: CustomFunctionSchema
|
|
1090
|
+
|
|
1091
|
+
| Constant | Type |
|
|
1092
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1093
|
+
| `CustomFunctionSchema` | `ZodUnion<readonly [ZodObject<{ args: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; result: ZodCustom<...>; handler: ZodCustom<...>; type: ZodEnum<...>; }, $strict>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>` |
|
|
1094
|
+
|
|
1095
|
+
References:
|
|
1096
|
+
|
|
1097
|
+
- CustomFunction
|
|
1098
|
+
|
|
1099
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L74)
|
|
1100
|
+
|
|
1101
|
+
#### :gear: QuerySchema
|
|
1102
|
+
|
|
1103
|
+
| Constant | Type |
|
|
1104
|
+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1105
|
+
| `QuerySchema` | `ZodUnion<readonly [ZodObject<{ type: ZodLiteral<"__juno_function_query">; args: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; result: ZodCustom<...>; handler: ZodCustom<...>; }, $strict>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>` |
|
|
1106
|
+
|
|
1107
|
+
References:
|
|
1108
|
+
|
|
1109
|
+
- Query
|
|
1110
|
+
|
|
1111
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L23)
|
|
1112
|
+
|
|
1113
|
+
#### :gear: UpdateSchema
|
|
1114
|
+
|
|
1115
|
+
| Constant | Type |
|
|
1116
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1117
|
+
| `UpdateSchema` | `ZodUnion<readonly [ZodObject<{ type: ZodLiteral<"__juno_function_update">; args: ZodCustom<ZodObject<$ZodLooseShape, $strip>, ZodObject<$ZodLooseShape, $strip>>; result: ZodCustom<...>; handler: ZodCustom<...>; }, $strict>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>` |
|
|
1118
|
+
|
|
1119
|
+
References:
|
|
1120
|
+
|
|
1121
|
+
- Update
|
|
1122
|
+
|
|
1123
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L23)
|
|
1124
|
+
|
|
847
1125
|
#### :gear: Uint8ArraySchema
|
|
848
1126
|
|
|
849
1127
|
A schema that validates a value is an Uint8Array.
|
|
850
1128
|
|
|
851
|
-
| Constant | Type
|
|
852
|
-
| ------------------ |
|
|
853
|
-
| `Uint8ArraySchema` | `ZodCustom<Uint8Array<
|
|
1129
|
+
| Constant | Type |
|
|
1130
|
+
| ------------------ | ------------------------------------------------------------- |
|
|
1131
|
+
| `Uint8ArraySchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
|
|
854
1132
|
|
|
855
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#
|
|
1133
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L10)
|
|
856
1134
|
|
|
857
1135
|
#### :gear: RawPrincipalSchema
|
|
858
1136
|
|
|
859
|
-
| Constant | Type
|
|
860
|
-
| -------------------- |
|
|
861
|
-
| `RawPrincipalSchema` | `ZodCustom<Uint8Array<
|
|
1137
|
+
| Constant | Type |
|
|
1138
|
+
| -------------------- | ------------------------------------------------------------- |
|
|
1139
|
+
| `RawPrincipalSchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
|
|
862
1140
|
|
|
863
1141
|
References:
|
|
864
1142
|
|
|
865
1143
|
- RawPrincipal
|
|
866
1144
|
|
|
867
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#
|
|
1145
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L15)
|
|
868
1146
|
|
|
869
1147
|
#### :gear: PrincipalSchema
|
|
870
1148
|
|
|
871
|
-
| Constant | Type
|
|
872
|
-
| ----------------- |
|
|
873
|
-
| `PrincipalSchema` | `ZodCustom<
|
|
1149
|
+
| Constant | Type |
|
|
1150
|
+
| ----------------- | ------------------------------------------------------------------------------ |
|
|
1151
|
+
| `PrincipalSchema` | `ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<Principal, Principal>>` |
|
|
874
1152
|
|
|
875
1153
|
References:
|
|
876
1154
|
|
|
877
1155
|
- Principal
|
|
878
1156
|
|
|
879
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#
|
|
1157
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L25)
|
|
880
1158
|
|
|
881
1159
|
#### :gear: TimestampSchema
|
|
882
1160
|
|
|
@@ -904,9 +1182,9 @@ References:
|
|
|
904
1182
|
|
|
905
1183
|
#### :gear: RawUserIdSchema
|
|
906
1184
|
|
|
907
|
-
| Constant | Type
|
|
908
|
-
| ----------------- |
|
|
909
|
-
| `RawUserIdSchema` | `ZodCustom<Uint8Array<
|
|
1185
|
+
| Constant | Type |
|
|
1186
|
+
| ----------------- | ------------------------------------------------------------- |
|
|
1187
|
+
| `RawUserIdSchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
|
|
910
1188
|
|
|
911
1189
|
References:
|
|
912
1190
|
|
|
@@ -916,9 +1194,9 @@ References:
|
|
|
916
1194
|
|
|
917
1195
|
#### :gear: UserIdSchema
|
|
918
1196
|
|
|
919
|
-
| Constant | Type
|
|
920
|
-
| -------------- |
|
|
921
|
-
| `UserIdSchema` | `ZodCustom<
|
|
1197
|
+
| Constant | Type |
|
|
1198
|
+
| -------------- | ------------------------------------------------------------------------------ |
|
|
1199
|
+
| `UserIdSchema` | `ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<Principal, Principal>>` |
|
|
922
1200
|
|
|
923
1201
|
References:
|
|
924
1202
|
|
|
@@ -976,9 +1254,9 @@ References:
|
|
|
976
1254
|
|
|
977
1255
|
#### :gear: RawDataSchema
|
|
978
1256
|
|
|
979
|
-
| Constant | Type
|
|
980
|
-
| --------------- |
|
|
981
|
-
| `RawDataSchema` | `ZodCustom<Uint8Array<
|
|
1257
|
+
| Constant | Type |
|
|
1258
|
+
| --------------- | ------------------------------------------------------------- |
|
|
1259
|
+
| `RawDataSchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
|
|
982
1260
|
|
|
983
1261
|
References:
|
|
984
1262
|
|
|
@@ -988,9 +1266,9 @@ References:
|
|
|
988
1266
|
|
|
989
1267
|
#### :gear: DocSchema
|
|
990
1268
|
|
|
991
|
-
| Constant | Type
|
|
992
|
-
| ----------- |
|
|
993
|
-
| `DocSchema` | `ZodObject<{ owner: ZodCustom<Uint8Array<
|
|
1269
|
+
| Constant | Type |
|
|
1270
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1271
|
+
| `DocSchema` | `ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>` |
|
|
994
1272
|
|
|
995
1273
|
References:
|
|
996
1274
|
|
|
@@ -1000,9 +1278,9 @@ References:
|
|
|
1000
1278
|
|
|
1001
1279
|
#### :gear: OptionDocSchema
|
|
1002
1280
|
|
|
1003
|
-
| Constant | Type
|
|
1004
|
-
| ----------------- |
|
|
1005
|
-
| `OptionDocSchema` | `ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<
|
|
1281
|
+
| Constant | Type |
|
|
1282
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1283
|
+
| `OptionDocSchema` | `ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>` |
|
|
1006
1284
|
|
|
1007
1285
|
References:
|
|
1008
1286
|
|
|
@@ -1012,9 +1290,9 @@ References:
|
|
|
1012
1290
|
|
|
1013
1291
|
#### :gear: SetDocSchema
|
|
1014
1292
|
|
|
1015
|
-
| Constant | Type
|
|
1016
|
-
| -------------- |
|
|
1017
|
-
| `SetDocSchema` | `ZodObject<{ data: ZodCustom<Uint8Array<
|
|
1293
|
+
| Constant | Type |
|
|
1294
|
+
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1295
|
+
| `SetDocSchema` | `ZodObject<{ data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; description: ZodOptional<ZodString>; version: ZodOptional<...>; }, $strict>` |
|
|
1018
1296
|
|
|
1019
1297
|
References:
|
|
1020
1298
|
|
|
@@ -1038,7 +1316,7 @@ References:
|
|
|
1038
1316
|
|
|
1039
1317
|
| Constant | Type |
|
|
1040
1318
|
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1041
|
-
| `DocUpsertSchema` | `ZodObject<{ before: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<
|
|
1319
|
+
| `DocUpsertSchema` | `ZodObject<{ before: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; after: ZodObject<...>; }, $s...` |
|
|
1042
1320
|
|
|
1043
1321
|
References:
|
|
1044
1322
|
|
|
@@ -1048,9 +1326,9 @@ References:
|
|
|
1048
1326
|
|
|
1049
1327
|
#### :gear: DocAssertSetSchema
|
|
1050
1328
|
|
|
1051
|
-
| Constant | Type
|
|
1052
|
-
| -------------------- |
|
|
1053
|
-
| `DocAssertSetSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<
|
|
1329
|
+
| Constant | Type |
|
|
1330
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1331
|
+
| `DocAssertSetSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }...` |
|
|
1054
1332
|
|
|
1055
1333
|
References:
|
|
1056
1334
|
|
|
@@ -1060,9 +1338,9 @@ References:
|
|
|
1060
1338
|
|
|
1061
1339
|
#### :gear: DocAssertDeleteSchema
|
|
1062
1340
|
|
|
1063
|
-
| Constant | Type
|
|
1064
|
-
| ----------------------- |
|
|
1065
|
-
| `DocAssertDeleteSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<
|
|
1341
|
+
| Constant | Type |
|
|
1342
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1343
|
+
| `DocAssertDeleteSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }...` |
|
|
1066
1344
|
|
|
1067
1345
|
References:
|
|
1068
1346
|
|
|
@@ -1072,9 +1350,9 @@ References:
|
|
|
1072
1350
|
|
|
1073
1351
|
#### :gear: OnSetDocContextSchema
|
|
1074
1352
|
|
|
1075
|
-
| Constant | Type
|
|
1076
|
-
| ----------------------- |
|
|
1077
|
-
| `OnSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1353
|
+
| Constant | Type |
|
|
1354
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1355
|
+
| `OnSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
1078
1356
|
|
|
1079
1357
|
References:
|
|
1080
1358
|
|
|
@@ -1084,9 +1362,9 @@ References:
|
|
|
1084
1362
|
|
|
1085
1363
|
#### :gear: OnSetManyDocsContextSchema
|
|
1086
1364
|
|
|
1087
|
-
| Constant | Type
|
|
1088
|
-
| ---------------------------- |
|
|
1089
|
-
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1365
|
+
| Constant | Type |
|
|
1366
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1367
|
+
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>>; }, $strict>` |
|
|
1090
1368
|
|
|
1091
1369
|
References:
|
|
1092
1370
|
|
|
@@ -1096,9 +1374,9 @@ References:
|
|
|
1096
1374
|
|
|
1097
1375
|
#### :gear: OnDeleteDocContextSchema
|
|
1098
1376
|
|
|
1099
|
-
| Constant | Type
|
|
1100
|
-
| -------------------------- |
|
|
1101
|
-
| `OnDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1377
|
+
| Constant | Type |
|
|
1378
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1379
|
+
| `OnDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
1102
1380
|
|
|
1103
1381
|
References:
|
|
1104
1382
|
|
|
@@ -1108,9 +1386,9 @@ References:
|
|
|
1108
1386
|
|
|
1109
1387
|
#### :gear: OnDeleteManyDocsContextSchema
|
|
1110
1388
|
|
|
1111
|
-
| Constant | Type
|
|
1112
|
-
| ------------------------------- |
|
|
1113
|
-
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1389
|
+
| Constant | Type |
|
|
1390
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1391
|
+
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
1114
1392
|
|
|
1115
1393
|
References:
|
|
1116
1394
|
|
|
@@ -1120,9 +1398,9 @@ References:
|
|
|
1120
1398
|
|
|
1121
1399
|
#### :gear: OnDeleteFilteredDocsContextSchema
|
|
1122
1400
|
|
|
1123
|
-
| Constant | Type
|
|
1124
|
-
| ----------------------------------- |
|
|
1125
|
-
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1401
|
+
| Constant | Type |
|
|
1402
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1403
|
+
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
1126
1404
|
|
|
1127
1405
|
References:
|
|
1128
1406
|
|
|
@@ -1132,9 +1410,9 @@ References:
|
|
|
1132
1410
|
|
|
1133
1411
|
#### :gear: AssertSetDocContextSchema
|
|
1134
1412
|
|
|
1135
|
-
| Constant | Type
|
|
1136
|
-
| --------------------------- |
|
|
1137
|
-
| `AssertSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1413
|
+
| Constant | Type |
|
|
1414
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1415
|
+
| `AssertSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
1138
1416
|
|
|
1139
1417
|
References:
|
|
1140
1418
|
|
|
@@ -1144,9 +1422,9 @@ References:
|
|
|
1144
1422
|
|
|
1145
1423
|
#### :gear: AssertDeleteDocContextSchema
|
|
1146
1424
|
|
|
1147
|
-
| Constant | Type
|
|
1148
|
-
| ------------------------------ |
|
|
1149
|
-
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1425
|
+
| Constant | Type |
|
|
1426
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1427
|
+
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
1150
1428
|
|
|
1151
1429
|
References:
|
|
1152
1430
|
|
|
@@ -1154,18 +1432,6 @@ References:
|
|
|
1154
1432
|
|
|
1155
1433
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L136)
|
|
1156
1434
|
|
|
1157
|
-
#### :gear: SatelliteEnvSchema
|
|
1158
|
-
|
|
1159
|
-
| Constant | Type |
|
|
1160
|
-
| -------------------- | --------------------------------- |
|
|
1161
|
-
| `SatelliteEnvSchema` | `ZodRecord<ZodString, ZodString>` |
|
|
1162
|
-
|
|
1163
|
-
References:
|
|
1164
|
-
|
|
1165
|
-
- SatelliteEnv
|
|
1166
|
-
|
|
1167
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/satellite.env.ts#L6)
|
|
1168
|
-
|
|
1169
1435
|
#### :gear: HeaderFieldsSchema
|
|
1170
1436
|
|
|
1171
1437
|
| Constant | Type |
|
|
@@ -1180,9 +1446,9 @@ References:
|
|
|
1180
1446
|
|
|
1181
1447
|
#### :gear: BlobSchema
|
|
1182
1448
|
|
|
1183
|
-
| Constant | Type
|
|
1184
|
-
| ------------ |
|
|
1185
|
-
| `BlobSchema` | `ZodCustom<Uint8Array<
|
|
1449
|
+
| Constant | Type |
|
|
1450
|
+
| ------------ | ------------------------------------------------------------- |
|
|
1451
|
+
| `BlobSchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
|
|
1186
1452
|
|
|
1187
1453
|
References:
|
|
1188
1454
|
|
|
@@ -1192,9 +1458,9 @@ References:
|
|
|
1192
1458
|
|
|
1193
1459
|
#### :gear: AssetKeySchema
|
|
1194
1460
|
|
|
1195
|
-
| Constant | Type
|
|
1196
|
-
| ---------------- |
|
|
1197
|
-
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
1461
|
+
| Constant | Type |
|
|
1462
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1463
|
+
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>` |
|
|
1198
1464
|
|
|
1199
1465
|
References:
|
|
1200
1466
|
|
|
@@ -1204,9 +1470,9 @@ References:
|
|
|
1204
1470
|
|
|
1205
1471
|
#### :gear: AssetEncodingSchema
|
|
1206
1472
|
|
|
1207
|
-
| Constant | Type
|
|
1208
|
-
| --------------------- |
|
|
1209
|
-
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<
|
|
1473
|
+
| Constant | Type |
|
|
1474
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1475
|
+
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip>` |
|
|
1210
1476
|
|
|
1211
1477
|
References:
|
|
1212
1478
|
|
|
@@ -1216,9 +1482,9 @@ References:
|
|
|
1216
1482
|
|
|
1217
1483
|
#### :gear: AssetSchema
|
|
1218
1484
|
|
|
1219
|
-
| Constant | Type
|
|
1220
|
-
| ------------- |
|
|
1221
|
-
| `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
1485
|
+
| Constant | Type |
|
|
1486
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1487
|
+
| `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>` |
|
|
1222
1488
|
|
|
1223
1489
|
References:
|
|
1224
1490
|
|
|
@@ -1228,9 +1494,9 @@ References:
|
|
|
1228
1494
|
|
|
1229
1495
|
#### :gear: AssetNoContentSchema
|
|
1230
1496
|
|
|
1231
|
-
| Constant | Type
|
|
1232
|
-
| ---------------------- |
|
|
1233
|
-
| `AssetNoContentSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
1497
|
+
| Constant | Type |
|
|
1498
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1499
|
+
| `AssetNoContentSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; encodings: ZodArray<...>; }, $strict>` |
|
|
1234
1500
|
|
|
1235
1501
|
References:
|
|
1236
1502
|
|
|
@@ -1242,7 +1508,7 @@ References:
|
|
|
1242
1508
|
|
|
1243
1509
|
| Constant | Type |
|
|
1244
1510
|
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1245
|
-
| `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
1511
|
+
| `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; reference_id: ZodOptional<...>; expires_at: ZodBigInt; encoding_type: ZodOptional<...>; }, ...` |
|
|
1246
1512
|
|
|
1247
1513
|
References:
|
|
1248
1514
|
|
|
@@ -1288,9 +1554,9 @@ References:
|
|
|
1288
1554
|
|
|
1289
1555
|
#### :gear: OptionAssetSchema
|
|
1290
1556
|
|
|
1291
|
-
| Constant | Type
|
|
1292
|
-
| ------------------- |
|
|
1293
|
-
| `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
1557
|
+
| Constant | Type |
|
|
1558
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1559
|
+
| `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>` |
|
|
1294
1560
|
|
|
1295
1561
|
References:
|
|
1296
1562
|
|
|
@@ -1312,9 +1578,9 @@ References:
|
|
|
1312
1578
|
|
|
1313
1579
|
#### :gear: OnUploadAssetContextSchema
|
|
1314
1580
|
|
|
1315
|
-
| Constant | Type
|
|
1316
|
-
| ---------------------------- |
|
|
1317
|
-
| `OnUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1581
|
+
| Constant | Type |
|
|
1582
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1583
|
+
| `OnUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
1318
1584
|
|
|
1319
1585
|
References:
|
|
1320
1586
|
|
|
@@ -1324,9 +1590,9 @@ References:
|
|
|
1324
1590
|
|
|
1325
1591
|
#### :gear: OnDeleteAssetContextSchema
|
|
1326
1592
|
|
|
1327
|
-
| Constant | Type
|
|
1328
|
-
| ---------------------------- |
|
|
1329
|
-
| `OnDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1593
|
+
| Constant | Type |
|
|
1594
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1595
|
+
| `OnDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
1330
1596
|
|
|
1331
1597
|
References:
|
|
1332
1598
|
|
|
@@ -1336,9 +1602,9 @@ References:
|
|
|
1336
1602
|
|
|
1337
1603
|
#### :gear: OnDeleteManyAssetsContextSchema
|
|
1338
1604
|
|
|
1339
|
-
| Constant | Type
|
|
1340
|
-
| --------------------------------- |
|
|
1341
|
-
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1605
|
+
| Constant | Type |
|
|
1606
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1607
|
+
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1342
1608
|
|
|
1343
1609
|
References:
|
|
1344
1610
|
|
|
@@ -1348,9 +1614,9 @@ References:
|
|
|
1348
1614
|
|
|
1349
1615
|
#### :gear: OnDeleteFilteredAssetsContextSchema
|
|
1350
1616
|
|
|
1351
|
-
| Constant | Type
|
|
1352
|
-
| ------------------------------------- |
|
|
1353
|
-
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1617
|
+
| Constant | Type |
|
|
1618
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1619
|
+
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1354
1620
|
|
|
1355
1621
|
References:
|
|
1356
1622
|
|
|
@@ -1360,9 +1626,9 @@ References:
|
|
|
1360
1626
|
|
|
1361
1627
|
#### :gear: AssertUploadAssetContextSchema
|
|
1362
1628
|
|
|
1363
|
-
| Constant | Type
|
|
1364
|
-
| -------------------------------- |
|
|
1365
|
-
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1629
|
+
| Constant | Type |
|
|
1630
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1631
|
+
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>; batch: ZodObject<...>; commit_batc...` |
|
|
1366
1632
|
|
|
1367
1633
|
References:
|
|
1368
1634
|
|
|
@@ -1372,9 +1638,9 @@ References:
|
|
|
1372
1638
|
|
|
1373
1639
|
#### :gear: AssertDeleteAssetContextSchema
|
|
1374
1640
|
|
|
1375
|
-
| Constant | Type
|
|
1376
|
-
| -------------------------------- |
|
|
1377
|
-
| `AssertDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1641
|
+
| Constant | Type |
|
|
1642
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1643
|
+
| `AssertDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
1378
1644
|
|
|
1379
1645
|
References:
|
|
1380
1646
|
|
|
@@ -1384,9 +1650,9 @@ References:
|
|
|
1384
1650
|
|
|
1385
1651
|
#### :gear: AssertSetDocSchema
|
|
1386
1652
|
|
|
1387
|
-
| Constant | Type
|
|
1388
|
-
| -------------------- |
|
|
1389
|
-
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1653
|
+
| Constant | Type |
|
|
1654
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1655
|
+
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1390
1656
|
|
|
1391
1657
|
References:
|
|
1392
1658
|
|
|
@@ -1396,9 +1662,9 @@ References:
|
|
|
1396
1662
|
|
|
1397
1663
|
#### :gear: AssertDeleteDocSchema
|
|
1398
1664
|
|
|
1399
|
-
| Constant | Type
|
|
1400
|
-
| ----------------------- |
|
|
1401
|
-
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1665
|
+
| Constant | Type |
|
|
1666
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1667
|
+
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1402
1668
|
|
|
1403
1669
|
References:
|
|
1404
1670
|
|
|
@@ -1408,9 +1674,9 @@ References:
|
|
|
1408
1674
|
|
|
1409
1675
|
#### :gear: AssertUploadAssetSchema
|
|
1410
1676
|
|
|
1411
|
-
| Constant | Type
|
|
1412
|
-
| ------------------------- |
|
|
1413
|
-
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1677
|
+
| Constant | Type |
|
|
1678
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1679
|
+
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1414
1680
|
|
|
1415
1681
|
References:
|
|
1416
1682
|
|
|
@@ -1420,9 +1686,9 @@ References:
|
|
|
1420
1686
|
|
|
1421
1687
|
#### :gear: AssertDeleteAssetSchema
|
|
1422
1688
|
|
|
1423
|
-
| Constant | Type
|
|
1424
|
-
| ------------------------- |
|
|
1425
|
-
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1689
|
+
| Constant | Type |
|
|
1690
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1691
|
+
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1426
1692
|
|
|
1427
1693
|
References:
|
|
1428
1694
|
|
|
@@ -1434,7 +1700,7 @@ References:
|
|
|
1434
1700
|
|
|
1435
1701
|
| Constant | Type |
|
|
1436
1702
|
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1437
|
-
| `AssertSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1703
|
+
| `AssertSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>, ZodObject...` |
|
|
1438
1704
|
|
|
1439
1705
|
References:
|
|
1440
1706
|
|
|
@@ -1444,9 +1710,9 @@ References:
|
|
|
1444
1710
|
|
|
1445
1711
|
#### :gear: OnSetDocSchema
|
|
1446
1712
|
|
|
1447
|
-
| Constant | Type
|
|
1448
|
-
| ---------------- |
|
|
1449
|
-
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1713
|
+
| Constant | Type |
|
|
1714
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1715
|
+
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1450
1716
|
|
|
1451
1717
|
References:
|
|
1452
1718
|
|
|
@@ -1456,9 +1722,9 @@ References:
|
|
|
1456
1722
|
|
|
1457
1723
|
#### :gear: OnSetManyDocsSchema
|
|
1458
1724
|
|
|
1459
|
-
| Constant | Type
|
|
1460
|
-
| --------------------- |
|
|
1461
|
-
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1725
|
+
| Constant | Type |
|
|
1726
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1727
|
+
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1462
1728
|
|
|
1463
1729
|
References:
|
|
1464
1730
|
|
|
@@ -1468,9 +1734,9 @@ References:
|
|
|
1468
1734
|
|
|
1469
1735
|
#### :gear: OnDeleteDocSchema
|
|
1470
1736
|
|
|
1471
|
-
| Constant | Type
|
|
1472
|
-
| ------------------- |
|
|
1473
|
-
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1737
|
+
| Constant | Type |
|
|
1738
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1739
|
+
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1474
1740
|
|
|
1475
1741
|
References:
|
|
1476
1742
|
|
|
@@ -1480,9 +1746,9 @@ References:
|
|
|
1480
1746
|
|
|
1481
1747
|
#### :gear: OnDeleteManyDocsSchema
|
|
1482
1748
|
|
|
1483
|
-
| Constant | Type
|
|
1484
|
-
| ------------------------ |
|
|
1485
|
-
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1749
|
+
| Constant | Type |
|
|
1750
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1751
|
+
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1486
1752
|
|
|
1487
1753
|
References:
|
|
1488
1754
|
|
|
@@ -1492,9 +1758,9 @@ References:
|
|
|
1492
1758
|
|
|
1493
1759
|
#### :gear: OnDeleteFilteredDocsSchema
|
|
1494
1760
|
|
|
1495
|
-
| Constant | Type
|
|
1496
|
-
| ---------------------------- |
|
|
1497
|
-
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1761
|
+
| Constant | Type |
|
|
1762
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1763
|
+
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1498
1764
|
|
|
1499
1765
|
References:
|
|
1500
1766
|
|
|
@@ -1504,9 +1770,9 @@ References:
|
|
|
1504
1770
|
|
|
1505
1771
|
#### :gear: OnUploadAssetSchema
|
|
1506
1772
|
|
|
1507
|
-
| Constant | Type
|
|
1508
|
-
| --------------------- |
|
|
1509
|
-
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1773
|
+
| Constant | Type |
|
|
1774
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1775
|
+
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1510
1776
|
|
|
1511
1777
|
References:
|
|
1512
1778
|
|
|
@@ -1516,9 +1782,9 @@ References:
|
|
|
1516
1782
|
|
|
1517
1783
|
#### :gear: OnDeleteAssetSchema
|
|
1518
1784
|
|
|
1519
|
-
| Constant | Type
|
|
1520
|
-
| --------------------- |
|
|
1521
|
-
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1785
|
+
| Constant | Type |
|
|
1786
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1787
|
+
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodOptional<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1522
1788
|
|
|
1523
1789
|
References:
|
|
1524
1790
|
|
|
@@ -1528,9 +1794,9 @@ References:
|
|
|
1528
1794
|
|
|
1529
1795
|
#### :gear: OnDeleteManyAssetsSchema
|
|
1530
1796
|
|
|
1531
|
-
| Constant | Type
|
|
1532
|
-
| -------------------------- |
|
|
1533
|
-
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1797
|
+
| Constant | Type |
|
|
1798
|
+
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1799
|
+
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1534
1800
|
|
|
1535
1801
|
References:
|
|
1536
1802
|
|
|
@@ -1540,9 +1806,9 @@ References:
|
|
|
1540
1806
|
|
|
1541
1807
|
#### :gear: OnDeleteFilteredAssetsSchema
|
|
1542
1808
|
|
|
1543
|
-
| Constant | Type
|
|
1544
|
-
| ------------------------------ |
|
|
1545
|
-
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1809
|
+
| Constant | Type |
|
|
1810
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1811
|
+
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1546
1812
|
|
|
1547
1813
|
References:
|
|
1548
1814
|
|
|
@@ -1554,7 +1820,7 @@ References:
|
|
|
1554
1820
|
|
|
1555
1821
|
| Constant | Type |
|
|
1556
1822
|
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1557
|
-
| `HookSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<
|
|
1823
|
+
| `HookSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>, ... 7 ...` |
|
|
1558
1824
|
|
|
1559
1825
|
References:
|
|
1560
1826
|
|
|
@@ -1684,9 +1950,9 @@ References:
|
|
|
1684
1950
|
|
|
1685
1951
|
#### :gear: ControllerRecordSchema
|
|
1686
1952
|
|
|
1687
|
-
| Constant | Type
|
|
1688
|
-
| ------------------------ |
|
|
1689
|
-
| `ControllerRecordSchema` | `ZodTuple<[ZodCustom<Uint8Array<
|
|
1953
|
+
| Constant | Type |
|
|
1954
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1955
|
+
| `ControllerRecordSchema` | `ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>` |
|
|
1690
1956
|
|
|
1691
1957
|
References:
|
|
1692
1958
|
|
|
@@ -1696,9 +1962,9 @@ References:
|
|
|
1696
1962
|
|
|
1697
1963
|
#### :gear: ControllersSchema
|
|
1698
1964
|
|
|
1699
|
-
| Constant | Type
|
|
1700
|
-
| ------------------- |
|
|
1701
|
-
| `ControllersSchema` | `ZodArray<ZodTuple<[ZodCustom<Uint8Array<
|
|
1965
|
+
| Constant | Type |
|
|
1966
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1967
|
+
| `ControllersSchema` | `ZodArray<ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>>` |
|
|
1702
1968
|
|
|
1703
1969
|
References:
|
|
1704
1970
|
|
|
@@ -1708,9 +1974,9 @@ References:
|
|
|
1708
1974
|
|
|
1709
1975
|
#### :gear: ControllerCheckParamsSchema
|
|
1710
1976
|
|
|
1711
|
-
| Constant | Type
|
|
1712
|
-
| ----------------------------- |
|
|
1713
|
-
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
1977
|
+
| Constant | Type |
|
|
1978
|
+
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1979
|
+
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<...>>]>; controllers: ZodArray<...>; }, $strip>` |
|
|
1714
1980
|
|
|
1715
1981
|
References:
|
|
1716
1982
|
|
|
@@ -1732,9 +1998,9 @@ References:
|
|
|
1732
1998
|
|
|
1733
1999
|
#### :gear: ListStoreParamsSchema
|
|
1734
2000
|
|
|
1735
|
-
| Constant | Type
|
|
1736
|
-
| ----------------------- |
|
|
1737
|
-
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2001
|
+
| Constant | Type |
|
|
2002
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2003
|
+
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1738
2004
|
|
|
1739
2005
|
References:
|
|
1740
2006
|
|
|
@@ -1744,9 +2010,9 @@ References:
|
|
|
1744
2010
|
|
|
1745
2011
|
#### :gear: GetDocStoreParamsSchema
|
|
1746
2012
|
|
|
1747
|
-
| Constant | Type
|
|
1748
|
-
| ------------------------- |
|
|
1749
|
-
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2013
|
+
| Constant | Type |
|
|
2014
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2015
|
+
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; key: ZodString; }, $strict>` |
|
|
1750
2016
|
|
|
1751
2017
|
References:
|
|
1752
2018
|
|
|
@@ -1756,9 +2022,9 @@ References:
|
|
|
1756
2022
|
|
|
1757
2023
|
#### :gear: SetDocStoreParamsSchema
|
|
1758
2024
|
|
|
1759
|
-
| Constant | Type
|
|
1760
|
-
| ------------------------- |
|
|
1761
|
-
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2025
|
+
| Constant | Type |
|
|
2026
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2027
|
+
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1762
2028
|
|
|
1763
2029
|
References:
|
|
1764
2030
|
|
|
@@ -1768,9 +2034,9 @@ References:
|
|
|
1768
2034
|
|
|
1769
2035
|
#### :gear: DeleteDocStoreParamsSchema
|
|
1770
2036
|
|
|
1771
|
-
| Constant | Type
|
|
1772
|
-
| ---------------------------- |
|
|
1773
|
-
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2037
|
+
| Constant | Type |
|
|
2038
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2039
|
+
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1774
2040
|
|
|
1775
2041
|
References:
|
|
1776
2042
|
|
|
@@ -1792,9 +2058,9 @@ References:
|
|
|
1792
2058
|
|
|
1793
2059
|
#### :gear: CountDocsStoreParamsSchema
|
|
1794
2060
|
|
|
1795
|
-
| Constant | Type
|
|
1796
|
-
| ---------------------------- |
|
|
1797
|
-
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2061
|
+
| Constant | Type |
|
|
2062
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2063
|
+
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1798
2064
|
|
|
1799
2065
|
References:
|
|
1800
2066
|
|
|
@@ -1804,9 +2070,9 @@ References:
|
|
|
1804
2070
|
|
|
1805
2071
|
#### :gear: ListDocsStoreParamsSchema
|
|
1806
2072
|
|
|
1807
|
-
| Constant | Type
|
|
1808
|
-
| --------------------------- |
|
|
1809
|
-
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2073
|
+
| Constant | Type |
|
|
2074
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2075
|
+
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1810
2076
|
|
|
1811
2077
|
References:
|
|
1812
2078
|
|
|
@@ -1828,9 +2094,9 @@ References:
|
|
|
1828
2094
|
|
|
1829
2095
|
#### :gear: DeleteFilteredDocsStoreParamsSchema
|
|
1830
2096
|
|
|
1831
|
-
| Constant | Type
|
|
1832
|
-
| ------------------------------------- |
|
|
1833
|
-
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2097
|
+
| Constant | Type |
|
|
2098
|
+
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2099
|
+
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1834
2100
|
|
|
1835
2101
|
References:
|
|
1836
2102
|
|
|
@@ -1852,9 +2118,9 @@ References:
|
|
|
1852
2118
|
|
|
1853
2119
|
#### :gear: GetAssetStoreParamsSchema
|
|
1854
2120
|
|
|
1855
|
-
| Constant | Type
|
|
1856
|
-
| --------------------------- |
|
|
1857
|
-
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2121
|
+
| Constant | Type |
|
|
2122
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2123
|
+
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; full_path: ZodString; }, $strict>` |
|
|
1858
2124
|
|
|
1859
2125
|
References:
|
|
1860
2126
|
|
|
@@ -1876,9 +2142,9 @@ References:
|
|
|
1876
2142
|
|
|
1877
2143
|
#### :gear: CountAssetsStoreParamsSchema
|
|
1878
2144
|
|
|
1879
|
-
| Constant | Type
|
|
1880
|
-
| ------------------------------ |
|
|
1881
|
-
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2145
|
+
| Constant | Type |
|
|
2146
|
+
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2147
|
+
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1882
2148
|
|
|
1883
2149
|
References:
|
|
1884
2150
|
|
|
@@ -1888,9 +2154,9 @@ References:
|
|
|
1888
2154
|
|
|
1889
2155
|
#### :gear: SetAssetHandlerParamsSchema
|
|
1890
2156
|
|
|
1891
|
-
| Constant | Type
|
|
1892
|
-
| ----------------------------- |
|
|
1893
|
-
| `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<
|
|
2157
|
+
| Constant | Type |
|
|
2158
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2159
|
+
| `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; content: ZodCustom<...>; headers: ZodArray<...>; }, $strict>` |
|
|
1894
2160
|
|
|
1895
2161
|
References:
|
|
1896
2162
|
|
|
@@ -1912,9 +2178,9 @@ References:
|
|
|
1912
2178
|
|
|
1913
2179
|
#### :gear: DeleteFilteredAssetsStoreParamsSchema
|
|
1914
2180
|
|
|
1915
|
-
| Constant | Type
|
|
1916
|
-
| --------------------------------------- |
|
|
1917
|
-
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2181
|
+
| Constant | Type |
|
|
2182
|
+
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2183
|
+
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1918
2184
|
|
|
1919
2185
|
References:
|
|
1920
2186
|
|
|
@@ -1924,9 +2190,9 @@ References:
|
|
|
1924
2190
|
|
|
1925
2191
|
#### :gear: DeleteAssetStoreParamsSchema
|
|
1926
2192
|
|
|
1927
|
-
| Constant | Type
|
|
1928
|
-
| ------------------------------ |
|
|
1929
|
-
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2193
|
+
| Constant | Type |
|
|
2194
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2195
|
+
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; full_path: ZodString; }, $strict>` |
|
|
1930
2196
|
|
|
1931
2197
|
References:
|
|
1932
2198
|
|
|
@@ -1936,9 +2202,9 @@ References:
|
|
|
1936
2202
|
|
|
1937
2203
|
#### :gear: SetAssetTokenStoreParamsSchema
|
|
1938
2204
|
|
|
1939
|
-
| Constant | Type
|
|
1940
|
-
| -------------------------------- |
|
|
1941
|
-
| `SetAssetTokenStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2205
|
+
| Constant | Type |
|
|
2206
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2207
|
+
| `SetAssetTokenStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; full_path: ZodString; token: ZodOptional<...>; }, $strict>` |
|
|
1942
2208
|
|
|
1943
2209
|
References:
|
|
1944
2210
|
|
|
@@ -1948,9 +2214,9 @@ References:
|
|
|
1948
2214
|
|
|
1949
2215
|
#### :gear: ListAssetsStoreParamsSchema
|
|
1950
2216
|
|
|
1951
|
-
| Constant | Type
|
|
1952
|
-
| ----------------------------- |
|
|
1953
|
-
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<
|
|
2217
|
+
| Constant | Type |
|
|
2218
|
+
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2219
|
+
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1954
2220
|
|
|
1955
2221
|
References:
|
|
1956
2222
|
|
|
@@ -1960,9 +2226,9 @@ References:
|
|
|
1960
2226
|
|
|
1961
2227
|
#### :gear: GetContentChunksStoreParamsSchema
|
|
1962
2228
|
|
|
1963
|
-
| Constant | Type
|
|
1964
|
-
| ----------------------------------- |
|
|
1965
|
-
| `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<
|
|
2229
|
+
| Constant | Type |
|
|
2230
|
+
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2231
|
+
| `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip>; chunk_index: ZodBigInt; memory: ZodEnum<...>; }, $strict>` |
|
|
1966
2232
|
|
|
1967
2233
|
References:
|
|
1968
2234
|
|
|
@@ -2022,9 +2288,9 @@ References:
|
|
|
2022
2288
|
|
|
2023
2289
|
#### :gear: CallParamsSchema
|
|
2024
2290
|
|
|
2025
|
-
| Constant | Type
|
|
2026
|
-
| ------------------ |
|
|
2027
|
-
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<
|
|
2291
|
+
| Constant | Type |
|
|
2292
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2293
|
+
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<...>>]>; method: ZodString; args: ZodOptional<...>; result: ZodOptional<...>; }, $strip>` |
|
|
2028
2294
|
|
|
2029
2295
|
References:
|
|
2030
2296
|
|
|
@@ -2038,6 +2304,10 @@ References:
|
|
|
2038
2304
|
|
|
2039
2305
|
### :tropical_drink: Interfaces
|
|
2040
2306
|
|
|
2307
|
+
- [CustomFunctionWithArgsAndResult](#gear-customfunctionwithargsandresult)
|
|
2308
|
+
- [CustomFunctionWithArgs](#gear-customfunctionwithargs)
|
|
2309
|
+
- [CustomFunctionWithResult](#gear-customfunctionwithresult)
|
|
2310
|
+
- [CustomFunctionWithoutArgsAndResult](#gear-customfunctionwithoutargsandresult)
|
|
2041
2311
|
- [Collections](#gear-collections)
|
|
2042
2312
|
- [HookContext](#gear-hookcontext)
|
|
2043
2313
|
- [Doc](#gear-doc)
|
|
@@ -2065,6 +2335,50 @@ References:
|
|
|
2065
2335
|
- [GetContentChunksStoreParams](#gear-getcontentchunksstoreparams)
|
|
2066
2336
|
- [CallParams](#gear-callparams)
|
|
2067
2337
|
|
|
2338
|
+
#### :gear: CustomFunctionWithArgsAndResult
|
|
2339
|
+
|
|
2340
|
+
A serverless function with both input arguments and an output result.
|
|
2341
|
+
|
|
2342
|
+
| Property | Type | Description |
|
|
2343
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
2344
|
+
| `args` | `ZodObject<TArgs, $strip>` | A Zod schema describing the input arguments. |
|
|
2345
|
+
| `result` | `ZodObject<TResult, $strip>` | A Zod schema describing the output result. |
|
|
2346
|
+
| `handler` | `(args: $InferObjectOutput<TArgs, {}>) => $InferObjectOutput<TResult, {}> or Promise<$InferObjectOutput<TResult, {}>>` | The function handler. Can be synchronous or asynchronous. param: args - The input arguments.returns |
|
|
2347
|
+
|
|
2348
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L97)
|
|
2349
|
+
|
|
2350
|
+
#### :gear: CustomFunctionWithArgs
|
|
2351
|
+
|
|
2352
|
+
A serverless function with input arguments but no output result.
|
|
2353
|
+
|
|
2354
|
+
| Property | Type | Description |
|
|
2355
|
+
| --------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
2356
|
+
| `args` | `ZodObject<TArgs, $strip>` | A Zod schema describing the input arguments. |
|
|
2357
|
+
| `handler` | `(args: $InferObjectOutput<TArgs, {}>) => void or Promise<void>` | The function handler. Can be synchronous or asynchronous. param: args - The input arguments.returns |
|
|
2358
|
+
|
|
2359
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L127)
|
|
2360
|
+
|
|
2361
|
+
#### :gear: CustomFunctionWithResult
|
|
2362
|
+
|
|
2363
|
+
A serverless function with an output result but no input arguments.
|
|
2364
|
+
|
|
2365
|
+
| Property | Type | Description |
|
|
2366
|
+
| --------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
2367
|
+
| `result` | `ZodObject<TResult, $strip>` | A Zod schema describing the output result. |
|
|
2368
|
+
| `handler` | `() => $InferObjectOutput<TResult, {}> or Promise<$InferObjectOutput<TResult, {}>>` | The function handler. Can be synchronous or asynchronous. returns |
|
|
2369
|
+
|
|
2370
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L147)
|
|
2371
|
+
|
|
2372
|
+
#### :gear: CustomFunctionWithoutArgsAndResult
|
|
2373
|
+
|
|
2374
|
+
A serverless function with no input arguments and no output result.
|
|
2375
|
+
|
|
2376
|
+
| Property | Type | Description |
|
|
2377
|
+
| --------- | ----------------------------- | ----------------------------------------------------------------- |
|
|
2378
|
+
| `handler` | `() => void or Promise<void>` | The function handler. Can be synchronous or asynchronous. returns |
|
|
2379
|
+
|
|
2380
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L166)
|
|
2381
|
+
|
|
2068
2382
|
#### :gear: Collections
|
|
2069
2383
|
|
|
2070
2384
|
Defines the collections where a hook or assertion should run.
|
|
@@ -2079,10 +2393,10 @@ Defines the collections where a hook or assertion should run.
|
|
|
2079
2393
|
|
|
2080
2394
|
Represents the context provided to hooks, containing information about the caller and related data.
|
|
2081
2395
|
|
|
2082
|
-
| Property | Type
|
|
2083
|
-
| -------- |
|
|
2084
|
-
| `caller` | `
|
|
2085
|
-
| `data` | `T`
|
|
2396
|
+
| Property | Type | Description |
|
|
2397
|
+
| -------- | -------------- | ------------------------------------------------------------------------------- |
|
|
2398
|
+
| `caller` | `RawPrincipal` | The user who originally triggered the function that in turn triggered the hook. |
|
|
2399
|
+
| `data` | `T` | The data associated with the hook execution. |
|
|
2086
2400
|
|
|
2087
2401
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L22)
|
|
2088
2402
|
|
|
@@ -2090,14 +2404,14 @@ Represents the context provided to hooks, containing information about the calle
|
|
|
2090
2404
|
|
|
2091
2405
|
Represents a document stored in a collection.
|
|
2092
2406
|
|
|
2093
|
-
| Property | Type
|
|
2094
|
-
| ------------- |
|
|
2095
|
-
| `owner` | `
|
|
2096
|
-
| `data` | `
|
|
2097
|
-
| `description` | `string or undefined`
|
|
2098
|
-
| `created_at` | `bigint`
|
|
2099
|
-
| `updated_at` | `bigint`
|
|
2100
|
-
| `version` | `bigint or undefined`
|
|
2407
|
+
| Property | Type | Description |
|
|
2408
|
+
| ------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
2409
|
+
| `owner` | `RawPrincipal` | The user who owns this document. |
|
|
2410
|
+
| `data` | `RawData` | The raw data of the document. |
|
|
2411
|
+
| `description` | `string or undefined` | An optional description of the document. |
|
|
2412
|
+
| `created_at` | `bigint` | The timestamp when the document was first created. |
|
|
2413
|
+
| `updated_at` | `bigint` | The timestamp when the document was last updated. |
|
|
2414
|
+
| `version` | `bigint or undefined` | The version number of the document, used for consistency checks. If not provided, it's assumed to be the first version. |
|
|
2101
2415
|
|
|
2102
2416
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L43)
|
|
2103
2417
|
|
|
@@ -2106,11 +2420,11 @@ Represents a document stored in a collection.
|
|
|
2106
2420
|
Represents the proposed version of a document to be created or updated.
|
|
2107
2421
|
This can be validated before allowing the operation.
|
|
2108
2422
|
|
|
2109
|
-
| Property | Type
|
|
2110
|
-
| ------------- |
|
|
2111
|
-
| `data` | `
|
|
2112
|
-
| `description` | `string or undefined`
|
|
2113
|
-
| `version` | `bigint or undefined`
|
|
2423
|
+
| Property | Type | Description |
|
|
2424
|
+
| ------------- | --------------------- | -------------------------------------------------- |
|
|
2425
|
+
| `data` | `RawData` | The raw data of the document. |
|
|
2426
|
+
| `description` | `string or undefined` | An optional description of the document. |
|
|
2427
|
+
| `version` | `bigint or undefined` | The expected version number to ensure consistency. |
|
|
2114
2428
|
|
|
2115
2429
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L101)
|
|
2116
2430
|
|
|
@@ -2182,14 +2496,14 @@ Represents the context of a document operation within a collection.
|
|
|
2182
2496
|
|
|
2183
2497
|
Metadata identifying an asset within a collection and the storage system.
|
|
2184
2498
|
|
|
2185
|
-
| Property | Type
|
|
2186
|
-
| ------------- |
|
|
2187
|
-
| `name` | `string`
|
|
2188
|
-
| `full_path` | `string`
|
|
2189
|
-
| `token` | `string or undefined`
|
|
2190
|
-
| `collection` | `string`
|
|
2191
|
-
| `owner` | `
|
|
2192
|
-
| `description` | `string or undefined`
|
|
2499
|
+
| Property | Type | Description |
|
|
2500
|
+
| ------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
2501
|
+
| `name` | `string` | The name of the asset (e.g., "logo.png"). |
|
|
2502
|
+
| `full_path` | `string` | The full relative path of the asset (e.g., "/images/logo.png"). |
|
|
2503
|
+
| `token` | `string or undefined` | Optional access token for the asset. If set, can be used using a query parameter e.g. /full_path/?token=1223-3345-5564-3333 |
|
|
2504
|
+
| `collection` | `string` | The collection to which this asset belongs. |
|
|
2505
|
+
| `owner` | `RawPrincipal` | The owner of the asset. |
|
|
2506
|
+
| `description` | `string or undefined` | Optional description of the asset for indexing/search. |
|
|
2193
2507
|
|
|
2194
2508
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L85)
|
|
2195
2509
|
|
|
@@ -2297,12 +2611,12 @@ Ordering strategy for listing documents.
|
|
|
2297
2611
|
|
|
2298
2612
|
Full set of listing parameters.
|
|
2299
2613
|
|
|
2300
|
-
| Property | Type
|
|
2301
|
-
| ---------- |
|
|
2302
|
-
| `matcher` | `ListMatcher or undefined`
|
|
2303
|
-
| `paginate` | `ListPaginate or undefined`
|
|
2304
|
-
| `order` | `ListOrder or undefined`
|
|
2305
|
-
| `owner` | `
|
|
2614
|
+
| Property | Type | Description |
|
|
2615
|
+
| ---------- | --------------------------- | ----------- |
|
|
2616
|
+
| `matcher` | `ListMatcher or undefined` | |
|
|
2617
|
+
| `paginate` | `ListPaginate or undefined` | |
|
|
2618
|
+
| `order` | `ListOrder or undefined` | |
|
|
2619
|
+
| `owner` | `RawPrincipal or undefined` | |
|
|
2306
2620
|
|
|
2307
2621
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L115)
|
|
2308
2622
|
|
|
@@ -2339,10 +2653,10 @@ Represents a controller with access scope and associated metadata.
|
|
|
2339
2653
|
|
|
2340
2654
|
Represents the parameters required to perform controller checks.
|
|
2341
2655
|
|
|
2342
|
-
| Property | Type
|
|
2343
|
-
| ------------- |
|
|
2344
|
-
| `caller` | `any`
|
|
2345
|
-
| `controllers` | `[Uint8Array<
|
|
2656
|
+
| Property | Type | Description |
|
|
2657
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
2658
|
+
| `caller` | `any` | The identity of the caller to verify against the controller list. |
|
|
2659
|
+
| `controllers` | `[Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` | The list of controllers to check against. |
|
|
2346
2660
|
|
|
2347
2661
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L122)
|
|
2348
2662
|
|
|
@@ -2395,6 +2709,17 @@ Type representing the parameters required to make a canister call.
|
|
|
2395
2709
|
|
|
2396
2710
|
### :cocktail: Types
|
|
2397
2711
|
|
|
2712
|
+
- [SatelliteEnv](#gear-satelliteenv)
|
|
2713
|
+
- [CustomFunctionType](#gear-customfunctiontype)
|
|
2714
|
+
- [CustomFunction](#gear-customfunction)
|
|
2715
|
+
- [Query](#gear-query)
|
|
2716
|
+
- [QueryDefinition](#gear-querydefinition)
|
|
2717
|
+
- [QueryFn](#gear-queryfn)
|
|
2718
|
+
- [QueryFnOrObject](#gear-queryfnorobject)
|
|
2719
|
+
- [Update](#gear-update)
|
|
2720
|
+
- [UpdateDefinition](#gear-updatedefinition)
|
|
2721
|
+
- [UpdateFn](#gear-updatefn)
|
|
2722
|
+
- [UpdateFnOrObject](#gear-updatefnorobject)
|
|
2398
2723
|
- [RawPrincipal](#gear-rawprincipal)
|
|
2399
2724
|
- [Principal](#gear-principal)
|
|
2400
2725
|
- [Timestamp](#gear-timestamp)
|
|
@@ -2415,7 +2740,6 @@ Type representing the parameters required to make a canister call.
|
|
|
2415
2740
|
- [OnDeleteFilteredDocsContext](#gear-ondeletefiltereddocscontext)
|
|
2416
2741
|
- [AssertSetDocContext](#gear-assertsetdoccontext)
|
|
2417
2742
|
- [AssertDeleteDocContext](#gear-assertdeletedoccontext)
|
|
2418
|
-
- [SatelliteEnv](#gear-satelliteenv)
|
|
2419
2743
|
- [HeaderField](#gear-headerfield)
|
|
2420
2744
|
- [HeaderFields](#gear-headerfields)
|
|
2421
2745
|
- [Blob](#gear-blob)
|
|
@@ -2487,15 +2811,136 @@ Type representing the parameters required to make a canister call.
|
|
|
2487
2811
|
- [CallArgs](#gear-callargs)
|
|
2488
2812
|
- [CallResult](#gear-callresult)
|
|
2489
2813
|
|
|
2490
|
-
#### :gear:
|
|
2814
|
+
#### :gear: SatelliteEnv
|
|
2491
2815
|
|
|
2492
|
-
|
|
2816
|
+
Placeholder for future environment-specific configurations.
|
|
2817
|
+
|
|
2818
|
+
Currently unused, but it may support features such as:
|
|
2819
|
+
|
|
2820
|
+
- Defining the execution mode (e.g., staging or production).
|
|
2821
|
+
- Providing environment-specific values like `ckBtcLedgerId` for test or production.
|
|
2493
2822
|
|
|
2494
2823
|
| Type | Type |
|
|
2495
2824
|
| -------------- | ------------------------------------ |
|
|
2496
|
-
| `
|
|
2825
|
+
| `SatelliteEnv` | `z.infer<typeof SatelliteEnvSchema>` |
|
|
2826
|
+
|
|
2827
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.env.ts#L15)
|
|
2828
|
+
|
|
2829
|
+
#### :gear: CustomFunctionType
|
|
2830
|
+
|
|
2831
|
+
The type of a serverless function. Not exposed to the developer. It allows the CLI
|
|
2832
|
+
to discover the functions when parsing the code.
|
|
2833
|
+
|
|
2834
|
+
| Type | Type |
|
|
2835
|
+
| -------------------- | -------------------------------------------------------------- |
|
|
2836
|
+
| `CustomFunctionType` | `(typeof JUNO_FUNCTION_TYPE)[keyof typeof JUNO_FUNCTION_TYPE]` |
|
|
2837
|
+
|
|
2838
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L9)
|
|
2839
|
+
|
|
2840
|
+
#### :gear: CustomFunction
|
|
2841
|
+
|
|
2842
|
+
A serverless function definition. The four variants cover all combinations
|
|
2843
|
+
of optional input arguments and output result.
|
|
2844
|
+
|
|
2845
|
+
| Type | Type |
|
|
2846
|
+
| ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2847
|
+
| `CustomFunction` | ` | CustomFunctionWithArgsAndResult<TArgs, TResult> or CustomFunctionWithArgs<TArgs> or CustomFunctionWithResult<TResult> or CustomFunctionWithoutArgsAndResult` |
|
|
2848
|
+
|
|
2849
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/schemas/function.ts#L182)
|
|
2850
|
+
|
|
2851
|
+
#### :gear: Query
|
|
2852
|
+
|
|
2853
|
+
The input shape for defining a query serverless function.
|
|
2854
|
+
Does not include `type`, which is injected by `defineQuery`.
|
|
2855
|
+
|
|
2856
|
+
| Type | Type |
|
|
2857
|
+
| ------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2858
|
+
| `Query` | ` | Omit<CustomFunctionWithArgsAndResult<TArgs, TResult>, 'type'> or Omit<CustomFunctionWithArgs<TArgs>, 'type'> or Omit<CustomFunctionWithResult<TResult>, 'type'> or Omit<CustomFunctionWithoutArgsAndResult, 'type'>` |
|
|
2859
|
+
|
|
2860
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L46)
|
|
2861
|
+
|
|
2862
|
+
#### :gear: QueryDefinition
|
|
2863
|
+
|
|
2864
|
+
A query function definition with `type` injected by `defineQuery`.
|
|
2865
|
+
Queries are read-only functions that do not modify state.
|
|
2866
|
+
|
|
2867
|
+
| Type | Type |
|
|
2868
|
+
| ----------------- | ---------------------------------------------------------------------- |
|
|
2869
|
+
| `QueryDefinition` | `Query<TArgs, TResult> and { type: typeof JUNO_FUNCTION_TYPE.QUERY; }` |
|
|
2870
|
+
|
|
2871
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L59)
|
|
2872
|
+
|
|
2873
|
+
#### :gear: QueryFn
|
|
2874
|
+
|
|
2875
|
+
A factory function that receives the satellite environment and returns a query definition.
|
|
2876
|
+
|
|
2877
|
+
| Type | Type |
|
|
2878
|
+
| --------- | ------------------------------------------------ |
|
|
2879
|
+
| `QueryFn` | `( env: SatelliteEnv ) => Query<TArgs, TResult>` |
|
|
2880
|
+
|
|
2881
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L72)
|
|
2882
|
+
|
|
2883
|
+
#### :gear: QueryFnOrObject
|
|
2884
|
+
|
|
2885
|
+
A query definition or a factory function that returns one.
|
|
2886
|
+
|
|
2887
|
+
| Type | Type |
|
|
2888
|
+
| ----------------- | ---- | ------------------------------------------------- |
|
|
2889
|
+
| `QueryFnOrObject` | ` | Query<TArgs, TResult> or QueryFn<TArgs, TResult>` |
|
|
2890
|
+
|
|
2891
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/query.ts#L82)
|
|
2497
2892
|
|
|
2498
|
-
|
|
2893
|
+
#### :gear: Update
|
|
2894
|
+
|
|
2895
|
+
The input shape for defining an update serverless function.
|
|
2896
|
+
Does not include `type`, which is injected by `defineUpdate`.
|
|
2897
|
+
|
|
2898
|
+
| Type | Type |
|
|
2899
|
+
| -------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2900
|
+
| `Update` | ` | Omit<CustomFunctionWithArgsAndResult<TArgs, TResult>, 'type'> or Omit<CustomFunctionWithArgs<TArgs>, 'type'> or Omit<CustomFunctionWithResult<TResult>, 'type'> or Omit<CustomFunctionWithoutArgsAndResult, 'type'>` |
|
|
2901
|
+
|
|
2902
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L46)
|
|
2903
|
+
|
|
2904
|
+
#### :gear: UpdateDefinition
|
|
2905
|
+
|
|
2906
|
+
A update function definition with `type` injected by `defineUpdate`.
|
|
2907
|
+
Queries are read-only functions that do not modify state.
|
|
2908
|
+
|
|
2909
|
+
| Type | Type |
|
|
2910
|
+
| ------------------ | ------------------------------------------------------------------------ |
|
|
2911
|
+
| `UpdateDefinition` | `Update<TArgs, TResult> and { type: typeof JUNO_FUNCTION_TYPE.UPDATE; }` |
|
|
2912
|
+
|
|
2913
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L59)
|
|
2914
|
+
|
|
2915
|
+
#### :gear: UpdateFn
|
|
2916
|
+
|
|
2917
|
+
A factory function that receives the satellite environment and returns an update definition.
|
|
2918
|
+
|
|
2919
|
+
| Type | Type |
|
|
2920
|
+
| ---------- | ------------------------------------------------- |
|
|
2921
|
+
| `UpdateFn` | `( env: SatelliteEnv ) => Update<TArgs, TResult>` |
|
|
2922
|
+
|
|
2923
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L72)
|
|
2924
|
+
|
|
2925
|
+
#### :gear: UpdateFnOrObject
|
|
2926
|
+
|
|
2927
|
+
A update definition or a factory function that returns one.
|
|
2928
|
+
|
|
2929
|
+
| Type | Type |
|
|
2930
|
+
| ------------------ | ---- | --------------------------------------------------- |
|
|
2931
|
+
| `UpdateFnOrObject` | ` | Update<TArgs, TResult> or UpdateFn<TArgs, TResult>` |
|
|
2932
|
+
|
|
2933
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L82)
|
|
2934
|
+
|
|
2935
|
+
#### :gear: RawPrincipal
|
|
2936
|
+
|
|
2937
|
+
Represents a raw principal - a Uint8Array representation of a Principal.
|
|
2938
|
+
|
|
2939
|
+
| Type | Type |
|
|
2940
|
+
| -------------- | ------------ |
|
|
2941
|
+
| `RawPrincipal` | `Uint8Array` |
|
|
2942
|
+
|
|
2943
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L20)
|
|
2499
2944
|
|
|
2500
2945
|
#### :gear: Principal
|
|
2501
2946
|
|
|
@@ -2505,7 +2950,7 @@ Represents a principal - i.e. an object instantiated with the class Principal.
|
|
|
2505
2950
|
| ----------- | --------------------------------- |
|
|
2506
2951
|
| `Principal` | `z.infer<typeof PrincipalSchema>` |
|
|
2507
2952
|
|
|
2508
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#
|
|
2953
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L30)
|
|
2509
2954
|
|
|
2510
2955
|
#### :gear: Timestamp
|
|
2511
2956
|
|
|
@@ -2537,9 +2982,9 @@ Represents a raw user identifier.
|
|
|
2537
2982
|
|
|
2538
2983
|
This is a principal associated with a user.
|
|
2539
2984
|
|
|
2540
|
-
| Type | Type
|
|
2541
|
-
| ----------- |
|
|
2542
|
-
| `RawUserId` | `
|
|
2985
|
+
| Type | Type |
|
|
2986
|
+
| ----------- | -------------- |
|
|
2987
|
+
| `RawUserId` | `RawPrincipal` |
|
|
2543
2988
|
|
|
2544
2989
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L38)
|
|
2545
2990
|
|
|
@@ -2616,9 +3061,9 @@ Represents raw binary data.
|
|
|
2616
3061
|
|
|
2617
3062
|
This is used to store structured data in a document.
|
|
2618
3063
|
|
|
2619
|
-
| Type | Type
|
|
2620
|
-
| --------- |
|
|
2621
|
-
| `RawData` | `
|
|
3064
|
+
| Type | Type |
|
|
3065
|
+
| --------- | ------------ |
|
|
3066
|
+
| `RawData` | `Uint8Array` |
|
|
2622
3067
|
|
|
2623
3068
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L24)
|
|
2624
3069
|
|
|
@@ -2723,21 +3168,6 @@ it is deleted. If validation fails, the developer should throw an error.
|
|
|
2723
3168
|
|
|
2724
3169
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L146)
|
|
2725
3170
|
|
|
2726
|
-
#### :gear: SatelliteEnv
|
|
2727
|
-
|
|
2728
|
-
Placeholder for future environment-specific configurations.
|
|
2729
|
-
|
|
2730
|
-
Currently unused, but it may support features such as:
|
|
2731
|
-
|
|
2732
|
-
- Defining the execution mode (e.g., staging or production).
|
|
2733
|
-
- Providing environment-specific values like `ckBtcLedgerId` for test or production.
|
|
2734
|
-
|
|
2735
|
-
| Type | Type |
|
|
2736
|
-
| -------------- | ------------------------------------ |
|
|
2737
|
-
| `SatelliteEnv` | `z.infer<typeof SatelliteEnvSchema>` |
|
|
2738
|
-
|
|
2739
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/satellite.env.ts#L15)
|
|
2740
|
-
|
|
2741
3171
|
#### :gear: HeaderField
|
|
2742
3172
|
|
|
2743
3173
|
Represents a single HTTP header as a tuple of name and value.
|