@nirvana-labs/nirvana 1.98.1 → 1.98.2

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 (175) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +1 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -3
  9. package/client.mjs.map +1 -1
  10. package/internal/qs/formats.d.mts +7 -0
  11. package/internal/qs/formats.d.mts.map +1 -0
  12. package/internal/qs/formats.d.ts +7 -0
  13. package/internal/qs/formats.d.ts.map +1 -0
  14. package/internal/qs/formats.js +13 -0
  15. package/internal/qs/formats.js.map +1 -0
  16. package/internal/qs/formats.mjs +9 -0
  17. package/internal/qs/formats.mjs.map +1 -0
  18. package/internal/qs/index.d.mts +10 -0
  19. package/internal/qs/index.d.mts.map +1 -0
  20. package/internal/qs/index.d.ts +10 -0
  21. package/internal/qs/index.d.ts.map +1 -0
  22. package/internal/qs/index.js +14 -0
  23. package/internal/qs/index.js.map +1 -0
  24. package/internal/qs/index.mjs +10 -0
  25. package/internal/qs/index.mjs.map +1 -0
  26. package/internal/qs/stringify.d.mts +3 -0
  27. package/internal/qs/stringify.d.mts.map +1 -0
  28. package/internal/qs/stringify.d.ts +3 -0
  29. package/internal/qs/stringify.d.ts.map +1 -0
  30. package/internal/qs/stringify.js +277 -0
  31. package/internal/qs/stringify.js.map +1 -0
  32. package/internal/qs/stringify.mjs +274 -0
  33. package/internal/qs/stringify.mjs.map +1 -0
  34. package/internal/qs/types.d.mts +57 -0
  35. package/internal/qs/types.d.mts.map +1 -0
  36. package/internal/qs/types.d.ts +57 -0
  37. package/internal/qs/types.d.ts.map +1 -0
  38. package/internal/qs/types.js +3 -0
  39. package/internal/qs/types.js.map +1 -0
  40. package/internal/qs/types.mjs +2 -0
  41. package/internal/qs/types.mjs.map +1 -0
  42. package/internal/qs/utils.d.mts +15 -0
  43. package/internal/qs/utils.d.mts.map +1 -0
  44. package/internal/qs/utils.d.ts +15 -0
  45. package/internal/qs/utils.d.ts.map +1 -0
  46. package/internal/qs/utils.js +230 -0
  47. package/internal/qs/utils.js.map +1 -0
  48. package/internal/qs/utils.mjs +217 -0
  49. package/internal/qs/utils.mjs.map +1 -0
  50. package/internal/tslib.js +22 -22
  51. package/internal/utils/query.d.mts +0 -3
  52. package/internal/utils/query.d.mts.map +1 -1
  53. package/internal/utils/query.d.ts +0 -3
  54. package/internal/utils/query.d.ts.map +1 -1
  55. package/internal/utils/query.js +3 -16
  56. package/internal/utils/query.js.map +1 -1
  57. package/internal/utils/query.mjs +2 -16
  58. package/internal/utils/query.mjs.map +1 -1
  59. package/package.json +1 -1
  60. package/resources/compute/vms/index.d.mts +2 -0
  61. package/resources/compute/vms/index.d.mts.map +1 -1
  62. package/resources/compute/vms/index.d.ts +2 -0
  63. package/resources/compute/vms/index.d.ts.map +1 -1
  64. package/resources/compute/vms/index.js +5 -1
  65. package/resources/compute/vms/index.js.map +1 -1
  66. package/resources/compute/vms/index.mjs +2 -0
  67. package/resources/compute/vms/index.mjs.map +1 -1
  68. package/resources/compute/vms/metric-descriptors.d.mts +61 -0
  69. package/resources/compute/vms/metric-descriptors.d.mts.map +1 -0
  70. package/resources/compute/vms/metric-descriptors.d.ts +61 -0
  71. package/resources/compute/vms/metric-descriptors.d.ts.map +1 -0
  72. package/resources/compute/vms/metric-descriptors.js +23 -0
  73. package/resources/compute/vms/metric-descriptors.js.map +1 -0
  74. package/resources/compute/vms/metric-descriptors.mjs +19 -0
  75. package/resources/compute/vms/metric-descriptors.mjs.map +1 -0
  76. package/resources/compute/vms/metrics.d.mts +113 -0
  77. package/resources/compute/vms/metrics.d.mts.map +1 -0
  78. package/resources/compute/vms/metrics.d.ts +113 -0
  79. package/resources/compute/vms/metrics.d.ts.map +1 -0
  80. package/resources/compute/vms/metrics.js +25 -0
  81. package/resources/compute/vms/metrics.js.map +1 -0
  82. package/resources/compute/vms/metrics.mjs +21 -0
  83. package/resources/compute/vms/metrics.mjs.map +1 -0
  84. package/resources/compute/vms/os-images.d.mts +15 -0
  85. package/resources/compute/vms/os-images.d.mts.map +1 -1
  86. package/resources/compute/vms/os-images.d.ts +15 -0
  87. package/resources/compute/vms/os-images.d.ts.map +1 -1
  88. package/resources/compute/vms/vms.d.mts +42 -0
  89. package/resources/compute/vms/vms.d.mts.map +1 -1
  90. package/resources/compute/vms/vms.d.ts +42 -0
  91. package/resources/compute/vms/vms.d.ts.map +1 -1
  92. package/resources/compute/vms/vms.js +8 -0
  93. package/resources/compute/vms/vms.js.map +1 -1
  94. package/resources/compute/vms/vms.mjs +8 -0
  95. package/resources/compute/vms/vms.mjs.map +1 -1
  96. package/resources/compute/vms/volumes.d.mts +26 -0
  97. package/resources/compute/vms/volumes.d.mts.map +1 -1
  98. package/resources/compute/vms/volumes.d.ts +26 -0
  99. package/resources/compute/vms/volumes.d.ts.map +1 -1
  100. package/resources/compute/volumes/volumes.d.mts +39 -0
  101. package/resources/compute/volumes/volumes.d.mts.map +1 -1
  102. package/resources/compute/volumes/volumes.d.ts +39 -0
  103. package/resources/compute/volumes/volumes.d.ts.map +1 -1
  104. package/resources/compute/volumes/volumes.js.map +1 -1
  105. package/resources/compute/volumes/volumes.mjs.map +1 -1
  106. package/resources/instance-types/instance-types.d.mts +49 -0
  107. package/resources/instance-types/instance-types.d.mts.map +1 -1
  108. package/resources/instance-types/instance-types.d.ts +49 -0
  109. package/resources/instance-types/instance-types.d.ts.map +1 -1
  110. package/resources/networking/connect/connections/connections.d.mts +34 -0
  111. package/resources/networking/connect/connections/connections.d.mts.map +1 -1
  112. package/resources/networking/connect/connections/connections.d.ts +34 -0
  113. package/resources/networking/connect/connections/connections.d.ts.map +1 -1
  114. package/resources/networking/connect/connections/connections.js.map +1 -1
  115. package/resources/networking/connect/connections/connections.mjs.map +1 -1
  116. package/resources/networking/connect/routes.d.mts +17 -0
  117. package/resources/networking/connect/routes.d.mts.map +1 -1
  118. package/resources/networking/connect/routes.d.ts +17 -0
  119. package/resources/networking/connect/routes.d.ts.map +1 -1
  120. package/resources/networking/firewall-rules.d.mts +22 -0
  121. package/resources/networking/firewall-rules.d.mts.map +1 -1
  122. package/resources/networking/firewall-rules.d.ts +22 -0
  123. package/resources/networking/firewall-rules.d.ts.map +1 -1
  124. package/resources/networking/vpcs/vpcs.d.mts +22 -0
  125. package/resources/networking/vpcs/vpcs.d.mts.map +1 -1
  126. package/resources/networking/vpcs/vpcs.d.ts +22 -0
  127. package/resources/networking/vpcs/vpcs.d.ts.map +1 -1
  128. package/resources/networking/vpcs/vpcs.js.map +1 -1
  129. package/resources/networking/vpcs/vpcs.mjs.map +1 -1
  130. package/resources/rpc-nodes/dedicated/dedicated.d.mts +22 -0
  131. package/resources/rpc-nodes/dedicated/dedicated.d.mts.map +1 -1
  132. package/resources/rpc-nodes/dedicated/dedicated.d.ts +22 -0
  133. package/resources/rpc-nodes/dedicated/dedicated.d.ts.map +1 -1
  134. package/resources/rpc-nodes/dedicated/dedicated.js.map +1 -1
  135. package/resources/rpc-nodes/dedicated/dedicated.mjs.map +1 -1
  136. package/resources/rpc-nodes/flex/flex.d.mts +22 -0
  137. package/resources/rpc-nodes/flex/flex.d.mts.map +1 -1
  138. package/resources/rpc-nodes/flex/flex.d.ts +22 -0
  139. package/resources/rpc-nodes/flex/flex.d.ts.map +1 -1
  140. package/resources/rpc-nodes/flex/flex.js.map +1 -1
  141. package/resources/rpc-nodes/flex/flex.mjs.map +1 -1
  142. package/resources/shared.d.mts +4 -0
  143. package/resources/shared.d.mts.map +1 -1
  144. package/resources/shared.d.ts +4 -0
  145. package/resources/shared.d.ts.map +1 -1
  146. package/src/client.ts +1 -3
  147. package/src/internal/qs/LICENSE.md +13 -0
  148. package/src/internal/qs/README.md +3 -0
  149. package/src/internal/qs/formats.ts +10 -0
  150. package/src/internal/qs/index.ts +13 -0
  151. package/src/internal/qs/stringify.ts +385 -0
  152. package/src/internal/qs/types.ts +71 -0
  153. package/src/internal/qs/utils.ts +265 -0
  154. package/src/internal/utils/query.ts +2 -18
  155. package/src/resources/compute/api.md +23 -0
  156. package/src/resources/compute/vms/index.ts +12 -0
  157. package/src/resources/compute/vms/metric-descriptors.ts +77 -0
  158. package/src/resources/compute/vms/metrics.ts +149 -0
  159. package/src/resources/compute/vms/os-images.ts +19 -1
  160. package/src/resources/compute/vms/vms.ts +66 -0
  161. package/src/resources/compute/vms/volumes.ts +33 -1
  162. package/src/resources/compute/volumes/volumes.ts +48 -0
  163. package/src/resources/instance-types/instance-types.ts +62 -1
  164. package/src/resources/networking/connect/connections/connections.ts +42 -0
  165. package/src/resources/networking/connect/routes.ts +22 -1
  166. package/src/resources/networking/firewall-rules.ts +28 -1
  167. package/src/resources/networking/vpcs/vpcs.ts +27 -0
  168. package/src/resources/rpc-nodes/dedicated/dedicated.ts +27 -0
  169. package/src/resources/rpc-nodes/flex/flex.ts +27 -0
  170. package/src/resources/shared.ts +5 -0
  171. package/src/version.ts +1 -1
  172. package/version.d.mts +1 -1
  173. package/version.d.ts +1 -1
  174. package/version.js +1 -1
  175. package/version.mjs +1 -1
