@homeflare/distilled-proxmox-backup 0.2.0 → 0.3.1

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.
Files changed (53) hide show
  1. package/README.md +19 -17
  2. package/dist/errors.d.ts +6 -5
  3. package/dist/errors.d.ts.map +1 -1
  4. package/dist/errors.js.map +1 -1
  5. package/dist/missing-resource.test.d.ts +2 -0
  6. package/dist/missing-resource.test.d.ts.map +1 -0
  7. package/dist/missing-resource.test.js +62 -0
  8. package/dist/missing-resource.test.js.map +1 -0
  9. package/dist/protocol-boundaries.test.d.ts +2 -0
  10. package/dist/protocol-boundaries.test.d.ts.map +1 -0
  11. package/dist/protocol-boundaries.test.js +50 -0
  12. package/dist/protocol-boundaries.test.js.map +1 -0
  13. package/dist/protocol-codecs.d.ts +23 -0
  14. package/dist/protocol-codecs.d.ts.map +1 -0
  15. package/dist/protocol-codecs.js +49 -0
  16. package/dist/protocol-codecs.js.map +1 -0
  17. package/dist/protocol-codecs.test.d.ts +2 -0
  18. package/dist/protocol-codecs.test.d.ts.map +1 -0
  19. package/dist/protocol-codecs.test.js +58 -0
  20. package/dist/protocol-codecs.test.js.map +1 -0
  21. package/dist/protocol-raw-root.test.d.ts +2 -0
  22. package/dist/protocol-raw-root.test.d.ts.map +1 -0
  23. package/dist/protocol-raw-root.test.js +48 -0
  24. package/dist/protocol-raw-root.test.js.map +1 -0
  25. package/dist/protocol.d.ts +1 -0
  26. package/dist/protocol.d.ts.map +1 -1
  27. package/dist/protocol.js +4 -1
  28. package/dist/protocol.js.map +1 -1
  29. package/dist/services/access.d.ts.map +1 -1
  30. package/dist/services/access.js +5 -16
  31. package/dist/services/access.js.map +1 -1
  32. package/dist/services/admin.d.ts.map +1 -1
  33. package/dist/services/admin.js +11 -14
  34. package/dist/services/admin.js.map +1 -1
  35. package/dist/services/config.d.ts +44 -4
  36. package/dist/services/config.d.ts.map +1 -1
  37. package/dist/services/config.js +56 -83
  38. package/dist/services/config.js.map +1 -1
  39. package/dist/services/nodes.d.ts.map +1 -1
  40. package/dist/services/nodes.js +2 -4
  41. package/dist/services/nodes.js.map +1 -1
  42. package/package.json +1 -1
  43. package/src/errors.ts +7 -11
  44. package/src/missing-resource.test.ts +98 -0
  45. package/src/protocol-boundaries.test.ts +60 -0
  46. package/src/protocol-codecs.test.ts +112 -0
  47. package/src/protocol-codecs.ts +75 -0
  48. package/src/protocol-raw-root.test.ts +84 -0
  49. package/src/protocol.ts +62 -58
  50. package/src/services/access.ts +5 -16
  51. package/src/services/admin.ts +13 -14
  52. package/src/services/config.ts +72 -95
  53. package/src/services/nodes.ts +2 -4
@@ -1,9 +1,34 @@
1
1
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
2
2
  import * as S from "@distilled.cloud/core/schema";
3
3
  import * as API from "@distilled.cloud/core/api";
4
+ import * as C from "@distilled.cloud/core/category";
4
5
  import * as T from "../traits.js";
5
6
  import { ProxmoxBackupProtocol, } from "../protocol.js";
6
7
  import * as Retry from "../retry.js";
