@meistrari/vault-http-client 2.3.5 → 2.3.9

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.d.mts CHANGED
@@ -99,14 +99,17 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
99
99
  size: z.ZodOptional<z.ZodNumber>;
100
100
  mimeType: z.ZodOptional<z.ZodString>;
101
101
  createdBy: z.ZodOptional<z.ZodString>;
102
+ path: z.ZodOptional<z.ZodString>;
102
103
  }, "strip", z.ZodTypeAny, {
103
104
  fileName: string;
105
+ path?: string | undefined;
104
106
  sha256sum?: string | undefined;
105
107
  size?: number | undefined;
106
108
  mimeType?: string | undefined;
107
109
  createdBy?: string | undefined;
108
110
  }, {
109
111
  fileName: string;
112
+ path?: string | undefined;
110
113
  sha256sum?: string | undefined;
111
114
  size?: number | undefined;
112
115
  mimeType?: string | undefined;
@@ -312,6 +315,73 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
312
315
  description: string;
313
316
  schema: z.ZodVoid;
314
317
  }];
318
+ }, {
319
+ method: "post";
320
+ path: "/_/files/:fileId/copy";
321
+ description: "Copy a file from one workspace to another.";
322
+ requestFormat: "json";
323
+ parameters: [{
324
+ name: "sourceWorkspaceId";
325
+ type: "Query";
326
+ schema: z.ZodString;
327
+ }, {
328
+ name: "destinationWorkspaceId";
329
+ type: "Query";
330
+ schema: z.ZodString;
331
+ }, {
332
+ name: "fileId";
333
+ type: "Path";
334
+ schema: z.ZodString;
335
+ }];
336
+ response: z.ZodObject<{
337
+ id: z.ZodString;
338
+ path: z.ZodString;
339
+ workspaceId: z.ZodString;
340
+ originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
341
+ mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
342
+ size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
343
+ legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
344
+ bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
345
+ encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
346
+ createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
347
+ createdAt: z.ZodString;
348
+ deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ path: string;
351
+ workspaceId: string;
352
+ id: string;
353
+ createdAt: string;
354
+ bucketName?: string | null | undefined;
355
+ size?: number | null | undefined;
356
+ mimeType?: string | null | undefined;
357
+ createdBy?: string | null | undefined;
358
+ deletedAt?: string | null | undefined;
359
+ originalFileName?: string | null | undefined;
360
+ legacyKey?: string | null | undefined;
361
+ encryptionKey?: string | null | undefined;
362
+ }, {
363
+ path: string;
364
+ workspaceId: string;
365
+ id: string;
366
+ createdAt: string;
367
+ bucketName?: string | null | undefined;
368
+ size?: number | null | undefined;
369
+ mimeType?: string | null | undefined;
370
+ createdBy?: string | null | undefined;
371
+ deletedAt?: string | null | undefined;
372
+ originalFileName?: string | null | undefined;
373
+ legacyKey?: string | null | undefined;
374
+ encryptionKey?: string | null | undefined;
375
+ }>;
376
+ errors: [{
377
+ status: 404;
378
+ description: string;
379
+ schema: z.ZodVoid;
380
+ }, {
381
+ status: 409;
382
+ description: string;
383
+ schema: z.ZodVoid;
384
+ }];
315
385
  }, {
316
386
  method: "put";
317
387
  path: "/_/files/:id";
@@ -682,6 +752,122 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
682
752
  keyArns: string[];
683
753
  defaultS3LinkTtl: number;
684
754
  }>;
755
+ }, {
756
+ method: "post";
757
+ path: "/files";
758
+ description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
759
+ requestFormat: "json";
760
+ parameters: [{
761
+ name: "body";
762
+ type: "Body";
763
+ schema: z.ZodObject<{
764
+ fileName: z.ZodOptional<z.ZodDefault<z.ZodString>>;
765
+ sha256sum: z.ZodOptional<z.ZodString>;
766
+ size: z.ZodOptional<z.ZodNumber>;
767
+ mimeType: z.ZodOptional<z.ZodString>;
768
+ createdBy: z.ZodOptional<z.ZodString>;
769
+ path: z.ZodOptional<z.ZodString>;
770
+ }, "strip", z.ZodTypeAny, {
771
+ path?: string | undefined;
772
+ fileName?: string | undefined;
773
+ sha256sum?: string | undefined;
774
+ size?: number | undefined;
775
+ mimeType?: string | undefined;
776
+ createdBy?: string | undefined;
777
+ }, {
778
+ path?: string | undefined;
779
+ fileName?: string | undefined;
780
+ sha256sum?: string | undefined;
781
+ size?: number | undefined;
782
+ mimeType?: string | undefined;
783
+ createdBy?: string | undefined;
784
+ }>;
785
+ }, {
786
+ name: "expiresIn";
787
+ type: "Query";
788
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
789
+ }];
790
+ response: z.ZodObject<{
791
+ id: z.ZodString;
792
+ uploadUrl: z.ZodString;
793
+ expiresAt: z.ZodString;
794
+ metadata: z.ZodObject<{
795
+ id: z.ZodString;
796
+ path: z.ZodString;
797
+ workspaceId: z.ZodString;
798
+ originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
799
+ mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
800
+ size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
801
+ legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
802
+ bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
803
+ encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
804
+ createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
805
+ createdAt: z.ZodString;
806
+ deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
807
+ }, "strip", z.ZodTypeAny, {
808
+ path: string;
809
+ workspaceId: string;
810
+ id: string;
811
+ createdAt: string;
812
+ bucketName?: string | null | undefined;
813
+ size?: number | null | undefined;
814
+ mimeType?: string | null | undefined;
815
+ createdBy?: string | null | undefined;
816
+ deletedAt?: string | null | undefined;
817
+ originalFileName?: string | null | undefined;
818
+ legacyKey?: string | null | undefined;
819
+ encryptionKey?: string | null | undefined;
820
+ }, {
821
+ path: string;
822
+ workspaceId: string;
823
+ id: string;
824
+ createdAt: string;
825
+ bucketName?: string | null | undefined;
826
+ size?: number | null | undefined;
827
+ mimeType?: string | null | undefined;
828
+ createdBy?: string | null | undefined;
829
+ deletedAt?: string | null | undefined;
830
+ originalFileName?: string | null | undefined;
831
+ legacyKey?: string | null | undefined;
832
+ encryptionKey?: string | null | undefined;
833
+ }>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ id: string;
836
+ uploadUrl: string;
837
+ expiresAt: string;
838
+ metadata: {
839
+ path: string;
840
+ workspaceId: string;
841
+ id: string;
842
+ createdAt: string;
843
+ bucketName?: string | null | undefined;
844
+ size?: number | null | undefined;
845
+ mimeType?: string | null | undefined;
846
+ createdBy?: string | null | undefined;
847
+ deletedAt?: string | null | undefined;
848
+ originalFileName?: string | null | undefined;
849
+ legacyKey?: string | null | undefined;
850
+ encryptionKey?: string | null | undefined;
851
+ };
852
+ }, {
853
+ id: string;
854
+ uploadUrl: string;
855
+ expiresAt: string;
856
+ metadata: {
857
+ path: string;
858
+ workspaceId: string;
859
+ id: string;
860
+ createdAt: string;
861
+ bucketName?: string | null | undefined;
862
+ size?: number | null | undefined;
863
+ mimeType?: string | null | undefined;
864
+ createdBy?: string | null | undefined;
865
+ deletedAt?: string | null | undefined;
866
+ originalFileName?: string | null | undefined;
867
+ legacyKey?: string | null | undefined;
868
+ encryptionKey?: string | null | undefined;
869
+ };
870
+ }>;
685
871
  }, {
686
872
  method: "get";
687
873
  path: "/files/:fileId";
@@ -849,132 +1035,6 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
849
1035
  expiresAt: string | null;
850
1036
  fileId: string;
851
1037
  }>, "many">;
