@nirvana-labs/nirvana 1.59.2 → 1.60.1
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/bin/migration-config.json +108 -0
- package/package.json +1 -1
- package/resources/nks/clusters/clusters.d.mts +4 -0
- package/resources/nks/clusters/clusters.d.mts.map +1 -1
- package/resources/nks/clusters/clusters.d.ts +4 -0
- package/resources/nks/clusters/clusters.d.ts.map +1 -1
- package/resources/nks/clusters/clusters.js +4 -0
- package/resources/nks/clusters/clusters.js.map +1 -1
- package/resources/nks/clusters/clusters.mjs +4 -0
- package/resources/nks/clusters/clusters.mjs.map +1 -1
- package/resources/nks/clusters/controllers/controllers.d.mts +113 -0
- package/resources/nks/clusters/controllers/controllers.d.mts.map +1 -0
- package/resources/nks/clusters/controllers/controllers.d.ts +113 -0
- package/resources/nks/clusters/controllers/controllers.d.ts.map +1 -0
- package/resources/nks/clusters/controllers/controllers.js +54 -0
- package/resources/nks/clusters/controllers/controllers.js.map +1 -0
- package/resources/nks/clusters/controllers/controllers.mjs +49 -0
- package/resources/nks/clusters/controllers/controllers.mjs.map +1 -0
- package/resources/nks/clusters/controllers/index.d.mts +3 -0
- package/resources/nks/clusters/controllers/index.d.mts.map +1 -0
- package/resources/nks/clusters/controllers/index.d.ts +3 -0
- package/resources/nks/clusters/controllers/index.d.ts.map +1 -0
- package/resources/nks/clusters/controllers/index.js +9 -0
- package/resources/nks/clusters/controllers/index.js.map +1 -0
- package/resources/nks/clusters/controllers/index.mjs +4 -0
- package/resources/nks/clusters/controllers/index.mjs.map +1 -0
- package/resources/nks/clusters/controllers/volumes.d.mts +104 -0
- package/resources/nks/clusters/controllers/volumes.d.mts.map +1 -0
- package/resources/nks/clusters/controllers/volumes.d.ts +104 -0
- package/resources/nks/clusters/controllers/volumes.d.ts.map +1 -0
- package/resources/nks/clusters/controllers/volumes.js +48 -0
- package/resources/nks/clusters/controllers/volumes.js.map +1 -0
- package/resources/nks/clusters/controllers/volumes.mjs +44 -0
- package/resources/nks/clusters/controllers/volumes.mjs.map +1 -0
- package/resources/nks/clusters/controllers.d.mts +2 -0
- package/resources/nks/clusters/controllers.d.mts.map +1 -0
- package/resources/nks/clusters/controllers.d.ts +2 -0
- package/resources/nks/clusters/controllers.d.ts.map +1 -0
- package/resources/nks/clusters/controllers.js +6 -0
- package/resources/nks/clusters/controllers.js.map +1 -0
- package/resources/nks/clusters/controllers.mjs +3 -0
- package/resources/nks/clusters/controllers.mjs.map +1 -0
- package/resources/nks/clusters/index.d.mts +1 -0
- package/resources/nks/clusters/index.d.mts.map +1 -1
- package/resources/nks/clusters/index.d.ts +1 -0
- package/resources/nks/clusters/index.d.ts.map +1 -1
- package/resources/nks/clusters/index.js +5 -3
- package/resources/nks/clusters/index.js.map +1 -1
- package/resources/nks/clusters/index.mjs +1 -0
- package/resources/nks/clusters/index.mjs.map +1 -1
- package/src/resources/nks/api.md +26 -0
- package/src/resources/nks/clusters/clusters.ts +24 -0
- package/src/resources/nks/clusters/controllers/controllers.ts +174 -0
- package/src/resources/nks/clusters/controllers/index.ts +20 -0
- package/src/resources/nks/clusters/controllers/volumes.ts +146 -0
- package/src/resources/nks/clusters/controllers.ts +3 -0
- package/src/resources/nks/clusters/index.ts +10 -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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import * as Shared from '../../../shared';
|
|
5
|
+
import * as VolumesAPI from './volumes';
|
|
6
|
+
import {
|
|
7
|
+
NKSControllerVolume,
|
|
8
|
+
NKSControllerVolumeList,
|
|
9
|
+
NKSControllerVolumesCursor,
|
|
10
|
+
VolumeGetParams,
|
|
11
|
+
VolumeListParams,
|
|
12
|
+
Volumes,
|
|
13
|
+
} from './volumes';
|
|
14
|
+
import { APIPromise } from '../../../../core/api-promise';
|
|
15
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../../core/pagination';
|
|
16
|
+
import { RequestOptions } from '../../../../internal/request-options';
|
|
17
|
+
import { path } from '../../../../internal/utils/path';
|
|
18
|
+
|
|
19
|
+
export class Controllers extends APIResource {
|
|
20
|
+
volumes: VolumesAPI.Volumes = new VolumesAPI.Volumes(this._client);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* List all controllers in an NKS cluster
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Automatically fetches more pages as needed.
|
|
28
|
+
* for await (const nksController of client.nks.clusters.controllers.list(
|
|
29
|
+
* 'cluster_id',
|
|
30
|
+
* )) {
|
|
31
|
+
* // ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(
|
|
36
|
+
clusterID: string,
|
|
37
|
+
query: ControllerListParams | null | undefined = {},
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): PagePromise<NKSControllersCursor, NKSController> {
|
|
40
|
+
return this._client.getAPIList(path`/v1/nks/clusters/${clusterID}/controllers`, Cursor<NKSController>, {
|
|
41
|
+
query,
|
|
42
|
+
...options,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get details about an NKS controller
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const nksController =
|
|
52
|
+
* await client.nks.clusters.controllers.get(
|
|
53
|
+
* 'controller_id',
|
|
54
|
+
* { cluster_id: 'cluster_id' },
|
|
55
|
+
* );
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
get(
|
|
59
|
+
controllerID: string,
|
|
60
|
+
params: ControllerGetParams,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): APIPromise<NKSController> {
|
|
63
|
+
const { cluster_id } = params;
|
|
64
|
+
return this._client.get(path`/v1/nks/clusters/${cluster_id}/controllers/${controllerID}`, options);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type NKSControllersCursor = Cursor<NKSController>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* NKS controller details.
|
|
72
|
+
*/
|
|
73
|
+
export interface NKSController {
|
|
74
|
+
/**
|
|
75
|
+
* Unique identifier for the controller.
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* CPU configuration.
|
|
81
|
+
*/
|
|
82
|
+
cpu_config: NKSControllerCPUConfigResponse;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* When the controller was created.
|
|
86
|
+
*/
|
|
87
|
+
created_at: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Memory configuration.
|
|
91
|
+
*/
|
|
92
|
+
memory_config: NKSControllerMemoryConfigResponse;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Name of the controller.
|
|
96
|
+
*/
|
|
97
|
+
name: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Private IP address of the controller.
|
|
101
|
+
*/
|
|
102
|
+
private_ip: string | null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Status of the resource.
|
|
106
|
+
*/
|
|
107
|
+
status: Shared.ResourceStatus;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* When the controller was last updated.
|
|
111
|
+
*/
|
|
112
|
+
updated_at: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* CPU configuration.
|
|
117
|
+
*/
|
|
118
|
+
export interface NKSControllerCPUConfigResponse {
|
|
119
|
+
/**
|
|
120
|
+
* Number of virtual CPUs.
|
|
121
|
+
*/
|
|
122
|
+
vcpu: number;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface NKSControllerList {
|
|
126
|
+
items: Array<NKSController>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Pagination response details.
|
|
130
|
+
*/
|
|
131
|
+
pagination: Shared.Pagination;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Memory configuration.
|
|
136
|
+
*/
|
|
137
|
+
export interface NKSControllerMemoryConfigResponse {
|
|
138
|
+
/**
|
|
139
|
+
* Size of the memory in GB.
|
|
140
|
+
*/
|
|
141
|
+
size: number;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface ControllerListParams extends CursorParams {}
|
|
145
|
+
|
|
146
|
+
export interface ControllerGetParams {
|
|
147
|
+
/**
|
|
148
|
+
* Cluster ID
|
|
149
|
+
*/
|
|
150
|
+
cluster_id: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
Controllers.Volumes = Volumes;
|
|
154
|
+
|
|
155
|
+
export declare namespace Controllers {
|
|
156
|
+
export {
|
|
157
|
+
type NKSController as NKSController,
|
|
158
|
+
type NKSControllerCPUConfigResponse as NKSControllerCPUConfigResponse,
|
|
159
|
+
type NKSControllerList as NKSControllerList,
|
|
160
|
+
type NKSControllerMemoryConfigResponse as NKSControllerMemoryConfigResponse,
|
|
161
|
+
type NKSControllersCursor as NKSControllersCursor,
|
|
162
|
+
type ControllerListParams as ControllerListParams,
|
|
163
|
+
type ControllerGetParams as ControllerGetParams,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export {
|
|
167
|
+
Volumes as Volumes,
|
|
168
|
+
type NKSControllerVolume as NKSControllerVolume,
|
|
169
|
+
type NKSControllerVolumeList as NKSControllerVolumeList,
|
|
170
|
+
type NKSControllerVolumesCursor as NKSControllerVolumesCursor,
|
|
171
|
+
type VolumeListParams as VolumeListParams,
|
|
172
|
+
type VolumeGetParams as VolumeGetParams,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Controllers,
|
|
5
|
+
type NKSController,
|
|
6
|
+
type NKSControllerCPUConfigResponse,
|
|
7
|
+
type NKSControllerList,
|
|
8
|
+
type NKSControllerMemoryConfigResponse,
|
|
9
|
+
type ControllerListParams,
|
|
10
|
+
type ControllerGetParams,
|
|
11
|
+
type NKSControllersCursor,
|
|
12
|
+
} from './controllers';
|
|
13
|
+
export {
|
|
14
|
+
Volumes,
|
|
15
|
+
type NKSControllerVolume,
|
|
16
|
+
type NKSControllerVolumeList,
|
|
17
|
+
type VolumeListParams,
|
|
18
|
+
type VolumeGetParams,
|
|
19
|
+
type NKSControllerVolumesCursor,
|
|
20
|
+
} from './volumes';
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import * as Shared from '../../../shared';
|
|
5
|
+
import * as VolumesAPI from '../../../compute/volumes/volumes';
|
|
6
|
+
import { APIPromise } from '../../../../core/api-promise';
|
|
7
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../../core/pagination';
|
|
8
|
+
import { RequestOptions } from '../../../../internal/request-options';
|
|
9
|
+
import { path } from '../../../../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Volumes extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* List all volumes attached to an NKS controller
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Automatically fetches more pages as needed.
|
|
18
|
+
* for await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(
|
|
19
|
+
* 'controller_id',
|
|
20
|
+
* { cluster_id: 'cluster_id' },
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
controllerID: string,
|
|
28
|
+
params: VolumeListParams,
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<NKSControllerVolumesCursor, NKSControllerVolume> {
|
|
31
|
+
const { cluster_id, ...query } = params;
|
|
32
|
+
return this._client.getAPIList(
|
|
33
|
+
path`/v1/nks/clusters/${cluster_id}/controllers/${controllerID}/volumes`,
|
|
34
|
+
Cursor<NKSControllerVolume>,
|
|
35
|
+
{ query, ...options },
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get details about a volume attached to an NKS controller
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const nksControllerVolume =
|
|
45
|
+
* await client.nks.clusters.controllers.volumes.get(
|
|
46
|
+
* 'volume_id',
|
|
47
|
+
* {
|
|
48
|
+
* cluster_id: 'cluster_id',
|
|
49
|
+
* controller_id: 'controller_id',
|
|
50
|
+
* },
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
get(volumeID: string, params: VolumeGetParams, options?: RequestOptions): APIPromise<NKSControllerVolume> {
|
|
55
|
+
const { cluster_id, controller_id } = params;
|
|
56
|
+
return this._client.get(
|
|
57
|
+
path`/v1/nks/clusters/${cluster_id}/controllers/${controller_id}/volumes/${volumeID}`,
|
|
58
|
+
options,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type NKSControllerVolumesCursor = Cursor<NKSControllerVolume>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* NKS controller volume details.
|
|
67
|
+
*/
|
|
68
|
+
export interface NKSControllerVolume {
|
|
69
|
+
/**
|
|
70
|
+
* Unique identifier for the volume.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* When the volume was created.
|
|
76
|
+
*/
|
|
77
|
+
created_at: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Volume kind.
|
|
81
|
+
*/
|
|
82
|
+
kind: VolumesAPI.VolumeKind;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Name of the volume.
|
|
86
|
+
*/
|
|
87
|
+
name: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Size of the volume in GB.
|
|
91
|
+
*/
|
|
92
|
+
size: number;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Status of the resource.
|
|
96
|
+
*/
|
|
97
|
+
status: Shared.ResourceStatus;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Type of the Volume.
|
|
101
|
+
*/
|
|
102
|
+
type: VolumesAPI.VolumeType;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* When the volume was last updated.
|
|
106
|
+
*/
|
|
107
|
+
updated_at: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface NKSControllerVolumeList {
|
|
111
|
+
items: Array<NKSControllerVolume>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Pagination response details.
|
|
115
|
+
*/
|
|
116
|
+
pagination: Shared.Pagination;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface VolumeListParams extends CursorParams {
|
|
120
|
+
/**
|
|
121
|
+
* Path param: Cluster ID
|
|
122
|
+
*/
|
|
123
|
+
cluster_id: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface VolumeGetParams {
|
|
127
|
+
/**
|
|
128
|
+
* Cluster ID
|
|
129
|
+
*/
|
|
130
|
+
cluster_id: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Controller ID
|
|
134
|
+
*/
|
|
135
|
+
controller_id: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare namespace Volumes {
|
|
139
|
+
export {
|
|
140
|
+
type NKSControllerVolume as NKSControllerVolume,
|
|
141
|
+
type NKSControllerVolumeList as NKSControllerVolumeList,
|
|
142
|
+
type NKSControllerVolumesCursor as NKSControllerVolumesCursor,
|
|
143
|
+
type VolumeListParams as VolumeListParams,
|
|
144
|
+
type VolumeGetParams as VolumeGetParams,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
@@ -11,6 +11,16 @@ export {
|
|
|
11
11
|
type ClusterListParams,
|
|
12
12
|
type NKSClustersCursor,
|
|
13
13
|
} from './clusters';
|
|
14
|
+
export {
|
|
15
|
+
Controllers,
|
|
16
|
+
type NKSController,
|
|
17
|
+
type NKSControllerCPUConfigResponse,
|
|
18
|
+
type NKSControllerList,
|
|
19
|
+
type NKSControllerMemoryConfigResponse,
|
|
20
|
+
type ControllerListParams,
|
|
21
|
+
type ControllerGetParams,
|
|
22
|
+
type NKSControllersCursor,
|
|
23
|
+
} from './controllers/index';
|
|
14
24
|
export {
|
|
15
25
|
Pools,
|
|
16
26
|
type NKSNodePool,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.60.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.60.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.60.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.60.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|