8
+ /** Measured read-only on PBS on 2026-09-24: GET /config/datastore/<absent> returns HTTP 400 with the plain-text body no such datastore '<id>'. Attach only to the measured GET, not a sibling write; no DELETE was probed. Invalid arguments, refused reads, other 400s and all 5xx stay errors. Vendor schema pinned to proxmox-backup-server 4.2.6-1; live host version recorded separately in the probe evidence. */
9
+ export class DatastoreNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
10
+ /*@__PURE__*/ S.TaggedError()("DatastoreNotFound", {
11
+ message: S.String,
12
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^no such datastore '[^']+'$" } }]) {
13
+ }
14
+ /** Measured read-only on PBS on 2026-09-24: GET /config/prune/<absent> returns HTTP 400 with the plain-text body no such prune '<id>'. Attach only to the measured GET, not a sibling write; no DELETE was probed. Invalid arguments, refused reads, other 400s and all 5xx stay errors. Vendor schema pinned to proxmox-backup-server 4.2.6-1; live host version recorded separately in the probe evidence. */
15
+ export class PruneJobNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
16
+ /*@__PURE__*/ S.TaggedError()("PruneJobNotFound", {
17
+ message: S.String,
18
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^no such prune '[^']+'$" } }]) {
19
+ }
20
+ /** Measured read-only on PBS on 2026-09-24: GET /config/sync/<absent> returns HTTP 400 with the plain-text body no such sync '<id>'. Attach only to the measured GET, not a sibling write; no DELETE was probed. Invalid arguments, refused reads, other 400s and all 5xx stay errors. Vendor schema pinned to proxmox-backup-server 4.2.6-1; live host version recorded separately in the probe evidence. */
21
+ export class SyncJobNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
22
+ /*@__PURE__*/ S.TaggedError()("SyncJobNotFound", {
23
+ message: S.String,
24
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^no such sync '[^']+'$" } }]) {
25
+ }
26
+ /** Measured read-only on PBS on 2026-09-24: GET /config/verify/<absent> returns HTTP 400 with the plain-text body no such verification '<id>'. Attach only to the measured GET, not a sibling write; no DELETE was probed. Invalid arguments, refused reads, other 400s and all 5xx stay errors. Vendor schema pinned to proxmox-backup-server 4.2.6-1; live host version recorded separately in the probe evidence. */
27
+ export class VerifyJobNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
28
+ /*@__PURE__*/ S.TaggedError()("VerifyJobNotFound", {
29
+ message: S.String,
30
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^no such verification '[^']+'$" } }]) {
31
+ }
7
32
  export const CreateConfigAccessAdRequestMode = S.String;
8
33
  export const CreateConfigAccessAdRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
34
  base_dn: S.optional(S.String.pipe(T.Body("base-dn"))),
@@ -554,13 +579,8 @@ export const CreateConfigTrafficControlResponse = /*@__PURE__*/ S.suspend(() =>
554
579
  });
555
580
  export const DeleteConfigAccessAdRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
556
581
  realm: S.String.pipe(T.Label()),
557
- digest: S.optional(S.String),
558
- }).pipe(T.Http({
559
- method: "DELETE",
560
- uri: "/config/access/ad/{realm}",
561
- code: 200,
562
- contentType: "form-urlencoded",
563
- }))).annotate({
582
+ digest: S.optional(S.String.pipe(T.Query())),
583
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/access/ad/{realm}", code: 200 }))).annotate({
564
584
  identifier: "DeleteConfigAccessAdRequest",
565
585
  });
566
586
  export const DeleteConfigAccessAdResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -568,13 +588,8 @@ export const DeleteConfigAccessAdResponse = /*@__PURE__*/ S.suspend(() => S.Stru
568
588
  });
569
589
  export const DeleteConfigAccessLdapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
570
590
  realm: S.String.pipe(T.Label()),
571
- digest: S.optional(S.String),
572
- }).pipe(T.Http({
573
- method: "DELETE",
574
- uri: "/config/access/ldap/{realm}",
575
- code: 200,
576
- contentType: "form-urlencoded",
577
- }))).annotate({
591
+ digest: S.optional(S.String.pipe(T.Query())),
592
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/access/ldap/{realm}", code: 200 }))).annotate({
578
593
  identifier: "DeleteConfigAccessLdapRequest",
579
594
  });
580
595
  export const DeleteConfigAccessLdapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -582,12 +597,11 @@ export const DeleteConfigAccessLdapResponse = /*@__PURE__*/ S.suspend(() => S.St
582
597
  });
583
598
  export const DeleteConfigAccessOpenidRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
584
599
  realm: S.String.pipe(T.Label()),
