@nirvana-labs/nirvana 1.0.5 → 1.1.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 +18 -0
- package/README.md +1 -1
- package/client.d.mts +4 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -0
- package/client.d.ts.map +1 -1
- package/client.js +16 -0
- package/client.js.map +1 -1
- package/client.mjs +16 -0
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +3 -2
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/uploads.d.mts +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +14 -4
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/package.json +4 -5
- package/resources/api-keys.d.mts +28 -0
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +28 -0
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +28 -0
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +28 -0
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compute/vms/os-images.d.mts +5 -0
- package/resources/compute/vms/os-images.d.mts.map +1 -1
- package/resources/compute/vms/os-images.d.ts +5 -0
- package/resources/compute/vms/os-images.d.ts.map +1 -1
- package/resources/compute/vms/os-images.js +5 -0
- package/resources/compute/vms/os-images.js.map +1 -1
- package/resources/compute/vms/os-images.mjs +5 -0
- package/resources/compute/vms/os-images.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +38 -0
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +38 -0
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +38 -0
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +38 -0
- package/resources/compute/vms/vms.mjs.map +1 -1
- package/resources/compute/vms/volumes.d.mts +7 -0
- package/resources/compute/vms/volumes.d.mts.map +1 -1
- package/resources/compute/vms/volumes.d.ts +7 -0
- package/resources/compute/vms/volumes.d.ts.map +1 -1
- package/resources/compute/vms/volumes.js +7 -0
- package/resources/compute/vms/volumes.js.map +1 -1
- package/resources/compute/vms/volumes.mjs +7 -0
- package/resources/compute/vms/volumes.mjs.map +1 -1
- package/resources/compute/volumes.d.mts +35 -0
- package/resources/compute/volumes.d.mts.map +1 -1
- package/resources/compute/volumes.d.ts +35 -0
- package/resources/compute/volumes.d.ts.map +1 -1
- package/resources/compute/volumes.js +35 -0
- package/resources/compute/volumes.js.map +1 -1
- package/resources/compute/volumes.mjs +35 -0
- package/resources/compute/volumes.mjs.map +1 -1
- package/resources/networking/firewall-rules.d.mts +45 -0
- package/resources/networking/firewall-rules.d.mts.map +1 -1
- package/resources/networking/firewall-rules.d.ts +45 -0
- package/resources/networking/firewall-rules.d.ts.map +1 -1
- package/resources/networking/firewall-rules.js +45 -0
- package/resources/networking/firewall-rules.js.map +1 -1
- package/resources/networking/firewall-rules.mjs +45 -0
- package/resources/networking/firewall-rules.mjs.map +1 -1
- package/resources/networking/vpcs.d.mts +33 -0
- package/resources/networking/vpcs.d.mts.map +1 -1
- package/resources/networking/vpcs.d.ts +33 -0
- package/resources/networking/vpcs.d.ts.map +1 -1
- package/resources/networking/vpcs.js +33 -0
- package/resources/networking/vpcs.js.map +1 -1
- package/resources/networking/vpcs.mjs +33 -0
- package/resources/networking/vpcs.mjs.map +1 -1
- package/src/client.ts +17 -0
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +16 -4
- package/src/internal/utils/uuid.ts +1 -3
- package/src/resources/api-keys.ts +28 -0
- package/src/resources/compute/vms/os-images.ts +5 -0
- package/src/resources/compute/vms/vms.ts +38 -0
- package/src/resources/compute/vms/volumes.ts +7 -0
- package/src/resources/compute/volumes.ts +35 -0
- package/src/resources/networking/firewall-rules.ts +45 -0
- package/src/resources/networking/vpcs.ts +33 -0
- 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/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -22
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -22
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -71
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -67
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -66
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
|
@@ -9,6 +9,14 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
export class APIKeys extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Create a new API key
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const apiKey = await client.apiKeys.create({
|
|
16
|
+
* expires_at: '2025-12-31T23:59:59Z',
|
|
17
|
+
* name: 'my-api-key',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey> {
|
|
14
22
|
return this._client.post('/v1/api_keys', { body, ...options });
|
|
@@ -16,6 +24,11 @@ export class APIKeys extends APIResource {
|
|
|
16
24
|
|
|
17
25
|
/**
|
|
18
26
|
* Update an API key's name
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const apiKey = await client.apiKeys.update('api_key_id');
|
|
31
|
+
* ```
|
|
19
32
|
*/
|
|
20
33
|
update(apiKeyID: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey> {
|
|
21
34
|
return this._client.patch(path`/v1/api_keys/${apiKeyID}`, { body, ...options });
|
|
@@ -23,6 +36,11 @@ export class APIKeys extends APIResource {
|
|
|
23
36
|
|
|
24
37
|
/**
|
|
25
38
|
* List all API keys you created
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const apiKeyList = await client.apiKeys.list();
|
|
43
|
+
* ```
|
|
26
44
|
*/
|
|
27
45
|
list(options?: RequestOptions): APIPromise<APIKeyList> {
|
|
28
46
|
return this._client.get('/v1/api_keys', options);
|
|
@@ -30,6 +48,11 @@ export class APIKeys extends APIResource {
|
|
|
30
48
|
|
|
31
49
|
/**
|
|
32
50
|
* Delete an API key
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* await client.apiKeys.delete('api_key_id');
|
|
55
|
+
* ```
|
|
33
56
|
*/
|
|
34
57
|
delete(apiKeyID: string, options?: RequestOptions): APIPromise<void> {
|
|
35
58
|
return this._client.delete(path`/v1/api_keys/${apiKeyID}`, {
|
|
@@ -40,6 +63,11 @@ export class APIKeys extends APIResource {
|
|
|
40
63
|
|
|
41
64
|
/**
|
|
42
65
|
* Get details about an API key
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const apiKey = await client.apiKeys.get('api_key_id');
|
|
70
|
+
* ```
|
|
43
71
|
*/
|
|
44
72
|
get(apiKeyID: string, options?: RequestOptions): APIPromise<APIKey> {
|
|
45
73
|
return this._client.get(path`/v1/api_keys/${apiKeyID}`, options);
|
|
@@ -8,6 +8,11 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
8
8
|
export class OSImages extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* List all OS Images
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const osImages = await client.compute.vms.osImages.list();
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
list(options?: RequestOptions): APIPromise<OSImageListResponse> {
|
|
13
18
|
return this._client.get('/v1/compute/vms/os_images', options);
|
|
@@ -17,6 +17,24 @@ export class VMs extends APIResource {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a VM
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const operation = await client.compute.vms.create({
|
|
24
|
+
* boot_volume: { size: 100 },
|
|
25
|
+
* cpu_config: { vcpu: 2 },
|
|
26
|
+
* memory_config: { size: 2 },
|
|
27
|
+
* name: 'my-vm',
|
|
28
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
29
|
+
* public_ip_enabled: true,
|
|
30
|
+
* region: 'us-wdc-1',
|
|
31
|
+
* ssh_key: {
|
|
32
|
+
* public_key:
|
|
33
|
+
* 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
|
|
34
|
+
* },
|
|
35
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
20
38
|
*/
|
|
21
39
|
create(body: VMCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
22
40
|
return this._client.post('/v1/compute/vms', { body, ...options });
|
|
@@ -24,6 +42,11 @@ export class VMs extends APIResource {
|
|
|
24
42
|
|
|
25
43
|
/**
|
|
26
44
|
* Update a VM
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const operation = await client.compute.vms.update('vm_id');
|
|
49
|
+
* ```
|
|
27
50
|
*/
|
|
28
51
|
update(vmID: string, body: VMUpdateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
29
52
|
return this._client.patch(path`/v1/compute/vms/${vmID}`, { body, ...options });
|
|
@@ -31,6 +54,11 @@ export class VMs extends APIResource {
|
|
|
31
54
|
|
|
32
55
|
/**
|
|
33
56
|
* List all VMs
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const vmList = await client.compute.vms.list();
|
|
61
|
+
* ```
|
|
34
62
|
*/
|
|
35
63
|
list(options?: RequestOptions): APIPromise<VMList> {
|
|
36
64
|
return this._client.get('/v1/compute/vms', options);
|
|
@@ -38,6 +66,11 @@ export class VMs extends APIResource {
|
|
|
38
66
|
|
|
39
67
|
/**
|
|
40
68
|
* Delete a VM
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const operation = await client.compute.vms.delete('vm_id');
|
|
73
|
+
* ```
|
|
41
74
|
*/
|
|
42
75
|
delete(vmID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
43
76
|
return this._client.delete(path`/v1/compute/vms/${vmID}`, options);
|
|
@@ -45,6 +78,11 @@ export class VMs extends APIResource {
|
|
|
45
78
|
|
|
46
79
|
/**
|
|
47
80
|
* Get details about a VM
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const vm = await client.compute.vms.get('vm_id');
|
|
85
|
+
* ```
|
|
48
86
|
*/
|
|
49
87
|
get(vmID: string, options?: RequestOptions): APIPromise<VM> {
|
|
50
88
|
return this._client.get(path`/v1/compute/vms/${vmID}`, options);
|
|
@@ -9,6 +9,13 @@ import { path } from '../../../internal/utils/path';
|
|
|
9
9
|
export class Volumes extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* List VM's Volumes
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const volumeList = await client.compute.vms.volumes.list(
|
|
16
|
+
* 'vm_id',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
12
19
|
*/
|
|
13
20
|
list(vmID: string, options?: RequestOptions): APIPromise<VolumesAPI.VolumeList> {
|
|
14
21
|
return this._client.get(path`/v1/compute/vms/${vmID}/volumes`, options);
|
|
@@ -10,6 +10,15 @@ import { path } from '../../internal/utils/path';
|
|
|
10
10
|
export class Volumes extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a Volume. Only data volumes can be created.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const operation = await client.compute.volumes.create({
|
|
17
|
+
* name: 'my-data-volume',
|
|
18
|
+
* size: 100,
|
|
19
|
+
* vm_id: 'vm_id',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
create(body: VolumeCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
15
24
|
return this._client.post('/v1/compute/volumes', { body, ...options });
|
|
@@ -17,6 +26,13 @@ export class Volumes extends APIResource {
|
|
|
17
26
|
|
|
18
27
|
/**
|
|
19
28
|
* Update a Volume. Boot or data volumes can be updated.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const operation = await client.compute.volumes.update(
|
|
33
|
+
* 'volume_id',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
20
36
|
*/
|
|
21
37
|
update(
|
|
22
38
|
volumeID: string,
|
|
@@ -28,6 +44,11 @@ export class Volumes extends APIResource {
|
|
|
28
44
|
|
|
29
45
|
/**
|
|
30
46
|
* List all volumes
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const volumeList = await client.compute.volumes.list();
|
|
51
|
+
* ```
|
|
31
52
|
*/
|
|
32
53
|
list(options?: RequestOptions): APIPromise<VolumeList> {
|
|
33
54
|
return this._client.get('/v1/compute/volumes', options);
|
|
@@ -35,6 +56,13 @@ export class Volumes extends APIResource {
|
|
|
35
56
|
|
|
36
57
|
/**
|
|
37
58
|
* Delete a Volume. Boot or data volumes can be deleted.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const operation = await client.compute.volumes.delete(
|
|
63
|
+
* 'volume_id',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
38
66
|
*/
|
|
39
67
|
delete(volumeID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
40
68
|
return this._client.delete(path`/v1/compute/volumes/${volumeID}`, options);
|
|
@@ -42,6 +70,13 @@ export class Volumes extends APIResource {
|
|
|
42
70
|
|
|
43
71
|
/**
|
|
44
72
|
* Get a Volume.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const volume = await client.compute.volumes.get(
|
|
77
|
+
* 'volume_id',
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
45
80
|
*/
|
|
46
81
|
get(volumeID: string, options?: RequestOptions): APIPromise<Volume> {
|
|
47
82
|
return this._client.get(path`/v1/compute/volumes/${volumeID}`, options);
|
|
@@ -10,6 +10,18 @@ import { path } from '../../internal/utils/path';
|
|
|
10
10
|
export class FirewallRules extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a firewall rule
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const operation =
|
|
17
|
+
* await client.networking.firewallRules.create('vpc_id', {
|
|
18
|
+
* destination_address: '0.0.0.0/0',
|
|
19
|
+
* destination_ports: ['22', '80', '443'],
|
|
20
|
+
* name: 'my-firewall-rule',
|
|
21
|
+
* protocol: 'tcp',
|
|
22
|
+
* source_address: '0.0.0.0/0',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
13
25
|
*/
|
|
14
26
|
create(
|
|
15
27
|
vpcID: string,
|
|
@@ -21,6 +33,15 @@ export class FirewallRules extends APIResource {
|
|
|
21
33
|
|
|
22
34
|
/**
|
|
23
35
|
* Update a firewall rule
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const operation =
|
|
40
|
+
* await client.networking.firewallRules.update(
|
|
41
|
+
* 'firewall_rule_id',
|
|
42
|
+
* { vpc_id: 'vpc_id' },
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
24
45
|
*/
|
|
25
46
|
update(
|
|
26
47
|
firewallRuleID: string,
|
|
@@ -36,6 +57,12 @@ export class FirewallRules extends APIResource {
|
|
|
36
57
|
|
|
37
58
|
/**
|
|
38
59
|
* List all firewall rules
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const firewallRuleList =
|
|
64
|
+
* await client.networking.firewallRules.list('vpc_id');
|
|
65
|
+
* ```
|
|
39
66
|
*/
|
|
40
67
|
list(vpcID: string, options?: RequestOptions): APIPromise<FirewallRuleList> {
|
|
41
68
|
return this._client.get(path`/v1/networking/vpcs/${vpcID}/firewall_rules`, options);
|
|
@@ -43,6 +70,15 @@ export class FirewallRules extends APIResource {
|
|
|
43
70
|
|
|
44
71
|
/**
|
|
45
72
|
* Delete a firewall rule
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const operation =
|
|
77
|
+
* await client.networking.firewallRules.delete(
|
|
78
|
+
* 'firewall_rule_id',
|
|
79
|
+
* { vpc_id: 'vpc_id' },
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
46
82
|
*/
|
|
47
83
|
delete(
|
|
48
84
|
firewallRuleID: string,
|
|
@@ -55,6 +91,15 @@ export class FirewallRules extends APIResource {
|
|
|
55
91
|
|
|
56
92
|
/**
|
|
57
93
|
* Get details about a firewall rule
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const firewallRule =
|
|
98
|
+
* await client.networking.firewallRules.get(
|
|
99
|
+
* 'firewall_rule_id',
|
|
100
|
+
* { vpc_id: 'vpc_id' },
|
|
101
|
+
* );
|
|
102
|
+
* ```
|
|
58
103
|
*/
|
|
59
104
|
get(
|
|
60
105
|
firewallRuleID: string,
|
|
@@ -10,6 +10,15 @@ import { path } from '../../internal/utils/path';
|
|
|
10
10
|
export class VPCs extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a VPC
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const operation = await client.networking.vpcs.create({
|
|
17
|
+
* name: 'my-vpc',
|
|
18
|
+
* region: 'us-wdc-1',
|
|
19
|
+
* subnet_name: 'my-subnet',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
create(body: VPCCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
15
24
|
return this._client.post('/v1/networking/vpcs', { body, ...options });
|
|
@@ -17,6 +26,13 @@ export class VPCs extends APIResource {
|
|
|
17
26
|
|
|
18
27
|
/**
|
|
19
28
|
* Update a VPC
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const operation = await client.networking.vpcs.update(
|
|
33
|
+
* 'vpc_id',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
20
36
|
*/
|
|
21
37
|
update(
|
|
22
38
|
vpcID: string,
|
|
@@ -28,6 +44,11 @@ export class VPCs extends APIResource {
|
|
|
28
44
|
|
|
29
45
|
/**
|
|
30
46
|
* List all VPCs
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const vpcList = await client.networking.vpcs.list();
|
|
51
|
+
* ```
|
|
31
52
|
*/
|
|
32
53
|
list(options?: RequestOptions): APIPromise<VPCList> {
|
|
33
54
|
return this._client.get('/v1/networking/vpcs', options);
|
|
@@ -35,6 +56,13 @@ export class VPCs extends APIResource {
|
|
|
35
56
|
|
|
36
57
|
/**
|
|
37
58
|
* Delete a VPC
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const operation = await client.networking.vpcs.delete(
|
|
63
|
+
* 'vpc_id',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
38
66
|
*/
|
|
39
67
|
delete(vpcID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
40
68
|
return this._client.delete(path`/v1/networking/vpcs/${vpcID}`, options);
|
|
@@ -42,6 +70,11 @@ export class VPCs extends APIResource {
|
|
|
42
70
|
|
|
43
71
|
/**
|
|
44
72
|
* Get details about a VPC
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const vpc = await client.networking.vpcs.get('vpc_id');
|
|
77
|
+
* ```
|
|
45
78
|
*/
|
|
46
79
|
get(vpcID: string, options?: RequestOptions): APIPromise<VPC> {
|
|
47
80
|
return this._client.get(path`/v1/networking/vpcs/${vpcID}`, options);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.0
|
|
1
|
+
export const VERSION = '1.1.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0
|
|
1
|
+
export declare const VERSION = "1.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0
|
|
1
|
+
export declare const VERSION = "1.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.0
|
|
1
|
+
export const VERSION = '1.1.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type Crypto = {
|
|
2
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
3
|
-
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
|
4
|
-
/**
|
|
5
|
-
* Available only in secure contexts.
|
|
6
|
-
*
|
|
7
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
8
|
-
*/
|
|
9
|
-
randomUUID?: () => string;
|
|
10
|
-
};
|
|
11
|
-
export declare let getCrypto: () => Crypto | undefined;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=crypto.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.mts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type Crypto = {
|
|
2
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
3
|
-
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
|
4
|
-
/**
|
|
5
|
-
* Available only in secure contexts.
|
|
6
|
-
*
|
|
7
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
8
|
-
*/
|
|
9
|
-
randomUUID?: () => string;
|
|
10
|
-
};
|
|
11
|
-
export declare let getCrypto: () => Crypto | undefined;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
package/internal/shims/crypto.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCrypto = void 0;
|
|
4
|
-
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
|
5
|
-
let getCrypto = function lazyGetCrypto() {
|
|
6
|
-
if (exports.getCrypto !== lazyGetCrypto)
|
|
7
|
-
return (0, exports.getCrypto)();
|
|
8
|
-
const crypto = globalThis.crypto || (0, getBuiltinModule_1.getBuiltinModule)?.('node:crypto')?.webcrypto;
|
|
9
|
-
exports.getCrypto = () => crypto;
|
|
10
|
-
return crypto;
|
|
11
|
-
};
|
|
12
|
-
exports.getCrypto = getCrypto;
|
|
13
|
-
//# sourceMappingURL=crypto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAY/C,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,iBAAS,KAAK,aAAa;QAAE,OAAO,IAAA,iBAAS,GAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,iBAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALS,QAAA,SAAS,aAKlB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
|
2
|
-
export let getCrypto = function lazyGetCrypto() {
|
|
3
|
-
if (getCrypto !== lazyGetCrypto)
|
|
4
|
-
return getCrypto();
|
|
5
|
-
const crypto = globalThis.crypto || getBuiltinModule?.('node:crypto')?.webcrypto;
|
|
6
|
-
getCrypto = () => crypto;
|
|
7
|
-
return crypto;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=crypto.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.mjs","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAY3B,MAAM,CAAC,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,SAAS,KAAK,aAAa;QAAE,OAAO,SAAS,EAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare let getFile: () => FileConstructor;
|
|
2
|
-
type FileConstructor = typeof globalThis extends {
|
|
3
|
-
File: infer fileConstructor;
|
|
4
|
-
} ? fileConstructor : typeof FallbackFile;
|
|
5
|
-
export type File = InstanceType<FileConstructor>;
|
|
6
|
-
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
|
7
|
-
/**
|
|
8
|
-
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
|
9
|
-
*/
|
|
10
|
-
declare class FallbackFile extends Blob {
|
|
11
|
-
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
|
12
|
-
/**
|
|
13
|
-
* The name of the `File`.
|
|
14
|
-
*/
|
|
15
|
-
readonly name: string;
|
|
16
|
-
/**
|
|
17
|
-
* The last modified date of the `File`.
|
|
18
|
-
*/
|
|
19
|
-
readonly lastModified: number;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=file.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.mts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
package/internal/shims/file.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare let getFile: () => FileConstructor;
|
|
2
|
-
type FileConstructor = typeof globalThis extends {
|
|
3
|
-
File: infer fileConstructor;
|
|
4
|
-
} ? fileConstructor : typeof FallbackFile;
|
|
5
|
-
export type File = InstanceType<FileConstructor>;
|
|
6
|
-
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
|
7
|
-
/**
|
|
8
|
-
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
|
9
|
-
*/
|
|
10
|
-
declare class FallbackFile extends Blob {
|
|
11
|
-
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
|
12
|
-
/**
|
|
13
|
-
* The name of the `File`.
|
|
14
|
-
*/
|
|
15
|
-
readonly name: string;
|
|
16
|
-
/**
|
|
17
|
-
* The last modified date of the `File`.
|
|
18
|
-
*/
|
|
19
|
-
readonly lastModified: number;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":"AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
package/internal/shims/file.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFile = void 0;
|
|
4
|
-
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
|
5
|
-
let getFile = function lazyGetFile() {
|
|
6
|
-
if (exports.getFile !== lazyGetFile)
|
|
7
|
-
return (0, exports.getFile)();
|
|
8
|
-
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
|
9
|
-
const File = globalThis.File ?? (0, getBuiltinModule_1.getBuiltinModule)?.('node:buffer')?.File;
|
|
10
|
-
if (!File)
|
|
11
|
-
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
|
12
|
-
exports.getFile = () => File;
|
|
13
|
-
return File;
|
|
14
|
-
};
|
|
15
|
-
exports.getFile = getFile;
|
|
16
|
-
//# sourceMappingURL=file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAE/C,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,eAAO,KAAK,WAAW;QAAE,OAAO,IAAA,eAAO,GAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,eAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPS,QAAA,OAAO,WAOhB"}
|
package/internal/shims/file.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
|
2
|
-
export let getFile = function lazyGetFile() {
|
|
3
|
-
if (getFile !== lazyGetFile)
|
|
4
|
-
return getFile();
|
|
5
|
-
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
|
6
|
-
const File = globalThis.File ?? getBuiltinModule?.('node:buffer')?.File;
|
|
7
|
-
if (!File)
|
|
8
|
-
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
|
9
|
-
getFile = () => File;
|
|
10
|
-
return File;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=file.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.mjs","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAE3B,MAAM,CAAC,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,OAAO,KAAK,WAAW;QAAE,OAAO,OAAO,EAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
3
|
-
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
4
|
-
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
5
|
-
* our code would not work when bundled to ESM and run in Node 18.
|
|
6
|
-
* @param {string} id ID of the built-in to be loaded.
|
|
7
|
-
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
8
|
-
* does not exist.
|
|
9
|
-
*/
|
|
10
|
-
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
|
11
|
-
//# sourceMappingURL=getBuiltinModule.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltinModule.d.mts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAwDtE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
3
|
-
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
4
|
-
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
5
|
-
* our code would not work when bundled to ESM and run in Node 18.
|
|
6
|
-
* @param {string} id ID of the built-in to be loaded.
|
|
7
|
-
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
8
|
-
* does not exist.
|
|
9
|
-
*/
|
|
10
|
-
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
|
11
|
-
//# sourceMappingURL=getBuiltinModule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltinModule.d.ts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAwDtE,CAAC"}
|