@nirvana-labs/nirvana 1.1.2 → 1.2.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 +17 -0
- package/README.md +7 -12
- package/package.json +1 -1
- package/resources/compute/compute.d.mts +2 -2
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +2 -2
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js +2 -2
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs +2 -2
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/index.d.mts +1 -1
- package/resources/compute/index.d.ts +1 -1
- package/resources/compute/index.js +2 -2
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs +1 -1
- package/resources/compute/vms/availability.d.mts +130 -0
- package/resources/compute/vms/availability.d.mts.map +1 -0
- package/resources/compute/vms/availability.d.ts +130 -0
- package/resources/compute/vms/availability.d.ts.map +1 -0
- package/resources/compute/vms/availability.js +56 -0
- package/resources/compute/vms/availability.js.map +1 -0
- package/resources/compute/vms/availability.mjs +52 -0
- package/resources/compute/vms/availability.mjs.map +1 -0
- package/resources/compute/vms/index.d.mts +1 -0
- package/resources/compute/vms/index.d.mts.map +1 -1
- package/resources/compute/vms/index.d.ts +1 -0
- package/resources/compute/vms/index.d.ts.map +1 -1
- package/resources/compute/vms/index.js +3 -1
- package/resources/compute/vms/index.js.map +1 -1
- package/resources/compute/vms/index.mjs +1 -0
- package/resources/compute/vms/index.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +5 -1
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +5 -1
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +5 -1
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +5 -1
- package/resources/compute/vms/vms.mjs.map +1 -1
- package/resources/compute/vms/volumes.d.mts +1 -1
- package/resources/compute/vms/volumes.d.ts +1 -1
- package/resources/compute/volumes/availability.d.mts +61 -0
- package/resources/compute/volumes/availability.d.mts.map +1 -0
- package/resources/compute/volumes/availability.d.ts +61 -0
- package/resources/compute/volumes/availability.d.ts.map +1 -0
- package/resources/compute/volumes/availability.js +49 -0
- package/resources/compute/volumes/availability.js.map +1 -0
- package/resources/compute/volumes/availability.mjs +45 -0
- package/resources/compute/volumes/availability.mjs.map +1 -0
- package/resources/compute/volumes/index.d.mts +3 -0
- package/resources/compute/volumes/index.d.mts.map +1 -0
- package/resources/compute/volumes/index.d.ts +3 -0
- package/resources/compute/volumes/index.d.ts.map +1 -0
- package/resources/compute/volumes/index.js +9 -0
- package/resources/compute/volumes/index.js.map +1 -0
- package/resources/compute/volumes/index.mjs +4 -0
- package/resources/compute/volumes/index.mjs.map +1 -0
- package/resources/compute/volumes/volumes.d.mts +150 -0
- package/resources/compute/volumes/volumes.d.mts.map +1 -0
- package/resources/compute/volumes/volumes.d.ts +150 -0
- package/resources/compute/volumes/volumes.d.ts.map +1 -0
- package/resources/compute/volumes/volumes.js +83 -0
- package/resources/compute/volumes/volumes.js.map +1 -0
- package/resources/compute/volumes/volumes.mjs +78 -0
- package/resources/compute/volumes/volumes.mjs.map +1 -0
- package/resources/compute/volumes.d.mts +1 -145
- package/resources/compute/volumes.d.mts.map +1 -1
- package/resources/compute/volumes.d.ts +1 -145
- package/resources/compute/volumes.d.ts.map +1 -1
- package/resources/compute/volumes.js +2 -71
- package/resources/compute/volumes.js.map +1 -1
- package/resources/compute/volumes.mjs +1 -69
- package/resources/compute/volumes.mjs.map +1 -1
- package/src/resources/compute/compute.ts +10 -10
- package/src/resources/compute/index.ts +1 -1
- package/src/resources/compute/vms/availability.ts +172 -0
- package/src/resources/compute/vms/index.ts +7 -0
- package/src/resources/compute/vms/vms.ts +19 -1
- package/src/resources/compute/vms/volumes.ts +1 -1
- package/src/resources/compute/volumes/availability.ts +91 -0
- package/src/resources/compute/volumes/index.ts +18 -0
- package/src/resources/compute/volumes/volumes.ts +213 -0
- package/src/resources/compute/volumes.ts +1 -191
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0 (2025-05-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.1.2...v1.2.0](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.1.2...v1.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add availability resources for VM and Volumes ([f5ace3e](https://github.com/nirvana-labs/nirvana-typescript/commit/f5ace3ec13a085414181276932a8f451343c3096))
|
|
10
|
+
* **api:** api update ([fd29863](https://github.com/nirvana-labs/nirvana-typescript/commit/fd2986318225f1c98bb7464a577deda46811782d))
|
|
11
|
+
* **api:** manual updates ([7a429ba](https://github.com/nirvana-labs/nirvana-typescript/commit/7a429bac659ef8b3f63b70920907f2fe84e52287))
|
|
12
|
+
* **api:** manual updates ([09d69f6](https://github.com/nirvana-labs/nirvana-typescript/commit/09d69f6fd993d8eb34f12a12c754438e2d182096))
|
|
13
|
+
* **api:** update create/update vm/volume param names ([c842b29](https://github.com/nirvana-labs/nirvana-typescript/commit/c842b291c351618f838a12f6f8279698e24090c6))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Chores
|
|
17
|
+
|
|
18
|
+
* **docs:** grammar improvements ([56996b8](https://github.com/nirvana-labs/nirvana-typescript/commit/56996b8f70a919e0fef502470dac517298169fc5))
|
|
19
|
+
|
|
3
20
|
## 1.1.2 (2025-05-13)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v1.1.1...v1.1.2](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.1.1...v1.1.2)
|
package/README.md
CHANGED
|
@@ -34,8 +34,7 @@ async function main() {
|
|
|
34
34
|
public_ip_enabled: true,
|
|
35
35
|
region: 'us-wdc-1',
|
|
36
36
|
ssh_key: {
|
|
37
|
-
public_key:
|
|
38
|
-
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
37
|
+
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
39
38
|
},
|
|
40
39
|
subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
41
40
|
});
|
|
@@ -68,8 +67,7 @@ async function main() {
|
|
|
68
67
|
public_ip_enabled: true,
|
|
69
68
|
region: 'us-wdc-1',
|
|
70
69
|
ssh_key: {
|
|
71
|
-
public_key:
|
|
72
|
-
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
70
|
+
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
73
71
|
},
|
|
74
72
|
subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
75
73
|
};
|
|
@@ -100,8 +98,7 @@ async function main() {
|
|
|
100
98
|
public_ip_enabled: true,
|
|
101
99
|
region: 'us-wdc-1',
|
|
102
100
|
ssh_key: {
|
|
103
|
-
public_key:
|
|
104
|
-
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
101
|
+
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
105
102
|
},
|
|
106
103
|
subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
107
104
|
})
|
|
@@ -148,7 +145,7 @@ const client = new NirvanaLabs({
|
|
|
148
145
|
});
|
|
149
146
|
|
|
150
147
|
// Or, configure per-request:
|
|
151
|
-
await client.compute.vms.create({ boot_volume: { size: 100 }, cpu_config: { vcpu: 2 }, memory_config: { size: 2 }, name: 'my-vm', os_image_name: 'ubuntu-noble-2025-04-03', public_ip_enabled: true, region: 'us-wdc-1', ssh_key: { public_key: 'ssh-
|
|
148
|
+
await client.compute.vms.create({ boot_volume: { size: 100 }, cpu_config: { vcpu: 2 }, memory_config: { size: 2 }, name: 'my-vm', os_image_name: 'ubuntu-noble-2025-04-03', public_ip_enabled: true, region: 'us-wdc-1', ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' }, subnet_id: '123e4567-e89b-12d3-a456-426614174000' }, {
|
|
152
149
|
maxRetries: 5,
|
|
153
150
|
});
|
|
154
151
|
```
|
|
@@ -165,7 +162,7 @@ const client = new NirvanaLabs({
|
|
|
165
162
|
});
|
|
166
163
|
|
|
167
164
|
// Override per-request:
|
|
168
|
-
await client.compute.vms.create({ boot_volume: { size: 100 }, cpu_config: { vcpu: 2 }, memory_config: { size: 2 }, name: 'my-vm', os_image_name: 'ubuntu-noble-2025-04-03', public_ip_enabled: true, region: 'us-wdc-1', ssh_key: { public_key: 'ssh-
|
|
165
|
+
await client.compute.vms.create({ boot_volume: { size: 100 }, cpu_config: { vcpu: 2 }, memory_config: { size: 2 }, name: 'my-vm', os_image_name: 'ubuntu-noble-2025-04-03', public_ip_enabled: true, region: 'us-wdc-1', ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' }, subnet_id: '123e4567-e89b-12d3-a456-426614174000' }, {
|
|
169
166
|
timeout: 5 * 1000,
|
|
170
167
|
});
|
|
171
168
|
```
|
|
@@ -198,8 +195,7 @@ const response = await client.compute.vms
|
|
|
198
195
|
public_ip_enabled: true,
|
|
199
196
|
region: 'us-wdc-1',
|
|
200
197
|
ssh_key: {
|
|
201
|
-
public_key:
|
|
202
|
-
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
198
|
+
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
203
199
|
},
|
|
204
200
|
subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
205
201
|
})
|
|
@@ -217,8 +213,7 @@ const { data: operation, response: raw } = await client.compute.vms
|
|
|
217
213
|
public_ip_enabled: true,
|
|
218
214
|
region: 'us-wdc-1',
|
|
219
215
|
ssh_key: {
|
|
220
|
-
public_key:
|
|
221
|
-
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
216
|
+
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
222
217
|
},
|
|
223
218
|
subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
224
219
|
})
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as VolumesAPI from "./volumes.mjs";
|
|
3
|
-
import { StorageType, Volume, VolumeCreateParams, VolumeKind, VolumeList, VolumeUpdateParams, Volumes } from "./volumes.mjs";
|
|
4
2
|
import * as VMsAPI from "./vms/vms.mjs";
|
|
5
3
|
import { CPUConfig, MemoryConfig, OSImage, SSHKey, VM, VMCreateParams, VMList, VMUpdateParams, VMs } from "./vms/vms.mjs";
|
|
4
|
+
import * as VolumesAPI from "./volumes/volumes.mjs";
|
|
5
|
+
import { StorageType, Volume, VolumeCreateParams, VolumeKind, VolumeList, VolumeUpdateParams, Volumes } from "./volumes/volumes.mjs";
|
|
6
6
|
export declare class Compute extends APIResource {
|
|
7
7
|
vms: VMsAPI.VMs;
|
|
8
8
|
volumes: VolumesAPI.Volumes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.d.mts","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"compute.d.mts","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EACL,SAAS,EACT,YAAY,EACZ,OAAO,EACP,MAAM,EACN,EAAE,EACF,cAAc,EACd,MAAM,EACN,cAAc,EACd,GAAG,EACJ;OACM,KAAK,UAAU;OACf,EACL,WAAW,EACX,MAAM,EACN,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACR;AAED,qBAAa,OAAQ,SAAQ,WAAW;IACtC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAgC;IAC/C,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,GAAG,IAAI,GAAG,EACV,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,EAAE,IAAI,EAAE,EACb,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as VolumesAPI from "./volumes.js";
|
|
3
|
-
import { StorageType, Volume, VolumeCreateParams, VolumeKind, VolumeList, VolumeUpdateParams, Volumes } from "./volumes.js";
|
|
4
2
|
import * as VMsAPI from "./vms/vms.js";
|
|
5
3
|
import { CPUConfig, MemoryConfig, OSImage, SSHKey, VM, VMCreateParams, VMList, VMUpdateParams, VMs } from "./vms/vms.js";
|
|
4
|
+
import * as VolumesAPI from "./volumes/volumes.js";
|
|
5
|
+
import { StorageType, Volume, VolumeCreateParams, VolumeKind, VolumeList, VolumeUpdateParams, Volumes } from "./volumes/volumes.js";
|
|
6
6
|
export declare class Compute extends APIResource {
|
|
7
7
|
vms: VMsAPI.VMs;
|
|
8
8
|
volumes: VolumesAPI.Volumes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EACL,SAAS,EACT,YAAY,EACZ,OAAO,EACP,MAAM,EACN,EAAE,EACF,cAAc,EACd,MAAM,EACN,cAAc,EACd,GAAG,EACJ;OACM,KAAK,UAAU;OACf,EACL,WAAW,EACX,MAAM,EACN,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACR;AAED,qBAAa,OAAQ,SAAQ,WAAW;IACtC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAgC;IAC/C,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,GAAG,IAAI,GAAG,EACV,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,EAAE,IAAI,EAAE,EACb,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Compute = void 0;
|
|
5
5
|
const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const VolumesAPI = tslib_1.__importStar(require("./volumes.js"));
|
|
8
|
-
const volumes_1 = require("./volumes.js");
|
|
9
7
|
const VMsAPI = tslib_1.__importStar(require("./vms/vms.js"));
|
|
10
8
|
const vms_1 = require("./vms/vms.js");
|
|
9
|
+
const VolumesAPI = tslib_1.__importStar(require("./volumes/volumes.js"));
|
|
10
|
+
const volumes_1 = require("./volumes/volumes.js");
|
|
11
11
|
class Compute extends resource_1.APIResource {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.js","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"compute.js","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAUmB;AACnB,yEAAgD;AAChD,kDAQ2B;AAE3B,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,QAAG,GAAe,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAHD,0BAGC;AAED,OAAO,CAAC,GAAG,GAAG,SAAG,CAAC;AAClB,OAAO,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as VolumesAPI from "./volumes.mjs";
|
|
4
|
-
import { Volumes, } from "./volumes.mjs";
|
|
5
3
|
import * as VMsAPI from "./vms/vms.mjs";
|
|
6
4
|
import { VMs, } from "./vms/vms.mjs";
|
|
5
|
+
import * as VolumesAPI from "./volumes/volumes.mjs";
|
|
6
|
+
import { Volumes, } from "./volumes/volumes.mjs";
|
|
7
7
|
export class Compute extends APIResource {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.mjs","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"compute.mjs","sourceRoot":"","sources":["../../src/resources/compute/compute.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EASL,GAAG,GACJ;OACM,KAAK,UAAU;OACf,EAOL,OAAO,GACR;AAED,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,QAAG,GAAe,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Compute } from "./compute.mjs";
|
|
2
2
|
export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKey, type VM, type VMList, type VMCreateParams, type VMUpdateParams, } from "./vms/index.mjs";
|
|
3
|
-
export { Volumes, type StorageType, type Volume, type VolumeKind, type VolumeList, type VolumeCreateParams, type VolumeUpdateParams, } from "./volumes.mjs";
|
|
3
|
+
export { Volumes, type StorageType, type Volume, type VolumeKind, type VolumeList, type VolumeCreateParams, type VolumeUpdateParams, } from "./volumes/index.mjs";
|
|
4
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Compute } from "./compute.js";
|
|
2
2
|
export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKey, type VM, type VMList, type VMCreateParams, type VMUpdateParams, } from "./vms/index.js";
|
|
3
|
-
export { Volumes, type StorageType, type Volume, type VolumeKind, type VolumeList, type VolumeCreateParams, type VolumeUpdateParams, } from "./volumes.js";
|
|
3
|
+
export { Volumes, type StorageType, type Volume, type VolumeKind, type VolumeList, type VolumeCreateParams, type VolumeUpdateParams, } from "./volumes/index.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,6 +6,6 @@ var compute_1 = require("./compute.js");
|
|
|
6
6
|
Object.defineProperty(exports, "Compute", { enumerable: true, get: function () { return compute_1.Compute; } });
|
|
7
7
|
var index_1 = require("./vms/index.js");
|
|
8
8
|
Object.defineProperty(exports, "VMs", { enumerable: true, get: function () { return index_1.VMs; } });
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "Volumes", { enumerable: true, get: function () { return
|
|
9
|
+
var index_2 = require("./volumes/index.js");
|
|
10
|
+
Object.defineProperty(exports, "Volumes", { enumerable: true, get: function () { return index_2.Volumes; } });
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/compute/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wCAUqB;AATnB,4FAAA,GAAG,OAAA;AAUL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/compute/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wCAUqB;AATnB,4FAAA,GAAG,OAAA;AAUL,4CAQyB;AAPvB,gGAAA,OAAO,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { Compute } from "./compute.mjs";
|
|
3
3
|
export { VMs, } from "./vms/index.mjs";
|
|
4
|
-
export { Volumes, } from "./volumes.mjs";
|
|
4
|
+
export { Volumes, } from "./volumes/index.mjs";
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../../shared.mjs";
|
|
3
|
+
import * as VMsAPI from "./vms.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class Availability extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Check VM Create Availability
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const availability =
|
|
13
|
+
* await client.compute.vms.availability.create({
|
|
14
|
+
* boot_volume: { size: 100 },
|
|
15
|
+
* cpu_config: { vcpu: 2 },
|
|
16
|
+
* memory_config: { size: 2 },
|
|
17
|
+
* name: 'my-vm',
|
|
18
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
19
|
+
* public_ip_enabled: true,
|
|
20
|
+
* region: 'us-wdc-1',
|
|
21
|
+
* ssh_key: {
|
|
22
|
+
* public_key:
|
|
23
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
24
|
+
* },
|
|
25
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: AvailabilityCreateParams, options?: RequestOptions): APIPromise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Check VM Update Availability
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const availability =
|
|
36
|
+
* await client.compute.vms.availability.update('vm_id');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(vmID: string, body: AvailabilityUpdateParams, options?: RequestOptions): APIPromise<string>;
|
|
40
|
+
}
|
|
41
|
+
export type AvailabilityCreateResponse = string;
|
|
42
|
+
export type AvailabilityUpdateResponse = string;
|
|
43
|
+
export interface AvailabilityCreateParams {
|
|
44
|
+
/**
|
|
45
|
+
* Boot volume for the VM.
|
|
46
|
+
*/
|
|
47
|
+
boot_volume: AvailabilityCreateParams.BootVolume;
|
|
48
|
+
/**
|
|
49
|
+
* CPU configuration for the VM.
|
|
50
|
+
*/
|
|
51
|
+
cpu_config: VMsAPI.CPUConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Memory configuration for the VM.
|
|
54
|
+
*/
|
|
55
|
+
memory_config: VMsAPI.MemoryConfig;
|
|
56
|
+
/**
|
|
57
|
+
* Name of the VM.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Name of the OS Image to use for the VM.
|
|
62
|
+
*/
|
|
63
|
+
os_image_name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to enable public IP for the VM.
|
|
66
|
+
*/
|
|
67
|
+
public_ip_enabled: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Region the resource is in.
|
|
70
|
+
*/
|
|
71
|
+
region: Shared.RegionName;
|
|
72
|
+
/**
|
|
73
|
+
* Public SSH key configuration for the VM.
|
|
74
|
+
*/
|
|
75
|
+
ssh_key: VMsAPI.SSHKey;
|
|
76
|
+
/**
|
|
77
|
+
* ID of the subnet to use for the VM.
|
|
78
|
+
*/
|
|
79
|
+
subnet_id: string;
|
|
80
|
+
/**
|
|
81
|
+
* Data volumes for the VM.
|
|
82
|
+
*/
|
|
83
|
+
data_volumes?: Array<AvailabilityCreateParams.DataVolume>;
|
|
84
|
+
}
|
|
85
|
+
export declare namespace AvailabilityCreateParams {
|
|
86
|
+
/**
|
|
87
|
+
* Boot volume for the VM.
|
|
88
|
+
*/
|
|
89
|
+
interface BootVolume {
|
|
90
|
+
/**
|
|
91
|
+
* Size of the volume in GB.
|
|
92
|
+
*/
|
|
93
|
+
size: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* VM data volume create request.
|
|
97
|
+
*/
|
|
98
|
+
interface DataVolume {
|
|
99
|
+
/**
|
|
100
|
+
* Name of the volume.
|
|
101
|
+
*/
|
|
102
|
+
name: string;
|
|
103
|
+
/**
|
|
104
|
+
* Size of the volume in GB.
|
|
105
|
+
*/
|
|
106
|
+
size: number;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export interface AvailabilityUpdateParams {
|
|
110
|
+
/**
|
|
111
|
+
* CPU configuration for the VM.
|
|
112
|
+
*/
|
|
113
|
+
cpu_config?: VMsAPI.CPUConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Memory configuration for the VM.
|
|
116
|
+
*/
|
|
117
|
+
memory_config?: VMsAPI.MemoryConfig;
|
|
118
|
+
/**
|
|
119
|
+
* Name of the VM.
|
|
120
|
+
*/
|
|
121
|
+
name?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Whether to enable public IP for the VM.
|
|
124
|
+
*/
|
|
125
|
+
public_ip_enabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace Availability {
|
|
128
|
+
export { type AvailabilityCreateResponse as AvailabilityCreateResponse, type AvailabilityUpdateResponse as AvailabilityUpdateResponse, type AvailabilityCreateParams as AvailabilityCreateParams, type AvailabilityUpdateParams as AvailabilityUpdateParams, };
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=availability.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/availability.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAQpF;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAOnG;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,wBAAwB,CAAC,UAAU,CAAC;IAEjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC;IAEnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;CAC3D;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC;IAE9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAEpC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as Shared from "../../shared.js";
|
|
3
|
+
import * as VMsAPI from "./vms.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
export declare class Availability extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Check VM Create Availability
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const availability =
|
|
13
|
+
* await client.compute.vms.availability.create({
|
|
14
|
+
* boot_volume: { size: 100 },
|
|
15
|
+
* cpu_config: { vcpu: 2 },
|
|
16
|
+
* memory_config: { size: 2 },
|
|
17
|
+
* name: 'my-vm',
|
|
18
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
19
|
+
* public_ip_enabled: true,
|
|
20
|
+
* region: 'us-wdc-1',
|
|
21
|
+
* ssh_key: {
|
|
22
|
+
* public_key:
|
|
23
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
24
|
+
* },
|
|
25
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: AvailabilityCreateParams, options?: RequestOptions): APIPromise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Check VM Update Availability
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const availability =
|
|
36
|
+
* await client.compute.vms.availability.update('vm_id');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(vmID: string, body: AvailabilityUpdateParams, options?: RequestOptions): APIPromise<string>;
|
|
40
|
+
}
|
|
41
|
+
export type AvailabilityCreateResponse = string;
|
|
42
|
+
export type AvailabilityUpdateResponse = string;
|
|
43
|
+
export interface AvailabilityCreateParams {
|
|
44
|
+
/**
|
|
45
|
+
* Boot volume for the VM.
|
|
46
|
+
*/
|
|
47
|
+
boot_volume: AvailabilityCreateParams.BootVolume;
|
|
48
|
+
/**
|
|
49
|
+
* CPU configuration for the VM.
|
|
50
|
+
*/
|
|
51
|
+
cpu_config: VMsAPI.CPUConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Memory configuration for the VM.
|
|
54
|
+
*/
|
|
55
|
+
memory_config: VMsAPI.MemoryConfig;
|
|
56
|
+
/**
|
|
57
|
+
* Name of the VM.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Name of the OS Image to use for the VM.
|
|
62
|
+
*/
|
|
63
|
+
os_image_name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to enable public IP for the VM.
|
|
66
|
+
*/
|
|
67
|
+
public_ip_enabled: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Region the resource is in.
|
|
70
|
+
*/
|
|
71
|
+
region: Shared.RegionName;
|
|
72
|
+
/**
|
|
73
|
+
* Public SSH key configuration for the VM.
|
|
74
|
+
*/
|
|
75
|
+
ssh_key: VMsAPI.SSHKey;
|
|
76
|
+
/**
|
|
77
|
+
* ID of the subnet to use for the VM.
|
|
78
|
+
*/
|
|
79
|
+
subnet_id: string;
|
|
80
|
+
/**
|
|
81
|
+
* Data volumes for the VM.
|
|
82
|
+
*/
|
|
83
|
+
data_volumes?: Array<AvailabilityCreateParams.DataVolume>;
|
|
84
|
+
}
|
|
85
|
+
export declare namespace AvailabilityCreateParams {
|
|
86
|
+
/**
|
|
87
|
+
* Boot volume for the VM.
|
|
88
|
+
*/
|
|
89
|
+
interface BootVolume {
|
|
90
|
+
/**
|
|
91
|
+
* Size of the volume in GB.
|
|
92
|
+
*/
|
|
93
|
+
size: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* VM data volume create request.
|
|
97
|
+
*/
|
|
98
|
+
interface DataVolume {
|
|
99
|
+
/**
|
|
100
|
+
* Name of the volume.
|
|
101
|
+
*/
|
|
102
|
+
name: string;
|
|
103
|
+
/**
|
|
104
|
+
* Size of the volume in GB.
|
|
105
|
+
*/
|
|
106
|
+
size: number;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export interface AvailabilityUpdateParams {
|
|
110
|
+
/**
|
|
111
|
+
* CPU configuration for the VM.
|
|
112
|
+
*/
|
|
113
|
+
cpu_config?: VMsAPI.CPUConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Memory configuration for the VM.
|
|
116
|
+
*/
|
|
117
|
+
memory_config?: VMsAPI.MemoryConfig;
|
|
118
|
+
/**
|
|
119
|
+
* Name of the VM.
|
|
120
|
+
*/
|
|
121
|
+
name?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Whether to enable public IP for the VM.
|
|
124
|
+
*/
|
|
125
|
+
public_ip_enabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace Availability {
|
|
128
|
+
export { type AvailabilityCreateResponse as AvailabilityCreateResponse, type AvailabilityUpdateResponse as AvailabilityUpdateResponse, type AvailabilityCreateParams as AvailabilityCreateParams, type AvailabilityUpdateParams as AvailabilityUpdateParams, };
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=availability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/availability.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAQpF;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAOnG;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,wBAAwB,CAAC,UAAU,CAAC;IAEjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC;IAEnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;CAC3D;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC;IAE9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAEpC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Availability = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
+
class Availability extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Check VM Create Availability
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const availability =
|
|
15
|
+
* await client.compute.vms.availability.create({
|
|
16
|
+
* boot_volume: { size: 100 },
|
|
17
|
+
* cpu_config: { vcpu: 2 },
|
|
18
|
+
* memory_config: { size: 2 },
|
|
19
|
+
* name: 'my-vm',
|
|
20
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
21
|
+
* public_ip_enabled: true,
|
|
22
|
+
* region: 'us-wdc-1',
|
|
23
|
+
* ssh_key: {
|
|
24
|
+
* public_key:
|
|
25
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
26
|
+
* },
|
|
27
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(body, options) {
|
|
32
|
+
return this._client.post('/v1/compute/vms/availability', {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'text/plain' }, options?.headers]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check VM Update Availability
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const availability =
|
|
44
|
+
* await client.compute.vms.availability.update('vm_id');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
update(vmID, body, options) {
|
|
48
|
+
return this._client.patch((0, path_1.path) `/v1/compute/vms/${vmID}/availability`, {
|
|
49
|
+
body,
|
|
50
|
+
...options,
|
|
51
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'text/plain' }, options?.headers]),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Availability = Availability;
|
|
56
|
+
//# sourceMappingURL=availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../src/resources/compute/vms/availability.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACvD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY,EAAE,IAA8B,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,mBAAmB,IAAI,eAAe,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF;AA/CD,oCA+CC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
5
|
+
export class Availability extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Check VM Create Availability
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const availability =
|
|
12
|
+
* await client.compute.vms.availability.create({
|
|
13
|
+
* boot_volume: { size: 100 },
|
|
14
|
+
* cpu_config: { vcpu: 2 },
|
|
15
|
+
* memory_config: { size: 2 },
|
|
16
|
+
* name: 'my-vm',
|
|
17
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
18
|
+
* public_ip_enabled: true,
|
|
19
|
+
* region: 'us-wdc-1',
|
|
20
|
+
* ssh_key: {
|
|
21
|
+
* public_key:
|
|
22
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
23
|
+
* },
|
|
24
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
create(body, options) {
|
|
29
|
+
return this._client.post('/v1/compute/vms/availability', {
|
|
30
|
+
body,
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check VM Update Availability
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const availability =
|
|
41
|
+
* await client.compute.vms.availability.update('vm_id');
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
update(vmID, body, options) {
|
|
45
|
+
return this._client.patch(path `/v1/compute/vms/${vmID}/availability`, {
|
|
46
|
+
body,
|
|
47
|
+
...options,
|
|
48
|
+
headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=availability.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.mjs","sourceRoot":"","sources":["../../../src/resources/compute/vms/availability.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACvD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY,EAAE,IAA8B,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,mBAAmB,IAAI,eAAe,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Availability, type AvailabilityCreateResponse, type AvailabilityUpdateResponse, type AvailabilityCreateParams, type AvailabilityUpdateParams, } from "./availability.mjs";
|
|
1
2
|
export { OSImages, type OSImageListResponse } from "./os-images.mjs";
|
|
2
3
|
export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKey, type VM, type VMList, type VMCreateParams, type VMUpdateParams, } from "./vms.mjs";
|
|
3
4
|
export { Volumes } from "./volumes.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE;OACtC,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB;OACM,EAAE,OAAO,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE;OACtC,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB;OACM,EAAE,OAAO,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Availability, type AvailabilityCreateResponse, type AvailabilityUpdateResponse, type AvailabilityCreateParams, type AvailabilityUpdateParams, } from "./availability.js";
|
|
1
2
|
export { OSImages, type OSImageListResponse } from "./os-images.js";
|
|
2
3
|
export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKey, type VM, type VMList, type VMCreateParams, type VMUpdateParams, } from "./vms.js";
|
|
3
4
|
export { Volumes } from "./volumes.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE;OACtC,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB;OACM,EAAE,OAAO,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE;OACtC,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB;OACM,EAAE,OAAO,EAAE"}
|