585
- digest: S.optional(S.String),
600
+ digest: S.optional(S.String.pipe(T.Query())),
586
601
  }).pipe(T.Http({
587
602
  method: "DELETE",
588
603
  uri: "/config/access/openid/{realm}",
589
604
  code: 200,
590
- contentType: "form-urlencoded",
591
605
  }))).annotate({
592
606
  identifier: "DeleteConfigAccessOpenidRequest",
593
607
  });
@@ -596,13 +610,8 @@ export const DeleteConfigAccessOpenidResponse = /*@__PURE__*/ S.suspend(() => S.
596
610
  });
597
611
  export const DeleteConfigAcmeAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
598
612
  name: S.String.pipe(T.Label()),
599
- force: S.optional(S.String),
600
- }).pipe(T.Http({
601
- method: "DELETE",
602
- uri: "/config/acme/account/{name}",
603
- code: 200,
604
- contentType: "form-urlencoded",
605
- }))).annotate({
613
+ force: S.optional(S.String.pipe(T.Query())),
614
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/acme/account/{name}", code: 200 }))).annotate({
606
615
  identifier: "DeleteConfigAcmeAccountRequest",
607
616
  });
608
617
  export const DeleteConfigAcmeAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -626,15 +635,10 @@ export const DeleteConfigChangerResponse = /*@__PURE__*/ S.suspend(() => S.Struc
626
635
  });
627
636
  export const DeleteConfigDatastoreRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
628
637
  name: S.String.pipe(T.Label()),
629
- destroy_data: S.optional(S.String.pipe(T.Body("destroy-data"))),
630
- digest: S.optional(S.String),
631
- keep_job_configs: S.optional(S.String.pipe(T.Body("keep-job-configs"))),
632
- }).pipe(T.Http({
633
- method: "DELETE",
634
- uri: "/config/datastore/{name}",
635
- code: 200,
636
- contentType: "form-urlencoded",
637
- }))).annotate({
638
+ destroy_data: S.optional(S.String.pipe(T.Query("destroy-data"))),
639
+ digest: S.optional(S.String.pipe(T.Query())),
640
+ keep_job_configs: S.optional(S.String.pipe(T.Query("keep-job-configs"))),
641
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/datastore/{name}", code: 200 }))).annotate({
638
642
  identifier: "DeleteConfigDatastoreRequest",
639
643
  });
640
644
  export const DeleteConfigDatastoreResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.RawResponseRoot())).annotate({
@@ -650,12 +654,11 @@ export const DeleteConfigDriveResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
650
654
  });
651
655
  export const DeleteConfigEncryptionKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
652
656
  id: S.String.pipe(T.Label()),
653
- digest: S.optional(S.String),
657
+ digest: S.optional(S.String.pipe(T.Query())),
654
658
  }).pipe(T.Http({
655
659
  method: "DELETE",
656
660
  uri: "/config/encryption-keys/{id}",
657
661
  code: 200,
658
- contentType: "form-urlencoded",
659
662
  }))).annotate({
660
663
  identifier: "DeleteConfigEncryptionKeyRequest",
661
664
  });
@@ -672,12 +675,11 @@ export const DeleteConfigMediaPoolResponse = /*@__PURE__*/ S.suspend(() => S.Str
672
675
  });
673
676
  export const DeleteConfigMetricsInfluxdbHttpRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
674
677
  name: S.String.pipe(T.Label()),
675
- digest: S.optional(S.String),
678
+ digest: S.optional(S.String.pipe(T.Query())),
676
679
  }).pipe(T.Http({
677
680
  method: "DELETE",
678
681
  uri: "/config/metrics/influxdb-http/{name}",
679
682
  code: 200,
680
- contentType: "form-urlencoded",
681
683
  }))).annotate({
682
684
  identifier: "DeleteConfigMetricsInfluxdbHttpRequest",
683
685
  });
@@ -686,12 +688,11 @@ export const DeleteConfigMetricsInfluxdbHttpResponse = /*@__PURE__*/ S.suspend((
686
688
  });
687
689
  export const DeleteConfigMetricsInfluxdbUdpRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
688
690
  name: S.String.pipe(T.Label()),