package/internal/tslib.js CHANGED
@@ -1,26 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.__setModuleDefault = exports.__createBinding = void 0;
4
+ exports.__importStar = __importStar;
4
5
  exports.__classPrivateFieldSet = __classPrivateFieldSet;
5
6
  exports.__classPrivateFieldGet = __classPrivateFieldGet;
6
7
  exports.__exportStar = __exportStar;
7
- exports.__importStar = __importStar;
8
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
9
- if (kind === "m")
10
- throw new TypeError("Private method is not writable");
11
- if (kind === "a" && !f)
12
- throw new TypeError("Private accessor was defined without a setter");
13
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
- return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
16
- }
17
- function __classPrivateFieldGet(receiver, state, kind, f) {
18
- if (kind === "a" && !f)
19
- throw new TypeError("Private accessor was defined without a getter");
20
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
21
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
22
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
23
- }
24
8
  var __createBinding = Object.create
25
9
  ? function (o, m, k, k2) {
26
10
  if (k2 === void 0)
@@ -42,11 +26,6 @@ var __createBinding = Object.create
42
26
  o[k2] = m[k];
43
27
  };
44
28
  exports.__createBinding = __createBinding;
45
- function __exportStar(m, o) {
46
- for (var p in m)
47
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
48
- __createBinding(o, m, p);
49
- }
50
29
  var __setModuleDefault = Object.create
