@nirvana-labs/nirvana 1.91.4 → 1.91.5

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 (210) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bin/migration-config.json +37 -0
  3. package/client.d.mts +2 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -0
  6. package/client.d.ts.map +1 -1
  7. package/package.json +1 -1
  8. package/resources/compute/vms/cost.d.mts +149 -0
  9. package/resources/compute/vms/cost.d.mts.map +1 -0
  10. package/resources/compute/vms/cost.d.ts +149 -0
  11. package/resources/compute/vms/cost.d.ts.map +1 -0
  12. package/resources/compute/vms/cost.js +47 -0
  13. package/resources/compute/vms/cost.js.map +1 -0
  14. package/resources/compute/vms/cost.mjs +43 -0
  15. package/resources/compute/vms/cost.mjs.map +1 -0
  16. package/resources/compute/vms/index.d.mts +1 -0
  17. package/resources/compute/vms/index.d.mts.map +1 -1
  18. package/resources/compute/vms/index.d.ts +1 -0
  19. package/resources/compute/vms/index.d.ts.map +1 -1
  20. package/resources/compute/vms/index.js +3 -1
  21. package/resources/compute/vms/index.js.map +1 -1
  22. package/resources/compute/vms/index.mjs +1 -0
  23. package/resources/compute/vms/index.mjs.map +1 -1
  24. package/resources/compute/vms/vms.d.mts +4 -0
  25. package/resources/compute/vms/vms.d.mts.map +1 -1
  26. package/resources/compute/vms/vms.d.ts +4 -0
  27. package/resources/compute/vms/vms.d.ts.map +1 -1
  28. package/resources/compute/vms/vms.js +4 -0
  29. package/resources/compute/vms/vms.js.map +1 -1
  30. package/resources/compute/vms/vms.mjs +4 -0
  31. package/resources/compute/vms/vms.mjs.map +1 -1
  32. package/resources/compute/volumes/cost.d.mts +81 -0
  33. package/resources/compute/volumes/cost.d.mts.map +1 -0
  34. package/resources/compute/volumes/cost.d.ts +81 -0
  35. package/resources/compute/volumes/cost.d.ts.map +1 -0
  36. package/resources/compute/volumes/cost.js +40 -0
  37. package/resources/compute/volumes/cost.js.map +1 -0
  38. package/resources/compute/volumes/cost.mjs +36 -0
  39. package/resources/compute/volumes/cost.mjs.map +1 -0
  40. package/resources/compute/volumes/index.d.mts +1 -0
  41. package/resources/compute/volumes/index.d.mts.map +1 -1
  42. package/resources/compute/volumes/index.d.ts +1 -0
  43. package/resources/compute/volumes/index.d.ts.map +1 -1
  44. package/resources/compute/volumes/index.js +3 -1
  45. package/resources/compute/volumes/index.js.map +1 -1
  46. package/resources/compute/volumes/index.mjs +1 -0
  47. package/resources/compute/volumes/index.mjs.map +1 -1
  48. package/resources/compute/volumes/volumes.d.mts +4 -0
  49. package/resources/compute/volumes/volumes.d.mts.map +1 -1
  50. package/resources/compute/volumes/volumes.d.ts +4 -0
  51. package/resources/compute/volumes/volumes.d.ts.map +1 -1
  52. package/resources/compute/volumes/volumes.js +4 -0
  53. package/resources/compute/volumes/volumes.js.map +1 -1
  54. package/resources/compute/volumes/volumes.mjs +4 -0
  55. package/resources/compute/volumes/volumes.mjs.map +1 -1
  56. package/resources/networking/connect/connect.d.mts +2 -2
  57. package/resources/networking/connect/connect.d.mts.map +1 -1
  58. package/resources/networking/connect/connect.d.ts +2 -2
  59. package/resources/networking/connect/connect.d.ts.map +1 -1
  60. package/resources/networking/connect/connect.js +2 -2
  61. package/resources/networking/connect/connect.js.map +1 -1
  62. package/resources/networking/connect/connect.mjs +2 -2
  63. package/resources/networking/connect/connect.mjs.map +1 -1
  64. package/resources/networking/connect/connections/connections.d.mts +136 -0
  65. package/resources/networking/connect/connections/connections.d.mts.map +1 -0
  66. package/resources/networking/connect/connections/connections.d.ts +136 -0
  67. package/resources/networking/connect/connections/connections.d.ts.map +1 -0
  68. package/resources/networking/connect/connections/connections.js +96 -0
  69. package/resources/networking/connect/connections/connections.js.map +1 -0
  70. package/resources/networking/connect/connections/connections.mjs +91 -0
  71. package/resources/networking/connect/connections/connections.mjs.map +1 -0
  72. package/resources/networking/connect/connections/cost.d.mts +85 -0
  73. package/resources/networking/connect/connections/cost.d.mts.map +1 -0
  74. package/resources/networking/connect/connections/cost.d.ts +85 -0
  75. package/resources/networking/connect/connections/cost.d.ts.map +1 -0
  76. package/resources/networking/connect/connections/cost.js +47 -0
  77. package/resources/networking/connect/connections/cost.js.map +1 -0
  78. package/resources/networking/connect/connections/cost.mjs +43 -0
  79. package/resources/networking/connect/connections/cost.mjs.map +1 -0
  80. package/resources/networking/connect/connections/index.d.mts +3 -0
  81. package/resources/networking/connect/connections/index.d.mts.map +1 -0
  82. package/resources/networking/connect/connections/index.d.ts +3 -0
  83. package/resources/networking/connect/connections/index.d.ts.map +1 -0
  84. package/resources/networking/connect/connections/index.js +9 -0
  85. package/resources/networking/connect/connections/index.js.map +1 -0
  86. package/resources/networking/connect/connections/index.mjs +4 -0
  87. package/resources/networking/connect/connections/index.mjs.map +1 -0
  88. package/resources/networking/connect/connections.d.mts +1 -131
  89. package/resources/networking/connect/connections.d.mts.map +1 -1
  90. package/resources/networking/connect/connections.d.ts +1 -131
  91. package/resources/networking/connect/connections.d.ts.map +1 -1
  92. package/resources/networking/connect/connections.js +2 -84
  93. package/resources/networking/connect/connections.js.map +1 -1
  94. package/resources/networking/connect/connections.mjs +1 -82
  95. package/resources/networking/connect/connections.mjs.map +1 -1
  96. package/resources/networking/connect/index.d.mts +1 -1
  97. package/resources/networking/connect/index.d.mts.map +1 -1
  98. package/resources/networking/connect/index.d.ts +1 -1
  99. package/resources/networking/connect/index.d.ts.map +1 -1
  100. package/resources/networking/connect/index.js +2 -2
  101. package/resources/networking/connect/index.js.map +1 -1
  102. package/resources/networking/connect/index.mjs +1 -1
  103. package/resources/networking/connect/index.mjs.map +1 -1
  104. package/resources/networking/vpcs/cost.d.mts +71 -0
  105. package/resources/networking/vpcs/cost.d.mts.map +1 -0
  106. package/resources/networking/vpcs/cost.d.ts +71 -0
  107. package/resources/networking/vpcs/cost.d.ts.map +1 -0
  108. package/resources/networking/vpcs/cost.js +39 -0
  109. package/resources/networking/vpcs/cost.js.map +1 -0
  110. package/resources/networking/vpcs/cost.mjs +35 -0
  111. package/resources/networking/vpcs/cost.mjs.map +1 -0
  112. package/resources/networking/vpcs/index.d.mts +1 -0
  113. package/resources/networking/vpcs/index.d.mts.map +1 -1
  114. package/resources/networking/vpcs/index.d.ts +1 -0
  115. package/resources/networking/vpcs/index.d.ts.map +1 -1
  116. package/resources/networking/vpcs/index.js +3 -1
  117. package/resources/networking/vpcs/index.js.map +1 -1
  118. package/resources/networking/vpcs/index.mjs +1 -0
  119. package/resources/networking/vpcs/index.mjs.map +1 -1
  120. package/resources/networking/vpcs/vpcs.d.mts +4 -0
  121. package/resources/networking/vpcs/vpcs.d.mts.map +1 -1
  122. package/resources/networking/vpcs/vpcs.d.ts +4 -0
  123. package/resources/networking/vpcs/vpcs.d.ts.map +1 -1
  124. package/resources/networking/vpcs/vpcs.js +4 -0
  125. package/resources/networking/vpcs/vpcs.js.map +1 -1
  126. package/resources/networking/vpcs/vpcs.mjs +4 -0
  127. package/resources/networking/vpcs/vpcs.mjs.map +1 -1
  128. package/resources/nks/clusters/clusters.d.mts +4 -0
  129. package/resources/nks/clusters/clusters.d.mts.map +1 -1
  130. package/resources/nks/clusters/clusters.d.ts +4 -0
  131. package/resources/nks/clusters/clusters.d.ts.map +1 -1
  132. package/resources/nks/clusters/clusters.js +4 -0
  133. package/resources/nks/clusters/clusters.js.map +1 -1
  134. package/resources/nks/clusters/clusters.mjs +4 -0
  135. package/resources/nks/clusters/clusters.mjs.map +1 -1
  136. package/resources/nks/clusters/cost.d.mts +81 -0
  137. package/resources/nks/clusters/cost.d.mts.map +1 -0
  138. package/resources/nks/clusters/cost.d.ts +81 -0
  139. package/resources/nks/clusters/cost.d.ts.map +1 -0
  140. package/resources/nks/clusters/cost.js +41 -0
  141. package/resources/nks/clusters/cost.js.map +1 -0
  142. package/resources/nks/clusters/cost.mjs +37 -0
  143. package/resources/nks/clusters/cost.mjs.map +1 -0
  144. package/resources/nks/clusters/index.d.mts +1 -0
  145. package/resources/nks/clusters/index.d.mts.map +1 -1
  146. package/resources/nks/clusters/index.d.ts +1 -0
  147. package/resources/nks/clusters/index.d.ts.map +1 -1
  148. package/resources/nks/clusters/index.js +3 -1
  149. package/resources/nks/clusters/index.js.map +1 -1
  150. package/resources/nks/clusters/index.mjs +1 -0
  151. package/resources/nks/clusters/index.mjs.map +1 -1
  152. package/resources/nks/clusters/pools/cost.d.mts +97 -0
  153. package/resources/nks/clusters/pools/cost.d.mts.map +1 -0
  154. package/resources/nks/clusters/pools/cost.d.ts +97 -0
  155. package/resources/nks/clusters/pools/cost.d.ts.map +1 -0
  156. package/resources/nks/clusters/pools/cost.js +51 -0
  157. package/resources/nks/clusters/pools/cost.js.map +1 -0
  158. package/resources/nks/clusters/pools/cost.mjs +47 -0
  159. package/resources/nks/clusters/pools/cost.mjs.map +1 -0
  160. package/resources/nks/clusters/pools/index.d.mts +1 -0
  161. package/resources/nks/clusters/pools/index.d.mts.map +1 -1
  162. package/resources/nks/clusters/pools/index.d.ts +1 -0
  163. package/resources/nks/clusters/pools/index.d.ts.map +1 -1
  164. package/resources/nks/clusters/pools/index.js +3 -1
  165. package/resources/nks/clusters/pools/index.js.map +1 -1
  166. package/resources/nks/clusters/pools/index.mjs +1 -0
  167. package/resources/nks/clusters/pools/index.mjs.map +1 -1
  168. package/resources/nks/clusters/pools/pools.d.mts +4 -0
  169. package/resources/nks/clusters/pools/pools.d.mts.map +1 -1
  170. package/resources/nks/clusters/pools/pools.d.ts +4 -0
  171. package/resources/nks/clusters/pools/pools.d.ts.map +1 -1
  172. package/resources/nks/clusters/pools/pools.js +4 -0
  173. package/resources/nks/clusters/pools/pools.js.map +1 -1
  174. package/resources/nks/clusters/pools/pools.mjs +4 -0
  175. package/resources/nks/clusters/pools/pools.mjs.map +1 -1
  176. package/resources/shared.d.mts +226 -0
  177. package/resources/shared.d.mts.map +1 -1
  178. package/resources/shared.d.ts +226 -0
  179. package/resources/shared.d.ts.map +1 -1
  180. package/src/client.ts +2 -0
  181. package/src/resources/compute/api.md +14 -0
  182. package/src/resources/compute/vms/cost.ts +180 -0
  183. package/src/resources/compute/vms/index.ts +1 -0
  184. package/src/resources/compute/vms/vms.ts +10 -0
  185. package/src/resources/compute/volumes/cost.ts +104 -0
  186. package/src/resources/compute/volumes/index.ts +1 -0
  187. package/src/resources/compute/volumes/volumes.ts +10 -0
  188. package/src/resources/networking/api.md +19 -5
  189. package/src/resources/networking/connect/connect.ts +4 -4
  190. package/src/resources/networking/connect/connections/connections.ts +189 -0
  191. package/src/resources/networking/connect/connections/cost.ts +111 -0
  192. package/src/resources/networking/connect/connections/index.ts +9 -0
  193. package/src/resources/networking/connect/connections.ts +1 -175
  194. package/src/resources/networking/connect/index.ts +1 -1
  195. package/src/resources/networking/vpcs/cost.ts +92 -0
  196. package/src/resources/networking/vpcs/index.ts +1 -0
  197. package/src/resources/networking/vpcs/vpcs.ts +10 -0
  198. package/src/resources/nks/api.md +14 -0
  199. package/src/resources/nks/clusters/clusters.ts +10 -0
  200. package/src/resources/nks/clusters/cost.ts +104 -0
  201. package/src/resources/nks/clusters/index.ts +1 -0
  202. package/src/resources/nks/clusters/pools/cost.ts +124 -0
  203. package/src/resources/nks/clusters/pools/index.ts +1 -0
  204. package/src/resources/nks/clusters/pools/pools.ts +10 -0
  205. package/src/resources/shared.ts +267 -0
  206. package/src/version.ts +1 -1
  207. package/version.d.mts +1 -1
  208. package/version.d.ts +1 -1
  209. package/version.js +1 -1
  210. package/version.mjs +1 -1
