@nirvana-labs/nirvana 1.1.2 → 1.3.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 (137) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +7 -12
  3. package/package.json +1 -1
  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/resources/networking/index.d.mts +1 -1
  76. package/resources/networking/index.d.ts +1 -1
  77. package/resources/networking/index.js +2 -2
  78. package/resources/networking/index.js.map +1 -1
  79. package/resources/networking/index.mjs +1 -1
  80. package/resources/networking/networking.d.mts +2 -2
  81. package/resources/networking/networking.d.ts +2 -2
  82. package/resources/networking/networking.js +2 -2
  83. package/resources/networking/networking.js.map +1 -1
  84. package/resources/networking/networking.mjs +2 -2
  85. package/resources/networking/vpcs/availability.d.mts +62 -0
  86. package/resources/networking/vpcs/availability.d.mts.map +1 -0
  87. package/resources/networking/vpcs/availability.d.ts +62 -0
  88. package/resources/networking/vpcs/availability.d.ts.map +1 -0
  89. package/resources/networking/vpcs/availability.js +40 -0
  90. package/resources/networking/vpcs/availability.js.map +1 -0
  91. package/resources/networking/vpcs/availability.mjs +36 -0
  92. package/resources/networking/vpcs/availability.mjs.map +1 -0
  93. package/resources/networking/vpcs/index.d.mts +3 -0
  94. package/resources/networking/vpcs/index.d.mts.map +1 -0
  95. package/resources/networking/vpcs/index.d.ts +3 -0
  96. package/resources/networking/vpcs/index.d.ts.map +1 -0
  97. package/resources/networking/vpcs/index.js +9 -0
  98. package/resources/networking/vpcs/index.js.map +1 -0
  99. package/resources/networking/vpcs/index.mjs +4 -0
  100. package/resources/networking/vpcs/index.mjs.map +1 -0
  101. package/resources/networking/vpcs/vpcs.d.mts +157 -0
  102. package/resources/networking/vpcs/vpcs.d.mts.map +1 -0
  103. package/resources/networking/vpcs/vpcs.d.ts +157 -0
  104. package/resources/networking/vpcs/vpcs.d.ts.map +1 -0
  105. package/resources/networking/vpcs/vpcs.js +81 -0
  106. package/resources/networking/vpcs/vpcs.js.map +1 -0
  107. package/resources/networking/vpcs/vpcs.mjs +76 -0
  108. package/resources/networking/vpcs/vpcs.mjs.map +1 -0
  109. package/resources/networking/vpcs.d.mts +1 -152
  110. package/resources/networking/vpcs.d.mts.map +1 -1
  111. package/resources/networking/vpcs.d.ts +1 -152
  112. package/resources/networking/vpcs.d.ts.map +1 -1
  113. package/resources/networking/vpcs.js +2 -69
  114. package/resources/networking/vpcs.js.map +1 -1
  115. package/resources/networking/vpcs.mjs +1 -67
  116. package/resources/networking/vpcs.mjs.map +1 -1
  117. package/src/resources/compute/compute.ts +10 -10
  118. package/src/resources/compute/index.ts +1 -1
  119. package/src/resources/compute/vms/availability.ts +172 -0
  120. package/src/resources/compute/vms/index.ts +7 -0
  121. package/src/resources/compute/vms/vms.ts +19 -1
  122. package/src/resources/compute/vms/volumes.ts +1 -1
  123. package/src/resources/compute/volumes/availability.ts +91 -0
  124. package/src/resources/compute/volumes/index.ts +18 -0
  125. package/src/resources/compute/volumes/volumes.ts +213 -0
  126. package/src/resources/compute/volumes.ts +1 -191
  127. package/src/resources/networking/index.ts +1 -1
  128. package/src/resources/networking/networking.ts +2 -2
  129. package/src/resources/networking/vpcs/availability.ts +83 -0
  130. package/src/resources/networking/vpcs/index.ts +17 -0
  131. package/src/resources/networking/vpcs/vpcs.ts +220 -0
  132. package/src/resources/networking/vpcs.ts +1 -198
  133. package/src/version.ts +1 -1
  134. package/version.d.mts +1 -1
  135. package/version.d.ts +1 -1
  136. package/version.js +1 -1
  137. package/version.mjs +1 -1
