@openshift-migration-advisor/agent-sdk 0.21.0-efc5ae0c621f → 0.22.0-99a4947ef41b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/agent-sdk@0.21.0-efc5ae0c621f
1
+ # @openshift-migration-advisor/agent-sdk@0.22.0-99a4947ef41b
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -198,7 +198,7 @@ and is automatically generated by the
198
198
  [OpenAPI Generator](https://openapi-generator.tech) project:
199
199
 
200
200
  - API version: `v2`
201
- - Package version: `0.21.0-efc5ae0c621f`
201
+ - Package version: `0.22.0-99a4947ef41b`
202
202
  - Generator version: `7.26.0-SNAPSHOT`
203
203
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
204
204
 
@@ -17,6 +17,12 @@ export interface GetInventoryRequest {
17
17
  */
18
18
  id: string;
19
19
  }
20
+ export interface GetLatestInventoryRequest {
21
+ /**
22
+ * Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
23
+ */
24
+ scope?: GetLatestInventoryScopeEnum;
25
+ }
20
26
  /**
21
27
  * InventoriesApi - interface
22
28
  *
@@ -46,22 +52,24 @@ export interface InventoriesApiInterface {
46
52
  getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
47
53
  /**
48
54
  * Creates request options for getLatestInventory without sending the request
55
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
49
56
  * @throws {RequiredError}
50
57
  * @memberof InventoriesApiInterface
51
58
  */
52
- getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
59
+ getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
53
60
  /**
54
61
  *
55
62
  * @summary Get inventory from the latest collection
63
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
56
64
  * @param {*} [options] Override http request option.
57
65
  * @throws {RequiredError}
58
66
  * @memberof InventoriesApiInterface
59
67
  */
60
- getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
68
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
61
69
  /**
62
70
  * Get inventory from the latest collection
63
71
  */
64
- getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
72
+ getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
65
73
  }
66
74
  /**
67
75
  *
@@ -82,13 +90,21 @@ export declare class InventoriesApi extends runtime.BaseAPI implements Inventori
82
90
  /**
83
91
  * Creates request options for getLatestInventory without sending the request
84
92
  */
85
- getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
93
+ getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
86
94
  /**
87
95
  * Get inventory from the latest collection
88
96
  */
89
- getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
97
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
90
98
  /**
91
99
  * Get inventory from the latest collection
92
100
  */
93
- getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
101
+ getLatestInventory(requestParameters?: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
94
102
  }
103
+ /**
104
+ * @export
105
+ */
106
+ export declare const GetLatestInventoryScopeEnum: {
107
+ readonly Main: "main";
108
+ readonly All: "all";
109
+ };
110
+ export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.InventoriesApi = void 0;
25
+ exports.GetLatestInventoryScopeEnum = exports.InventoriesApi = void 0;
26
26
  const runtime = require("../runtime.js");
27
27
  const Inventory_js_1 = require("../models/Inventory.js");
28
28
  /**
@@ -71,9 +71,12 @@ class InventoriesApi extends runtime.BaseAPI {
71
71
  /**
72
72
  * Creates request options for getLatestInventory without sending the request
73
73
  */
