@junobuild/functions 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +365 -356
- package/chunk-KY6LCVKU.js +2 -0
- package/chunk-KY6LCVKU.js.map +7 -0
- package/chunk-R6MTJSTE.js +2 -0
- package/chunk-R6MTJSTE.js.map +7 -0
- package/hooks/assertions.d.ts +382 -6958
- package/hooks/hooks.d.ts +649 -10260
- package/hooks/schemas/collections.d.ts +3 -7
- package/hooks/schemas/context.d.ts +6 -13
- package/hooks/schemas/db/context.d.ts +87 -3332
- package/hooks/schemas/db/payload.d.ts +19 -173
- package/hooks/schemas/satellite.env.d.ts +2 -2
- package/hooks/schemas/storage/context.d.ts +111 -1861
- package/hooks/schemas/storage/payload.d.ts +29 -203
- package/ic-cdk/schemas/call.d.ts +9 -19
- package/ic-cdk.js +1 -1
- package/ic-cdk.js.map +2 -2
- package/index.js +1 -1
- package/index.js.map +4 -4
- package/package.json +1 -1
- package/schemas/candid.d.ts +4 -4
- package/schemas/db.d.ts +11 -51
- package/schemas/list.d.ts +51 -303
- package/schemas/satellite.d.ts +3 -3
- package/schemas/storage.d.ts +66 -312
- package/sdk/schemas/collections.d.ts +5 -2
- package/sdk/schemas/controllers.d.ts +39 -85
- package/sdk/schemas/db.d.ts +152 -874
- package/sdk/schemas/params.d.ts +24 -247
- package/sdk/schemas/storage.d.ts +86 -830
- package/sdk.js +1 -1
- package/sdk.js.map +2 -2
- package/utils/zod.utils.d.ts +2 -0
- package/chunk-CCKUQNB5.js +0 -2
- package/chunk-CCKUQNB5.js.map +0 -7
- package/chunk-SFZECPH3.js +0 -2
- package/chunk-SFZECPH3.js.map +0 -7
|
@@ -1,88 +1,26 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
import { type DelDoc, type Doc, type SetDoc } from '../../../schemas/db';
|
|
3
3
|
/**
|
|
4
4
|
* @see DocUpsert
|
|
5
5
|
*/
|
|
6
6
|
export declare const DocUpsertSchema: z.ZodObject<{
|
|
7
7
|
before: z.ZodOptional<z.ZodObject<{
|
|
8
|
-
owner: z.
|
|
9
|
-
data: z.
|
|
8
|
+
owner: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
9
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
10
10
|
description: z.ZodOptional<z.ZodString>;
|
|
11
11
|
created_at: z.ZodBigInt;
|
|
12
12
|
updated_at: z.ZodBigInt;
|
|
13
13
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
14
|
-
},
|
|
15
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
16
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
17
|
-
created_at: bigint;
|
|
18
|
-
updated_at: bigint;
|
|
19
|
-
description?: string | undefined;
|
|
20
|
-
version?: bigint | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
23
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
24
|
-
created_at: bigint;
|
|
25
|
-
updated_at: bigint;
|
|
26
|
-
description?: string | undefined;
|
|
27
|
-
version?: bigint | undefined;
|
|
28
|
-
}>>;
|
|
14
|
+
}, z.core.$strict>>;
|
|
29
15
|
after: z.ZodObject<{
|
|
30
|
-
owner: z.
|
|
31
|
-
data: z.
|
|
16
|
+
owner: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
17
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
32
18
|
description: z.ZodOptional<z.ZodString>;
|
|
33
19
|
created_at: z.ZodBigInt;
|
|
34
20
|
updated_at: z.ZodBigInt;
|
|
35
21
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
39
|
-
created_at: bigint;
|
|
40
|
-
updated_at: bigint;
|
|
41
|
-
description?: string | undefined;
|
|
42
|
-
version?: bigint | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
45
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
46
|
-
created_at: bigint;
|
|
47
|
-
updated_at: bigint;
|
|
48
|
-
description?: string | undefined;
|
|
49
|
-
version?: bigint | undefined;
|
|
50
|
-
}>;
|
|
51
|
-
}, "strict", z.ZodTypeAny, {
|
|
52
|
-
after: {
|
|
53
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
54
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
55
|
-
created_at: bigint;
|
|
56
|
-
updated_at: bigint;
|
|
57
|
-
description?: string | undefined;
|
|
58
|
-
version?: bigint | undefined;
|
|
59
|
-
};
|
|
60
|
-
before?: {
|
|
61
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
62
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
63
|
-
created_at: bigint;
|
|
64
|
-
updated_at: bigint;
|
|
65
|
-
description?: string | undefined;
|
|
66
|
-
version?: bigint | undefined;
|
|
67
|
-
} | undefined;
|
|
68
|
-
}, {
|
|
69
|
-
after: {
|
|
70
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
71
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
72
|
-
created_at: bigint;
|
|
73
|
-
updated_at: bigint;
|
|
74
|
-
description?: string | undefined;
|
|
75
|
-
version?: bigint | undefined;
|
|
76
|
-
};
|
|
77
|
-
before?: {
|
|
78
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
79
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
80
|
-
created_at: bigint;
|
|
81
|
-
updated_at: bigint;
|
|
82
|
-
description?: string | undefined;
|
|
83
|
-
version?: bigint | undefined;
|
|
84
|
-
} | undefined;
|
|
85
|
-
}>;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
}, z.core.$strict>;
|
|
86
24
|
/**
|
|
87
25
|
* Represents a document update operation.
|
|
88
26
|
*
|
|
@@ -104,69 +42,19 @@ export interface DocUpsert {
|
|
|
104
42
|
*/
|
|
105
43
|
export declare const DocAssertSetSchema: z.ZodObject<{
|
|
106
44
|
current: z.ZodOptional<z.ZodObject<{
|
|
107
|
-
owner: z.
|
|
108
|
-
data: z.
|
|
45
|
+
owner: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
46
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
109
47
|
description: z.ZodOptional<z.ZodString>;
|
|
110
48
|
created_at: z.ZodBigInt;
|
|
111
49
|
updated_at: z.ZodBigInt;
|
|
112
50
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
113
|
-
},
|
|
114
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
115
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
116
|
-
created_at: bigint;
|
|
117
|
-
updated_at: bigint;
|
|
118
|
-
description?: string | undefined;
|
|
119
|
-
version?: bigint | undefined;
|
|
120
|
-
}, {
|
|
121
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
122
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
123
|
-
created_at: bigint;
|
|
124
|
-
updated_at: bigint;
|
|
125
|
-
description?: string | undefined;
|
|
126
|
-
version?: bigint | undefined;
|
|
127
|
-
}>>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
128
52
|
proposed: z.ZodObject<{
|
|
129
|
-
data: z.
|
|
53
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
130
54
|
description: z.ZodOptional<z.ZodString>;
|
|
131
55
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
description?: string | undefined;
|
|
135
|
-
version?: bigint | undefined;
|
|
136
|
-
}, {
|
|
137
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
138
|
-
description?: string | undefined;
|
|
139
|
-
version?: bigint | undefined;
|
|
140
|
-
}>;
|
|
141
|
-
}, "strict", z.ZodTypeAny, {
|
|
142
|
-
proposed: {
|
|
143
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
144
|
-
description?: string | undefined;
|
|
145
|
-
version?: bigint | undefined;
|
|
146
|
-
};
|
|
147
|
-
current?: {
|
|
148
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
149
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
150
|
-
created_at: bigint;
|
|
151
|
-
updated_at: bigint;
|
|
152
|
-
description?: string | undefined;
|
|
153
|
-
version?: bigint | undefined;
|
|
154
|
-
} | undefined;
|
|
155
|
-
}, {
|
|
156
|
-
proposed: {
|
|
157
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
158
|
-
description?: string | undefined;
|
|
159
|
-
version?: bigint | undefined;
|
|
160
|
-
};
|
|
161
|
-
current?: {
|
|
162
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
163
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
164
|
-
created_at: bigint;
|
|
165
|
-
updated_at: bigint;
|
|
166
|
-
description?: string | undefined;
|
|
167
|
-
version?: bigint | undefined;
|
|
168
|
-
} | undefined;
|
|
169
|
-
}>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
}, z.core.$strict>;
|
|
170
58
|
/**
|
|
171
59
|
* Represents a validation check before setting a document.
|
|
172
60
|
*
|
|
@@ -190,59 +78,17 @@ export interface DocAssertSet {
|
|
|
190
78
|
*/
|
|
191
79
|
export declare const DocAssertDeleteSchema: z.ZodObject<{
|
|
192
80
|
current: z.ZodOptional<z.ZodObject<{
|
|
193
|
-
owner: z.
|
|
194
|
-
data: z.
|
|
81
|
+
owner: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
82
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
195
83
|
description: z.ZodOptional<z.ZodString>;
|
|
196
84
|
created_at: z.ZodBigInt;
|
|
197
85
|
updated_at: z.ZodBigInt;
|
|
198
86
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
199
|
-
},
|
|
200
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
201
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
202
|
-
created_at: bigint;
|
|
203
|
-
updated_at: bigint;
|
|
204
|
-
description?: string | undefined;
|
|
205
|
-
version?: bigint | undefined;
|
|
206
|
-
}, {
|
|
207
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
208
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
209
|
-
created_at: bigint;
|
|
210
|
-
updated_at: bigint;
|
|
211
|
-
description?: string | undefined;
|
|
212
|
-
version?: bigint | undefined;
|
|
213
|
-
}>>;
|
|
87
|
+
}, z.core.$strict>>;
|
|
214
88
|
proposed: z.ZodObject<{
|
|
215
89
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
}, {
|
|
219
|
-
version?: bigint | undefined;
|
|
220
|
-
}>;
|
|
221
|
-
}, "strict", z.ZodTypeAny, {
|
|
222
|
-
proposed: {
|
|
223
|
-
version?: bigint | undefined;
|
|
224
|
-
};
|
|
225
|
-
current?: {
|
|
226
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
227
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
228
|
-
created_at: bigint;
|
|
229
|
-
updated_at: bigint;
|
|
230
|
-
description?: string | undefined;
|
|
231
|
-
version?: bigint | undefined;
|
|
232
|
-
} | undefined;
|
|
233
|
-
}, {
|
|
234
|
-
proposed: {
|
|
235
|
-
version?: bigint | undefined;
|
|
236
|
-
};
|
|
237
|
-
current?: {
|
|
238
|
-
owner: Uint8Array<ArrayBufferLike>;
|
|
239
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
240
|
-
created_at: bigint;
|
|
241
|
-
updated_at: bigint;
|
|
242
|
-
description?: string | undefined;
|
|
243
|
-
version?: bigint | undefined;
|
|
244
|
-
} | undefined;
|
|
245
|
-
}>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
}, z.core.$strict>;
|
|
246
92
|
/**
|
|
247
93
|
* Represents a validation check before deleting a document.
|
|
248
94
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
/**
|
|
3
3
|
* @see SatelliteEnv
|
|
4
4
|
*/
|
|
5
|
-
export declare const SatelliteEnvSchema: z.ZodRecord<z.ZodString, z.
|
|
5
|
+
export declare const SatelliteEnvSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6
6
|
/**
|
|
7
7
|
* Placeholder for future environment-specific configurations.
|
|
8
8
|
*
|