@@ -1,153 +1,2 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import * as OperationsAPI from "../operations.js";
3
- import * as Shared from "../shared.js";
4
- import { APIPromise } from "../../core/api-promise.js";
5
- import { RequestOptions } from "../../internal/request-options.js";
6
- export declare class VPCs extends APIResource {
7
- /**
8
- * Create a VPC
9
- *
10
- * @example
11
- * ```ts
12
- * const operation = await client.networking.vpcs.create({
13
- * name: 'my-vpc',
14
- * region: 'us-wdc-1',
15
- * subnet_name: 'my-subnet',
16
- * });
17
- * ```
18
- */
19
- create(body: VPCCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
20
- /**
21
- * Update a VPC
22
- *
23
- * @example
24
- * ```ts
25
- * const operation = await client.networking.vpcs.update(
26
- * 'vpc_id',
27
- * );
28
- * ```
29
- */
30
- update(vpcID: string, body: VPCUpdateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
31
- /**
32
- * List all VPCs
33
- *
34
- * @example
35
- * ```ts
36
- * const vpcList = await client.networking.vpcs.list();
37
- * ```
38
- */
39
- list(options?: RequestOptions): APIPromise<VPCList>;
40
- /**
41
- * Delete a VPC
42
- *
43
- * @example
44
- * ```ts
45
- * const operation = await client.networking.vpcs.delete(
46
- * 'vpc_id',
47
- * );
48
- * ```
49
- */
50
- delete(vpcID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
51
- /**
52
- * Get details about a VPC
53
- *
54
- * @example
55
- * ```ts
56
- * const vpc = await client.networking.vpcs.get('vpc_id');
57
- * ```
58
- */
59
- get(vpcID: string, options?: RequestOptions): APIPromise<VPC>;
60
- }
61
- /**
62
- * Subnet of the VPC.
63
- */
64
- export interface Subnet {
65
- /**
66
- * Unique identifier for the subnet.
67
- */
68
- id: string;
69
- /**
70
- * CIDR block for the subnet.
71
- */
72
- cidr: string;
73
- /**
74
- * When the subnet was created.
75
- */
76
- created_at: string;
77
- /**
78
- * Name of the subnet.
79
- */
80
- name: string;
81
- /**
82
- * When the subnet was updated.
83
- */
84
- updated_at: string;
85
- }
86
- /**
87
- * VPC details.
88
- */
89
- export interface VPC {
90
- /**
91
- * Unique identifier for the VPC.
92
- */
93
- id: string;
94
- /**
95
- * When the VPC was created.
96
- */
97
- created_at: string;
98
- /**
99
- * IDs of the firewall rules associated with the VPC.
100
- */
101
- firewall_rule_ids: Array<string>;
102
- /**
103
- * Name of the VPC.
104
- */
105
- name: string;
106
- /**
107
- * Region the resource is in.
108
- */
109
- region: Shared.RegionName;
110
- /**
111
- * Status of the resource.
112
- */
113
- status: Shared.ResourceStatus;
114
- /**
115
- * Subnet of the VPC.
116
- */
117
- subnet: Subnet;
118
- /**
119
- * When the VPC was updated.
120
- */
121
- updated_at: string;
122
- }
123
- export interface VPCList {
124
- items: Array<VPC>;
125
- }
126
- export interface VPCCreateParams {
127
- /**
128
- * Name of the VPC.
129
- */
130
- name: string;
131
- /**
132
- * Region the resource is in.
133
- */
134
- region: Shared.RegionName;
135
- /**
136
- * Name of the subnet to create.
137
- */
138
- subnet_name: string;
139
- }
140
- export interface VPCUpdateParams {
141
- /**
142
- * Name of the VPC.
143
- */
144
- name?: string;
145
- /**
146
- * Name of the subnet to create.
147
- */
148
- subnet_name?: string;
149
- }
150
- export declare namespace VPCs {
151
- export { type Subnet as Subnet, type VPC as VPC, type VPCList as VPCList, type VPCCreateParams as VPCCreateParams, type VPCUpdateParams as VPCUpdateParams, };
152
- }
1
+ export * from "./vpcs/index.js";
153
2
  //# sourceMappingURL=vpcs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vpcs.d.ts","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;IAI5F;;;;;;;;;OASG;IACH,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;IAItC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAInD;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;IAIpF;;;;;;;OAOG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG9D;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;IAE9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IAE1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
1
+ {"version":3,"file":"vpcs.d.ts","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":""}
@@ -1,73 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.VPCs = void 0;
5
- const resource_1 = require("../../core/resource.js");
6
- const path_1 = require("../../internal/utils/path.js");
7
- class VPCs extends resource_1.APIResource {
8
- /**
9
- * Create a VPC
10
- *
11
- * @example
12
- * ```ts
13
- * const operation = await client.networking.vpcs.create({
14
- * name: 'my-vpc',
15
- * region: 'us-wdc-1',
16
- * subnet_name: 'my-subnet',
17
- * });
18
- * ```
19
- */
20
- create(body, options) {
21
- return this._client.post('/v1/networking/vpcs', { body, ...options });
22
- }
23
- /**
24
- * Update a VPC
25
- *
26
- * @example
27
- * ```ts
28
- * const operation = await client.networking.vpcs.update(
29
- * 'vpc_id',
30
- * );
31
- * ```
32
- */
33
- update(vpcID, body, options) {
34
- return this._client.patch((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, { body, ...options });
35
- }
36
- /**
37
- * List all VPCs
38
- *
39
- * @example
40
- * ```ts
41
- * const vpcList = await client.networking.vpcs.list();
42
- * ```
43
- */
44
- list(options) {
45
- return this._client.get('/v1/networking/vpcs', options);
46
- }
47
- /**
48
- * Delete a VPC
49
- *
50
- * @example
51
- * ```ts
52
- * const operation = await client.networking.vpcs.delete(
53
- * 'vpc_id',
54
- * );
55
- * ```
56
- */
57
- delete(vpcID, options) {
58
- return this._client.delete((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, options);
59
- }
60
- /**
61
- * Get details about a VPC
62
- *
63
- * @example
64
- * ```ts
65
- * const vpc = await client.networking.vpcs.get('vpc_id');
66
- * ```
67
- */
68
- get(vpcID, options) {
69
- return this._client.get((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, options);
70
- }
71
- }
72
- exports.VPCs = VPCs;
4
+ const tslib_1 = require("../../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./vpcs/index.js"), exports);
73
6
  //# sourceMappingURL=vpcs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vpcs.js","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAiD;AAEjD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,KAAa,EACb,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,uBAAuB,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAxED,oBAwEC"}
1
+ {"version":3,"file":"vpcs.js","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
@@ -1,69 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import { path } from "../../internal/utils/path.mjs";
4
- export class VPCs extends APIResource {
5
- /**
6
- * Create a VPC
7
- *
8
- * @example
9
- * ```ts
10
- * const operation = await client.networking.vpcs.create({
11
- * name: 'my-vpc',
12
- * region: 'us-wdc-1',
13
- * subnet_name: 'my-subnet',
14
- * });
15
- * ```
16
- */
17
- create(body, options) {
18
- return this._client.post('/v1/networking/vpcs', { body, ...options });
19
- }
20
- /**
21
- * Update a VPC
22
- *
23
- * @example
24
- * ```ts
25
- * const operation = await client.networking.vpcs.update(
26
- * 'vpc_id',
27
- * );
28
- * ```
29
- */
30
- update(vpcID, body, options) {
31
- return this._client.patch(path `/v1/networking/vpcs/${vpcID}`, { body, ...options });
32
- }
33
- /**
34
- * List all VPCs
35
- *
36
- * @example
37
- * ```ts
38
- * const vpcList = await client.networking.vpcs.list();
39
- * ```
40
- */
41
- list(options) {
42
- return this._client.get('/v1/networking/vpcs', options);
43
- }
44
- /**
45
- * Delete a VPC
46
- *
47
- * @example
48
- * ```ts
49
- * const operation = await client.networking.vpcs.delete(
50
- * 'vpc_id',
51
- * );
52
- * ```
53
- */
54
- delete(vpcID, options) {
55
- return this._client.delete(path `/v1/networking/vpcs/${vpcID}`, options);
56
- }
57
- /**
58
- * Get details about a VPC
59
- *
60
- * @example
61
- * ```ts
62
- * const vpc = await client.networking.vpcs.get('vpc_id');
63
- * ```
64
- */
65
- get(vpcID, options) {
66
- return this._client.get(path `/v1/networking/vpcs/${vpcID}`, options);
67
- }
68
- }
2
+ export * from "./vpcs/index.mjs";
69
3
  //# sourceMappingURL=vpcs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vpcs.mjs","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,KAAa,EACb,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,uBAAuB,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"vpcs.mjs","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,16 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as VolumesAPI from './volumes';
5
- import {
6
- StorageType,
7
- Volume,
8
- VolumeCreateParams,
9
- VolumeKind,
10
- VolumeList,
11
- VolumeUpdateParams,
12
- Volumes,
13
- } from './volumes';
14
4
  import * as VMsAPI from './vms/vms';
15
5
  import {
16
6
  CPUConfig,
@@ -23,6 +13,16 @@ import {
23
13
  VMUpdateParams,
24
14
  VMs,
25
15
  } from './vms/vms';
16
+ import * as VolumesAPI from './volumes/volumes';
17
+ import {
18
+ StorageType,
19
+ Volume,
20
+ VolumeCreateParams,
21
+ VolumeKind,
22
+ VolumeList,
23
+ VolumeUpdateParams,
24
+ Volumes,
25
+ } from './volumes/volumes';
26
26
 
27
27
  export class Compute extends APIResource {
28
28
  vms: VMsAPI.VMs = new VMsAPI.VMs(this._client);
@@ -20,4 +20,4 @@ export {
20
20
  type VolumeList,
21
21
  type VolumeCreateParams,
22
22
  type VolumeUpdateParams,
23
- } from './volumes';
23
+ } from './volumes/index';
@@ -0,0 +1,172 @@
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 VMsAPI from './vms';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { buildHeaders } from '../../../internal/headers';
8
+ import { RequestOptions } from '../../../internal/request-options';
9
+ import { path } from '../../../internal/utils/path';
10
+
11
+ export class Availability extends APIResource {
12
+ /**
13
+ * Check VM Create Availability
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const availability =
18
+ * await client.compute.vms.availability.create({
19
+ * boot_volume: { size: 100 },
20
+ * cpu_config: { vcpu: 2 },
21
+ * memory_config: { size: 2 },
22
+ * name: 'my-vm',
23
+ * os_image_name: 'ubuntu-noble-2025-04-03',
24
+ * public_ip_enabled: true,
25
+ * region: 'us-wdc-1',
26
+ * ssh_key: {
27
+ * public_key:
28
+ * 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
29
+ * },
30
+ * subnet_id: '123e4567-e89b-12d3-a456-426614174000',
31
+ * });
32
+ * ```
33
+ */
34
+ create(body: AvailabilityCreateParams, options?: RequestOptions): APIPromise<string> {
35
+ return this._client.post('/v1/compute/vms/availability', {
36
+ body,
37
+ ...options,
38
+ headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
39
+ });
40
+ }
41
+
42
+ /**
43
+ * Check VM Update Availability
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const availability =
48
+ * await client.compute.vms.availability.update('vm_id');
49
+ * ```
50
+ */
51
+ update(vmID: string, body: AvailabilityUpdateParams, options?: RequestOptions): APIPromise<string> {
52
+ return this._client.patch(path`/v1/compute/vms/${vmID}/availability`, {
53
+ body,
54
+ ...options,
55
+ headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
56
+ });
57
+ }
58
+ }
59
+
60
+ export type AvailabilityCreateResponse = string;
61
+
62
+ export type AvailabilityUpdateResponse = string;
63
+
64
+ export interface AvailabilityCreateParams {
65
+ /**
66
+ * Boot volume for the VM.
67
+ */
68
+ boot_volume: AvailabilityCreateParams.BootVolume;
69
+
70
+ /**
71
+ * CPU configuration for the VM.
72
+ */
73
+ cpu_config: VMsAPI.CPUConfig;
74
+
75
+ /**
76
+ * Memory configuration for the VM.
77
+ */
78
+ memory_config: VMsAPI.MemoryConfig;
79
+
80
+ /**
81
+ * Name of the VM.
82
+ */
83
+ name: string;
84
+
85
+ /**
86
+ * Name of the OS Image to use for the VM.
87
+ */
88
+ os_image_name: string;
89
+
90
+ /**
91
+ * Whether to enable public IP for the VM.
92
+ */
93
+ public_ip_enabled: boolean;
94
+
95
+ /**
96
+ * Region the resource is in.
97
+ */
98
+ region: Shared.RegionName;
99
+
100
+ /**
101
+ * Public SSH key configuration for the VM.
102
+ */
103
+ ssh_key: VMsAPI.SSHKey;
104
+
105
+ /**
106
+ * ID of the subnet to use for the VM.
107
+ */
108
+ subnet_id: string;
109
+
110
+ /**
111
+ * Data volumes for the VM.
112
+ */
113
+ data_volumes?: Array<AvailabilityCreateParams.DataVolume>;
114
+ }
115
+
116
+ export namespace AvailabilityCreateParams {
117
+ /**
118
+ * Boot volume for the VM.
119
+ */
120
+ export interface BootVolume {
121
+ /**
122
+ * Size of the volume in GB.
123
+ */
124
+ size: number;
125
+ }
126
+
127
+ /**
128
+ * VM data volume create request.
129
+ */
130
+ export interface DataVolume {
131
+ /**
132
+ * Name of the volume.
133
+ */
134
+ name: string;
135
+
136
+ /**
137
+ * Size of the volume in GB.
138
+ */
139
+ size: number;
140
+ }
141
+ }
142
+
143
+ export interface AvailabilityUpdateParams {
144
+ /**
145
+ * CPU configuration for the VM.
146
+ */
147
+ cpu_config?: VMsAPI.CPUConfig;
148
+
149
+ /**
150
+ * Memory configuration for the VM.
151
+ */
152
+ memory_config?: VMsAPI.MemoryConfig;
153
+
154
+ /**
155
+ * Name of the VM.
156
+ */
157
+ name?: string;
158
+
159
+ /**
160
+ * Whether to enable public IP for the VM.
161
+ */
162
+ public_ip_enabled?: boolean;
163
+ }
164
+
165
+ export declare namespace Availability {
166
+ export {
167
+ type AvailabilityCreateResponse as AvailabilityCreateResponse,
168
+ type AvailabilityUpdateResponse as AvailabilityUpdateResponse,
169
+ type AvailabilityCreateParams as AvailabilityCreateParams,
170
+ type AvailabilityUpdateParams as AvailabilityUpdateParams,
171
+ };
172
+ }
@@ -1,5 +1,12 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export {
4
+ Availability,
5
+ type AvailabilityCreateResponse,
6
+ type AvailabilityUpdateResponse,
7
+ type AvailabilityCreateParams,
8
+ type AvailabilityUpdateParams,
9
+ } from './availability';
3
10
  export { OSImages, type OSImageListResponse } from './os-images';
4
11
  export {
5
12
  VMs,
@@ -3,6 +3,14 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as OperationsAPI from '../../operations';
5
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';
6
14
  import * as OSImagesAPI from './os-images';
7
15
  import { OSImageListResponse, OSImages } from './os-images';
8
16
  import * as VolumesAPI from './volumes';
@@ -12,6 +20,7 @@ import { RequestOptions } from '../../../internal/request-options';
12
20
  import { path } from '../../../internal/utils/path';
13
21
 
14
22
  export class VMs extends APIResource {
23
+ availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
15
24
  volumes: VolumesAPI.Volumes = new VolumesAPI.Volumes(this._client);
16
25
  osImages: OSImagesAPI.OSImages = new OSImagesAPI.OSImages(this._client);
17
26
 
@@ -30,7 +39,7 @@ export class VMs extends APIResource {
30
39
  * region: 'us-wdc-1',
31
40
  * ssh_key: {
32
41
  * public_key:
33
- * 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJiJabIUkXw7VrQG+yBohvhEsyoKEYvejZc4RFzV5maybqQei1punVsoe4r6gJttMM1Gr3cNr3OfepikCQAhAchw5ww94ZWqDsDYIqMrlDFbqhGTXDNzFAjeVIKptCOlz9k+7aM69YtLXJ6gFUCq1fbK9PjY+AK28UpMfKYUcyHQ== noname',
42
+ * 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
34
43
  * },
35
44
  * subnet_id: '123e4567-e89b-12d3-a456-426614174000',
36
45
  * });
@@ -324,6 +333,7 @@ export interface VMUpdateParams {
324
333
  public_ip_enabled?: boolean;
325
334
  }
326
335
 
336
+ VMs.Availability = Availability;
327
337
  VMs.Volumes = Volumes;
328
338
  VMs.OSImages = OSImages;
329
339
 
@@ -339,6 +349,14 @@ export declare namespace VMs {
339
349
  type VMUpdateParams as VMUpdateParams,
340
350
  };
341
351
 
352
+ export {
353
+ Availability as Availability,
354
+ type AvailabilityCreateResponse as AvailabilityCreateResponse,
355
+ type AvailabilityUpdateResponse as AvailabilityUpdateResponse,
356
+ type AvailabilityCreateParams as AvailabilityCreateParams,
357
+ type AvailabilityUpdateParams as AvailabilityUpdateParams,
358
+ };
359
+
342
360
  export { Volumes as Volumes };
343
361
 
344
362
  export { OSImages as OSImages, type OSImageListResponse as OSImageListResponse };
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as VolumesAPI from '../volumes';
4
+ import * as VolumesAPI from '../volumes/volumes';
5
5
  import { APIPromise } from '../../../core/api-promise';
6
6
  import { RequestOptions } from '../../../internal/request-options';
7
7
  import { path } from '../../../internal/utils/path';