51
30
  ? function (o, v) {
52
31
  Object.defineProperty(o, "default", { enumerable: true, value: v });
@@ -79,3 +58,24 @@ function __importStar(mod) {
79
58
  __setModuleDefault(result, mod);
80
59
  return result;
81
60
  }
61
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
62
+ if (kind === "m")
63
+ throw new TypeError("Private method is not writable");
64
+ if (kind === "a" && !f)
65
+ throw new TypeError("Private accessor was defined without a setter");
66
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
67
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
68
+ return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
69
+ }
70
+ function __classPrivateFieldGet(receiver, state, kind, f) {
71
+ if (kind === "a" && !f)
72
+ throw new TypeError("Private accessor was defined without a getter");
73
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
74
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
75
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
76
+ }
77
+ function __exportStar(m, o) {
78
+ for (var p in m)
79
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
80
+ __createBinding(o, m, p);
81
+ }
@@ -1,5 +1,2 @@
1
- /**
2
- * Basic re-implementation of `qs.stringify` for primitive types.
3
- */
4
1
  export declare function stringifyQuery(query: object | Record<string, unknown>): string;
5
2
  //# sourceMappingURL=query.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.mts","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAerE"}
1
+ {"version":3,"file":"query.d.mts","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAErE"}
@@ -1,5 +1,2 @@
1
- /**
2
- * Basic re-implementation of `qs.stringify` for primitive types.
3
- */
4
1
  export declare function stringifyQuery(query: object | Record<string, unknown>): string;
