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