@nirvana-labs/nirvana 1.1.1 → 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.
Files changed (89) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +7 -12
  3. package/package.json +1 -4
  4. package/resources/compute/compute.d.mts +2 -2
  5. package/resources/compute/compute.d.mts.map +1 -1
  6. package/resources/compute/compute.d.ts +2 -2
  7. package/resources/compute/compute.d.ts.map +1 -1
  8. package/resources/compute/compute.js +2 -2
  9. package/resources/compute/compute.js.map +1 -1
  10. package/resources/compute/compute.mjs +2 -2
  11. package/resources/compute/compute.mjs.map +1 -1
  12. package/resources/compute/index.d.mts +1 -1
  13. package/resources/compute/index.d.ts +1 -1
  14. package/resources/compute/index.js +2 -2
  15. package/resources/compute/index.js.map +1 -1
  16. package/resources/compute/index.mjs +1 -1
  17. package/resources/compute/vms/availability.d.mts +130 -0
  18. package/resources/compute/vms/availability.d.mts.map +1 -0
  19. package/resources/compute/vms/availability.d.ts +130 -0
  20. package/resources/compute/vms/availability.d.ts.map +1 -0
  21. package/resources/compute/vms/availability.js +56 -0
  22. package/resources/compute/vms/availability.js.map +1 -0
  23. package/resources/compute/vms/availability.mjs +52 -0
  24. package/resources/compute/vms/availability.mjs.map +1 -0
  25. package/resources/compute/vms/index.d.mts +1 -0
  26. package/resources/compute/vms/index.d.mts.map +1 -1
  27. package/resources/compute/vms/index.d.ts +1 -0
  28. package/resources/compute/vms/index.d.ts.map +1 -1
  29. package/resources/compute/vms/index.js +3 -1
  30. package/resources/compute/vms/index.js.map +1 -1
  31. package/resources/compute/vms/index.mjs +1 -0
  32. package/resources/compute/vms/index.mjs.map +1 -1
  33. package/resources/compute/vms/vms.d.mts +5 -1
  34. package/resources/compute/vms/vms.d.mts.map +1 -1
  35. package/resources/compute/vms/vms.d.ts +5 -1
  36. package/resources/compute/vms/vms.d.ts.map +1 -1
  37. package/resources/compute/vms/vms.js +5 -1
  38. package/resources/compute/vms/vms.js.map +1 -1
  39. package/resources/compute/vms/vms.mjs +5 -1
  40. package/resources/compute/vms/vms.mjs.map +1 -1
  41. package/resources/compute/vms/volumes.d.mts +1 -1
  42. package/resources/compute/vms/volumes.d.ts +1 -1
  43. package/resources/compute/volumes/availability.d.mts +61 -0
  44. package/resources/compute/volumes/availability.d.mts.map +1 -0
  45. package/resources/compute/volumes/availability.d.ts +61 -0
  46. package/resources/compute/volumes/availability.d.ts.map +1 -0
  47. package/resources/compute/volumes/availability.js +49 -0
  48. package/resources/compute/volumes/availability.js.map +1 -0
  49. package/resources/compute/volumes/availability.mjs +45 -0
  50. package/resources/compute/volumes/availability.mjs.map +1 -0
  51. package/resources/compute/volumes/index.d.mts +3 -0
  52. package/resources/compute/volumes/index.d.mts.map +1 -0
  53. package/resources/compute/volumes/index.d.ts +3 -0
  54. package/resources/compute/volumes/index.d.ts.map +1 -0
  55. package/resources/compute/volumes/index.js +9 -0
  56. package/resources/compute/volumes/index.js.map +1 -0
  57. package/resources/compute/volumes/index.mjs +4 -0
  58. package/resources/compute/volumes/index.mjs.map +1 -0
  59. package/resources/compute/volumes/volumes.d.mts +150 -0
  60. package/resources/compute/volumes/volumes.d.mts.map +1 -0
  61. package/resources/compute/volumes/volumes.d.ts +150 -0
  62. package/resources/compute/volumes/volumes.d.ts.map +1 -0
  63. package/resources/compute/volumes/volumes.js +83 -0
  64. package/resources/compute/volumes/volumes.js.map +1 -0
  65. package/resources/compute/volumes/volumes.mjs +78 -0
  66. package/resources/compute/volumes/volumes.mjs.map +1 -0
  67. package/resources/compute/volumes.d.mts +1 -145
  68. package/resources/compute/volumes.d.mts.map +1 -1
  69. package/resources/compute/volumes.d.ts +1 -145
  70. package/resources/compute/volumes.d.ts.map +1 -1
  71. package/resources/compute/volumes.js +2 -71
  72. package/resources/compute/volumes.js.map +1 -1
  73. package/resources/compute/volumes.mjs +1 -69
  74. package/resources/compute/volumes.mjs.map +1 -1
  75. package/src/resources/compute/compute.ts +10 -10
  76. package/src/resources/compute/index.ts +1 -1
  77. package/src/resources/compute/vms/availability.ts +172 -0
  78. package/src/resources/compute/vms/index.ts +7 -0
  79. package/src/resources/compute/vms/vms.ts +19 -1
  80. package/src/resources/compute/vms/volumes.ts +1 -1
  81. package/src/resources/compute/volumes/availability.ts +91 -0
  82. package/src/resources/compute/volumes/index.ts +18 -0
  83. package/src/resources/compute/volumes/volumes.ts +213 -0
  84. package/src/resources/compute/volumes.ts +1 -191
  85. package/src/version.ts +1 -1
  86. package/version.d.mts +1 -1
  87. package/version.d.ts +1 -1
  88. package/version.js +1 -1
  89. package/version.mjs +1 -1
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Availability,
5
+ type AvailabilityCreateResponse,
6
+ type AvailabilityUpdateResponse,
7
+ type AvailabilityCreateParams,
8
+ type AvailabilityUpdateParams,
9
+ } from './availability';
10
+ export {
11
+ Volumes,
12
+ type StorageType,
13
+ type Volume,
14
+ type VolumeKind,
15
+ type VolumeList,
16
+ type VolumeCreateParams,
17
+ type VolumeUpdateParams,
18
+ } from './volumes';
@@ -0,0 +1,213 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as OperationsAPI from '../../operations';
5
+ import * as Shared from '../../shared';
6
+ import * as AvailabilityAPI from './availability';
7
+ import {
8
+ Availability,
9
+ AvailabilityCreateParams,
10
+ AvailabilityCreateResponse,
11
+ AvailabilityUpdateParams,
12
+ AvailabilityUpdateResponse,
13
+ } from './availability';
14
+ import { APIPromise } from '../../../core/api-promise';
15
+ import { RequestOptions } from '../../../internal/request-options';
16
+ import { path } from '../../../internal/utils/path';
17
+
18
+ export class Volumes extends APIResource {
19
+ availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
20
+
21
+ /**
22
+ * Create a Volume. Only data volumes can be created.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const operation = await client.compute.volumes.create({
27
+ * name: 'my-data-volume',
28
+ * size: 100,
29
+ * vm_id: 'vm_id',
30
+ * });
31
+ * ```
32
+ */
33
+ create(body: VolumeCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
34
+ return this._client.post('/v1/compute/volumes', { body, ...options });
35
+ }
36
+
37
+ /**
38
+ * Update a Volume. Boot or data volumes can be updated.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const operation = await client.compute.volumes.update(
43
+ * 'volume_id',
44
+ * );
45
+ * ```
46
+ */
47
+ update(
48
+ volumeID: string,
49
+ body: VolumeUpdateParams,
50
+ options?: RequestOptions,
51
+ ): APIPromise<OperationsAPI.Operation> {
52
+ return this._client.patch(path`/v1/compute/volumes/${volumeID}`, { body, ...options });
53
+ }
54
+
55
+ /**
56
+ * List all volumes
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const volumeList = await client.compute.volumes.list();
61
+ * ```
62
+ */
63
+ list(options?: RequestOptions): APIPromise<VolumeList> {
64
+ return this._client.get('/v1/compute/volumes', options);
65
+ }
66
+
67
+ /**
68
+ * Delete a Volume. Boot or data volumes can be deleted.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const operation = await client.compute.volumes.delete(
73
+ * 'volume_id',
74
+ * );
75
+ * ```
76
+ */
77
+ delete(volumeID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
78
+ return this._client.delete(path`/v1/compute/volumes/${volumeID}`, options);
79
+ }
80
+
81
+ /**
82
+ * Get a Volume.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const volume = await client.compute.volumes.get(
87
+ * 'volume_id',
88
+ * );
89
+ * ```
90
+ */
91
+ get(volumeID: string, options?: RequestOptions): APIPromise<Volume> {
92
+ return this._client.get(path`/v1/compute/volumes/${volumeID}`, options);
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Storage type the volume is using.
98
+ */
99
+ export type StorageType = 'nvme';
100
+
101
+ /**
102
+ * Volume details.
103
+ */
104
+ export interface Volume {
105
+ /**
106
+ * Unique identifier for the volume.
107
+ */
108
+ id: string;
109
+
110
+ /**
111
+ * When the volume was created.
112
+ */
113
+ created_at: string;
114
+
115
+ /**
116
+ * Volume kind.
117
+ */
118
+ kind: VolumeKind;
119
+
120
+ /**
121
+ * Name of the volume.
122
+ */
123
+ name: string;
124
+
125
+ /**
126
+ * Size of the volume in GB.
127
+ */
128
+ size: number;
129
+
130
+ /**
131
+ * Status of the resource.
132
+ */
133
+ status: Shared.ResourceStatus;
134
+
135
+ /**
136
+ * Storage type the volume is using.
137
+ */
138
+ type: StorageType;
139
+
140
+ /**
141
+ * When the volume was updated.
142
+ */
143
+ updated_at: string;
144
+
145
+ /**
146
+ * ID of the VM the volume is attached to.
147
+ */
148
+ vm_id: string | null;
149
+
150
+ /**
151
+ * Name of the VM the volume is attached to.
152
+ */
153
+ vm_name: string | null;
154
+ }
155
+
156
+ /**
157
+ * Volume kind.
158
+ */
159
+ export type VolumeKind = 'boot' | 'data';
160
+
161
+ export interface VolumeList {
162
+ items: Array<Volume>;
163
+ }
164
+
165
+ export interface VolumeCreateParams {
166
+ /**
167
+ * Name of the volume.
168
+ */
169
+ name: string;
170
+
171
+ /**
172
+ * Size of the volume in GB.
173
+ */
174
+ size: number;
175
+
176
+ /**
177
+ * ID of the VM the volume is attached to.
178
+ */
179
+ vm_id: string;
180
+ }
181
+
182
+ export interface VolumeUpdateParams {
183
+ /**
184
+ * Name of the volume.
185
+ */
186
+ name?: string;
187
+
188
+ /**
189
+ * Size of the volume in GB.
190
+ */
191
+ size?: number;
192
+ }
193
+
194
+ Volumes.Availability = Availability;
195
+
196
+ export declare namespace Volumes {
197
+ export {
198
+ type StorageType as StorageType,
199
+ type Volume as Volume,
200
+ type VolumeKind as VolumeKind,
201
+ type VolumeList as VolumeList,
202
+ type VolumeCreateParams as VolumeCreateParams,
203
+ type VolumeUpdateParams as VolumeUpdateParams,
204
+ };
205
+
206
+ export {
207
+ Availability as Availability,
208
+ type AvailabilityCreateResponse as AvailabilityCreateResponse,
209
+ type AvailabilityUpdateResponse as AvailabilityUpdateResponse,
210
+ type AvailabilityCreateParams as AvailabilityCreateParams,
211
+ type AvailabilityUpdateParams as AvailabilityUpdateParams,
212
+ };
213
+ }
@@ -1,193 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
4
- import * as OperationsAPI from '../operations';
5
- import * as Shared from '../shared';
6
- import { APIPromise } from '../../core/api-promise';
7
- import { RequestOptions } from '../../internal/request-options';
8
- import { path } from '../../internal/utils/path';
9
-
10
- export class Volumes extends APIResource {
11
- /**
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
- * ```
22
- */
23
- create(body: VolumeCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
24
- return this._client.post('/v1/compute/volumes', { body, ...options });
25
- }
26
-
27
- /**
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
- * ```
36
- */
37
- update(
38
- volumeID: string,
39
- body: VolumeUpdateParams,
40
- options?: RequestOptions,
41
- ): APIPromise<OperationsAPI.Operation> {
42
- return this._client.patch(path`/v1/compute/volumes/${volumeID}`, { body, ...options });
43
- }
44
-
45
- /**
46
- * List all volumes
47
- *
48
- * @example
49
- * ```ts
50
- * const volumeList = await client.compute.volumes.list();
51
- * ```
52
- */
53
- list(options?: RequestOptions): APIPromise<VolumeList> {
54
- return this._client.get('/v1/compute/volumes', options);
55
- }
56
-
57
- /**
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
- * ```
66
- */
67
- delete(volumeID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
68
- return this._client.delete(path`/v1/compute/volumes/${volumeID}`, options);
69
- }
70
-
71
- /**
72
- * Get a Volume.
73
- *
74
- * @example
75
- * ```ts
76
- * const volume = await client.compute.volumes.get(
77
- * 'volume_id',
78
- * );
79
- * ```
80
- */
81
- get(volumeID: string, options?: RequestOptions): APIPromise<Volume> {
82
- return this._client.get(path`/v1/compute/volumes/${volumeID}`, options);
83
- }
84
- }
85
-
86
- /**
87
- * Storage type the volume is using.
88
- */
89
- export type StorageType = 'nvme';
90
-
91
- /**
92
- * Volume details.
93
- */
94
- export interface Volume {
95
- /**
96
- * Unique identifier for the volume.
97
- */
98
- id: string;
99
-
100
- /**
101
- * When the volume was created.
102
- */
103
- created_at: string;
104
-
105
- /**
106
- * Volume kind.
107
- */
108
- kind: VolumeKind;
109
-
110
- /**
111
- * Name of the volume.
112
- */
113
- name: string;
114
-
115
- /**
116
- * Size of the volume in GB.
117
- */
118
- size: number;
119
-
120
- /**
121
- * Status of the resource.
122
- */
123
- status: Shared.ResourceStatus;
124
-
125
- /**
126
- * Storage type the volume is using.
127
- */
128
- type: StorageType;
129
-
130
- /**
131
- * When the volume was updated.
132
- */
133
- updated_at: string;
134
-
135
- /**
136
- * ID of the VM the volume is attached to.
137
- */
138
- vm_id: string | null;
139
-
140
- /**
141
- * Name of the VM the volume is attached to.
142
- */
143
- vm_name: string | null;
144
- }
145
-
146
- /**
147
- * Volume kind.
148
- */
149
- export type VolumeKind = 'boot' | 'data';
150
-
151
- export interface VolumeList {
152
- items: Array<Volume>;
153
- }
154
-
155
- export interface VolumeCreateParams {
156
- /**
157
- * Name of the volume.
158
- */
159
- name: string;
160
-
161
- /**
162
- * Size of the volume in GB.
163
- */
164
- size: number;
165
-
166
- /**
167
- * ID of the VM the volume is attached to.
168
- */
169
- vm_id: string;
170
- }
171
-
172
- export interface VolumeUpdateParams {
173
- /**
174
- * Name of the volume.
175
- */
176
- name?: string;
177
-
178
- /**
179
- * Size of the volume in GB.
180
- */
181
- size?: number;
182
- }
183
-
184
- export declare namespace Volumes {
185
- export {
186
- type StorageType as StorageType,
187
- type Volume as Volume,
188
- type VolumeKind as VolumeKind,
189
- type VolumeList as VolumeList,
190
- type VolumeCreateParams as VolumeCreateParams,
191
- type VolumeUpdateParams as VolumeUpdateParams,
192
- };
193
- }
3
+ export * from './volumes/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.1.1'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.1.1";
1
+ export declare const VERSION = "1.2.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.1.1";
1
+ export declare const VERSION = "1.2.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.1.1'; // x-release-please-version
4
+ exports.VERSION = '1.2.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.1.1'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map