5
2
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAerE"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAErE"}
@@ -2,22 +2,9 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.stringifyQuery = stringifyQuery;
5
- const error_1 = require("../../core/error.js");
6
- /**
7
- * Basic re-implementation of `qs.stringify` for primitive types.
8
- */
5
+ const tslib_1 = require("../tslib.js");
6
+ const qs = tslib_1.__importStar(require("../qs/stringify.js"));
9
7
  function stringifyQuery(query) {
10
- return Object.entries(query)
11
- .filter(([_, value]) => typeof value !== 'undefined')
12
- .map(([key, value]) => {
13
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
14
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
15
- }
16
- if (value === null) {
17
- return `${encodeURIComponent(key)}=`;
18
- }
19
- throw new error_1.NirvanaLabsError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
20
- })
21
- .join('&');
8
+ return qs.stringify(query, { arrayFormat: 'comma' });
22
9
  }
23
10
  //# sourceMappingURL=query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAOtF,wCAeC;AApBD,+CAAoD;AAEpD;;GAEG;AACH,SAAgB,cAAc,CAAC,KAAuC;IACpE,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,WAAW,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YACzF,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;QACnE,CAAC;QACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC;QACvC,CAAC;QACD,MAAM,IAAI,wBAAgB,CACxB,yBAAyB,OAAO,KAAK,mQAAmQ,CACzS,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAItF,wCAEC;;AAJD,+DAAsC;AAEtC,SAAgB,cAAc,CAAC,KAAuC;IACpE,OAAO,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AACvD,CAAC"}
@@ -1,20 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { NirvanaLabsError } from "../../core/error.mjs";
3
- /**
4
- * Basic re-implementation of `qs.stringify` for primitive types.
5
- */
2
+ import * as qs from "../qs/stringify.mjs";
6
3
  export function stringifyQuery(query) {
7
- return Object.entries(query)
8
- .filter(([_, value]) => typeof value !== 'undefined')
9
- .map(([key, value]) => {
10
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
11
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
12
- }
13
- if (value === null) {
14
- return `${encodeURIComponent(key)}=`;
15
- }
16
- throw new NirvanaLabsError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
17
- })
18
- .join('&');
4
+ return qs.stringify(query, { arrayFormat: 'comma' });
19
5
  }
20
6
  //# sourceMappingURL=query.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.mjs","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,gBAAgB,EAAE,6BAAyB;AAEpD;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAuC;IACpE,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,WAAW,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YACzF,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;QACnE,CAAC;QACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC;QACvC,CAAC;QACD,MAAM,IAAI,gBAAgB,CACxB,yBAAyB,OAAO,KAAK,mQAAmQ,CACzS,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"query.mjs","sourceRoot":"","sources":["../../src/internal/utils/query.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,KAAK,EAAE,4BAAwB;AAEtC,MAAM,UAAU,cAAc,CAAC,KAAuC;IACpE,OAAO,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AACvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nirvana-labs/nirvana",
3
- "version": "1.98.1",
3
+ "version": "1.98.2",
4
4
  "description": "The official TypeScript library for the Nirvana Labs API",
5
5
  "author": "Nirvana Labs <engineering@nirvanalabs.io>",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,7 @@
