@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
|
@@ -1,26 +1,88 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
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.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
9
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, 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
|
-
}, z.
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
15
29
|
after: z.ZodObject<{
|
|
16
|
-
owner: z.
|
|
17
|
-
data: z.
|
|
30
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
31
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
18
32
|
description: z.ZodOptional<z.ZodString>;
|
|
19
33
|
created_at: z.ZodBigInt;
|
|
20
34
|
updated_at: z.ZodBigInt;
|
|
21
35
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
22
|
-
}, z.
|
|
23
|
-
|
|
36
|
+
}, "strict", z.ZodTypeAny, {
|
|
37
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
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
|
+
}>;
|
|
24
86
|
/**
|
|
25
87
|
* Represents a document update operation.
|
|
26
88
|
*
|
|
@@ -42,19 +104,69 @@ export interface DocUpsert {
|
|
|
42
104
|
*/
|
|
43
105
|
export declare const DocAssertSetSchema: z.ZodObject<{
|
|
44
106
|
current: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
owner: z.
|
|
46
|
-
data: z.
|
|
107
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
108
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
47
109
|
description: z.ZodOptional<z.ZodString>;
|
|
48
110
|
created_at: z.ZodBigInt;
|
|
49
111
|
updated_at: z.ZodBigInt;
|
|
50
112
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
51
|
-
}, z.
|
|
113
|
+
}, "strict", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
52
128
|
proposed: z.ZodObject<{
|
|
53
|
-
data: z.
|
|
129
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
54
130
|
description: z.ZodOptional<z.ZodString>;
|
|
55
131
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
56
|
-
}, z.
|
|
57
|
-
|
|
132
|
+
}, "strict", z.ZodTypeAny, {
|
|
133
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
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
|
+
}>;
|
|
58
170
|
/**
|
|
59
171
|
* Represents a validation check before setting a document.
|
|
60
172
|
*
|
|
@@ -78,17 +190,59 @@ export interface DocAssertSet {
|
|
|
78
190
|
*/
|
|
79
191
|
export declare const DocAssertDeleteSchema: z.ZodObject<{
|
|
80
192
|
current: z.ZodOptional<z.ZodObject<{
|
|
81
|
-
owner: z.
|
|
82
|
-
data: z.
|
|
193
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
194
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
83
195
|
description: z.ZodOptional<z.ZodString>;
|
|
84
196
|
created_at: z.ZodBigInt;
|
|
85
197
|
updated_at: z.ZodBigInt;
|
|
86
198
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
87
|
-
}, z.
|
|
199
|
+
}, "strict", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
88
214
|
proposed: z.ZodObject<{
|
|
89
215
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
90
|
-
}, z.
|
|
91
|
-
|
|
216
|
+
}, "strict", z.ZodTypeAny, {
|
|
217
|
+
version?: bigint | undefined;
|
|
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
|
+
}>;
|
|
92
246
|
/**
|
|
93
247
|
* Represents a validation check before deleting a document.
|
|
94
248
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
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.ZodUnknown>;
|
|
6
6
|
/**
|
|
7
7
|
* Placeholder for future environment-specific configurations.
|
|
8
8
|
*
|