@homeflare/distilled-proxmox 0.2.0 → 0.3.0

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/dist/delete-query-binding.test.d.ts +2 -0
  2. package/dist/delete-query-binding.test.d.ts.map +1 -0
  3. package/dist/delete-query-binding.test.js +49 -0
  4. package/dist/delete-query-binding.test.js.map +1 -0
  5. package/dist/errors.d.ts +12 -5
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +12 -5
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +0 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +0 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/not-found-errors.test.d.ts +2 -0
  14. package/dist/not-found-errors.test.d.ts.map +1 -0
  15. package/dist/not-found-errors.test.js +59 -0
  16. package/dist/not-found-errors.test.js.map +1 -0
  17. package/dist/protocol.d.ts.map +1 -1
  18. package/dist/protocol.js +9 -7
  19. package/dist/protocol.js.map +1 -1
  20. package/dist/services/access.d.ts +22 -2
  21. package/dist/services/access.d.ts.map +1 -1
  22. package/dist/services/access.js +17 -9
  23. package/dist/services/access.js.map +1 -1
  24. package/dist/services/cluster.d.ts.map +1 -1
  25. package/dist/services/cluster.js +30 -77
  26. package/dist/services/cluster.js.map +1 -1
  27. package/dist/services/nodes.d.ts +22 -2
  28. package/dist/services/nodes.d.ts.map +1 -1
  29. package/dist/services/nodes.js +60 -72
  30. package/dist/services/nodes.js.map +1 -1
  31. package/dist/services/pools.d.ts.map +1 -1
  32. package/dist/services/pools.js +2 -7
  33. package/dist/services/pools.js.map +1 -1
  34. package/dist/services/storage.d.ts +11 -1
  35. package/dist/services/storage.d.ts.map +1 -1
  36. package/dist/services/storage.js +8 -1
  37. package/dist/services/storage.js.map +1 -1
  38. package/package.json +1 -7
  39. package/src/delete-query-binding.test.ts +65 -0
  40. package/src/errors.ts +12 -5
  41. package/src/index.ts +0 -1
  42. package/src/not-found-errors.test.ts +112 -0
  43. package/src/protocol.ts +9 -7
  44. package/src/services/access.ts +25 -11
  45. package/src/services/cluster.ts +30 -79
  46. package/src/services/nodes.ts +71 -74
  47. package/src/services/pools.ts +2 -9
  48. package/src/services/storage.ts +12 -2
  49. package/dist/task.d.ts +0 -51
  50. package/dist/task.d.ts.map +0 -1
  51. package/dist/task.js +0 -60
  52. package/dist/task.js.map +0 -1
  53. package/src/task.ts +0 -87
@@ -908,12 +908,11 @@ export const DeleteClusterConfigNodeResponse = /*@__PURE__*/ S.suspend(() => S.S
908
908
  });
909
909
  export const DeleteClusterFirewallAliasRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
910
910
  name: S.String.pipe(T.Label()),
911
- digest: S.optional(S.String),
911
+ digest: S.optional(S.String.pipe(T.Query())),
912
912
  }).pipe(T.Http({
913
913
  method: "DELETE",
914
914
  uri: "/cluster/firewall/aliases/{name}",
915
915
  code: 200,
916
- contentType: "form-urlencoded",
917
916
  }))).annotate({
918
917
  identifier: "DeleteClusterFirewallAliasRequest",
919
918
  });
@@ -935,12 +934,11 @@ export const DeleteClusterFirewallGroupResponse = /*@__PURE__*/ S.suspend(() =>
935
934
  export const DeleteClusterFirewallGroup2Request = /*@__PURE__*/ S.suspend(() => S.Struct({
936
935
  group: S.String.pipe(T.Label()),
937
936
  pos: S.String.pipe(T.Label()),
938
- digest: S.optional(S.String),
937
+ digest: S.optional(S.String.pipe(T.Query())),
939
938
  }).pipe(T.Http({
940
939
  method: "DELETE",
941
940
  uri: "/cluster/firewall/groups/{group}/{pos}",
942
941
  code: 200,
943
- contentType: "form-urlencoded",
944
942
  }))).annotate({
945
943
  identifier: "DeleteClusterFirewallGroup2Request",
946
944
  });
@@ -949,12 +947,11 @@ export const DeleteClusterFirewallGroup2Response = /*@__PURE__*/ S.suspend(() =>
949
947
  });
950
948
  export const DeleteClusterFirewallIpsetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
