@homeflare/distilled-proxmox 0.3.0 → 0.3.2

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 (50) hide show
  1. package/README.md +37 -10
  2. package/dist/config-not-found.test.d.ts +2 -0
  3. package/dist/config-not-found.test.d.ts.map +1 -0
  4. package/dist/config-not-found.test.js +125 -0
  5. package/dist/config-not-found.test.js.map +1 -0
  6. package/dist/errors.d.ts +2 -2
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js.map +1 -1
  9. package/dist/lxc-config-errors.test.d.ts +2 -0
  10. package/dist/lxc-config-errors.test.d.ts.map +1 -0
  11. package/dist/lxc-config-errors.test.js +48 -0
  12. package/dist/lxc-config-errors.test.js.map +1 -0
  13. package/dist/protocol-form.d.ts +18 -0
  14. package/dist/protocol-form.d.ts.map +1 -0
  15. package/dist/protocol-form.js +37 -0
  16. package/dist/protocol-form.js.map +1 -0
  17. package/dist/protocol-form.test.d.ts +2 -0
  18. package/dist/protocol-form.test.d.ts.map +1 -0
  19. package/dist/protocol-form.test.js +68 -0
  20. package/dist/protocol-form.test.js.map +1 -0
  21. package/dist/protocol.d.ts.map +1 -1
  22. package/dist/protocol.js +25 -2
  23. package/dist/protocol.js.map +1 -1
  24. package/dist/replication-firewall-errors.test.d.ts +2 -0
  25. package/dist/replication-firewall-errors.test.d.ts.map +1 -0
  26. package/dist/replication-firewall-errors.test.js +76 -0
  27. package/dist/replication-firewall-errors.test.js.map +1 -0
  28. package/dist/services/cluster.d.ts +50 -10
  29. package/dist/services/cluster.d.ts.map +1 -1
  30. package/dist/services/cluster.js +50 -10
  31. package/dist/services/cluster.js.map +1 -1
  32. package/dist/services/nodes.d.ts +25 -5
  33. package/dist/services/nodes.d.ts.map +1 -1
  34. package/dist/services/nodes.js +24 -5
  35. package/dist/services/nodes.js.map +1 -1
  36. package/dist/services/pools.d.ts +16 -6
  37. package/dist/services/pools.d.ts.map +1 -1
  38. package/dist/services/pools.js +18 -6
  39. package/dist/services/pools.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/config-not-found.test.ts +202 -0
  42. package/src/errors.ts +4 -12
  43. package/src/lxc-config-errors.test.ts +100 -0
  44. package/src/protocol-form.test.ts +102 -0
  45. package/src/protocol-form.ts +49 -0
  46. package/src/protocol.ts +30 -2
  47. package/src/replication-firewall-errors.test.ts +126 -0
  48. package/src/services/cluster.ts +97 -20
  49. package/src/services/nodes.ts +39 -10
  50. package/src/services/pools.ts +27 -12
@@ -1,9 +1,49 @@
1
1
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidata.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 { ProxmoxProtocol, } from "../protocol.js";
6
7
  import * as Retry from "../retry.js";
