@meistrari/vault-http-client 2.3.2 → 2.3.4

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.mjs CHANGED
@@ -5,14 +5,14 @@ const put_WorkspacesByWorkspaceIdSettings_Body = z.object({
5
5
  bucketName: z.string().min(1),
6
6
  keyArns: z.array(z.string()).min(1),
7
7
  defaultS3LinkTtl: z.number().gte(1)
8
- }).strict();
8
+ });
9
9
  const post_Files_Body = z.object({
10
10
  fileName: z.string(),
11
11
  sha256sum: z.string().optional(),
12
12
  size: z.number().optional(),
13
13
  mimeType: z.string().optional(),
14
14
  createdBy: z.string().optional()
15
- }).strict();
15
+ });
16
16
  const postFilesBulk_Body = z.union([
17
17
  z.array(
18
18
  z.object({
@@ -21,9 +21,9 @@ const postFilesBulk_Body = z.union([
21
21
  size: z.number().optional(),
22
22
  mimeType: z.string().optional(),
23
23
  createdBy: z.string().optional()
24
- }).strict()
24
+ })
25
25
  ),
26
- z.object({ files: z.array(z.string()) }).strict()
26
+ z.object({ files: z.array(z.string()) })
27
27
  ]);
28
28
  const postFilesByFilename_Body = z.object({
29
29
  fileName: z.string(),
@@ -31,7 +31,7 @@ const postFilesByFilename_Body = z.object({
31
31
  size: z.number(),
32
32
  mimeType: z.string(),
33
33
  createdBy: z.string()
34
- }).partial().strict();
34
+ }).partial();
35
35
  const endpoints = makeApi([
36
36
  {
37
37
  method: "get",
@@ -47,7 +47,7 @@ const endpoints = makeApi([
47
47
  {
48
48
  name: "includeDeleted",
49
49
  type: "Query",
50
- schema: z.boolean().optional().default(false)
50
+ schema: z.enum(["true", "false"]).optional().default("false")
51
51
  },
52
52
  {
53
53
  name: "limit",
@@ -82,12 +82,13 @@ const endpoints = makeApi([
82
82
  originalFileName: z.union([z.string(), z.null()]).optional(),
83
83
  size: z.union([z.number(), z.null()]).optional(),
84
84
  createdAt: z.string(),
85
- createdBy: z.union([z.string(), z.null()]).optional()
86
- }).strict()
85
+ createdBy: z.union([z.string(), z.null()]).optional(),
86
+ deletedAt: z.union([z.string(), z.null()]).optional()
87
+ })
87
88
  ),
88
89
  count: z.number(),
89
90
  pages: z.number()
90
- }).strict()
91
+ })
91
92
  },
92
93
  {
93
94
  method: "post",
@@ -136,12 +137,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
136
137
  createdBy: z.union([z.string(), z.null()]).optional(),
137
138
  createdAt: z.string(),
138
139
  deletedAt: z.union([z.string(), z.null()]).optional()
139
- }).strict()
140
- }).strict(),
140
+ })
141
+ }),
141
142
  z.object({
142
143
  url: z.string(),
143
144
  expiresAt: z.string().datetime({ offset: true })
144
- }).strict()
145
+ })
145
146
  ])
146
147
  },
147
148
  {
@@ -183,10 +184,10 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
183
184
  createdBy: z.union([z.string(), z.null()]).optional(),
184
185
  createdAt: z.string(),
185
186
  deletedAt: z.union([z.string(), z.null()]).optional()
186
- }).strict(),
187
+ }),
187
188
  z.null()
188
189
  ])
189
- }).strict(),
190
+ }),
190
191
  errors: [
191
192
  {
192
193
  status: 404,
@@ -235,12 +236,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
235
236
  createdBy: z.union([z.string(), z.null()]).optional(),
236
237
  createdAt: z.string(),
237
238
  deletedAt: z.union([z.string(), z.null()]).optional()
238
- }).strict()
239
- }).strict(),
239
+ })
240
+ }),
240
241
  z.object({
241
242
  url: z.string().url(),
242
243
  expiresAt: z.string().datetime({ offset: true })
243
- }).strict()
244
+ })
244
245
  ])
