@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/schemas/storage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type Collection, type Description, type RawUserId, type Timestamp, type Version } from './satellite';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a single HTTP header as a tuple of name and value.
|
|
@@ -7,7 +7,7 @@ export type HeaderField = [string, string];
|
|
|
7
7
|
/**
|
|
8
8
|
* @see HeaderFields
|
|
9
9
|
*/
|
|
10
|
-
export declare const HeaderFieldsSchema: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
10
|
+
export declare const HeaderFieldsSchema: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
11
11
|
/**
|
|
12
12
|
* Represents a list of HTTP headers.
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@ export type HeaderFields = HeaderField[];
|
|
|
15
15
|
/**
|
|
16
16
|
* @see Blob
|
|
17
17
|
*/
|
|
18
|
-
export declare const BlobSchema: z.
|
|
18
|
+
export declare const BlobSchema: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
19
19
|
/**
|
|
20
20
|
* Binary content used in asset encoding.
|
|
21
21
|
*/
|
|
@@ -36,9 +36,23 @@ export declare const AssetKeySchema: z.ZodObject<{
|
|
|
36
36
|
full_path: z.ZodString;
|
|
37
37
|
token: z.ZodOptional<z.ZodString>;
|
|
38
38
|
collection: z.ZodString;
|
|
39
|
-
owner: z.
|
|
39
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
40
40
|
description: z.ZodOptional<z.ZodString>;
|
|
41
|
-
}, z.
|
|
41
|
+
}, "strict", z.ZodTypeAny, {
|
|
42
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
43
|
+
collection: string;
|
|
44
|
+
name: string;
|
|
45
|
+
full_path: string;
|
|
46
|
+
description?: string | undefined;
|
|
47
|
+
token?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
50
|
+
collection: string;
|
|
51
|
+
name: string;
|
|
52
|
+
full_path: string;
|
|
53
|
+
description?: string | undefined;
|
|
54
|
+
token?: string | undefined;
|
|
55
|
+
}>;
|
|
42
56
|
/**
|
|
43
57
|
* Metadata identifying an asset within a collection and the storage system.
|
|
44
58
|
*/
|
|
@@ -74,10 +88,20 @@ export interface AssetKey {
|
|
|
74
88
|
*/
|
|
75
89
|
export declare const AssetEncodingSchema: z.ZodObject<{
|
|
76
90
|
modified: z.ZodBigInt;
|
|
77
|
-
content_chunks: z.ZodArray<z.
|
|
91
|
+
content_chunks: z.ZodArray<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">;
|
|
78
92
|
total_length: z.ZodBigInt;
|
|
79
|
-
sha256: z.
|
|
80
|
-
}, z.
|
|
93
|
+
sha256: z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
modified: bigint;
|
|
96
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
97
|
+
total_length: bigint;
|
|
98
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
99
|
+
}, {
|
|
100
|
+
modified: bigint;
|
|
101
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
102
|
+
total_length: bigint;
|
|
103
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
104
|
+
}>;
|
|
81
105
|
/**
|
|
82
106
|
* Represents a specific encoding of an asset, such as "gzip" or "identity" (no compression).
|
|
83
107
|
*/
|
|
@@ -116,26 +140,82 @@ export declare const AssetSchema: z.ZodObject<{
|
|
|
116
140
|
full_path: z.ZodString;
|
|
117
141
|
token: z.ZodOptional<z.ZodString>;
|
|
118
142
|
collection: z.ZodString;
|
|
119
|
-
owner: z.
|
|
143
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
120
144
|
description: z.ZodOptional<z.ZodString>;
|
|
121
|
-
}, z.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
145
|
+
}, "strict", z.ZodTypeAny, {
|
|
146
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
147
|
+
collection: string;
|
|
148
|
+
name: string;
|
|
149
|
+
full_path: string;
|
|
150
|
+
description?: string | undefined;
|
|
151
|
+
token?: string | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
154
|
+
collection: string;
|
|
155
|
+
name: string;
|
|
156
|
+
full_path: string;
|
|
157
|
+
description?: string | undefined;
|
|
158
|
+
token?: string | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
161
|
+
encodings: z.ZodArray<z.ZodTuple<[z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>, z.ZodObject<{
|
|
130
162
|
modified: z.ZodBigInt;
|
|
131
|
-
content_chunks: z.ZodArray<z.
|
|
163
|
+
content_chunks: z.ZodArray<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">;
|
|
132
164
|
total_length: z.ZodBigInt;
|
|
133
|
-
sha256: z.
|
|
134
|
-
}, z.
|
|
165
|
+
sha256: z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
modified: bigint;
|
|
168
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
169
|
+
total_length: bigint;
|
|
170
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
171
|
+
}, {
|
|
172
|
+
modified: bigint;
|
|
173
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
174
|
+
total_length: bigint;
|
|
175
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
176
|
+
}>], null>, "many">;
|
|
135
177
|
created_at: z.ZodBigInt;
|
|
136
178
|
updated_at: z.ZodBigInt;
|
|
137
179
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
138
|
-
}, z.
|
|
180
|
+
}, "strict", z.ZodTypeAny, {
|
|
181
|
+
created_at: bigint;
|
|
182
|
+
updated_at: bigint;
|
|
183
|
+
key: {
|
|
184
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
185
|
+
collection: string;
|
|
186
|
+
name: string;
|
|
187
|
+
full_path: string;
|
|
188
|
+
description?: string | undefined;
|
|
189
|
+
token?: string | undefined;
|
|
190
|
+
};
|
|
191
|
+
headers: [string, string][];
|
|
192
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
193
|
+
modified: bigint;
|
|
194
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
195
|
+
total_length: bigint;
|
|
196
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
197
|
+
}][];
|
|
198
|
+
version?: bigint | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
created_at: bigint;
|
|
201
|
+
updated_at: bigint;
|
|
202
|
+
key: {
|
|
203
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
204
|
+
collection: string;
|
|
205
|
+
name: string;
|
|
206
|
+
full_path: string;
|
|
207
|
+
description?: string | undefined;
|
|
208
|
+
token?: string | undefined;
|
|
209
|
+
};
|
|
210
|
+
headers: [string, string][];
|
|
211
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
212
|
+
modified: bigint;
|
|
213
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
214
|
+
total_length: bigint;
|
|
215
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
216
|
+
}][];
|
|
217
|
+
version?: bigint | undefined;
|
|
218
|
+
}>;
|
|
139
219
|
/**
|
|
140
220
|
* A stored asset including its metadata, encodings, and timestamps.
|
|
141
221
|
*/
|
|
@@ -168,31 +248,101 @@ export interface Asset {
|
|
|
168
248
|
/**
|
|
169
249
|
* @see AssetNoContent
|
|
170
250
|
*/
|
|
171
|
-
export declare const AssetNoContentSchema: z.ZodObject<{
|
|
172
|
-
version: z.ZodOptional<z.ZodBigInt>;
|
|
173
|
-
created_at: z.ZodBigInt;
|
|
174
|
-
updated_at: z.ZodBigInt;
|
|
251
|
+
export declare const AssetNoContentSchema: z.ZodObject<Omit<{
|
|
175
252
|
key: z.ZodObject<{
|
|
176
253
|
name: z.ZodString;
|
|
177
254
|
full_path: z.ZodString;
|
|
178
255
|
token: z.ZodOptional<z.ZodString>;
|
|
179
256
|
collection: z.ZodString;
|
|
180
|
-
owner: z.
|
|
257
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
181
258
|
description: z.ZodOptional<z.ZodString>;
|
|
182
|
-
}, z.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
259
|
+
}, "strict", z.ZodTypeAny, {
|
|
260
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
261
|
+
collection: string;
|
|
262
|
+
name: string;
|
|
263
|
+
full_path: string;
|
|
264
|
+
description?: string | undefined;
|
|
265
|
+
token?: string | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
268
|
+
collection: string;
|
|
269
|
+
name: string;
|
|
270
|
+
full_path: string;
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
token?: string | undefined;
|
|
273
|
+
}>;
|
|
274
|
+
headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
275
|
+
encodings: z.ZodArray<z.ZodTuple<[z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>, z.ZodObject<{
|
|
276
|
+
modified: z.ZodBigInt;
|
|
277
|
+
content_chunks: z.ZodArray<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">;
|
|
278
|
+
total_length: z.ZodBigInt;
|
|
279
|
+
sha256: z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
modified: bigint;
|
|
282
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
283
|
+
total_length: bigint;
|
|
284
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
285
|
+
}, {
|
|
286
|
+
modified: bigint;
|
|
287
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
288
|
+
total_length: bigint;
|
|
289
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
290
|
+
}>], null>, "many">;
|
|
291
|
+
created_at: z.ZodBigInt;
|
|
292
|
+
updated_at: z.ZodBigInt;
|
|
293
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
294
|
+
}, "encodings"> & {
|
|
295
|
+
encodings: z.ZodArray<z.ZodTuple<[z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>, z.ZodObject<Omit<{
|
|
191
296
|
modified: z.ZodBigInt;
|
|
192
|
-
|
|
297
|
+
content_chunks: z.ZodArray<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">;
|
|
193
298
|
total_length: z.ZodBigInt;
|
|
194
|
-
|
|
195
|
-
}, z.
|
|
299
|
+
sha256: z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
300
|
+
}, "content_chunks">, "strict", z.ZodTypeAny, {
|
|
301
|
+
modified: bigint;
|
|
302
|
+
total_length: bigint;
|
|
303
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
304
|
+
}, {
|
|
305
|
+
modified: bigint;
|
|
306
|
+
total_length: bigint;
|
|
307
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
308
|
+
}>], null>, "many">;
|
|
309
|
+
}, "strict", z.ZodTypeAny, {
|
|
310
|
+
created_at: bigint;
|
|
311
|
+
updated_at: bigint;
|
|
312
|
+
key: {
|
|
313
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
314
|
+
collection: string;
|
|
315
|
+
name: string;
|
|
316
|
+
full_path: string;
|
|
317
|
+
description?: string | undefined;
|
|
318
|
+
token?: string | undefined;
|
|
319
|
+
};
|
|
320
|
+
headers: [string, string][];
|
|
321
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
322
|
+
modified: bigint;
|
|
323
|
+
total_length: bigint;
|
|
324
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
325
|
+
}][];
|
|
326
|
+
version?: bigint | undefined;
|
|
327
|
+
}, {
|
|
328
|
+
created_at: bigint;
|
|
329
|
+
updated_at: bigint;
|
|
330
|
+
key: {
|
|
331
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
332
|
+
collection: string;
|
|
333
|
+
name: string;
|
|
334
|
+
full_path: string;
|
|
335
|
+
description?: string | undefined;
|
|
336
|
+
token?: string | undefined;
|
|
337
|
+
};
|
|
338
|
+
headers: [string, string][];
|
|
339
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
340
|
+
modified: bigint;
|
|
341
|
+
total_length: bigint;
|
|
342
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
343
|
+
}][];
|
|
344
|
+
version?: bigint | undefined;
|
|
345
|
+
}>;
|
|
196
346
|
/**
|
|
197
347
|
* A stored asset including its metadata, encodings without chunks, and timestamps.
|
|
198
348
|
*/
|
|
@@ -212,19 +362,51 @@ export declare const BatchSchema: z.ZodObject<{
|
|
|
212
362
|
full_path: z.ZodString;
|
|
213
363
|
token: z.ZodOptional<z.ZodString>;
|
|
214
364
|
collection: z.ZodString;
|
|
215
|
-
owner: z.
|
|
365
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
216
366
|
description: z.ZodOptional<z.ZodString>;
|
|
217
|
-
}, z.
|
|
367
|
+
}, "strict", z.ZodTypeAny, {
|
|
368
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
369
|
+
collection: string;
|
|
370
|
+
name: string;
|
|
371
|
+
full_path: string;
|
|
372
|
+
description?: string | undefined;
|
|
373
|
+
token?: string | undefined;
|
|
374
|
+
}, {
|
|
375
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
376
|
+
collection: string;
|
|
377
|
+
name: string;
|
|
378
|
+
full_path: string;
|
|
379
|
+
description?: string | undefined;
|
|
380
|
+
token?: string | undefined;
|
|
381
|
+
}>;
|
|
218
382
|
reference_id: z.ZodOptional<z.ZodBigInt>;
|
|
219
383
|
expires_at: z.ZodBigInt;
|
|
220
|
-
encoding_type: z.ZodOptional<z.ZodEnum<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
384
|
+
encoding_type: z.ZodOptional<z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>>;
|
|
385
|
+
}, "strict", z.ZodTypeAny, {
|
|
386
|
+
key: {
|
|
387
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
388
|
+
collection: string;
|
|
389
|
+
name: string;
|
|
390
|
+
full_path: string;
|
|
391
|
+
description?: string | undefined;
|
|
392
|
+
token?: string | undefined;
|
|
393
|
+
};
|
|
394
|
+
expires_at: bigint;
|
|
395
|
+
reference_id?: bigint | undefined;
|
|
396
|
+
encoding_type?: "identity" | "gzip" | "compress" | "deflate" | "br" | undefined;
|
|
397
|
+
}, {
|
|
398
|
+
key: {
|
|
399
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
400
|
+
collection: string;
|
|
401
|
+
name: string;
|
|
402
|
+
full_path: string;
|
|
403
|
+
description?: string | undefined;
|
|
404
|
+
token?: string | undefined;
|
|
405
|
+
};
|
|
406
|
+
expires_at: bigint;
|
|
407
|
+
reference_id?: bigint | undefined;
|
|
408
|
+
encoding_type?: "identity" | "gzip" | "compress" | "deflate" | "br" | undefined;
|
|
409
|
+
}>;
|
|
228
410
|
/**
|
|
229
411
|
* Represents a batch of chunks to be uploaded and committed to an asset.
|
|
230
412
|
*/
|
|
@@ -259,9 +441,17 @@ export type BatchId = bigint;
|
|
|
259
441
|
*/
|
|
260
442
|
export declare const CommitBatchSchema: z.ZodObject<{
|
|
261
443
|
batch_id: z.ZodBigInt;
|
|
262
|
-
headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
263
|
-
chunk_ids: z.ZodArray<z.ZodBigInt>;
|
|
264
|
-
}, z.
|
|
444
|
+
headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
445
|
+
chunk_ids: z.ZodArray<z.ZodBigInt, "many">;
|
|
446
|
+
}, "strict", z.ZodTypeAny, {
|
|
447
|
+
headers: [string, string][];
|
|
448
|
+
batch_id: bigint;
|
|
449
|
+
chunk_ids: bigint[];
|
|
450
|
+
}, {
|
|
451
|
+
headers: [string, string][];
|
|
452
|
+
batch_id: bigint;
|
|
453
|
+
chunk_ids: bigint[];
|
|
454
|
+
}>;
|
|
265
455
|
/**
|
|
266
456
|
* Represents the final step in uploading an asset, committing the batch to storage.
|
|
267
457
|
*/
|
|
@@ -299,26 +489,82 @@ export declare const OptionAssetSchema: z.ZodOptional<z.ZodObject<{
|
|
|
299
489
|
full_path: z.ZodString;
|
|
300
490
|
token: z.ZodOptional<z.ZodString>;
|
|
301
491
|
collection: z.ZodString;
|
|
302
|
-
owner: z.
|
|
492
|
+
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
303
493
|
description: z.ZodOptional<z.ZodString>;
|
|
304
|
-
}, z.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
494
|
+
}, "strict", z.ZodTypeAny, {
|
|
495
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
496
|
+
collection: string;
|
|
497
|
+
name: string;
|
|
498
|
+
full_path: string;
|
|
499
|
+
description?: string | undefined;
|
|
500
|
+
token?: string | undefined;
|
|
501
|
+
}, {
|
|
502
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
503
|
+
collection: string;
|
|
504
|
+
name: string;
|
|
505
|
+
full_path: string;
|
|
506
|
+
description?: string | undefined;
|
|
507
|
+
token?: string | undefined;
|
|
508
|
+
}>;
|
|
509
|
+
headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
510
|
+
encodings: z.ZodArray<z.ZodTuple<[z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>, z.ZodObject<{
|
|
313
511
|
modified: z.ZodBigInt;
|
|
314
|
-
content_chunks: z.ZodArray<z.
|
|
512
|
+
content_chunks: z.ZodArray<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">;
|
|
315
513
|
total_length: z.ZodBigInt;
|
|
316
|
-
sha256: z.
|
|
317
|
-
}, z.
|
|
514
|
+
sha256: z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
515
|
+
}, "strip", z.ZodTypeAny, {
|
|
516
|
+
modified: bigint;
|
|
517
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
518
|
+
total_length: bigint;
|
|
519
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
520
|
+
}, {
|
|
521
|
+
modified: bigint;
|
|
522
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
523
|
+
total_length: bigint;
|
|
524
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
525
|
+
}>], null>, "many">;
|
|
318
526
|
created_at: z.ZodBigInt;
|
|
319
527
|
updated_at: z.ZodBigInt;
|
|
320
528
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
321
|
-
}, z.
|
|
529
|
+
}, "strict", z.ZodTypeAny, {
|
|
530
|
+
created_at: bigint;
|
|
531
|
+
updated_at: bigint;
|
|
532
|
+
key: {
|
|
533
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
534
|
+
collection: string;
|
|
535
|
+
name: string;
|
|
536
|
+
full_path: string;
|
|
537
|
+
description?: string | undefined;
|
|
538
|
+
token?: string | undefined;
|
|
539
|
+
};
|
|
540
|
+
headers: [string, string][];
|
|
541
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
542
|
+
modified: bigint;
|
|
543
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
544
|
+
total_length: bigint;
|
|
545
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
546
|
+
}][];
|
|
547
|
+
version?: bigint | undefined;
|
|
548
|
+
}, {
|
|
549
|
+
created_at: bigint;
|
|
550
|
+
updated_at: bigint;
|
|
551
|
+
key: {
|
|
552
|
+
owner: Uint8Array<ArrayBufferLike>;
|
|
553
|
+
collection: string;
|
|
554
|
+
name: string;
|
|
555
|
+
full_path: string;
|
|
556
|
+
description?: string | undefined;
|
|
557
|
+
token?: string | undefined;
|
|
558
|
+
};
|
|
559
|
+
headers: [string, string][];
|
|
560
|
+
encodings: ["identity" | "gzip" | "compress" | "deflate" | "br", {
|
|
561
|
+
modified: bigint;
|
|
562
|
+
content_chunks: Uint8Array<ArrayBufferLike>[];
|
|
563
|
+
total_length: bigint;
|
|
564
|
+
sha256: Uint8Array<ArrayBuffer>;
|
|
565
|
+
}][];
|
|
566
|
+
version?: bigint | undefined;
|
|
567
|
+
}>>;
|
|
322
568
|
/**
|
|
323
569
|
* A shorthand for an asset that might or not be defined.
|
|
324
570
|
*/
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* @see Memory
|
|
4
4
|
*/
|
|
5
|
-
export declare const MemorySchema: z.ZodEnum<
|
|
6
|
-
heap: "heap";
|
|
7
|
-
stable: "stable";
|
|
8
|
-
}>;
|
|
5
|
+
export declare const MemorySchema: z.ZodEnum<["heap", "stable"]>;
|
|
9
6
|
/**
|
|
10
7
|
* Memory type used to select storage or datastore location.
|
|
11
8
|
*/
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type RawUserId, type Timestamp, type UserId } from '../../schemas/satellite';
|
|
3
3
|
/**
|
|
4
4
|
* @see ControllerScopeSchema
|
|
5
5
|
*/
|
|
6
|
-
export declare const ControllerScopeSchema: z.ZodEnum<
|
|
7
|
-
write: "write";
|
|
8
|
-
admin: "admin";
|
|
9
|
-
submit: "submit";
|
|
10
|
-
}>;
|
|
6
|
+
export declare const ControllerScopeSchema: z.ZodEnum<["write", "admin", "submit"]>;
|
|
11
7
|
/**
|
|
12
8
|
* Represents the permission scope of a controller.
|
|
13
9
|
*/
|
|
@@ -24,16 +20,24 @@ export type Metadata = z.infer<typeof MetadataSchema>;
|
|
|
24
20
|
* @see ControllerSchema
|
|
25
21
|
*/
|
|
26
22
|
export declare const ControllerSchema: z.ZodObject<{
|
|
27
|
-
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
23
|
+
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
28
24
|
created_at: z.ZodBigInt;
|
|
29
25
|
updated_at: z.ZodBigInt;
|
|
30
26
|
expires_at: z.ZodOptional<z.ZodBigInt>;
|
|
31
|
-
scope: z.ZodEnum<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
scope: z.ZodEnum<["write", "admin", "submit"]>;
|
|
28
|
+
}, "strict", z.ZodTypeAny, {
|
|
29
|
+
created_at: bigint;
|
|
30
|
+
updated_at: bigint;
|
|
31
|
+
metadata: [string, string][];
|
|
32
|
+
scope: "write" | "admin" | "submit";
|
|
33
|
+
expires_at?: bigint | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
created_at: bigint;
|
|
36
|
+
updated_at: bigint;
|
|
37
|
+
metadata: [string, string][];
|
|
38
|
+
scope: "write" | "admin" | "submit";
|
|
39
|
+
expires_at?: bigint | undefined;
|
|
40
|
+
}>;
|
|
37
41
|
/**
|
|
38
42
|
* Represents a controller with access scope and associated metadata.
|
|
39
43
|
*/
|
|
@@ -63,17 +67,25 @@ export interface Controller {
|
|
|
63
67
|
/**
|
|
64
68
|
* @see ControllerRecordSchema
|
|
65
69
|
*/
|
|
66
|
-
export declare const ControllerRecordSchema: z.ZodTuple<[z.
|
|
67
|
-
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
70
|
+
export declare const ControllerRecordSchema: z.ZodTuple<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodObject<{
|
|
71
|
+
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
68
72
|
created_at: z.ZodBigInt;
|
|
69
73
|
updated_at: z.ZodBigInt;
|
|
70
74
|
expires_at: z.ZodOptional<z.ZodBigInt>;
|
|
71
|
-
scope: z.ZodEnum<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
scope: z.ZodEnum<["write", "admin", "submit"]>;
|
|
76
|
+
}, "strict", z.ZodTypeAny, {
|
|
77
|
+
created_at: bigint;
|
|
78
|
+
updated_at: bigint;
|
|
79
|
+
metadata: [string, string][];
|
|
80
|
+
scope: "write" | "admin" | "submit";
|
|
81
|
+
expires_at?: bigint | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
created_at: bigint;
|
|
84
|
+
updated_at: bigint;
|
|
85
|
+
metadata: [string, string][];
|
|
86
|
+
scope: "write" | "admin" | "submit";
|
|
87
|
+
expires_at?: bigint | undefined;
|
|
88
|
+
}>], null>;
|
|
77
89
|
/**
|
|
78
90
|
* Represents a tuple containing the principal ID and associated controller data.
|
|
79
91
|
*/
|
|
@@ -81,17 +93,25 @@ export type ControllerRecord = z.infer<typeof ControllerRecordSchema>;
|
|
|
81
93
|
/**
|
|
82
94
|
* @see ControllersSchema
|
|
83
95
|
*/
|
|
84
|
-
export declare const ControllersSchema: z.ZodArray<z.ZodTuple<[z.
|
|
85
|
-
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
96
|
+
export declare const ControllersSchema: z.ZodArray<z.ZodTuple<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodObject<{
|
|
97
|
+
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
86
98
|
created_at: z.ZodBigInt;
|
|
87
99
|
updated_at: z.ZodBigInt;
|
|
88
100
|
expires_at: z.ZodOptional<z.ZodBigInt>;
|
|
89
|
-
scope: z.ZodEnum<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
scope: z.ZodEnum<["write", "admin", "submit"]>;
|
|
102
|
+
}, "strict", z.ZodTypeAny, {
|
|
103
|
+
created_at: bigint;
|
|
104
|
+
updated_at: bigint;
|
|
105
|
+
metadata: [string, string][];
|
|
106
|
+
scope: "write" | "admin" | "submit";
|
|
107
|
+
expires_at?: bigint | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
created_at: bigint;
|
|
110
|
+
updated_at: bigint;
|
|
111
|
+
metadata: [string, string][];
|
|
112
|
+
scope: "write" | "admin" | "submit";
|
|
113
|
+
expires_at?: bigint | undefined;
|
|
114
|
+
}>], null>, "many">;
|
|
95
115
|
/**
|
|
96
116
|
* Represents a list of controllers.
|
|
97
117
|
*/
|
|
@@ -100,19 +120,45 @@ export type Controllers = z.infer<typeof ControllersSchema>;
|
|
|
100
120
|
* @see ControllerCheckParamsSchema
|
|
101
121
|
*/
|
|
102
122
|
export declare const ControllerCheckParamsSchema: z.ZodObject<{
|
|
103
|
-
caller: z.ZodUnion<[z.
|
|
104
|
-
controllers: z.ZodArray<z.ZodTuple<[z.
|
|
105
|
-
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null
|
|
123
|
+
caller: z.ZodUnion<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodType<import("@dfinity/principal").Principal, z.ZodTypeDef, import("@dfinity/principal").Principal>]>;
|
|
124
|
+
controllers: z.ZodArray<z.ZodTuple<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodObject<{
|
|
125
|
+
metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
106
126
|
created_at: z.ZodBigInt;
|
|
107
127
|
updated_at: z.ZodBigInt;
|
|
108
128
|
expires_at: z.ZodOptional<z.ZodBigInt>;
|
|
109
|
-
scope: z.ZodEnum<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
scope: z.ZodEnum<["write", "admin", "submit"]>;
|
|
130
|
+
}, "strict", z.ZodTypeAny, {
|
|
131
|
+
created_at: bigint;
|
|
132
|
+
updated_at: bigint;
|
|
133
|
+
metadata: [string, string][];
|
|
134
|
+
scope: "write" | "admin" | "submit";
|
|
135
|
+
expires_at?: bigint | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
created_at: bigint;
|
|
138
|
+
updated_at: bigint;
|
|
139
|
+
metadata: [string, string][];
|
|
140
|
+
scope: "write" | "admin" | "submit";
|
|
141
|
+
expires_at?: bigint | undefined;
|
|
142
|
+
}>], null>, "many">;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
|
|
145
|
+
controllers: [Uint8Array<ArrayBufferLike>, {
|
|
146
|
+
created_at: bigint;
|
|
147
|
+
updated_at: bigint;
|
|
148
|
+
metadata: [string, string][];
|
|
149
|
+
scope: "write" | "admin" | "submit";
|
|
150
|
+
expires_at?: bigint | undefined;
|
|
151
|
+
}][];
|
|
152
|
+
}, {
|
|
153
|
+
caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
|
|
154
|
+
controllers: [Uint8Array<ArrayBufferLike>, {
|
|
155
|
+
created_at: bigint;
|
|
156
|
+
updated_at: bigint;
|
|
157
|
+
metadata: [string, string][];
|
|
158
|
+
scope: "write" | "admin" | "submit";
|
|
159
|
+
expires_at?: bigint | undefined;
|
|
160
|
+
}][];
|
|
161
|
+
}>;
|
|
116
162
|
/**
|
|
117
163
|
* Represents the parameters required to perform controller checks.
|
|
118
164
|
*/
|