@homeflare/distilled-proxmox 0.3.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.
- package/README.md +15 -10
- package/dist/config-not-found.test.d.ts +2 -0
- package/dist/config-not-found.test.d.ts.map +1 -0
- package/dist/config-not-found.test.js +96 -0
- package/dist/config-not-found.test.js.map +1 -0
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/protocol-form.d.ts +18 -0
- package/dist/protocol-form.d.ts.map +1 -0
- package/dist/protocol-form.js +37 -0
- package/dist/protocol-form.js.map +1 -0
- package/dist/protocol-form.test.d.ts +2 -0
- package/dist/protocol-form.test.d.ts.map +1 -0
- package/dist/protocol-form.test.js +68 -0
- package/dist/protocol-form.test.js.map +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +19 -2
- package/dist/protocol.js.map +1 -1
- package/dist/services/cluster.d.ts +25 -5
- package/dist/services/cluster.d.ts.map +1 -1
- package/dist/services/cluster.js +26 -5
- package/dist/services/cluster.js.map +1 -1
- package/dist/services/pools.d.ts +16 -6
- package/dist/services/pools.d.ts.map +1 -1
- package/dist/services/pools.js +18 -6
- package/dist/services/pools.js.map +1 -1
- package/package.json +1 -1
- package/src/config-not-found.test.ts +153 -0
- package/src/errors.ts +4 -12
- package/src/protocol-form.test.ts +102 -0
- package/src/protocol-form.ts +49 -0
- package/src/protocol.ts +22 -2
- package/src/services/cluster.ts +46 -10
- package/src/services/pools.ts +27 -12
package/dist/services/cluster.js
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
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
|
+
/** 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. */
|
|
15
|
+
export class MetricServerNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
16
|
+
/*@__PURE__*/ S.TaggedError()("MetricServerNotFound", {
|
|
17
|
+
message: S.String,
|
|
18
|
+
}).pipe(C.withBadRequestError), [
|
|
19
|
+
{
|
|
20
|
+
status: 500,
|
|
21
|
+
message: {
|
|
22
|
+
matches: "^status server entry '[^']+' does not exist\\n?$",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{ status: 500, message: { matches: "^no such server '[^']+'\\n?$" } },
|
|
26
|
+
]) {
|
|
27
|
+
}
|
|
7
28
|
export const CreateClusterAcmeAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
8
29
|
contact: S.String,
|
|
9
30
|
directory: S.optional(S.String),
|
|
@@ -5583,7 +5604,7 @@ export const deleteClusterAcmePlugin = /*@__PURE__*/ API.make(() => ({
|
|
|
5583
5604
|
export const deleteClusterBackup = /*@__PURE__*/ API.make(() => ({
|
|
5584
5605
|
input: DeleteClusterBackupRequest,
|
|
5585
5606
|
output: DeleteClusterBackupResponse,
|
|
5586
|
-
errors: [],
|
|
5607
|
+
errors: [BackupJobNotFound],
|
|
5587
5608
|
protocol: ProxmoxProtocol,
|
|
5588
5609
|
retry: Retry.Retry,
|
|
5589
5610
|
}));
|
|
@@ -5911,7 +5932,7 @@ export const getClusterAcmeTos = /*@__PURE__*/ API.make(() => ({
|
|
|
5911
5932
|
export const getClusterBackup = /*@__PURE__*/ API.make(() => ({
|
|
5912
5933
|
input: GetClusterBackupRequest,
|
|
5913
5934
|
output: GetClusterBackupResponse,
|
|
5914
|
-
errors: [],
|
|
5935
|
+
errors: [BackupJobNotFound],
|
|
5915
5936
|
protocol: ProxmoxProtocol,
|
|
5916
5937
|
retry: Retry.Retry,
|
|
5917
5938
|
}));
|
|
@@ -5919,7 +5940,7 @@ export const getClusterBackup = /*@__PURE__*/ API.make(() => ({
|
|
|
5919
5940
|
export const getClusterBackupIncludedVolumes = /*@__PURE__*/ API.make(() => ({
|
|
5920
5941
|
input: GetClusterBackupIncludedVolumesRequest,
|
|
5921
5942
|
output: GetClusterBackupIncludedVolumesResponse,
|
|
5922
|
-
errors: [],
|
|
5943
|
+
errors: [BackupJobNotFound],
|
|
5923
5944
|
protocol: ProxmoxProtocol,
|
|
5924
5945
|
retry: Retry.Retry,
|
|
5925
5946
|
}));
|
|
@@ -6111,7 +6132,7 @@ export const getClusterMetricsExport = /*@__PURE__*/ API.make(() => ({
|
|
|
6111
6132
|
export const getClusterMetricsServer = /*@__PURE__*/ API.make(() => ({
|
|
6112
6133
|
input: GetClusterMetricsServerRequest,
|
|
6113
6134
|
output: GetClusterMetricsServerResponse,
|
|
6114
|
-
errors: [],
|
|
6135
|
+
errors: [MetricServerNotFound],
|
|
6115
6136
|
protocol: ProxmoxProtocol,
|
|
6116
6137
|
retry: Retry.Retry,
|
|
6117
6138
|
}));
|
|
@@ -7087,7 +7108,7 @@ export const putClusterMappingUsb = /*@__PURE__*/ API.make(() => ({
|
|
|
7087
7108
|
export const putClusterMetricsServer = /*@__PURE__*/ API.make(() => ({
|
|
7088
7109
|
input: PutClusterMetricsServerRequest,
|
|
7089
7110
|
output: PutClusterMetricsServerResponse,
|
|
7090
|
-
errors: [],
|
|
7111
|
+
errors: [MetricServerNotFound],
|
|
7091
7112
|
protocol: ProxmoxProtocol,
|
|
7092
7113
|
retry: Retry.Retry,
|
|
7093
7114
|
}));
|