852
- }, {
853
- method: "post";
854
- path: "/files/:filename";
855
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
856
- requestFormat: "json";
857
- parameters: [{
858
- name: "body";
859
- type: "Body";
860
- schema: z.ZodObject<{
861
- fileName: z.ZodOptional<z.ZodString>;
862
- sha256sum: z.ZodOptional<z.ZodString>;
863
- size: z.ZodOptional<z.ZodNumber>;
864
- mimeType: z.ZodOptional<z.ZodString>;
865
- createdBy: z.ZodOptional<z.ZodString>;
866
- }, "strip", z.ZodTypeAny, {
867
- fileName?: string | undefined;
868
- sha256sum?: string | undefined;
869
- size?: number | undefined;
870
- mimeType?: string | undefined;
871
- createdBy?: string | undefined;
872
- }, {
873
- fileName?: string | undefined;
874
- sha256sum?: string | undefined;
875
- size?: number | undefined;
876
- mimeType?: string | undefined;
877
- createdBy?: string | undefined;
878
- }>;
879
- }, {
880
- name: "expiresIn";
881
- type: "Query";
882
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
883
- }, {
884
- name: "filename";
885
- type: "Path";
886
- schema: z.ZodString;
887
- }];
888
- response: z.ZodUnion<[z.ZodObject<{
889
- id: z.ZodString;
890
- uploadUrl: z.ZodString;
891
- expiresAt: z.ZodString;
892
- metadata: z.ZodObject<{
893
- id: z.ZodString;
894
- path: z.ZodString;
895
- workspaceId: z.ZodString;
896
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
897
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
898
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
899
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
900
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
901
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
902
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
903
- createdAt: z.ZodString;
904
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
905
- }, "strip", z.ZodTypeAny, {
906
- path: string;
907
- workspaceId: string;
908
- id: string;
909
- createdAt: string;
910
- bucketName?: string | null | undefined;
911
- size?: number | null | undefined;
912
- mimeType?: string | null | undefined;
913
- createdBy?: string | null | undefined;
914
- deletedAt?: string | null | undefined;
915
- originalFileName?: string | null | undefined;
916
- legacyKey?: string | null | undefined;
917
- encryptionKey?: string | null | undefined;
918
- }, {
919
- path: string;
920
- workspaceId: string;
921
- id: string;
922
- createdAt: string;
923
- bucketName?: string | null | undefined;
924
- size?: number | null | undefined;
925
- mimeType?: string | null | undefined;
926
- createdBy?: string | null | undefined;
927
- deletedAt?: string | null | undefined;
928
- originalFileName?: string | null | undefined;
929
- legacyKey?: string | null | undefined;
930
- encryptionKey?: string | null | undefined;
931
- }>;
932
- }, "strip", z.ZodTypeAny, {
933
- id: string;
934
- uploadUrl: string;
935
- expiresAt: string;
936
- metadata: {
937
- path: string;
938
- workspaceId: string;
939
- id: string;
940
- createdAt: string;
941
- bucketName?: string | null | undefined;
942
- size?: number | null | undefined;
943
- mimeType?: string | null | undefined;
944
- createdBy?: string | null | undefined;
945
- deletedAt?: string | null | undefined;
946
- originalFileName?: string | null | undefined;
947
- legacyKey?: string | null | undefined;
948
- encryptionKey?: string | null | undefined;
949
- };
950
- }, {
951
- id: string;
952
- uploadUrl: string;
953
- expiresAt: string;
954
- metadata: {
955
- path: string;
956
- workspaceId: string;
957
- id: string;
958
- createdAt: string;
959
- bucketName?: string | null | undefined;
960
- size?: number | null | undefined;
961
- mimeType?: string | null | undefined;
962
- createdBy?: string | null | undefined;
963
- deletedAt?: string | null | undefined;
964
- originalFileName?: string | null | undefined;
965
- legacyKey?: string | null | undefined;
966
- encryptionKey?: string | null | undefined;
967
- };
968
- }>, z.ZodObject<{
969
- url: z.ZodString;
970
- expiresAt: z.ZodString;
971
- }, "strip", z.ZodTypeAny, {
972
- expiresAt: string;
973
- url: string;
974
- }, {
975
- expiresAt: string;
976
- url: string;
977
- }>]>;
978
1038
  }, {
979
1039
  method: "put";
980
1040
  path: "/files/:id";
@@ -1159,14 +1219,17 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1159
1219
  size: z.ZodOptional<z.ZodNumber>;
1160
1220
  mimeType: z.ZodOptional<z.ZodString>;
1161
1221
  createdBy: z.ZodOptional<z.ZodString>;
1222
+ path: z.ZodOptional<z.ZodString>;
1162
1223
  }, "strip", z.ZodTypeAny, {
1163
1224
  fileName: string;
1225
+ path?: string | undefined;
1164
1226
  sha256sum?: string | undefined;
1165
1227
  size?: number | undefined;
1166
1228
  mimeType?: string | undefined;
1167
1229
  createdBy?: string | undefined;
1168
1230
  }, {
1169
1231
  fileName: string;
1232
+ path?: string | undefined;
1170
1233
  sha256sum?: string | undefined;
1171
1234
  size?: number | undefined;
1172
1235
  mimeType?: string | undefined;
@@ -1359,19 +1422,45 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1359
1422
  schema: z.ZodVoid;
1360
1423
  }];