951
949
  name: S.String.pipe(T.Label()),
952
- force: S.optional(S.String),
950
+ force: S.optional(S.String.pipe(T.Query())),
953
951
  }).pipe(T.Http({
954
952
  method: "DELETE",
955
953
  uri: "/cluster/firewall/ipset/{name}",
956
954
  code: 200,
957
- contentType: "form-urlencoded",
958
955
  }))).annotate({
959
956
  identifier: "DeleteClusterFirewallIpsetRequest",
960
957
  });
@@ -964,12 +961,11 @@ export const DeleteClusterFirewallIpsetResponse = /*@__PURE__*/ S.suspend(() =>
964
961
  export const DeleteClusterFirewallIpset2Request = /*@__PURE__*/ S.suspend(() => S.Struct({
965
962
  name: S.String.pipe(T.Label()),
966
963
  cidr: S.String.pipe(T.Label()),
967
- digest: S.optional(S.String),
964
+ digest: S.optional(S.String.pipe(T.Query())),
968
965
  }).pipe(T.Http({
969
966
  method: "DELETE",
970
967
  uri: "/cluster/firewall/ipset/{name}/{cidr}",
971
968
  code: 200,
972
- contentType: "form-urlencoded",
973
969
  }))).annotate({
974
970
  identifier: "DeleteClusterFirewallIpset2Request",
975
971
  });
@@ -978,12 +974,11 @@ export const DeleteClusterFirewallIpset2Response = /*@__PURE__*/ S.suspend(() =>
978
974
  });
979
975
  export const DeleteClusterFirewallRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
980
976
  pos: S.String.pipe(T.Label()),
981
- digest: S.optional(S.String),
977
+ digest: S.optional(S.String.pipe(T.Query())),
982
978
  }).pipe(T.Http({
983
979
  method: "DELETE",
984
980
  uri: "/cluster/firewall/rules/{pos}",
985
981
  code: 200,
986
- contentType: "form-urlencoded",
987
982
  }))).annotate({
988
983
  identifier: "DeleteClusterFirewallRuleRequest",
989
984
  });
@@ -1000,13 +995,8 @@ export const DeleteClusterHaGroupResponse = /*@__PURE__*/ S.suspend(() => S.Stru
1000
995
  });
1001
996
  export const DeleteClusterHaResourceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1002
997
  sid: S.String.pipe(T.Label()),
1003
- purge: S.optional(S.String),
1004
- }).pipe(T.Http({
1005
- method: "DELETE",
1006
- uri: "/cluster/ha/resources/{sid}",
1007
- code: 200,
1008
- contentType: "form-urlencoded",
1009
- }))).annotate({
998
+ purge: S.optional(S.String.pipe(T.Query())),
999
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/ha/resources/{sid}", code: 200 }))).annotate({
1010
1000
  identifier: "DeleteClusterHaResourceRequest",
1011
1001
  });
1012
1002
  export const DeleteClusterHaResourceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1150,14 +1140,9 @@ export const DeleteClusterQemuCustomCpuModelResponse = /*@__PURE__*/ S.suspend((
1150
1140
  });
1151
1141
  export const DeleteClusterReplicationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1152
1142
  id: S.String.pipe(T.Label()),
1153
- force: S.optional(S.String),
1154
- keep: S.optional(S.String),
1155
- }).pipe(T.Http({
1156
- method: "DELETE",
1157
- uri: "/cluster/replication/{id}",
1158
- code: 200,
1159
- contentType: "form-urlencoded",
1160
- }))).annotate({
1143
+ force: S.optional(S.String.pipe(T.Query())),
1144
+ keep: S.optional(S.String.pipe(T.Query())),
1145
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/replication/{id}", code: 200 }))).annotate({
1161
1146
  identifier: "DeleteClusterReplicationRequest",
1162
1147
  });
1163
1148
  export const DeleteClusterReplicationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1165,12 +1150,11 @@ export const DeleteClusterReplicationResponse = /*@__PURE__*/ S.suspend(() => S.
1165
1150
  });
1166
1151
  export const DeleteClusterSdnControllerRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1167
1152
  controller: S.String.pipe(T.Label()),
1168
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1153
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1169
1154
  }).pipe(T.Http({
1170
1155
  method: "DELETE",
1171
1156
  uri: "/cluster/sdn/controllers/{controller}",
1172
1157
  code: 200,
1173
- contentType: "form-urlencoded",
1174
1158
  }))).annotate({
1175
1159
  identifier: "DeleteClusterSdnControllerRequest",
1176
1160
  });