245
246
  },
246
247
  {
@@ -292,7 +293,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
292
293
  createdBy: z.union([z.string(), z.null()]).optional(),
293
294
  createdAt: z.string(),
294
295
  deletedAt: z.union([z.string(), z.null()]).optional()
295
- }).strict(),
296
+ }),
296
297
  errors: [
297
298
  {
298
299
  status: 404,
@@ -312,9 +313,16 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
312
313
  files: z.number(),
313
314
  permalinks: z.number(),
314
315
  hasCustomSettings: z.boolean()
315
- }).strict()
316
+ })
316
317
  )
317
318
  },
319
+ {
320
+ method: "get",
321
+ path: "/_/files/count",
322
+ description: `Get the total count of active files across all workspaces`,
323
+ requestFormat: "json",
324
+ response: z.object({ count: z.number() })
325
+ },
318
326
  {
319
327
  method: "put",
320
328
  path: "/_/workspaces/:workspaceId/settings",
@@ -357,7 +365,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
357
365
  bucketName: z.string().min(1),
358
366
  keyArns: z.array(z.string()).min(1),
359
367
  defaultS3LinkTtl: z.number().gte(1)
360
- }).strict()
368
+ })
361
369
  },
362
370
  {
363
371
  method: "get",
@@ -388,10 +396,10 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
388
396
  createdBy: z.union([z.string(), z.null()]).optional(),
389
397
  createdAt: z.string(),
390
398
  deletedAt: z.union([z.string(), z.null()]).optional()
391
- }).strict(),
399
+ }),
392
400
  z.null()
393
401
  ])
394
- }).strict(),
402
+ }),
395
403
  errors: [
396
404
  {
397
405
  status: 404,
@@ -412,7 +420,7 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
412
420
  {
413
421
  name: "body",
414
422
  type: "Body",
415
- schema: z.object({ expiresAt: z.string().datetime({ offset: true }) }).partial().strict()
423
+ schema: z.object({ expiresAt: z.string().datetime({ offset: true }) }).partial()
416
424
  },
417
425
  {
418
426
  name: "fileId",
@@ -427,7 +435,7 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
427
435
  createdAt: z.string(),
428
436
  expiresAt: z.union([z.string(), z.null()]),
429
437
  createdBy: z.union([z.string(), z.null()])
430
- }).strict()
438
+ })
431
439
  },