1361
1424
  }, {
1362
- method: "get";
1363
- path: "/v2/files/:fileId";
1364
- description: "Get a pre-signed download URL for a file.";
1425
+ method: "post";
1426
+ path: "/v2/files";
1427
+ description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
1365
1428
  requestFormat: "json";
1366
1429
  parameters: [{
1367
- name: "fileId";
1368
- type: "Path";
1369
- schema: z.ZodString;
1430
+ name: "body";
1431
+ type: "Body";
1432
+ schema: z.ZodObject<{
1433
+ fileName: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1434
+ sha256sum: z.ZodOptional<z.ZodString>;
1435
+ size: z.ZodOptional<z.ZodNumber>;
1436
+ mimeType: z.ZodOptional<z.ZodString>;
1437
+ createdBy: z.ZodOptional<z.ZodString>;
1438
+ path: z.ZodOptional<z.ZodString>;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ path?: string | undefined;
1441
+ fileName?: string | undefined;
1442
+ sha256sum?: string | undefined;
1443
+ size?: number | undefined;
1444
+ mimeType?: string | undefined;
1445
+ createdBy?: string | undefined;
1446
+ }, {
1447
+ path?: string | undefined;
1448
+ fileName?: string | undefined;
1449
+ sha256sum?: string | undefined;
1450
+ size?: number | undefined;
1451
+ mimeType?: string | undefined;
1452
+ createdBy?: string | undefined;
1453
+ }>;
1454
+ }, {
1455
+ name: "expiresIn";
1456
+ type: "Query";
1457
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1370
1458
  }];
1371
1459
  response: z.ZodObject<{
1372
- url: z.ZodString;
1460
+ id: z.ZodString;
1461
+ uploadUrl: z.ZodString;
1373
1462
  expiresAt: z.ZodString;
1374
- metadata: z.ZodUnion<[z.ZodObject<{
1463
+ metadata: z.ZodObject<{
1375
1464
  id: z.ZodString;
1376
1465
  path: z.ZodString;
1377
1466
  workspaceId: z.ZodString;
@@ -1410,8 +1499,10 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1410
1499
  originalFileName?: string | null | undefined;
1411
1500
  legacyKey?: string | null | undefined;
1412
1501
  encryptionKey?: string | null | undefined;
1413
- }>, z.ZodNull]>;
1502
+ }>;
1414
1503
  }, "strip", z.ZodTypeAny, {
1504
+ id: string;
1505
+ uploadUrl: string;
1415
1506
  expiresAt: string;
1416
1507
  metadata: {
1417
1508
  path: string;
@@ -1426,9 +1517,10 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1426
1517
  originalFileName?: string | null | undefined;
1427
1518
  legacyKey?: string | null | undefined;
1428
1519
  encryptionKey?: string | null | undefined;
1429
- } | null;
1430
- url: string;
1520
+ };
1431
1521
  }, {
1522
+ id: string;
1523
+ uploadUrl: string;
1432
1524
  expiresAt: string;
1433
1525
  metadata: {
1434
1526
  path: string;
@@ -1443,55 +1535,22 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1443
1535
  originalFileName?: string | null | undefined;
1444
1536
  legacyKey?: string | null | undefined;
1445
1537
  encryptionKey?: string | null | undefined;
1446
- } | null;
1447
- url: string;
1538
+ };
1448
1539
  }>;