1
1
  export { Availability, type AvailabilityCreateParams, type AvailabilityUpdateParams } from "./availability.mjs";
2
2
  export { Cost, type CostCreateParams, type CostUpdateParams } from "./cost.mjs";
3
+ export { MetricDescriptors, type VMMetricDescriptor, type VMMetricDescriptorList, } from "./metric-descriptors.mjs";
4
+ export { Metrics, type VMMetricPoint, type VMMetricSeries, type VMMetrics, type MetricListParams, } from "./metrics.mjs";
3
5
  export { OSImages, type OSImageListParams } from "./os-images.mjs";
4
6
  export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKeyRequest, type VM, type VMList, type VMCreateParams, type VMUpdateParams, type VMListParams, type OSImagesCursor, type VMsCursor, } from "./vms.mjs";
5
7
  export { Volumes, type VolumeListParams } from "./volumes.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE,2BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,mBAAe;AAC5E,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,wBAAoB;AAC/D,OAAO,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,kBAAc;AACf,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAkB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE,2BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,mBAAe;AAC5E,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B,iCAA6B;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,sBAAkB;AACnB,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,wBAAoB;AAC/D,OAAO,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,kBAAc;AACf,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAkB"}
@@ -1,5 +1,7 @@
1
1
  export { Availability, type AvailabilityCreateParams, type AvailabilityUpdateParams } from "./availability.js";
2
2
  export { Cost, type CostCreateParams, type CostUpdateParams } from "./cost.js";
3
+ export { MetricDescriptors, type VMMetricDescriptor, type VMMetricDescriptorList, } from "./metric-descriptors.js";
4
+ export { Metrics, type VMMetricPoint, type VMMetricSeries, type VMMetrics, type MetricListParams, } from "./metrics.js";
3
5
  export { OSImages, type OSImageListParams } from "./os-images.js";
4
6
  export { VMs, type CPUConfig, type MemoryConfig, type OSImage, type SSHKeyRequest, type VM, type VMList, type VMCreateParams, type VMUpdateParams, type VMListParams, type OSImagesCursor, type VMsCursor, } from "./vms.js";
5
7
  export { Volumes, type VolumeListParams } from "./volumes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE,0BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,kBAAe;AAC5E,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,uBAAoB;AAC/D,OAAO,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,iBAAc;AACf,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,qBAAkB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE,0BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,kBAAe;AAC5E,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B,gCAA6B;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,qBAAkB;AACnB,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,uBAAoB;AAC/D,OAAO,EACL,GAAG,EACH,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,EAAE,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,iBAAc;AACf,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,qBAAkB"}
@@ -1,11 +1,15 @@
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.Volumes = exports.VMs = exports.OSImages = exports.Cost = exports.Availability = void 0;
4
+ exports.Volumes = exports.VMs = exports.OSImages = exports.Metrics = exports.MetricDescriptors = exports.Cost = exports.Availability = void 0;
5
5
  var availability_1 = require("./availability.js");
6
6
  Object.defineProperty(exports, "Availability", { enumerable: true, get: function () { return availability_1.Availability; } });
7
7
  var cost_1 = require("./cost.js");
8
8
  Object.defineProperty(exports, "Cost", { enumerable: true, get: function () { return cost_1.Cost; } });
9
+ var metric_descriptors_1 = require("./metric-descriptors.js");
10
+ Object.defineProperty(exports, "MetricDescriptors", { enumerable: true, get: function () { return metric_descriptors_1.MetricDescriptors; } });
11
+ var metrics_1 = require("./metrics.js");
12
+ Object.defineProperty(exports, "Metrics", { enumerable: true, get: function () { return metrics_1.Metrics; } });
9
13
  var os_images_1 = require("./os-images.js");
10
14
  Object.defineProperty(exports, "OSImages", { enumerable: true, get: function () { return os_images_1.OSImages; } });
11
15
  var vms_1 = require("./vms.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA4G;AAAnG,4GAAA,YAAY,OAAA;AACrB,kCAA4E;AAAnE,4FAAA,IAAI,OAAA;AACb,4CAA+D;AAAtD,qGAAA,QAAQ,OAAA;AACjB,gCAae;AAZb,0FAAA,GAAG,OAAA;AAaL,wCAA2D;AAAlD,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA4G;AAAnG,4GAAA,YAAY,OAAA;AACrB,kCAA4E;AAAnE,4FAAA,IAAI,OAAA;AACb,8DAI8B;AAH5B,uHAAA,iBAAiB,OAAA;AAInB,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,4CAA+D;AAAtD,qGAAA,QAAQ,OAAA;AACjB,gCAae;AAZb,0FAAA,GAAG,OAAA;AAaL,wCAA2D;AAAlD,kGAAA,OAAO,OAAA"}