@@ -1179,13 +1163,8 @@ export const DeleteClusterSdnControllerResponse = /*@__PURE__*/ S.suspend(() =>
1179
1163
  });
1180
1164
  export const DeleteClusterSdnDnsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1181
1165
  dns: S.String.pipe(T.Label()),
1182
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1183
- }).pipe(T.Http({
1184
- method: "DELETE",
1185
- uri: "/cluster/sdn/dns/{dns}",
1186
- code: 200,
1187
- contentType: "form-urlencoded",
1188
- }))).annotate({
1166
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1167
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/dns/{dns}", code: 200 }))).annotate({
1189
1168
  identifier: "DeleteClusterSdnDnsRequest",
1190
1169
  });
1191
1170
  export const DeleteClusterSdnDnsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1218,27 +1197,17 @@ export const DeleteClusterSdnFabricNodeResponse = /*@__PURE__*/ S.suspend(() =>
1218
1197
  });
1219
1198
  export const DeleteClusterSdnIpamRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1220
1199
  ipam: S.String.pipe(T.Label()),
1221
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1222
- }).pipe(T.Http({
1223
- method: "DELETE",
1224
- uri: "/cluster/sdn/ipams/{ipam}",
1225
- code: 200,
1226
- contentType: "form-urlencoded",
1227
- }))).annotate({
1200
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1201
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/ipams/{ipam}", code: 200 }))).annotate({
1228
1202
  identifier: "DeleteClusterSdnIpamRequest",
1229
1203
  });
1230
1204
  export const DeleteClusterSdnIpamResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1231
1205
  identifier: "DeleteClusterSdnIpamResponse",
1232
1206
  });
1233
1207
  export const DeleteClusterSdnLockRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1234
- force: S.optional(S.String),
1235
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1236
- }).pipe(T.Http({
1237
- method: "DELETE",
1238
- uri: "/cluster/sdn/lock",
1239
- code: 200,
1240
- contentType: "form-urlencoded",
1241
- }))).annotate({
1208
+ force: S.optional(S.String.pipe(T.Query())),
1209
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1210
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/lock", code: 200 }))).annotate({
1242
1211
  identifier: "DeleteClusterSdnLockRequest",
1243
1212
  });
1244
1213
  export const DeleteClusterSdnLockResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1246,12 +1215,11 @@ export const DeleteClusterSdnLockResponse = /*@__PURE__*/ S.suspend(() => S.Stru
1246
1215
  });
1247
1216
  export const DeleteClusterSdnPrefixListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1248
1217
  id: S.String.pipe(T.Label()),
1249
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1218
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1250
1219
  }).pipe(T.Http({
1251
1220
  method: "DELETE",
1252
1221
  uri: "/cluster/sdn/prefix-lists/{id}",
1253
1222
  code: 200,
1254
- contentType: "form-urlencoded",
1255
1223
  }))).annotate({
1256
1224
  identifier: "DeleteClusterSdnPrefixListRequest",
1257
1225
  });
@@ -1261,12 +1229,11 @@ export const DeleteClusterSdnPrefixListResponse = /*@__PURE__*/ S.suspend(() =>
1261
1229
  export const DeleteClusterSdnPrefixListEntryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1262
1230
  id: S.String.pipe(T.Label()),
1263
1231
  url_seq: S.String.pipe(T.Label()),
1264
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1232
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1265
1233
  }).pipe(T.Http({
1266
1234
  method: "DELETE",
1267
1235
  uri: "/cluster/sdn/prefix-lists/{id}/entries/{url_seq}",
1268
1236
  code: 200,
1269
- contentType: "form-urlencoded",
1270
1237
  }))).annotate({
1271
1238
  identifier: "DeleteClusterSdnPrefixListEntryRequest",
1272
1239
  });
@@ -1277,12 +1244,11 @@ export const DeleteClusterSdnRouteMapEntryEntryRequest =
1277
1244
  /*@__PURE__*/ S.suspend(() => S.Struct({
1278
1245
  route_map_id: S.String.pipe(T.Label()),
1279
1246
  order: S.String.pipe(T.Label()),
1280
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1247
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1281
1248
  }).pipe(T.Http({
1282
1249
  method: "DELETE",
1283
1250
  uri: "/cluster/sdn/route-maps/entries/{route-map-id}/entry/{order}",
1284
1251
  code: 200,
1285
- contentType: "form-urlencoded",
1286
1252
  }))).annotate({
1287
1253
  identifier: "DeleteClusterSdnRouteMapEntryEntryRequest",
1288
1254
  });