432
440
  {
433
441
  method: "get",
@@ -449,7 +457,7 @@ The returned permalink ID should be used with the `/permalinks/:permalinkId
449
457
  createdAt: z.string(),
450
458
  expiresAt: z.union([z.string(), z.null()]),
451
459
  createdBy: z.union([z.string(), z.null()])
452
- }).strict()
460
+ })
453
461
  )
454
462
  },
455
463
  {
@@ -499,12 +507,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
499
507
  createdBy: z.union([z.string(), z.null()]).optional(),
500
508
  createdAt: z.string(),
501
509
  deletedAt: z.union([z.string(), z.null()]).optional()
502
- }).strict()
503
- }).strict(),
510
+ })
511
+ }),
504
512
  z.object({
505
513
  url: z.string(),
506
514
  expiresAt: z.string().datetime({ offset: true })
507
- }).strict()
515
+ })
508
516
  ])
509
517
  },
510
518
  {
@@ -542,12 +550,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
542
550
  createdBy: z.union([z.string(), z.null()]).optional(),
543
551
  createdAt: z.string(),
544
552
  deletedAt: z.union([z.string(), z.null()]).optional()
545
- }).strict()
546
- }).strict(),
553
+ })
554
+ }),
547
555
  z.object({
548
556
  url: z.string().url(),
549
557
  expiresAt: z.string().datetime({ offset: true })
550
- }).strict()
558
+ })
551
559
  ])
552
560
  },
553
561
  {
@@ -589,7 +597,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
589
597
  createdBy: z.union([z.string(), z.null()]).optional(),
590
598
  createdAt: z.string(),
591
599
  deletedAt: z.union([z.string(), z.null()]).optional()
592
- }).strict(),
600
+ }),
593
601
  errors: [
594
602
  {
595
603
  status: 404,
@@ -625,7 +633,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
625
633
  createdBy: z.union([z.string(), z.null()]).optional(),
626
634
  createdAt: z.string(),
627
635
  deletedAt: z.union([z.string(), z.null()]).optional()
628
- }).strict()
636
+ })
629
637
  ),
630
638
  z.object({
631
639
  files: z.array(
@@ -642,9 +650,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
642
650
  createdBy: z.union([z.string(), z.null()]).optional(),
643
651
  createdAt: z.string(),
644
652
  deletedAt: z.union([z.string(), z.null()]).optional()
645
- }).strict()
653
+ })
646
654
  )
647
- }).strict()
655
+ })
648
656
  ])
649
657
  },
650
658
  {
@@ -709,7 +717,7 @@ Make sure to follow redirects to the actual file download URL.
709
717
  createdAt: z.string(),
710
718
  expiresAt: z.union([z.string(), z.null()]),
711
719
  createdBy: z.union([z.string(), z.null()])
712
- }).strict(),
720
+ }),
713
721
  errors: [
714
722
  {
715
723
  status: 404,
@@ -747,10 +755,10 @@ Make sure to follow redirects to the actual file download URL.
747
755
  createdBy: z.union([z.string(), z.null()]).optional(),
748
756
  createdAt: z.string(),
749
757
  deletedAt: z.union([z.string(), z.null()]).optional()
750
- }).strict(),
758
+ }),
751
759
  z.null()
752
760
  ])
753
- }).strict(),
761
+ }),
754
762
  errors: [
755
763
  {
756
764
  status: 404,
@@ -806,12 +814,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
806
814
  createdBy: z.union([z.string(), z.null()]).optional(),
807
815
  createdAt: z.string(),
808
816
  deletedAt: z.union([z.string(), z.null()]).optional()
809
- }).strict()
810
- }).strict(),
817
+ })
818
+ }),
811
819
  z.object({
812
820
  url: z.string(),
813
821
  expiresAt: z.string().datetime({ offset: true })
814
- }).strict()
822
+ })
815
823
  ])
816
824
  },
817
825
  {
@@ -849,12 +857,12 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
849
857
  createdBy: z.union([z.string(), z.null()]).optional(),
850
858
  createdAt: z.string(),
851
859
  deletedAt: z.union([z.string(), z.null()]).optional()
852
- }).strict()
853
- }).strict(),
860
+ })
861
+ }),
854
862
  z.object({
855
863
  url: z.string().url(),
856
864
  expiresAt: z.string().datetime({ offset: true })
857
- }).strict()
865
+ })
858
866
  ])
859
867
  },
860
868
  {
@@ -896,7 +904,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
896
904
  createdBy: z.union([z.string(), z.null()]).optional(),
897
905
  createdAt: z.string(),
898
906
  deletedAt: z.union([z.string(), z.null()]).optional()
899
- }).strict(),
907
+ }),
900
908
  errors: [
901
909
  {
902
910
  status: 404,
@@ -932,7 +940,7 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
932
940
  createdBy: z.union([z.string(), z.null()]).optional(),
933
941
  createdAt: z.string(),
934
942
  deletedAt: z.union([z.string(), z.null()]).optional()
935
- }).strict()
943
+ })
936
944
  ),
937
945
  z.object({
938
946
  files: z.array(
@@ -949,9 +957,9 @@ The returned `uploadUrl` is valid for 1 hour by default. You can chang
949
957
  createdBy: z.union([z.string(), z.null()]).optional(),
950
958
  createdAt: z.string(),
951
959
  deletedAt: z.union([z.string(), z.null()]).optional()
952
- }).strict()
960
+ })
953
961
  )
954
- }).strict()
962
+ })
955
963
  ])
956
964
  }
957
965
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/vault-http-client",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "types": "dist/index.d.ts",
5
5
  "exports": {
6
6
  ".": {