@@ -1,6 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export { Availability } from "./availability.mjs";
3
3
  export { Cost } from "./cost.mjs";
4
+ export { MetricDescriptors, } from "./metric-descriptors.mjs";
5
+ export { Metrics, } from "./metrics.mjs";
4
6
  export { OSImages } from "./os-images.mjs";
5
7
  export { VMs, } from "./vms.mjs";
6
8
  export { Volumes } from "./volumes.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,YAAY,EAAgE,2BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAgD,mBAAe;AAC5E,OAAO,EAAE,QAAQ,EAA0B,wBAAoB;AAC/D,OAAO,EACL,GAAG,GAYJ,kBAAc;AACf,OAAO,EAAE,OAAO,EAAyB,sBAAkB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/compute/vms/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,YAAY,EAAgE,2BAAuB;AAC5G,OAAO,EAAE,IAAI,EAAgD,mBAAe;AAC5E,OAAO,EACL,iBAAiB,GAGlB,iCAA6B;AAC9B,OAAO,EACL,OAAO,GAKR,sBAAkB;AACnB,OAAO,EAAE,QAAQ,EAA0B,wBAAoB;AAC/D,OAAO,EACL,GAAG,GAYJ,kBAAc;AACf,OAAO,EAAE,OAAO,EAAyB,sBAAkB"}