8
+ /** The backup job does not exist. pve-manager 9.2.11, f6997e698c7933ea8e62319e2bf1bf7262daa56a, PVE/API2/Backup.pm:406,458,755 raises a 400 parameter exception with exactly errors.id = No such job '<id>'. The Proxmox protocol extracts that sole precise detail for matching; unrelated or multi-field validation errors never become absence. Update uses a different exception and is deliberately not attached. */
9
+ export class BackupJobNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
10
+ /*@__PURE__*/ S.TaggedError()("BackupJobNotFound", {
11
+ message: S.String,
12
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^No such job '[^']+'$" } }]) {
13
+ }
14
+ /** Installed pve-firewall 6.0.5 PVE/API2/Firewall/Aliases.pm:203-204,252, read-only 2026-09-24; SHA256 aa4d71ea897515ca71caa8e04abd142aedf8077058649f793605f014be84db0e. GET and PUT raise HTTP400 Parameter verification failed with the sole field errors.name = no such alias. DELETE is intrinsically idempotent and has no missing-alias exception. Other validation failures remain ParameterVerificationFailed. */
15
+ export class FirewallAliasNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
16
+ /*@__PURE__*/ S.TaggedError()("FirewallAliasNotFound", {
17
+ message: S.String,
18
+ }).pipe(C.withBadRequestError), [{ status: 400, message: { matches: "^no such alias$" } }]) {
19
+ }
20
+ /** The metrics server does not exist. pve-manager 9.2.11, f6997e698c7933ea8e62319e2bf1bf7262daa56a, PVE/API2/Cluster/MetricServer.pm:136 throws status server entry '<id>' does not exist on GET, and line 228 throws no such server '<id>' on PUT. Both are wire 500. DELETE dereferences the plugin config without an explicit absence check and is not declared to return this tag. */
21
+ export class MetricServerNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
22
+ /*@__PURE__*/ S.TaggedError()("MetricServerNotFound", {
23
+ message: S.String,
24
+ }).pipe(C.withBadRequestError), [
25
+ {
26
+ status: 500,
27
+ message: {
28
+ matches: "^status server entry '[^']+' does not exist\\n?$",
29
+ },
30
+ },
31
+ { status: 500, message: { matches: "^no such server '[^']+'\\n?$" } },
32
+ ]) {
33
+ }
34
+ /** pve-manager 9.2.11 f6997e698c7933ea8e62319e2bf1bf7262daa56a PVE/API2/ReplicationConfig.pm:107,226,305. GET raises no such replication job; PUT and non-force DELETE raise no such job. Exact structured job IDs only. DELETE normally marks remove_job=full for background cleanup; an absent job is already removed. */
35
+ export class ReplicationJobNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
36
+ /*@__PURE__*/ S.TaggedError()("ReplicationJobNotFound", {
37
+ message: S.String,
38
+ }).pipe(C.withBadRequestError), [
39
+ {
40
+ status: 500,
41
+ message: {
42
+ matches: "^no such (replication )?job '[0-9]+-[0-9]+'\\n?$",
43
+ },
44
+ },
45
+ ]) {
46
+ }
7
47
  export const CreateClusterAcmeAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
8
48
  contact: S.String,
9
49
  directory: S.optional(S.String),