689
- digest: S.optional(S.String),
691
+ digest: S.optional(S.String.pipe(T.Query())),
690
692
  }).pipe(T.Http({
691
693
  method: "DELETE",
692
694
  uri: "/config/metrics/influxdb-udp/{name}",
693
695
  code: 200,
694
- contentType: "form-urlencoded",
695
696
  }))).annotate({
696
697
  identifier: "DeleteConfigMetricsInfluxdbUdpRequest",
697
698
  });
@@ -768,13 +769,8 @@ export const DeleteConfigNotificationMatcherResponse = /*@__PURE__*/ S.suspend((
768
769
  });
769
770
  export const DeleteConfigPruneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
770
771
  id: S.String.pipe(T.Label()),
771
- digest: S.optional(S.String),
772
- }).pipe(T.Http({
773
- method: "DELETE",
774
- uri: "/config/prune/{id}",
775
- code: 200,
776
- contentType: "form-urlencoded",
777
- }))).annotate({
772
+ digest: S.optional(S.String.pipe(T.Query())),
773
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/prune/{id}", code: 200 }))).annotate({
778
774
  identifier: "DeleteConfigPruneRequest",
779
775
  });
780
776
  export const DeleteConfigPruneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -782,13 +778,8 @@ export const DeleteConfigPruneResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
782
778
  });
783
779
  export const DeleteConfigRemoteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
784
780
  name: S.String.pipe(T.Label()),
785
- digest: S.optional(S.String),
786
- }).pipe(T.Http({
787
- method: "DELETE",
788
- uri: "/config/remote/{name}",
789
- code: 200,
790
- contentType: "form-urlencoded",
791
- }))).annotate({
781
+ digest: S.optional(S.String.pipe(T.Query())),
782
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/remote/{name}", code: 200 }))).annotate({
792
783
  identifier: "DeleteConfigRemoteRequest",
793
784
  });
794
785
  export const DeleteConfigRemoteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -796,13 +787,8 @@ export const DeleteConfigRemoteResponse = /*@__PURE__*/ S.suspend(() => S.Struct
796
787
  });
797
788
  export const DeleteConfigS3Request = /*@__PURE__*/ S.suspend(() => S.Struct({
798
789
  id: S.String.pipe(T.Label()),
799
- digest: S.optional(S.String),
800
- }).pipe(T.Http({
801
- method: "DELETE",
802
- uri: "/config/s3/{id}",
803
- code: 200,
804
- contentType: "form-urlencoded",
805
- }))).annotate({
790
+ digest: S.optional(S.String.pipe(T.Query())),
791
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/s3/{id}", code: 200 }))).annotate({
806
792
  identifier: "DeleteConfigS3Request",
807
793
  });
808
794
  export const DeleteConfigS3Response = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -810,13 +796,8 @@ export const DeleteConfigS3Response = /*@__PURE__*/ S.suspend(() => S.Struct({})
810
796
  });
811
797
  export const DeleteConfigSyncRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
812
798
  id: S.String.pipe(T.Label()),
813
- digest: S.optional(S.String),
814
- }).pipe(T.Http({
815
- method: "DELETE",
816
- uri: "/config/sync/{id}",
817
- code: 200,
818
- contentType: "form-urlencoded",
819
- }))).annotate({
799
+ digest: S.optional(S.String.pipe(T.Query())),
800
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/sync/{id}", code: 200 }))).annotate({
820
801
  identifier: "DeleteConfigSyncRequest",
821
802
  });
822
803
  export const DeleteConfigSyncResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -824,12 +805,11 @@ export const DeleteConfigSyncResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
824
805
  });
825
806
  export const DeleteConfigTapeBackupJobRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
826
807
  id: S.String.pipe(T.Label()),
827
- digest: S.optional(S.String),
808
+ digest: S.optional(S.String.pipe(T.Query())),
828
809
  }).pipe(T.Http({
829
810
  method: "DELETE",
830
811
  uri: "/config/tape-backup-job/{id}",
831
812
  code: 200,
832
- contentType: "form-urlencoded",
833
813
  }))).annotate({
834
814
  identifier: "DeleteConfigTapeBackupJobRequest",
835
815
  });
@@ -838,12 +818,11 @@ export const DeleteConfigTapeBackupJobResponse = /*@__PURE__*/ S.suspend(() => S
838
818
  });
839
819
  export const DeleteConfigTapeEncryptionKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
840
820
  fingerprint: S.String.pipe(T.Label()),