1449
- errors: [{
1450
- status: 404;
1451
- description: string;
1452
- schema: z.ZodVoid;
1453
- }];
1454
1540
  }, {
1455
- method: "post";
1456
- path: "/v2/files/:filename";
1457
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
1541
+ method: "get";
1542
+ path: "/v2/files/:fileId";
1543
+ description: "Get a pre-signed download URL for a file.";
1458
1544
  requestFormat: "json";
1459
1545
  parameters: [{
1460
- name: "body";
1461
- type: "Body";
1462
- schema: z.ZodObject<{
1463
- fileName: z.ZodOptional<z.ZodString>;
1464
- sha256sum: z.ZodOptional<z.ZodString>;
1465
- size: z.ZodOptional<z.ZodNumber>;
1466
- mimeType: z.ZodOptional<z.ZodString>;
1467
- createdBy: z.ZodOptional<z.ZodString>;
1468
- }, "strip", z.ZodTypeAny, {
1469
- fileName?: string | undefined;
1470
- sha256sum?: string | undefined;
1471
- size?: number | undefined;
1472
- mimeType?: string | undefined;
1473
- createdBy?: string | undefined;
1474
- }, {
1475
- fileName?: string | undefined;
1476
- sha256sum?: string | undefined;
1477
- size?: number | undefined;
1478
- mimeType?: string | undefined;
1479
- createdBy?: string | undefined;
1480
- }>;
1481
- }, {
1482
- name: "expiresIn";
1483
- type: "Query";
1484
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1485
- }, {
1486
- name: "filename";
1546
+ name: "fileId";
1487
1547
  type: "Path";
1488
1548
  schema: z.ZodString;
1489
1549
  }];
1490
- response: z.ZodUnion<[z.ZodObject<{
1491
- id: z.ZodString;
1492
- uploadUrl: z.ZodString;
1550
+ response: z.ZodObject<{
1551
+ url: z.ZodString;
1493
1552
  expiresAt: z.ZodString;
1494
- metadata: z.ZodObject<{
1553
+ metadata: z.ZodUnion<[z.ZodObject<{
1495
1554
  id: z.ZodString;
1496
1555
  path: z.ZodString;
1497
1556
  workspaceId: z.ZodString;
@@ -1530,10 +1589,8 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1530
1589
  originalFileName?: string | null | undefined;
1531
1590
  legacyKey?: string | null | undefined;
1532
1591
  encryptionKey?: string | null | undefined;
1533
- }>;
1592
+ }>, z.ZodNull]>;
1534
1593
  }, "strip", z.ZodTypeAny, {
1535
- id: string;
1536
- uploadUrl: string;
1537
1594
  expiresAt: string;
1538
1595
  metadata: {
1539
1596
  path: string;
@@ -1548,10 +1605,9 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1548
1605
  originalFileName?: string | null | undefined;
1549
1606
  legacyKey?: string | null | undefined;
1550
1607
  encryptionKey?: string | null | undefined;
1551
- };
1608
+ } | null;
1609
+ url: string;
1552
1610
  }, {
1553
- id: string;
1554
- uploadUrl: string;
1555
1611
  expiresAt: string;
1556
1612
  metadata: {
1557
1613
  path: string;
@@ -1566,17 +1622,14 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1566
1622
  originalFileName?: string | null | undefined;
1567
1623
  legacyKey?: string | null | undefined;
1568
1624
  encryptionKey?: string | null | undefined;
1569
- };
1570
- }>, z.ZodObject<{
1571
- url: z.ZodString;
1572
- expiresAt: z.ZodString;
1573
- }, "strip", z.ZodTypeAny, {
1574
- expiresAt: string;
1575
- url: string;
1576
- }, {
1577
- expiresAt: string;
1625
+ } | null;
1578
1626
  url: string;
1579
- }>]>;
1627
+ }>;
1628
+ errors: [{
1629
+ status: 404;
1630
+ description: string;
1631
+ schema: z.ZodVoid;
1632
+ }];
1580
1633
  }, {
1581
1634
  method: "put";
1582
1635
  path: "/v2/files/:id";
@@ -1761,14 +1814,17 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1761
1814
  size: z.ZodOptional<z.ZodNumber>;
1762
1815
  mimeType: z.ZodOptional<z.ZodString>;
1763
1816
  createdBy: z.ZodOptional<z.ZodString>;
1817
+ path: z.ZodOptional<z.ZodString>;
1764
1818
  }, "strip", z.ZodTypeAny, {
1765
1819
  fileName: string;
1820
+ path?: string | undefined;
1766
1821
  sha256sum?: string | undefined;
1767
1822
  size?: number | undefined;
1768
1823
  mimeType?: string | undefined;
1769
1824
  createdBy?: string | undefined;
1770
1825
  }, {
1771
1826
  fileName: string;
1827
+ path?: string | undefined;
1772
1828
  sha256sum?: string | undefined;
1773
1829
  size?: number | undefined;
1774
1830
  mimeType?: string | undefined;
@@ -1894,7 +1950,22 @@ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zod
1894
1950
  }>]>;
1895
1951
  }]>;
1896
1952
 
