@meistrari/vault-http-client 2.14.1 → 2.20.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/dist/index.cjs CHANGED
@@ -3,6 +3,18 @@
3
3
  const core = require('@zodios/core');
4
4
  const zod = require('zod');
5
5
 
6
+ const postAssets_Body = zod.z.object({
7
+ assetClass: zod.z.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._:-]*$/),
8
+ subject: zod.z.string().min(1).max(255),
9
+ mimeType: zod.z.enum([
10
+ "image/png",
11
+ "image/jpeg",
12
+ "image/gif",
13
+ "image/webp",
14
+ "image/avif"
15
+ ]),
16
+ size: zod.z.number().int().gte(0).lte(9007199254740991).optional()
17
+ });
6
18
  const postFiles_Body = zod.z.object({
7
19
  fileName: zod.z.string(),
8
20
  parentId: zod.z.string(),
@@ -11,8 +23,7 @@ const postFiles_Body = zod.z.object({
11
23
  sha256sum: zod.z.string(),
12
24
  size: zod.z.number(),
13
25
  mimeType: zod.z.string(),
14
- createdBy: zod.z.string(),
15
- path: zod.z.string()
26
+ createdBy: zod.z.string()
16
27
  }).partial();
17
28
  const postFilesBulk_Body = zod.z.array(
18
29
  zod.z.object({
@@ -23,13 +34,29 @@ const postFilesBulk_Body = zod.z.array(
23
34
  sha256sum: zod.z.string(),
24
35
  size: zod.z.number(),
25
36
  mimeType: zod.z.string(),
26
- createdBy: zod.z.string(),
27
- path: zod.z.string()
37
+ createdBy: zod.z.string()
28
38
  }).partial()
29
39
  );
30
- const put_WorkspacesByWorkspaceIdSettings_Body = zod.z.object({
40
+ const postFilesDownloadUrlsBulk_Body = zod.z.object({
41
+ fileIds: zod.z.array(zod.z.string().min(1).max(1024)).min(1).max(100),
42
+ expiresIn: zod.z.number().int().gte(1).lte(604800).optional(),
43
+ preserveFileName: zod.z.boolean().optional().default(true)
44
+ });
45
+ const postFilesByFileIdMultipartPart_Body = zod.z.object({
46
+ uploadId: zod.z.string().min(1).max(4096),
47
+ partNumber: zod.z.number().int().gte(1).lte(1e4)
48
+ });
49
+ const postFilesByFileIdMultipartComplete_Body = zod.z.object({
50
+ uploadId: zod.z.string().min(1).max(4096),
51
+ parts: zod.z.array(
52
+ zod.z.object({
53
+ partNumber: zod.z.number().int().gte(1).lte(1e4),
54
+ etag: zod.z.string().min(1).max(256)
55
+ })
56
+ ).min(1).max(1e4)
57
+ });
58
+ const putWorkspacesByWorkspaceIdSettings_Body = zod.z.object({
31
59
  bucketName: zod.z.string().min(1),
32
- keyArns: zod.z.array(zod.z.string()).min(1),
33
60
  defaultS3LinkTtl: zod.z.number().gte(1)
34
61
  });
35
62
  const endpoints = core.makeApi([
@@ -128,7 +155,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
128
155
  response: zod.z.object({
129
156
  id: zod.z.string(),
130
157
  uploadUrl: zod.z.string().url(),
131
- expiresAt: zod.z.string().datetime({ offset: true }),
158
+ expiresAt: zod.z.string().regex(
159
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
160
+ ).datetime({ offset: true }),
132
161
  metadata: zod.z.object({
133
162
  id: zod.z.string(),
134
163
  path: zod.z.string(),
@@ -139,7 +168,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
139
168
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
140
169
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
141
170
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
142
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
143
171
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
144
172
  createdAt: zod.z.string(),
145
173
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -168,6 +196,16 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
168
196
  type: "Query",
169
197
  schema: zod.z.enum(["true", "false"]).optional().default("false")
170
198
  },
199
+ {
200
+ name: "includeChildren",
201
+ type: "Query",
202
+ schema: zod.z.enum(["true", "false"]).optional().default("false")
203
+ },
204
+ {
205
+ name: "includeParent",
206
+ type: "Query",
207
+ schema: zod.z.enum(["true", "false"]).optional().default("false")
208
+ },
171
209
  {
172
210
  name: "fileId",
173
211
  type: "Path",
@@ -176,7 +214,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
176
214
  ],
177
215
  response: zod.z.object({
178
216
  url: zod.z.string(),
179
- expiresAt: zod.z.string().datetime({ offset: true }),
217
+ expiresAt: zod.z.string().regex(
218
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
219
+ ).datetime({ offset: true }),
180
220
  metadata: zod.z.union([
181
221
  zod.z.object({
182
222
  id: zod.z.string(),
@@ -188,7 +228,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
188
228
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
189
229
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
190
230
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
191
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
192
231
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
193
232
  createdAt: zod.z.string(),
194
233
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -204,13 +243,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
204
243
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
205
244
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
206
245
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
207
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
208
246
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
209
247
  createdAt: zod.z.string(),
210
248
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
211
249
  uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
212
250
  })
213
- ),
251
+ ).optional(),
214
252
  parent: zod.z.union([
215
253
  zod.z.object({
216
254
  id: zod.z.string(),
@@ -222,14 +260,13 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
222
260
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
223
261
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
224
262
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
225
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
226
263
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
227
264
  createdAt: zod.z.string(),
228
265
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
229
266
  uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
230
267
  }),
231
268
  zod.z.null()
232
- ])
269
+ ]).optional()
233
270
  }),
234
271
  zod.z.null()
235
272
  ])
@@ -274,7 +311,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
274
311
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
275
312
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
276
313
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
277
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
278
314
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
279
315
  createdAt: zod.z.string(),
280
316
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -318,7 +354,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
318
354
  response: zod.z.object({
319
355
  id: zod.z.string(),
320
356
  uploadUrl: zod.z.string().url(),
321
- expiresAt: zod.z.string().datetime({ offset: true }),
357
+ expiresAt: zod.z.string().regex(
358
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
359
+ ).datetime({ offset: true }),
322
360
  metadata: zod.z.object({
323
361
  id: zod.z.string(),
324
362
  path: zod.z.string(),
@@ -329,7 +367,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
329
367
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
330
368
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
331
369
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
332
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
333
370
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
334
371
  createdAt: zod.z.string(),
335
372
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -383,7 +420,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
383
420
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
384
421
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
385
422
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
386
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
387
423
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
388
424
  createdAt: zod.z.string(),
389
425
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -456,7 +492,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
456
492
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
457
493
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
458
494
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
459
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
460
495
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
461
496
  createdAt: zod.z.string(),
462
497
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -476,7 +511,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
476
511
  {
477
512
  name: "body",
478
513
  type: "Body",
479
- schema: put_WorkspacesByWorkspaceIdSettings_Body
514
+ schema: putWorkspacesByWorkspaceIdSettings_Body
480
515
  },
481
516
  {
482
517
  name: "workspaceId",
@@ -507,7 +542,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
507
542
  ],
508
543
  response: zod.z.object({
509
544
  bucketName: zod.z.string().min(1),
510
- keyArns: zod.z.array(zod.z.string()).min(1),
511
545
  defaultS3LinkTtl: zod.z.number().gte(1)
512
546
  })
513
547
  },
@@ -525,6 +559,86 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
525
559
  ],
526
560
  response: zod.z.void()
527
561
  },
562
+ {
563
+ method: "post",
564
+ path: "/assets",
565
+ description: `Create an asset and get a pre-signed upload URL for the dedicated assets bucket.`,
566
+ requestFormat: "json",
567
+ parameters: [
568
+ {
569
+ name: "body",
570
+ type: "Body",
571
+ schema: postAssets_Body
572
+ },
573
+ {
574
+ name: "expiresIn",
575
+ type: "Query",
576
+ schema: zod.z.number().optional().default(3600)
577
+ }
578
+ ],
579
+ response: zod.z.object({
580
+ assetId: zod.z.string(),
581
+ assetUrl: zod.z.string().url(),
582
+ uploadUrl: zod.z.string().url(),
583
+ expiresAt: zod.z.string().regex(
584
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
585
+ ).datetime({ offset: true }),
586
+ uploadHeaders: zod.z.object({
587
+ "cache-control": zod.z.string(),
588
+ "content-disposition": zod.z.string(),
589
+ "content-type": zod.z.string(),
590
+ "if-none-match": zod.z.string()
591
+ }),
592
+ asset: zod.z.object({
593
+ id: zod.z.string(),
594
+ path: zod.z.string(),
595
+ assetUrl: zod.z.string().url(),
596
+ assetClass: zod.z.string(),
597
+ subject: zod.z.string(),
598
+ mimeType: zod.z.string(),
599
+ size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
600
+ bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
601
+ createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
602
+ createdAt: zod.z.string(),
603
+ uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
604
+ deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
605
+ })
606
+ })
607
+ },
608
+ {
609
+ method: "get",
610
+ path: "/assets/:assetId",
611
+ description: `Get a stored asset by ID, including its stable CloudFront URL.`,
612
+ requestFormat: "json",
613
+ parameters: [
614
+ {
615
+ name: "assetId",
616
+ type: "Path",
617
+ schema: zod.z.string()
618
+ }
619
+ ],
620
+ response: zod.z.object({
621
+ id: zod.z.string(),
622
+ path: zod.z.string(),
623
+ assetUrl: zod.z.string().url(),
624
+ assetClass: zod.z.string(),
625
+ subject: zod.z.string(),
626
+ mimeType: zod.z.string(),
627
+ size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
628
+ bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
629
+ createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
630
+ createdAt: zod.z.string(),
631
+ uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
632
+ deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
633
+ }),
634
+ errors: [
635
+ {
636
+ status: 404,
637
+ description: `Asset not found`,
638
+ schema: zod.z.void()
639
+ }
640
+ ]
641
+ },
528
642
  {
529
643
  method: "post",
530
644
  path: "/files",
@@ -550,7 +664,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
550
664
  response: zod.z.object({
551
665
  id: zod.z.string(),
552
666
  uploadUrl: zod.z.string(),
553
- expiresAt: zod.z.string().datetime({ offset: true }),
667
+ expiresAt: zod.z.string().regex(
668
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
669
+ ).datetime({ offset: true }),
554
670
  metadata: zod.z.object({
555
671
  id: zod.z.string(),
556
672
  path: zod.z.string(),
@@ -561,7 +677,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
561
677
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
562
678
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
563
679
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
564
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
565
680
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
566
681
  createdAt: zod.z.string(),
567
682
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -624,7 +739,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
624
739
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
625
740
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
626
741
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
627
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
628
742
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
629
743
  createdAt: zod.z.string(),
630
744
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -654,7 +768,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
654
768
  ],
655
769
  response: zod.z.object({
656
770
  url: zod.z.string(),
657
- expiresAt: zod.z.string().datetime({ offset: true }),
771
+ expiresAt: zod.z.string().regex(
772
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
773
+ ).datetime({ offset: true }),
658
774
  metadata: zod.z.union([
659
775
  zod.z.object({
660
776
  id: zod.z.string(),
@@ -666,7 +782,6 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
666
782
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
667
783
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
668
784
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
669
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
670
785
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
671
786
  createdAt: zod.z.string(),
672
787
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -710,13 +825,93 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
710
825
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
711
826
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
712
827
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
713
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
714
828
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
715
829
  createdAt: zod.z.string(),
716
830
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
717
831
  uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
718
832
  })
719
833
  },
834
+ {
835
+ method: "post",
836
+ path: "/files/:fileId/multipart",
837
+ description: `Initiate a multipart upload for a file.`,
838
+ requestFormat: "json",
839
+ parameters: [
840
+ {
841
+ name: "fileId",
842
+ type: "Path",
843
+ schema: zod.z.string()
844
+ }
845
+ ],
846
+ response: zod.z.object({ uploadId: zod.z.string().min(1) })
847
+ },
848
+ {
849
+ method: "delete",
850
+ path: "/files/:fileId/multipart",
851
+ description: `Abort a multipart upload and discard its uploaded parts.`,
852
+ requestFormat: "json",
853
+ parameters: [
854
+ {
855
+ name: "uploadId",
856
+ type: "Query",
857
+ schema: zod.z.string().min(1).max(4096)
858
+ },
859
+ {
860
+ name: "fileId",
861
+ type: "Path",
862
+ schema: zod.z.string()
863
+ }
864
+ ],
865
+ response: zod.z.void()
866
+ },
867
+ {
868
+ method: "post",
869
+ path: "/files/:fileId/multipart/complete",
870
+ description: `Complete a multipart upload and assemble the file in S3.`,
871
+ requestFormat: "json",
872
+ parameters: [
873
+ {
874
+ name: "body",
875
+ type: "Body",
876
+ schema: postFilesByFileIdMultipartComplete_Body
877
+ },
878
+ {
879
+ name: "fileId",
880
+ type: "Path",
881
+ schema: zod.z.string()
882
+ }
883
+ ],
884
+ response: zod.z.void()
885
+ },
886
+ {
887
+ method: "post",
888
+ path: "/files/:fileId/multipart/part",
889
+ description: `Get a pre-signed URL for one multipart upload part.`,
890
+ requestFormat: "json",
891
+ parameters: [
892
+ {
893
+ name: "body",
894
+ type: "Body",
895
+ schema: postFilesByFileIdMultipartPart_Body
896
+ },
897
+ {
898
+ name: "expiresIn",
899
+ type: "Query",
900
+ schema: zod.z.number().optional().default(3600)
901
+ },
902
+ {
903
+ name: "fileId",
904
+ type: "Path",
905
+ schema: zod.z.string()
906
+ }
907
+ ],
908
+ response: zod.z.object({
909
+ uploadUrl: zod.z.string().url(),
910
+ expiresAt: zod.z.string().regex(
911
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
912
+ ).datetime({ offset: true })
913
+ })
914
+ },
720
915
  {
721
916
  method: "post",
722
917
  path: "/files/:fileId/permalinks",
@@ -729,7 +924,11 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
729
924
  {
730
925
  name: "body",
731
926
  type: "Body",
732
- schema: zod.z.object({ expiresAt: zod.z.string().datetime({ offset: true }) }).partial()
927
+ schema: zod.z.object({
928
+ expiresAt: zod.z.string().regex(
929
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
930
+ ).datetime({ offset: true })
931
+ }).partial()
733
932
  },
734
933
  {
735
934
  name: "fileId",
@@ -741,7 +940,7 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
741
940
  id: zod.z.string(),
742
941
  fileId: zod.z.string(),
743
942
  workspaceId: zod.z.string(),
744
- createdAt: zod.z.string(),
943
+ createdAt: zod.z.string().datetime({ offset: true }),
745
944
  expiresAt: zod.z.union([zod.z.string(), zod.z.null()]),
746
945
  createdBy: zod.z.union([zod.z.string(), zod.z.null()])
747
946
  })
@@ -763,46 +962,12 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
763
962
  id: zod.z.string(),
764
963
  fileId: zod.z.string(),
765
964
  workspaceId: zod.z.string(),
766
- createdAt: zod.z.string(),
965
+ createdAt: zod.z.string().datetime({ offset: true }),
767
966
  expiresAt: zod.z.union([zod.z.string(), zod.z.null()]),
768
967
  createdBy: zod.z.union([zod.z.string(), zod.z.null()])
769
968
  })
770
969
  )
771
970
  },
772
- {
773
- method: "post",
774
- path: "/files/:filename",
775
- description: `Create a file and get a pre-signed upload URL (legacy endpoint).
776
-
777
- This endpoint is deprecated. Use POST /files instead with `originalFileName` in the request body.
778
-
779
- The `sha256` body param is used as the file's primary key. If not provided, a random UUID will be generated.
780
-
781
- The returned `url` is valid for 1 hour by default. You can change the expiration time by passing the `expiresIn` query parameter.
782
- `,
783
- requestFormat: "json",
784
- parameters: [
785
- {
786
- name: "body",
787
- type: "Body",
788
- schema: postFiles_Body
789
- },
790
- {
791
- name: "expiresIn",
792
- type: "Query",
793
- schema: zod.z.number().optional().default(3600)
794
- },
795
- {
796
- name: "filename",
797
- type: "Path",
798
- schema: zod.z.string()
799
- }
800
- ],
801
- response: zod.z.object({
802
- url: zod.z.string(),
803
- expiresAt: zod.z.string().datetime({ offset: true })
804
- })
805
- },
806
971
  {
807
972
  method: "put",
808
973
  path: "/files/:id",
@@ -820,33 +985,28 @@ The returned `url` is valid for 1 hour by default. You can change the
820
985
  schema: zod.z.string()
821
986
  }
822
987
  ],
823
- response: zod.z.union([
824
- zod.z.object({
988
+ response: zod.z.object({
989
+ id: zod.z.string(),
990
+ uploadUrl: zod.z.string().url(),
991
+ expiresAt: zod.z.string().regex(
992
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
993
+ ).datetime({ offset: true }),
994
+ metadata: zod.z.object({
825
995
  id: zod.z.string(),
826
- uploadUrl: zod.z.string().url(),
827
- expiresAt: zod.z.string().datetime({ offset: true }),
828
- metadata: zod.z.object({
829
- id: zod.z.string(),
830
- path: zod.z.string(),
831
- workspaceId: zod.z.string(),
832
- parentId: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
833
- originalFileName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
834
- mimeType: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
835
- size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
836
- legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
837
- bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
838
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
839
- createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
840
- createdAt: zod.z.string(),
841
- deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
842
- uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
843
- })
844
- }),
845
- zod.z.object({
846
- url: zod.z.string().url(),
847
- expiresAt: zod.z.string().datetime({ offset: true })
996
+ path: zod.z.string(),
997
+ workspaceId: zod.z.string(),
998
+ parentId: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
999
+ originalFileName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1000
+ mimeType: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1001
+ size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
1002
+ legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1003
+ bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1004
+ createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1005
+ createdAt: zod.z.string(),
1006
+ deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1007
+ uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
848
1008
  })
849
- ])
1009
+ })
850
1010
  },
851
1011
  {
852
1012
  method: "delete",
@@ -884,7 +1044,6 @@ The returned `url` is valid for 1 hour by default. You can change the
884
1044
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
885
1045
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
886
1046
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
887
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
888
1047
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
889
1048
  createdAt: zod.z.string(),
890
1049
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -942,7 +1101,6 @@ The returned `url` is valid for 1 hour by default. You can change the
942
1101
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
943
1102
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
944
1103
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
945
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
946
1104
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
947
1105
  createdAt: zod.z.string(),
948
1106
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -968,7 +1126,9 @@ The returned `url` is valid for 1 hour by default. You can change the
968
1126
  zod.z.object({
969
1127
  id: zod.z.string(),
970
1128
  uploadUrl: zod.z.string(),
971
- expiresAt: zod.z.string().datetime({ offset: true }),
1129
+ expiresAt: zod.z.string().regex(
1130
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
1131
+ ).datetime({ offset: true }),
972
1132
  metadata: zod.z.object({
973
1133
  id: zod.z.string(),
974
1134
  path: zod.z.string(),
@@ -979,7 +1139,6 @@ The returned `url` is valid for 1 hour by default. You can change the
979
1139
  size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
980
1140
  legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
981
1141
  bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
982
- encryptionKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
983
1142
  createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
984
1143
  createdAt: zod.z.string(),
985
1144
  deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
@@ -989,6 +1148,47 @@ The returned `url` is valid for 1 hour by default. You can change the
989
1148
  })
990
1149
  )
991
1150
  },
1151
+ {
1152
+ method: "post",
1153
+ path: "/files/download-urls/bulk",
1154
+ description: `Read up to 100 files and sign their download URLs. Results preserve input order and duplicates. Missing, deleted and inaccessible files all return not_found.`,
1155
+ requestFormat: "json",
1156
+ parameters: [
1157
+ {
1158
+ name: "body",
1159
+ type: "Body",
1160
+ schema: postFilesDownloadUrlsBulk_Body
1161
+ }
1162
+ ],
1163
+ response: zod.z.array(
1164
+ zod.z.union([
1165
+ zod.z.object({
1166
+ id: zod.z.string(),
1167
+ status: zod.z.string(),
1168
+ url: zod.z.string().url(),
1169
+ expiresAt: zod.z.string().regex(
1170
+ /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/
1171
+ ).datetime({ offset: true }),
1172
+ metadata: zod.z.object({
1173
+ id: zod.z.string(),
1174
+ path: zod.z.string(),
1175
+ workspaceId: zod.z.string(),
1176
+ parentId: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1177
+ originalFileName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1178
+ mimeType: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1179
+ size: zod.z.union([zod.z.number(), zod.z.null()]).optional(),
1180
+ legacyKey: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1181
+ bucketName: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1182
+ createdBy: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1183
+ createdAt: zod.z.string(),
1184
+ deletedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional(),
1185
+ uploadedAt: zod.z.union([zod.z.string(), zod.z.null()]).optional()
1186
+ })
1187
+ }),
1188
+ zod.z.object({ id: zod.z.string(), status: zod.z.enum(["not_found", "error"]) })
1189
+ ])
1190
+ )
1191
+ },
992
1192
  {
993
1193
  method: "get",
994
1194
  path: "/permalinks/:permalinkId",
@@ -1048,7 +1248,7 @@ Make sure to follow redirects to the actual file download URL.
1048
1248
  id: zod.z.string(),
1049
1249
  fileId: zod.z.string(),
1050
1250
  workspaceId: zod.z.string(),
1051
- createdAt: zod.z.string(),
1251
+ createdAt: zod.z.string().datetime({ offset: true }),
1052
1252
  expiresAt: zod.z.union([zod.z.string(), zod.z.null()]),
1053
1253
  createdBy: zod.z.union([zod.z.string(), zod.z.null()])
1054
1254
  }),
@@ -1066,7 +1266,7 @@ function createApiClient(baseUrl, options) {
1066
1266
  return new core.Zodios(baseUrl, endpoints, options);
1067
1267
  }
1068
1268
 
1069
- const version = "2.14.0";
1269
+ const version = "v2.20.0";
1070
1270
  const packageInfo = {
1071
1271
  version: version};
1072
1272