@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
@@ -2586,13 +2586,12 @@ export interface DeleteClusterFirewallAliasRequest {
2586
2586
  export const DeleteClusterFirewallAliasRequest = /*@__PURE__*/ S.suspend(() =>
2587
2587
  S.Struct({
2588
2588
  name: S.String.pipe(T.Label()),
2589
- digest: S.optional(S.String),
2589
+ digest: S.optional(S.String.pipe(T.Query())),
2590
2590
  }).pipe(
2591
2591
  T.Http({
2592
2592
  method: "DELETE",
2593
2593
  uri: "/cluster/firewall/aliases/{name}",
2594
2594
  code: 200,
2595
- contentType: "form-urlencoded",
2596
2595
  }),
2597
2596
  ),
2598
2597
  ).annotate({
@@ -2640,13 +2639,12 @@ export const DeleteClusterFirewallGroup2Request = /*@__PURE__*/ S.suspend(() =>
2640
2639
  S.Struct({
2641
2640
  group: S.String.pipe(T.Label()),
2642
2641
  pos: S.String.pipe(T.Label()),
2643
- digest: S.optional(S.String),
2642
+ digest: S.optional(S.String.pipe(T.Query())),
2644
2643
  }).pipe(
2645
2644
  T.Http({
2646
2645
  method: "DELETE",
2647
2646
  uri: "/cluster/firewall/groups/{group}/{pos}",
2648
2647
  code: 200,
2649
- contentType: "form-urlencoded",
2650
2648
  }),
2651
2649
  ),
2652
2650
  ).annotate({
@@ -2668,13 +2666,12 @@ export interface DeleteClusterFirewallIpsetRequest {
2668
2666
  export const DeleteClusterFirewallIpsetRequest = /*@__PURE__*/ S.suspend(() =>
2669
2667
  S.Struct({
2670
2668
  name: S.String.pipe(T.Label()),
2671
- force: S.optional(S.String),
2669
+ force: S.optional(S.String.pipe(T.Query())),
2672
2670
  }).pipe(
2673
2671
  T.Http({
2674
2672
  method: "DELETE",
2675
2673
  uri: "/cluster/firewall/ipset/{name}",
2676
2674
  code: 200,
2677
- contentType: "form-urlencoded",
2678
2675
  }),
2679
2676
  ),
2680
2677
  ).annotate({
@@ -2698,13 +2695,12 @@ export const DeleteClusterFirewallIpset2Request = /*@__PURE__*/ S.suspend(() =>
2698
2695
  S.Struct({
2699
2696
  name: S.String.pipe(T.Label()),
2700
2697
  cidr: S.String.pipe(T.Label()),
2701
- digest: S.optional(S.String),
2698
+ digest: S.optional(S.String.pipe(T.Query())),
2702
2699
  }).pipe(
2703
2700
  T.Http({
2704
2701
  method: "DELETE",
2705
2702
  uri: "/cluster/firewall/ipset/{name}/{cidr}",
2706
2703
  code: 200,
2707
- contentType: "form-urlencoded",
2708
2704
  }),
2709
2705
  ),
2710
2706
  ).annotate({
@@ -2726,13 +2722,12 @@ export interface DeleteClusterFirewallRuleRequest {
2726
2722
  export const DeleteClusterFirewallRuleRequest = /*@__PURE__*/ S.suspend(() =>
2727
2723
  S.Struct({
2728
2724
  pos: S.String.pipe(T.Label()),
2729
- digest: S.optional(S.String),
2725
+ digest: S.optional(S.String.pipe(T.Query())),
2730
2726
  }).pipe(
2731
2727
  T.Http({
2732
2728
  method: "DELETE",
2733
2729
  uri: "/cluster/firewall/rules/{pos}",
2734
2730
  code: 200,
2735
- contentType: "form-urlencoded",
2736
2731
  }),
2737
2732
  ),
2738
2733
  ).annotate({
@@ -2774,14 +2769,9 @@ export interface DeleteClusterHaResourceRequest {
2774
2769
  export const DeleteClusterHaResourceRequest = /*@__PURE__*/ S.suspend(() =>
2775
2770
  S.Struct({
2776
2771
  sid: S.String.pipe(T.Label()),
2777
- purge: S.optional(S.String),
2772
+ purge: S.optional(S.String.pipe(T.Query())),
2778
2773
  }).pipe(
2779
- T.Http({
2780
- method: "DELETE",
2781
- uri: "/cluster/ha/resources/{sid}",
2782
- code: 200,
2783
- contentType: "form-urlencoded",
2784
- }),
2774
+ T.Http({ method: "DELETE", uri: "/cluster/ha/resources/{sid}", code: 200 }),
2785
2775
  ),
2786
2776
  ).annotate({
2787
2777
  identifier: "DeleteClusterHaResourceRequest",
@@ -3078,15 +3068,10 @@ export interface DeleteClusterReplicationRequest {
3078
3068
  export const DeleteClusterReplicationRequest = /*@__PURE__*/ S.suspend(() =>
3079
3069
  S.Struct({
3080
3070
  id: S.String.pipe(T.Label()),
3081
- force: S.optional(S.String),
3082
- keep: S.optional(S.String),
3071
+ force: S.optional(S.String.pipe(T.Query())),
3072
+ keep: S.optional(S.String.pipe(T.Query())),
3083
3073
  }).pipe(
3084
- T.Http({
3085
- method: "DELETE",
3086
- uri: "/cluster/replication/{id}",
3087
- code: 200,
3088
- contentType: "form-urlencoded",
3089
- }),
3074
+ T.Http({ method: "DELETE", uri: "/cluster/replication/{id}", code: 200 }),
3090
3075
  ),
3091
3076
  ).annotate({
3092
3077
  identifier: "DeleteClusterReplicationRequest",
@@ -3107,13 +3092,12 @@ export interface DeleteClusterSdnControllerRequest {
3107
3092
  export const DeleteClusterSdnControllerRequest = /*@__PURE__*/ S.suspend(() =>
3108
3093
  S.Struct({
3109
3094
  controller: S.String.pipe(T.Label()),
3110
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3095
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3111
3096
  }).pipe(
3112
3097
  T.Http({
3113
3098
  method: "DELETE",
3114
3099
  uri: "/cluster/sdn/controllers/{controller}",
3115
3100
  code: 200,
3116
- contentType: "form-urlencoded",
3117
3101
  }),
3118
3102
  ),
3119
3103
  ).annotate({
@@ -3135,14 +3119,9 @@ export interface DeleteClusterSdnDnsRequest {
3135
3119
  export const DeleteClusterSdnDnsRequest = /*@__PURE__*/ S.suspend(() =>
3136
3120
  S.Struct({
3137
3121
  dns: S.String.pipe(T.Label()),
3138
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3122
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3139
3123
  }).pipe(
3140
- T.Http({
3141
- method: "DELETE",
3142
- uri: "/cluster/sdn/dns/{dns}",
3143
- code: 200,
3144
- contentType: "form-urlencoded",
3145
- }),
3124
+ T.Http({ method: "DELETE", uri: "/cluster/sdn/dns/{dns}", code: 200 }),
3146
3125
  ),
3147
3126
  ).annotate({
3148
3127
  identifier: "DeleteClusterSdnDnsRequest",
@@ -3213,14 +3192,9 @@ export interface DeleteClusterSdnIpamRequest {
3213
3192
  export const DeleteClusterSdnIpamRequest = /*@__PURE__*/ S.suspend(() =>
3214
3193
  S.Struct({
3215
3194
  ipam: S.String.pipe(T.Label()),
3216
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3195
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3217
3196
  }).pipe(
3218
- T.Http({
3219
- method: "DELETE",
3220
- uri: "/cluster/sdn/ipams/{ipam}",
3221
- code: 200,
3222
- contentType: "form-urlencoded",
3223
- }),
3197
+ T.Http({ method: "DELETE", uri: "/cluster/sdn/ipams/{ipam}", code: 200 }),
3224
3198
  ),
3225
3199
  ).annotate({
3226
3200
  identifier: "DeleteClusterSdnIpamRequest",
@@ -3241,16 +3215,9 @@ export interface DeleteClusterSdnLockRequest {
3241
3215
  }
3242
3216
  export const DeleteClusterSdnLockRequest = /*@__PURE__*/ S.suspend(() =>
3243
3217
  S.Struct({
3244
- force: S.optional(S.String),
3245
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3246
- }).pipe(
3247
- T.Http({
3248
- method: "DELETE",
3249
- uri: "/cluster/sdn/lock",
3250
- code: 200,
3251
- contentType: "form-urlencoded",
3252
- }),
3253
- ),
3218
+ force: S.optional(S.String.pipe(T.Query())),
3219
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3220
+ }).pipe(T.Http({ method: "DELETE", uri: "/cluster/sdn/lock", code: 200 })),
3254
3221
  ).annotate({
3255
3222
  identifier: "DeleteClusterSdnLockRequest",
3256
3223
  }) as any as S.Schema<DeleteClusterSdnLockRequest>;
@@ -3270,13 +3237,12 @@ export interface DeleteClusterSdnPrefixListRequest {
3270
3237
  export const DeleteClusterSdnPrefixListRequest = /*@__PURE__*/ S.suspend(() =>
3271
3238
  S.Struct({
3272
3239
  id: S.String.pipe(T.Label()),
3273
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3240
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3274
3241
  }).pipe(
3275
3242
  T.Http({
3276
3243
  method: "DELETE",
3277
3244
  uri: "/cluster/sdn/prefix-lists/{id}",
3278
3245
  code: 200,
3279
- contentType: "form-urlencoded",
3280
3246
  }),
3281
3247
  ),
3282
3248
  ).annotate({
@@ -3301,13 +3267,12 @@ export const DeleteClusterSdnPrefixListEntryRequest = /*@__PURE__*/ S.suspend(
3301
3267
  S.Struct({
3302
3268
  id: S.String.pipe(T.Label()),
3303
3269
  url_seq: S.String.pipe(T.Label()),
3304
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3270
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3305
3271
  }).pipe(
3306
3272
  T.Http({
3307
3273
  method: "DELETE",
3308
3274
  uri: "/cluster/sdn/prefix-lists/{id}/entries/{url_seq}",
3309
3275
  code: 200,
3310
- contentType: "form-urlencoded",
3311
3276
  }),
3312
3277
  ),
3313
3278
  ).annotate({
@@ -3332,13 +3297,12 @@ export const DeleteClusterSdnRouteMapEntryEntryRequest =
3332
3297
  S.Struct({
3333
3298
  route_map_id: S.String.pipe(T.Label()),
3334
3299
  order: S.String.pipe(T.Label()),
3335
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3300
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3336
3301
  }).pipe(
3337
3302
  T.Http({
3338
3303
  method: "DELETE",
3339
3304
  uri: "/cluster/sdn/route-maps/entries/{route-map-id}/entry/{order}",
3340
3305
  code: 200,
3341
- contentType: "form-urlencoded",
3342
3306
  }),
3343
3307
  ),
3344
3308
  ).annotate({
@@ -3359,14 +3323,9 @@ export interface DeleteClusterSdnVnetRequest {
3359
3323
  export const DeleteClusterSdnVnetRequest = /*@__PURE__*/ S.suspend(() =>
3360
3324
  S.Struct({
3361
3325
  vnet: S.String.pipe(T.Label()),
3362
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3326
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3363
3327
  }).pipe(
3364
- T.Http({
3365
- method: "DELETE",
3366
- uri: "/cluster/sdn/vnets/{vnet}",
3367
- code: 200,
3368
- contentType: "form-urlencoded",
3369
- }),
3328
+ T.Http({ method: "DELETE", uri: "/cluster/sdn/vnets/{vnet}", code: 200 }),
3370
3329
  ),
3371
3330
  ).annotate({
3372
3331
  identifier: "DeleteClusterSdnVnetRequest",
@@ -3390,13 +3349,12 @@ export const DeleteClusterSdnVnetFirewallRuleRequest = /*@__PURE__*/ S.suspend(
3390
3349
  S.Struct({
3391
3350
  vnet: S.String.pipe(T.Label()),
3392
3351
  pos: S.String.pipe(T.Label()),
3393
- digest: S.optional(S.String),
3352
+ digest: S.optional(S.String.pipe(T.Query())),
3394
3353
  }).pipe(
3395
3354
  T.Http({
3396
3355
  method: "DELETE",
3397
3356
  uri: "/cluster/sdn/vnets/{vnet}/firewall/rules/{pos}",
3398
3357
  code: 200,
3399
- contentType: "form-urlencoded",
3400
3358
  }),
3401
3359
  ),
3402
3360
  ).annotate({
@@ -3422,15 +3380,14 @@ export interface DeleteClusterSdnVnetIpsRequest {
3422
3380
  export const DeleteClusterSdnVnetIpsRequest = /*@__PURE__*/ S.suspend(() =>
3423
3381
  S.Struct({
3424
3382
  vnet: S.String.pipe(T.Label()),
3425
- ip: S.String,
3426
- mac: S.optional(S.String),
3427
- zone: S.String,
3383
+ ip: S.String.pipe(T.Query()),
3384
+ mac: S.optional(S.String.pipe(T.Query())),
3385
+ zone: S.String.pipe(T.Query()),
3428
3386
  }).pipe(
3429
3387
  T.Http({
3430
3388
  method: "DELETE",
3431
3389
  uri: "/cluster/sdn/vnets/{vnet}/ips",
3432
3390
  code: 200,
3433
- contentType: "form-urlencoded",
3434
3391
  }),
3435
3392
  ),
3436
3393
  ).annotate({
@@ -3454,13 +3411,12 @@ export const DeleteClusterSdnVnetSubnetRequest = /*@__PURE__*/ S.suspend(() =>
3454
3411
  S.Struct({
3455
3412
  vnet: S.String.pipe(T.Label()),
3456
3413
  subnet: S.String.pipe(T.Label()),
3457
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3414
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3458
3415
  }).pipe(
3459
3416
  T.Http({
3460
3417
  method: "DELETE",
3461
3418
  uri: "/cluster/sdn/vnets/{vnet}/subnets/{subnet}",
3462
3419
  code: 200,
3463
- contentType: "form-urlencoded",
3464
3420
  }),
3465
3421
  ),
3466
3422
  ).annotate({
@@ -3482,14 +3438,9 @@ export interface DeleteClusterSdnZoneRequest {
3482
3438
  export const DeleteClusterSdnZoneRequest = /*@__PURE__*/ S.suspend(() =>
3483
3439
  S.Struct({
3484
3440
  zone: S.String.pipe(T.Label()),
3485
- lock_token: S.optional(S.String.pipe(T.Body("lock-token"))),
3441
+ lock_token: S.optional(S.String.pipe(T.Query("lock-token"))),
3486
3442
  }).pipe(
3487
- T.Http({
3488
- method: "DELETE",
3489
- uri: "/cluster/sdn/zones/{zone}",
3490
- code: 200,
3491
- contentType: "form-urlencoded",
3492
- }),
3443
+ T.Http({ method: "DELETE", uri: "/cluster/sdn/zones/{zone}", code: 200 }),
3493
3444
  ),
3494
3445
  ).annotate({
3495
3446
  identifier: "DeleteClusterSdnZoneRequest",