1897
- declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.ZodiosInstance<[{
1953
+ /**
1954
+ * Creates a vault client that automatically adds authentication and compatibility date headers to the request.
1955
+ *
1956
+ * Usage of this client is encouraged over the raw createApiClient function.
1957
+ *
1958
+ * Added headers:
1959
+ * - Authorization: The token to use for the request.
1960
+ * - User-Agent: The user agent to use for the request.
1961
+ * - X-Compatibility-Date: The compatibility date to use for the request.
1962
+ *
1963
+ * @param vaultUrl - The URL of the vault service.
1964
+ * @param token - The token to use for the request.
1965
+ * @param headerOverrides - Additional headers to add to the request, or override existing headers (**case-sensitive**).
1966
+ * @returns The vault client.
1967
+ */
1968
+ declare function useVaultClient(vaultUrl: string, token: string, headerOverrides?: Record<string, string>): _zodios_core.ZodiosInstance<[{
1898
1969
  method: "get";
1899
1970
  path: "/_/files";
1900
1971
  description: "Get a list of files.";
@@ -1990,14 +2061,17 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
1990
2061
  size: zod.ZodOptional<zod.ZodNumber>;
1991
2062
  mimeType: zod.ZodOptional<zod.ZodString>;
1992
2063
  createdBy: zod.ZodOptional<zod.ZodString>;
2064
+ path: zod.ZodOptional<zod.ZodString>;
1993
2065
  }, "strip", zod.ZodTypeAny, {
1994
2066
  fileName: string;
2067
+ path?: string | undefined;
1995
2068
  size?: number | undefined;
1996
2069
  createdBy?: string | undefined;
1997
2070
  sha256sum?: string | undefined;
1998
2071
  mimeType?: string | undefined;
1999
2072
  }, {
2000
2073
  fileName: string;
2074
+ path?: string | undefined;
2001
2075
  size?: number | undefined;
2002
2076
  createdBy?: string | undefined;
2003
2077
  sha256sum?: string | undefined;
@@ -2203,6 +2277,73 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
2203
2277
  description: string;
2204
2278
  schema: zod.ZodVoid;
2205
2279
  }];
2280
+ }, {
2281
+ method: "post";
2282
+ path: "/_/files/:fileId/copy";
2283
+ description: "Copy a file from one workspace to another.";
2284
+ requestFormat: "json";
2285
+ parameters: [{
2286
+ name: "sourceWorkspaceId";
2287
+ type: "Query";
2288
+ schema: zod.ZodString;
2289
+ }, {
2290
+ name: "destinationWorkspaceId";
2291
+ type: "Query";
2292
+ schema: zod.ZodString;
2293
+ }, {
2294
+ name: "fileId";
2295
+ type: "Path";
2296
+ schema: zod.ZodString;
2297
+ }];
2298
+ response: zod.ZodObject<{
2299
+ id: zod.ZodString;
2300
+ path: zod.ZodString;
2301
+ workspaceId: zod.ZodString;
2302
+ originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2303
+ mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2304
+ size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2305
+ legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2306
+ bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2307
+ encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2308
+ createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2309
+ createdAt: zod.ZodString;
2310
+ deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2311
+ }, "strip", zod.ZodTypeAny, {
2312
+ path: string;
2313
+ workspaceId: string;
2314
+ id: string;
2315
+ createdAt: string;
2316
+ deletedAt?: string | null | undefined;
2317
+ originalFileName?: string | null | undefined;
2318
+ size?: number | null | undefined;
2319
+ createdBy?: string | null | undefined;
2320
+ mimeType?: string | null | undefined;
2321
+ legacyKey?: string | null | undefined;
2322
+ bucketName?: string | null | undefined;
2323
+ encryptionKey?: string | null | undefined;
2324
+ }, {
2325
+ path: string;
2326
+ workspaceId: string;
2327
+ id: string;
2328
+ createdAt: string;
2329
+ deletedAt?: string | null | undefined;
2330
+ originalFileName?: string | null | undefined;
2331
+ size?: number | null | undefined;
2332
+ createdBy?: string | null | undefined;
2333
+ mimeType?: string | null | undefined;
2334
+ legacyKey?: string | null | undefined;
2335
+ bucketName?: string | null | undefined;
2336
+ encryptionKey?: string | null | undefined;
2337
+ }>;
2338
+ errors: [{
2339
+ status: 404;
2340
+ description: string;
2341
+ schema: zod.ZodVoid;
2342
+ }, {
2343
+ status: 409;
2344
+ description: string;
2345
+ schema: zod.ZodVoid;
2346
+ }];
2206
2347
  }, {
2207
2348
  method: "put";
2208
2349
  path: "/_/files/:id";
@@ -2573,6 +2714,122 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
2573
2714
  keyArns: string[];
2574
2715
  defaultS3LinkTtl: number;
2575
2716
  }>;
2717
+ }, {
2718
+ method: "post";
2719
+ path: "/files";
2720
+ description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
2721
+ requestFormat: "json";
2722
+ parameters: [{
2723
+ name: "body";
2724
+ type: "Body";
2725
+ schema: zod.ZodObject<{
2726
+ fileName: zod.ZodOptional<zod.ZodDefault<zod.ZodString>>;
2727
+ sha256sum: zod.ZodOptional<zod.ZodString>;
2728
+ size: zod.ZodOptional<zod.ZodNumber>;
2729
+ mimeType: zod.ZodOptional<zod.ZodString>;
2730
+ createdBy: zod.ZodOptional<zod.ZodString>;
2731
+ path: zod.ZodOptional<zod.ZodString>;
2732
+ }, "strip", zod.ZodTypeAny, {
2733
+ path?: string | undefined;
2734
+ size?: number | undefined;
2735
+ createdBy?: string | undefined;
2736
+ fileName?: string | undefined;
2737
+ sha256sum?: string | undefined;
2738
+ mimeType?: string | undefined;
2739
+ }, {
2740
+ path?: string | undefined;
2741
+ size?: number | undefined;
2742
+ createdBy?: string | undefined;
2743
+ fileName?: string | undefined;
2744
+ sha256sum?: string | undefined;
2745
+ mimeType?: string | undefined;
2746
+ }>;
2747
+ }, {
2748
+ name: "expiresIn";
2749
+ type: "Query";
2750
+ schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2751
+ }];
2752
+ response: zod.ZodObject<{
2753
+ id: zod.ZodString;
2754
+ uploadUrl: zod.ZodString;
2755
+ expiresAt: zod.ZodString;
2756
+ metadata: zod.ZodObject<{
2757
+ id: zod.ZodString;
2758
+ path: zod.ZodString;
2759
+ workspaceId: zod.ZodString;
2760
+ originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2761
+ mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2762
+ size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2763
+ legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2764
+ bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2765
+ encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2766
+ createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2767
+ createdAt: zod.ZodString;
2768
+ deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2769
+ }, "strip", zod.ZodTypeAny, {
2770
+ path: string;
2771
+ workspaceId: string;
2772
+ id: string;
2773
+ createdAt: string;
2774
+ deletedAt?: string | null | undefined;
2775
+ originalFileName?: string | null | undefined;
2776
+ size?: number | null | undefined;
2777
+ createdBy?: string | null | undefined;
2778
+ mimeType?: string | null | undefined;
2779
+ legacyKey?: string | null | undefined;
2780
+ bucketName?: string | null | undefined;
2781
+ encryptionKey?: string | null | undefined;
2782
+ }, {
2783
+ path: string;
2784
+ workspaceId: string;
2785
+ id: string;
2786
+ createdAt: string;
2787
+ deletedAt?: string | null | undefined;
2788
+ originalFileName?: string | null | undefined;
2789
+ size?: number | null | undefined;
2790
+ createdBy?: string | null | undefined;
2791
+ mimeType?: string | null | undefined;
2792
+ legacyKey?: string | null | undefined;
2793
+ bucketName?: string | null | undefined;
2794
+ encryptionKey?: string | null | undefined;
2795
+ }>;
2796
+ }, "strip", zod.ZodTypeAny, {
2797
+ id: string;
2798
+ uploadUrl: string;
2799
+ expiresAt: string;
2800
+ metadata: {
2801
+ path: string;
2802
+ workspaceId: string;
2803
+ id: string;
2804
+ createdAt: string;
2805
+ deletedAt?: string | null | undefined;
2806
+ originalFileName?: string | null | undefined;
2807
+ size?: number | null | undefined;
2808
+ createdBy?: string | null | undefined;
2809
+ mimeType?: string | null | undefined;
2810
+ legacyKey?: string | null | undefined;
2811
+ bucketName?: string | null | undefined;
2812
+ encryptionKey?: string | null | undefined;
2813
+ };
2814
+ }, {
2815
+ id: string;
2816
+ uploadUrl: string;
2817
+ expiresAt: string;
2818
+ metadata: {
2819
+ path: string;
2820
+ workspaceId: string;
2821
+ id: string;
2822
+ createdAt: string;
2823
+ deletedAt?: string | null | undefined;
2824
+ originalFileName?: string | null | undefined;
2825
+ size?: number | null | undefined;
2826
+ createdBy?: string | null | undefined;
2827
+ mimeType?: string | null | undefined;
2828
+ legacyKey?: string | null | undefined;
2829
+ bucketName?: string | null | undefined;
2830
+ encryptionKey?: string | null | undefined;
2831
+ };
2832
+ }>;
2576
2833
  }, {
2577
2834
  method: "get";
2578
2835
  path: "/files/:fileId";
@@ -2740,132 +2997,6 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
2740
2997
  expiresAt: string | null;
2741
2998
  fileId: string;
2742
2999
  }>, "many">;
