@nirvana-labs/nirvana 1.66.0 → 1.67.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 +9 -0
- package/bin/migration-config.json +33 -0
- package/package.json +1 -1
- package/resources/instance-types/instance-types.d.mts +51 -23
- package/resources/instance-types/instance-types.d.mts.map +1 -1
- package/resources/instance-types/instance-types.d.ts +51 -23
- package/resources/instance-types/instance-types.d.ts.map +1 -1
- package/resources/instance-types/instance-types.js +25 -4
- package/resources/instance-types/instance-types.js.map +1 -1
- package/resources/instance-types/instance-types.mjs +25 -4
- package/resources/instance-types/instance-types.mjs.map +1 -1
- package/src/resources/instance-types/api.md +3 -1
- package/src/resources/instance-types/instance-types.ts +64 -31
- 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,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.67.0 (2026-04-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.66.0...v1.67.0](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.66.0...v1.67.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([35c56c8](https://github.com/nirvana-labs/nirvana-typescript/commit/35c56c892495b39452f4a84a05f78f9c9ffc767f))
|
|
10
|
+
* **api:** api update ([52663ea](https://github.com/nirvana-labs/nirvana-typescript/commit/52663eab719e75071ee0fb8dfe9e4279e3521533))
|
|
11
|
+
|
|
3
12
|
## 1.66.0 (2026-04-02)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v1.65.0...v1.66.0](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.65.0...v1.66.0)
|
|
@@ -36,6 +36,39 @@
|
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"base": "instanceTypes",
|
|
41
|
+
"name": "get",
|
|
42
|
+
"params": [
|
|
43
|
+
{
|
|
44
|
+
"type": "param",
|
|
45
|
+
"key": "name",
|
|
46
|
+
"location": "path"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "params",
|
|
50
|
+
"maybeOverload": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "options"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"oldParams": [
|
|
57
|
+
{
|
|
58
|
+
"type": "param",
|
|
59
|
+
"key": "region",
|
|
60
|
+
"location": "path"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "param",
|
|
64
|
+
"key": "name",
|
|
65
|
+
"location": "path"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "options"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
39
72
|
{
|
|
40
73
|
"base": "networking.firewallRules",
|
|
41
74
|
"name": "update",
|
package/package.json
CHANGED
|
@@ -1,44 +1,72 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as Shared from "../shared.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
4
|
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
6
|
export declare class InstanceTypes extends APIResource {
|
|
6
7
|
/**
|
|
7
8
|
* List instance types
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Automatically fetches more pages as needed.
|
|
13
|
+
* for await (const instanceType of client.instanceTypes.list()) {
|
|
14
|
+
* // ...
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
8
17
|
*/
|
|
9
|
-
list(query?: InstanceTypeListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
18
|
+
list(query?: InstanceTypeListParams | null | undefined, options?: RequestOptions): PagePromise<InstanceTypesCursor, InstanceType>;
|
|
19
|
+
/**
|
|
20
|
+
* Get an instance type by region and name
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const instanceType = await client.instanceTypes.get(
|
|
25
|
+
* 'n1-standard-8',
|
|
26
|
+
* { region: 'us-sva-2' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
get(name: string, params: InstanceTypeGetParams, options?: RequestOptions): APIPromise<InstanceType>;
|
|
31
|
+
}
|
|
32
|
+
export type InstanceTypesCursor = Cursor<InstanceType>;
|
|
33
|
+
/**
|
|
34
|
+
* Instance type.
|
|
35
|
+
*/
|
|
36
|
+
export interface InstanceType {
|
|
37
|
+
chipset: string;
|
|
38
|
+
/**
|
|
39
|
+
* When the Instance Type was created.
|
|
40
|
+
*/
|
|
41
|
+
created_at: string;
|
|
42
|
+
memory_gi: number;
|
|
43
|
+
name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Region the resource is in.
|
|
46
|
+
*/
|
|
47
|
+
region: Shared.RegionName;
|
|
48
|
+
/**
|
|
49
|
+
* When the Instance Type was updated.
|
|
50
|
+
*/
|
|
51
|
+
updated_at: string;
|
|
52
|
+
vcpu: number;
|
|
10
53
|
}
|
|
11
|
-
export type InstanceTypeListItemsCursor = Cursor<InstanceTypeList.Item>;
|
|
12
54
|
export interface InstanceTypeList {
|
|
13
|
-
items: Array<
|
|
55
|
+
items: Array<InstanceType>;
|
|
14
56
|
/**
|
|
15
57
|
* Pagination response details.
|
|
16
58
|
*/
|
|
17
59
|
pagination: Shared.Pagination;
|
|
18
60
|
}
|
|
19
|
-
export
|
|
61
|
+
export interface InstanceTypeListParams extends CursorParams {
|
|
62
|
+
}
|
|
63
|
+
export interface InstanceTypeGetParams {
|
|
20
64
|
/**
|
|
21
|
-
*
|
|
65
|
+
* Region name
|
|
22
66
|
*/
|
|
23
|
-
|
|
24
|
-
chipset: string;
|
|
25
|
-
/**
|
|
26
|
-
* When the Instance Type was created.
|
|
27
|
-
*/
|
|
28
|
-
created_at: string;
|
|
29
|
-
memory_gi: number;
|
|
30
|
-
name: string;
|
|
31
|
-
region: string;
|
|
32
|
-
/**
|
|
33
|
-
* When the Instance Type was updated.
|
|
34
|
-
*/
|
|
35
|
-
updated_at: string;
|
|
36
|
-
vcpu: number;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export interface InstanceTypeListParams extends CursorParams {
|
|
67
|
+
region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1';
|
|
40
68
|
}
|
|
41
69
|
export declare namespace InstanceTypes {
|
|
42
|
-
export { type InstanceTypeList as InstanceTypeList, type
|
|
70
|
+
export { type InstanceType as InstanceType, type InstanceTypeList as InstanceTypeList, type InstanceTypesCursor as InstanceTypesCursor, type InstanceTypeListParams as InstanceTypeListParams, type InstanceTypeGetParams as InstanceTypeGetParams, };
|
|
43
71
|
}
|
|
44
72
|
//# sourceMappingURL=instance-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-types.d.mts","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"instance-types.d.mts","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAIjD;;;;;;;;;;OAUG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAIrG;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAAG;AAE/D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;CAC3D;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,44 +1,72 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as Shared from "../shared.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
4
|
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
|
|
4
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
6
|
export declare class InstanceTypes extends APIResource {
|
|
6
7
|
/**
|
|
7
8
|
* List instance types
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Automatically fetches more pages as needed.
|
|
13
|
+
* for await (const instanceType of client.instanceTypes.list()) {
|
|
14
|
+
* // ...
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
8
17
|
*/
|
|
9
|
-
list(query?: InstanceTypeListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
18
|
+
list(query?: InstanceTypeListParams | null | undefined, options?: RequestOptions): PagePromise<InstanceTypesCursor, InstanceType>;
|
|
19
|
+
/**
|
|
20
|
+
* Get an instance type by region and name
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const instanceType = await client.instanceTypes.get(
|
|
25
|
+
* 'n1-standard-8',
|
|
26
|
+
* { region: 'us-sva-2' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
get(name: string, params: InstanceTypeGetParams, options?: RequestOptions): APIPromise<InstanceType>;
|
|
31
|
+
}
|
|
32
|
+
export type InstanceTypesCursor = Cursor<InstanceType>;
|
|
33
|
+
/**
|
|
34
|
+
* Instance type.
|
|
35
|
+
*/
|
|
36
|
+
export interface InstanceType {
|
|
37
|
+
chipset: string;
|
|
38
|
+
/**
|
|
39
|
+
* When the Instance Type was created.
|
|
40
|
+
*/
|
|
41
|
+
created_at: string;
|
|
42
|
+
memory_gi: number;
|
|
43
|
+
name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Region the resource is in.
|
|
46
|
+
*/
|
|
47
|
+
region: Shared.RegionName;
|
|
48
|
+
/**
|
|
49
|
+
* When the Instance Type was updated.
|
|
50
|
+
*/
|
|
51
|
+
updated_at: string;
|
|
52
|
+
vcpu: number;
|
|
10
53
|
}
|
|
11
|
-
export type InstanceTypeListItemsCursor = Cursor<InstanceTypeList.Item>;
|
|
12
54
|
export interface InstanceTypeList {
|
|
13
|
-
items: Array<
|
|
55
|
+
items: Array<InstanceType>;
|
|
14
56
|
/**
|
|
15
57
|
* Pagination response details.
|
|
16
58
|
*/
|
|
17
59
|
pagination: Shared.Pagination;
|
|
18
60
|
}
|
|
19
|
-
export
|
|
61
|
+
export interface InstanceTypeListParams extends CursorParams {
|
|
62
|
+
}
|
|
63
|
+
export interface InstanceTypeGetParams {
|
|
20
64
|
/**
|
|
21
|
-
*
|
|
65
|
+
* Region name
|
|
22
66
|
*/
|
|
23
|
-
|
|
24
|
-
chipset: string;
|
|
25
|
-
/**
|
|
26
|
-
* When the Instance Type was created.
|
|
27
|
-
*/
|
|
28
|
-
created_at: string;
|
|
29
|
-
memory_gi: number;
|
|
30
|
-
name: string;
|
|
31
|
-
region: string;
|
|
32
|
-
/**
|
|
33
|
-
* When the Instance Type was updated.
|
|
34
|
-
*/
|
|
35
|
-
updated_at: string;
|
|
36
|
-
vcpu: number;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export interface InstanceTypeListParams extends CursorParams {
|
|
67
|
+
region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1';
|
|
40
68
|
}
|
|
41
69
|
export declare namespace InstanceTypes {
|
|
42
|
-
export { type InstanceTypeList as InstanceTypeList, type
|
|
70
|
+
export { type InstanceType as InstanceType, type InstanceTypeList as InstanceTypeList, type InstanceTypesCursor as InstanceTypesCursor, type InstanceTypeListParams as InstanceTypeListParams, type InstanceTypeGetParams as InstanceTypeGetParams, };
|
|
43
71
|
}
|
|
44
72
|
//# sourceMappingURL=instance-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-types.d.ts","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"instance-types.d.ts","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAIjD;;;;;;;;;;OAUG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAIrG;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAAG;AAE/D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;CAC3D;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -4,15 +4,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.InstanceTypes = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
8
|
class InstanceTypes extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
9
10
|
* List instance types
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const instanceType of client.instanceTypes.list()) {
|
|
16
|
+
* // ...
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
10
19
|
*/
|
|
11
20
|
list(query = {}, options) {
|
|
12
|
-
return this._client.getAPIList('/v1/instance_types', (pagination_1.Cursor), {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
return this._client.getAPIList('/v1/instance_types', (pagination_1.Cursor), { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get an instance type by region and name
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const instanceType = await client.instanceTypes.get(
|
|
29
|
+
* 'n1-standard-8',
|
|
30
|
+
* { region: 'us-sva-2' },
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
get(name, params, options) {
|
|
35
|
+
const { region } = params;
|
|
36
|
+
return this._client.get((0, path_1.path) `/v1/instance_types/${region}/${name}`, options);
|
|
16
37
|
}
|
|
17
38
|
}
|
|
18
39
|
exports.InstanceTypes = InstanceTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-types.js","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"instance-types.js","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA+E;AAE/E,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,mBAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,IAAY,EAAE,MAA6B,EAAE,OAAwB;QACvE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,MAAM,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;CACF;AAlCD,sCAkCC"}
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { Cursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
5
|
export class InstanceTypes extends APIResource {
|
|
5
6
|
/**
|
|
6
7
|
* List instance types
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Automatically fetches more pages as needed.
|
|
12
|
+
* for await (const instanceType of client.instanceTypes.list()) {
|
|
13
|
+
* // ...
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
7
16
|
*/
|
|
8
17
|
list(query = {}, options) {
|
|
9
|
-
return this._client.getAPIList('/v1/instance_types', (Cursor), {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
return this._client.getAPIList('/v1/instance_types', (Cursor), { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get an instance type by region and name
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const instanceType = await client.instanceTypes.get(
|
|
26
|
+
* 'n1-standard-8',
|
|
27
|
+
* { region: 'us-sva-2' },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
get(name, params, options) {
|
|
32
|
+
const { region } = params;
|
|
33
|
+
return this._client.get(path `/v1/instance_types/${region}/${name}`, options);
|
|
13
34
|
}
|
|
14
35
|
}
|
|
15
36
|
//# sourceMappingURL=instance-types.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-types.mjs","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"instance-types.mjs","sourceRoot":"","sources":["../../src/resources/instance-types/instance-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,MAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,IAAY,EAAE,MAA6B,EAAE,OAAwB;QACvE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,MAAM,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Types:
|
|
4
4
|
|
|
5
|
+
- <code><a href="./src/resources/instance-types.ts">InstanceType</a></code>
|
|
5
6
|
- <code><a href="./src/resources/instance-types.ts">InstanceTypeList</a></code>
|
|
6
7
|
|
|
7
8
|
Methods:
|
|
8
9
|
|
|
9
|
-
- <code title="get /v1/instance_types">client.instanceTypes.<a href="./src/resources/instance-types.ts">list</a>({ ...params }) ->
|
|
10
|
+
- <code title="get /v1/instance_types">client.instanceTypes.<a href="./src/resources/instance-types.ts">list</a>({ ...params }) -> InstanceTypesCursor</code>
|
|
11
|
+
- <code title="get /v1/instance_types/{region}/{name}">client.instanceTypes.<a href="./src/resources/instance-types.ts">get</a>(name, { ...params }) -> InstanceType</code>
|
|
@@ -2,68 +2,101 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
6
|
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
7
9
|
|
|
8
10
|
export class InstanceTypes extends APIResource {
|
|
9
11
|
/**
|
|
10
12
|
* List instance types
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // Automatically fetches more pages as needed.
|
|
17
|
+
* for await (const instanceType of client.instanceTypes.list()) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
11
21
|
*/
|
|
12
22
|
list(
|
|
13
23
|
query: InstanceTypeListParams | null | undefined = {},
|
|
14
24
|
options?: RequestOptions,
|
|
15
|
-
): PagePromise<
|
|
16
|
-
return this._client.getAPIList('/v1/instance_types', Cursor<
|
|
17
|
-
query,
|
|
18
|
-
...options,
|
|
19
|
-
});
|
|
25
|
+
): PagePromise<InstanceTypesCursor, InstanceType> {
|
|
26
|
+
return this._client.getAPIList('/v1/instance_types', Cursor<InstanceType>, { query, ...options });
|
|
20
27
|
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type InstanceTypeListItemsCursor = Cursor<InstanceTypeList.Item>;
|
|
24
|
-
|
|
25
|
-
export interface InstanceTypeList {
|
|
26
|
-
items: Array<InstanceTypeList.Item>;
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* Get an instance type by region and name
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const instanceType = await client.instanceTypes.get(
|
|
35
|
+
* 'n1-standard-8',
|
|
36
|
+
* { region: 'us-sva-2' },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
30
39
|
*/
|
|
31
|
-
|
|
40
|
+
get(name: string, params: InstanceTypeGetParams, options?: RequestOptions): APIPromise<InstanceType> {
|
|
41
|
+
const { region } = params;
|
|
42
|
+
return this._client.get(path`/v1/instance_types/${region}/${name}`, options);
|
|
43
|
+
}
|
|
32
44
|
}
|
|
33
45
|
|
|
34
|
-
export
|
|
46
|
+
export type InstanceTypesCursor = Cursor<InstanceType>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Instance type.
|
|
50
|
+
*/
|
|
51
|
+
export interface InstanceType {
|
|
52
|
+
chipset: string;
|
|
53
|
+
|
|
35
54
|
/**
|
|
36
|
-
* Instance
|
|
55
|
+
* When the Instance Type was created.
|
|
37
56
|
*/
|
|
38
|
-
|
|
39
|
-
chipset: string;
|
|
57
|
+
created_at: string;
|
|
40
58
|
|
|
41
|
-
|
|
42
|
-
* When the Instance Type was created.
|
|
43
|
-
*/
|
|
44
|
-
created_at: string;
|
|
59
|
+
memory_gi: number;
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
name: string;
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Region the resource is in.
|
|
65
|
+
*/
|
|
66
|
+
region: Shared.RegionName;
|
|
49
67
|
|
|
50
|
-
|
|
68
|
+
/**
|
|
69
|
+
* When the Instance Type was updated.
|
|
70
|
+
*/
|
|
71
|
+
updated_at: string;
|
|
51
72
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
updated_at: string;
|
|
73
|
+
vcpu: number;
|
|
74
|
+
}
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
|
|
76
|
+
export interface InstanceTypeList {
|
|
77
|
+
items: Array<InstanceType>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Pagination response details.
|
|
81
|
+
*/
|
|
82
|
+
pagination: Shared.Pagination;
|
|
59
83
|
}
|
|
60
84
|
|
|
61
85
|
export interface InstanceTypeListParams extends CursorParams {}
|
|
62
86
|
|
|
87
|
+
export interface InstanceTypeGetParams {
|
|
88
|
+
/**
|
|
89
|
+
* Region name
|
|
90
|
+
*/
|
|
91
|
+
region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1';
|
|
92
|
+
}
|
|
93
|
+
|
|
63
94
|
export declare namespace InstanceTypes {
|
|
64
95
|
export {
|
|
96
|
+
type InstanceType as InstanceType,
|
|
65
97
|
type InstanceTypeList as InstanceTypeList,
|
|
66
|
-
type
|
|
98
|
+
type InstanceTypesCursor as InstanceTypesCursor,
|
|
67
99
|
type InstanceTypeListParams as InstanceTypeListParams,
|
|
100
|
+
type InstanceTypeGetParams as InstanceTypeGetParams,
|
|
68
101
|
};
|
|
69
102
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.67.0'; // 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.67.0";
|
|
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.67.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.
|
|
1
|
+
export const VERSION = '1.67.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|