@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
@@ -32,6 +32,26 @@ declare const ClusterNodeUnreachable_base: S.Class<ClusterNodeUnreachable, S.Tag
32
32
  /** PVE forwarded this call to another cluster member and could not reach it (pveproxy/pvedaemon's own connection-failure status, not a standard HTTP code). Transient — the target node may be mid-reboot or between cluster-membership changes. */
33
33
  export declare class ClusterNodeUnreachable extends /*@__PURE__*/ ClusterNodeUnreachable_base {
34
34
  }
35
+ declare const LxcConfigNotFound_base: S.Class<LxcConfigNotFound, S.TaggedStruct<"LxcConfigNotFound", {
36
+ readonly message: any;
37
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
38
+ "@distilled.cloud/error/categories": {
39
+ BadRequestError: true;
40
+ };
41
+ });
42
+ /** The requested container config is absent on this node. VM IDs are cluster-wide: callers must still check whether another node or QEMU guest holds the ID before creating. Also raised by PUT (update_vm) and DELETE (destroy_vm), which both call the same load_config first. This GET requires VM.Audit on /vms/{vmid}; retain its credential for any permission-filtered cluster index read. */
43
+ export declare class LxcConfigNotFound extends /*@__PURE__*/ LxcConfigNotFound_base {
44
+ }
45
+ declare const NetworkInterfaceNotFound_base: S.Class<NetworkInterfaceNotFound, S.TaggedStruct<"NetworkInterfaceNotFound", {
46
+ readonly message: any;
47
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
48
+ "@distilled.cloud/error/categories": {
49
+ BadRequestError: true;
50
+ };
51
+ });
52
+ /** pve-manager 9.2.11, PVE/API2/Network.pm. GET (network_config) and PUT (update_network) both raise HTTP 400 with exactly errors.iface = interface does not exist -- verified against the live n2 source on 2026-09-25. DELETE (delete_network) raises it too but is left untyped: no generated deleteNodeNetwork2 caller exists yet. Only the exact sole-field detail is normalized for operation matching; all other validation errors remain ParameterVerificationFailed. Attached to GET and PUT. */
53
+ export declare class NetworkInterfaceNotFound extends /*@__PURE__*/ NetworkInterfaceNotFound_base {
54
+ }
35
55
  export interface CloneNodesLxcRequest {
36
56
  node: string;
37
57
  vmid: string;
@@ -7081,7 +7101,7 @@ export declare const deleteNodeDiskZfs: API.OperationMethod<DeleteNodeDiskZfsReq
7081
7101
  export type DeleteNodeFirewallRuleError = ProxmoxOpError;
7082
7102
  /** Delete rule. (root-privileged endpoint) */
7083
7103
  export declare const deleteNodeFirewallRule: API.OperationMethod<DeleteNodeFirewallRuleRequest, DeleteNodeFirewallRuleResponse, DeleteNodeFirewallRuleError, ProxmoxOpContext>;
7084
- export type DeleteNodeLxcError = ProxmoxOpError;
7104
+ export type DeleteNodeLxcError = LxcConfigNotFound | ProxmoxOpError;
7085
7105
  /** Destroy the container (also delete all uses files). (root-privileged endpoint) */
7086
7106
  export declare const deleteNodeLxc: API.OperationMethod<DeleteNodeLxcRequest, DeleteNodeLxcResponse, DeleteNodeLxcError, ProxmoxOpContext>;
7087
7107
  export type DeleteNodeLxcFirewallAliasError = ProxmoxOpError;
@@ -7219,7 +7239,7 @@ export declare const getNodeHosts: API.OperationMethod<GetNodeHostsRequest, GetN
7219
7239
  export type GetNodeLxcError = ProxmoxOpError;
7220
7240
  /** Directory index */
7221
7241
  export declare const getNodeLxc: API.OperationMethod<GetNodeLxcRequest, GetNodeLxcResponse, GetNodeLxcError, ProxmoxOpContext>;
7222
- export type GetNodeLxcConfigError = ProxmoxOpError;
7242
+ export type GetNodeLxcConfigError = LxcConfigNotFound | ProxmoxOpError;
7223
7243
  /** Get container configuration. */
7224
7244
  export declare const getNodeLxcConfig: API.OperationMethod<GetNodeLxcConfigRequest, GetNodeLxcConfigResponse, GetNodeLxcConfigError, ProxmoxOpContext>;
7225
7245
  export type GetNodeLxcFeatureError = ProxmoxOpError;
@@ -7260,7 +7280,7 @@ export declare const getNodeLxcStatusCurrent: API.OperationMethod<GetNodeLxcStat
7260
7280
  export type GetNodeLxcVncwebsocketError = ProxmoxOpError;
7261
7281
  /** Opens a websocket for VNC traffic. */
7262
7282
  export declare const getNodeLxcVncwebsocket: API.OperationMethod<GetNodeLxcVncwebsocketRequest, GetNodeLxcVncwebsocketResponse, GetNodeLxcVncwebsocketError, ProxmoxOpContext>;
7263
- export type GetNodeNetworkError = ProxmoxOpError;
7283
+ export type GetNodeNetworkError = NetworkInterfaceNotFound | ProxmoxOpError;
7264
7284
  /** Read network device configuration */
7265
7285
  export declare const getNodeNetwork: API.OperationMethod<GetNodeNetworkRequest, GetNodeNetworkResponse, GetNodeNetworkError, ProxmoxOpContext>;
7266
7286
  export type GetNodeQemuError = ProxmoxOpError;
@@ -7745,7 +7765,7 @@ export declare const putNodeFirewallOptions: API.OperationMethod<PutNodeFirewall
7745
7765
  export type PutNodeFirewallRuleError = ProxmoxOpError;
7746
7766
  /** Modify rule data. (root-privileged endpoint) */
7747
7767
  export declare const putNodeFirewallRule: API.OperationMethod<PutNodeFirewallRuleRequest, PutNodeFirewallRuleResponse, PutNodeFirewallRuleError, ProxmoxOpContext>;
7748
- export type PutNodeLxcConfigError = ProxmoxOpError;
7768
+ export type PutNodeLxcConfigError = LxcConfigNotFound | ProxmoxOpError;
7749
7769
  /** Set container options. (root-privileged endpoint) */
7750
7770
  export declare const putNodeLxcConfig: API.OperationMethod<PutNodeLxcConfigRequest, PutNodeLxcConfigResponse, PutNodeLxcConfigError, ProxmoxOpContext>;
7751
7771
  export type PutNodeLxcFirewallAliasError = ProxmoxOpError;
@@ -7769,7 +7789,7 @@ export declare const putNodeLxcSnapshotConfig: API.OperationMethod<PutNodeLxcSna
7769
7789
  export type PutNodeNetworkError = ProxmoxOpError;
7770
7790
  /** Reload network configuration (root-privileged endpoint) */
7771
7791
  export declare const putNodeNetwork: API.OperationMethod<PutNodeNetworkRequest, PutNodeNetworkResponse, PutNodeNetworkError, ProxmoxOpContext>;
7772
- export type PutNodeNetwork2Error = ProxmoxOpError;
7792
+ export type PutNodeNetwork2Error = NetworkInterfaceNotFound | ProxmoxOpError;
7773
7793
  /** Update network device configuration (root-privileged endpoint) */
7774
7794
  export declare const putNodeNetwork2: API.OperationMethod<PutNodeNetwork2Request, PutNodeNetwork2Response, PutNodeNetwork2Error, ProxmoxOpContext>;
7775
7795
  export type PutNodeQemuCloudinitError = ProxmoxOpError;