2743
- }, {
2744
- method: "post";
2745
- path: "/files/:filename";
2746
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
2747
- requestFormat: "json";
2748
- parameters: [{
2749
- name: "body";
2750
- type: "Body";
2751
- schema: zod.ZodObject<{
2752
- fileName: zod.ZodOptional<zod.ZodString>;
2753
- sha256sum: zod.ZodOptional<zod.ZodString>;
2754
- size: zod.ZodOptional<zod.ZodNumber>;
2755
- mimeType: zod.ZodOptional<zod.ZodString>;
2756
- createdBy: zod.ZodOptional<zod.ZodString>;
2757
- }, "strip", zod.ZodTypeAny, {
2758
- size?: number | undefined;
2759
- createdBy?: string | undefined;
2760
- fileName?: string | undefined;
2761
- sha256sum?: string | undefined;
2762
- mimeType?: string | undefined;
2763
- }, {
2764
- size?: number | undefined;
2765
- createdBy?: string | undefined;
2766
- fileName?: string | undefined;
2767
- sha256sum?: string | undefined;
2768
- mimeType?: string | undefined;
2769
- }>;
2770
- }, {
2771
- name: "expiresIn";
2772
- type: "Query";
2773
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2774
- }, {
2775
- name: "filename";
2776
- type: "Path";
2777
- schema: zod.ZodString;
2778
- }];
2779
- response: zod.ZodUnion<[zod.ZodObject<{
2780
- id: zod.ZodString;
2781
- uploadUrl: zod.ZodString;
2782
- expiresAt: zod.ZodString;
2783
- metadata: zod.ZodObject<{
2784
- id: zod.ZodString;
2785
- path: zod.ZodString;
2786
- workspaceId: zod.ZodString;
2787
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2788
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2789
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2790
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2791
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2792
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2793
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2794
- createdAt: zod.ZodString;
2795
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2796
- }, "strip", zod.ZodTypeAny, {
2797
- path: string;
2798
- workspaceId: string;
2799
- id: string;
2800
- createdAt: string;
2801
- deletedAt?: string | null | undefined;
2802
- originalFileName?: string | null | undefined;
2803
- size?: number | null | undefined;
2804
- createdBy?: string | null | undefined;
2805
- mimeType?: string | null | undefined;
2806
- legacyKey?: string | null | undefined;
2807
- bucketName?: string | null | undefined;
2808
- encryptionKey?: string | null | undefined;
2809
- }, {
2810
- path: string;
2811
- workspaceId: string;
2812
- id: string;
2813
- createdAt: string;
2814
- deletedAt?: string | null | undefined;
2815
- originalFileName?: string | null | undefined;
2816
- size?: number | null | undefined;
2817
- createdBy?: string | null | undefined;
2818
- mimeType?: string | null | undefined;
2819
- legacyKey?: string | null | undefined;
2820
- bucketName?: string | null | undefined;
2821
- encryptionKey?: string | null | undefined;
2822
- }>;
2823
- }, "strip", zod.ZodTypeAny, {
2824
- id: string;
2825
- uploadUrl: string;
2826
- expiresAt: string;
2827
- metadata: {
2828
- path: string;
2829
- workspaceId: string;
2830
- id: string;
2831
- createdAt: string;
2832
- deletedAt?: string | null | undefined;
2833
- originalFileName?: string | null | undefined;
2834
- size?: number | null | undefined;
2835
- createdBy?: string | null | undefined;
2836
- mimeType?: string | null | undefined;
2837
- legacyKey?: string | null | undefined;
2838
- bucketName?: string | null | undefined;
2839
- encryptionKey?: string | null | undefined;
2840
- };
2841
- }, {
2842
- id: string;
2843
- uploadUrl: string;
2844
- expiresAt: string;
2845
- metadata: {
2846
- path: string;
2847
- workspaceId: string;
2848
- id: string;
2849
- createdAt: string;
2850
- deletedAt?: string | null | undefined;
2851
- originalFileName?: string | null | undefined;
2852
- size?: number | null | undefined;
2853
- createdBy?: string | null | undefined;
2854
- mimeType?: string | null | undefined;
2855
- legacyKey?: string | null | undefined;
2856
- bucketName?: string | null | undefined;
2857
- encryptionKey?: string | null | undefined;
2858
- };
2859
- }>, zod.ZodObject<{
2860
- url: zod.ZodString;
2861
- expiresAt: zod.ZodString;
2862
- }, "strip", zod.ZodTypeAny, {
2863
- expiresAt: string;
2864
- url: string;
2865
- }, {
2866
- expiresAt: string;
2867
- url: string;
2868
- }>]>;
2869
3000
  }, {
2870
3001
  method: "put";
2871
3002
  path: "/files/:id";
@@ -3050,14 +3181,17 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3050
3181
  size: zod.ZodOptional<zod.ZodNumber>;
3051
3182
  mimeType: zod.ZodOptional<zod.ZodString>;
3052
3183
  createdBy: zod.ZodOptional<zod.ZodString>;
3184
+ path: zod.ZodOptional<zod.ZodString>;
3053
3185
  }, "strip", zod.ZodTypeAny, {
3054
3186
  fileName: string;
3187
+ path?: string | undefined;
3055
3188
  size?: number | undefined;
3056
3189
  createdBy?: string | undefined;
3057
3190
  sha256sum?: string | undefined;
3058
3191
  mimeType?: string | undefined;
3059
3192
  }, {
3060
3193
  fileName: string;
3194
+ path?: string | undefined;
3061
3195
  size?: number | undefined;
3062
3196
  createdBy?: string | undefined;
3063
3197
  sha256sum?: string | undefined;
@@ -3250,19 +3384,45 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3250
3384
  schema: zod.ZodVoid;
3251
3385
  }];
