@meistrari/vault-http-client 2.14.1 → 2.17.6
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 +250 -78
- package/dist/index.d.cts +366 -130
- package/dist/index.d.mts +366 -130
- package/dist/index.d.ts +366 -130
- package/dist/index.mjs +250 -78
- package/package.json +24 -23
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { makeApi, Zodios } from '@zodios/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
const postAssets_Body = z.object({
|
|
5
|
+
assetClass: z.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._:-]*$/),
|
|
6
|
+
subject: z.string().min(1).max(255),
|
|
7
|
+
mimeType: z.enum([
|
|
8
|
+
"image/png",
|
|
9
|
+
"image/jpeg",
|
|
10
|
+
"image/gif",
|
|
11
|
+
"image/webp",
|
|
12
|
+
"image/avif"
|
|
13
|
+
]),
|
|
14
|
+
size: z.number().int().gte(0).lte(9007199254740991).optional()
|
|
15
|
+
});
|
|
4
16
|
const postFiles_Body = z.object({
|
|
5
17
|
fileName: z.string(),
|
|
6
18
|
parentId: z.string(),
|
|
@@ -9,8 +21,7 @@ const postFiles_Body = z.object({
|
|
|
9
21
|
sha256sum: z.string(),
|
|
10
22
|
size: z.number(),
|
|
11
23
|
mimeType: z.string(),
|
|
12
|
-
createdBy: z.string()
|
|
13
|
-
path: z.string()
|
|
24
|
+
createdBy: z.string()
|
|
14
25
|
}).partial();
|
|
15
26
|
const postFilesBulk_Body = z.array(
|
|
16
27
|
z.object({
|
|
@@ -21,11 +32,23 @@ const postFilesBulk_Body = z.array(
|
|
|
21
32
|
sha256sum: z.string(),
|
|
22
33
|
size: z.number(),
|
|
23
34
|
mimeType: z.string(),
|
|
24
|
-
createdBy: z.string()
|
|
25
|
-
path: z.string()
|
|
35
|
+
createdBy: z.string()
|
|
26
36
|
}).partial()
|
|
27
37
|
);
|
|
28
|
-
const
|
|
38
|
+
const postFilesByFileIdMultipartPart_Body = z.object({
|
|
39
|
+
uploadId: z.string().min(1).max(4096),
|
|
40
|
+
partNumber: z.number().int().gte(1).lte(1e4)
|
|
41
|
+
});
|
|
42
|
+
const postFilesByFileIdMultipartComplete_Body = z.object({
|
|
43
|
+
uploadId: z.string().min(1).max(4096),
|
|
44
|
+
parts: z.array(
|
|
45
|
+
z.object({
|
|
46
|
+
partNumber: z.number().int().gte(1).lte(1e4),
|
|
47
|
+
etag: z.string().min(1).max(256)
|
|
48
|
+
})
|
|
49
|
+
).min(1).max(1e4)
|
|
50
|
+
});
|
|
51
|
+
const putWorkspacesByWorkspaceIdSettings_Body = z.object({
|
|
29
52
|
bucketName: z.string().min(1),
|
|
30
53
|
keyArns: z.array(z.string()).min(1),
|
|
31
54
|
defaultS3LinkTtl: z.number().gte(1)
|
|
@@ -126,7 +149,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
126
149
|
response: z.object({
|
|
127
150
|
id: z.string(),
|
|
128
151
|
uploadUrl: z.string().url(),
|
|
129
|
-
expiresAt: z.string().
|
|
152
|
+
expiresAt: z.string().regex(
|
|
153
|
+
/^(?:(?:\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))$/
|
|
154
|
+
).datetime({ offset: true }),
|
|
130
155
|
metadata: z.object({
|
|
131
156
|
id: z.string(),
|
|
132
157
|
path: z.string(),
|
|
@@ -166,6 +191,16 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
166
191
|
type: "Query",
|
|
167
192
|
schema: z.enum(["true", "false"]).optional().default("false")
|
|
168
193
|
},
|
|
194
|
+
{
|
|
195
|
+
name: "includeChildren",
|
|
196
|
+
type: "Query",
|
|
197
|
+
schema: z.enum(["true", "false"]).optional().default("false")
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "includeParent",
|
|
201
|
+
type: "Query",
|
|
202
|
+
schema: z.enum(["true", "false"]).optional().default("false")
|
|
203
|
+
},
|
|
169
204
|
{
|
|
170
205
|
name: "fileId",
|
|
171
206
|
type: "Path",
|
|
@@ -174,7 +209,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
174
209
|
],
|
|
175
210
|
response: z.object({
|
|
176
211
|
url: z.string(),
|
|
177
|
-
expiresAt: z.string().
|
|
212
|
+
expiresAt: z.string().regex(
|
|
213
|
+
/^(?:(?:\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))$/
|
|
214
|
+
).datetime({ offset: true }),
|
|
178
215
|
metadata: z.union([
|
|
179
216
|
z.object({
|
|
180
217
|
id: z.string(),
|
|
@@ -208,7 +245,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
208
245
|
deletedAt: z.union([z.string(), z.null()]).optional(),
|
|
209
246
|
uploadedAt: z.union([z.string(), z.null()]).optional()
|
|
210
247
|
})
|
|
211
|
-
),
|
|
248
|
+
).optional(),
|
|
212
249
|
parent: z.union([
|
|
213
250
|
z.object({
|
|
214
251
|
id: z.string(),
|
|
@@ -227,7 +264,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
227
264
|
uploadedAt: z.union([z.string(), z.null()]).optional()
|
|
228
265
|
}),
|
|
229
266
|
z.null()
|
|
230
|
-
])
|
|
267
|
+
]).optional()
|
|
231
268
|
}),
|
|
232
269
|
z.null()
|
|
233
270
|
])
|
|
@@ -316,7 +353,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
316
353
|
response: z.object({
|
|
317
354
|
id: z.string(),
|
|
318
355
|
uploadUrl: z.string().url(),
|
|
319
|
-
expiresAt: z.string().
|
|
356
|
+
expiresAt: z.string().regex(
|
|
357
|
+
/^(?:(?:\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))$/
|
|
358
|
+
).datetime({ offset: true }),
|
|
320
359
|
metadata: z.object({
|
|
321
360
|
id: z.string(),
|
|
322
361
|
path: z.string(),
|
|
@@ -474,7 +513,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
474
513
|
{
|
|
475
514
|
name: "body",
|
|
476
515
|
type: "Body",
|
|
477
|
-
schema:
|
|
516
|
+
schema: putWorkspacesByWorkspaceIdSettings_Body
|
|
478
517
|
},
|
|
479
518
|
{
|
|
480
519
|
name: "workspaceId",
|
|
@@ -523,6 +562,86 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
523
562
|
],
|
|
524
563
|
response: z.void()
|
|
525
564
|
},
|
|
565
|
+
{
|
|
566
|
+
method: "post",
|
|
567
|
+
path: "/assets",
|
|
568
|
+
description: `Create an asset and get a pre-signed upload URL for the dedicated assets bucket.`,
|
|
569
|
+
requestFormat: "json",
|
|
570
|
+
parameters: [
|
|
571
|
+
{
|
|
572
|
+
name: "body",
|
|
573
|
+
type: "Body",
|
|
574
|
+
schema: postAssets_Body
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
name: "expiresIn",
|
|
578
|
+
type: "Query",
|
|
579
|
+
schema: z.number().optional().default(3600)
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
response: z.object({
|
|
583
|
+
assetId: z.string(),
|
|
584
|
+
assetUrl: z.string().url(),
|
|
585
|
+
uploadUrl: z.string().url(),
|
|
586
|
+
expiresAt: z.string().regex(
|
|
587
|
+
/^(?:(?:\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))$/
|
|
588
|
+
).datetime({ offset: true }),
|
|
589
|
+
uploadHeaders: z.object({
|
|
590
|
+
"cache-control": z.string(),
|
|
591
|
+
"content-disposition": z.string(),
|
|
592
|
+
"content-type": z.string(),
|
|
593
|
+
"if-none-match": z.string()
|
|
594
|
+
}),
|
|
595
|
+
asset: z.object({
|
|
596
|
+
id: z.string(),
|
|
597
|
+
path: z.string(),
|
|
598
|
+
assetUrl: z.string().url(),
|
|
599
|
+
assetClass: z.string(),
|
|
600
|
+
subject: z.string(),
|
|
601
|
+
mimeType: z.string(),
|
|
602
|
+
size: z.union([z.number(), z.null()]).optional(),
|
|
603
|
+
bucketName: z.union([z.string(), z.null()]).optional(),
|
|
604
|
+
createdBy: z.union([z.string(), z.null()]).optional(),
|
|
605
|
+
createdAt: z.string(),
|
|
606
|
+
uploadedAt: z.union([z.string(), z.null()]).optional(),
|
|
607
|
+
deletedAt: z.union([z.string(), z.null()]).optional()
|
|
608
|
+
})
|
|
609
|
+
})
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
method: "get",
|
|
613
|
+
path: "/assets/:assetId",
|
|
614
|
+
description: `Get a stored asset by ID, including its stable CloudFront URL.`,
|
|
615
|
+
requestFormat: "json",
|
|
616
|
+
parameters: [
|
|
617
|
+
{
|
|
618
|
+
name: "assetId",
|
|
619
|
+
type: "Path",
|
|
620
|
+
schema: z.string()
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
response: z.object({
|
|
624
|
+
id: z.string(),
|
|
625
|
+
path: z.string(),
|
|
626
|
+
assetUrl: z.string().url(),
|
|
627
|
+
assetClass: z.string(),
|
|
628
|
+
subject: z.string(),
|
|
629
|
+
mimeType: z.string(),
|
|
630
|
+
size: z.union([z.number(), z.null()]).optional(),
|
|
631
|
+
bucketName: z.union([z.string(), z.null()]).optional(),
|
|
632
|
+
createdBy: z.union([z.string(), z.null()]).optional(),
|
|
633
|
+
createdAt: z.string(),
|
|
634
|
+
uploadedAt: z.union([z.string(), z.null()]).optional(),
|
|
635
|
+
deletedAt: z.union([z.string(), z.null()]).optional()
|
|
636
|
+
}),
|
|
637
|
+
errors: [
|
|
638
|
+
{
|
|
639
|
+
status: 404,
|
|
640
|
+
description: `Asset not found`,
|
|
641
|
+
schema: z.void()
|
|
642
|
+
}
|
|
643
|
+
]
|
|
644
|
+
},
|
|
526
645
|
{
|
|
527
646
|
method: "post",
|
|
528
647
|
path: "/files",
|
|
@@ -548,7 +667,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
548
667
|
response: z.object({
|
|
549
668
|
id: z.string(),
|
|
550
669
|
uploadUrl: z.string(),
|
|
551
|
-
expiresAt: z.string().
|
|
670
|
+
expiresAt: z.string().regex(
|
|
671
|
+
/^(?:(?:\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))$/
|
|
672
|
+
).datetime({ offset: true }),
|
|
552
673
|
metadata: z.object({
|
|
553
674
|
id: z.string(),
|
|
554
675
|
path: z.string(),
|
|
@@ -652,7 +773,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
652
773
|
],
|
|
653
774
|
response: z.object({
|
|
654
775
|
url: z.string(),
|
|
655
|
-
expiresAt: z.string().
|
|
776
|
+
expiresAt: z.string().regex(
|
|
777
|
+
/^(?:(?:\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))$/
|
|
778
|
+
).datetime({ offset: true }),
|
|
656
779
|
metadata: z.union([
|
|
657
780
|
z.object({
|
|
658
781
|
id: z.string(),
|
|
@@ -715,6 +838,87 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
|
|
|
715
838
|
uploadedAt: z.union([z.string(), z.null()]).optional()
|
|
716
839
|
})
|
|
717
840
|
},
|
|
841
|
+
{
|
|
842
|
+
method: "post",
|
|
843
|
+
path: "/files/:fileId/multipart",
|
|
844
|
+
description: `Initiate a multipart upload for a file.`,
|
|
845
|
+
requestFormat: "json",
|
|
846
|
+
parameters: [
|
|
847
|
+
{
|
|
848
|
+
name: "fileId",
|
|
849
|
+
type: "Path",
|
|
850
|
+
schema: z.string()
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
response: z.object({ uploadId: z.string().min(1) })
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
method: "delete",
|
|
857
|
+
path: "/files/:fileId/multipart",
|
|
858
|
+
description: `Abort a multipart upload and discard its uploaded parts.`,
|
|
859
|
+
requestFormat: "json",
|
|
860
|
+
parameters: [
|
|
861
|
+
{
|
|
862
|
+
name: "uploadId",
|
|
863
|
+
type: "Query",
|
|
864
|
+
schema: z.string().min(1).max(4096)
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
name: "fileId",
|
|
868
|
+
type: "Path",
|
|
869
|
+
schema: z.string()
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
response: z.void()
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
method: "post",
|
|
876
|
+
path: "/files/:fileId/multipart/complete",
|
|
877
|
+
description: `Complete a multipart upload and assemble the file in S3.`,
|
|
878
|
+
requestFormat: "json",
|
|
879
|
+
parameters: [
|
|
880
|
+
{
|
|
881
|
+
name: "body",
|
|
882
|
+
type: "Body",
|
|
883
|
+
schema: postFilesByFileIdMultipartComplete_Body
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
name: "fileId",
|
|
887
|
+
type: "Path",
|
|
888
|
+
schema: z.string()
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
response: z.void()
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
method: "post",
|
|
895
|
+
path: "/files/:fileId/multipart/part",
|
|
896
|
+
description: `Get a pre-signed URL for one multipart upload part.`,
|
|
897
|
+
requestFormat: "json",
|
|
898
|
+
parameters: [
|
|
899
|
+
{
|
|
900
|
+
name: "body",
|
|
901
|
+
type: "Body",
|
|
902
|
+
schema: postFilesByFileIdMultipartPart_Body
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "expiresIn",
|
|
906
|
+
type: "Query",
|
|
907
|
+
schema: z.number().optional().default(3600)
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "fileId",
|
|
911
|
+
type: "Path",
|
|
912
|
+
schema: z.string()
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
response: z.object({
|
|
916
|
+
uploadUrl: z.string().url(),
|
|
917
|
+
expiresAt: z.string().regex(
|
|
918
|
+
/^(?:(?:\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))$/
|
|
919
|
+
).datetime({ offset: true })
|
|
920
|
+
})
|
|
921
|
+
},
|
|
718
922
|
{
|
|
719
923
|
method: "post",
|
|
720
924
|
path: "/files/:fileId/permalinks",
|
|
@@ -727,7 +931,11 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
|
|
|
727
931
|
{
|
|
728
932
|
name: "body",
|
|
729
933
|
type: "Body",
|
|
730
|
-
schema: z.object({
|
|
934
|
+
schema: z.object({
|
|
935
|
+
expiresAt: z.string().regex(
|
|
936
|
+
/^(?:(?:\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))$/
|
|
937
|
+
).datetime({ offset: true })
|
|
938
|
+
}).partial()
|
|
731
939
|
},
|
|
732
940
|
{
|
|
733
941
|
name: "fileId",
|
|
@@ -739,7 +947,7 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
|
|
|
739
947
|
id: z.string(),
|
|
740
948
|
fileId: z.string(),
|
|
741
949
|
workspaceId: z.string(),
|
|
742
|
-
createdAt: z.string(),
|
|
950
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
743
951
|
expiresAt: z.union([z.string(), z.null()]),
|
|
744
952
|
createdBy: z.union([z.string(), z.null()])
|
|
745
953
|
})
|
|
@@ -761,46 +969,12 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
|
|
|
761
969
|
id: z.string(),
|
|
762
970
|
fileId: z.string(),
|
|
763
971
|
workspaceId: z.string(),
|
|
764
|
-
createdAt: z.string(),
|
|
972
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
765
973
|
expiresAt: z.union([z.string(), z.null()]),
|
|
766
974
|
createdBy: z.union([z.string(), z.null()])
|
|
767
975
|
})
|
|
768
976
|
)
|
|
769
977
|
},
|
|
770
|
-
{
|
|
771
|
-
method: "post",
|
|
772
|
-
path: "/files/:filename",
|
|
773
|
-
description: `Create a file and get a pre-signed upload URL (legacy endpoint).
|
|
774
|
-
|
|
775
|
-
This endpoint is deprecated. Use POST /files instead with `originalFileName` in the request body.
|
|
776
|
-
|
|
777
|
-
The `sha256` body param is used as the file's primary key. If not provided, a random UUID will be generated.
|
|
778
|
-
|
|
779
|
-
The returned `url` is valid for 1 hour by default. You can change the expiration time by passing the `expiresIn` query parameter.
|
|
780
|
-
`,
|
|
781
|
-
requestFormat: "json",
|
|
782
|
-
parameters: [
|
|
783
|
-
{
|
|
784
|
-
name: "body",
|
|
785
|
-
type: "Body",
|
|
786
|
-
schema: postFiles_Body
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: "expiresIn",
|
|
790
|
-
type: "Query",
|
|
791
|
-
schema: z.number().optional().default(3600)
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
name: "filename",
|
|
795
|
-
type: "Path",
|
|
796
|
-
schema: z.string()
|
|
797
|
-
}
|
|
798
|
-
],
|
|
799
|
-
response: z.object({
|
|
800
|
-
url: z.string(),
|
|
801
|
-
expiresAt: z.string().datetime({ offset: true })
|
|
802
|
-
})
|
|
803
|
-
},
|
|
804
978
|
{
|
|
805
979
|
method: "put",
|
|
806
980
|
path: "/files/:id",
|
|
@@ -818,33 +992,29 @@ The returned `url` is valid for 1 hour by default. You can change the
|
|
|
818
992
|
schema: z.string()
|
|
819
993
|
}
|
|
820
994
|
],
|
|
821
|
-
response: z.
|
|
822
|
-
z.
|
|
995
|
+
response: z.object({
|
|
996
|
+
id: z.string(),
|
|
997
|
+
uploadUrl: z.string().url(),
|
|
998
|
+
expiresAt: z.string().regex(
|
|
999
|
+
/^(?:(?:\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))$/
|
|
1000
|
+
).datetime({ offset: true }),
|
|
1001
|
+
metadata: z.object({
|
|
823
1002
|
id: z.string(),
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
createdBy: z.union([z.string(), z.null()]).optional(),
|
|
838
|
-
createdAt: z.string(),
|
|
839
|
-
deletedAt: z.union([z.string(), z.null()]).optional(),
|
|
840
|
-
uploadedAt: z.union([z.string(), z.null()]).optional()
|
|
841
|
-
})
|
|
842
|
-
}),
|
|
843
|
-
z.object({
|
|
844
|
-
url: z.string().url(),
|
|
845
|
-
expiresAt: z.string().datetime({ offset: true })
|
|
1003
|
+
path: z.string(),
|
|
1004
|
+
workspaceId: z.string(),
|
|
1005
|
+
parentId: z.union([z.string(), z.null()]).optional(),
|
|
1006
|
+
originalFileName: z.union([z.string(), z.null()]).optional(),
|
|
1007
|
+
mimeType: z.union([z.string(), z.null()]).optional(),
|
|
1008
|
+
size: z.union([z.number(), z.null()]).optional(),
|
|
1009
|
+
legacyKey: z.union([z.string(), z.null()]).optional(),
|
|
1010
|
+
bucketName: z.union([z.string(), z.null()]).optional(),
|
|
1011
|
+
encryptionKey: z.union([z.string(), z.null()]).optional(),
|
|
1012
|
+
createdBy: z.union([z.string(), z.null()]).optional(),
|
|
1013
|
+
createdAt: z.string(),
|
|
1014
|
+
deletedAt: z.union([z.string(), z.null()]).optional(),
|
|
1015
|
+
uploadedAt: z.union([z.string(), z.null()]).optional()
|
|
846
1016
|
})
|
|
847
|
-
|
|
1017
|
+
})
|
|
848
1018
|
},
|
|
849
1019
|
{
|
|
850
1020
|
method: "delete",
|
|
@@ -966,7 +1136,9 @@ The returned `url` is valid for 1 hour by default. You can change the
|
|
|
966
1136
|
z.object({
|
|
967
1137
|
id: z.string(),
|
|
968
1138
|
uploadUrl: z.string(),
|
|
969
|
-
expiresAt: z.string().
|
|
1139
|
+
expiresAt: z.string().regex(
|
|
1140
|
+
/^(?:(?:\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))$/
|
|
1141
|
+
).datetime({ offset: true }),
|
|
970
1142
|
metadata: z.object({
|
|
971
1143
|
id: z.string(),
|
|
972
1144
|
path: z.string(),
|
|
@@ -1046,7 +1218,7 @@ Make sure to follow redirects to the actual file download URL.
|
|
|
1046
1218
|
id: z.string(),
|
|
1047
1219
|
fileId: z.string(),
|
|
1048
1220
|
workspaceId: z.string(),
|
|
1049
|
-
createdAt: z.string(),
|
|
1221
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
1050
1222
|
expiresAt: z.union([z.string(), z.null()]),
|
|
1051
1223
|
createdBy: z.union([z.string(), z.null()])
|
|
1052
1224
|
}),
|
|
@@ -1064,7 +1236,7 @@ function createApiClient(baseUrl, options) {
|
|
|
1064
1236
|
return new Zodios(baseUrl, endpoints, options);
|
|
1065
1237
|
}
|
|
1066
1238
|
|
|
1067
|
-
const version = "2.
|
|
1239
|
+
const version = "2.17.6";
|
|
1068
1240
|
const packageInfo = {
|
|
1069
1241
|
version: version};
|
|
1070
1242
|
|
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@zodios/core": "10.9.6",
|
|
21
|
-
"zod": "3.25.76"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"unbuild": "3.6.1"
|
|
2
|
+
"name": "@meistrari/vault-http-client",
|
|
3
|
+
"version": "2.17.6",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/meistrari/vault.git"
|
|
7
|
+
},
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.mjs",
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
25
15
|
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@zodios/core": "10.9.6",
|
|
22
|
+
"zod": "3.25.76"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"unbuild": "3.6.1"
|
|
26
|
+
}
|
|
26
27
|
}
|