841
- digest: S.optional(S.String),
821
+ digest: S.optional(S.String.pipe(T.Query())),
842
822
  }).pipe(T.Http({
843
823
  method: "DELETE",
844
824
  uri: "/config/tape-encryption-keys/{fingerprint}",
845
825
  code: 200,
846
- contentType: "form-urlencoded",
847
826
  }))).annotate({
848
827
  identifier: "DeleteConfigTapeEncryptionKeyRequest",
849
828
  });
@@ -852,12 +831,11 @@ export const DeleteConfigTapeEncryptionKeyResponse = /*@__PURE__*/ S.suspend(()
852
831
  });
853
832
  export const DeleteConfigTrafficControlRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
854
833
  name: S.String.pipe(T.Label()),
855
- digest: S.optional(S.String),
834
+ digest: S.optional(S.String.pipe(T.Query())),
856
835
  }).pipe(T.Http({
857
836
  method: "DELETE",
858
837
  uri: "/config/traffic-control/{name}",
859
838
  code: 200,
860
- contentType: "form-urlencoded",
861
839
  }))).annotate({
862
840
  identifier: "DeleteConfigTrafficControlRequest",
863
841
  });
@@ -866,13 +844,8 @@ export const DeleteConfigTrafficControlResponse = /*@__PURE__*/ S.suspend(() =>
866
844
  });
867
845
  export const DeleteConfigVerifyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
868
846
  id: S.String.pipe(T.Label()),
869
- digest: S.optional(S.String),
870
- }).pipe(T.Http({
871
- method: "DELETE",
872
- uri: "/config/verify/{id}",
873
- code: 200,
874
- contentType: "form-urlencoded",
875
- }))).annotate({
847
+ digest: S.optional(S.String.pipe(T.Query())),
848
+ }).pipe(T.Http({ method: "DELETE", uri: "/config/verify/{id}", code: 200 }))).annotate({
876
849
  identifier: "DeleteConfigVerifyRequest",
877
850
  });
878
851
  export const DeleteConfigVerifyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -3742,7 +3715,7 @@ export const getConfigChanger = /*@__PURE__*/ API.make(() => ({
3742
3715
  export const getConfigDatastore = /*@__PURE__*/ API.make(() => ({
3743
3716
  input: GetConfigDatastoreRequest,
3744
3717
  output: GetConfigDatastoreResponse,
3745
- errors: [],
3718
+ errors: [DatastoreNotFound],
3746
3719
  protocol: ProxmoxBackupProtocol,
3747
3720
  retry: Retry.Retry,
3748
3721
  }));
@@ -3854,7 +3827,7 @@ export const getConfigNotificationTarget = /*@__PURE__*/ API.make(() => ({
3854
3827
  export const getConfigPrune = /*@__PURE__*/ API.make(() => ({
3855
3828
  input: GetConfigPruneRequest,
3856
3829
  output: GetConfigPruneResponse,
3857
- errors: [],
3830
+ errors: [PruneJobNotFound],
3858
3831
  protocol: ProxmoxBackupProtocol,
3859
3832
  retry: Retry.Retry,
3860
3833
  }));
@@ -3894,7 +3867,7 @@ export const getConfigS3ListBuckets = /*@__PURE__*/ API.make(() => ({
3894
3867
  export const getConfigSync = /*@__PURE__*/ API.make(() => ({
3895
3868
  input: GetConfigSyncRequest,
3896
3869
  output: GetConfigSyncResponse,
3897
- errors: [],
3870
+ errors: [SyncJobNotFound],
3898
3871
  protocol: ProxmoxBackupProtocol,
3899
3872
  retry: Retry.Retry,
3900
3873
  }));
@@ -3926,7 +3899,7 @@ export const getConfigTrafficControl = /*@__PURE__*/ API.make(() => ({
3926
3899
  export const getConfigVerify = /*@__PURE__*/ API.make(() => ({
3927
3900
  input: GetConfigVerifyRequest,
3928
3901
  output: GetConfigVerifyResponse,
3929
- errors: [],
3902
+ errors: [VerifyJobNotFound],
3930
3903
  protocol: ProxmoxBackupProtocol,
3931
3904
  retry: Retry.Retry,
3932
3905
  }));