3252
3386
  }, {
3253
- method: "get";
3254
- path: "/v2/files/:fileId";
3255
- description: "Get a pre-signed download URL for a file.";
3387
+ method: "post";
3388
+ path: "/v2/files";
3389
+ description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
3256
3390
  requestFormat: "json";
3257
3391
  parameters: [{
3258
- name: "fileId";
3259
- type: "Path";
3260
- schema: zod.ZodString;
3392
+ name: "body";
3393
+ type: "Body";
3394
+ schema: zod.ZodObject<{
3395
+ fileName: zod.ZodOptional<zod.ZodDefault<zod.ZodString>>;
3396
+ sha256sum: zod.ZodOptional<zod.ZodString>;
3397
+ size: zod.ZodOptional<zod.ZodNumber>;
3398
+ mimeType: zod.ZodOptional<zod.ZodString>;
3399
+ createdBy: zod.ZodOptional<zod.ZodString>;
3400
+ path: zod.ZodOptional<zod.ZodString>;
3401
+ }, "strip", zod.ZodTypeAny, {
3402
+ path?: string | undefined;
3403
+ size?: number | undefined;
3404
+ createdBy?: string | undefined;
3405
+ fileName?: string | undefined;
3406
+ sha256sum?: string | undefined;
3407
+ mimeType?: string | undefined;
3408
+ }, {
3409
+ path?: string | undefined;
3410
+ size?: number | undefined;
3411
+ createdBy?: string | undefined;
3412
+ fileName?: string | undefined;
3413
+ sha256sum?: string | undefined;
3414
+ mimeType?: string | undefined;
3415
+ }>;
3416
+ }, {
3417
+ name: "expiresIn";
3418
+ type: "Query";
3419
+ schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
3261
3420
  }];
3262
3421
  response: zod.ZodObject<{
3263
- url: zod.ZodString;
3422
+ id: zod.ZodString;
3423
+ uploadUrl: zod.ZodString;
3264
3424
  expiresAt: zod.ZodString;
3265
- metadata: zod.ZodUnion<[zod.ZodObject<{
3425
+ metadata: zod.ZodObject<{
3266
3426
  id: zod.ZodString;
3267
3427
  path: zod.ZodString;
3268
3428
  workspaceId: zod.ZodString;
@@ -3301,8 +3461,10 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3301
3461
  legacyKey?: string | null | undefined;
3302
3462
  bucketName?: string | null | undefined;
3303
3463
  encryptionKey?: string | null | undefined;
3304
- }>, zod.ZodNull]>;
3464
+ }>;
3305
3465
  }, "strip", zod.ZodTypeAny, {
3466
+ id: string;
3467
+ uploadUrl: string;
3306
3468
  expiresAt: string;
3307
3469
  metadata: {
3308
3470
  path: string;
@@ -3317,9 +3479,10 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3317
3479
  legacyKey?: string | null | undefined;
3318
3480
  bucketName?: string | null | undefined;
3319
3481
  encryptionKey?: string | null | undefined;
3320
- } | null;
3321
- url: string;
3482
+ };
3322
3483
  }, {
3484
+ id: string;
3485
+ uploadUrl: string;
3323
3486
  expiresAt: string;
3324
3487
  metadata: {
3325
3488
  path: string;
@@ -3334,55 +3497,22 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3334
3497
  legacyKey?: string | null | undefined;
3335
3498
  bucketName?: string | null | undefined;
3336
3499
  encryptionKey?: string | null | undefined;
3337
- } | null;
3338
- url: string;
3500
+ };
3339
3501
  }>;
