@virtbase/proxmox-api 2.0.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.
- package/CHANGELOG.md +500 -0
- package/README.md +110 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +47 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/model.d.ts +30331 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +17 -0
- package/dist/model.js.map +1 -0
- package/dist/proxmox-engine.d.ts +112 -0
- package/dist/proxmox-engine.d.ts.map +1 -0
- package/dist/proxmox-engine.js +308 -0
- package/dist/proxmox-engine.js.map +1 -0
- package/dist/proxy.d.ts +39 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +135 -0
- package/dist/proxy.js.map +1 -0
- package/dist/qm-monitor.d.ts +96 -0
- package/dist/qm-monitor.d.ts.map +1 -0
- package/dist/qm-monitor.js +212 -0
- package/dist/qm-monitor.js.map +1 -0
- package/package.json +65 -0
- package/src/__tests__/helpers.ts +39 -0
- package/src/__tests__/proxmox-engine.test.ts +393 -0
- package/src/__tests__/proxy.test.ts +190 -0
- package/src/__tests__/qm-monitor.test.ts +215 -0
- package/src/client.ts +58 -0
- package/src/index.ts +34 -0
- package/src/model.ts +32055 -0
- package/src/proxmox-engine.ts +452 -0
- package/src/proxy.ts +195 -0
- package/src/qm-monitor.ts +303 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@virtbase/proxmox-api`.
|
|
4
|
+
|
|
5
|
+
Entries from `2.0.0` onward are generated by
|
|
6
|
+
[release-please](https://github.com/googleapis/release-please) from
|
|
7
|
+
[Conventional Commits](https://www.conventionalcommits.org/); do not edit them
|
|
8
|
+
by hand.
|
|
9
|
+
|
|
10
|
+
Everything at `1.1.1` and below is the history of
|
|
11
|
+
[UrielCh/proxmox-api](https://github.com/UrielCh/proxmox-api), reconstructed
|
|
12
|
+
from that repository's commits and tags. Those commits predate this project's
|
|
13
|
+
commit conventions, so the sections below them were inferred from commit
|
|
14
|
+
subjects and are approximate. Where the previous maintainer wrote release notes
|
|
15
|
+
by hand, they are kept verbatim above the reconstructed sections.
|
|
16
|
+
|
|
17
|
+
## Unreleased
|
|
18
|
+
|
|
19
|
+
Forked from [UrielCh/proxmox-api](https://github.com/UrielCh/proxmox-api) at v1.1.1
|
|
20
|
+
and republished as `@virtbase/proxmox-api`.
|
|
21
|
+
|
|
22
|
+
* **Breaking:** ESM only. The CommonJS build (`cjs/`, `tsconfig-cjs.json`) and the
|
|
23
|
+
`require` condition in `exports` are gone; output moved from `esm/` to `dist/`.
|
|
24
|
+
* **Breaking:** renamed to `@virtbase/proxmox-api`.
|
|
25
|
+
* **Breaking:** the API model now targets **Proxmox VE 9** (was PVE 8): 678
|
|
26
|
+
operations, +98 added and -3 removed. New surface includes SDN fabrics, HA
|
|
27
|
+
rules, `cluster/bulk-action`, `cluster/qemu` custom CPU models, SDN
|
|
28
|
+
prefix-lists and route-maps, webhook notification endpoints, and
|
|
29
|
+
`cluster/metrics/export`. Gone: `nodes/{node}/hardware/pci/{pciid}`,
|
|
30
|
+
`.../{pciid}/mdev` and `nodes/{node}/scan/glusterfs`.
|
|
31
|
+
* **Breaking:** returned objects no longer carry a blanket
|
|
32
|
+
`[key: string]: any`. It was applied to every response regardless of the
|
|
33
|
+
schema, which defeated type checking on all of them; it is now emitted only
|
|
34
|
+
where the schema permits extra keys.
|
|
35
|
+
* Indexed parameters (`net[n]`, `scsi[n]`, `mp[n]`, ...) are expanded to the
|
|
36
|
+
slots the API actually accepts - `scsi0`..`scsi30`, `ide0`..`ide3`,
|
|
37
|
+
`net0`..`net31`, `usb0`..`usb13`, `mp0`..`mp255`, and so on - taken from the
|
|
38
|
+
constants that generate them in qemu-server, pve-container, pve-cluster and
|
|
39
|
+
pve-manager. Upstream capped them at a hand-picked `net0`..`net3`, which
|
|
40
|
+
rejected valid configurations.
|
|
41
|
+
* Enumerations are emitted as unions and named PVE formats as string aliases,
|
|
42
|
+
both deduplicated across the whole model.
|
|
43
|
+
* **Breaking:** `undici` is no longer a dependency - the client uses the
|
|
44
|
+
platform `fetch`. The package now has no runtime dependencies and no `node:`
|
|
45
|
+
imports.
|
|
46
|
+
* Import via `node:` protocol in `ProxmoxEngine`.
|
|
47
|
+
* **Breaking:** `ApiRequestable.doRequest` returns `Promise<unknown>` rather
|
|
48
|
+
than `Promise<any>`, and takes `ApiParamType` for its parameters. Custom
|
|
49
|
+
engines still satisfy it; direct callers of `doRequest` now need a cast.
|
|
50
|
+
* **Breaking:** `USBInfo.product` and `USBInfo.id` are optional, matching the
|
|
51
|
+
monitor output they are parsed from - the trailing `, Product ..., ID: ...`
|
|
52
|
+
is not always present.
|
|
53
|
+
* **Breaking:** `QmMonitor.infoUsb()` no longer takes a filter argument. It
|
|
54
|
+
accepted one whose fields (`vendorId`, `productId`) did not exist on
|
|
55
|
+
`USBInfo`, and never applied it.
|
|
56
|
+
* **Breaking:** `QmMonitor.deviceAddMissing` returns the ids it attached and
|
|
57
|
+
awaits each attach. It previously fired them without awaiting, so failures
|
|
58
|
+
disappeared and the guest saw an unbounded burst of monitor commands.
|
|
59
|
+
* Fixed `QmMonitor.infoUsbhost` filtering: `vendorId` and `productId` both
|
|
60
|
+
tested the device *name*, so neither filter could ever match.
|
|
61
|
+
* Fixed `String(proxmox)` recursing until the stack overflowed. Reserved
|
|
62
|
+
methods were returned unbound, so `toString` read `this.path` back through
|
|
63
|
+
the proxy and stringified the result forever.
|
|
64
|
+
* Path segments passed to `$()` now escape `?` and `#` as well as `/`, so a
|
|
65
|
+
value cannot truncate the path or start a query string.
|
|
66
|
+
* Documentation moved to a VitePress site: hand-written guides, a client
|
|
67
|
+
reference, and an endpoint reference generated from the same schema parse as
|
|
68
|
+
the types. Replaces 63 MB of committed typedoc HTML that documented the PVE 8
|
|
69
|
+
surface.
|
|
70
|
+
|
|
71
|
+
## [2.0.0](https://github.com/virtbase/proxmox-api/compare/1.1.1...2.0.0) (2026-09-04)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### ⚠ BREAKING CHANGES
|
|
75
|
+
|
|
76
|
+
* ESM only, renamed from proxmox-api, API model regenerated for Proxmox VE 9, and undici replaced by the platform fetch.
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* fork as @virtbase/proxmox-api targeting Proxmox VE 9 ([#3](https://github.com/virtbase/proxmox-api/issues/3)) ([efe8b74](https://github.com/virtbase/proxmox-api/commit/efe8b744e6effcc9daf1c71b930ae94ff8654288))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Refactoring
|
|
84
|
+
|
|
85
|
+
* clean up ProxmoxEngine ([80728e4](https://github.com/virtbase/proxmox-api/commit/80728e4469a26168e7e54e0e1f3269cbc7650fb0))
|
|
86
|
+
* setup turborepo with bun ([39e1290](https://github.com/virtbase/proxmox-api/commit/39e12907cf3c749a6109e6270b963b4f26ca3e62))
|
|
87
|
+
* update docs generator with vitepress ([a16a74e](https://github.com/virtbase/proxmox-api/commit/a16a74e955577983b48f5c157dbc89c44403a1b1))
|
|
88
|
+
* update generator and drop legacy model ([c2e745d](https://github.com/virtbase/proxmox-api/commit/c2e745d652715c898742f570b76f48f680f17c34))
|
|
89
|
+
|
|
90
|
+
## [1.1.1](https://github.com/virtbase/proxmox-api/compare/1.1.0...1.1.1) (2024-09-11)
|
|
91
|
+
|
|
92
|
+
### Bug fixes
|
|
93
|
+
|
|
94
|
+
* add test + fix typo + update deps ([c9e3348](https://github.com/virtbase/proxmox-api/commit/c9e33480d112e3f1139ea375b47ff846def14e7d))
|
|
95
|
+
* fix issue 34 ([d221d83](https://github.com/virtbase/proxmox-api/commit/d221d8352b47d349804ea66a071c00080dd9b957))
|
|
96
|
+
|
|
97
|
+
### Other changes
|
|
98
|
+
|
|
99
|
+
* replace ts-node by tsx ([1e7e4a0](https://github.com/virtbase/proxmox-api/commit/1e7e4a0609d6b29ae9da9b0e5ef2ad4c91c430b2))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## [1.1.0](https://github.com/virtbase/proxmox-api/compare/1.0.2...1.1.0) (2024-01-15)
|
|
103
|
+
|
|
104
|
+
* update ESM compatibility
|
|
105
|
+
* add support for Proxmox 8
|
|
106
|
+
* update deps
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
* new esm / cjs export ([9b2f9fa](https://github.com/virtbase/proxmox-api/commit/9b2f9faf538b647a400190e30064e22d8d5568fd))
|
|
111
|
+
|
|
112
|
+
### Dependencies
|
|
113
|
+
|
|
114
|
+
* update dependencies ([768a9a0](https://github.com/virtbase/proxmox-api/commit/768a9a086a36ca0831aa03506f220dfbb4ad31b1))
|
|
115
|
+
|
|
116
|
+
### Documentation
|
|
117
|
+
|
|
118
|
+
* Update README.md ([fbce2fa](https://github.com/virtbase/proxmox-api/commit/fbce2fa1ccc33d53cdf78ebcd0e1116e498550ef))
|
|
119
|
+
* update changelog ([93e3706](https://github.com/virtbase/proxmox-api/commit/93e3706bea1c6a15ae26c2004dd50b8c6a2e2b19))
|
|
120
|
+
|
|
121
|
+
### Other changes
|
|
122
|
+
|
|
123
|
+
* improve typing for pveapi7 ([665bad8](https://github.com/virtbase/proxmox-api/commit/665bad8a58af2fe3666123eb4b3af16c84e46093))
|
|
124
|
+
* update for PVE 8 ([8ebf458](https://github.com/virtbase/proxmox-api/commit/8ebf45834534dfa4b3dc9fe04ac1f1b1928389be))
|
|
125
|
+
* gen V8 Test version ([723f08c](https://github.com/virtbase/proxmox-api/commit/723f08c3bc480516f7cd0e6c2fc01846c26451a1))
|
|
126
|
+
* complet V8 ([9d3d0c9](https://github.com/virtbase/proxmox-api/commit/9d3d0c933ca8e5cb7330fc9529430b5b30d46cd6))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [1.0.2](https://github.com/virtbase/proxmox-api/compare/1.0.1...1.0.2) (2023-05-27)
|
|
130
|
+
|
|
131
|
+
* Merge PR 20
|
|
132
|
+
|
|
133
|
+
### Features
|
|
134
|
+
|
|
135
|
+
* make port optional ([e37e658](https://github.com/virtbase/proxmox-api/commit/e37e658a5a2e80016666ac98ce2ffa111f60e3dc))
|
|
136
|
+
* update proxmox url, add support for a no-port endpoint ([f764c04](https://github.com/virtbase/proxmox-api/commit/f764c049879b4a0bd7f60fed7c514cb5fac472f5))
|
|
137
|
+
* update proxmox-ticket url, add support for a no-port endpoint ([e6c234b](https://github.com/virtbase/proxmox-api/commit/e6c234ba43ea88e0fedbbc5594f86b3c22f9e68c))
|
|
138
|
+
|
|
139
|
+
### Bug fixes
|
|
140
|
+
|
|
141
|
+
* Fix PR #20 ([ef44f28](https://github.com/virtbase/proxmox-api/commit/ef44f284929c3cb4601352d966c6b37cc1c2a8e4))
|
|
142
|
+
|
|
143
|
+
### Documentation
|
|
144
|
+
|
|
145
|
+
* update readme ([f4f145c](https://github.com/virtbase/proxmox-api/commit/f4f145c17a8273edfad6ea54ecc3e4aa5a7b2459))
|
|
146
|
+
|
|
147
|
+
### Other changes
|
|
148
|
+
|
|
149
|
+
* remove default port fallback' ([13cc21e](https://github.com/virtbase/proxmox-api/commit/13cc21ef0462be017786ad9a6e8597448219acf9))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [1.0.1](https://github.com/virtbase/proxmox-api/compare/1.0.0...1.0.1) (2023-05-23)
|
|
153
|
+
|
|
154
|
+
* improve codebase adding CODE_OF_CONDUCT.md, CONTRIBUTING.md
|
|
155
|
+
* add funding
|
|
156
|
+
* fix common-js usage for the project
|
|
157
|
+
|
|
158
|
+
### Features
|
|
159
|
+
|
|
160
|
+
* add CODE\_OF\_CONDUCT / CONTRIBUTING / funding ([3dd19e8](https://github.com/virtbase/proxmox-api/commit/3dd19e8e55f4fa38553818b0f7441fbdc2401e22))
|
|
161
|
+
|
|
162
|
+
### Dependencies
|
|
163
|
+
|
|
164
|
+
* update package,json ([3d18bd4](https://github.com/virtbase/proxmox-api/commit/3d18bd428156ee4d3ad52b695450bd0bef89ffb4))
|
|
165
|
+
* update deps ([f11facc](https://github.com/virtbase/proxmox-api/commit/f11faccb23f3ac16389aca46dad49e0dd647a29c))
|
|
166
|
+
|
|
167
|
+
### Other changes
|
|
168
|
+
|
|
169
|
+
* change honme page ([01cd442](https://github.com/virtbase/proxmox-api/commit/01cd442b13f36e0e3d04e4ac84bc6ddf040b44f8))
|
|
170
|
+
* change version to 1.0.1 ([b4aea1d](https://github.com/virtbase/proxmox-api/commit/b4aea1d53ce101bdfae7bedbb3892ed5b777ad0f))
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## [1.0.0](https://github.com/virtbase/proxmox-api/compare/0.4.2...1.0.0) (2022-12-08)
|
|
174
|
+
|
|
175
|
+
* Dual stack package, ESM + CJS
|
|
176
|
+
* Should work with deno
|
|
177
|
+
|
|
178
|
+
### Other changes
|
|
179
|
+
|
|
180
|
+
* update lock ([22924a1](https://github.com/virtbase/proxmox-api/commit/22924a1cb16480e0d0ad280f2576efb9771aec9a))
|
|
181
|
+
* esm VERSION ([99a9ebf](https://github.com/virtbase/proxmox-api/commit/99a9ebf0bd6d6b475cb848706b88ae7158051aa8))
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
## [0.4.2](https://github.com/virtbase/proxmox-api/compare/0.4.1...0.4.2) (2022-09-23)
|
|
185
|
+
|
|
186
|
+
* add application/octet-stream support
|
|
187
|
+
|
|
188
|
+
### Features
|
|
189
|
+
|
|
190
|
+
* add application/octet-stream suport ([0f0c57a](https://github.com/virtbase/proxmox-api/commit/0f0c57afbebe3880fdef772cbb4d10be01fcedfa))
|
|
191
|
+
|
|
192
|
+
### Documentation
|
|
193
|
+
|
|
194
|
+
* update changelog ([3df5ee2](https://github.com/virtbase/proxmox-api/commit/3df5ee225b818fa6d01525de133e32a8d7513cd8))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
## [0.4.1](https://github.com/virtbase/proxmox-api/compare/0.4.0...0.4.1) (2022-09-14)
|
|
198
|
+
|
|
199
|
+
* rewrite undici fetch integration.
|
|
200
|
+
* add debug parameter.
|
|
201
|
+
* add cause in Exception
|
|
202
|
+
* remove console.log
|
|
203
|
+
|
|
204
|
+
### Documentation
|
|
205
|
+
|
|
206
|
+
* update Changelog ([5d685bc](https://github.com/virtbase/proxmox-api/commit/5d685bc96608a702aad7abef2347246d113b14c4))
|
|
207
|
+
|
|
208
|
+
### Other changes
|
|
209
|
+
|
|
210
|
+
* cleanup ([5d2c943](https://github.com/virtbase/proxmox-api/commit/5d2c94332d39b5e70992a7c41dc2b81173fa131c))
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## [0.4.0](https://github.com/virtbase/proxmox-api/compare/0.3.2...0.4.0) (2022-09-14)
|
|
214
|
+
|
|
215
|
+
* use undici fetch (will fix issue 14 in the next release)
|
|
216
|
+
* add proxmoxApi export (same as default)
|
|
217
|
+
* fix missing GET params. (issue 11 and 12)
|
|
218
|
+
|
|
219
|
+
### Bug fixes
|
|
220
|
+
|
|
221
|
+
* fix previous commit bug ([f6b26d9](https://github.com/virtbase/proxmox-api/commit/f6b26d9a1f8b6be1e6660c7f6f73d41d8b72018b))
|
|
222
|
+
|
|
223
|
+
### Other changes
|
|
224
|
+
|
|
225
|
+
* use fetch ([c63140a](https://github.com/virtbase/proxmox-api/commit/c63140ace5d41a175dc9d53ec8627e7e9ca6d57c))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
## [0.3.2](https://github.com/virtbase/proxmox-api/compare/0.3.1...0.3.2) (2022-08-18)
|
|
229
|
+
|
|
230
|
+
* add missing uppercase on method. (issue 10)
|
|
231
|
+
|
|
232
|
+
### Other changes
|
|
233
|
+
|
|
234
|
+
* uppercase httpMethod ([4bbe1b6](https://github.com/virtbase/proxmox-api/commit/4bbe1b6c4209f97482153f02f3c425a1b166e6d5))
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## [0.3.1](https://github.com/virtbase/proxmox-api/compare/0.3.0...0.3.1) (2022-08-16)
|
|
238
|
+
|
|
239
|
+
* fix regrestion in API Keys usage. (issue 9)
|
|
240
|
+
|
|
241
|
+
### Features
|
|
242
|
+
|
|
243
|
+
* add changelog ([8aa3f1e](https://github.com/virtbase/proxmox-api/commit/8aa3f1ebca6944cd8f48b0fdbe277bf0acdf30cd))
|
|
244
|
+
|
|
245
|
+
### Bug fixes
|
|
246
|
+
|
|
247
|
+
* fix issue 9 ([bbf35ed](https://github.com/virtbase/proxmox-api/commit/bbf35eda77fd6e711e141f422fe6e8ba357db03e))
|
|
248
|
+
|
|
249
|
+
### Documentation
|
|
250
|
+
|
|
251
|
+
* update readme ([64a4dc7](https://github.com/virtbase/proxmox-api/commit/64a4dc7b8362fcdd6dd83a3be9d8cf5929c5c3ff))
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
## [0.3.0](https://github.com/virtbase/proxmox-api/compare/0.3.0-beta3...0.3.0) (2022-08-02)
|
|
255
|
+
|
|
256
|
+
* fix project layout
|
|
257
|
+
* add doc
|
|
258
|
+
* change proxmoxApi signature to proxmoxApi(options: ProxmoxEngineOptions | ApiRequestable): Proxmox.Api.
|
|
259
|
+
|
|
260
|
+
### Features
|
|
261
|
+
|
|
262
|
+
* add doc ([ba810cc](https://github.com/virtbase/proxmox-api/commit/ba810ccdd89d4c60b63f416287160098fd6aeb4c))
|
|
263
|
+
|
|
264
|
+
### Bug fixes
|
|
265
|
+
|
|
266
|
+
* fix missing licence header ([25ec7cd](https://github.com/virtbase/proxmox-api/commit/25ec7cd056f779bb6406c698d3e41007461b1a2c))
|
|
267
|
+
* move docs to the correct path ([06f03c8](https://github.com/virtbase/proxmox-api/commit/06f03c867ac00a7855bb38fab65df1a253938a4f))
|
|
268
|
+
|
|
269
|
+
### Documentation
|
|
270
|
+
|
|
271
|
+
* regen doc ([60b45c2](https://github.com/virtbase/proxmox-api/commit/60b45c21696517bd49e526bae7c601e70193d26b))
|
|
272
|
+
|
|
273
|
+
### Other changes
|
|
274
|
+
|
|
275
|
+
* refresh the project. ([f657bbd](https://github.com/virtbase/proxmox-api/commit/f657bbd56028e384ad933bb44b1a3e2061f6d52e))
|
|
276
|
+
* change homepage ([eee2cb3](https://github.com/virtbase/proxmox-api/commit/eee2cb325263c71fe932fcd603a5f49ec406e46e))
|
|
277
|
+
* update generator ([ec057ca](https://github.com/virtbase/proxmox-api/commit/ec057ca4a89087c6dad8922dbaf2c6a77824aa44))
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
## [0.3.0-beta3](https://github.com/virtbase/proxmox-api/compare/0.3.0-beta2...0.3.0-beta3) (2021-12-07)
|
|
281
|
+
|
|
282
|
+
### Bug fixes
|
|
283
|
+
|
|
284
|
+
* fix deps error ([52c70dd](https://github.com/virtbase/proxmox-api/commit/52c70dd6466078258c8016849a3d39fc820b15cb))
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
## [0.3.0-beta2](https://github.com/virtbase/proxmox-api/compare/0.3.0-beta...0.3.0-beta2) (2021-12-07)
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## [0.3.0-beta](https://github.com/virtbase/proxmox-api/compare/0.2.0...0.3.0-beta) (2021-12-07)
|
|
291
|
+
|
|
292
|
+
### Features
|
|
293
|
+
|
|
294
|
+
* start PVE 7 support ([6747ec4](https://github.com/virtbase/proxmox-api/commit/6747ec43c373d179fcdf3ed6c136e1313011ebeb))
|
|
295
|
+
|
|
296
|
+
### Bug fixes
|
|
297
|
+
|
|
298
|
+
* fix typo error ([ed6442c](https://github.com/virtbase/proxmox-api/commit/ed6442c139de1cafa36eac3e016db9bda80db967))
|
|
299
|
+
|
|
300
|
+
### Dependencies
|
|
301
|
+
|
|
302
|
+
* Update package.json ([4ca8177](https://github.com/virtbase/proxmox-api/commit/4ca817756d6fe1d1a530d3a9f66dbbc1b10a6a0a))
|
|
303
|
+
|
|
304
|
+
### Other changes
|
|
305
|
+
|
|
306
|
+
* update author ([6ffd35f](https://github.com/virtbase/proxmox-api/commit/6ffd35f6bc336b4f412a73d80d45b4487b1f31ed))
|
|
307
|
+
* sort types in generated files ([0bac476](https://github.com/virtbase/proxmox-api/commit/0bac476e8448ae7c6870391849c78f4a098ed59b))
|
|
308
|
+
* sort type in generated files ([9a506c2](https://github.com/virtbase/proxmox-api/commit/9a506c2b7f7ecefa6c15ac5a88629d8a3d262ca7))
|
|
309
|
+
* sort enums ([55ca0ea](https://github.com/virtbase/proxmox-api/commit/55ca0ea0b5797ca97ee594c3c0b2440db48c7026))
|
|
310
|
+
* drop exta package json files ([3307c29](https://github.com/virtbase/proxmox-api/commit/3307c297afc882e05e2f4a984b956ef84e282513))
|
|
311
|
+
* drop node-fetch ([02f42c9](https://github.com/virtbase/proxmox-api/commit/02f42c923cca63366f6a21356dbd8a00ba336e23))
|
|
312
|
+
* use external @u4/tinyrequest ([851e3df](https://github.com/virtbase/proxmox-api/commit/851e3df8720d3306697361f2701e4b5533f2f036))
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
## [0.2.0](https://github.com/virtbase/proxmox-api/compare/0.1.3...0.2.0) (2021-06-06)
|
|
316
|
+
|
|
317
|
+
### Other changes
|
|
318
|
+
|
|
319
|
+
* start V0.2.0 + token auth ([05e01b7](https://github.com/virtbase/proxmox-api/commit/05e01b7e0ec87ba40daa2eaa06ca89c5a30fda03))
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## [0.1.3](https://github.com/virtbase/proxmox-api/compare/0.1.2...0.1.3) (2021-01-04)
|
|
323
|
+
|
|
324
|
+
* add authTimeout option, to limit authentification time.
|
|
325
|
+
* add queryTimeout option to limit non auth request timeout.
|
|
326
|
+
|
|
327
|
+
### Features
|
|
328
|
+
|
|
329
|
+
* add timeouts ([27e6a9a](https://github.com/virtbase/proxmox-api/commit/27e6a9a879e025eee2714084aae5d9745949f0a4))
|
|
330
|
+
|
|
331
|
+
### Dependencies
|
|
332
|
+
|
|
333
|
+
* update deps ([6196db3](https://github.com/virtbase/proxmox-api/commit/6196db3be66016bc44cf5e71d7e4c5d80795c95d))
|
|
334
|
+
|
|
335
|
+
### Documentation
|
|
336
|
+
|
|
337
|
+
* update doc ([e8dfcec](https://github.com/virtbase/proxmox-api/commit/e8dfcec879456f1b24e7b7d5ff1f87e9b777510d))
|
|
338
|
+
* doc ([7176af7](https://github.com/virtbase/proxmox-api/commit/7176af73cfc0e6af73f0111c16b0cd476233d2e4))
|
|
339
|
+
* doc ([8a30868](https://github.com/virtbase/proxmox-api/commit/8a30868423f34f74fa283cd6e3625d68fc8882bb))
|
|
340
|
+
* Update README.md ([d31b338](https://github.com/virtbase/proxmox-api/commit/d31b338f7549954fe28192cfbd2221b88585c667))
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
## [0.1.2](https://github.com/virtbase/proxmox-api/compare/0.1.1...0.1.2) (2020-10-31)
|
|
344
|
+
|
|
345
|
+
### Features
|
|
346
|
+
|
|
347
|
+
* use new Proxmox-api ([fe8cd82](https://github.com/virtbase/proxmox-api/commit/fe8cd8235ac55ec52b36becae1b683356adbaab6))
|
|
348
|
+
* add dev-input-reader for next evolution ([eae2a65](https://github.com/virtbase/proxmox-api/commit/eae2a659140fdff2ba26556c46366a683b33f9c2))
|
|
349
|
+
|
|
350
|
+
### Bug fixes
|
|
351
|
+
|
|
352
|
+
* fix + add hotkeys ([bbd0f1b](https://github.com/virtbase/proxmox-api/commit/bbd0f1b944f1a24450aaa27925973e804a981aba))
|
|
353
|
+
|
|
354
|
+
### Documentation
|
|
355
|
+
|
|
356
|
+
* update doc ([29f3d3c](https://github.com/virtbase/proxmox-api/commit/29f3d3c2ea396c270bf427705ac0bb528399b05f))
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
## [0.1.1](https://github.com/virtbase/proxmox-api/compare/0.1.0...0.1.1) (2020-10-02)
|
|
360
|
+
|
|
361
|
+
### Bug fixes
|
|
362
|
+
|
|
363
|
+
* Fix reconnexion code in API ([3162f6c](https://github.com/virtbase/proxmox-api/commit/3162f6c98a4b34c25aa6c3183f48a5c31eac16e7))
|
|
364
|
+
|
|
365
|
+
### Documentation
|
|
366
|
+
|
|
367
|
+
* update docs / conf ([c224c89](https://github.com/virtbase/proxmox-api/commit/c224c895477ec73c8c2bcf69bd1940f74662b9e5))
|
|
368
|
+
* update docs ([a9e7e65](https://github.com/virtbase/proxmox-api/commit/a9e7e6544ff98b50937e6f6264dbb9b5bb0ff76b))
|
|
369
|
+
* update docs V 0.1.2 ([65e1809](https://github.com/virtbase/proxmox-api/commit/65e1809ff6f9592a478f22d8b1c9c32ab6cf20ea))
|
|
370
|
+
* clean docs ([9ff8795](https://github.com/virtbase/proxmox-api/commit/9ff8795b9b28bf6f25ac7614f7bf5c5bb2b1958f))
|
|
371
|
+
|
|
372
|
+
### Other changes
|
|
373
|
+
|
|
374
|
+
* more heavy changes ([eb7fd7b](https://github.com/virtbase/proxmox-api/commit/eb7fd7be4175c4146b2763232a74be2d0df6d764))
|
|
375
|
+
* change homepage ([562d996](https://github.com/virtbase/proxmox-api/commit/562d9961d821a834e74cc60925230b8f5b371af6))
|
|
376
|
+
* remove console.log ([4a71f62](https://github.com/virtbase/proxmox-api/commit/4a71f62ac94addfdcdbba8316bfa615cd02536d1))
|
|
377
|
+
* improve QmMonitor ([b136bd8](https://github.com/virtbase/proxmox-api/commit/b136bd8f8678cdb6a712dd521fad45362926ea88))
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
## [0.1.0](https://github.com/virtbase/proxmox-api/compare/0.0.7...0.1.0) (2020-10-02)
|
|
381
|
+
|
|
382
|
+
### Bug fixes
|
|
383
|
+
|
|
384
|
+
* add new features + bug with USB hub ([8fe440d](https://github.com/virtbase/proxmox-api/commit/8fe440d5ca5664d0679fc9501cd62ce3d21005df))
|
|
385
|
+
|
|
386
|
+
### Other changes
|
|
387
|
+
|
|
388
|
+
* cleanup ([7f0576f](https://github.com/virtbase/proxmox-api/commit/7f0576f9a381a9ced60e7e92401b6bad5268f3e9))
|
|
389
|
+
* revert original names ([3365751](https://github.com/virtbase/proxmox-api/commit/33657514e710ddd0b284bab75d429d563b4d5a6a))
|
|
390
|
+
* proxmox-usb-hotplug 0.0.3 ([c954b7b](https://github.com/virtbase/proxmox-api/commit/c954b7b0d2999f4fadaf242b0773ccdaab8dc001))
|
|
391
|
+
* changed USB API ([8427c7c](https://github.com/virtbase/proxmox-api/commit/8427c7c27b557d47571d307a924d2d68436ec403))
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
## [0.0.7](https://github.com/virtbase/proxmox-api/compare/0.0.6...0.0.7) (2020-09-30)
|
|
395
|
+
|
|
396
|
+
### Features
|
|
397
|
+
|
|
398
|
+
* add configuration file ([96e13a2](https://github.com/virtbase/proxmox-api/commit/96e13a2d4e8876ccbb94ab808797e67bab79756a))
|
|
399
|
+
|
|
400
|
+
### Bug fixes
|
|
401
|
+
|
|
402
|
+
* fix vmid param in hotplug ([e663cc6](https://github.com/virtbase/proxmox-api/commit/e663cc6dc63b67fb02ccc2880d33dcf3c3b71c49))
|
|
403
|
+
* fix doc ([bdd13a5](https://github.com/virtbase/proxmox-api/commit/bdd13a5104fa5733fc2411e15dadca604e169e26))
|
|
404
|
+
|
|
405
|
+
### Other changes
|
|
406
|
+
|
|
407
|
+
* working hotblug script ([a3bae86](https://github.com/virtbase/proxmox-api/commit/a3bae8684cdf170a93c2dfb1d84a4e752fb850ed))
|
|
408
|
+
* renameing ([194845d](https://github.com/virtbase/proxmox-api/commit/194845d3080a83c1adca92f44b20b5347002346f))
|
|
409
|
+
* handle 401 invalid PVE ticket ([ee6d057](https://github.com/virtbase/proxmox-api/commit/ee6d05744110126bccecb863a662f0177d53b049))
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
## [0.0.6](https://github.com/virtbase/proxmox-api/compare/0.0.4...0.0.6) (2020-09-28)
|
|
413
|
+
|
|
414
|
+
### Features
|
|
415
|
+
|
|
416
|
+
* add samples ([4ca52fd](https://github.com/virtbase/proxmox-api/commit/4ca52fd3395c9ef3986e4754472d6b51a53f44e3))
|
|
417
|
+
|
|
418
|
+
### Documentation
|
|
419
|
+
|
|
420
|
+
* remove empty comments ([52fc78d](https://github.com/virtbase/proxmox-api/commit/52fc78d2815a38af7109f81522a775898586686f))
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## [0.0.4](https://github.com/virtbase/proxmox-api/compare/0.0.3...0.0.4) (2020-09-23)
|
|
424
|
+
|
|
425
|
+
### Documentation
|
|
426
|
+
|
|
427
|
+
* mode docs ([b6fc1b1](https://github.com/virtbase/proxmox-api/commit/b6fc1b15a4316e682ab2c2c446aeb222307cd6b6))
|
|
428
|
+
|
|
429
|
+
### Other changes
|
|
430
|
+
|
|
431
|
+
* change top map original model ([7cfb031](https://github.com/virtbase/proxmox-api/commit/7cfb031f614ee257587c2ec13f7ab2a652393aa6))
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
## [0.0.3](https://github.com/virtbase/proxmox-api/compare/0.0.2...0.0.3) (2020-09-23)
|
|
435
|
+
|
|
436
|
+
### Features
|
|
437
|
+
|
|
438
|
+
* add usage.gif ([111f49b](https://github.com/virtbase/proxmox-api/commit/111f49b1b61ef786b1b8970db4d4f3ccd0c2c1d4))
|
|
439
|
+
|
|
440
|
+
### Other changes
|
|
441
|
+
|
|
442
|
+
* integrate usage gif ([ee51b4d](https://github.com/virtbase/proxmox-api/commit/ee51b4d12127bea51bcc50e4d280cdedab6b87ef))
|
|
443
|
+
* improve mapping V0.0.3 ([28d250a](https://github.com/virtbase/proxmox-api/commit/28d250a8d6d17f4ca1adf9374deb3b8a02538331))
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
## [0.0.2](https://github.com/virtbase/proxmox-api/compare/0.0.1...0.0.2) (2020-09-18)
|
|
447
|
+
|
|
448
|
+
### Features
|
|
449
|
+
|
|
450
|
+
* remove extra @type string, add missing desc ([9be8f99](https://github.com/virtbase/proxmox-api/commit/9be8f990234c69bbd46cda77ab891b6d8a419991))
|
|
451
|
+
|
|
452
|
+
### Documentation
|
|
453
|
+
|
|
454
|
+
* update doc ([7c2f569](https://github.com/virtbase/proxmox-api/commit/7c2f569b4f247a223648f07138f2054f0d1fb557))
|
|
455
|
+
* readme ([b9e330f](https://github.com/virtbase/proxmox-api/commit/b9e330fe98e001325ebd630f2b96ec0a41d55120))
|
|
456
|
+
* more doc ([5fcc917](https://github.com/virtbase/proxmox-api/commit/5fcc917bc1b381139b29f2a959c119233a89ac3d))
|
|
457
|
+
* cleaner output + update doc ([677e258](https://github.com/virtbase/proxmox-api/commit/677e258728d86a442c8faa13a5a9e03f6713858a))
|
|
458
|
+
|
|
459
|
+
### Other changes
|
|
460
|
+
|
|
461
|
+
* clean ([de8f799](https://github.com/virtbase/proxmox-api/commit/de8f7994ae83bb3381482cace632977dc6c47f53))
|
|
462
|
+
* improve model ([077bec8](https://github.com/virtbase/proxmox-api/commit/077bec850284ba931ccb740e30cb0cfb563a846d))
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
## 0.0.1 (2020-09-17)
|
|
466
|
+
|
|
467
|
+
### Features
|
|
468
|
+
|
|
469
|
+
* add , ([d5e10ad](https://github.com/virtbase/proxmox-api/commit/d5e10ad64f50b3a6825a047a9c1cec56af0bfcc6))
|
|
470
|
+
* implements additionalProperties ([ed35921](https://github.com/virtbase/proxmox-api/commit/ed35921f7b3ff42a3badc11898ee379b77529c0f))
|
|
471
|
+
* now additionalProperties is 1 by default ([40bc3ba](https://github.com/virtbase/proxmox-api/commit/40bc3ba3b4b457cdf168ec9ef9a5cab405d40b66))
|
|
472
|
+
* add namespace ([7c33e5b](https://github.com/virtbase/proxmox-api/commit/7c33e5b7a5a6d36a16d5b3abab3e6bc9ef5bab8e))
|
|
473
|
+
* add doc ([b105eb4](https://github.com/virtbase/proxmox-api/commit/b105eb47c0b9bb3440502ebe29ae3b6022ae6da6))
|
|
474
|
+
|
|
475
|
+
### Bug fixes
|
|
476
|
+
|
|
477
|
+
* fix format ([d696b9b](https://github.com/virtbase/proxmox-api/commit/d696b9b44a26374eb33b53a9ac13ed410cef8b19))
|
|
478
|
+
* fix boolean as 1 or 0 ([0aa4549](https://github.com/virtbase/proxmox-api/commit/0aa4549e7a559ae28af2937daef8950af38cfd3b))
|
|
479
|
+
|
|
480
|
+
### Documentation
|
|
481
|
+
|
|
482
|
+
* clean sample ([cbac431](https://github.com/virtbase/proxmox-api/commit/cbac43116395113a967ce093587afddf9acfd7d6))
|
|
483
|
+
* improve docs ([eabc52b](https://github.com/virtbase/proxmox-api/commit/eabc52b09725ab52f82b1f291ff3979966b6f31c))
|
|
484
|
+
|
|
485
|
+
### Other changes
|
|
486
|
+
|
|
487
|
+
* first commit ([3ad0df7](https://github.com/virtbase/proxmox-api/commit/3ad0df73bc7a8309e93c6cdb8b77ca347b5465ae))
|
|
488
|
+
* aff gitignore ([a8261c7](https://github.com/virtbase/proxmox-api/commit/a8261c75c09f1c1b991cc076085c3efbb9ce3190))
|
|
489
|
+
* clean ([02884b5](https://github.com/virtbase/proxmox-api/commit/02884b50ec9b2f77bf6dc9177873bda7053fec98))
|
|
490
|
+
* looking nice version ([6da859f](https://github.com/virtbase/proxmox-api/commit/6da859fe443b0b6b81a8f16ccecf42b06387fcaa))
|
|
491
|
+
* rename file ([676ce26](https://github.com/virtbase/proxmox-api/commit/676ce26831c23c90866fe1143cba69451d786c57))
|
|
492
|
+
* firsts call works. ([877e975](https://github.com/virtbase/proxmox-api/commit/877e97521f5174fc72d29b5a9d691d080db89ebf))
|
|
493
|
+
* improve parser ([a27510d](https://github.com/virtbase/proxmox-api/commit/a27510d4e7f91c0ebec77490d09efec425e38eac))
|
|
494
|
+
* remove console.logs ([f8ef0a1](https://github.com/virtbase/proxmox-api/commit/f8ef0a15b39aab09eaace0312dfe15f1990a2cc3))
|
|
495
|
+
* cleaner model ([a6b13fb](https://github.com/virtbase/proxmox-api/commit/a6b13fb0281ccb54cff85589cf52586fe25e7409))
|
|
496
|
+
* rescructure project ([3e5423a](https://github.com/virtbase/proxmox-api/commit/3e5423a1ba21ad54443748b1294ae86f3336091f))
|
|
497
|
+
* improve types name in generator ([636447d](https://github.com/virtbase/proxmox-api/commit/636447d859d74737c119c6449498e41b72e62246))
|
|
498
|
+
* improve naming ([e72d23c](https://github.com/virtbase/proxmox-api/commit/e72d23c07acab8524995ff097c13f6458104a3fb))
|
|
499
|
+
* cleanup ([14c089a](https://github.com/virtbase/proxmox-api/commit/14c089afb1c3b0a089ea96005f4b5d52b2ada254))
|
|
500
|
+
* more clean ([371e0a6](https://github.com/virtbase/proxmox-api/commit/371e0a6fb5fbef52e9fd19a2047a2440d72d45e4))
|
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# @virtbase/proxmox-api
|
|
2
|
+
|
|
3
|
+
TypeScript API to manage Proxmox servers.
|
|
4
|
+
|
|
5
|
+
A fork of [UrielCh/proxmox-api](https://github.com/UrielCh/proxmox-api), maintained
|
|
6
|
+
for [virtbase](https://virtbase.com). ESM-only; published as `@virtbase/proxmox-api`.
|
|
7
|
+
|
|
8
|
+
* [API Viewer](https://pve.proxmox.com/pve-docs/api-viewer/)
|
|
9
|
+
* [API Docs](https://pve.proxmox.com/wiki/Proxmox_VE_API)
|
|
10
|
+
|
|
11
|
+
Mapping 100% of available calls, contains all api documentation in typing file.
|
|
12
|
+
code size < 10Ko including docs
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Overview
|
|
17
|
+
|
|
18
|
+
to use this API take the Path you want to call, and replace:
|
|
19
|
+
- the `/` by `.`
|
|
20
|
+
- the `${variable}` by `.(variable)`
|
|
21
|
+
- append the http method you want to call with a $ at the end (`.$get()`, `.$post()`, `.$put()` or `.$delete()`)
|
|
22
|
+
|
|
23
|
+
that it.
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
To call `GET /cluster/acme/account/{name}` you will call `proxmox.cluster.acme.account.$(name).$get()`
|
|
28
|
+
|
|
29
|
+
To call `GET /api2/json/cluster/backup/{id}/included_volumes` you will call `proxmox.cluster.backup.{id}.included_volumes.$get()`
|
|
30
|
+
|
|
31
|
+
To call `GET /api2/json/nodes` you will call `proxmox.nodes.$get()`
|
|
32
|
+
|
|
33
|
+
The provided typing will assist you within intelisense, so you do not need to read any external doc.
|
|
34
|
+
|
|
35
|
+
## Code sample
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bun add @virtbase/proxmox-api
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import proxmoxApi from "@virtbase/proxmox-api";
|
|
44
|
+
|
|
45
|
+
// authorize self signed cert if you do not use a valid SSL certificat
|
|
46
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
47
|
+
|
|
48
|
+
async function test() {
|
|
49
|
+
// connect to proxmox
|
|
50
|
+
const proxmox = proxmoxApi({host: '127.0.0.1', password: 'password', username: 'user1@pam'});
|
|
51
|
+
// list nodes
|
|
52
|
+
const nodes = await proxmox.nodes.$get();
|
|
53
|
+
// iterate cluster nodes
|
|
54
|
+
for (const node of nodes) {
|
|
55
|
+
const theNode = proxmox.nodes.$(node.node);
|
|
56
|
+
// list Qemu VMS
|
|
57
|
+
const qemus = await theNode.qemu.$get({full:true});
|
|
58
|
+
// iterate Qemu VMS
|
|
59
|
+
for (const qemu of qemus) {
|
|
60
|
+
// do some suff.
|
|
61
|
+
const config = await theNode.qemu.$(qemu.vmid).config.$get();
|
|
62
|
+
console.log(`vm: ${config.name}, memory: ${config.memory}`);
|
|
63
|
+
// const vnc = await theNode.qemu.$(qemu.vmid).vncproxy.$post();
|
|
64
|
+
// console.log('vnc:', vnc);
|
|
65
|
+
// const spice = await theNode.qemu.$(qemu.vmid).spiceproxy.$post();
|
|
66
|
+
// console.log('spice:', spice);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
test().catch(console.error);
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Initialisation alternavives:
|
|
75
|
+
|
|
76
|
+
- keeping access to ProxmoxEngine object (that can be use to share a ticket, or to access it)
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import proxmoxApi, { ProxmoxEngine } from "@virtbase/proxmox-api";
|
|
80
|
+
|
|
81
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
82
|
+
|
|
83
|
+
async function test() {
|
|
84
|
+
// connect to proxmox
|
|
85
|
+
const engine = new ProxmoxEngine({host: '127.0.0.1', password: 'password', username: 'user1@pam'});
|
|
86
|
+
const proxmox = proxmoxApi(engine);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- Using Api token
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
import proxmoxApi from "@virtbase/proxmox-api";
|
|
95
|
+
|
|
96
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
97
|
+
|
|
98
|
+
async function test() {
|
|
99
|
+
// connect to proxmox
|
|
100
|
+
const proxmox = proxmoxApi({host: '127.0.0.1', tokenID: 'USER@REALM!TOKENID', tokenSecret: '12345678-1234-1234-1234-1234567890ab'});
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Notes
|
|
105
|
+
|
|
106
|
+
- if the call path contains a hyphen, you will need to use the `['field']` syntax ex:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
await theNode.qemu.$(vmid).agent['get-fsinfo'].$get()
|
|
110
|
+
```
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Proxmox } from "./model.js";
|
|
2
|
+
import type { ProxmoxEngineOptions } from "./proxmox-engine.js";
|
|
3
|
+
import type { ApiRequestable } from "./proxy.js";
|
|
4
|
+
/**
|
|
5
|
+
* Build a typed Proxmox API client.
|
|
6
|
+
*
|
|
7
|
+
* @param options Connection options, or any {@link ApiRequestable} to send
|
|
8
|
+
* requests through - a pre-built {@link ProxmoxEngine} whose session you
|
|
9
|
+
* want to keep, or a stub for tests.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const proxmox = proxmoxApi({
|
|
14
|
+
* host: "192.0.2.10",
|
|
15
|
+
* port: 8006,
|
|
16
|
+
* tokenID: "root@pam!automation",
|
|
17
|
+
* tokenSecret: "12345678-1234-1234-1234-1234567890ab",
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* const nodes = await proxmox.nodes.$get();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function proxmoxApi(options: ProxmoxEngineOptions | ApiRequestable): Proxmox.Api;
|
|
24
|
+
export default proxmoxApi;
|
|
25
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAYjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,oBAAoB,GAAG,cAAc,GAC7C,OAAO,CAAC,GAAG,CAGb;eAEc,UAAU"}
|