@@ -0,0 +1,61 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as Shared from "../../shared.mjs";
3
+ import { APIPromise } from "../../../core/api-promise.mjs";
4
+ import { RequestOptions } from "../../../internal/request-options.mjs";
5
+ export declare class MetricDescriptors extends APIResource {
6
+ /**
7
+ * Describe every metric a VM reports: its name, unit, the range its values fall
8
+ * in, and whether a value can be null. Read this instead of holding a list of
9
+ * metric names, so a metric published later is picked up without a client change.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const vmMetricDescriptorList =
14
+ * await client.compute.vms.metricDescriptors.list();
15
+ * ```
16
+ */
17
+ list(options?: RequestOptions): APIPromise<VMMetricDescriptorList>;
18
+ }
19
+ /**
20
+ * Describes one metric a VM reports: how to name it, what its values mean, and the
21
+ * range they fall in.
22
+ */
23
+ export interface VMMetricDescriptor {
24
+ /**
25
+ * What the metric measures.
26
+ */
27
+ description: string;
28
+ /**
29
+ * Highest value the metric reports, or null when it has no ceiling of its own.
30
+ */
31
+ max_value: number | null;
32
+ /**
33
+ * Fully-qualified name of the metric, and the only spelling the metric query
34
+ * parameter accepts.
35
+ */
36
+ metric: string;
37
+ /**
38
+ * Lowest value the metric reports.
39
+ */
40
+ min_value: number;
41
+ /**
42
+ * Whether a point's value can be null. A null means the VM reported no observation
43
+ * for that period, which is what a stopped VM looks like.
44
+ */
45
+ nullable: boolean;
46
+ /**
47
+ * Unit the values are expressed in.
48
+ */
49
+ unit: Shared.VMMetricUnit;
50
+ }
51
+ export interface VMMetricDescriptorList {
52
+ items: Array<VMMetricDescriptor>;
53
+ /**
54
+ * Pagination response details.
55
+ */
56
+ pagination: Shared.Pagination;
57
+ }
58
+ export declare namespace MetricDescriptors {
59
+ export { type VMMetricDescriptor as VMMetricDescriptor, type VMMetricDescriptorList as VMMetricDescriptorList, };
60
+ }
61
+ //# sourceMappingURL=metric-descriptors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric-descriptors.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/metric-descriptors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,MAAM,yBAAqB;AACvC,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnE;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,61 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as Shared from "../../shared.js";
3
+ import { APIPromise } from "../../../core/api-promise.js";
4
+ import { RequestOptions } from "../../../internal/request-options.js";
5
+ export declare class MetricDescriptors extends APIResource {
6
+ /**
7
+ * Describe every metric a VM reports: its name, unit, the range its values fall
8
+ * in, and whether a value can be null. Read this instead of holding a list of
9
+ * metric names, so a metric published later is picked up without a client change.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const vmMetricDescriptorList =
14
+ * await client.compute.vms.metricDescriptors.list();
15
+ * ```
16
+ */
17
+ list(options?: RequestOptions): APIPromise<VMMetricDescriptorList>;
18
+ }
19
+ /**
20
+ * Describes one metric a VM reports: how to name it, what its values mean, and the
21
+ * range they fall in.
22
+ */
23
+ export interface VMMetricDescriptor {
24
+ /**
25
+ * What the metric measures.
26
+ */
27
+ description: string;
28
+ /**
29
+ * Highest value the metric reports, or null when it has no ceiling of its own.
30
+ */
31
+ max_value: number | null;
32
+ /**
33
+ * Fully-qualified name of the metric, and the only spelling the metric query
34
+ * parameter accepts.
35
+ */
36
+ metric: string;
37
+ /**
38
+ * Lowest value the metric reports.
39
+ */
40
+ min_value: number;
41
+ /**
42
+ * Whether a point's value can be null. A null means the VM reported no observation
43
+ * for that period, which is what a stopped VM looks like.
44
+ */
45
+ nullable: boolean;
46
+ /**
47
+ * Unit the values are expressed in.
48
+ */
49
+ unit: Shared.VMMetricUnit;
50
+ }
51
+ export interface VMMetricDescriptorList {
52
+ items: Array<VMMetricDescriptor>;
53
+ /**
54
+ * Pagination response details.
55
+ */
56
+ pagination: Shared.Pagination;
57
+ }
58
+ export declare namespace MetricDescriptors {
59
+ export { type VMMetricDescriptor as VMMetricDescriptor, type VMMetricDescriptorList as VMMetricDescriptorList, };
60
+ }
61
+ //# sourceMappingURL=metric-descriptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric-descriptors.d.ts","sourceRoot":"","sources":["../../../src/resources/compute/vms/metric-descriptors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnE;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MetricDescriptors = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ class MetricDescriptors extends resource_1.APIResource {
7
+ /**
8
+ * Describe every metric a VM reports: its name, unit, the range its values fall
9
+ * in, and whether a value can be null. Read this instead of holding a list of
10
+ * metric names, so a metric published later is picked up without a client change.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const vmMetricDescriptorList =
15
+ * await client.compute.vms.metricDescriptors.list();
16
+ * ```
17
+ */
18
+ list(options) {
19
+ return this._client.get('/v1/compute/metric_descriptors', options);
20
+ }
21
+ }
22
+ exports.MetricDescriptors = MetricDescriptors;
23
+ //# sourceMappingURL=metric-descriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric-descriptors.js","sourceRoot":"","sources":["../../../src/resources/compute/vms/metric-descriptors.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAKrD,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAfD,8CAeC"}
@@ -0,0 +1,19 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ export class MetricDescriptors extends APIResource {
4
+ /**
5
+ * Describe every metric a VM reports: its name, unit, the range its values fall
6
+ * in, and whether a value can be null. Read this instead of holding a list of
7
+ * metric names, so a metric published later is picked up without a client change.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const vmMetricDescriptorList =
12
+ * await client.compute.vms.metricDescriptors.list();
13
+ * ```
14
+ */
15
+ list(options) {
16
+ return this._client.get('/v1/compute/metric_descriptors', options);
17
+ }
18
+ }
19
+ //# sourceMappingURL=metric-descriptors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric-descriptors.mjs","sourceRoot":"","sources":["../../../src/resources/compute/vms/metric-descriptors.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAKrD,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF"}
@@ -0,0 +1,113 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as Shared from "../../shared.mjs";
3
+ import { APIPromise } from "../../../core/api-promise.mjs";
4
+ import { RequestOptions } from "../../../internal/request-options.mjs";
5
+ export declare class Metrics extends APIResource {
6
+ /**
7
+ * Read a VM's resource metrics over an interval. Every series covers the same
8
+ * periods, so they line up index for index, and a period the VM reported no
9
+ * observation for carries a null value.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const vmMetrics = await client.compute.vms.metrics.list(
14
+ * 'vm_id',
15
+ * );
16
+ * ```
17
+ */
18
+ list(vmID: string, query?: MetricListParams | null | undefined, options?: RequestOptions): APIPromise<VMMetrics>;
19
+ }
20
+ /**
21
+ * One period's value.
22
+ */
23
+ export interface VMMetricPoint {
24
+ /**
25
+ * End of the period the value covers, so a point timestamped 00:05 over
26
+ * five-minute periods describes 00:00 through 00:05.
27
+ */
28
+ timestamp: string;
29
+ /**
30
+ * Value over the period, in the series' unit. Null means the VM reported no
31
+ * observation for this period, which is what a stopped VM looks like.
32
+ */
33
+ value: number | null;
34
+ }
35
+ /**
36
+ * One metric's values over the interval served.
37
+ */
38
+ export interface VMMetricSeries {
39
+ /**
40
+ * Fully-qualified name of the metric.
41
+ */
42
+ metric: string;
43
+ /**
44
+ * Values over the interval, oldest first. Every series in a response covers the
45
+ * same periods, so they line up index for index.
46
+ */
47
+ points: Array<VMMetricPoint>;
48
+ /**
49
+ * Unit the values are expressed in.
50
+ */
51
+ unit: Shared.VMMetricUnit;
52
+ }
53
+ /**
54
+ * A VM's metrics over an interval: one series per metric, on a shared grid of
55
+ * periods.
56
+ */
57
+ export interface VMMetrics {
58
+ /**
59
+ * How the samples inside one period were folded into a single value.
60
+ */
61
+ aggregation: 'mean' | 'max' | 'min';
62
+ /**
63
+ * End of the interval served, exclusive.
64
+ */
65
+ end_time: string;
66
+ /**
67
+ * One series per requested metric, in the order they were requested.
68
+ */
69
+ metrics: Array<VMMetricSeries>;
70
+ /**
71
+ * Width of one period, and so the spacing between consecutive points.
72
+ */
73
+ period: '5m' | '15m' | '1h' | '6h' | '24h';
74
+ /**
75
+ * Start of the interval served, inclusive. It can be later than the requested
76
+ * start when the request asked for more than the available history.
77
+ */
78
+ start_time: string;
79
+ /**
80
+ * ID of the VM the series belong to.
81
+ */
82
+ vm_id: string;
83
+ }
84
+ export interface MetricListParams {
85
+ /**
86
+ * How the samples inside one period are folded into a single value.
87
+ */
88
+ aggregation?: 'mean' | 'max' | 'min';
89
+ /**
90
+ * End of the interval, exclusive, as an RFC 3339 timestamp. Defaults to now.
91
+ */
92
+ end_time?: string;
93
+ /**
94
+ * Metric to return. Repeat the parameter for several; every metric is returned
95
+ * when it is left out.
96
+ */
97
+ metric?: Array<'compute.nirvanalabs.io/vm/cpu/used_cores' | 'compute.nirvanalabs.io/vm/cpu/utilization' | 'compute.nirvanalabs.io/vm/memory/used_bytes' | 'compute.nirvanalabs.io/vm/memory/utilization'>;
98
+ /**
99
+ * Width of one period, and so the spacing between points. An interval holding more
100
+ * than 1440 periods is rejected; the error names a period that fits.
101
+ */
102
+ period?: '5m' | '15m' | '1h' | '6h' | '24h';
103
+ /**
104
+ * Start of the interval, inclusive, as an RFC 3339 timestamp. Defaults to an hour
105
+ * before end_time. A start older than the 30 days of history kept is served from
106
+ * where that history begins.
107
+ */
108
+ start_time?: string;
109
+ }
110
+ export declare namespace Metrics {
111
+ export { type VMMetricPoint as VMMetricPoint, type VMMetricSeries as VMMetricSeries, type VMMetrics as VMMetrics, type MetricListParams as MetricListParams, };
112
+ }
113
+ //# sourceMappingURL=metrics.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.mts","sourceRoot":"","sources":["../../../src/resources/compute/vms/metrics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,MAAM,yBAAqB;AACvC,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,SAAS,CAAC;CAGzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAE7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAEpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE/B;;OAEG;IACH,MAAM,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAE3C;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CACV,0CAA0C,GAC1C,2CAA2C,GAC3C,6CAA6C,GAC7C,8CAA8C,CACjD,CAAC;IAEF;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAE5C;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}