@junobuild/functions 0.1.4 → 0.2.1
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 +464 -356
- package/chunk-KY6LCVKU.js +2 -0
- package/chunk-KY6LCVKU.js.map +7 -0
- package/chunk-R6MTJSTE.js +2 -0
- package/chunk-R6MTJSTE.js.map +7 -0
- package/hooks/assertions.d.ts +382 -6958
- package/hooks/hooks.d.ts +649 -10260
- package/hooks/schemas/collections.d.ts +3 -7
- package/hooks/schemas/context.d.ts +6 -13
- package/hooks/schemas/db/context.d.ts +87 -3332
- package/hooks/schemas/db/payload.d.ts +19 -173
- package/hooks/schemas/satellite.env.d.ts +2 -2
- package/hooks/schemas/storage/context.d.ts +111 -1861
- package/hooks/schemas/storage/payload.d.ts +29 -203
- package/ic-cdk/schemas/call.d.ts +9 -19
- package/ic-cdk.js +1 -1
- package/ic-cdk.js.map +2 -2
- package/index.js +1 -1
- package/index.js.map +4 -4
- package/package.json +1 -1
- package/schemas/candid.d.ts +4 -4
- package/schemas/db.d.ts +11 -51
- package/schemas/list.d.ts +51 -303
- package/schemas/satellite.d.ts +3 -3
- package/schemas/storage.d.ts +66 -312
- package/sdk/schemas/collections.d.ts +5 -2
- package/sdk/schemas/controllers.d.ts +39 -85
- package/sdk/schemas/db.d.ts +152 -874
- package/sdk/schemas/params.d.ts +24 -247
- package/sdk/schemas/storage.d.ts +86 -830
- package/sdk.js +1 -1
- package/sdk.js.map +2 -2
- package/utils/zod.utils.d.ts +2 -0
- package/chunk-CCKUQNB5.js +0 -2
- package/chunk-CCKUQNB5.js.map +0 -7
- package/chunk-SFZECPH3.js +0 -2
- package/chunk-SFZECPH3.js.map +0 -7
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
14
14
|
|
|
15
15
|
### :toolbox: Functions
|
|
16
16
|
|
|
17
|
+
- [createFunctionSchema](#gear-createfunctionschema)
|
|
17
18
|
- [HookContextSchema](#gear-hookcontextschema)
|
|
18
19
|
- [AssertFunctionSchema](#gear-assertfunctionschema)
|
|
19
20
|
- [RunFunctionSchema](#gear-runfunctionschema)
|
|
@@ -59,53 +60,61 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
59
60
|
- [id](#gear-id)
|
|
60
61
|
- [time](#gear-time)
|
|
61
62
|
|
|
63
|
+
#### :gear: createFunctionSchema
|
|
64
|
+
|
|
65
|
+
| Function | Type |
|
|
66
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `createFunctionSchema` | `<T extends z.core.$ZodFunction>(schema: T) => ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]>` |
|
|
68
|
+
|
|
69
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/utils/zod.utils.ts#L4)
|
|
70
|
+
|
|
62
71
|
#### :gear: HookContextSchema
|
|
63
72
|
|
|
64
|
-
| Function | Type
|
|
65
|
-
| ------------------- |
|
|
66
|
-
| `HookContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<
|
|
73
|
+
| Function | Type |
|
|
74
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
75
|
+
| `HookContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: T; }, $strict>` |
|
|
67
76
|
|
|
68
77
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L8)
|
|
69
78
|
|
|
70
79
|
#### :gear: AssertFunctionSchema
|
|
71
80
|
|
|
72
|
-
| Function | Type
|
|
73
|
-
| ---------------------- |
|
|
74
|
-
| `AssertFunctionSchema` | `<T extends z.ZodTypeAny>(contextSchema: T) =>
|
|
81
|
+
| Function | Type |
|
|
82
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `AssertFunctionSchema` | `<T extends z.ZodTypeAny>(contextSchema: T) => ZodCustom<$InferInnerFunctionType<ZodTuple<[T], null>, ZodVoid>, $InferInnerFunctionType<ZodTuple<[T], null>, ZodVoid>>` |
|
|
75
84
|
|
|
76
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
85
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L37)
|
|
77
86
|
|
|
78
87
|
#### :gear: RunFunctionSchema
|
|
79
88
|
|
|
80
|
-
| Function | Type
|
|
81
|
-
| ------------------- |
|
|
82
|
-
| `RunFunctionSchema` | `<T extends z.ZodTypeAny>(contextSchema: T) =>
|
|
89
|
+
| Function | Type |
|
|
90
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
+
| `RunFunctionSchema` | `<T extends z.ZodTypeAny>(contextSchema: T) => ZodCustom<$InferInnerFunctionType<ZodTuple<[T], null>, ZodUnion<[ZodPromise<ZodVoid>, ZodVoid]>>, $InferInnerFunctionType<...>>` |
|
|
83
92
|
|
|
84
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
93
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L52)
|
|
85
94
|
|
|
86
95
|
#### :gear: DocContextSchema
|
|
87
96
|
|
|
88
|
-
| Function | Type
|
|
89
|
-
| ------------------ |
|
|
90
|
-
| `DocContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<
|
|
97
|
+
| Function | Type |
|
|
98
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| `DocContextSchema` | `<T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ collection: ZodString; key: ZodString; data: T; }, $strict>` |
|
|
91
100
|
|
|
92
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
101
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L17)
|
|
93
102
|
|
|
94
103
|
#### :gear: AssertFnSchema
|
|
95
104
|
|
|
96
|
-
| Function | Type
|
|
97
|
-
| ---------------- |
|
|
98
|
-
| `AssertFnSchema` | `<T extends z.ZodTypeAny>(assertSchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString,
|
|
105
|
+
| Function | Type |
|
|
106
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| `AssertFnSchema` | `<T extends z.ZodTypeAny>(assertSchema: T) => $ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>` |
|
|
99
108
|
|
|
100
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
109
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L97)
|
|
101
110
|
|
|
102
111
|
#### :gear: AssertFnOrObjectSchema
|
|
103
112
|
|
|
104
|
-
| Function | Type
|
|
105
|
-
| ------------------------ |
|
|
106
|
-
| `AssertFnOrObjectSchema` | `<T extends z.ZodTypeAny>(assertSchema: T) => ZodUnion<[T,
|
|
113
|
+
| Function | Type |
|
|
114
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `AssertFnOrObjectSchema` | `<T extends z.ZodTypeAny>(assertSchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]>` |
|
|
107
116
|
|
|
108
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
117
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L104)
|
|
109
118
|
|
|
110
119
|
#### :gear: defineAssert
|
|
111
120
|
|
|
@@ -113,7 +122,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
113
122
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
114
123
|
| `defineAssert` | `{ <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; }` |
|
|
115
124
|
|
|
116
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
125
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L108)
|
|
117
126
|
|
|
118
127
|
#### :gear: defineAssert
|
|
119
128
|
|
|
@@ -121,7 +130,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
121
130
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
122
131
|
| `defineAssert` | `{ <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; }` |
|
|
123
132
|
|
|
124
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
133
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L109)
|
|
125
134
|
|
|
126
135
|
#### :gear: defineAssert
|
|
127
136
|
|
|
@@ -129,7 +138,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
129
138
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
130
139
|
| `defineAssert` | `{ <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; }` |
|
|
131
140
|
|
|
132
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
141
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L110)
|
|
133
142
|
|
|
134
143
|
#### :gear: defineAssert
|
|
135
144
|
|
|
@@ -137,23 +146,23 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
137
146
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
138
147
|
| `defineAssert` | `{ <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; }` |
|
|
139
148
|
|
|
140
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
149
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L111)
|
|
141
150
|
|
|
142
151
|
#### :gear: HookFnSchema
|
|
143
152
|
|
|
144
|
-
| Function | Type
|
|
145
|
-
| -------------- |
|
|
146
|
-
| `HookFnSchema` | `<T extends z.ZodTypeAny>(hookSchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString,
|
|
153
|
+
| Function | Type |
|
|
154
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `HookFnSchema` | `<T extends z.ZodTypeAny>(hookSchema: T) => $ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>` |
|
|
147
156
|
|
|
148
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
157
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L171)
|
|
149
158
|
|
|
150
159
|
#### :gear: HookFnOrObjectSchema
|
|
151
160
|
|
|
152
|
-
| Function | Type
|
|
153
|
-
| ---------------------- |
|
|
154
|
-
| `HookFnOrObjectSchema` | `<T extends z.ZodTypeAny>(hookSchema: T) => ZodUnion<[T,
|
|
161
|
+
| Function | Type |
|
|
162
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
163
|
+
| `HookFnOrObjectSchema` | `<T extends z.ZodTypeAny>(hookSchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]>` |
|
|
155
164
|
|
|
156
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
165
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L175)
|
|
157
166
|
|
|
158
167
|
#### :gear: defineHook
|
|
159
168
|
|
|
@@ -161,7 +170,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
161
170
|
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
162
171
|
| `defineHook` | `{ <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; }` |
|
|
163
172
|
|
|
164
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
173
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L179)
|
|
165
174
|
|
|
166
175
|
#### :gear: defineHook
|
|
167
176
|
|
|
@@ -169,7 +178,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
169
178
|
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
170
179
|
| `defineHook` | `{ <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; }` |
|
|
171
180
|
|
|
172
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
181
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L180)
|
|
173
182
|
|
|
174
183
|
#### :gear: defineHook
|
|
175
184
|
|
|
@@ -177,7 +186,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
177
186
|
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
178
187
|
| `defineHook` | `{ <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; }` |
|
|
179
188
|
|
|
180
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
189
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L181)
|
|
181
190
|
|
|
182
191
|
#### :gear: defineHook
|
|
183
192
|
|
|
@@ -185,15 +194,15 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
|
|
|
185
194
|
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
186
195
|
| `defineHook` | `{ <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; }` |
|
|
187
196
|
|
|
188
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
197
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L182)
|
|
189
198
|
|
|
190
199
|
#### :gear: createListResultsSchema
|
|
191
200
|
|
|
192
201
|
Represents a list result.
|
|
193
202
|
|
|
194
|
-
| Function | Type
|
|
195
|
-
| ------------------------- |
|
|
196
|
-
| `createListResultsSchema` | `<T extends z.ZodTypeAny>(itemData: T) => ZodObject<{ items: ZodArray<ZodTuple<[ZodString, T], null
|
|
203
|
+
| Function | Type |
|
|
204
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
205
|
+
| `createListResultsSchema` | `<T extends z.ZodTypeAny>(itemData: T) => ZodObject<{ items: ZodArray<ZodTuple<[ZodString, T], null>>; items_length: ZodBigInt; items_page: ZodOptional<ZodBigInt>; matches_length: ZodBigInt; matches_pages: ZodOptional<...>; }, $strict>` |
|
|
197
206
|
|
|
198
207
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L128)
|
|
199
208
|
|
|
@@ -210,6 +219,10 @@ Parameters:
|
|
|
210
219
|
- `caller`: - The caller identity, either a raw `Uint8Array`
|
|
211
220
|
or a `Principal` instance.
|
|
212
221
|
|
|
222
|
+
Returns:
|
|
223
|
+
|
|
224
|
+
The raw user ID as a `Uint8Array`.
|
|
225
|
+
|
|
213
226
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/utils/caller.utils.ts#L12)
|
|
214
227
|
|
|
215
228
|
#### :gear: getAdminControllers
|
|
@@ -218,7 +231,11 @@ Gets the list of admin controllers from the Satellite.
|
|
|
218
231
|
|
|
219
232
|
| Function | Type |
|
|
220
233
|
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
221
|
-
| `getAdminControllers` | `() => [Uint8Array<ArrayBufferLike>, {
|
|
234
|
+
| `getAdminControllers` | `() => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][]` |
|
|
235
|
+
|
|
236
|
+
Returns:
|
|
237
|
+
|
|
238
|
+
The list of admin controllers.
|
|
222
239
|
|
|
223
240
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L15)
|
|
224
241
|
|
|
@@ -228,7 +245,11 @@ Gets the list of controllers from the Satellite.
|
|
|
228
245
|
|
|
229
246
|
| Function | Type |
|
|
230
247
|
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
231
|
-
| `getControllers` | `() => [Uint8Array<ArrayBufferLike>, {
|
|
248
|
+
| `getControllers` | `() => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][]` |
|
|
249
|
+
|
|
250
|
+
Returns:
|
|
251
|
+
|
|
252
|
+
The list of all controllers.
|
|
232
253
|
|
|
233
254
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L24)
|
|
234
255
|
|
|
@@ -245,6 +266,10 @@ Parameters:
|
|
|
245
266
|
- `params`: - The parameters including the caller identity
|
|
246
267
|
and the list of controllers to verify against.
|
|
247
268
|
|
|
269
|
+
Returns:
|
|
270
|
+
|
|
271
|
+
Whether the caller is an admin.
|
|
272
|
+
|
|
248
273
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L36)
|
|
249
274
|
|
|
250
275
|
#### :gear: isController
|
|
@@ -260,6 +285,10 @@ Parameters:
|
|
|
260
285
|
- `params`: - The parameters including the caller identity
|
|
261
286
|
and the list of controllers to verify against.
|
|
262
287
|
|
|
288
|
+
Returns:
|
|
289
|
+
|
|
290
|
+
Whether the caller is a controller.
|
|
291
|
+
|
|
263
292
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L56)
|
|
264
293
|
|
|
265
294
|
#### :gear: setDocStore
|
|
@@ -277,6 +306,11 @@ Parameters:
|
|
|
277
306
|
- `params`: - The parameters required to store the document,
|
|
278
307
|
including the caller, collection, key, and document data.
|
|
279
308
|
|
|
309
|
+
Returns:
|
|
310
|
+
|
|
311
|
+
The context of the stored or updated document,
|
|
312
|
+
including its key, collection, and both the previous and current versions of the document.
|
|
313
|
+
|
|
280
314
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L39)
|
|
281
315
|
|
|
282
316
|
#### :gear: deleteDocStore
|
|
@@ -292,6 +326,11 @@ Parameters:
|
|
|
292
326
|
- `params`: - The parameters required to delete the document,
|
|
293
327
|
including the caller, collection, key, and the expected version of the document.
|
|
294
328
|
|
|
329
|
+
Returns:
|
|
330
|
+
|
|
331
|
+
The context of the deleted document,
|
|
332
|
+
including its key, collection, and optionally the previous document data if it existed.
|
|
333
|
+
|
|
295
334
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L61)
|
|
296
335
|
|
|
297
336
|
#### :gear: getDocStore
|
|
@@ -306,6 +345,10 @@ Parameters:
|
|
|
306
345
|
|
|
307
346
|
- `params`: - The parameters required to get the document.
|
|
308
347
|
|
|
348
|
+
Returns:
|
|
349
|
+
|
|
350
|
+
The document if found, or undefined if not.
|
|
351
|
+
|
|
309
352
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L81)
|
|
310
353
|
|
|
311
354
|
#### :gear: listDocsStore
|
|
@@ -320,6 +363,10 @@ Parameters:
|
|
|
320
363
|
|
|
321
364
|
- `params`: - The parameters required to perform the list operation.
|
|
322
365
|
|
|
366
|
+
Returns:
|
|
367
|
+
|
|
368
|
+
A list result containing matching documents and pagination metadata.
|
|
369
|
+
|
|
323
370
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L101)
|
|
324
371
|
|
|
325
372
|
#### :gear: countCollectionDocsStore
|
|
@@ -334,6 +381,10 @@ Parameters:
|
|
|
334
381
|
|
|
335
382
|
- `params`: - The parameters required to count documents in the collection.
|
|
336
383
|
|
|
384
|
+
Returns:
|
|
385
|
+
|
|
386
|
+
The total number of documents in the specified collection.
|
|
387
|
+
|
|
337
388
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L121)
|
|
338
389
|
|
|
339
390
|
#### :gear: countDocsStore
|
|
@@ -348,6 +399,10 @@ Parameters:
|
|
|
348
399
|
|
|
349
400
|
- `params`: - The parameters required to perform the filtered count.
|
|
350
401
|
|
|
402
|
+
Returns:
|
|
403
|
+
|
|
404
|
+
The number of documents that match the provided filters.
|
|
405
|
+
|
|
351
406
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L139)
|
|
352
407
|
|
|
353
408
|
#### :gear: deleteDocsStore
|
|
@@ -376,6 +431,10 @@ Parameters:
|
|
|
376
431
|
|
|
377
432
|
- `params`: - The parameters required to perform the filtered deletion.
|
|
378
433
|
|
|
434
|
+
Returns:
|
|
435
|
+
|
|
436
|
+
The context resulting of the deletion of documents that match the provided filters.
|
|
437
|
+
|
|
379
438
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L175)
|
|
380
439
|
|
|
381
440
|
#### :gear: decodeDocData
|
|
@@ -390,6 +449,10 @@ Parameters:
|
|
|
390
449
|
|
|
391
450
|
- `data`: - The raw data to be decoded.
|
|
392
451
|
|
|
452
|
+
Returns:
|
|
453
|
+
|
|
454
|
+
The parsed JavaScript object.
|
|
455
|
+
|
|
393
456
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L11)
|
|
394
457
|
|
|
395
458
|
#### :gear: encodeDocData
|
|
@@ -404,6 +467,10 @@ Parameters:
|
|
|
404
467
|
|
|
405
468
|
- `data`: - The data to be encoded.
|
|
406
469
|
|
|
470
|
+
Returns:
|
|
471
|
+
|
|
472
|
+
The serialized raw data.
|
|
473
|
+
|
|
407
474
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L21)
|
|
408
475
|
|
|
409
476
|
#### :gear: countCollectionAssetsStore
|
|
@@ -418,6 +485,10 @@ Parameters:
|
|
|
418
485
|
|
|
419
486
|
- `params`: - The parameters required to count assets in the collection.
|
|
420
487
|
|
|
488
|
+
Returns:
|
|
489
|
+
|
|
490
|
+
The total number of assets in the specified collection.
|
|
491
|
+
|
|
421
492
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L35)
|
|
422
493
|
|
|
423
494
|
#### :gear: countAssetsStore
|
|
@@ -432,6 +503,10 @@ Parameters:
|
|
|
432
503
|
|
|
433
504
|
- `params`: - The parameters required to perform the filtered count.
|
|
434
505
|
|
|
506
|
+
Returns:
|
|
507
|
+
|
|
508
|
+
The number of assets that match the provided filters.
|
|
509
|
+
|
|
435
510
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L53)
|
|
436
511
|
|
|
437
512
|
#### :gear: setAssetHandler
|
|
@@ -460,6 +535,10 @@ Parameters:
|
|
|
460
535
|
|
|
461
536
|
- `params`: - The parameters required to delete the asset.
|
|
462
537
|
|
|
538
|
+
Returns:
|
|
539
|
+
|
|
540
|
+
The potentially deleted asset.
|
|
541
|
+
|
|
463
542
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L89)
|
|
464
543
|
|
|
465
544
|
#### :gear: deleteAssetsStore
|
|
@@ -488,6 +567,10 @@ Parameters:
|
|
|
488
567
|
|
|
489
568
|
- `params`: - The parameters required to perform the filtered deletion.
|
|
490
569
|
|
|
570
|
+
Returns:
|
|
571
|
+
|
|
572
|
+
The potential asset resulting of the deletion that match the provided filters.
|
|
573
|
+
|
|
491
574
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L125)
|
|
492
575
|
|
|
493
576
|
#### :gear: getAssetStore
|
|
@@ -502,6 +585,10 @@ Parameters:
|
|
|
502
585
|
|
|
503
586
|
- `params`: - The parameters required to get the asset.
|
|
504
587
|
|
|
588
|
+
Returns:
|
|
589
|
+
|
|
590
|
+
The asset if found, or undefined if not.
|
|
591
|
+
|
|
505
592
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L147)
|
|
506
593
|
|
|
507
594
|
#### :gear: listAssetsStore
|
|
@@ -516,6 +603,10 @@ Parameters:
|
|
|
516
603
|
|
|
517
604
|
- `params`: - The parameters required to perform the list operation.
|
|
518
605
|
|
|
606
|
+
Returns:
|
|
607
|
+
|
|
608
|
+
A list result containing matching assets and pagination metadata.
|
|
609
|
+
|
|
519
610
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L167)
|
|
520
611
|
|
|
521
612
|
#### :gear: getContentChunksStore
|
|
@@ -532,6 +623,10 @@ Parameters:
|
|
|
532
623
|
|
|
533
624
|
- `params`: - The parameters including encoding, chunk index, and memory type.
|
|
534
625
|
|
|
626
|
+
Returns:
|
|
627
|
+
|
|
628
|
+
The content chunk if found, or `undefined` if not.
|
|
629
|
+
|
|
535
630
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L189)
|
|
536
631
|
|
|
537
632
|
#### :gear: call
|
|
@@ -549,6 +644,11 @@ Parameters:
|
|
|
549
644
|
|
|
550
645
|
- `params`: - The parameters required for the canister call
|
|
551
646
|
|
|
647
|
+
Returns:
|
|
648
|
+
|
|
649
|
+
A promise resolving to the decoded result of the call.
|
|
650
|
+
Returns `undefined` if the canister response is empty.
|
|
651
|
+
|
|
552
652
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/call.ic-cdk.ts#L20)
|
|
553
653
|
|
|
554
654
|
#### :gear: id
|
|
@@ -563,6 +663,10 @@ the Principal of the executing canister.
|
|
|
563
663
|
| -------- | ----------------- |
|
|
564
664
|
| `id` | `() => Principal` |
|
|
565
665
|
|
|
666
|
+
Returns:
|
|
667
|
+
|
|
668
|
+
The Principal ID of the Satellite.
|
|
669
|
+
|
|
566
670
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#L12)
|
|
567
671
|
|
|
568
672
|
#### :gear: time
|
|
@@ -577,6 +681,10 @@ the system time publicly exposed and verified part of the IC state tree
|
|
|
577
681
|
| -------- | -------------- |
|
|
578
682
|
| `time` | `() => bigint` |
|
|
579
683
|
|
|
684
|
+
Returns:
|
|
685
|
+
|
|
686
|
+
The current timestamp.
|
|
687
|
+
|
|
580
688
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/time.ic-cdk.ts#L10)
|
|
581
689
|
|
|
582
690
|
### :wrench: Constants
|
|
@@ -682,25 +790,25 @@ the system time publicly exposed and verified part of the IC state tree
|
|
|
682
790
|
|
|
683
791
|
A schema that validates a value is an Uint8Array.
|
|
684
792
|
|
|
685
|
-
| Constant | Type
|
|
686
|
-
| ------------------ |
|
|
687
|
-
| `Uint8ArraySchema` | `
|
|
793
|
+
| Constant | Type |
|
|
794
|
+
| ------------------ | --------------------------------------------------------------------- |
|
|
795
|
+
| `Uint8ArraySchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
688
796
|
|
|
689
797
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L7)
|
|
690
798
|
|
|
691
799
|
#### :gear: RawPrincipalSchema
|
|
692
800
|
|
|
693
|
-
| Constant | Type
|
|
694
|
-
| -------------------- |
|
|
695
|
-
| `RawPrincipalSchema` | `
|
|
801
|
+
| Constant | Type |
|
|
802
|
+
| -------------------- | --------------------------------------------------------------------- |
|
|
803
|
+
| `RawPrincipalSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
696
804
|
|
|
697
805
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L14)
|
|
698
806
|
|
|
699
807
|
#### :gear: PrincipalSchema
|
|
700
808
|
|
|
701
|
-
| Constant | Type
|
|
702
|
-
| ----------------- |
|
|
703
|
-
| `PrincipalSchema` | `
|
|
809
|
+
| Constant | Type |
|
|
810
|
+
| ----------------- | --------------------------------- |
|
|
811
|
+
| `PrincipalSchema` | `ZodCustom<Principal, Principal>` |
|
|
704
812
|
|
|
705
813
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L24)
|
|
706
814
|
|
|
@@ -722,17 +830,17 @@ A schema that validates a value is an Uint8Array.
|
|
|
722
830
|
|
|
723
831
|
#### :gear: RawUserIdSchema
|
|
724
832
|
|
|
725
|
-
| Constant | Type
|
|
726
|
-
| ----------------- |
|
|
727
|
-
| `RawUserIdSchema` | `
|
|
833
|
+
| Constant | Type |
|
|
834
|
+
| ----------------- | --------------------------------------------------------------------- |
|
|
835
|
+
| `RawUserIdSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
728
836
|
|
|
729
837
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L31)
|
|
730
838
|
|
|
731
839
|
#### :gear: UserIdSchema
|
|
732
840
|
|
|
733
|
-
| Constant | Type
|
|
734
|
-
| -------------- |
|
|
735
|
-
| `UserIdSchema` | `
|
|
841
|
+
| Constant | Type |
|
|
842
|
+
| -------------- | --------------------------------- |
|
|
843
|
+
| `UserIdSchema` | `ZodCustom<Principal, Principal>` |
|
|
736
844
|
|
|
737
845
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L43)
|
|
738
846
|
|
|
@@ -762,177 +870,177 @@ A schema that validates a value is an Uint8Array.
|
|
|
762
870
|
|
|
763
871
|
#### :gear: CollectionsSchema
|
|
764
872
|
|
|
765
|
-
| Constant | Type
|
|
766
|
-
| ------------------- |
|
|
767
|
-
| `CollectionsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
873
|
+
| Constant | Type |
|
|
874
|
+
| ------------------- | ------------------------------------------------------------------------ |
|
|
875
|
+
| `CollectionsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; }, $strict>` |
|
|
768
876
|
|
|
769
877
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/collections.ts#L7)
|
|
770
878
|
|
|
771
879
|
#### :gear: RawDataSchema
|
|
772
880
|
|
|
773
|
-
| Constant | Type
|
|
774
|
-
| --------------- |
|
|
775
|
-
| `RawDataSchema` | `
|
|
881
|
+
| Constant | Type |
|
|
882
|
+
| --------------- | --------------------------------------------------------------------- |
|
|
883
|
+
| `RawDataSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
776
884
|
|
|
777
885
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L17)
|
|
778
886
|
|
|
779
887
|
#### :gear: DocSchema
|
|
780
888
|
|
|
781
|
-
| Constant | Type
|
|
782
|
-
| ----------- |
|
|
783
|
-
| `DocSchema` | `ZodObject<{ owner:
|
|
889
|
+
| Constant | Type |
|
|
890
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
891
|
+
| `DocSchema` | `ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>` |
|
|
784
892
|
|
|
785
893
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L29)
|
|
786
894
|
|
|
787
895
|
#### :gear: OptionDocSchema
|
|
788
896
|
|
|
789
|
-
| Constant | Type
|
|
790
|
-
| ----------------- |
|
|
791
|
-
| `OptionDocSchema` | `ZodOptional<ZodObject<{ owner:
|
|
897
|
+
| Constant | Type |
|
|
898
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
899
|
+
| `OptionDocSchema` | `ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>` |
|
|
792
900
|
|
|
793
901
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L79)
|
|
794
902
|
|
|
795
903
|
#### :gear: SetDocSchema
|
|
796
904
|
|
|
797
|
-
| Constant | Type
|
|
798
|
-
| -------------- |
|
|
799
|
-
| `SetDocSchema` | `ZodObject<{ data:
|
|
905
|
+
| Constant | Type |
|
|
906
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
907
|
+
| `SetDocSchema` | `ZodObject<{ data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; description: ZodOptional<ZodString>; version: ZodOptional<...>; }, $strict>` |
|
|
800
908
|
|
|
801
909
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L89)
|
|
802
910
|
|
|
803
911
|
#### :gear: DelDocSchema
|
|
804
912
|
|
|
805
|
-
| Constant | Type
|
|
806
|
-
| -------------- |
|
|
807
|
-
| `DelDocSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; },
|
|
913
|
+
| Constant | Type |
|
|
914
|
+
| -------------- | ---------------------------------------------------------- |
|
|
915
|
+
| `DelDocSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; }, $strict>` |
|
|
808
916
|
|
|
809
917
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L121)
|
|
810
918
|
|
|
811
919
|
#### :gear: DocUpsertSchema
|
|
812
920
|
|
|
813
|
-
| Constant | Type
|
|
814
|
-
| ----------------- |
|
|
815
|
-
| `DocUpsertSchema` | `ZodObject<{ before: ZodOptional<ZodObject<{ owner:
|
|
921
|
+
| Constant | Type |
|
|
922
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
923
|
+
| `DocUpsertSchema` | `ZodObject<{ before: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<...>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; after: ZodObject<...>; }, $s...` |
|
|
816
924
|
|
|
817
925
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L14)
|
|
818
926
|
|
|
819
927
|
#### :gear: DocAssertSetSchema
|
|
820
928
|
|
|
821
|
-
| Constant | Type
|
|
822
|
-
| -------------------- |
|
|
823
|
-
| `DocAssertSetSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner:
|
|
929
|
+
| Constant | Type |
|
|
930
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
931
|
+
| `DocAssertSetSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<...>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }, $strict>` |
|
|
824
932
|
|
|
825
933
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L41)
|
|
826
934
|
|
|
827
935
|
#### :gear: DocAssertDeleteSchema
|
|
828
936
|
|
|
829
|
-
| Constant | Type
|
|
830
|
-
| ----------------------- |
|
|
831
|
-
| `DocAssertDeleteSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner:
|
|
937
|
+
| Constant | Type |
|
|
938
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
939
|
+
| `DocAssertDeleteSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<...>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }, $strict>` |
|
|
832
940
|
|
|
833
941
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L71)
|
|
834
942
|
|
|
835
943
|
#### :gear: OnSetDocContextSchema
|
|
836
944
|
|
|
837
|
-
| Constant | Type
|
|
838
|
-
| ----------------------- |
|
|
839
|
-
| `OnSetDocContextSchema` | `ZodObject<{ caller:
|
|
945
|
+
| Constant | Type |
|
|
946
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
947
|
+
| `OnSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
840
948
|
|
|
841
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
949
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L52)
|
|
842
950
|
|
|
843
951
|
#### :gear: OnSetManyDocsContextSchema
|
|
844
952
|
|
|
845
|
-
| Constant | Type
|
|
846
|
-
| ---------------------------- |
|
|
847
|
-
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller:
|
|
953
|
+
| Constant | Type |
|
|
954
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
955
|
+
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>>; }, $strict>` |
|
|
848
956
|
|
|
849
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
957
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L65)
|
|
850
958
|
|
|
851
959
|
#### :gear: OnDeleteDocContextSchema
|
|
852
960
|
|
|
853
|
-
| Constant | Type
|
|
854
|
-
| -------------------------- |
|
|
855
|
-
| `OnDeleteDocContextSchema` | `ZodObject<{ caller:
|
|
961
|
+
| Constant | Type |
|
|
962
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
963
|
+
| `OnDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
856
964
|
|
|
857
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
965
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L80)
|
|
858
966
|
|
|
859
967
|
#### :gear: OnDeleteManyDocsContextSchema
|
|
860
968
|
|
|
861
|
-
| Constant | Type
|
|
862
|
-
| ------------------------------- |
|
|
863
|
-
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller:
|
|
969
|
+
| Constant | Type |
|
|
970
|
+
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
971
|
+
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
864
972
|
|
|
865
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
973
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L93)
|
|
866
974
|
|
|
867
975
|
#### :gear: OnDeleteFilteredDocsContextSchema
|
|
868
976
|
|
|
869
|
-
| Constant | Type
|
|
870
|
-
| ----------------------------------- |
|
|
871
|
-
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller:
|
|
977
|
+
| Constant | Type |
|
|
978
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
979
|
+
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
872
980
|
|
|
873
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
981
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L108)
|
|
874
982
|
|
|
875
983
|
#### :gear: AssertSetDocContextSchema
|
|
876
984
|
|
|
877
|
-
| Constant | Type
|
|
878
|
-
| --------------------------- |
|
|
879
|
-
| `AssertSetDocContextSchema` | `ZodObject<{ caller:
|
|
985
|
+
| Constant | Type |
|
|
986
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
987
|
+
| `AssertSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
880
988
|
|
|
881
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
989
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L123)
|
|
882
990
|
|
|
883
991
|
#### :gear: AssertDeleteDocContextSchema
|
|
884
992
|
|
|
885
|
-
| Constant | Type
|
|
886
|
-
| ------------------------------ |
|
|
887
|
-
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller:
|
|
993
|
+
| Constant | Type |
|
|
994
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
995
|
+
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
888
996
|
|
|
889
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
997
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L136)
|
|
890
998
|
|
|
891
999
|
#### :gear: SatelliteEnvSchema
|
|
892
1000
|
|
|
893
|
-
| Constant | Type
|
|
894
|
-
| -------------------- |
|
|
895
|
-
| `SatelliteEnvSchema` | `ZodRecord<ZodString,
|
|
1001
|
+
| Constant | Type |
|
|
1002
|
+
| -------------------- | --------------------------------- |
|
|
1003
|
+
| `SatelliteEnvSchema` | `ZodRecord<ZodString, ZodString>` |
|
|
896
1004
|
|
|
897
1005
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/satellite.env.ts#L6)
|
|
898
1006
|
|
|
899
1007
|
#### :gear: HeaderFieldsSchema
|
|
900
1008
|
|
|
901
|
-
| Constant | Type
|
|
902
|
-
| -------------------- |
|
|
903
|
-
| `HeaderFieldsSchema` | `ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
1009
|
+
| Constant | Type |
|
|
1010
|
+
| -------------------- | -------------------------------------------------- |
|
|
1011
|
+
| `HeaderFieldsSchema` | `ZodArray<ZodTuple<[ZodString, ZodString], null>>` |
|
|
904
1012
|
|
|
905
1013
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L29)
|
|
906
1014
|
|
|
907
1015
|
#### :gear: BlobSchema
|
|
908
1016
|
|
|
909
|
-
| Constant | Type
|
|
910
|
-
| ------------ |
|
|
911
|
-
| `BlobSchema` | `
|
|
1017
|
+
| Constant | Type |
|
|
1018
|
+
| ------------ | --------------------------------------------------------------------- |
|
|
1019
|
+
| `BlobSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
912
1020
|
|
|
913
1021
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L39)
|
|
914
1022
|
|
|
915
1023
|
#### :gear: AssetKeySchema
|
|
916
1024
|
|
|
917
|
-
| Constant | Type
|
|
918
|
-
| ---------------- |
|
|
919
|
-
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1025
|
+
| Constant | Type |
|
|
1026
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1027
|
+
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>` |
|
|
920
1028
|
|
|
921
1029
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L71)
|
|
922
1030
|
|
|
923
1031
|
#### :gear: AssetEncodingSchema
|
|
924
1032
|
|
|
925
|
-
| Constant | Type
|
|
926
|
-
| --------------------- |
|
|
927
|
-
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<
|
|
1033
|
+
| Constant | Type |
|
|
1034
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1035
|
+
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip>` |
|
|
928
1036
|
|
|
929
1037
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L121)
|
|
930
1038
|
|
|
931
1039
|
#### :gear: AssetSchema
|
|
932
1040
|
|
|
933
|
-
| Constant | Type
|
|
934
|
-
| ------------- |
|
|
935
|
-
| `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1041
|
+
| Constant | Type |
|
|
1042
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1043
|
+
| `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>` |
|
|
936
1044
|
|
|
937
1045
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L176)
|
|
938
1046
|
|
|
@@ -940,7 +1048,7 @@ A schema that validates a value is an Uint8Array.
|
|
|
940
1048
|
|
|
941
1049
|
| Constant | Type |
|
|
942
1050
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
943
|
-
| `AssetNoContentSchema` | `ZodObject<
|
|
1051
|
+
| `AssetNoContentSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; created_at: ZodBigInt; updated_at: ZodBigInt; key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<...>; collection: ZodString; owner: ZodCustom<...>; description: ZodOptional<...>; }, $strict>; headers: ZodArray<...>; encodings: ZodArray<...>; }, $s...` |
|
|
944
1052
|
|
|
945
1053
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L225)
|
|
946
1054
|
|
|
@@ -948,15 +1056,15 @@ A schema that validates a value is an Uint8Array.
|
|
|
948
1056
|
|
|
949
1057
|
| Constant | Type |
|
|
950
1058
|
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
951
|
-
| `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1059
|
+
| `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; reference_id: ZodOptional<...>; expires_at: ZodBigInt; encoding_type: ZodOptional<...>;...` |
|
|
952
1060
|
|
|
953
1061
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L251)
|
|
954
1062
|
|
|
955
1063
|
#### :gear: CommitBatchSchema
|
|
956
1064
|
|
|
957
|
-
| Constant | Type
|
|
958
|
-
| ------------------- |
|
|
959
|
-
| `CommitBatchSchema` | `ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
1065
|
+
| Constant | Type |
|
|
1066
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1067
|
+
| `CommitBatchSchema` | `ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; chunk_ids: ZodArray<ZodBigInt>; }, $strict>` |
|
|
960
1068
|
|
|
961
1069
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L308)
|
|
962
1070
|
|
|
@@ -970,9 +1078,9 @@ A schema that validates a value is an Uint8Array.
|
|
|
970
1078
|
|
|
971
1079
|
#### :gear: OptionAssetSchema
|
|
972
1080
|
|
|
973
|
-
| Constant | Type
|
|
974
|
-
| ------------------- |
|
|
975
|
-
| `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1081
|
+
| Constant | Type |
|
|
1082
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1083
|
+
| `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>` |
|
|
976
1084
|
|
|
977
1085
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L352)
|
|
978
1086
|
|
|
@@ -980,215 +1088,215 @@ A schema that validates a value is an Uint8Array.
|
|
|
980
1088
|
|
|
981
1089
|
| Constant | Type |
|
|
982
1090
|
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
983
|
-
| `AssetAssertUploadSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1091
|
+
| `AssetAssertUploadSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<...>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>; batch: ZodObject<...>; commit_batch: Z...` |
|
|
984
1092
|
|
|
985
1093
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/payload.ts#L14)
|
|
986
1094
|
|
|
987
1095
|
#### :gear: OnUploadAssetContextSchema
|
|
988
1096
|
|
|
989
|
-
| Constant | Type
|
|
990
|
-
| ---------------------------- |
|
|
991
|
-
| `OnUploadAssetContextSchema` | `ZodObject<{ caller:
|
|
1097
|
+
| Constant | Type |
|
|
1098
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1099
|
+
| `OnUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
992
1100
|
|
|
993
1101
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L9)
|
|
994
1102
|
|
|
995
1103
|
#### :gear: OnDeleteAssetContextSchema
|
|
996
1104
|
|
|
997
|
-
| Constant | Type
|
|
998
|
-
| ---------------------------- |
|
|
999
|
-
| `OnDeleteAssetContextSchema` | `ZodObject<{ caller:
|
|
1105
|
+
| Constant | Type |
|
|
1106
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1107
|
+
| `OnDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
1000
1108
|
|
|
1001
1109
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L21)
|
|
1002
1110
|
|
|
1003
1111
|
#### :gear: OnDeleteManyAssetsContextSchema
|
|
1004
1112
|
|
|
1005
|
-
| Constant | Type
|
|
1006
|
-
| --------------------------------- |
|
|
1007
|
-
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller:
|
|
1113
|
+
| Constant | Type |
|
|
1114
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1115
|
+
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ ...; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1008
1116
|
|
|
1009
1117
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L35)
|
|
1010
1118
|
|
|
1011
1119
|
#### :gear: OnDeleteFilteredAssetsContextSchema
|
|
1012
1120
|
|
|
1013
|
-
| Constant | Type
|
|
1014
|
-
| ------------------------------------- |
|
|
1015
|
-
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller:
|
|
1121
|
+
| Constant | Type |
|
|
1122
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1123
|
+
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ ...; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1016
1124
|
|
|
1017
1125
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L47)
|
|
1018
1126
|
|
|
1019
1127
|
#### :gear: AssertUploadAssetContextSchema
|
|
1020
1128
|
|
|
1021
|
-
| Constant | Type
|
|
1022
|
-
| -------------------------------- |
|
|
1023
|
-
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller:
|
|
1129
|
+
| Constant | Type |
|
|
1130
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1131
|
+
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ current: ZodOptional<ZodObject<...>>; batch: ZodObject<...>; commit_batch: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
1024
1132
|
|
|
1025
1133
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L61)
|
|
1026
1134
|
|
|
1027
1135
|
#### :gear: AssertDeleteAssetContextSchema
|
|
1028
1136
|
|
|
1029
|
-
| Constant | Type
|
|
1030
|
-
| -------------------------------- |
|
|
1031
|
-
| `AssertDeleteAssetContextSchema` | `ZodObject<{ caller:
|
|
1137
|
+
| Constant | Type |
|
|
1138
|
+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1139
|
+
| `AssertDeleteAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ key: ZodObject<{ name: ZodString; ... 4 more ...; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
1032
1140
|
|
|
1033
1141
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L73)
|
|
1034
1142
|
|
|
1035
1143
|
#### :gear: AssertSetDocSchema
|
|
1036
1144
|
|
|
1037
|
-
| Constant | Type
|
|
1038
|
-
| -------------------- |
|
|
1039
|
-
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1145
|
+
| Constant | Type |
|
|
1146
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1147
|
+
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1040
1148
|
|
|
1041
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1149
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L45)
|
|
1042
1150
|
|
|
1043
1151
|
#### :gear: AssertDeleteDocSchema
|
|
1044
1152
|
|
|
1045
|
-
| Constant | Type
|
|
1046
|
-
| ----------------------- |
|
|
1047
|
-
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1153
|
+
| Constant | Type |
|
|
1154
|
+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1155
|
+
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1048
1156
|
|
|
1049
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1157
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L55)
|
|
1050
1158
|
|
|
1051
1159
|
#### :gear: AssertUploadAssetSchema
|
|
1052
1160
|
|
|
1053
|
-
| Constant | Type
|
|
1054
|
-
| ------------------------- |
|
|
1055
|
-
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1161
|
+
| Constant | Type |
|
|
1162
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1163
|
+
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1056
1164
|
|
|
1057
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1165
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L65)
|
|
1058
1166
|
|
|
1059
1167
|
#### :gear: AssertDeleteAssetSchema
|
|
1060
1168
|
|
|
1061
|
-
| Constant | Type
|
|
1062
|
-
| ------------------------- |
|
|
1063
|
-
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1169
|
+
| Constant | Type |
|
|
1170
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1171
|
+
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1064
1172
|
|
|
1065
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1173
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L75)
|
|
1066
1174
|
|
|
1067
1175
|
#### :gear: AssertSchema
|
|
1068
1176
|
|
|
1069
|
-
| Constant | Type
|
|
1070
|
-
| -------------- |
|
|
1071
|
-
| `AssertSchema` | `ZodUnion<[ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1177
|
+
| Constant | Type |
|
|
1178
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1179
|
+
| `AssertSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>, ZodObject<......` |
|
|
1072
1180
|
|
|
1073
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1181
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L85)
|
|
1074
1182
|
|
|
1075
1183
|
#### :gear: OnSetDocSchema
|
|
1076
1184
|
|
|
1077
|
-
| Constant | Type
|
|
1078
|
-
| ---------------- |
|
|
1079
|
-
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1185
|
+
| Constant | Type |
|
|
1186
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1187
|
+
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1080
1188
|
|
|
1081
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1189
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L55)
|
|
1082
1190
|
|
|
1083
1191
|
#### :gear: OnSetManyDocsSchema
|
|
1084
1192
|
|
|
1085
|
-
| Constant | Type
|
|
1086
|
-
| --------------------- |
|
|
1087
|
-
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1193
|
+
| Constant | Type |
|
|
1194
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1195
|
+
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1088
1196
|
|
|
1089
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1197
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L65)
|
|
1090
1198
|
|
|
1091
1199
|
#### :gear: OnDeleteDocSchema
|
|
1092
1200
|
|
|
1093
|
-
| Constant | Type
|
|
1094
|
-
| ------------------- |
|
|
1095
|
-
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1201
|
+
| Constant | Type |
|
|
1202
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1203
|
+
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1096
1204
|
|
|
1097
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1205
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L75)
|
|
1098
1206
|
|
|
1099
1207
|
#### :gear: OnDeleteManyDocsSchema
|
|
1100
1208
|
|
|
1101
|
-
| Constant | Type
|
|
1102
|
-
| ------------------------ |
|
|
1103
|
-
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1209
|
+
| Constant | Type |
|
|
1210
|
+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1211
|
+
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1104
1212
|
|
|
1105
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1213
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L85)
|
|
1106
1214
|
|
|
1107
1215
|
#### :gear: OnDeleteFilteredDocsSchema
|
|
1108
1216
|
|
|
1109
|
-
| Constant | Type
|
|
1110
|
-
| ---------------------------- |
|
|
1111
|
-
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1217
|
+
| Constant | Type |
|
|
1218
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1219
|
+
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1112
1220
|
|
|
1113
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1221
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L95)
|
|
1114
1222
|
|
|
1115
1223
|
#### :gear: OnUploadAssetSchema
|
|
1116
1224
|
|
|
1117
|
-
| Constant | Type
|
|
1118
|
-
| --------------------- |
|
|
1119
|
-
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1225
|
+
| Constant | Type |
|
|
1226
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1227
|
+
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1120
1228
|
|
|
1121
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1229
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L105)
|
|
1122
1230
|
|
|
1123
1231
|
#### :gear: OnDeleteAssetSchema
|
|
1124
1232
|
|
|
1125
|
-
| Constant | Type
|
|
1126
|
-
| --------------------- |
|
|
1127
|
-
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1233
|
+
| Constant | Type |
|
|
1234
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1235
|
+
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodOptional<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1128
1236
|
|
|
1129
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1237
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L115)
|
|
1130
1238
|
|
|
1131
1239
|
#### :gear: OnDeleteManyAssetsSchema
|
|
1132
1240
|
|
|
1133
|
-
| Constant | Type
|
|
1134
|
-
| -------------------------- |
|
|
1135
|
-
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1241
|
+
| Constant | Type |
|
|
1242
|
+
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1243
|
+
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1136
1244
|
|
|
1137
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1245
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L125)
|
|
1138
1246
|
|
|
1139
1247
|
#### :gear: OnDeleteFilteredAssetsSchema
|
|
1140
1248
|
|
|
1141
|
-
| Constant | Type
|
|
1142
|
-
| ------------------------------ |
|
|
1143
|
-
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1249
|
+
| Constant | Type |
|
|
1250
|
+
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1251
|
+
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1144
1252
|
|
|
1145
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1253
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L135)
|
|
1146
1254
|
|
|
1147
1255
|
#### :gear: HookSchema
|
|
1148
1256
|
|
|
1149
|
-
| Constant | Type
|
|
1150
|
-
| ------------ |
|
|
1151
|
-
| `HookSchema` | `ZodUnion<[ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1257
|
+
| Constant | Type |
|
|
1258
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1259
|
+
| `HookSchema` | `ZodUnion<readonly [ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>, ... 7 more...` |
|
|
1152
1260
|
|
|
1153
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1261
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L145)
|
|
1154
1262
|
|
|
1155
1263
|
#### :gear: TimestampMatcherSchema
|
|
1156
1264
|
|
|
1157
|
-
| Constant | Type
|
|
1158
|
-
| ------------------------ |
|
|
1159
|
-
| `TimestampMatcherSchema` | `ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1265
|
+
| Constant | Type |
|
|
1266
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1267
|
+
| `TimestampMatcherSchema` | `ZodUnion<readonly [ZodObject<{ equal: ZodBigInt; }, $strip>, ZodObject<{ greater_than: ZodBigInt; }, $strip>, ZodObject<{ less_than: ZodBigInt; }, $strip>, ZodObject<...>]>` |
|
|
1160
1268
|
|
|
1161
1269
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L16)
|
|
1162
1270
|
|
|
1163
1271
|
#### :gear: ListMatcherSchema
|
|
1164
1272
|
|
|
1165
|
-
| Constant | Type
|
|
1166
|
-
| ------------------- |
|
|
1167
|
-
| `ListMatcherSchema` | `ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1273
|
+
| Constant | Type |
|
|
1274
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1275
|
+
| `ListMatcherSchema` | `ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<readonly [ZodObject<{ equal: ZodBigInt; }, $strip>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>>; updated_at: ZodOptional<...>; }, $strict>` |
|
|
1168
1276
|
|
|
1169
1277
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L35)
|
|
1170
1278
|
|
|
1171
1279
|
#### :gear: ListPaginateSchema
|
|
1172
1280
|
|
|
1173
|
-
| Constant | Type
|
|
1174
|
-
| -------------------- |
|
|
1175
|
-
| `ListPaginateSchema` | `ZodObject<{ start_after: ZodOptional<ZodString>; limit: ZodOptional<ZodBigInt>; },
|
|
1281
|
+
| Constant | Type |
|
|
1282
|
+
| -------------------- | --------------------------------------------------------------------------------------------- |
|
|
1283
|
+
| `ListPaginateSchema` | `ZodObject<{ start_after: ZodOptional<ZodString>; limit: ZodOptional<ZodBigInt>; }, $strict>` |
|
|
1176
1284
|
|
|
1177
1285
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L57)
|
|
1178
1286
|
|
|
1179
1287
|
#### :gear: ListOrderFieldSchema
|
|
1180
1288
|
|
|
1181
|
-
| Constant | Type
|
|
1182
|
-
| ---------------------- |
|
|
1183
|
-
| `ListOrderFieldSchema` | `ZodEnum<
|
|
1289
|
+
| Constant | Type |
|
|
1290
|
+
| ---------------------- | -------------------------------------------------------------------------------- |
|
|
1291
|
+
| `ListOrderFieldSchema` | `ZodEnum<{ keys: "keys"; created_at: "created_at"; updated_at: "updated_at"; }>` |
|
|
1184
1292
|
|
|
1185
1293
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L75)
|
|
1186
1294
|
|
|
1187
1295
|
#### :gear: ListOrderSchema
|
|
1188
1296
|
|
|
1189
|
-
| Constant | Type
|
|
1190
|
-
| ----------------- |
|
|
1191
|
-
| `ListOrderSchema` | `ZodObject<{ desc: ZodBoolean; field: ZodEnum<
|
|
1297
|
+
| Constant | Type |
|
|
1298
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
1299
|
+
| `ListOrderSchema` | `ZodObject<{ desc: ZodBoolean; field: ZodEnum<{ keys: "keys"; created_at: "created_at"; updated_at: "updated_at"; }>; }, $strict>` |
|
|
1192
1300
|
|
|
1193
1301
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L85)
|
|
1194
1302
|
|
|
@@ -1196,15 +1304,15 @@ A schema that validates a value is an Uint8Array.
|
|
|
1196
1304
|
|
|
1197
1305
|
| Constant | Type |
|
|
1198
1306
|
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1199
|
-
| `ListParamsSchema` | `ZodObject<{ matcher: ZodOptional<ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1307
|
+
| `ListParamsSchema` | `ZodObject<{ matcher: ZodOptional<ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<readonly [ZodObject<{ equal: ZodBigInt; }, $strip>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>>; updated_at: ZodOptional<...>; }, $strict>>; paginate: ZodOptional<...>...` |
|
|
1200
1308
|
|
|
1201
1309
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L103)
|
|
1202
1310
|
|
|
1203
1311
|
#### :gear: ControllerScopeSchema
|
|
1204
1312
|
|
|
1205
|
-
| Constant | Type
|
|
1206
|
-
| ----------------------- |
|
|
1207
|
-
| `ControllerScopeSchema` | `ZodEnum<
|
|
1313
|
+
| Constant | Type |
|
|
1314
|
+
| ----------------------- | ---------------------------------------------------------------- |
|
|
1315
|
+
| `ControllerScopeSchema` | `ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>` |
|
|
1208
1316
|
|
|
1209
1317
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L15)
|
|
1210
1318
|
|
|
@@ -1218,209 +1326,209 @@ A schema that validates a value is an Uint8Array.
|
|
|
1218
1326
|
|
|
1219
1327
|
#### :gear: ControllerSchema
|
|
1220
1328
|
|
|
1221
|
-
| Constant | Type
|
|
1222
|
-
| ------------------ |
|
|
1223
|
-
| `ControllerSchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
1329
|
+
| Constant | Type |
|
|
1330
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1331
|
+
| `ControllerSchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; }, $strict>` |
|
|
1224
1332
|
|
|
1225
1333
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L35)
|
|
1226
1334
|
|
|
1227
1335
|
#### :gear: ControllerRecordSchema
|
|
1228
1336
|
|
|
1229
|
-
| Constant | Type
|
|
1230
|
-
| ------------------------ |
|
|
1231
|
-
| `ControllerRecordSchema` | `ZodTuple<[
|
|
1337
|
+
| Constant | Type |
|
|
1338
|
+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1339
|
+
| `ControllerRecordSchema` | `ZodTuple<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; }, $strict>], null>` |
|
|
1232
1340
|
|
|
1233
1341
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L79)
|
|
1234
1342
|
|
|
1235
1343
|
#### :gear: ControllersSchema
|
|
1236
1344
|
|
|
1237
|
-
| Constant | Type
|
|
1238
|
-
| ------------------- |
|
|
1239
|
-
| `ControllersSchema` | `ZodArray<ZodTuple<[
|
|
1345
|
+
| Constant | Type |
|
|
1346
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1347
|
+
| `ControllersSchema` | `ZodArray<ZodTuple<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; }, $strict>], null>>` |
|
|
1240
1348
|
|
|
1241
1349
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L89)
|
|
1242
1350
|
|
|
1243
1351
|
#### :gear: ControllerCheckParamsSchema
|
|
1244
1352
|
|
|
1245
|
-
| Constant | Type
|
|
1246
|
-
| ----------------------------- |
|
|
1247
|
-
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[
|
|
1353
|
+
| Constant | Type |
|
|
1354
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1355
|
+
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<Principal, Principal>]>; controllers: ZodArray<...>; }, $strip>` |
|
|
1248
1356
|
|
|
1249
1357
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L99)
|
|
1250
1358
|
|
|
1251
1359
|
#### :gear: CollectionParamsSchema
|
|
1252
1360
|
|
|
1253
|
-
| Constant | Type
|
|
1254
|
-
| ------------------------ |
|
|
1255
|
-
| `CollectionParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1361
|
+
| Constant | Type |
|
|
1362
|
+
| ------------------------ | ------------------------------------------------ |
|
|
1363
|
+
| `CollectionParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1256
1364
|
|
|
1257
1365
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L15)
|
|
1258
1366
|
|
|
1259
1367
|
#### :gear: ListStoreParamsSchema
|
|
1260
1368
|
|
|
1261
|
-
| Constant | Type
|
|
1262
|
-
| ----------------------- |
|
|
1263
|
-
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1369
|
+
| Constant | Type |
|
|
1370
|
+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1371
|
+
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1264
1372
|
|
|
1265
1373
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L34)
|
|
1266
1374
|
|
|
1267
1375
|
#### :gear: GetDocStoreParamsSchema
|
|
1268
1376
|
|
|
1269
|
-
| Constant | Type
|
|
1270
|
-
| ------------------------- |
|
|
1271
|
-
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1377
|
+
| Constant | Type |
|
|
1378
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1379
|
+
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; }, $strict>` |
|
|
1272
1380
|
|
|
1273
1381
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L20)
|
|
1274
1382
|
|
|
1275
1383
|
#### :gear: SetDocStoreParamsSchema
|
|
1276
1384
|
|
|
1277
|
-
| Constant | Type
|
|
1278
|
-
| ------------------------- |
|
|
1279
|
-
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1385
|
+
| Constant | Type |
|
|
1386
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1387
|
+
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1280
1388
|
|
|
1281
1389
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L43)
|
|
1282
1390
|
|
|
1283
1391
|
#### :gear: DeleteDocStoreParamsSchema
|
|
1284
1392
|
|
|
1285
|
-
| Constant | Type
|
|
1286
|
-
| ---------------------------- |
|
|
1287
|
-
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1393
|
+
| Constant | Type |
|
|
1394
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1395
|
+
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1288
1396
|
|
|
1289
1397
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L63)
|
|
1290
1398
|
|
|
1291
1399
|
#### :gear: CountCollectionDocsStoreParamsSchema
|
|
1292
1400
|
|
|
1293
|
-
| Constant | Type
|
|
1294
|
-
| -------------------------------------- |
|
|
1295
|
-
| `CountCollectionDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1401
|
+
| Constant | Type |
|
|
1402
|
+
| -------------------------------------- | ------------------------------------------------ |
|
|
1403
|
+
| `CountCollectionDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1296
1404
|
|
|
1297
1405
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L83)
|
|
1298
1406
|
|
|
1299
1407
|
#### :gear: CountDocsStoreParamsSchema
|
|
1300
1408
|
|
|
1301
|
-
| Constant | Type
|
|
1302
|
-
| ---------------------------- |
|
|
1303
|
-
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1409
|
+
| Constant | Type |
|
|
1410
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1411
|
+
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1304
1412
|
|
|
1305
1413
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L93)
|
|
1306
1414
|
|
|
1307
1415
|
#### :gear: ListDocsStoreParamsSchema
|
|
1308
1416
|
|
|
1309
|
-
| Constant | Type
|
|
1310
|
-
| --------------------------- |
|
|
1311
|
-
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1417
|
+
| Constant | Type |
|
|
1418
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1419
|
+
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1312
1420
|
|
|
1313
1421
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L103)
|
|
1314
1422
|
|
|
1315
1423
|
#### :gear: DeleteDocsStoreParamsSchema
|
|
1316
1424
|
|
|
1317
|
-
| Constant | Type
|
|
1318
|
-
| ----------------------------- |
|
|
1319
|
-
| `DeleteDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1425
|
+
| Constant | Type |
|
|
1426
|
+
| ----------------------------- | ------------------------------------------------ |
|
|
1427
|
+
| `DeleteDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1320
1428
|
|
|
1321
1429
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L113)
|
|
1322
1430
|
|
|
1323
1431
|
#### :gear: DeleteFilteredDocsStoreParamsSchema
|
|
1324
1432
|
|
|
1325
|
-
| Constant | Type
|
|
1326
|
-
| ------------------------------------- |
|
|
1327
|
-
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1433
|
+
| Constant | Type |
|
|
1434
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1435
|
+
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1328
1436
|
|
|
1329
1437
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L123)
|
|
1330
1438
|
|
|
1331
1439
|
#### :gear: MemorySchema
|
|
1332
1440
|
|
|
1333
|
-
| Constant | Type
|
|
1334
|
-
| -------------- |
|
|
1335
|
-
| `MemorySchema` | `ZodEnum<
|
|
1441
|
+
| Constant | Type |
|
|
1442
|
+
| -------------- | ---------------------------------------------- |
|
|
1443
|
+
| `MemorySchema` | `ZodEnum<{ heap: "heap"; stable: "stable"; }>` |
|
|
1336
1444
|
|
|
1337
1445
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/collections.ts#L6)
|
|
1338
1446
|
|
|
1339
1447
|
#### :gear: GetAssetStoreParamsSchema
|
|
1340
1448
|
|
|
1341
|
-
| Constant | Type
|
|
1342
|
-
| --------------------------- |
|
|
1343
|
-
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1449
|
+
| Constant | Type |
|
|
1450
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1451
|
+
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; full_path: ZodString; }, $strict>` |
|
|
1344
1452
|
|
|
1345
1453
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L26)
|
|
1346
1454
|
|
|
1347
1455
|
#### :gear: CountCollectionAssetsStoreParamsSchema
|
|
1348
1456
|
|
|
1349
|
-
| Constant | Type
|
|
1350
|
-
| ---------------------------------------- |
|
|
1351
|
-
| `CountCollectionAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1457
|
+
| Constant | Type |
|
|
1458
|
+
| ---------------------------------------- | ------------------------------------------------ |
|
|
1459
|
+
| `CountCollectionAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1352
1460
|
|
|
1353
1461
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L49)
|
|
1354
1462
|
|
|
1355
1463
|
#### :gear: CountAssetsStoreParamsSchema
|
|
1356
1464
|
|
|
1357
|
-
| Constant | Type
|
|
1358
|
-
| ------------------------------ |
|
|
1359
|
-
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1465
|
+
| Constant | Type |
|
|
1466
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1467
|
+
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1360
1468
|
|
|
1361
1469
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L59)
|
|
1362
1470
|
|
|
1363
1471
|
#### :gear: SetAssetHandlerParamsSchema
|
|
1364
1472
|
|
|
1365
|
-
| Constant | Type
|
|
1366
|
-
| ----------------------------- |
|
|
1367
|
-
| `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1473
|
+
| Constant | Type |
|
|
1474
|
+
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1475
|
+
| `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; content: ZodCustom<...>; headers: ZodArray<...>; }, $strict>` |
|
|
1368
1476
|
|
|
1369
1477
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L69)
|
|
1370
1478
|
|
|
1371
1479
|
#### :gear: DeleteAssetsStoreParamsSchema
|
|
1372
1480
|
|
|
1373
|
-
| Constant | Type
|
|
1374
|
-
| ------------------------------- |
|
|
1375
|
-
| `DeleteAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1481
|
+
| Constant | Type |
|
|
1482
|
+
| ------------------------------- | ------------------------------------------------ |
|
|
1483
|
+
| `DeleteAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1376
1484
|
|
|
1377
1485
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L100)
|
|
1378
1486
|
|
|
1379
1487
|
#### :gear: DeleteFilteredAssetsStoreParamsSchema
|
|
1380
1488
|
|
|
1381
|
-
| Constant | Type
|
|
1382
|
-
| --------------------------------------- |
|
|
1383
|
-
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1489
|
+
| Constant | Type |
|
|
1490
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1491
|
+
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1384
1492
|
|
|
1385
1493
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L110)
|
|
1386
1494
|
|
|
1387
1495
|
#### :gear: DeleteAssetStoreParamsSchema
|
|
1388
1496
|
|
|
1389
|
-
| Constant | Type
|
|
1390
|
-
| ------------------------------ |
|
|
1391
|
-
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1497
|
+
| Constant | Type |
|
|
1498
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1499
|
+
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; full_path: ZodString; }, $strict>` |
|
|
1392
1500
|
|
|
1393
1501
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L120)
|
|
1394
1502
|
|
|
1395
1503
|
#### :gear: ListAssetsStoreParamsSchema
|
|
1396
1504
|
|
|
1397
|
-
| Constant | Type
|
|
1398
|
-
| ----------------------------- |
|
|
1399
|
-
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1505
|
+
| Constant | Type |
|
|
1506
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1507
|
+
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1400
1508
|
|
|
1401
1509
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L130)
|
|
1402
1510
|
|
|
1403
1511
|
#### :gear: GetContentChunksStoreParamsSchema
|
|
1404
1512
|
|
|
1405
|
-
| Constant | Type
|
|
1406
|
-
| ----------------------------------- |
|
|
1407
|
-
| `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<
|
|
1513
|
+
| Constant | Type |
|
|
1514
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1515
|
+
| `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip>; chunk_index: ZodBigInt; memory: ZodEnum<...>; }, $strict>` |
|
|
1408
1516
|
|
|
1409
1517
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L140)
|
|
1410
1518
|
|
|
1411
1519
|
#### :gear: IDLTypeSchema
|
|
1412
1520
|
|
|
1413
|
-
| Constant | Type
|
|
1414
|
-
| --------------- |
|
|
1415
|
-
| `IDLTypeSchema` | `
|
|
1521
|
+
| Constant | Type |
|
|
1522
|
+
| --------------- | ----------------------------------------- |
|
|
1523
|
+
| `IDLTypeSchema` | `ZodCustom<Type<unknown>, Type<unknown>>` |
|
|
1416
1524
|
|
|
1417
1525
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L9)
|
|
1418
1526
|
|
|
1419
1527
|
#### :gear: CallArgSchema
|
|
1420
1528
|
|
|
1421
|
-
| Constant | Type
|
|
1422
|
-
| --------------- |
|
|
1423
|
-
| `CallArgSchema` | `ZodTuple<[
|
|
1529
|
+
| Constant | Type |
|
|
1530
|
+
| --------------- | ----------------------------------------------------------------------- |
|
|
1531
|
+
| `CallArgSchema` | `ZodTuple<[ZodCustom<Type<unknown>, Type<unknown>>, ZodUnknown], null>` |
|
|
1424
1532
|
|
|
1425
1533
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L21)
|
|
1426
1534
|
|
|
@@ -1428,25 +1536,25 @@ A schema that validates a value is an Uint8Array.
|
|
|
1428
1536
|
|
|
1429
1537
|
Schema for encoding the call arguments.
|
|
1430
1538
|
|
|
1431
|
-
| Constant | Type
|
|
1432
|
-
| ---------------- |
|
|
1433
|
-
| `CallArgsSchema` | `ZodArray<ZodTuple<[
|
|
1539
|
+
| Constant | Type |
|
|
1540
|
+
| ---------------- | --------------------------------------------------------------------------------- |
|
|
1541
|
+
| `CallArgsSchema` | `ZodArray<ZodTuple<[ZodCustom<Type<unknown>, Type<unknown>>, ZodUnknown], null>>` |
|
|
1434
1542
|
|
|
1435
1543
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L33)
|
|
1436
1544
|
|
|
1437
1545
|
#### :gear: CallResultSchema
|
|
1438
1546
|
|
|
1439
|
-
| Constant | Type
|
|
1440
|
-
| ------------------ |
|
|
1441
|
-
| `CallResultSchema` | `
|
|
1547
|
+
| Constant | Type |
|
|
1548
|
+
| ------------------ | ----------------------------------------- |
|
|
1549
|
+
| `CallResultSchema` | `ZodCustom<Type<unknown>, Type<unknown>>` |
|
|
1442
1550
|
|
|
1443
1551
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L49)
|
|
1444
1552
|
|
|
1445
1553
|
#### :gear: CallParamsSchema
|
|
1446
1554
|
|
|
1447
|
-
| Constant | Type
|
|
1448
|
-
| ------------------ |
|
|
1449
|
-
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[
|
|
1555
|
+
| Constant | Type |
|
|
1556
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1557
|
+
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<Principal, Principal>]>; method: ZodString; args: ZodOptional<...>; result: ZodOptional<...>; }, $strip>` |
|
|
1450
1558
|
|
|
1451
1559
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L59)
|
|
1452
1560
|
|
|
@@ -1717,7 +1825,7 @@ Represents the parameters required to perform controller checks.
|
|
|
1717
1825
|
| Property | Type | Description |
|
|
1718
1826
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
1719
1827
|
| `caller` | `Uint8Array<ArrayBufferLike> or Principal` | The identity of the caller to verify against the controller list. |
|
|
1720
|
-
| `controllers` | `[Uint8Array<ArrayBufferLike>, {
|
|
1828
|
+
| `controllers` | `[Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][]` | The list of controllers to check against. |
|
|
1721
1829
|
|
|
1722
1830
|
#### :gear: CollectionParams
|
|
1723
1831
|
|
|
@@ -1958,7 +2066,7 @@ The function takes a context argument and returns `void`.
|
|
|
1958
2066
|
| ---------------- | ---------------------- |
|
|
1959
2067
|
| `AssertFunction` | `(context: T) => void` |
|
|
1960
2068
|
|
|
1961
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
2069
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L47)
|
|
1962
2070
|
|
|
1963
2071
|
#### :gear: RunFunction
|
|
1964
2072
|
|
|
@@ -1970,7 +2078,7 @@ The function takes a context argument and returns either a `Promise<void>` or `v
|
|
|
1970
2078
|
| ------------- | --------------------------------------- |
|
|
1971
2079
|
| `RunFunction` | `(context: T) => void or Promise<void>` |
|
|
1972
2080
|
|
|
1973
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
2081
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L64)
|
|
1974
2082
|
|
|
1975
2083
|
#### :gear: RawData
|
|
1976
2084
|
|
|
@@ -2005,7 +2113,7 @@ along with details about the user who triggered the operation.
|
|
|
2005
2113
|
| ----------------- | ------------------------------------ |
|
|
2006
2114
|
| `OnSetDocContext` | `HookContext<DocContext<DocUpsert>>` |
|
|
2007
2115
|
|
|
2008
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2116
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L60)
|
|
2009
2117
|
|
|
2010
2118
|
#### :gear: OnSetManyDocsContext
|
|
2011
2119
|
|
|
@@ -2018,7 +2126,7 @@ in a single operation, along with details about the user who triggered it.
|
|
|
2018
2126
|
| ---------------------- | -------------------------------------- |
|
|
2019
2127
|
| `OnSetManyDocsContext` | `HookContext<DocContext<DocUpsert>[]>` |
|
|
2020
2128
|
|
|
2021
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2129
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L75)
|
|
2022
2130
|
|
|
2023
2131
|
#### :gear: OnDeleteDocContext
|
|
2024
2132
|
|
|
@@ -2031,7 +2139,7 @@ along with details about the user who triggered the operation.
|
|
|
2031
2139
|
| -------------------- | ------------------------------------ |
|
|
2032
2140
|
| `OnDeleteDocContext` | `HookContext<DocContext<OptionDoc>>` |
|
|
2033
2141
|
|
|
2034
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2142
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L88)
|
|
2035
2143
|
|
|
2036
2144
|
#### :gear: OnDeleteManyDocsContext
|
|
2037
2145
|
|
|
@@ -2044,7 +2152,7 @@ along with details about the user who triggered the operation.
|
|
|
2044
2152
|
| ------------------------- | -------------------------------------- |
|
|
2045
2153
|
| `OnDeleteManyDocsContext` | `HookContext<DocContext<OptionDoc>[]>` |
|
|
2046
2154
|
|
|
2047
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2155
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L103)
|
|
2048
2156
|
|
|
2049
2157
|
#### :gear: OnDeleteFilteredDocsContext
|
|
2050
2158
|
|
|
@@ -2057,7 +2165,7 @@ along with details about the user who triggered the operation.
|
|
|
2057
2165
|
| ----------------------------- | -------------------------------------- |
|
|
2058
2166
|
| `OnDeleteFilteredDocsContext` | `HookContext<DocContext<OptionDoc>[]>` |
|
|
2059
2167
|
|
|
2060
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2168
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L118)
|
|
2061
2169
|
|
|
2062
2170
|
#### :gear: AssertSetDocContext
|
|
2063
2171
|
|
|
@@ -2070,7 +2178,7 @@ it is created or updated. If validation fails, the developer should throw an err
|
|
|
2070
2178
|
| --------------------- | --------------------------------------- |
|
|
2071
2179
|
| `AssertSetDocContext` | `HookContext<DocContext<DocAssertSet>>` |
|
|
2072
2180
|
|
|
2073
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2181
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L131)
|
|
2074
2182
|
|
|
2075
2183
|
#### :gear: AssertDeleteDocContext
|
|
2076
2184
|
|
|
@@ -2083,7 +2191,7 @@ it is deleted. If validation fails, the developer should throw an error.
|
|
|
2083
2191
|
| ------------------------ | ------------------------------------------ |
|
|
2084
2192
|
| `AssertDeleteDocContext` | `HookContext<DocContext<DocAssertDelete>>` |
|
|
2085
2193
|
|
|
2086
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2194
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L146)
|
|
2087
2195
|
|
|
2088
2196
|
#### :gear: SatelliteEnv
|
|
2089
2197
|
|
|
@@ -2315,7 +2423,7 @@ A generic schema for defining assertions related to collections.
|
|
|
2315
2423
|
| ---------- | ------------------------------------------------ |
|
|
2316
2424
|
| `OnAssert` | `Collections and { assert: AssertFunction<T>; }` |
|
|
2317
2425
|
|
|
2318
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2426
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L38)
|
|
2319
2427
|
|
|
2320
2428
|
#### :gear: AssertSetDoc
|
|
2321
2429
|
|
|
@@ -2325,7 +2433,7 @@ An assertion that runs when a document is created or updated.
|
|
|
2325
2433
|
| -------------- | ------------------------------- |
|
|
2326
2434
|
| `AssertSetDoc` | `OnAssert<AssertSetDocContext>` |
|
|
2327
2435
|
|
|
2328
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2436
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L50)
|
|
2329
2437
|
|
|
2330
2438
|
#### :gear: AssertDeleteDoc
|
|
2331
2439
|
|
|
@@ -2335,7 +2443,7 @@ An assertion that runs when a document is deleted.
|
|
|
2335
2443
|
| ----------------- | ---------------------------------- |
|
|
2336
2444
|
| `AssertDeleteDoc` | `OnAssert<AssertDeleteDocContext>` |
|
|
2337
2445
|
|
|
2338
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2446
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L60)
|
|
2339
2447
|
|
|
2340
2448
|
#### :gear: AssertUploadAsset
|
|
2341
2449
|
|
|
@@ -2345,7 +2453,7 @@ An assertion that runs before an asset is uploaded.
|
|
|
2345
2453
|
| ------------------- | ------------------------------------ |
|
|
2346
2454
|
| `AssertUploadAsset` | `OnAssert<AssertUploadAssetContext>` |
|
|
2347
2455
|
|
|
2348
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2456
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L70)
|
|
2349
2457
|
|
|
2350
2458
|
#### :gear: AssertDeleteAsset
|
|
2351
2459
|
|
|
@@ -2355,7 +2463,7 @@ An assertion that runs before an asset is deleted.
|
|
|
2355
2463
|
| ------------------- | ------------------------------------ |
|
|
2356
2464
|
| `AssertDeleteAsset` | `OnAssert<AssertDeleteAssetContext>` |
|
|
2357
2465
|
|
|
2358
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2466
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L80)
|
|
2359
2467
|
|
|
2360
2468
|
#### :gear: Assert
|
|
2361
2469
|
|
|
@@ -2365,7 +2473,7 @@ All assertions definitions.
|
|
|
2365
2473
|
| -------- | --------------------------------------------------------------------------- |
|
|
2366
2474
|
| `Assert` | `AssertSetDoc or AssertDeleteDoc or AssertUploadAsset or AssertDeleteAsset` |
|
|
2367
2475
|
|
|
2368
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2476
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L95)
|
|
2369
2477
|
|
|
2370
2478
|
#### :gear: AssertFn
|
|
2371
2479
|
|
|
@@ -2373,7 +2481,7 @@ All assertions definitions.
|
|
|
2373
2481
|
| ---------- | --------------------------------------------------- |
|
|
2374
2482
|
| `AssertFn` | `(assert: z.infer<typeof SatelliteEnvSchema>) => T` |
|
|
2375
2483
|
|
|
2376
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2484
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L102)
|
|
2377
2485
|
|
|
2378
2486
|
#### :gear: AssertFnOrObject
|
|
2379
2487
|
|
|
@@ -2381,7 +2489,7 @@ All assertions definitions.
|
|
|
2381
2489
|
| ------------------ | ------------------ |
|
|
2382
2490
|
| `AssertFnOrObject` | `T or AssertFn<T>` |
|
|
2383
2491
|
|
|
2384
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2492
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L106)
|
|
2385
2493
|
|
|
2386
2494
|
#### :gear: OnHook
|
|
2387
2495
|
|
|
@@ -2391,7 +2499,7 @@ A generic schema for defining hooks related to collections.
|
|
|
2391
2499
|
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2392
2500
|
| `OnHook` | `Collections and { /** * A function that runs when the hook is triggered for the specified collections. * * @param {T} context - Contains information about the affected document(s). * @returns {Promise<void>} Resolves when the operation completes. */ run: RunFunction<T>; }` |
|
|
2393
2501
|
|
|
2394
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2502
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L42)
|
|
2395
2503
|
|
|
2396
2504
|
#### :gear: OnSetDoc
|
|
2397
2505
|
|
|
@@ -2401,7 +2509,7 @@ A hook that runs when a document is created or updated.
|
|
|
2401
2509
|
| ---------- | ------------------------- |
|
|
2402
2510
|
| `OnSetDoc` | `OnHook<OnSetDocContext>` |
|
|
2403
2511
|
|
|
2404
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2512
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L60)
|
|
2405
2513
|
|
|
2406
2514
|
#### :gear: OnSetManyDocs
|
|
2407
2515
|
|
|
@@ -2411,7 +2519,7 @@ A hook that runs when multiple documents are created or updated.
|
|
|
2411
2519
|
| --------------- | ------------------------------ |
|
|
2412
2520
|
| `OnSetManyDocs` | `OnHook<OnSetManyDocsContext>` |
|
|
2413
2521
|
|
|
2414
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2522
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L70)
|
|
2415
2523
|
|
|
2416
2524
|
#### :gear: OnDeleteDoc
|
|
2417
2525
|
|
|
@@ -2421,7 +2529,7 @@ A hook that runs when a single document is deleted.
|
|
|
2421
2529
|
| ------------- | ---------------------------- |
|
|
2422
2530
|
| `OnDeleteDoc` | `OnHook<OnDeleteDocContext>` |
|
|
2423
2531
|
|
|
2424
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2532
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L80)
|
|
2425
2533
|
|
|
2426
2534
|
#### :gear: OnDeleteManyDocs
|
|
2427
2535
|
|
|
@@ -2431,7 +2539,7 @@ A hook that runs when multiple documents are deleted.
|
|
|
2431
2539
|
| ------------------ | --------------------------------- |
|
|
2432
2540
|
| `OnDeleteManyDocs` | `OnHook<OnDeleteManyDocsContext>` |
|
|
2433
2541
|
|
|
2434
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2542
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L90)
|
|
2435
2543
|
|
|
2436
2544
|
#### :gear: OnDeleteFilteredDocs
|
|
2437
2545
|
|
|
@@ -2441,7 +2549,7 @@ A hook that runs when a filtered set of documents is deleted based on query cond
|
|
|
2441
2549
|
| ---------------------- | ------------------------------------- |
|
|
2442
2550
|
| `OnDeleteFilteredDocs` | `OnHook<OnDeleteFilteredDocsContext>` |
|
|
2443
2551
|
|
|
2444
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2552
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L100)
|
|
2445
2553
|
|
|
2446
2554
|
#### :gear: OnUploadAsset
|
|
2447
2555
|
|
|
@@ -2451,7 +2559,7 @@ A hook that runs when a single asset is uploaded.
|
|
|
2451
2559
|
| --------------- | ------------------------------ |
|
|
2452
2560
|
| `OnUploadAsset` | `OnHook<OnUploadAssetContext>` |
|
|
2453
2561
|
|
|
2454
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2562
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L110)
|
|
2455
2563
|
|
|
2456
2564
|
#### :gear: OnDeleteAsset
|
|
2457
2565
|
|
|
@@ -2461,7 +2569,7 @@ A hook that runs when a single asset is potentially deleted.
|
|
|
2461
2569
|
| --------------- | ------------------------------ |
|
|
2462
2570
|
| `OnDeleteAsset` | `OnHook<OnDeleteAssetContext>` |
|
|
2463
2571
|
|
|
2464
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2572
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L120)
|
|
2465
2573
|
|
|
2466
2574
|
#### :gear: OnDeleteManyAssets
|
|
2467
2575
|
|
|
@@ -2471,7 +2579,7 @@ A hook that runs when multiple assets are potentially deleted.
|
|
|
2471
2579
|
| -------------------- | ----------------------------------- |
|
|
2472
2580
|
| `OnDeleteManyAssets` | `OnHook<OnDeleteManyAssetsContext>` |
|
|
2473
2581
|
|
|
2474
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2582
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L130)
|
|
2475
2583
|
|
|
2476
2584
|
#### :gear: OnDeleteFilteredAssets
|
|
2477
2585
|
|
|
@@ -2481,7 +2589,7 @@ A hook that runs when a filtered set of assets is deleted based on query conditi
|
|
|
2481
2589
|
| ------------------------ | --------------------------------------- |
|
|
2482
2590
|
| `OnDeleteFilteredAssets` | `OnHook<OnDeleteFilteredAssetsContext>` |
|
|
2483
2591
|
|
|
2484
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2592
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L140)
|
|
2485
2593
|
|
|
2486
2594
|
#### :gear: Hook
|
|
2487
2595
|
|
|
@@ -2491,7 +2599,7 @@ All hooks definitions.
|
|
|
2491
2599
|
| ------ | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2492
2600
|
| `Hook` | ` | OnSetDoc or OnSetManyDocs or OnDeleteDoc or OnDeleteManyDocs or OnDeleteFilteredDocs or OnUploadAsset or OnDeleteAsset or OnDeleteManyAssets or OnDeleteFilteredAssets` |
|
|
2493
2601
|
|
|
2494
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2602
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L160)
|
|
2495
2603
|
|
|
2496
2604
|
#### :gear: HookFn
|
|
2497
2605
|
|
|
@@ -2499,7 +2607,7 @@ All hooks definitions.
|
|
|
2499
2607
|
| -------- | ------------------------------------------------- |
|
|
2500
2608
|
| `HookFn` | `(hook: z.infer<typeof SatelliteEnvSchema>) => T` |
|
|
2501
2609
|
|
|
2502
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2610
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L173)
|
|
2503
2611
|
|
|
2504
2612
|
#### :gear: HookFnOrObject
|
|
2505
2613
|
|
|
@@ -2507,7 +2615,7 @@ All hooks definitions.
|
|
|
2507
2615
|
| ---------------- | ---------------- |
|
|
2508
2616
|
| `HookFnOrObject` | `T or HookFn<T>` |
|
|
2509
2617
|
|
|
2510
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2618
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L177)
|
|
2511
2619
|
|
|
2512
2620
|
#### :gear: TimestampMatcher
|
|
2513
2621
|
|