@@ -1,3 +1,229 @@
1
+ /**
2
+ * Cost quote returned by POST /cost.
3
+ */
4
+ export interface CostQuote {
5
+ /**
6
+ * Currency the quote is denominated in. Always "USD" in v1.
7
+ */
8
+ currency: string;
9
+ /**
10
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
11
+ */
12
+ monthly_total: string;
13
+ /**
14
+ * Timestamp the quote was priced at.
15
+ */
16
+ priced_at: string;
17
+ /**
18
+ * Priced rows, one per usage dimension emitted by the resource.
19
+ */
20
+ usage_dimensions: Array<CostQuote.UsageDimension>;
21
+ }
22
+ export declare namespace CostQuote {
23
+ /**
24
+ * Priced row for a single usage dimension emitted by a resource.
25
+ */
26
+ interface UsageDimension {
27
+ /**
28
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
29
+ */
30
+ dimension: string;
31
+ /**
32
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
33
+ */
34
+ dimension_display_name: string;
35
+ /**
36
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
37
+ */
38
+ monthly_amount: string;
39
+ /**
40
+ * Quantity of the dimension being priced.
41
+ */
42
+ quantity: number;
43
+ /**
44
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
45
+ */
46
+ unit_price: string;
47
+ }
48
+ }
49
+ /**
50
+ * Cost quote returned by PATCH /:id/cost: the current-state quote, the post-update
51
+ * quote, and the signed diff.
52
+ */
53
+ export interface CostQuoteUpdate {
54
+ /**
55
+ * Quote for the proposed (post-update) resource state.
56
+ */
57
+ after: CostQuoteUpdate.After;
58
+ /**
59
+ * Quote for the proposed (post-update) resource state.
60
+ */
61
+ before: CostQuoteUpdate.Before;
62
+ /**
63
+ * Currency the quote is denominated in. Always "USD" in v1.
64
+ */
65
+ currency: string;
66
+ /**
67
+ * Per-dimension and total deltas: after minus before.
68
+ */
69
+ diff: CostQuoteUpdate.Diff;
70
+ /**
71
+ * Timestamp the quote was priced at.
72
+ */
73
+ priced_at: string;
74
+ }
75
+ export declare namespace CostQuoteUpdate {
76
+ /**
77
+ * Quote for the proposed (post-update) resource state.
78
+ */
79
+ interface After {
80
+ /**
81
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
82
+ */
83
+ monthly_total: string;
84
+ /**
85
+ * Priced rows, one per usage dimension emitted by the resource.
86
+ */
87
+ usage_dimensions: Array<After.UsageDimension>;
88
+ }
89
+ namespace After {
90
+ /**
91
+ * Priced row for a single usage dimension emitted by a resource.
92
+ */
93
+ interface UsageDimension {
94
+ /**
95
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
96
+ */
97
+ dimension: string;
98
+ /**
99
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
100
+ */
101
+ dimension_display_name: string;
102
+ /**
103
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
104
+ */
105
+ monthly_amount: string;
106
+ /**
107
+ * Quantity of the dimension being priced.
108
+ */
109
+ quantity: number;
110
+ /**
111
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
112
+ */
113
+ unit_price: string;
114
+ }
115
+ }
116
+ /**
117
+ * Quote for the proposed (post-update) resource state.
118
+ */
119
+ interface Before {
120
+ /**
121
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
122
+ */
123
+ monthly_total: string;
124
+ /**
125
+ * Priced rows, one per usage dimension emitted by the resource.
126
+ */
127
+ usage_dimensions: Array<Before.UsageDimension>;
128
+ }
129
+ namespace Before {
130
+ /**
131
+ * Priced row for a single usage dimension emitted by a resource.
132
+ */
133
+ interface UsageDimension {
134
+ /**
135
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
136
+ */
137
+ dimension: string;
138
+ /**
139
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
140
+ */
141
+ dimension_display_name: string;
142
+ /**
143
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
144
+ */
145
+ monthly_amount: string;
146
+ /**
147
+ * Quantity of the dimension being priced.
148
+ */
149
+ quantity: number;
150
+ /**
151
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
152
+ */
153
+ unit_price: string;
154
+ }
155
+ }
156
+ /**
157
+ * Per-dimension and total deltas: after minus before.
158
+ */
159
+ interface Diff {
160
+ /**
161
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
162
+ */
163
+ monthly_total_delta: string;
164
+ /**
165
+ * Per-dimension diff entries. Includes every dimension touched by the update.
166
+ */
167
+ usage_dimensions: Array<Diff.UsageDimension>;
168
+ }
169
+ namespace Diff {
170
+ /**
171
+ * Per-dimension diff entry. Both before and after are always present.
172
+ */
173
+ interface UsageDimension {
174
+ /**
175
+ * Priced row after the update. Always present.
176
+ */
177
+ after: UsageDimension.After;
178
+ /**
179
+ * Priced row after the update. Always present.
180
+ */
181
+ before: UsageDimension.Before;
182
+ /**
183
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
184
+ */
185
+ dimension: string;
186
+ /**
187
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
188
+ */
189
+ dimension_display_name: string;
190
+ /**
191
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
192
+ */
193
+ monthly_amount_delta: string;
194
+ }
195
+ namespace UsageDimension {
196
+ /**
197
+ * Priced row after the update. Always present.
198
+ */
199
+ interface After {
200
+ /**
201
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
202
+ */
203
+ monthly_amount: string;
204
+ quantity: number;
205
+ /**
206
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
207
+ */
208
+ unit_price: string;
209
+ }
210
+ /**
211
+ * Priced row after the update. Always present.
212
+ */
213
+ interface Before {
214
+ /**
215
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
216
+ */
217
+ monthly_amount: string;
218
+ quantity: number;
219
+ /**
220
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
221
+ */
222
+ unit_price: string;
223
+ }
224
+ }
225
+ }
226
+ }
1
227
  /**
2
228
  * Pagination response details.
3
229
  */
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM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B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB"}
@@ -1,3 +1,229 @@
1
+ /**
2
+ * Cost quote returned by POST /cost.
3
+ */
4
+ export interface CostQuote {
5
+ /**
6
+ * Currency the quote is denominated in. Always "USD" in v1.
7
+ */
8
+ currency: string;
9
+ /**
10
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
11
+ */
12
+ monthly_total: string;
13
+ /**
14
+ * Timestamp the quote was priced at.
15
+ */
16
+ priced_at: string;
17
+ /**
18
+ * Priced rows, one per usage dimension emitted by the resource.
19
+ */
20
+ usage_dimensions: Array<CostQuote.UsageDimension>;
21
+ }
22
+ export declare namespace CostQuote {
23
+ /**
24
+ * Priced row for a single usage dimension emitted by a resource.
25
+ */
26
+ interface UsageDimension {
27
+ /**
28
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
29
+ */
30
+ dimension: string;
31
+ /**
32
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
33
+ */
34
+ dimension_display_name: string;
35
+ /**
36
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
37
+ */
38
+ monthly_amount: string;
39
+ /**
40
+ * Quantity of the dimension being priced.
41
+ */
42
+ quantity: number;
43
+ /**
44
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
45
+ */
46
+ unit_price: string;
47
+ }
48
+ }
49
+ /**
50
+ * Cost quote returned by PATCH /:id/cost: the current-state quote, the post-update
51
+ * quote, and the signed diff.
52
+ */
53
+ export interface CostQuoteUpdate {
54
+ /**
55
+ * Quote for the proposed (post-update) resource state.
56
+ */
57
+ after: CostQuoteUpdate.After;
58
+ /**
59
+ * Quote for the proposed (post-update) resource state.
60
+ */
61
+ before: CostQuoteUpdate.Before;
62
+ /**
63
+ * Currency the quote is denominated in. Always "USD" in v1.
64
+ */
65
+ currency: string;
66
+ /**
67
+ * Per-dimension and total deltas: after minus before.
68
+ */
69
+ diff: CostQuoteUpdate.Diff;
70
+ /**
71
+ * Timestamp the quote was priced at.
72
+ */
73
+ priced_at: string;
74
+ }
75
+ export declare namespace CostQuoteUpdate {
76
+ /**
77
+ * Quote for the proposed (post-update) resource state.
78
+ */
79
+ interface After {
80
+ /**
81
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
82
+ */
83
+ monthly_total: string;
84
+ /**
85
+ * Priced rows, one per usage dimension emitted by the resource.
86
+ */
87
+ usage_dimensions: Array<After.UsageDimension>;
88
+ }
89
+ namespace After {
90
+ /**
91
+ * Priced row for a single usage dimension emitted by a resource.
92
+ */
93
+ interface UsageDimension {
94
+ /**
95
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
96
+ */
97
+ dimension: string;
98
+ /**
99
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
100
+ */
101
+ dimension_display_name: string;
102
+ /**
103
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
104
+ */
105
+ monthly_amount: string;
106
+ /**
107
+ * Quantity of the dimension being priced.
108
+ */
109
+ quantity: number;
110
+ /**
111
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
112
+ */
113
+ unit_price: string;
114
+ }
115
+ }
116
+ /**
117
+ * Quote for the proposed (post-update) resource state.
118
+ */
119
+ interface Before {
120
+ /**
121
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
122
+ */
123
+ monthly_total: string;
124
+ /**
125
+ * Priced rows, one per usage dimension emitted by the resource.
126
+ */
127
+ usage_dimensions: Array<Before.UsageDimension>;
128
+ }
129
+ namespace Before {
130
+ /**
131
+ * Priced row for a single usage dimension emitted by a resource.
132
+ */
133
+ interface UsageDimension {
134
+ /**
135
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
136
+ */
137
+ dimension: string;
138
+ /**
139
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
140
+ */
141
+ dimension_display_name: string;
142
+ /**
143
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
144
+ */
145
+ monthly_amount: string;
146
+ /**
147
+ * Quantity of the dimension being priced.
148
+ */
149
+ quantity: number;
150
+ /**
151
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
152
+ */
153
+ unit_price: string;
154
+ }
155
+ }
156
+ /**
157
+ * Per-dimension and total deltas: after minus before.
158
+ */
159
+ interface Diff {
160
+ /**
161
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
162
+ */
163
+ monthly_total_delta: string;
164
+ /**
165
+ * Per-dimension diff entries. Includes every dimension touched by the update.
166
+ */
167
+ usage_dimensions: Array<Diff.UsageDimension>;
168
+ }
169
+ namespace Diff {
170
+ /**
171
+ * Per-dimension diff entry. Both before and after are always present.
172
+ */
173
+ interface UsageDimension {
174
+ /**
175
+ * Priced row after the update. Always present.
176
+ */
177
+ after: UsageDimension.After;
178
+ /**
179
+ * Priced row after the update. Always present.
180
+ */
181
+ before: UsageDimension.Before;
182
+ /**
183
+ * Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).
184
+ */
185
+ dimension: string;
186
+ /**
187
+ * User-facing label for the dimension (e.g. "vCPU (hours)").
188
+ */
189
+ dimension_display_name: string;
190
+ /**
191
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
192
+ */
193
+ monthly_amount_delta: string;
194
+ }
195
+ namespace UsageDimension {
196
+ /**
197
+ * Priced row after the update. Always present.
198
+ */
199
+ interface After {
200
+ /**
201
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
202
+ */
203
+ monthly_amount: string;
204
+ quantity: number;
205
+ /**
206
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
207
+ */
208
+ unit_price: string;
209
+ }
210
+ /**
211
+ * Priced row after the update. Always present.
212
+ */
213
+ interface Before {
214
+ /**
215
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
216
+ */
217
+ monthly_amount: string;
218
+ quantity: number;
219
+ /**
220
+ * Arbitrary-precision decimal serialized as a string (e.g. "58.40").
221
+ */
222
+ unit_price: string;
223
+ }
224
+ }
225
+ }
226
+ }
1
227
  /**
2
228
  * Pagination response details.
3
229
  */
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9G;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,yBAAiB,SAAS,CAAC;IACzB;;OAEG;IACH,UAAiB,cAAc;QAC7B;;WAEG;QACH,SAAS,EAAE,MA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,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9G;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB"}
package/src/client.ts CHANGED
@@ -834,6 +834,8 @@ export declare namespace NirvanaLabs {
834
834
 
835
835
  export { NKS as NKS };
836
836
 
837
+ export type CostQuote = API.CostQuote;
838
+ export type CostQuoteUpdate = API.CostQuoteUpdate;
837
839
  export type Pagination = API.Pagination;
838
840
  export type RegionName = API.RegionName;
839
841
  export type ResourceStatus = API.ResourceStatus;
@@ -27,6 +27,13 @@ Methods:
27
27
  - <code title="post /v1/compute/vms/availability">client.compute.vms.availability.<a href="./src/resources/compute/vms/availability.ts">create</a>({ ...params }) -> void</code>
28
28
  - <code title="patch /v1/compute/vms/{vm_id}/availability">client.compute.vms.availability.<a href="./src/resources/compute/vms/availability.ts">update</a>(vmID, { ...params }) -> void</code>
29
29
 
30
+ ### Cost
31
+
32
+ Methods:
33
+
34
+ - <code title="post /v1/compute/vms/cost">client.compute.vms.cost.<a href="./src/resources/compute/vms/cost.ts">create</a>({ ...params }) -> CostQuote</code>
35
+ - <code title="patch /v1/compute/vms/{vm_id}/cost">client.compute.vms.cost.<a href="./src/resources/compute/vms/cost.ts">update</a>(vmID, { ...params }) -> CostQuoteUpdate</code>
36
+
30
37
  ### Volumes
31
38
 
32
39
  Methods:
@@ -64,3 +71,10 @@ Methods:
64
71
 
65
72
  - <code title="post /v1/compute/volumes/availability">client.compute.volumes.availability.<a href="./src/resources/compute/volumes/availability.ts">create</a>({ ...params }) -> void</code>
66
73
  - <code title="patch /v1/compute/volumes/{volume_id}/availability">client.compute.volumes.availability.<a href="./src/resources/compute/volumes/availability.ts">update</a>(volumeID, { ...params }) -> void</code>
74
+
75
+ ### Cost
76
+
77
+ Methods:
78
+
79
+ - <code title="post /v1/compute/volumes/cost">client.compute.volumes.cost.<a href="./src/resources/compute/volumes/cost.ts">create</a>({ ...params }) -> CostQuote</code>
80
+ - <code title="patch /v1/compute/volumes/{volume_id}/cost">client.compute.volumes.cost.<a href="./src/resources/compute/volumes/cost.ts">update</a>(volumeID, { ...params }) -> CostQuoteUpdate</code>
@@ -0,0 +1,180 @@
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 * as VolumesAPI from '../volumes/volumes';
7
+ import { APIPromise } from '../../../core/api-promise';
8
+ import { RequestOptions } from '../../../internal/request-options';
9
+ import { path } from '../../../internal/utils/path';
10
+
11
+ export class Cost extends APIResource {
12
+ /**
13
+ * Return a priced cost quote for the proposed VM.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const costQuote = await client.compute.vms.cost.create({
18
+ * boot_volume: { size: 100, type: 'abs' },
19
+ * instance_type: 'n1-standard-8',
20
+ * name: 'my-vm',
21
+ * os_image_name: 'ubuntu-noble-2026-05-18',
22
+ * project_id: '123e4567-e89b-12d3-a456-426614174000',
23
+ * public_ip_enabled: true,
24
+ * region: 'us-sva-2',
25
+ * ssh_key: {
26
+ * public_key:
27
+ * 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
28
+ * },
29
+ * subnet_id: '123e4567-e89b-12d3-a456-426614174000',
30
+ * });
31
+ * ```
32
+ */
33
+ create(body: CostCreateParams, options?: RequestOptions): APIPromise<Shared.CostQuote> {
34
+ return this._client.post('/v1/compute/vms/cost', { body, ...options });
35
+ }
36
+
37
+ /**
38
+ * Return a priced cost quote for the proposed VM update plus a diff against the
39
+ * current state.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const costQuoteUpdate =
44
+ * await client.compute.vms.cost.update('vm_id');
45
+ * ```
46
+ */
47
+ update(vmID: string, body: CostUpdateParams, options?: RequestOptions): APIPromise<Shared.CostQuoteUpdate> {
48
+ return this._client.patch(path`/v1/compute/vms/${vmID}/cost`, { body, ...options });
49
+ }
50
+ }
51
+
52
+ export interface CostCreateParams {
53
+ /**
54
+ * Boot volume for the VM.
55
+ */
56
+ boot_volume: CostCreateParams.BootVolume;
57
+
58
+ /**
59
+ * Instance type name.
60
+ */
61
+ instance_type: string;
62
+
63
+ /**
64
+ * Name of the VM.
65
+ */
66
+ name: string;
67
+
68
+ /**
69
+ * Name of the OS Image to use for the VM.
70
+ */
71
+ os_image_name: string;
72
+
73
+ /**
74
+ * Project ID to create the VM in.
75
+ */
76
+ project_id: string;
77
+
78
+ /**
79
+ * Whether to enable public IP for the VM.
80
+ */
81
+ public_ip_enabled: boolean;
82
+
83
+ /**
84
+ * Region the resource is in.
85
+ */
86
+ region: Shared.RegionName;
87
+
88
+ /**
89
+ * Public SSH key configuration for the VM.
90
+ */
91
+ ssh_key: VMsAPI.SSHKeyRequest;
92
+
93
+ /**
94
+ * ID of the subnet to use for the VM.
95
+ */
96
+ subnet_id: string;
97
+
98
+ /**
99
+ * Data volumes for the VM.
100
+ */
101
+ data_volumes?: Array<CostCreateParams.DataVolume>;
102
+
103
+ /**
104
+ * Tags to attach to the VM.
105
+ */
106
+ tags?: Array<string>;
107
+ }
108
+
109
+ export namespace CostCreateParams {
110
+ /**
111
+ * Boot volume for the VM.
112
+ */
113
+ export interface BootVolume {
114
+ /**
115
+ * Size of the Volume in GB.
116
+ */
117
+ size: number;
118
+
119
+ /**
120
+ * Type of the Volume.
121
+ */
122
+ type: VolumesAPI.VolumeType;
123
+
124
+ /**
125
+ * Tags to attach to the Volume.
126
+ */
127
+ tags?: Array<string>;
128
+ }
129
+
130
+ /**
131
+ * VM data volume create request.
132
+ */
133
+ export interface DataVolume {
134
+ /**
135
+ * Name of the Volume.
136
+ */
137
+ name: string;
138
+
139
+ /**
140
+ * Size of the Volume in GB.
141
+ */
142
+ size: number;
143
+
144
+ /**
145
+ * Type of the Volume.
146
+ */
147
+ type: VolumesAPI.VolumeType;
148
+
149
+ /**
150
+ * Tags to attach to the Volume.
151
+ */
152
+ tags?: Array<string>;
153
+ }
154
+ }
155
+
156
+ export interface CostUpdateParams {
157
+ /**
158
+ * Instance type name.
159
+ */
160
+ instance_type?: string;
161
+
162
+ /**
163
+ * Name of the VM.
164
+ */
165
+ name?: string;
166
+
167
+ /**
168
+ * Whether to enable public IP for the VM.
169
+ */
170
+ public_ip_enabled?: boolean;
171
+
172
+ /**
173
+ * Tags to attach to the VM.
174
+ */
175
+ tags?: Array<string>;
176
+ }
177
+
178
+ export declare namespace Cost {
179
+ export { type CostCreateParams as CostCreateParams, type CostUpdateParams as CostUpdateParams };
180
+ }