3340
- errors: [{
3341
- status: 404;
3342
- description: string;
3343
- schema: zod.ZodVoid;
3344
- }];
3345
3502
  }, {
3346
- method: "post";
3347
- path: "/v2/files/:filename";
3348
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
3503
+ method: "get";
3504
+ path: "/v2/files/:fileId";
3505
+ description: "Get a pre-signed download URL for a file.";
3349
3506
  requestFormat: "json";
3350
3507
  parameters: [{
3351
- name: "body";
3352
- type: "Body";
3353
- schema: zod.ZodObject<{
3354
- fileName: zod.ZodOptional<zod.ZodString>;
3355
- sha256sum: zod.ZodOptional<zod.ZodString>;
3356
- size: zod.ZodOptional<zod.ZodNumber>;
3357
- mimeType: zod.ZodOptional<zod.ZodString>;
3358
- createdBy: zod.ZodOptional<zod.ZodString>;
3359
- }, "strip", zod.ZodTypeAny, {
3360
- size?: number | undefined;
3361
- createdBy?: string | undefined;
3362
- fileName?: string | undefined;
3363
- sha256sum?: string | undefined;
3364
- mimeType?: string | undefined;
3365
- }, {
3366
- size?: number | undefined;
3367
- createdBy?: string | undefined;
3368
- fileName?: string | undefined;
3369
- sha256sum?: string | undefined;
3370
- mimeType?: string | undefined;
3371
- }>;
3372
- }, {
3373
- name: "expiresIn";
3374
- type: "Query";
3375
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
3376
- }, {
3377
- name: "filename";
3508
+ name: "fileId";
3378
3509
  type: "Path";
3379
3510
  schema: zod.ZodString;
3380
3511
  }];
3381
- response: zod.ZodUnion<[zod.ZodObject<{
3382
- id: zod.ZodString;
3383
- uploadUrl: zod.ZodString;
3512
+ response: zod.ZodObject<{
3513
+ url: zod.ZodString;
3384
3514
  expiresAt: zod.ZodString;
3385
- metadata: zod.ZodObject<{
3515
+ metadata: zod.ZodUnion<[zod.ZodObject<{
3386
3516
  id: zod.ZodString;
3387
3517
  path: zod.ZodString;
3388
3518
  workspaceId: zod.ZodString;
@@ -3421,10 +3551,8 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3421
3551
  legacyKey?: string | null | undefined;
3422
3552
  bucketName?: string | null | undefined;
3423
3553
  encryptionKey?: string | null | undefined;
3424
- }>;
3554
+ }>, zod.ZodNull]>;
3425
3555
  }, "strip", zod.ZodTypeAny, {
3426
- id: string;
3427
- uploadUrl: string;
3428
3556
  expiresAt: string;
3429
3557
  metadata: {
3430
3558
  path: string;
@@ -3439,10 +3567,9 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3439
3567
  legacyKey?: string | null | undefined;
3440
3568
  bucketName?: string | null | undefined;
3441
3569
  encryptionKey?: string | null | undefined;
3442
- };
3570
+ } | null;
3571
+ url: string;
3443
3572
  }, {
3444
- id: string;
3445
- uploadUrl: string;
3446
3573
  expiresAt: string;
3447
3574
  metadata: {
3448
3575
  path: string;
@@ -3457,17 +3584,14 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3457
3584
  legacyKey?: string | null | undefined;
3458
3585
  bucketName?: string | null | undefined;
3459
3586
  encryptionKey?: string | null | undefined;
3460
- };
3461
- }>, zod.ZodObject<{
3462
- url: zod.ZodString;
3463
- expiresAt: zod.ZodString;
3464
- }, "strip", zod.ZodTypeAny, {
3465
- expiresAt: string;
3466
- url: string;
3467
- }, {
3468
- expiresAt: string;
3587
+ } | null;
3469
3588
  url: string;
3470
- }>]>;
3589
+ }>;
3590
+ errors: [{
3591
+ status: 404;
3592
+ description: string;
3593
+ schema: zod.ZodVoid;
3594
+ }];
3471
3595
  }, {
3472
3596
  method: "put";
3473
3597
  path: "/v2/files/:id";
@@ -3652,14 +3776,17 @@ declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.Z
3652
3776
  size: zod.ZodOptional<zod.ZodNumber>;
3653
3777
  mimeType: zod.ZodOptional<zod.ZodString>;
3654
3778
  createdBy: zod.ZodOptional<zod.ZodString>;
3779
+ path: zod.ZodOptional<zod.ZodString>;
3655
3780
  }, "strip", zod.ZodTypeAny, {
3656
3781
  fileName: string;
3782
+ path?: string | undefined;
3657
3783
  size?: number | undefined;
3658
3784
  createdBy?: string | undefined;
3659
3785
  sha256sum?: string | undefined;
3660
3786
  mimeType?: string | undefined;
3661
3787
  }, {
3662
3788
  fileName: string;
3789
+ path?: string | undefined;
3663
3790
  size?: number | undefined;
3664
3791
  createdBy?: string | undefined;
3665
3792
  sha256sum?: string | undefined;