@junobuild/functions 0.1.4 → 0.2.0
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 +365 -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
|
|
|
@@ -218,7 +227,7 @@ Gets the list of admin controllers from the Satellite.
|
|
|
218
227
|
|
|
219
228
|
| Function | Type |
|
|
220
229
|
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
221
|
-
| `getAdminControllers` | `() => [Uint8Array<ArrayBufferLike>, {
|
|
230
|
+
| `getAdminControllers` | `() => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][]` |
|
|
222
231
|
|
|
223
232
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L15)
|
|
224
233
|
|
|
@@ -228,7 +237,7 @@ Gets the list of controllers from the Satellite.
|
|
|
228
237
|
|
|
229
238
|
| Function | Type |
|
|
230
239
|
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
231
|
-
| `getControllers` | `() => [Uint8Array<ArrayBufferLike>, {
|
|
240
|
+
| `getControllers` | `() => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][]` |
|
|
232
241
|
|
|
233
242
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L24)
|
|
234
243
|
|
|
@@ -682,25 +691,25 @@ the system time publicly exposed and verified part of the IC state tree
|
|
|
682
691
|
|
|
683
692
|
A schema that validates a value is an Uint8Array.
|
|
684
693
|
|
|
685
|
-
| Constant | Type
|
|
686
|
-
| ------------------ |
|
|
687
|
-
| `Uint8ArraySchema` | `
|
|
694
|
+
| Constant | Type |
|
|
695
|
+
| ------------------ | --------------------------------------------------------------------- |
|
|
696
|
+
| `Uint8ArraySchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
688
697
|
|
|
689
698
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L7)
|
|
690
699
|
|
|
691
700
|
#### :gear: RawPrincipalSchema
|
|
692
701
|
|
|
693
|
-
| Constant | Type
|
|
694
|
-
| -------------------- |
|
|
695
|
-
| `RawPrincipalSchema` | `
|
|
702
|
+
| Constant | Type |
|
|
703
|
+
| -------------------- | --------------------------------------------------------------------- |
|
|
704
|
+
| `RawPrincipalSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
696
705
|
|
|
697
706
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L14)
|
|
698
707
|
|
|
699
708
|
#### :gear: PrincipalSchema
|
|
700
709
|
|
|
701
|
-
| Constant | Type
|
|
702
|
-
| ----------------- |
|
|
703
|
-
| `PrincipalSchema` | `
|
|
710
|
+
| Constant | Type |
|
|
711
|
+
| ----------------- | --------------------------------- |
|
|
712
|
+
| `PrincipalSchema` | `ZodCustom<Principal, Principal>` |
|
|
704
713
|
|
|
705
714
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L24)
|
|
706
715
|
|
|
@@ -722,17 +731,17 @@ A schema that validates a value is an Uint8Array.
|
|
|
722
731
|
|
|
723
732
|
#### :gear: RawUserIdSchema
|
|
724
733
|
|
|
725
|
-
| Constant | Type
|
|
726
|
-
| ----------------- |
|
|
727
|
-
| `RawUserIdSchema` | `
|
|
734
|
+
| Constant | Type |
|
|
735
|
+
| ----------------- | --------------------------------------------------------------------- |
|
|
736
|
+
| `RawUserIdSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
728
737
|
|
|
729
738
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L31)
|
|
730
739
|
|
|
731
740
|
#### :gear: UserIdSchema
|
|
732
741
|
|
|
733
|
-
| Constant | Type
|
|
734
|
-
| -------------- |
|
|
735
|
-
| `UserIdSchema` | `
|
|
742
|
+
| Constant | Type |
|
|
743
|
+
| -------------- | --------------------------------- |
|
|
744
|
+
| `UserIdSchema` | `ZodCustom<Principal, Principal>` |
|
|
736
745
|
|
|
737
746
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L43)
|
|
738
747
|
|
|
@@ -762,177 +771,177 @@ A schema that validates a value is an Uint8Array.
|
|
|
762
771
|
|
|
763
772
|
#### :gear: CollectionsSchema
|
|
764
773
|
|
|
765
|
-
| Constant | Type
|
|
766
|
-
| ------------------- |
|
|
767
|
-
| `CollectionsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
774
|
+
| Constant | Type |
|
|
775
|
+
| ------------------- | ------------------------------------------------------------------------ |
|
|
776
|
+
| `CollectionsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; }, $strict>` |
|
|
768
777
|
|
|
769
778
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/collections.ts#L7)
|
|
770
779
|
|
|
771
780
|
#### :gear: RawDataSchema
|
|
772
781
|
|
|
773
|
-
| Constant | Type
|
|
774
|
-
| --------------- |
|
|
775
|
-
| `RawDataSchema` | `
|
|
782
|
+
| Constant | Type |
|
|
783
|
+
| --------------- | --------------------------------------------------------------------- |
|
|
784
|
+
| `RawDataSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
776
785
|
|
|
777
786
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L17)
|
|
778
787
|
|
|
779
788
|
#### :gear: DocSchema
|
|
780
789
|
|
|
781
|
-
| Constant | Type
|
|
782
|
-
| ----------- |
|
|
783
|
-
| `DocSchema` | `ZodObject<{ owner:
|
|
790
|
+
| Constant | Type |
|
|
791
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
792
|
+
| `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
793
|
|
|
785
794
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L29)
|
|
786
795
|
|
|
787
796
|
#### :gear: OptionDocSchema
|
|
788
797
|
|
|
789
|
-
| Constant | Type
|
|
790
|
-
| ----------------- |
|
|
791
|
-
| `OptionDocSchema` | `ZodOptional<ZodObject<{ owner:
|
|
798
|
+
| Constant | Type |
|
|
799
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
800
|
+
| `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
801
|
|
|
793
802
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L79)
|
|
794
803
|
|
|
795
804
|
#### :gear: SetDocSchema
|
|
796
805
|
|
|
797
|
-
| Constant | Type
|
|
798
|
-
| -------------- |
|
|
799
|
-
| `SetDocSchema` | `ZodObject<{ data:
|
|
806
|
+
| Constant | Type |
|
|
807
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
808
|
+
| `SetDocSchema` | `ZodObject<{ data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; description: ZodOptional<ZodString>; version: ZodOptional<...>; }, $strict>` |
|
|
800
809
|
|
|
801
810
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L89)
|
|
802
811
|
|
|
803
812
|
#### :gear: DelDocSchema
|
|
804
813
|
|
|
805
|
-
| Constant | Type
|
|
806
|
-
| -------------- |
|
|
807
|
-
| `DelDocSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; },
|
|
814
|
+
| Constant | Type |
|
|
815
|
+
| -------------- | ---------------------------------------------------------- |
|
|
816
|
+
| `DelDocSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; }, $strict>` |
|
|
808
817
|
|
|
809
818
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/db.ts#L121)
|
|
810
819
|
|
|
811
820
|
#### :gear: DocUpsertSchema
|
|
812
821
|
|
|
813
|
-
| Constant | Type
|
|
814
|
-
| ----------------- |
|
|
815
|
-
| `DocUpsertSchema` | `ZodObject<{ before: ZodOptional<ZodObject<{ owner:
|
|
822
|
+
| Constant | Type |
|
|
823
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
824
|
+
| `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
825
|
|
|
817
826
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L14)
|
|
818
827
|
|
|
819
828
|
#### :gear: DocAssertSetSchema
|
|
820
829
|
|
|
821
|
-
| Constant | Type
|
|
822
|
-
| -------------------- |
|
|
823
|
-
| `DocAssertSetSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner:
|
|
830
|
+
| Constant | Type |
|
|
831
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
832
|
+
| `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
833
|
|
|
825
834
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L41)
|
|
826
835
|
|
|
827
836
|
#### :gear: DocAssertDeleteSchema
|
|
828
837
|
|
|
829
|
-
| Constant | Type
|
|
830
|
-
| ----------------------- |
|
|
831
|
-
| `DocAssertDeleteSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ owner:
|
|
838
|
+
| Constant | Type |
|
|
839
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
840
|
+
| `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
841
|
|
|
833
842
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/payload.ts#L71)
|
|
834
843
|
|
|
835
844
|
#### :gear: OnSetDocContextSchema
|
|
836
845
|
|
|
837
|
-
| Constant | Type
|
|
838
|
-
| ----------------------- |
|
|
839
|
-
| `OnSetDocContextSchema` | `ZodObject<{ caller:
|
|
846
|
+
| Constant | Type |
|
|
847
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
848
|
+
| `OnSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
840
849
|
|
|
841
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
850
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L52)
|
|
842
851
|
|
|
843
852
|
#### :gear: OnSetManyDocsContextSchema
|
|
844
853
|
|
|
845
|
-
| Constant | Type
|
|
846
|
-
| ---------------------------- |
|
|
847
|
-
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller:
|
|
854
|
+
| Constant | Type |
|
|
855
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
856
|
+
| `OnSetManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>>; }, $strict>` |
|
|
848
857
|
|
|
849
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
858
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L65)
|
|
850
859
|
|
|
851
860
|
#### :gear: OnDeleteDocContextSchema
|
|
852
861
|
|
|
853
|
-
| Constant | Type
|
|
854
|
-
| -------------------------- |
|
|
855
|
-
| `OnDeleteDocContextSchema` | `ZodObject<{ caller:
|
|
862
|
+
| Constant | Type |
|
|
863
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
864
|
+
| `OnDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>; }, $strict>` |
|
|
856
865
|
|
|
857
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
866
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L80)
|
|
858
867
|
|
|
859
868
|
#### :gear: OnDeleteManyDocsContextSchema
|
|
860
869
|
|
|
861
|
-
| Constant | Type
|
|
862
|
-
| ------------------------------- |
|
|
863
|
-
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller:
|
|
870
|
+
| Constant | Type |
|
|
871
|
+
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
872
|
+
| `OnDeleteManyDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
864
873
|
|
|
865
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
874
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L93)
|
|
866
875
|
|
|
867
876
|
#### :gear: OnDeleteFilteredDocsContextSchema
|
|
868
877
|
|
|
869
|
-
| Constant | Type
|
|
870
|
-
| ----------------------------------- |
|
|
871
|
-
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller:
|
|
878
|
+
| Constant | Type |
|
|
879
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
880
|
+
| `OnDeleteFilteredDocsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict>` |
|
|
872
881
|
|
|
873
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
882
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L108)
|
|
874
883
|
|
|
875
884
|
#### :gear: AssertSetDocContextSchema
|
|
876
885
|
|
|
877
|
-
| Constant | Type
|
|
878
|
-
| --------------------------- |
|
|
879
|
-
| `AssertSetDocContextSchema` | `ZodObject<{ caller:
|
|
886
|
+
| Constant | Type |
|
|
887
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
888
|
+
| `AssertSetDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
880
889
|
|
|
881
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
890
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L123)
|
|
882
891
|
|
|
883
892
|
#### :gear: AssertDeleteDocContextSchema
|
|
884
893
|
|
|
885
|
-
| Constant | Type
|
|
886
|
-
| ------------------------------ |
|
|
887
|
-
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller:
|
|
894
|
+
| Constant | Type |
|
|
895
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
896
|
+
| `AssertDeleteDocContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
888
897
|
|
|
889
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
898
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L136)
|
|
890
899
|
|
|
891
900
|
#### :gear: SatelliteEnvSchema
|
|
892
901
|
|
|
893
|
-
| Constant | Type
|
|
894
|
-
| -------------------- |
|
|
895
|
-
| `SatelliteEnvSchema` | `ZodRecord<ZodString,
|
|
902
|
+
| Constant | Type |
|
|
903
|
+
| -------------------- | --------------------------------- |
|
|
904
|
+
| `SatelliteEnvSchema` | `ZodRecord<ZodString, ZodString>` |
|
|
896
905
|
|
|
897
906
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/satellite.env.ts#L6)
|
|
898
907
|
|
|
899
908
|
#### :gear: HeaderFieldsSchema
|
|
900
909
|
|
|
901
|
-
| Constant | Type
|
|
902
|
-
| -------------------- |
|
|
903
|
-
| `HeaderFieldsSchema` | `ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
910
|
+
| Constant | Type |
|
|
911
|
+
| -------------------- | -------------------------------------------------- |
|
|
912
|
+
| `HeaderFieldsSchema` | `ZodArray<ZodTuple<[ZodString, ZodString], null>>` |
|
|
904
913
|
|
|
905
914
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L29)
|
|
906
915
|
|
|
907
916
|
#### :gear: BlobSchema
|
|
908
917
|
|
|
909
|
-
| Constant | Type
|
|
910
|
-
| ------------ |
|
|
911
|
-
| `BlobSchema` | `
|
|
918
|
+
| Constant | Type |
|
|
919
|
+
| ------------ | --------------------------------------------------------------------- |
|
|
920
|
+
| `BlobSchema` | `ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>` |
|
|
912
921
|
|
|
913
922
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L39)
|
|
914
923
|
|
|
915
924
|
#### :gear: AssetKeySchema
|
|
916
925
|
|
|
917
|
-
| Constant | Type
|
|
918
|
-
| ---------------- |
|
|
919
|
-
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
926
|
+
| Constant | Type |
|
|
927
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
928
|
+
| `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>` |
|
|
920
929
|
|
|
921
930
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L71)
|
|
922
931
|
|
|
923
932
|
#### :gear: AssetEncodingSchema
|
|
924
933
|
|
|
925
|
-
| Constant | Type
|
|
926
|
-
| --------------------- |
|
|
927
|
-
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<
|
|
934
|
+
| Constant | Type |
|
|
935
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
936
|
+
| `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip>` |
|
|
928
937
|
|
|
929
938
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L121)
|
|
930
939
|
|
|
931
940
|
#### :gear: AssetSchema
|
|
932
941
|
|
|
933
|
-
| Constant | Type
|
|
934
|
-
| ------------- |
|
|
935
|
-
| `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
942
|
+
| Constant | Type |
|
|
943
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
944
|
+
| `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
945
|
|
|
937
946
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L176)
|
|
938
947
|
|
|
@@ -940,7 +949,7 @@ A schema that validates a value is an Uint8Array.
|
|
|
940
949
|
|
|
941
950
|
| Constant | Type |
|
|
942
951
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
943
|
-
| `AssetNoContentSchema` | `ZodObject<
|
|
952
|
+
| `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
953
|
|
|
945
954
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L225)
|
|
946
955
|
|
|
@@ -948,15 +957,15 @@ A schema that validates a value is an Uint8Array.
|
|
|
948
957
|
|
|
949
958
|
| Constant | Type |
|
|
950
959
|
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
951
|
-
| `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
960
|
+
| `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
961
|
|
|
953
962
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L251)
|
|
954
963
|
|
|
955
964
|
#### :gear: CommitBatchSchema
|
|
956
965
|
|
|
957
|
-
| Constant | Type
|
|
958
|
-
| ------------------- |
|
|
959
|
-
| `CommitBatchSchema` | `ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
966
|
+
| Constant | Type |
|
|
967
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
968
|
+
| `CommitBatchSchema` | `ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; chunk_ids: ZodArray<ZodBigInt>; }, $strict>` |
|
|
960
969
|
|
|
961
970
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L308)
|
|
962
971
|
|
|
@@ -970,9 +979,9 @@ A schema that validates a value is an Uint8Array.
|
|
|
970
979
|
|
|
971
980
|
#### :gear: OptionAssetSchema
|
|
972
981
|
|
|
973
|
-
| Constant | Type
|
|
974
|
-
| ------------------- |
|
|
975
|
-
| `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
982
|
+
| Constant | Type |
|
|
983
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
984
|
+
| `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
985
|
|
|
977
986
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L352)
|
|
978
987
|
|
|
@@ -980,215 +989,215 @@ A schema that validates a value is an Uint8Array.
|
|
|
980
989
|
|
|
981
990
|
| Constant | Type |
|
|
982
991
|
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
983
|
-
| `AssetAssertUploadSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
992
|
+
| `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
993
|
|
|
985
994
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/payload.ts#L14)
|
|
986
995
|
|
|
987
996
|
#### :gear: OnUploadAssetContextSchema
|
|
988
997
|
|
|
989
|
-
| Constant | Type
|
|
990
|
-
| ---------------------------- |
|
|
991
|
-
| `OnUploadAssetContextSchema` | `ZodObject<{ caller:
|
|
998
|
+
| Constant | Type |
|
|
999
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1000
|
+
| `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
1001
|
|
|
993
1002
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L9)
|
|
994
1003
|
|
|
995
1004
|
#### :gear: OnDeleteAssetContextSchema
|
|
996
1005
|
|
|
997
|
-
| Constant | Type
|
|
998
|
-
| ---------------------------- |
|
|
999
|
-
| `OnDeleteAssetContextSchema` | `ZodObject<{ caller:
|
|
1006
|
+
| Constant | Type |
|
|
1007
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1008
|
+
| `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
1009
|
|
|
1001
1010
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L21)
|
|
1002
1011
|
|
|
1003
1012
|
#### :gear: OnDeleteManyAssetsContextSchema
|
|
1004
1013
|
|
|
1005
|
-
| Constant | Type
|
|
1006
|
-
| --------------------------------- |
|
|
1007
|
-
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller:
|
|
1014
|
+
| Constant | Type |
|
|
1015
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1016
|
+
| `OnDeleteManyAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ ...; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1008
1017
|
|
|
1009
1018
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L35)
|
|
1010
1019
|
|
|
1011
1020
|
#### :gear: OnDeleteFilteredAssetsContextSchema
|
|
1012
1021
|
|
|
1013
|
-
| Constant | Type
|
|
1014
|
-
| ------------------------------------- |
|
|
1015
|
-
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller:
|
|
1022
|
+
| Constant | Type |
|
|
1023
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1024
|
+
| `OnDeleteFilteredAssetsContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodOptional<ZodObject<{ key: ZodObject<{ ...; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>>; }, $strict>` |
|
|
1016
1025
|
|
|
1017
1026
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L47)
|
|
1018
1027
|
|
|
1019
1028
|
#### :gear: AssertUploadAssetContextSchema
|
|
1020
1029
|
|
|
1021
|
-
| Constant | Type
|
|
1022
|
-
| -------------------------------- |
|
|
1023
|
-
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller:
|
|
1030
|
+
| Constant | Type |
|
|
1031
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1032
|
+
| `AssertUploadAssetContextSchema` | `ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ current: ZodOptional<ZodObject<...>>; batch: ZodObject<...>; commit_batch: ZodObject<...>; }, $strict>; }, $strict>` |
|
|
1024
1033
|
|
|
1025
1034
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L61)
|
|
1026
1035
|
|
|
1027
1036
|
#### :gear: AssertDeleteAssetContextSchema
|
|
1028
1037
|
|
|
1029
|
-
| Constant | Type
|
|
1030
|
-
| -------------------------------- |
|
|
1031
|
-
| `AssertDeleteAssetContextSchema` | `ZodObject<{ caller:
|
|
1038
|
+
| Constant | Type |
|
|
1039
|
+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1040
|
+
| `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
1041
|
|
|
1033
1042
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/context.ts#L73)
|
|
1034
1043
|
|
|
1035
1044
|
#### :gear: AssertSetDocSchema
|
|
1036
1045
|
|
|
1037
|
-
| Constant | Type
|
|
1038
|
-
| -------------------- |
|
|
1039
|
-
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1046
|
+
| Constant | Type |
|
|
1047
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1048
|
+
| `AssertSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1040
1049
|
|
|
1041
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1050
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L45)
|
|
1042
1051
|
|
|
1043
1052
|
#### :gear: AssertDeleteDocSchema
|
|
1044
1053
|
|
|
1045
|
-
| Constant | Type
|
|
1046
|
-
| ----------------------- |
|
|
1047
|
-
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1054
|
+
| Constant | Type |
|
|
1055
|
+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1056
|
+
| `AssertDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1048
1057
|
|
|
1049
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1058
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L55)
|
|
1050
1059
|
|
|
1051
1060
|
#### :gear: AssertUploadAssetSchema
|
|
1052
1061
|
|
|
1053
|
-
| Constant | Type
|
|
1054
|
-
| ------------------------- |
|
|
1055
|
-
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1062
|
+
| Constant | Type |
|
|
1063
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1064
|
+
| `AssertUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1056
1065
|
|
|
1057
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1066
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L65)
|
|
1058
1067
|
|
|
1059
1068
|
#### :gear: AssertDeleteAssetSchema
|
|
1060
1069
|
|
|
1061
|
-
| Constant | Type
|
|
1062
|
-
| ------------------------- |
|
|
1063
|
-
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1070
|
+
| Constant | Type |
|
|
1071
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1072
|
+
| `AssertDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; assert: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodVoid>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1064
1073
|
|
|
1065
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1074
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L75)
|
|
1066
1075
|
|
|
1067
1076
|
#### :gear: AssertSchema
|
|
1068
1077
|
|
|
1069
|
-
| Constant | Type
|
|
1070
|
-
| -------------- |
|
|
1071
|
-
| `AssertSchema` | `ZodUnion<[ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1078
|
+
| Constant | Type |
|
|
1079
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1080
|
+
| `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
1081
|
|
|
1073
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
1082
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L85)
|
|
1074
1083
|
|
|
1075
1084
|
#### :gear: OnSetDocSchema
|
|
1076
1085
|
|
|
1077
|
-
| Constant | Type
|
|
1078
|
-
| ---------------- |
|
|
1079
|
-
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1086
|
+
| Constant | Type |
|
|
1087
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1088
|
+
| `OnSetDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1080
1089
|
|
|
1081
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1090
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L55)
|
|
1082
1091
|
|
|
1083
1092
|
#### :gear: OnSetManyDocsSchema
|
|
1084
1093
|
|
|
1085
|
-
| Constant | Type
|
|
1086
|
-
| --------------------- |
|
|
1087
|
-
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1094
|
+
| Constant | Type |
|
|
1095
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1096
|
+
| `OnSetManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1088
1097
|
|
|
1089
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1098
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L65)
|
|
1090
1099
|
|
|
1091
1100
|
#### :gear: OnDeleteDocSchema
|
|
1092
1101
|
|
|
1093
|
-
| Constant | Type
|
|
1094
|
-
| ------------------- |
|
|
1095
|
-
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1102
|
+
| Constant | Type |
|
|
1103
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1104
|
+
| `OnDeleteDocSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1096
1105
|
|
|
1097
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1106
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L75)
|
|
1098
1107
|
|
|
1099
1108
|
#### :gear: OnDeleteManyDocsSchema
|
|
1100
1109
|
|
|
1101
|
-
| Constant | Type
|
|
1102
|
-
| ------------------------ |
|
|
1103
|
-
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1110
|
+
| Constant | Type |
|
|
1111
|
+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1112
|
+
| `OnDeleteManyDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1104
1113
|
|
|
1105
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1114
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L85)
|
|
1106
1115
|
|
|
1107
1116
|
#### :gear: OnDeleteFilteredDocsSchema
|
|
1108
1117
|
|
|
1109
|
-
| Constant | Type
|
|
1110
|
-
| ---------------------------- |
|
|
1111
|
-
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1118
|
+
| Constant | Type |
|
|
1119
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1120
|
+
| `OnDeleteFilteredDocsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1112
1121
|
|
|
1113
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1122
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L95)
|
|
1114
1123
|
|
|
1115
1124
|
#### :gear: OnUploadAssetSchema
|
|
1116
1125
|
|
|
1117
|
-
| Constant | Type
|
|
1118
|
-
| --------------------- |
|
|
1119
|
-
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1126
|
+
| Constant | Type |
|
|
1127
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1128
|
+
| `OnUploadAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodObject<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1120
1129
|
|
|
1121
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1130
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L105)
|
|
1122
1131
|
|
|
1123
1132
|
#### :gear: OnDeleteAssetSchema
|
|
1124
1133
|
|
|
1125
|
-
| Constant | Type
|
|
1126
|
-
| --------------------- |
|
|
1127
|
-
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1134
|
+
| Constant | Type |
|
|
1135
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1136
|
+
| `OnDeleteAssetSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodOptional<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1128
1137
|
|
|
1129
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1138
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L115)
|
|
1130
1139
|
|
|
1131
1140
|
#### :gear: OnDeleteManyAssetsSchema
|
|
1132
1141
|
|
|
1133
|
-
| Constant | Type
|
|
1134
|
-
| -------------------------- |
|
|
1135
|
-
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1142
|
+
| Constant | Type |
|
|
1143
|
+
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1144
|
+
| `OnDeleteManyAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1136
1145
|
|
|
1137
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1146
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L125)
|
|
1138
1147
|
|
|
1139
1148
|
#### :gear: OnDeleteFilteredAssetsSchema
|
|
1140
1149
|
|
|
1141
|
-
| Constant | Type
|
|
1142
|
-
| ------------------------------ |
|
|
1143
|
-
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1150
|
+
| Constant | Type |
|
|
1151
|
+
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1152
|
+
| `OnDeleteFilteredAssetsSchema` | `ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; run: ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; data: ZodArray<...>; }, $strict>], null>, ZodUnion<...>>, $InferInnerFunctionType<...>>; }, $strict>` |
|
|
1144
1153
|
|
|
1145
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1154
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L135)
|
|
1146
1155
|
|
|
1147
1156
|
#### :gear: HookSchema
|
|
1148
1157
|
|
|
1149
|
-
| Constant | Type
|
|
1150
|
-
| ------------ |
|
|
1151
|
-
| `HookSchema` | `ZodUnion<[ZodObject<{ collections: ZodReadonly<ZodArray<ZodString
|
|
1158
|
+
| Constant | Type |
|
|
1159
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1160
|
+
| `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
1161
|
|
|
1153
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
1162
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L145)
|
|
1154
1163
|
|
|
1155
1164
|
#### :gear: TimestampMatcherSchema
|
|
1156
1165
|
|
|
1157
|
-
| Constant | Type
|
|
1158
|
-
| ------------------------ |
|
|
1159
|
-
| `TimestampMatcherSchema` | `ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1166
|
+
| Constant | Type |
|
|
1167
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1168
|
+
| `TimestampMatcherSchema` | `ZodUnion<readonly [ZodObject<{ equal: ZodBigInt; }, $strip>, ZodObject<{ greater_than: ZodBigInt; }, $strip>, ZodObject<{ less_than: ZodBigInt; }, $strip>, ZodObject<...>]>` |
|
|
1160
1169
|
|
|
1161
1170
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L16)
|
|
1162
1171
|
|
|
1163
1172
|
#### :gear: ListMatcherSchema
|
|
1164
1173
|
|
|
1165
|
-
| Constant | Type
|
|
1166
|
-
| ------------------- |
|
|
1167
|
-
| `ListMatcherSchema` | `ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1174
|
+
| Constant | Type |
|
|
1175
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1176
|
+
| `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
1177
|
|
|
1169
1178
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L35)
|
|
1170
1179
|
|
|
1171
1180
|
#### :gear: ListPaginateSchema
|
|
1172
1181
|
|
|
1173
|
-
| Constant | Type
|
|
1174
|
-
| -------------------- |
|
|
1175
|
-
| `ListPaginateSchema` | `ZodObject<{ start_after: ZodOptional<ZodString>; limit: ZodOptional<ZodBigInt>; },
|
|
1182
|
+
| Constant | Type |
|
|
1183
|
+
| -------------------- | --------------------------------------------------------------------------------------------- |
|
|
1184
|
+
| `ListPaginateSchema` | `ZodObject<{ start_after: ZodOptional<ZodString>; limit: ZodOptional<ZodBigInt>; }, $strict>` |
|
|
1176
1185
|
|
|
1177
1186
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L57)
|
|
1178
1187
|
|
|
1179
1188
|
#### :gear: ListOrderFieldSchema
|
|
1180
1189
|
|
|
1181
|
-
| Constant | Type
|
|
1182
|
-
| ---------------------- |
|
|
1183
|
-
| `ListOrderFieldSchema` | `ZodEnum<
|
|
1190
|
+
| Constant | Type |
|
|
1191
|
+
| ---------------------- | -------------------------------------------------------------------------------- |
|
|
1192
|
+
| `ListOrderFieldSchema` | `ZodEnum<{ keys: "keys"; created_at: "created_at"; updated_at: "updated_at"; }>` |
|
|
1184
1193
|
|
|
1185
1194
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L75)
|
|
1186
1195
|
|
|
1187
1196
|
#### :gear: ListOrderSchema
|
|
1188
1197
|
|
|
1189
|
-
| Constant | Type
|
|
1190
|
-
| ----------------- |
|
|
1191
|
-
| `ListOrderSchema` | `ZodObject<{ desc: ZodBoolean; field: ZodEnum<
|
|
1198
|
+
| Constant | Type |
|
|
1199
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
1200
|
+
| `ListOrderSchema` | `ZodObject<{ desc: ZodBoolean; field: ZodEnum<{ keys: "keys"; created_at: "created_at"; updated_at: "updated_at"; }>; }, $strict>` |
|
|
1192
1201
|
|
|
1193
1202
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L85)
|
|
1194
1203
|
|
|
@@ -1196,15 +1205,15 @@ A schema that validates a value is an Uint8Array.
|
|
|
1196
1205
|
|
|
1197
1206
|
| Constant | Type |
|
|
1198
1207
|
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1199
|
-
| `ListParamsSchema` | `ZodObject<{ matcher: ZodOptional<ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; },
|
|
1208
|
+
| `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
1209
|
|
|
1201
1210
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L103)
|
|
1202
1211
|
|
|
1203
1212
|
#### :gear: ControllerScopeSchema
|
|
1204
1213
|
|
|
1205
|
-
| Constant | Type
|
|
1206
|
-
| ----------------------- |
|
|
1207
|
-
| `ControllerScopeSchema` | `ZodEnum<
|
|
1214
|
+
| Constant | Type |
|
|
1215
|
+
| ----------------------- | ---------------------------------------------------------------- |
|
|
1216
|
+
| `ControllerScopeSchema` | `ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>` |
|
|
1208
1217
|
|
|
1209
1218
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L15)
|
|
1210
1219
|
|
|
@@ -1218,209 +1227,209 @@ A schema that validates a value is an Uint8Array.
|
|
|
1218
1227
|
|
|
1219
1228
|
#### :gear: ControllerSchema
|
|
1220
1229
|
|
|
1221
|
-
| Constant | Type
|
|
1222
|
-
| ------------------ |
|
|
1223
|
-
| `ControllerSchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null
|
|
1230
|
+
| Constant | Type |
|
|
1231
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1232
|
+
| `ControllerSchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; }, $strict>` |
|
|
1224
1233
|
|
|
1225
1234
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L35)
|
|
1226
1235
|
|
|
1227
1236
|
#### :gear: ControllerRecordSchema
|
|
1228
1237
|
|
|
1229
|
-
| Constant | Type
|
|
1230
|
-
| ------------------------ |
|
|
1231
|
-
| `ControllerRecordSchema` | `ZodTuple<[
|
|
1238
|
+
| Constant | Type |
|
|
1239
|
+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1240
|
+
| `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
1241
|
|
|
1233
1242
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L79)
|
|
1234
1243
|
|
|
1235
1244
|
#### :gear: ControllersSchema
|
|
1236
1245
|
|
|
1237
|
-
| Constant | Type
|
|
1238
|
-
| ------------------- |
|
|
1239
|
-
| `ControllersSchema` | `ZodArray<ZodTuple<[
|
|
1246
|
+
| Constant | Type |
|
|
1247
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1248
|
+
| `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
1249
|
|
|
1241
1250
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L89)
|
|
1242
1251
|
|
|
1243
1252
|
#### :gear: ControllerCheckParamsSchema
|
|
1244
1253
|
|
|
1245
|
-
| Constant | Type
|
|
1246
|
-
| ----------------------------- |
|
|
1247
|
-
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[
|
|
1254
|
+
| Constant | Type |
|
|
1255
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1256
|
+
| `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<Principal, Principal>]>; controllers: ZodArray<...>; }, $strip>` |
|
|
1248
1257
|
|
|
1249
1258
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L99)
|
|
1250
1259
|
|
|
1251
1260
|
#### :gear: CollectionParamsSchema
|
|
1252
1261
|
|
|
1253
|
-
| Constant | Type
|
|
1254
|
-
| ------------------------ |
|
|
1255
|
-
| `CollectionParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1262
|
+
| Constant | Type |
|
|
1263
|
+
| ------------------------ | ------------------------------------------------ |
|
|
1264
|
+
| `CollectionParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1256
1265
|
|
|
1257
1266
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L15)
|
|
1258
1267
|
|
|
1259
1268
|
#### :gear: ListStoreParamsSchema
|
|
1260
1269
|
|
|
1261
|
-
| Constant | Type
|
|
1262
|
-
| ----------------------- |
|
|
1263
|
-
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1270
|
+
| Constant | Type |
|
|
1271
|
+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1272
|
+
| `ListStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1264
1273
|
|
|
1265
1274
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L34)
|
|
1266
1275
|
|
|
1267
1276
|
#### :gear: GetDocStoreParamsSchema
|
|
1268
1277
|
|
|
1269
|
-
| Constant | Type
|
|
1270
|
-
| ------------------------- |
|
|
1271
|
-
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1278
|
+
| Constant | Type |
|
|
1279
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1280
|
+
| `GetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; }, $strict>` |
|
|
1272
1281
|
|
|
1273
1282
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L20)
|
|
1274
1283
|
|
|
1275
1284
|
#### :gear: SetDocStoreParamsSchema
|
|
1276
1285
|
|
|
1277
|
-
| Constant | Type
|
|
1278
|
-
| ------------------------- |
|
|
1279
|
-
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1286
|
+
| Constant | Type |
|
|
1287
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1288
|
+
| `SetDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1280
1289
|
|
|
1281
1290
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L43)
|
|
1282
1291
|
|
|
1283
1292
|
#### :gear: DeleteDocStoreParamsSchema
|
|
1284
1293
|
|
|
1285
|
-
| Constant | Type
|
|
1286
|
-
| ---------------------------- |
|
|
1287
|
-
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1294
|
+
| Constant | Type |
|
|
1295
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1296
|
+
| `DeleteDocStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; key: ZodString; doc: ZodObject<...>; }, $strict>` |
|
|
1288
1297
|
|
|
1289
1298
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L63)
|
|
1290
1299
|
|
|
1291
1300
|
#### :gear: CountCollectionDocsStoreParamsSchema
|
|
1292
1301
|
|
|
1293
|
-
| Constant | Type
|
|
1294
|
-
| -------------------------------------- |
|
|
1295
|
-
| `CountCollectionDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1302
|
+
| Constant | Type |
|
|
1303
|
+
| -------------------------------------- | ------------------------------------------------ |
|
|
1304
|
+
| `CountCollectionDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1296
1305
|
|
|
1297
1306
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L83)
|
|
1298
1307
|
|
|
1299
1308
|
#### :gear: CountDocsStoreParamsSchema
|
|
1300
1309
|
|
|
1301
|
-
| Constant | Type
|
|
1302
|
-
| ---------------------------- |
|
|
1303
|
-
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1310
|
+
| Constant | Type |
|
|
1311
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1312
|
+
| `CountDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1304
1313
|
|
|
1305
1314
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L93)
|
|
1306
1315
|
|
|
1307
1316
|
#### :gear: ListDocsStoreParamsSchema
|
|
1308
1317
|
|
|
1309
|
-
| Constant | Type
|
|
1310
|
-
| --------------------------- |
|
|
1311
|
-
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1318
|
+
| Constant | Type |
|
|
1319
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1320
|
+
| `ListDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1312
1321
|
|
|
1313
1322
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L103)
|
|
1314
1323
|
|
|
1315
1324
|
#### :gear: DeleteDocsStoreParamsSchema
|
|
1316
1325
|
|
|
1317
|
-
| Constant | Type
|
|
1318
|
-
| ----------------------------- |
|
|
1319
|
-
| `DeleteDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1326
|
+
| Constant | Type |
|
|
1327
|
+
| ----------------------------- | ------------------------------------------------ |
|
|
1328
|
+
| `DeleteDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1320
1329
|
|
|
1321
1330
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L113)
|
|
1322
1331
|
|
|
1323
1332
|
#### :gear: DeleteFilteredDocsStoreParamsSchema
|
|
1324
1333
|
|
|
1325
|
-
| Constant | Type
|
|
1326
|
-
| ------------------------------------- |
|
|
1327
|
-
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1334
|
+
| Constant | Type |
|
|
1335
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1336
|
+
| `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1328
1337
|
|
|
1329
1338
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L123)
|
|
1330
1339
|
|
|
1331
1340
|
#### :gear: MemorySchema
|
|
1332
1341
|
|
|
1333
|
-
| Constant | Type
|
|
1334
|
-
| -------------- |
|
|
1335
|
-
| `MemorySchema` | `ZodEnum<
|
|
1342
|
+
| Constant | Type |
|
|
1343
|
+
| -------------- | ---------------------------------------------- |
|
|
1344
|
+
| `MemorySchema` | `ZodEnum<{ heap: "heap"; stable: "stable"; }>` |
|
|
1336
1345
|
|
|
1337
1346
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/collections.ts#L6)
|
|
1338
1347
|
|
|
1339
1348
|
#### :gear: GetAssetStoreParamsSchema
|
|
1340
1349
|
|
|
1341
|
-
| Constant | Type
|
|
1342
|
-
| --------------------------- |
|
|
1343
|
-
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1350
|
+
| Constant | Type |
|
|
1351
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1352
|
+
| `GetAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; full_path: ZodString; }, $strict>` |
|
|
1344
1353
|
|
|
1345
1354
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L26)
|
|
1346
1355
|
|
|
1347
1356
|
#### :gear: CountCollectionAssetsStoreParamsSchema
|
|
1348
1357
|
|
|
1349
|
-
| Constant | Type
|
|
1350
|
-
| ---------------------------------------- |
|
|
1351
|
-
| `CountCollectionAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1358
|
+
| Constant | Type |
|
|
1359
|
+
| ---------------------------------------- | ------------------------------------------------ |
|
|
1360
|
+
| `CountCollectionAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1352
1361
|
|
|
1353
1362
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L49)
|
|
1354
1363
|
|
|
1355
1364
|
#### :gear: CountAssetsStoreParamsSchema
|
|
1356
1365
|
|
|
1357
|
-
| Constant | Type
|
|
1358
|
-
| ------------------------------ |
|
|
1359
|
-
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1366
|
+
| Constant | Type |
|
|
1367
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1368
|
+
| `CountAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1360
1369
|
|
|
1361
1370
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L59)
|
|
1362
1371
|
|
|
1363
1372
|
#### :gear: SetAssetHandlerParamsSchema
|
|
1364
1373
|
|
|
1365
|
-
| Constant | Type
|
|
1366
|
-
| ----------------------------- |
|
|
1367
|
-
| `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner:
|
|
1374
|
+
| Constant | Type |
|
|
1375
|
+
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1376
|
+
| `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
1377
|
|
|
1369
1378
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L69)
|
|
1370
1379
|
|
|
1371
1380
|
#### :gear: DeleteAssetsStoreParamsSchema
|
|
1372
1381
|
|
|
1373
|
-
| Constant | Type
|
|
1374
|
-
| ------------------------------- |
|
|
1375
|
-
| `DeleteAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; },
|
|
1382
|
+
| Constant | Type |
|
|
1383
|
+
| ------------------------------- | ------------------------------------------------ |
|
|
1384
|
+
| `DeleteAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, $strict>` |
|
|
1376
1385
|
|
|
1377
1386
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L100)
|
|
1378
1387
|
|
|
1379
1388
|
#### :gear: DeleteFilteredAssetsStoreParamsSchema
|
|
1380
1389
|
|
|
1381
|
-
| Constant | Type
|
|
1382
|
-
| --------------------------------------- |
|
|
1383
|
-
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1390
|
+
| Constant | Type |
|
|
1391
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1392
|
+
| `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1384
1393
|
|
|
1385
1394
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L110)
|
|
1386
1395
|
|
|
1387
1396
|
#### :gear: DeleteAssetStoreParamsSchema
|
|
1388
1397
|
|
|
1389
|
-
| Constant | Type
|
|
1390
|
-
| ------------------------------ |
|
|
1391
|
-
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1398
|
+
| Constant | Type |
|
|
1399
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1400
|
+
| `DeleteAssetStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; full_path: ZodString; }, $strict>` |
|
|
1392
1401
|
|
|
1393
1402
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L120)
|
|
1394
1403
|
|
|
1395
1404
|
#### :gear: ListAssetsStoreParamsSchema
|
|
1396
1405
|
|
|
1397
|
-
| Constant | Type
|
|
1398
|
-
| ----------------------------- |
|
|
1399
|
-
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString;
|
|
1406
|
+
| Constant | Type |
|
|
1407
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1408
|
+
| `ListAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<...>]>; params: ZodObject<...>; }, $strict>` |
|
|
1400
1409
|
|
|
1401
1410
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L130)
|
|
1402
1411
|
|
|
1403
1412
|
#### :gear: GetContentChunksStoreParamsSchema
|
|
1404
1413
|
|
|
1405
|
-
| Constant | Type
|
|
1406
|
-
| ----------------------------------- |
|
|
1407
|
-
| `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<
|
|
1414
|
+
| Constant | Type |
|
|
1415
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1416
|
+
| `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
1417
|
|
|
1409
1418
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L140)
|
|
1410
1419
|
|
|
1411
1420
|
#### :gear: IDLTypeSchema
|
|
1412
1421
|
|
|
1413
|
-
| Constant | Type
|
|
1414
|
-
| --------------- |
|
|
1415
|
-
| `IDLTypeSchema` | `
|
|
1422
|
+
| Constant | Type |
|
|
1423
|
+
| --------------- | ----------------------------------------- |
|
|
1424
|
+
| `IDLTypeSchema` | `ZodCustom<Type<unknown>, Type<unknown>>` |
|
|
1416
1425
|
|
|
1417
1426
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L9)
|
|
1418
1427
|
|
|
1419
1428
|
#### :gear: CallArgSchema
|
|
1420
1429
|
|
|
1421
|
-
| Constant | Type
|
|
1422
|
-
| --------------- |
|
|
1423
|
-
| `CallArgSchema` | `ZodTuple<[
|
|
1430
|
+
| Constant | Type |
|
|
1431
|
+
| --------------- | ----------------------------------------------------------------------- |
|
|
1432
|
+
| `CallArgSchema` | `ZodTuple<[ZodCustom<Type<unknown>, Type<unknown>>, ZodUnknown], null>` |
|
|
1424
1433
|
|
|
1425
1434
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L21)
|
|
1426
1435
|
|
|
@@ -1428,25 +1437,25 @@ A schema that validates a value is an Uint8Array.
|
|
|
1428
1437
|
|
|
1429
1438
|
Schema for encoding the call arguments.
|
|
1430
1439
|
|
|
1431
|
-
| Constant | Type
|
|
1432
|
-
| ---------------- |
|
|
1433
|
-
| `CallArgsSchema` | `ZodArray<ZodTuple<[
|
|
1440
|
+
| Constant | Type |
|
|
1441
|
+
| ---------------- | --------------------------------------------------------------------------------- |
|
|
1442
|
+
| `CallArgsSchema` | `ZodArray<ZodTuple<[ZodCustom<Type<unknown>, Type<unknown>>, ZodUnknown], null>>` |
|
|
1434
1443
|
|
|
1435
1444
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L33)
|
|
1436
1445
|
|
|
1437
1446
|
#### :gear: CallResultSchema
|
|
1438
1447
|
|
|
1439
|
-
| Constant | Type
|
|
1440
|
-
| ------------------ |
|
|
1441
|
-
| `CallResultSchema` | `
|
|
1448
|
+
| Constant | Type |
|
|
1449
|
+
| ------------------ | ----------------------------------------- |
|
|
1450
|
+
| `CallResultSchema` | `ZodCustom<Type<unknown>, Type<unknown>>` |
|
|
1442
1451
|
|
|
1443
1452
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L49)
|
|
1444
1453
|
|
|
1445
1454
|
#### :gear: CallParamsSchema
|
|
1446
1455
|
|
|
1447
|
-
| Constant | Type
|
|
1448
|
-
| ------------------ |
|
|
1449
|
-
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[
|
|
1456
|
+
| Constant | Type |
|
|
1457
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1458
|
+
| `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, ZodCustom<Principal, Principal>]>; method: ZodString; args: ZodOptional<...>; result: ZodOptional<...>; }, $strip>` |
|
|
1450
1459
|
|
|
1451
1460
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L59)
|
|
1452
1461
|
|
|
@@ -1717,7 +1726,7 @@ Represents the parameters required to perform controller checks.
|
|
|
1717
1726
|
| Property | Type | Description |
|
|
1718
1727
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
1719
1728
|
| `caller` | `Uint8Array<ArrayBufferLike> or Principal` | The identity of the caller to verify against the controller list. |
|
|
1720
|
-
| `controllers` | `[Uint8Array<ArrayBufferLike>, {
|
|
1729
|
+
| `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
1730
|
|
|
1722
1731
|
#### :gear: CollectionParams
|
|
1723
1732
|
|
|
@@ -1958,7 +1967,7 @@ The function takes a context argument and returns `void`.
|
|
|
1958
1967
|
| ---------------- | ---------------------- |
|
|
1959
1968
|
| `AssertFunction` | `(context: T) => void` |
|
|
1960
1969
|
|
|
1961
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
1970
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L47)
|
|
1962
1971
|
|
|
1963
1972
|
#### :gear: RunFunction
|
|
1964
1973
|
|
|
@@ -1970,7 +1979,7 @@ The function takes a context argument and returns either a `Promise<void>` or `v
|
|
|
1970
1979
|
| ------------- | --------------------------------------- |
|
|
1971
1980
|
| `RunFunction` | `(context: T) => void or Promise<void>` |
|
|
1972
1981
|
|
|
1973
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#
|
|
1982
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/context.ts#L64)
|
|
1974
1983
|
|
|
1975
1984
|
#### :gear: RawData
|
|
1976
1985
|
|
|
@@ -2005,7 +2014,7 @@ along with details about the user who triggered the operation.
|
|
|
2005
2014
|
| ----------------- | ------------------------------------ |
|
|
2006
2015
|
| `OnSetDocContext` | `HookContext<DocContext<DocUpsert>>` |
|
|
2007
2016
|
|
|
2008
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2017
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L60)
|
|
2009
2018
|
|
|
2010
2019
|
#### :gear: OnSetManyDocsContext
|
|
2011
2020
|
|
|
@@ -2018,7 +2027,7 @@ in a single operation, along with details about the user who triggered it.
|
|
|
2018
2027
|
| ---------------------- | -------------------------------------- |
|
|
2019
2028
|
| `OnSetManyDocsContext` | `HookContext<DocContext<DocUpsert>[]>` |
|
|
2020
2029
|
|
|
2021
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2030
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L75)
|
|
2022
2031
|
|
|
2023
2032
|
#### :gear: OnDeleteDocContext
|
|
2024
2033
|
|
|
@@ -2031,7 +2040,7 @@ along with details about the user who triggered the operation.
|
|
|
2031
2040
|
| -------------------- | ------------------------------------ |
|
|
2032
2041
|
| `OnDeleteDocContext` | `HookContext<DocContext<OptionDoc>>` |
|
|
2033
2042
|
|
|
2034
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2043
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L88)
|
|
2035
2044
|
|
|
2036
2045
|
#### :gear: OnDeleteManyDocsContext
|
|
2037
2046
|
|
|
@@ -2044,7 +2053,7 @@ along with details about the user who triggered the operation.
|
|
|
2044
2053
|
| ------------------------- | -------------------------------------- |
|
|
2045
2054
|
| `OnDeleteManyDocsContext` | `HookContext<DocContext<OptionDoc>[]>` |
|
|
2046
2055
|
|
|
2047
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2056
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L103)
|
|
2048
2057
|
|
|
2049
2058
|
#### :gear: OnDeleteFilteredDocsContext
|
|
2050
2059
|
|
|
@@ -2057,7 +2066,7 @@ along with details about the user who triggered the operation.
|
|
|
2057
2066
|
| ----------------------------- | -------------------------------------- |
|
|
2058
2067
|
| `OnDeleteFilteredDocsContext` | `HookContext<DocContext<OptionDoc>[]>` |
|
|
2059
2068
|
|
|
2060
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2069
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L118)
|
|
2061
2070
|
|
|
2062
2071
|
#### :gear: AssertSetDocContext
|
|
2063
2072
|
|
|
@@ -2070,7 +2079,7 @@ it is created or updated. If validation fails, the developer should throw an err
|
|
|
2070
2079
|
| --------------------- | --------------------------------------- |
|
|
2071
2080
|
| `AssertSetDocContext` | `HookContext<DocContext<DocAssertSet>>` |
|
|
2072
2081
|
|
|
2073
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2082
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L131)
|
|
2074
2083
|
|
|
2075
2084
|
#### :gear: AssertDeleteDocContext
|
|
2076
2085
|
|
|
@@ -2083,7 +2092,7 @@ it is deleted. If validation fails, the developer should throw an error.
|
|
|
2083
2092
|
| ------------------------ | ------------------------------------------ |
|
|
2084
2093
|
| `AssertDeleteDocContext` | `HookContext<DocContext<DocAssertDelete>>` |
|
|
2085
2094
|
|
|
2086
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#
|
|
2095
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/db/context.ts#L146)
|
|
2087
2096
|
|
|
2088
2097
|
#### :gear: SatelliteEnv
|
|
2089
2098
|
|
|
@@ -2315,7 +2324,7 @@ A generic schema for defining assertions related to collections.
|
|
|
2315
2324
|
| ---------- | ------------------------------------------------ |
|
|
2316
2325
|
| `OnAssert` | `Collections and { assert: AssertFunction<T>; }` |
|
|
2317
2326
|
|
|
2318
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2327
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L38)
|
|
2319
2328
|
|
|
2320
2329
|
#### :gear: AssertSetDoc
|
|
2321
2330
|
|
|
@@ -2325,7 +2334,7 @@ An assertion that runs when a document is created or updated.
|
|
|
2325
2334
|
| -------------- | ------------------------------- |
|
|
2326
2335
|
| `AssertSetDoc` | `OnAssert<AssertSetDocContext>` |
|
|
2327
2336
|
|
|
2328
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2337
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L50)
|
|
2329
2338
|
|
|
2330
2339
|
#### :gear: AssertDeleteDoc
|
|
2331
2340
|
|
|
@@ -2335,7 +2344,7 @@ An assertion that runs when a document is deleted.
|
|
|
2335
2344
|
| ----------------- | ---------------------------------- |
|
|
2336
2345
|
| `AssertDeleteDoc` | `OnAssert<AssertDeleteDocContext>` |
|
|
2337
2346
|
|
|
2338
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2347
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L60)
|
|
2339
2348
|
|
|
2340
2349
|
#### :gear: AssertUploadAsset
|
|
2341
2350
|
|
|
@@ -2345,7 +2354,7 @@ An assertion that runs before an asset is uploaded.
|
|
|
2345
2354
|
| ------------------- | ------------------------------------ |
|
|
2346
2355
|
| `AssertUploadAsset` | `OnAssert<AssertUploadAssetContext>` |
|
|
2347
2356
|
|
|
2348
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2357
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L70)
|
|
2349
2358
|
|
|
2350
2359
|
#### :gear: AssertDeleteAsset
|
|
2351
2360
|
|
|
@@ -2355,7 +2364,7 @@ An assertion that runs before an asset is deleted.
|
|
|
2355
2364
|
| ------------------- | ------------------------------------ |
|
|
2356
2365
|
| `AssertDeleteAsset` | `OnAssert<AssertDeleteAssetContext>` |
|
|
2357
2366
|
|
|
2358
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2367
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L80)
|
|
2359
2368
|
|
|
2360
2369
|
#### :gear: Assert
|
|
2361
2370
|
|
|
@@ -2365,7 +2374,7 @@ All assertions definitions.
|
|
|
2365
2374
|
| -------- | --------------------------------------------------------------------------- |
|
|
2366
2375
|
| `Assert` | `AssertSetDoc or AssertDeleteDoc or AssertUploadAsset or AssertDeleteAsset` |
|
|
2367
2376
|
|
|
2368
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2377
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L95)
|
|
2369
2378
|
|
|
2370
2379
|
#### :gear: AssertFn
|
|
2371
2380
|
|
|
@@ -2373,7 +2382,7 @@ All assertions definitions.
|
|
|
2373
2382
|
| ---------- | --------------------------------------------------- |
|
|
2374
2383
|
| `AssertFn` | `(assert: z.infer<typeof SatelliteEnvSchema>) => T` |
|
|
2375
2384
|
|
|
2376
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2385
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L102)
|
|
2377
2386
|
|
|
2378
2387
|
#### :gear: AssertFnOrObject
|
|
2379
2388
|
|
|
@@ -2381,7 +2390,7 @@ All assertions definitions.
|
|
|
2381
2390
|
| ------------------ | ------------------ |
|
|
2382
2391
|
| `AssertFnOrObject` | `T or AssertFn<T>` |
|
|
2383
2392
|
|
|
2384
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#
|
|
2393
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/assertions.ts#L106)
|
|
2385
2394
|
|
|
2386
2395
|
#### :gear: OnHook
|
|
2387
2396
|
|
|
@@ -2391,7 +2400,7 @@ A generic schema for defining hooks related to collections.
|
|
|
2391
2400
|
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2392
2401
|
| `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
2402
|
|
|
2394
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2403
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L42)
|
|
2395
2404
|
|
|
2396
2405
|
#### :gear: OnSetDoc
|
|
2397
2406
|
|
|
@@ -2401,7 +2410,7 @@ A hook that runs when a document is created or updated.
|
|
|
2401
2410
|
| ---------- | ------------------------- |
|
|
2402
2411
|
| `OnSetDoc` | `OnHook<OnSetDocContext>` |
|
|
2403
2412
|
|
|
2404
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2413
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L60)
|
|
2405
2414
|
|
|
2406
2415
|
#### :gear: OnSetManyDocs
|
|
2407
2416
|
|
|
@@ -2411,7 +2420,7 @@ A hook that runs when multiple documents are created or updated.
|
|
|
2411
2420
|
| --------------- | ------------------------------ |
|
|
2412
2421
|
| `OnSetManyDocs` | `OnHook<OnSetManyDocsContext>` |
|
|
2413
2422
|
|
|
2414
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2423
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L70)
|
|
2415
2424
|
|
|
2416
2425
|
#### :gear: OnDeleteDoc
|
|
2417
2426
|
|
|
@@ -2421,7 +2430,7 @@ A hook that runs when a single document is deleted.
|
|
|
2421
2430
|
| ------------- | ---------------------------- |
|
|
2422
2431
|
| `OnDeleteDoc` | `OnHook<OnDeleteDocContext>` |
|
|
2423
2432
|
|
|
2424
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2433
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L80)
|
|
2425
2434
|
|
|
2426
2435
|
#### :gear: OnDeleteManyDocs
|
|
2427
2436
|
|
|
@@ -2431,7 +2440,7 @@ A hook that runs when multiple documents are deleted.
|
|
|
2431
2440
|
| ------------------ | --------------------------------- |
|
|
2432
2441
|
| `OnDeleteManyDocs` | `OnHook<OnDeleteManyDocsContext>` |
|
|
2433
2442
|
|
|
2434
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2443
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L90)
|
|
2435
2444
|
|
|
2436
2445
|
#### :gear: OnDeleteFilteredDocs
|
|
2437
2446
|
|
|
@@ -2441,7 +2450,7 @@ A hook that runs when a filtered set of documents is deleted based on query cond
|
|
|
2441
2450
|
| ---------------------- | ------------------------------------- |
|
|
2442
2451
|
| `OnDeleteFilteredDocs` | `OnHook<OnDeleteFilteredDocsContext>` |
|
|
2443
2452
|
|
|
2444
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2453
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L100)
|
|
2445
2454
|
|
|
2446
2455
|
#### :gear: OnUploadAsset
|
|
2447
2456
|
|
|
@@ -2451,7 +2460,7 @@ A hook that runs when a single asset is uploaded.
|
|
|
2451
2460
|
| --------------- | ------------------------------ |
|
|
2452
2461
|
| `OnUploadAsset` | `OnHook<OnUploadAssetContext>` |
|
|
2453
2462
|
|
|
2454
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2463
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L110)
|
|
2455
2464
|
|
|
2456
2465
|
#### :gear: OnDeleteAsset
|
|
2457
2466
|
|
|
@@ -2461,7 +2470,7 @@ A hook that runs when a single asset is potentially deleted.
|
|
|
2461
2470
|
| --------------- | ------------------------------ |
|
|
2462
2471
|
| `OnDeleteAsset` | `OnHook<OnDeleteAssetContext>` |
|
|
2463
2472
|
|
|
2464
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2473
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L120)
|
|
2465
2474
|
|
|
2466
2475
|
#### :gear: OnDeleteManyAssets
|
|
2467
2476
|
|
|
@@ -2471,7 +2480,7 @@ A hook that runs when multiple assets are potentially deleted.
|
|
|
2471
2480
|
| -------------------- | ----------------------------------- |
|
|
2472
2481
|
| `OnDeleteManyAssets` | `OnHook<OnDeleteManyAssetsContext>` |
|
|
2473
2482
|
|
|
2474
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2483
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L130)
|
|
2475
2484
|
|
|
2476
2485
|
#### :gear: OnDeleteFilteredAssets
|
|
2477
2486
|
|
|
@@ -2481,7 +2490,7 @@ A hook that runs when a filtered set of assets is deleted based on query conditi
|
|
|
2481
2490
|
| ------------------------ | --------------------------------------- |
|
|
2482
2491
|
| `OnDeleteFilteredAssets` | `OnHook<OnDeleteFilteredAssetsContext>` |
|
|
2483
2492
|
|
|
2484
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2493
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L140)
|
|
2485
2494
|
|
|
2486
2495
|
#### :gear: Hook
|
|
2487
2496
|
|
|
@@ -2491,7 +2500,7 @@ All hooks definitions.
|
|
|
2491
2500
|
| ------ | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2492
2501
|
| `Hook` | ` | OnSetDoc or OnSetManyDocs or OnDeleteDoc or OnDeleteManyDocs or OnDeleteFilteredDocs or OnUploadAsset or OnDeleteAsset or OnDeleteManyAssets or OnDeleteFilteredAssets` |
|
|
2493
2502
|
|
|
2494
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2503
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L160)
|
|
2495
2504
|
|
|
2496
2505
|
#### :gear: HookFn
|
|
2497
2506
|
|
|
@@ -2499,7 +2508,7 @@ All hooks definitions.
|
|
|
2499
2508
|
| -------- | ------------------------------------------------- |
|
|
2500
2509
|
| `HookFn` | `(hook: z.infer<typeof SatelliteEnvSchema>) => T` |
|
|
2501
2510
|
|
|
2502
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2511
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L173)
|
|
2503
2512
|
|
|
2504
2513
|
#### :gear: HookFnOrObject
|
|
2505
2514
|
|
|
@@ -2507,7 +2516,7 @@ All hooks definitions.
|
|
|
2507
2516
|
| ---------------- | ---------------- |
|
|
2508
2517
|
| `HookFnOrObject` | `T or HookFn<T>` |
|
|
2509
2518
|
|
|
2510
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#
|
|
2519
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L177)
|
|
2511
2520
|
|
|
2512
2521
|
#### :gear: TimestampMatcher
|
|
2513
2522
|
|