74
- getLatestInventoryRequestOpts() {
74
+ getLatestInventoryRequestOpts(requestParameters) {
75
75
  return __awaiter(this, void 0, void 0, function* () {
76
76
  const queryParameters = {};
77
+ if (requestParameters['scope'] != null) {
78
+ queryParameters['scope'] = requestParameters['scope'];
79
+ }
77
80
  const headerParameters = {};
78
81
  let urlPath = `/inventory`;
79
82
  return {
@@ -87,9 +90,9 @@ class InventoriesApi extends runtime.BaseAPI {
87
90
  /**
88
91
  * Get inventory from the latest collection
89
92
  */
90
- getLatestInventoryRaw(initOverrides) {
93
+ getLatestInventoryRaw(requestParameters, initOverrides) {
91
94
  return __awaiter(this, void 0, void 0, function* () {
92
- const requestOptions = yield this.getLatestInventoryRequestOpts();
95
+ const requestOptions = yield this.getLatestInventoryRequestOpts(requestParameters);
93
96
  const response = yield this.request(requestOptions, initOverrides);
94
97
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, Inventory_js_1.InventoryFromJSON)(jsonValue));
95
98
  });
@@ -97,11 +100,18 @@ class InventoriesApi extends runtime.BaseAPI {
97
100
  /**
98
101
  * Get inventory from the latest collection
99
102
  */
100
- getLatestInventory(initOverrides) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- const response = yield this.getLatestInventoryRaw(initOverrides);
103
+ getLatestInventory() {
104
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
105
+ const response = yield this.getLatestInventoryRaw(requestParameters, initOverrides);
103
106
  return yield response.value();
104
107
  });
105
108
  }
106
109
  }
107
110
  exports.InventoriesApi = InventoriesApi;
111
+ /**
112
+ * @export
113
+ */
114
+ exports.GetLatestInventoryScopeEnum = {
115
+ Main: 'main',
116
+ All: 'all',
117
+ };
@@ -17,6 +17,12 @@ export interface GetInventoryRequest {
17
17
  */
18
18
  id: string;
19
19
  }
20
+ export interface GetLatestInventoryRequest {
21
+ /**
22
+ * Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
23
+ */
24
+ scope?: GetLatestInventoryScopeEnum;
25
+ }
20
26
  /**
21
27
  * InventoriesApi - interface
22
28
  *
@@ -46,22 +52,24 @@ export interface InventoriesApiInterface {
46
52
  getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
47
53
  /**
48
54
  * Creates request options for getLatestInventory without sending the request
55
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
49
56
  * @throws {RequiredError}
50
57
  * @memberof InventoriesApiInterface
51
58
  */
52
- getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
59
+ getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
53
60
  /**
54
61
  *
55
62
  * @summary Get inventory from the latest collection
63
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
56
64
  * @param {*} [options] Override http request option.
57
65
  * @throws {RequiredError}
58
66
  * @memberof InventoriesApiInterface
59
67
  */
60
- getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
68
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
61
69
  /**
62
70
  * Get inventory from the latest collection
63
71
  */
64
- getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
72
+ getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
65
73
  }
66
74
  /**
67
75
  *
@@ -82,13 +90,21 @@ export declare class InventoriesApi extends runtime.BaseAPI implements Inventori
82
90
  /**
83
91
  * Creates request options for getLatestInventory without sending the request
84
92
  */
85
- getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
93
+ getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
86
94
  /**
87
95
  * Get inventory from the latest collection
88
96
  */
89
- getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
97
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
90
98
  /**
91
99
  * Get inventory from the latest collection
92
100
  */
93
- getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
101
+ getLatestInventory(requestParameters?: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
94
102
  }
103
+ /**
104
+ * @export
105
+ */
106
+ export declare const GetLatestInventoryScopeEnum: {
107
+ readonly Main: "main";
108
+ readonly All: "all";
109
+ };
110
+ export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
@@ -68,9 +68,12 @@ export class InventoriesApi extends runtime.BaseAPI {
68
68
  /**
69
69
  * Creates request options for getLatestInventory without sending the request
70
70
  */
71
- getLatestInventoryRequestOpts() {
71
+ getLatestInventoryRequestOpts(requestParameters) {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
73
  const queryParameters = {};
74
+ if (requestParameters['scope'] != null) {
75
+ queryParameters['scope'] = requestParameters['scope'];
76
+ }
74
77
  const headerParameters = {};
75
78
  let urlPath = `/inventory`;
76
79
  return {
@@ -84,9 +87,9 @@ export class InventoriesApi extends runtime.BaseAPI {
84
87
  /**
85
88
  * Get inventory from the latest collection
86
89
  */
87
- getLatestInventoryRaw(initOverrides) {
90
+ getLatestInventoryRaw(requestParameters, initOverrides) {
88
91
  return __awaiter(this, void 0, void 0, function* () {
89
- const requestOptions = yield this.getLatestInventoryRequestOpts();
92
+ const requestOptions = yield this.getLatestInventoryRequestOpts(requestParameters);
90
93
  const response = yield this.request(requestOptions, initOverrides);
91
94
  return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
92
95
  });
@@ -94,10 +97,17 @@ export class InventoriesApi extends runtime.BaseAPI {
94
97
  /**
95
98
  * Get inventory from the latest collection
96
99
  */
97
- getLatestInventory(initOverrides) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- const response = yield this.getLatestInventoryRaw(initOverrides);
100
+ getLatestInventory() {
101
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
102
+ const response = yield this.getLatestInventoryRaw(requestParameters, initOverrides);
100
103
  return yield response.value();
101
104
  });
102
105
  }
103
106
  }
107
+ /**
108
+ * @export
109
+ */
110
+ export const GetLatestInventoryScopeEnum = {
111
+ Main: 'main',
112
+ All: 'all',
113
+ };
@@ -31,6 +31,10 @@ export interface Group {
31
31
  * Filter expression (pkg/filter DSL)
32
32
  */
33
33
  filter: string;
34
+ /**
35
+ * Number of VMs matching the group filter
36
+ */
37
+ vmCount?: number;
34
38
  /**
35
39
  *
36
40
  */
@@ -36,6 +36,7 @@ export function GroupFromJSONTyped(json, ignoreDiscriminator) {
36
36
  'name': json['name'],
37
37
  'description': json['description'] == null ? undefined : json['description'],
38
38
  'filter': json['filter'],
39
+ 'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
39
40
  'createdAt': json['createdAt'] == null ? undefined : (parseDateTime(json['createdAt'])),
40
41
  'updatedAt': json['updatedAt'] == null ? undefined : (parseDateTime(json['updatedAt'])),
41
42
  };
@@ -52,6 +53,7 @@ export function GroupToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  'name': value['name'],
53
54
  'description': value['description'],
54
55
  'filter': value['filter'],
56
+ 'vmCount': value['vmCount'],
55
57
  'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
56
58
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
57
59
  };
@@ -31,6 +31,10 @@ export interface Group {
31
31
  * Filter expression (pkg/filter DSL)
32
32
  */
33
33
  filter: string;
34
+ /**
35
+ * Number of VMs matching the group filter
36
+ */
37
+ vmCount?: number;
34
38
  /**
35
39
  *
36
40
  */
@@ -43,6 +43,7 @@ function GroupFromJSONTyped(json, ignoreDiscriminator) {
43
43
  'name': json['name'],
44
44
  'description': json['description'] == null ? undefined : json['description'],
45
45
  'filter': json['filter'],
46
+ 'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
46
47
  'createdAt': json['createdAt'] == null ? undefined : ((0, runtime_js_1.parseDateTime)(json['createdAt'])),
47
48
  'updatedAt': json['updatedAt'] == null ? undefined : ((0, runtime_js_1.parseDateTime)(json['updatedAt'])),
48
49
  };
@@ -59,6 +60,7 @@ function GroupToJSONTyped(value, ignoreDiscriminator = false) {
59
60
  'name': value['name'],
60
61
  'description': value['description'],
61
62
  'filter': value['filter'],
63
+ 'vmCount': value['vmCount'],
62
64
  'createdAt': value['createdAt'] == null ? value['createdAt'] : (0, runtime_js_1.serializeDateTime)(value['createdAt']),
63
65
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : (0, runtime_js_1.serializeDateTime)(value['updatedAt']),
64
66
  };
package/docs/Group.md CHANGED
@@ -10,6 +10,7 @@ Name | Type
10
10
  `name` | string
11
11
  `description` | string
12
12
  `filter` | string
13
+ `vmCount` | number
13
14
  `createdAt` | Date
14
15
  `updatedAt` | Date
15
16
 
@@ -24,6 +25,7 @@ const example = {
24
25
  "name": null,
25
26
  "description": null,
26
27
  "filter": memory >= 8GB and cluster = 'prod',
28
+ "vmCount": null,
27
29
  "createdAt": null,
28
30
  "updatedAt": null,
29
31
  } satisfies Group
@@ -78,7 +78,7 @@ No authorization required
78
78
 
79
79
  ## getLatestInventory
80
80
 
81
- > Inventory getLatestInventory()
81
+ > Inventory getLatestInventory(scope)
82
82
 
83
83
  Get inventory from the latest collection
84
84
 
@@ -95,8 +95,13 @@ async function example() {
95
95
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
96
96
  const api = new InventoriesApi();
97
97
 
98
+ const body = {
99
+ // 'main' | 'all' | Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments. (optional)
100
+ scope: scope_example,
101
+ } satisfies GetLatestInventoryRequest;
102
+
98
103
  try {
99
- const data = await api.getLatestInventory();
104
+ const data = await api.getLatestInventory(body);
100
105
  console.log(data);
101
106
  } catch (error) {
102
107
  console.error(error);
@@ -109,7 +114,10 @@ example().catch(console.error);
109
114
 
110
115
  ### Parameters
111
116
 
112
- This endpoint does not need any parameter.
117
+
118
+ | Name | Type | Description | Notes |
119
+ |------------- | ------------- | ------------- | -------------|
120
+ | **scope** | `main`, `all` | Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments. | [Optional] [Defaults to `&#39;main&#39;`] [Enum: main, all] |
113
121
 
114
122
  ### Return type
115
123
 
@@ -122,13 +130,13 @@ No authorization required
122
130
  ### HTTP request headers
123
131
 
124
132
  - **Content-Type**: Not defined
125
- - **Accept**: `application/json`
133
+ - **Accept**: `application/json`, `application/zip`
126
134
 
127
135
 
128
136
  ### HTTP response details
129
137
  | Status code | Description | Response headers |
130
138
  |-------------|-------------|------------------|
131
- | **200** | Collected inventory | - |
139
+ | **200** | Collected inventory. JSON when scope is \&quot;main\&quot;; a ZIP archive when scope is \&quot;all\&quot;. | - |
132
140
  | **404** | No collections or inventory not found | - |
133
141
  | **500** | Internal server error | - |
134
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/agent-sdk",
3
- "version": "0.21.0-efc5ae0c621f",
3
+ "version": "0.22.0-99a4947ef41b",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/agent-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -26,6 +26,13 @@ export interface GetInventoryRequest {
26
26
  id: string;
27
27
  }
28
28
 
29
+ export interface GetLatestInventoryRequest {
30
+ /**
31
+ * Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
32
+ */
33
+ scope?: GetLatestInventoryScopeEnum;
34
+ }
35
+
29
36
  /**
30
37
  * InventoriesApi - interface
31
38
  *
@@ -58,24 +65,26 @@ export interface InventoriesApiInterface {
58
65
 
59
66
  /**
60
67
  * Creates request options for getLatestInventory without sending the request
68
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
61
69
  * @throws {RequiredError}
62
70
  * @memberof InventoriesApiInterface
63
71
  */
64
- getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
72
+ getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
65
73
 
66
74
  /**
67
75
  *
68
76
  * @summary Get inventory from the latest collection
77
+ * @param {'main' | 'all'} [scope] Selects which inventories to return. \&quot;main\&quot; (default) returns only the main inventory as JSON. \&quot;all\&quot; returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/&lt;groupId&gt;.json), for manual upload in disconnected environments.
69
78
  * @param {*} [options] Override http request option.
70
79
  * @throws {RequiredError}
71
80
  * @memberof InventoriesApiInterface
72
81
  */
73
- getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
82
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
74
83
 
75
84
  /**
76
85
  * Get inventory from the latest collection
77
86
  */
78
- getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
87
+ getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
79
88
 
80
89
  }
81
90
 
@@ -132,9 +141,13 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
132
141
  /**
133
142
  * Creates request options for getLatestInventory without sending the request
134
143
  */
135
- async getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts> {
144
+ async getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts> {
136
145
  const queryParameters: any = {};
137
146
 
147
+ if (requestParameters['scope'] != null) {
148
+ queryParameters['scope'] = requestParameters['scope'];
149
+ }
150
+
138
151
  const headerParameters: runtime.HTTPHeaders = {};
139
152
 
140
153
 
@@ -151,8 +164,8 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
151
164
  /**
152
165
  * Get inventory from the latest collection
153
166
  */
154
- async getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
155
- const requestOptions = await this.getLatestInventoryRequestOpts();
167
+ async getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
168
+ const requestOptions = await this.getLatestInventoryRequestOpts(requestParameters);
156
169
  const response = await this.request(requestOptions, initOverrides);
157
170
 
158
171
  return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
@@ -161,9 +174,18 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
161
174
  /**
162
175
  * Get inventory from the latest collection
163
176
  */
164
- async getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
165
- const response = await this.getLatestInventoryRaw(initOverrides);
177
+ async getLatestInventory(requestParameters: GetLatestInventoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
178
+ const response = await this.getLatestInventoryRaw(requestParameters, initOverrides);
166
179
  return await response.value();
167
180
  }
168
181
 
169
182
  }
183
+
184
+ /**
185
+ * @export
186
+ */
187
+ export const GetLatestInventoryScopeEnum = {
188
+ Main: 'main',
189
+ All: 'all',
190
+ } as const;
191
+ export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
@@ -35,6 +35,10 @@ export interface Group {
35
35
  * Filter expression (pkg/filter DSL)
36
36
  */
37
37
  filter: string;
38
+ /**
39
+ * Number of VMs matching the group filter
40
+ */
41
+ vmCount?: number;
38
42
  /**
39
43
  *
40
44
  */
@@ -69,6 +73,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
69
73
  'name': json['name'],
70
74
  'description': json['description'] == null ? undefined : json['description'],
71
75
  'filter': json['filter'],
76
+ 'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
72
77
  'createdAt': json['createdAt'] == null ? undefined : (parseDateTime(json['createdAt'])),
73
78
  'updatedAt': json['updatedAt'] == null ? undefined : (parseDateTime(json['updatedAt'])),
74
79
  };
@@ -89,6 +94,7 @@ export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: bool
89
94
  'name': value['name'],
90
95
  'description': value['description'],
91
96
  'filter': value['filter'],
97
+ 'vmCount': value['vmCount'],
92
98
  'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
93
99
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
94
100
  };