@@ -5583,7 +5623,7 @@ export const deleteClusterAcmePlugin = /*@__PURE__*/ API.make(() => ({
5583
5623
  export const deleteClusterBackup = /*@__PURE__*/ API.make(() => ({
5584
5624
  input: DeleteClusterBackupRequest,
5585
5625
  output: DeleteClusterBackupResponse,
5586
- errors: [],
5626
+ errors: [BackupJobNotFound],
5587
5627
  protocol: ProxmoxProtocol,
5588
5628
  retry: Retry.Retry,
5589
5629
  }));
@@ -5759,7 +5799,7 @@ export const deleteClusterQemuCustomCpuModel = /*@__PURE__*/ API.make(() => ({
5759
5799
  export const deleteClusterReplication = /*@__PURE__*/ API.make(() => ({
5760
5800
  input: DeleteClusterReplicationRequest,
5761
5801
  output: DeleteClusterReplicationResponse,
5762
- errors: [],
5802
+ errors: [ReplicationJobNotFound],
5763
5803
  protocol: ProxmoxProtocol,
5764
5804
  retry: Retry.Retry,
5765
5805
  }));
@@ -5911,7 +5951,7 @@ export const getClusterAcmeTos = /*@__PURE__*/ API.make(() => ({
5911
5951
  export const getClusterBackup = /*@__PURE__*/ API.make(() => ({
5912
5952
  input: GetClusterBackupRequest,
5913
5953
  output: GetClusterBackupResponse,
5914
- errors: [],
5954
+ errors: [BackupJobNotFound],
5915
5955
  protocol: ProxmoxProtocol,
5916
5956
  retry: Retry.Retry,
5917
5957
  }));
@@ -5919,7 +5959,7 @@ export const getClusterBackup = /*@__PURE__*/ API.make(() => ({
5919
5959
  export const getClusterBackupIncludedVolumes = /*@__PURE__*/ API.make(() => ({
5920
5960
  input: GetClusterBackupIncludedVolumesRequest,
5921
5961
  output: GetClusterBackupIncludedVolumesResponse,
5922
- errors: [],
5962
+ errors: [BackupJobNotFound],
5923
5963
  protocol: ProxmoxProtocol,
5924
5964
  retry: Retry.Retry,
5925
5965
  }));
@@ -5983,7 +6023,7 @@ export const getClusterConfigTotem = /*@__PURE__*/ API.make(() => ({
5983
6023
  export const getClusterFirewallAlias = /*@__PURE__*/ API.make(() => ({
5984
6024
  input: GetClusterFirewallAliasRequest,
5985
6025
  output: GetClusterFirewallAliasResponse,
5986
- errors: [],
6026
+ errors: [FirewallAliasNotFound],
5987
6027
  protocol: ProxmoxProtocol,
5988
6028
  retry: Retry.Retry,
5989
6029
  }));
@@ -6111,7 +6151,7 @@ export const getClusterMetricsExport = /*@__PURE__*/ API.make(() => ({
6111
6151
  export const getClusterMetricsServer = /*@__PURE__*/ API.make(() => ({
6112
6152
  input: GetClusterMetricsServerRequest,
6113
6153
  output: GetClusterMetricsServerResponse,
6114
- errors: [],
6154
+ errors: [MetricServerNotFound],
6115
6155
  protocol: ProxmoxProtocol,
6116
6156
  retry: Retry.Retry,
6117
6157
  }));
@@ -6183,7 +6223,7 @@ export const getClusterQemuCustomCpuModel = /*@__PURE__*/ API.make(() => ({
6183
6223
  export const getClusterReplication = /*@__PURE__*/ API.make(() => ({
6184
6224
  input: GetClusterReplicationRequest,
6185
6225
  output: GetClusterReplicationResponse,
6186
- errors: [],
6226
+ errors: [ReplicationJobNotFound],
6187
6227
  protocol: ProxmoxProtocol,
6188
6228
  retry: Retry.Retry,
6189
6229
  }));
@@ -6991,7 +7031,7 @@ export const putClusterCephHealthMute = /*@__PURE__*/ API.make(() => ({
6991
7031
  export const putClusterFirewallAlias = /*@__PURE__*/ API.make(() => ({
6992
7032
  input: PutClusterFirewallAliasRequest,
6993
7033
  output: PutClusterFirewallAliasResponse,
6994
- errors: [],
7034
+ errors: [FirewallAliasNotFound],
6995
7035
  protocol: ProxmoxProtocol,
6996
7036
  retry: Retry.Retry,
6997
7037
  }));
@@ -7087,7 +7127,7 @@ export const putClusterMappingUsb = /*@__PURE__*/ API.make(() => ({
7087
7127
  export const putClusterMetricsServer = /*@__PURE__*/ API.make(() => ({
7088
7128
  input: PutClusterMetricsServerRequest,
7089
7129
  output: PutClusterMetricsServerResponse,
7090
- errors: [],
7130
+ errors: [MetricServerNotFound],
7091
7131
  protocol: ProxmoxProtocol,
7092
7132
  retry: Retry.Retry,
7093
7133
  }));
@@ -7151,7 +7191,7 @@ export const putClusterQemuCustomCpuModel = /*@__PURE__*/ API.make(() => ({
7151
7191
  export const putClusterReplication = /*@__PURE__*/ API.make(() => ({
7152
7192
  input: PutClusterReplicationRequest,
7153
7193
  output: PutClusterReplicationResponse,
7154
- errors: [],
7194
+ errors: [ReplicationJobNotFound],
7155
7195
  protocol: ProxmoxProtocol,
7156
7196
  retry: Retry.Retry,
7157
7197
  }));