@@ -1292,13 +1258,8 @@ export const DeleteClusterSdnRouteMapEntryEntryResponse =
1292
1258
  });
1293
1259
  export const DeleteClusterSdnVnetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1294
1260
  vnet: S.String.pipe(T.Label()),
1295
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1296
- }).pipe(T.Http({
1297
- method: "DELETE",
1298
- uri: "/cluster/sdn/vnets/{vnet}",
1299
- code: 200,
1300
- contentType: "form-urlencoded",
1301
- }))).annotate({
1261
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1262
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/vnets/{vnet}", code: 200 }))).annotate({
1302
1263
  identifier: "DeleteClusterSdnVnetRequest",
1303
1264
  });
1304
1265
  export const DeleteClusterSdnVnetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1307,12 +1268,11 @@ export const DeleteClusterSdnVnetResponse = /*@__PURE__*/ S.suspend(() => S.Stru
1307
1268
  export const DeleteClusterSdnVnetFirewallRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1308
1269
  vnet: S.String.pipe(T.Label()),
1309
1270
  pos: S.String.pipe(T.Label()),
1310
- digest: S.optional(S.String),
1271
+ digest: S.optional(S.String.pipe(T.Query())),
1311
1272
  }).pipe(T.Http({
1312
1273
  method: "DELETE",
1313
1274
  uri: "/cluster/sdn/vnets/{vnet}/firewall/rules/{pos}",
1314
1275
  code: 200,
1315
- contentType: "form-urlencoded",
1316
1276
  }))).annotate({
1317
1277
  identifier: "DeleteClusterSdnVnetFirewallRuleRequest",
1318
1278
  });
@@ -1321,14 +1281,13 @@ export const DeleteClusterSdnVnetFirewallRuleResponse = /*@__PURE__*/ S.suspend(
1321
1281
  });
1322
1282
  export const DeleteClusterSdnVnetIpsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1323
1283
  vnet: S.String.pipe(T.Label()),
1324
- ip: S.String,
1325
- mac: S.optional(S.String),
1326
- zone: S.String,
1284
+ ip: S.String.pipe(T.Query()),
1285
+ mac: S.optional(S.String.pipe(T.Query())),
1286
+ zone: S.String.pipe(T.Query()),
1327
1287
  }).pipe(T.Http({
1328
1288
  method: "DELETE",
1329
1289
  uri: "/cluster/sdn/vnets/{vnet}/ips",
1330
1290
  code: 200,
1331
- contentType: "form-urlencoded",
1332
1291
  }))).annotate({
1333
1292
  identifier: "DeleteClusterSdnVnetIpsRequest",
1334
1293
  });
@@ -1338,12 +1297,11 @@ export const DeleteClusterSdnVnetIpsResponse = /*@__PURE__*/ S.suspend(() => S.S
1338
1297
  export const DeleteClusterSdnVnetSubnetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1339
1298
  vnet: S.String.pipe(T.Label()),
1340
1299
  subnet: S.String.pipe(T.Label()),
1341
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1300
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1342
1301
  }).pipe(T.Http({
1343
1302
  method: "DELETE",
1344
1303
  uri: "/cluster/sdn/vnets/{vnet}/subnets/{subnet}",
1345
1304
  code: 200,
1346
- contentType: "form-urlencoded",
1347
1305
  }))).annotate({
1348
1306
  identifier: "DeleteClusterSdnVnetSubnetRequest",
1349
1307
  });
@@ -1352,13 +1310,8 @@ export const DeleteClusterSdnVnetSubnetResponse = /*@__PURE__*/ S.suspend(() =>
1352
1310
  });
1353
1311
  export const DeleteClusterSdnZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1354
1312
  zone: S.String.pipe(T.Label()),
1355
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
1356
- }).pipe(T.Http({
1357
- method: "DELETE",
1358
- uri: "/cluster/sdn/zones/{zone}",
1359
- code: 200,
1360
- contentType: "form-urlencoded",
1361
- }))).annotate({
1313
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
1314
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/zones/{zone}", code: 200 }))).annotate({
1362
1315
  identifier: "DeleteClusterSdnZoneRequest",
1363
1316
  });
1364
1317
  export const DeleteClusterSdnZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({