@openshift-migration-advisor/agent-sdk 0.24.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +5 -3
- package/dist/apis/CollectionsApi.d.ts +34 -4
- package/dist/apis/CollectionsApi.js +34 -0
- package/dist/apis/GroupsApi.d.ts +39 -0
- package/dist/apis/GroupsApi.js +40 -0
- package/dist/esm/apis/CollectionsApi.d.ts +34 -4
- package/dist/esm/apis/CollectionsApi.js +34 -0
- package/dist/esm/apis/GroupsApi.d.ts +39 -0
- package/dist/esm/apis/GroupsApi.js +40 -0
- package/dist/esm/models/Infra.d.ts +4 -0
- package/dist/esm/models/Infra.js +2 -0
- package/dist/esm/runtime.d.ts +22 -1
- package/dist/esm/runtime.js +61 -1
- package/dist/models/Infra.d.ts +4 -0
- package/dist/models/Infra.js +2 -0
- package/dist/runtime.d.ts +22 -1
- package/dist/runtime.js +62 -1
- package/docs/CollectionsApi.md +59 -0
- package/docs/GroupsApi.md +68 -0
- package/docs/Infra.md +2 -0
- package/package.json +1 -1
- package/src/apis/CollectionsApi.ts +61 -4
- package/src/apis/GroupsApi.ts +80 -0
- package/src/models/Infra.ts +6 -0
- package/src/runtime.ts +69 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.27.0-SNAPSHOT
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @openshift-migration-advisor/agent-sdk@0.
|
|
1
|
+
# @openshift-migration-advisor/agent-sdk@0.27.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the raw.githubusercontent.com API.
|
|
4
4
|
|
|
@@ -50,6 +50,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v2*
|
|
|
50
50
|
*ApplicationsApi* | [**listApplications**](docs/ApplicationsApi.md#listapplications) | **GET** /collections/{id}/applications | List detected applications in a collection
|
|
51
51
|
*CollectionsApi* | [**compareCollections**](docs/CollectionsApi.md#comparecollections) | **GET** /collections/compare/{aId}/{bId} | Compare two collections — returns aggregates and diffs
|
|
52
52
|
*CollectionsApi* | [**compareCollectionsDiff**](docs/CollectionsApi.md#comparecollectionsdiff) | **GET** /collections/compare/{aId}/{bId}/{dimension} | Drill down — VM IDs that differ between two collections for a given dimension
|
|
53
|
+
*CollectionsApi* | [**deleteCollections**](docs/CollectionsApi.md#deletecollections) | **DELETE** /collections | Delete all collections
|
|
53
54
|
*CollectionsApi* | [**exportCollection**](docs/CollectionsApi.md#exportcollection) | **GET** /collections/{id}/export | Export collection data as CSV ZIP archive or Excel workbook
|
|
54
55
|
*CollectionsApi* | [**listCollections**](docs/CollectionsApi.md#listcollections) | **GET** /collections | List all collections
|
|
55
56
|
*CollectorApi* | [**getCollectorStatus**](docs/CollectorApi.md#getcollectorstatus) | **GET** /collector | Get collector status
|
|
@@ -73,6 +74,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v2*
|
|
|
73
74
|
*GroupsApi* | [**deleteLatestGroup**](docs/GroupsApi.md#deletelatestgroup) | **DELETE** /groups/{groupId} | Delete group from the latest collection
|
|
74
75
|
*GroupsApi* | [**getGroup**](docs/GroupsApi.md#getgroup) | **GET** /collections/{id}/groups/{groupId} | Get group by ID with its VirtualMachines
|
|
75
76
|
*GroupsApi* | [**getLatestGroup**](docs/GroupsApi.md#getlatestgroup) | **GET** /groups/{groupId} | Get group by ID from the latest collection
|
|
77
|
+
*GroupsApi* | [**listGroupApplications**](docs/GroupsApi.md#listgroupapplications) | **GET** /groups/{groupId}/applications | List detected applications for a group
|
|
76
78
|
*GroupsApi* | [**listGroups**](docs/GroupsApi.md#listgroups) | **GET** /collections/{id}/groups | List all groups in a collection
|
|
77
79
|
*GroupsApi* | [**listLatestGroups**](docs/GroupsApi.md#listlatestgroups) | **GET** /groups | List groups from the latest collection
|
|
78
80
|
*GroupsApi* | [**updateLatestGroup**](docs/GroupsApi.md#updatelatestgroup) | **PATCH** /groups/{groupId} | Update group in the latest collection
|
|
@@ -198,8 +200,8 @@ and is automatically generated by the
|
|
|
198
200
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
199
201
|
|
|
200
202
|
- API version: `v2`
|
|
201
|
-
- Package version: `0.
|
|
202
|
-
- Generator version: `7.
|
|
203
|
+
- Package version: `0.27.0`
|
|
204
|
+
- Generator version: `7.27.0-SNAPSHOT`
|
|
203
205
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
204
206
|
|
|
205
207
|
The generated npm module supports the following:
|
|
@@ -116,6 +116,24 @@ export interface CollectionsApiInterface {
|
|
|
116
116
|
* Drill down — VM IDs that differ between two collections for a given dimension
|
|
117
117
|
*/
|
|
118
118
|
compareCollectionsDiff(requestParameters: CompareCollectionsDiffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionComparisonDiff>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for deleteCollections without sending the request
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
* @memberof CollectionsApiInterface
|
|
123
|
+
*/
|
|
124
|
+
deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @summary Delete all collections
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof CollectionsApiInterface
|
|
131
|
+
*/
|
|
132
|
+
deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
133
|
+
/**
|
|
134
|
+
* Delete all collections
|
|
135
|
+
*/
|
|
136
|
+
deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
119
137
|
/**
|
|
120
138
|
* Creates request options for exportCollection without sending the request
|
|
121
139
|
* @param {string} id Collection ID
|
|
@@ -135,11 +153,11 @@ export interface CollectionsApiInterface {
|
|
|
135
153
|
* @throws {RequiredError}
|
|
136
154
|
* @memberof CollectionsApiInterface
|
|
137
155
|
*/
|
|
138
|
-
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
156
|
+
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
|
|
139
157
|
/**
|
|
140
158
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
141
159
|
*/
|
|
142
|
-
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
160
|
+
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
|
|
143
161
|
/**
|
|
144
162
|
* Creates request options for listCollections without sending the request
|
|
145
163
|
* @throws {RequiredError}
|
|
@@ -187,6 +205,18 @@ export declare class CollectionsApi extends runtime.BaseAPI implements Collectio
|
|
|
187
205
|
* Drill down — VM IDs that differ between two collections for a given dimension
|
|
188
206
|
*/
|
|
189
207
|
compareCollectionsDiff(requestParameters: CompareCollectionsDiffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionComparisonDiff>;
|
|
208
|
+
/**
|
|
209
|
+
* Creates request options for deleteCollections without sending the request
|
|
210
|
+
*/
|
|
211
|
+
deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
212
|
+
/**
|
|
213
|
+
* Delete all collections
|
|
214
|
+
*/
|
|
215
|
+
deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
216
|
+
/**
|
|
217
|
+
* Delete all collections
|
|
218
|
+
*/
|
|
219
|
+
deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
190
220
|
/**
|
|
191
221
|
* Creates request options for exportCollection without sending the request
|
|
192
222
|
*/
|
|
@@ -194,11 +224,11 @@ export declare class CollectionsApi extends runtime.BaseAPI implements Collectio
|
|
|
194
224
|
/**
|
|
195
225
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
196
226
|
*/
|
|
197
|
-
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
227
|
+
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
|
|
198
228
|
/**
|
|
199
229
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
200
230
|
*/
|
|
201
|
-
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
231
|
+
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
|
|
202
232
|
/**
|
|
203
233
|
* Creates request options for listCollections without sending the request
|
|
204
234
|
*/
|
|
@@ -127,6 +127,40 @@ class CollectionsApi extends runtime.BaseAPI {
|
|
|
127
127
|
return yield response.value();
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for deleteCollections without sending the request
|
|
132
|
+
*/
|
|
133
|
+
deleteCollectionsRequestOpts() {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const queryParameters = {};
|
|
136
|
+
const headerParameters = {};
|
|
137
|
+
let urlPath = `/collections`;
|
|
138
|
+
return {
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'DELETE',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Delete all collections
|
|
148
|
+
*/
|
|
149
|
+
deleteCollectionsRaw(initOverrides) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const requestOptions = yield this.deleteCollectionsRequestOpts();
|
|
152
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
153
|
+
return new runtime.VoidApiResponse(response);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Delete all collections
|
|
158
|
+
*/
|
|
159
|
+
deleteCollections(initOverrides) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
yield this.deleteCollectionsRaw(initOverrides);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
130
164
|
/**
|
|
131
165
|
* Creates request options for exportCollection without sending the request
|
|
132
166
|
*/
|
package/dist/apis/GroupsApi.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
+
import { type ApplicationListResponse } from '../models/ApplicationListResponse.js';
|
|
13
14
|
import { type CreateGroupRequest } from '../models/CreateGroupRequest.js';
|
|
14
15
|
import { type Group } from '../models/Group.js';
|
|
15
16
|
import { type GroupListResponse } from '../models/GroupListResponse.js';
|
|
@@ -67,6 +68,12 @@ export interface GetLatestGroupRequest {
|
|
|
67
68
|
*/
|
|
68
69
|
pageSize?: number;
|
|
69
70
|
}
|
|
71
|
+
export interface ListGroupApplicationsRequest {
|
|
72
|
+
/**
|
|
73
|
+
* Group ID
|
|
74
|
+
*/
|
|
75
|
+
groupId: string;
|
|
76
|
+
}
|
|
70
77
|
export interface ListGroupsRequest {
|
|
71
78
|
/**
|
|
72
79
|
* Collection ID
|
|
@@ -210,6 +217,26 @@ export interface GroupsApiInterface {
|
|
|
210
217
|
* Get group by ID from the latest collection
|
|
211
218
|
*/
|
|
212
219
|
getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
|
|
220
|
+
/**
|
|
221
|
+
* Creates request options for listGroupApplications without sending the request
|
|
222
|
+
* @param {string} groupId Group ID
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
* @memberof GroupsApiInterface
|
|
225
|
+
*/
|
|
226
|
+
listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts>;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @summary List detected applications for a group
|
|
230
|
+
* @param {string} groupId Group ID
|
|
231
|
+
* @param {*} [options] Override http request option.
|
|
232
|
+
* @throws {RequiredError}
|
|
233
|
+
* @memberof GroupsApiInterface
|
|
234
|
+
*/
|
|
235
|
+
listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
|
|
236
|
+
/**
|
|
237
|
+
* List detected applications for a group
|
|
238
|
+
*/
|
|
239
|
+
listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
|
|
213
240
|
/**
|
|
214
241
|
* Creates request options for listGroups without sending the request
|
|
215
242
|
* @param {string} id Collection ID
|
|
@@ -335,6 +362,18 @@ export declare class GroupsApi extends runtime.BaseAPI implements GroupsApiInter
|
|
|
335
362
|
* Get group by ID from the latest collection
|
|
336
363
|
*/
|
|
337
364
|
getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
|
|
365
|
+
/**
|
|
366
|
+
* Creates request options for listGroupApplications without sending the request
|
|
367
|
+
*/
|
|
368
|
+
listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts>;
|
|
369
|
+
/**
|
|
370
|
+
* List detected applications for a group
|
|
371
|
+
*/
|
|
372
|
+
listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
|
|
373
|
+
/**
|
|
374
|
+
* List detected applications for a group
|
|
375
|
+
*/
|
|
376
|
+
listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
|
|
338
377
|
/**
|
|
339
378
|
* Creates request options for listGroups without sending the request
|
|
340
379
|
*/
|
package/dist/apis/GroupsApi.js
CHANGED
|
@@ -24,6 +24,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.GroupsApi = void 0;
|
|
26
26
|
const runtime = require("../runtime.js");
|
|
27
|
+
const ApplicationListResponse_js_1 = require("../models/ApplicationListResponse.js");
|
|
27
28
|
const CreateGroupRequest_js_1 = require("../models/CreateGroupRequest.js");
|
|
28
29
|
const Group_js_1 = require("../models/Group.js");
|
|
29
30
|
const GroupListResponse_js_1 = require("../models/GroupListResponse.js");
|
|
@@ -211,6 +212,45 @@ class GroupsApi extends runtime.BaseAPI {
|
|
|
211
212
|
return yield response.value();
|
|
212
213
|
});
|
|
213
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Creates request options for listGroupApplications without sending the request
|
|
217
|
+
*/
|
|
218
|
+
listGroupApplicationsRequestOpts(requestParameters) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
if (requestParameters['groupId'] == null) {
|
|
221
|
+
throw new runtime.RequiredError('groupId', 'Required parameter "groupId" was null or undefined when calling listGroupApplications().');
|
|
222
|
+
}
|
|
223
|
+
const queryParameters = {};
|
|
224
|
+
const headerParameters = {};
|
|
225
|
+
let urlPath = `/groups/{groupId}/applications`;
|
|
226
|
+
urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId'])));
|
|
227
|
+
return {
|
|
228
|
+
path: urlPath,
|
|
229
|
+
method: 'GET',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* List detected applications for a group
|
|
237
|
+
*/
|
|
238
|
+
listGroupApplicationsRaw(requestParameters, initOverrides) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
const requestOptions = yield this.listGroupApplicationsRequestOpts(requestParameters);
|
|
241
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
242
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ApplicationListResponse_js_1.ApplicationListResponseFromJSON)(jsonValue));
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* List detected applications for a group
|
|
247
|
+
*/
|
|
248
|
+
listGroupApplications(requestParameters, initOverrides) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
const response = yield this.listGroupApplicationsRaw(requestParameters, initOverrides);
|
|
251
|
+
return yield response.value();
|
|
252
|
+
});
|
|
253
|
+
}
|
|
214
254
|
/**
|
|
215
255
|
* Creates request options for listGroups without sending the request
|
|
216
256
|
*/
|
|
@@ -116,6 +116,24 @@ export interface CollectionsApiInterface {
|
|
|
116
116
|
* Drill down — VM IDs that differ between two collections for a given dimension
|
|
117
117
|
*/
|
|
118
118
|
compareCollectionsDiff(requestParameters: CompareCollectionsDiffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionComparisonDiff>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for deleteCollections without sending the request
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
* @memberof CollectionsApiInterface
|
|
123
|
+
*/
|
|
124
|
+
deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @summary Delete all collections
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof CollectionsApiInterface
|
|
131
|
+
*/
|
|
132
|
+
deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
133
|
+
/**
|
|
134
|
+
* Delete all collections
|
|
135
|
+
*/
|
|
136
|
+
deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
119
137
|
/**
|
|
120
138
|
* Creates request options for exportCollection without sending the request
|
|
121
139
|
* @param {string} id Collection ID
|
|
@@ -135,11 +153,11 @@ export interface CollectionsApiInterface {
|
|
|
135
153
|
* @throws {RequiredError}
|
|
136
154
|
* @memberof CollectionsApiInterface
|
|
137
155
|
*/
|
|
138
|
-
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
156
|
+
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
|
|
139
157
|
/**
|
|
140
158
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
141
159
|
*/
|
|
142
|
-
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
160
|
+
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
|
|
143
161
|
/**
|
|
144
162
|
* Creates request options for listCollections without sending the request
|
|
145
163
|
* @throws {RequiredError}
|
|
@@ -187,6 +205,18 @@ export declare class CollectionsApi extends runtime.BaseAPI implements Collectio
|
|
|
187
205
|
* Drill down — VM IDs that differ between two collections for a given dimension
|
|
188
206
|
*/
|
|
189
207
|
compareCollectionsDiff(requestParameters: CompareCollectionsDiffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionComparisonDiff>;
|
|
208
|
+
/**
|
|
209
|
+
* Creates request options for deleteCollections without sending the request
|
|
210
|
+
*/
|
|
211
|
+
deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
212
|
+
/**
|
|
213
|
+
* Delete all collections
|
|
214
|
+
*/
|
|
215
|
+
deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
216
|
+
/**
|
|
217
|
+
* Delete all collections
|
|
218
|
+
*/
|
|
219
|
+
deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
190
220
|
/**
|
|
191
221
|
* Creates request options for exportCollection without sending the request
|
|
192
222
|
*/
|
|
@@ -194,11 +224,11 @@ export declare class CollectionsApi extends runtime.BaseAPI implements Collectio
|
|
|
194
224
|
/**
|
|
195
225
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
196
226
|
*/
|
|
197
|
-
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
227
|
+
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
|
|
198
228
|
/**
|
|
199
229
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
200
230
|
*/
|
|
201
|
-
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
231
|
+
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
|
|
202
232
|
/**
|
|
203
233
|
* Creates request options for listCollections without sending the request
|
|
204
234
|
*/
|
|
@@ -124,6 +124,40 @@ export class CollectionsApi extends runtime.BaseAPI {
|
|
|
124
124
|
return yield response.value();
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Creates request options for deleteCollections without sending the request
|
|
129
|
+
*/
|
|
130
|
+
deleteCollectionsRequestOpts() {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const queryParameters = {};
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
let urlPath = `/collections`;
|
|
135
|
+
return {
|
|
136
|
+
path: urlPath,
|
|
137
|
+
method: 'DELETE',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Delete all collections
|
|
145
|
+
*/
|
|
146
|
+
deleteCollectionsRaw(initOverrides) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const requestOptions = yield this.deleteCollectionsRequestOpts();
|
|
149
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
150
|
+
return new runtime.VoidApiResponse(response);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Delete all collections
|
|
155
|
+
*/
|
|
156
|
+
deleteCollections(initOverrides) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
yield this.deleteCollectionsRaw(initOverrides);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
127
161
|
/**
|
|
128
162
|
* Creates request options for exportCollection without sending the request
|
|
129
163
|
*/
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
+
import { type ApplicationListResponse } from '../models/ApplicationListResponse.js';
|
|
13
14
|
import { type CreateGroupRequest } from '../models/CreateGroupRequest.js';
|
|
14
15
|
import { type Group } from '../models/Group.js';
|
|
15
16
|
import { type GroupListResponse } from '../models/GroupListResponse.js';
|
|
@@ -67,6 +68,12 @@ export interface GetLatestGroupRequest {
|
|
|
67
68
|
*/
|
|
68
69
|
pageSize?: number;
|
|
69
70
|
}
|
|
71
|
+
export interface ListGroupApplicationsRequest {
|
|
72
|
+
/**
|
|
73
|
+
* Group ID
|
|
74
|
+
*/
|
|
75
|
+
groupId: string;
|
|
76
|
+
}
|
|
70
77
|
export interface ListGroupsRequest {
|
|
71
78
|
/**
|
|
72
79
|
* Collection ID
|
|
@@ -210,6 +217,26 @@ export interface GroupsApiInterface {
|
|
|
210
217
|
* Get group by ID from the latest collection
|
|
211
218
|
*/
|
|
212
219
|
getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
|
|
220
|
+
/**
|
|
221
|
+
* Creates request options for listGroupApplications without sending the request
|
|
222
|
+
* @param {string} groupId Group ID
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
* @memberof GroupsApiInterface
|
|
225
|
+
*/
|
|
226
|
+
listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts>;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @summary List detected applications for a group
|
|
230
|
+
* @param {string} groupId Group ID
|
|
231
|
+
* @param {*} [options] Override http request option.
|
|
232
|
+
* @throws {RequiredError}
|
|
233
|
+
* @memberof GroupsApiInterface
|
|
234
|
+
*/
|
|
235
|
+
listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
|
|
236
|
+
/**
|
|
237
|
+
* List detected applications for a group
|
|
238
|
+
*/
|
|
239
|
+
listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
|
|
213
240
|
/**
|
|
214
241
|
* Creates request options for listGroups without sending the request
|
|
215
242
|
* @param {string} id Collection ID
|
|
@@ -335,6 +362,18 @@ export declare class GroupsApi extends runtime.BaseAPI implements GroupsApiInter
|
|
|
335
362
|
* Get group by ID from the latest collection
|
|
336
363
|
*/
|
|
337
364
|
getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
|
|
365
|
+
/**
|
|
366
|
+
* Creates request options for listGroupApplications without sending the request
|
|
367
|
+
*/
|
|
368
|
+
listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts>;
|
|
369
|
+
/**
|
|
370
|
+
* List detected applications for a group
|
|
371
|
+
*/
|
|
372
|
+
listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
|
|
373
|
+
/**
|
|
374
|
+
* List detected applications for a group
|
|
375
|
+
*/
|
|
376
|
+
listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
|
|
338
377
|
/**
|
|
339
378
|
* Creates request options for listGroups without sending the request
|
|
340
379
|
*/
|
|
@@ -21,6 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime.js';
|
|
24
|
+
import { ApplicationListResponseFromJSON, } from '../models/ApplicationListResponse.js';
|
|
24
25
|
import { CreateGroupRequestToJSON, } from '../models/CreateGroupRequest.js';
|
|
25
26
|
import { GroupFromJSON, } from '../models/Group.js';
|
|
26
27
|
import { GroupListResponseFromJSON, } from '../models/GroupListResponse.js';
|
|
@@ -208,6 +209,45 @@ export class GroupsApi extends runtime.BaseAPI {
|
|
|
208
209
|
return yield response.value();
|
|
209
210
|
});
|
|
210
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Creates request options for listGroupApplications without sending the request
|
|
214
|
+
*/
|
|
215
|
+
listGroupApplicationsRequestOpts(requestParameters) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
if (requestParameters['groupId'] == null) {
|
|
218
|
+
throw new runtime.RequiredError('groupId', 'Required parameter "groupId" was null or undefined when calling listGroupApplications().');
|
|
219
|
+
}
|
|
220
|
+
const queryParameters = {};
|
|
221
|
+
const headerParameters = {};
|
|
222
|
+
let urlPath = `/groups/{groupId}/applications`;
|
|
223
|
+
urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId'])));
|
|
224
|
+
return {
|
|
225
|
+
path: urlPath,
|
|
226
|
+
method: 'GET',
|
|
227
|
+
headers: headerParameters,
|
|
228
|
+
query: queryParameters,
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* List detected applications for a group
|
|
234
|
+
*/
|
|
235
|
+
listGroupApplicationsRaw(requestParameters, initOverrides) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const requestOptions = yield this.listGroupApplicationsRequestOpts(requestParameters);
|
|
238
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
239
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationListResponseFromJSON(jsonValue));
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* List detected applications for a group
|
|
244
|
+
*/
|
|
245
|
+
listGroupApplications(requestParameters, initOverrides) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
const response = yield this.listGroupApplicationsRaw(requestParameters, initOverrides);
|
|
248
|
+
return yield response.value();
|
|
249
|
+
});
|
|
250
|
+
}
|
|
211
251
|
/**
|
|
212
252
|
* Creates request options for listGroups without sending the request
|
|
213
253
|
*/
|
package/dist/esm/models/Infra.js
CHANGED
|
@@ -37,6 +37,7 @@ export function InfraFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
39
|
'totalHosts': json['totalHosts'],
|
|
40
|
+
'standaloneHostsDetected': json['standaloneHostsDetected'] == null ? undefined : json['standaloneHostsDetected'],
|
|
40
41
|
'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
|
|
41
42
|
'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
|
|
42
43
|
'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
|
|
@@ -60,6 +61,7 @@ export function InfraToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
61
|
}
|
|
61
62
|
return {
|
|
62
63
|
'totalHosts': value['totalHosts'],
|
|
64
|
+
'standaloneHostsDetected': value['standaloneHostsDetected'],
|
|
63
65
|
'totalDatacenters': value['totalDatacenters'],
|
|
64
66
|
'totalClusters': value['totalClusters'],
|
|
65
67
|
'clustersPerDatacenter': value['clustersPerDatacenter'],
|
package/dist/esm/runtime.d.ts
CHANGED
|
@@ -184,11 +184,32 @@ export declare class VoidApiResponse {
|
|
|
184
184
|
constructor(raw: Response);
|
|
185
185
|
value(): Promise<void>;
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
|
|
189
|
+
* wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
|
|
190
|
+
* `typescript` generator's browser HttpFile.
|
|
191
|
+
*/
|
|
192
|
+
export type HttpFile = Blob & {
|
|
193
|
+
readonly name: string;
|
|
194
|
+
};
|
|
187
195
|
export declare class BlobApiResponse {
|
|
188
196
|
raw: Response;
|
|
189
197
|
constructor(raw: Response);
|
|
190
|
-
|
|
198
|
+
/**
|
|
199
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
200
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
201
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
202
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
203
|
+
* would stringify instead of wrapping.
|
|
204
|
+
*/
|
|
205
|
+
value(): Promise<HttpFile>;
|
|
191
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
209
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
210
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
211
|
+
*/
|
|
212
|
+
export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
|
|
192
213
|
export declare class TextApiResponse {
|
|
193
214
|
raw: Response;
|
|
194
215
|
constructor(raw: Response);
|
package/dist/esm/runtime.js
CHANGED
|
@@ -380,13 +380,73 @@ export class BlobApiResponse {
|
|
|
380
380
|
constructor(raw) {
|
|
381
381
|
this.raw = raw;
|
|
382
382
|
}
|
|
383
|
+
/**
|
|
384
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
385
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
386
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
387
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
388
|
+
* would stringify instead of wrapping.
|
|
389
|
+
*/
|
|
383
390
|
value() {
|
|
384
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
385
|
-
|
|
392
|
+
var _a;
|
|
393
|
+
const blob = yield this.raw.blob();
|
|
394
|
+
const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
|
|
395
|
+
if (typeof File !== 'undefined' && blob instanceof Blob) {
|
|
396
|
+
try {
|
|
397
|
+
return new File([blob], name, { type: blob.type });
|
|
398
|
+
}
|
|
399
|
+
catch (_b) {
|
|
400
|
+
// File cannot be constructed: name the Blob itself
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return Object.assign(blob, { name });
|
|
386
404
|
});
|
|
387
405
|
}
|
|
388
406
|
;
|
|
389
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
410
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
411
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
412
|
+
*/
|
|
413
|
+
export function parseContentDispositionFilename(headers) {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
|
|
416
|
+
return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
|
|
417
|
+
}
|
|
418
|
+
/** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
|
|
419
|
+
function decodeExtValue(value) {
|
|
420
|
+
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
421
|
+
try {
|
|
422
|
+
return match ? decodeURIComponent(match[1]) : undefined;
|
|
423
|
+
}
|
|
424
|
+
catch (_a) {
|
|
425
|
+
return undefined;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
|
|
430
|
+
* taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
|
|
431
|
+
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
432
|
+
*/
|
|
433
|
+
function parseHeaderParameters(value) {
|
|
434
|
+
const params = new Map();
|
|
435
|
+
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
436
|
+
let match;
|
|
437
|
+
while ((match = parameter.exec(value)) !== null) {
|
|
438
|
+
const name = match[1].toLowerCase();
|
|
439
|
+
if (!params.has(name)) {
|
|
440
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return params;
|
|
444
|
+
}
|
|
445
|
+
/** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
|
|
446
|
+
function basename(name) {
|
|
447
|
+
const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
|
|
448
|
+
return !base || base === '.' || base === '..' ? undefined : base;
|
|
449
|
+
}
|
|
390
450
|
export class TextApiResponse {
|
|
391
451
|
constructor(raw) {
|
|
392
452
|
this.raw = raw;
|
package/dist/models/Infra.d.ts
CHANGED
package/dist/models/Infra.js
CHANGED
|
@@ -44,6 +44,7 @@ function InfraFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
'totalHosts': json['totalHosts'],
|
|
47
|
+
'standaloneHostsDetected': json['standaloneHostsDetected'] == null ? undefined : json['standaloneHostsDetected'],
|
|
47
48
|
'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
|
|
48
49
|
'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
|
|
49
50
|
'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
|
|
@@ -67,6 +68,7 @@ function InfraToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
68
|
}
|
|
68
69
|
return {
|
|
69
70
|
'totalHosts': value['totalHosts'],
|
|
71
|
+
'standaloneHostsDetected': value['standaloneHostsDetected'],
|
|
70
72
|
'totalDatacenters': value['totalDatacenters'],
|
|
71
73
|
'totalClusters': value['totalClusters'],
|
|
72
74
|
'clustersPerDatacenter': value['clustersPerDatacenter'],
|
package/dist/runtime.d.ts
CHANGED
|
@@ -184,11 +184,32 @@ export declare class VoidApiResponse {
|
|
|
184
184
|
constructor(raw: Response);
|
|
185
185
|
value(): Promise<void>;
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
|
|
189
|
+
* wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
|
|
190
|
+
* `typescript` generator's browser HttpFile.
|
|
191
|
+
*/
|
|
192
|
+
export type HttpFile = Blob & {
|
|
193
|
+
readonly name: string;
|
|
194
|
+
};
|
|
187
195
|
export declare class BlobApiResponse {
|
|
188
196
|
raw: Response;
|
|
189
197
|
constructor(raw: Response);
|
|
190
|
-
|
|
198
|
+
/**
|
|
199
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
200
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
201
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
202
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
203
|
+
* would stringify instead of wrapping.
|
|
204
|
+
*/
|
|
205
|
+
value(): Promise<HttpFile>;
|
|
191
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
209
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
210
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
211
|
+
*/
|
|
212
|
+
export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
|
|
192
213
|
export declare class TextApiResponse {
|
|
193
214
|
raw: Response;
|
|
194
215
|
constructor(raw: Response);
|
package/dist/runtime.js
CHANGED
|
@@ -32,6 +32,7 @@ exports.parseDateTime = parseDateTime;
|
|
|
32
32
|
exports.mapValues = mapValues;
|
|
33
33
|
exports.anyToJSON = anyToJSON;
|
|
34
34
|
exports.canConsumeForm = canConsumeForm;
|
|
35
|
+
exports.parseContentDispositionFilename = parseContentDispositionFilename;
|
|
35
36
|
exports.BASE_PATH = "https://raw.githubusercontent.com/api/v2".replace(/\/+$/, "");
|
|
36
37
|
class Configuration {
|
|
37
38
|
constructor(configuration = {}) {
|
|
@@ -399,14 +400,74 @@ class BlobApiResponse {
|
|
|
399
400
|
constructor(raw) {
|
|
400
401
|
this.raw = raw;
|
|
401
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
405
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
406
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
407
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
408
|
+
* would stringify instead of wrapping.
|
|
409
|
+
*/
|
|
402
410
|
value() {
|
|
403
411
|
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
-
|
|
412
|
+
var _a;
|
|
413
|
+
const blob = yield this.raw.blob();
|
|
414
|
+
const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
|
|
415
|
+
if (typeof File !== 'undefined' && blob instanceof Blob) {
|
|
416
|
+
try {
|
|
417
|
+
return new File([blob], name, { type: blob.type });
|
|
418
|
+
}
|
|
419
|
+
catch (_b) {
|
|
420
|
+
// File cannot be constructed: name the Blob itself
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return Object.assign(blob, { name });
|
|
405
424
|
});
|
|
406
425
|
}
|
|
407
426
|
;
|
|
408
427
|
}
|
|
409
428
|
exports.BlobApiResponse = BlobApiResponse;
|
|
429
|
+
/**
|
|
430
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
431
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
432
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
433
|
+
*/
|
|
434
|
+
function parseContentDispositionFilename(headers) {
|
|
435
|
+
var _a, _b;
|
|
436
|
+
const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
|
|
437
|
+
return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
|
|
438
|
+
}
|
|
439
|
+
/** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
|
|
440
|
+
function decodeExtValue(value) {
|
|
441
|
+
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
442
|
+
try {
|
|
443
|
+
return match ? decodeURIComponent(match[1]) : undefined;
|
|
444
|
+
}
|
|
445
|
+
catch (_a) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
|
|
451
|
+
* taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
|
|
452
|
+
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
453
|
+
*/
|
|
454
|
+
function parseHeaderParameters(value) {
|
|
455
|
+
const params = new Map();
|
|
456
|
+
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
457
|
+
let match;
|
|
458
|
+
while ((match = parameter.exec(value)) !== null) {
|
|
459
|
+
const name = match[1].toLowerCase();
|
|
460
|
+
if (!params.has(name)) {
|
|
461
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return params;
|
|
465
|
+
}
|
|
466
|
+
/** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
|
|
467
|
+
function basename(name) {
|
|
468
|
+
const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
|
|
469
|
+
return !base || base === '.' || base === '..' ? undefined : base;
|
|
470
|
+
}
|
|
410
471
|
class TextApiResponse {
|
|
411
472
|
constructor(raw) {
|
|
412
473
|
this.raw = raw;
|
package/docs/CollectionsApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v2*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**compareCollections**](CollectionsApi.md#comparecollections) | **GET** /collections/compare/{aId}/{bId} | Compare two collections — returns aggregates and diffs |
|
|
8
8
|
| [**compareCollectionsDiff**](CollectionsApi.md#comparecollectionsdiff) | **GET** /collections/compare/{aId}/{bId}/{dimension} | Drill down — VM IDs that differ between two collections for a given dimension |
|
|
9
|
+
| [**deleteCollections**](CollectionsApi.md#deletecollections) | **DELETE** /collections | Delete all collections |
|
|
9
10
|
| [**exportCollection**](CollectionsApi.md#exportcollection) | **GET** /collections/{id}/export | Export collection data as CSV ZIP archive or Excel workbook |
|
|
10
11
|
| [**listCollections**](CollectionsApi.md#listcollections) | **GET** /collections | List all collections |
|
|
11
12
|
|
|
@@ -161,6 +162,64 @@ No authorization required
|
|
|
161
162
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
162
163
|
|
|
163
164
|
|
|
165
|
+
## deleteCollections
|
|
166
|
+
|
|
167
|
+
> deleteCollections()
|
|
168
|
+
|
|
169
|
+
Delete all collections
|
|
170
|
+
|
|
171
|
+
### Example
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
import {
|
|
175
|
+
Configuration,
|
|
176
|
+
CollectionsApi,
|
|
177
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
178
|
+
import type { DeleteCollectionsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
179
|
+
|
|
180
|
+
async function example() {
|
|
181
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
182
|
+
const api = new CollectionsApi();
|
|
183
|
+
|
|
184
|
+
try {
|
|
185
|
+
const data = await api.deleteCollections();
|
|
186
|
+
console.log(data);
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.error(error);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Run the test
|
|
193
|
+
example().catch(console.error);
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Parameters
|
|
197
|
+
|
|
198
|
+
This endpoint does not need any parameter.
|
|
199
|
+
|
|
200
|
+
### Return type
|
|
201
|
+
|
|
202
|
+
`void` (Empty response body)
|
|
203
|
+
|
|
204
|
+
### Authorization
|
|
205
|
+
|
|
206
|
+
No authorization required
|
|
207
|
+
|
|
208
|
+
### HTTP request headers
|
|
209
|
+
|
|
210
|
+
- **Content-Type**: Not defined
|
|
211
|
+
- **Accept**: Not defined
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
### HTTP response details
|
|
215
|
+
| Status code | Description | Response headers |
|
|
216
|
+
|-------------|-------------|------------------|
|
|
217
|
+
| **204** | Delete all collections | - |
|
|
218
|
+
| **500** | Internal server error | - |
|
|
219
|
+
|
|
220
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
221
|
+
|
|
222
|
+
|
|
164
223
|
## exportCollection
|
|
165
224
|
|
|
166
225
|
> Blob exportCollection(id, scope, format)
|
package/docs/GroupsApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v2*
|
|
|
8
8
|
| [**deleteLatestGroup**](GroupsApi.md#deletelatestgroup) | **DELETE** /groups/{groupId} | Delete group from the latest collection |
|
|
9
9
|
| [**getGroup**](GroupsApi.md#getgroup) | **GET** /collections/{id}/groups/{groupId} | Get group by ID with its VirtualMachines |
|
|
10
10
|
| [**getLatestGroup**](GroupsApi.md#getlatestgroup) | **GET** /groups/{groupId} | Get group by ID from the latest collection |
|
|
11
|
+
| [**listGroupApplications**](GroupsApi.md#listgroupapplications) | **GET** /groups/{groupId}/applications | List detected applications for a group |
|
|
11
12
|
| [**listGroups**](GroupsApi.md#listgroups) | **GET** /collections/{id}/groups | List all groups in a collection |
|
|
12
13
|
| [**listLatestGroups**](GroupsApi.md#listlatestgroups) | **GET** /groups | List groups from the latest collection |
|
|
13
14
|
| [**updateLatestGroup**](GroupsApi.md#updatelatestgroup) | **PATCH** /groups/{groupId} | Update group in the latest collection |
|
|
@@ -304,6 +305,73 @@ No authorization required
|
|
|
304
305
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
305
306
|
|
|
306
307
|
|
|
308
|
+
## listGroupApplications
|
|
309
|
+
|
|
310
|
+
> ApplicationListResponse listGroupApplications(groupId)
|
|
311
|
+
|
|
312
|
+
List detected applications for a group
|
|
313
|
+
|
|
314
|
+
### Example
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
import {
|
|
318
|
+
Configuration,
|
|
319
|
+
GroupsApi,
|
|
320
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
321
|
+
import type { ListGroupApplicationsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
322
|
+
|
|
323
|
+
async function example() {
|
|
324
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
325
|
+
const api = new GroupsApi();
|
|
326
|
+
|
|
327
|
+
const body = {
|
|
328
|
+
// string | Group ID
|
|
329
|
+
groupId: groupId_example,
|
|
330
|
+
} satisfies ListGroupApplicationsRequest;
|
|
331
|
+
|
|
332
|
+
try {
|
|
333
|
+
const data = await api.listGroupApplications(body);
|
|
334
|
+
console.log(data);
|
|
335
|
+
} catch (error) {
|
|
336
|
+
console.error(error);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Run the test
|
|
341
|
+
example().catch(console.error);
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Parameters
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
| Name | Type | Description | Notes |
|
|
348
|
+
|------------- | ------------- | ------------- | -------------|
|
|
349
|
+
| **groupId** | `string` | Group ID | [Defaults to `undefined`] |
|
|
350
|
+
|
|
351
|
+
### Return type
|
|
352
|
+
|
|
353
|
+
[**ApplicationListResponse**](ApplicationListResponse.md)
|
|
354
|
+
|
|
355
|
+
### Authorization
|
|
356
|
+
|
|
357
|
+
No authorization required
|
|
358
|
+
|
|
359
|
+
### HTTP request headers
|
|
360
|
+
|
|
361
|
+
- **Content-Type**: Not defined
|
|
362
|
+
- **Accept**: `application/json`
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
### HTTP response details
|
|
366
|
+
| Status code | Description | Response headers |
|
|
367
|
+
|-------------|-------------|------------------|
|
|
368
|
+
| **200** | List of detected applications | - |
|
|
369
|
+
| **404** | No collections or group not found | - |
|
|
370
|
+
| **500** | Internal server error | - |
|
|
371
|
+
|
|
372
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
373
|
+
|
|
374
|
+
|
|
307
375
|
## listGroups
|
|
308
376
|
|
|
309
377
|
> GroupListResponse listGroups(id, byName, page, pageSize)
|
package/docs/Infra.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`totalHosts` | number
|
|
10
|
+
`standaloneHostsDetected` | boolean
|
|
10
11
|
`totalDatacenters` | number
|
|
11
12
|
`totalClusters` | number
|
|
12
13
|
`clustersPerDatacenter` | Array<number>
|
|
@@ -28,6 +29,7 @@ import type { Infra } from '@openshift-migration-advisor/agent-sdk'
|
|
|
28
29
|
// TODO: Update the object below with actual values
|
|
29
30
|
const example = {
|
|
30
31
|
"totalHosts": null,
|
|
32
|
+
"standaloneHostsDetected": null,
|
|
31
33
|
"totalDatacenters": null,
|
|
32
34
|
"totalClusters": null,
|
|
33
35
|
"clustersPerDatacenter": null,
|
package/package.json
CHANGED
|
@@ -141,6 +141,27 @@ export interface CollectionsApiInterface {
|
|
|
141
141
|
*/
|
|
142
142
|
compareCollectionsDiff(requestParameters: CompareCollectionsDiffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionComparisonDiff>;
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for deleteCollections without sending the request
|
|
146
|
+
* @throws {RequiredError}
|
|
147
|
+
* @memberof CollectionsApiInterface
|
|
148
|
+
*/
|
|
149
|
+
deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @summary Delete all collections
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
* @memberof CollectionsApiInterface
|
|
157
|
+
*/
|
|
158
|
+
deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Delete all collections
|
|
162
|
+
*/
|
|
163
|
+
deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
164
|
+
|
|
144
165
|
/**
|
|
145
166
|
* Creates request options for exportCollection without sending the request
|
|
146
167
|
* @param {string} id Collection ID
|
|
@@ -161,12 +182,12 @@ export interface CollectionsApiInterface {
|
|
|
161
182
|
* @throws {RequiredError}
|
|
162
183
|
* @memberof CollectionsApiInterface
|
|
163
184
|
*/
|
|
164
|
-
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
185
|
+
exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
|
|
165
186
|
|
|
166
187
|
/**
|
|
167
188
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
168
189
|
*/
|
|
169
|
-
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
190
|
+
exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
|
|
170
191
|
|
|
171
192
|
/**
|
|
172
193
|
* Creates request options for listCollections without sending the request
|
|
@@ -318,6 +339,42 @@ export class CollectionsApi extends runtime.BaseAPI implements CollectionsApiInt
|
|
|
318
339
|
return await response.value();
|
|
319
340
|
}
|
|
320
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Creates request options for deleteCollections without sending the request
|
|
344
|
+
*/
|
|
345
|
+
async deleteCollectionsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
346
|
+
const queryParameters: any = {};
|
|
347
|
+
|
|
348
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
let urlPath = `/collections`;
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
path: urlPath,
|
|
355
|
+
method: 'DELETE',
|
|
356
|
+
headers: headerParameters,
|
|
357
|
+
query: queryParameters,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Delete all collections
|
|
363
|
+
*/
|
|
364
|
+
async deleteCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
365
|
+
const requestOptions = await this.deleteCollectionsRequestOpts();
|
|
366
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
367
|
+
|
|
368
|
+
return new runtime.VoidApiResponse(response);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Delete all collections
|
|
373
|
+
*/
|
|
374
|
+
async deleteCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
375
|
+
await this.deleteCollectionsRaw(initOverrides);
|
|
376
|
+
}
|
|
377
|
+
|
|
321
378
|
/**
|
|
322
379
|
* Creates request options for exportCollection without sending the request
|
|
323
380
|
*/
|
|
@@ -356,7 +413,7 @@ export class CollectionsApi extends runtime.BaseAPI implements CollectionsApiInt
|
|
|
356
413
|
/**
|
|
357
414
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
358
415
|
*/
|
|
359
|
-
async exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
416
|
+
async exportCollectionRaw(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>> {
|
|
360
417
|
const requestOptions = await this.exportCollectionRequestOpts(requestParameters);
|
|
361
418
|
const response = await this.request(requestOptions, initOverrides);
|
|
362
419
|
|
|
@@ -366,7 +423,7 @@ export class CollectionsApi extends runtime.BaseAPI implements CollectionsApiInt
|
|
|
366
423
|
/**
|
|
367
424
|
* Export collection data as CSV ZIP archive or Excel workbook
|
|
368
425
|
*/
|
|
369
|
-
async exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
426
|
+
async exportCollection(requestParameters: ExportCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile> {
|
|
370
427
|
const response = await this.exportCollectionRaw(requestParameters, initOverrides);
|
|
371
428
|
return await response.value();
|
|
372
429
|
}
|
package/src/apis/GroupsApi.ts
CHANGED
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime.js';
|
|
16
|
+
import {
|
|
17
|
+
type ApplicationListResponse,
|
|
18
|
+
ApplicationListResponseFromJSON,
|
|
19
|
+
ApplicationListResponseToJSON,
|
|
20
|
+
} from '../models/ApplicationListResponse.js';
|
|
16
21
|
import {
|
|
17
22
|
type CreateGroupRequest,
|
|
18
23
|
CreateGroupRequestFromJSON,
|
|
@@ -95,6 +100,13 @@ export interface GetLatestGroupRequest {
|
|
|
95
100
|
pageSize?: number;
|
|
96
101
|
}
|
|
97
102
|
|
|
103
|
+
export interface ListGroupApplicationsRequest {
|
|
104
|
+
/**
|
|
105
|
+
* Group ID
|
|
106
|
+
*/
|
|
107
|
+
groupId: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
export interface ListGroupsRequest {
|
|
99
111
|
/**
|
|
100
112
|
* Collection ID
|
|
@@ -253,6 +265,29 @@ export interface GroupsApiInterface {
|
|
|
253
265
|
*/
|
|
254
266
|
getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
|
|
255
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Creates request options for listGroupApplications without sending the request
|
|
270
|
+
* @param {string} groupId Group ID
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
* @memberof GroupsApiInterface
|
|
273
|
+
*/
|
|
274
|
+
listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @summary List detected applications for a group
|
|
279
|
+
* @param {string} groupId Group ID
|
|
280
|
+
* @param {*} [options] Override http request option.
|
|
281
|
+
* @throws {RequiredError}
|
|
282
|
+
* @memberof GroupsApiInterface
|
|
283
|
+
*/
|
|
284
|
+
listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* List detected applications for a group
|
|
288
|
+
*/
|
|
289
|
+
listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
|
|
290
|
+
|
|
256
291
|
/**
|
|
257
292
|
* Creates request options for listGroups without sending the request
|
|
258
293
|
* @param {string} id Collection ID
|
|
@@ -554,6 +589,51 @@ export class GroupsApi extends runtime.BaseAPI implements GroupsApiInterface {
|
|
|
554
589
|
return await response.value();
|
|
555
590
|
}
|
|
556
591
|
|
|
592
|
+
/**
|
|
593
|
+
* Creates request options for listGroupApplications without sending the request
|
|
594
|
+
*/
|
|
595
|
+
async listGroupApplicationsRequestOpts(requestParameters: ListGroupApplicationsRequest): Promise<runtime.RequestOpts> {
|
|
596
|
+
if (requestParameters['groupId'] == null) {
|
|
597
|
+
throw new runtime.RequiredError(
|
|
598
|
+
'groupId',
|
|
599
|
+
'Required parameter "groupId" was null or undefined when calling listGroupApplications().'
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const queryParameters: any = {};
|
|
604
|
+
|
|
605
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
let urlPath = `/groups/{groupId}/applications`;
|
|
609
|
+
urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId'])));
|
|
610
|
+
|
|
611
|
+
return {
|
|
612
|
+
path: urlPath,
|
|
613
|
+
method: 'GET',
|
|
614
|
+
headers: headerParameters,
|
|
615
|
+
query: queryParameters,
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* List detected applications for a group
|
|
621
|
+
*/
|
|
622
|
+
async listGroupApplicationsRaw(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>> {
|
|
623
|
+
const requestOptions = await this.listGroupApplicationsRequestOpts(requestParameters);
|
|
624
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
625
|
+
|
|
626
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationListResponseFromJSON(jsonValue));
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* List detected applications for a group
|
|
631
|
+
*/
|
|
632
|
+
async listGroupApplications(requestParameters: ListGroupApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse> {
|
|
633
|
+
const response = await this.listGroupApplicationsRaw(requestParameters, initOverrides);
|
|
634
|
+
return await response.value();
|
|
635
|
+
}
|
|
636
|
+
|
|
557
637
|
/**
|
|
558
638
|
* Creates request options for listGroups without sending the request
|
|
559
639
|
*/
|
package/src/models/Infra.ts
CHANGED
|
@@ -45,6 +45,10 @@ export interface Infra {
|
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
47
|
totalHosts: number;
|
|
48
|
+
/**
|
|
49
|
+
* Whether any hosts run without vCenter cluster management (not part of any cluster)
|
|
50
|
+
*/
|
|
51
|
+
standaloneHostsDetected?: boolean;
|
|
48
52
|
/**
|
|
49
53
|
*
|
|
50
54
|
*/
|
|
@@ -120,6 +124,7 @@ export function InfraFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inf
|
|
|
120
124
|
return {
|
|
121
125
|
|
|
122
126
|
'totalHosts': json['totalHosts'],
|
|
127
|
+
'standaloneHostsDetected': json['standaloneHostsDetected'] == null ? undefined : json['standaloneHostsDetected'],
|
|
123
128
|
'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
|
|
124
129
|
'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
|
|
125
130
|
'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
|
|
@@ -147,6 +152,7 @@ export function InfraToJSONTyped(value?: Infra | null, ignoreDiscriminator: bool
|
|
|
147
152
|
return {
|
|
148
153
|
|
|
149
154
|
'totalHosts': value['totalHosts'],
|
|
155
|
+
'standaloneHostsDetected': value['standaloneHostsDetected'],
|
|
150
156
|
'totalDatacenters': value['totalDatacenters'],
|
|
151
157
|
'totalClusters': value['totalClusters'],
|
|
152
158
|
'clustersPerDatacenter': value['clustersPerDatacenter'],
|
package/src/runtime.ts
CHANGED
|
@@ -488,14 +488,81 @@ export class VoidApiResponse {
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
+
/**
|
|
492
|
+
* A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
|
|
493
|
+
* wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
|
|
494
|
+
* `typescript` generator's browser HttpFile.
|
|
495
|
+
*/
|
|
496
|
+
export type HttpFile = Blob & { readonly name: string };
|
|
497
|
+
|
|
491
498
|
export class BlobApiResponse {
|
|
492
499
|
constructor(public raw: Response) {}
|
|
493
500
|
|
|
494
|
-
|
|
495
|
-
|
|
501
|
+
/**
|
|
502
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
503
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
504
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
505
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
506
|
+
* would stringify instead of wrapping.
|
|
507
|
+
*/
|
|
508
|
+
async value(): Promise<HttpFile> {
|
|
509
|
+
const blob = await this.raw.blob();
|
|
510
|
+
const name = parseContentDispositionFilename(this.raw.headers) ?? '';
|
|
511
|
+
if (typeof File !== 'undefined' && blob instanceof Blob) {
|
|
512
|
+
try {
|
|
513
|
+
return new File([blob], name, { type: blob.type });
|
|
514
|
+
} catch {
|
|
515
|
+
// File cannot be constructed: name the Blob itself
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return Object.assign(blob, { name });
|
|
496
519
|
};
|
|
497
520
|
}
|
|
498
521
|
|
|
522
|
+
/**
|
|
523
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
524
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
525
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
526
|
+
*/
|
|
527
|
+
export function parseContentDispositionFilename(headers: Headers): string | undefined {
|
|
528
|
+
const params = parseHeaderParameters(headers.get('Content-Disposition') ?? '');
|
|
529
|
+
return basename(decodeExtValue(params.get('filename*'))) ?? basename(params.get('filename'));
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
|
|
533
|
+
function decodeExtValue(value: string | undefined): string | undefined {
|
|
534
|
+
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
535
|
+
try {
|
|
536
|
+
return match ? decodeURIComponent(match[1]) : undefined;
|
|
537
|
+
} catch {
|
|
538
|
+
return undefined;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
|
|
544
|
+
* taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
|
|
545
|
+
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
546
|
+
*/
|
|
547
|
+
function parseHeaderParameters(value: string): Map<string, string> {
|
|
548
|
+
const params = new Map<string, string>();
|
|
549
|
+
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
550
|
+
let match: RegExpExecArray | null;
|
|
551
|
+
while ((match = parameter.exec(value)) !== null) {
|
|
552
|
+
const name = match[1].toLowerCase();
|
|
553
|
+
if (!params.has(name)) {
|
|
554
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return params;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
|
|
561
|
+
function basename(name: string | undefined): string | undefined {
|
|
562
|
+
const base = name?.split(/[\\/]/).pop();
|
|
563
|
+
return !base || base === '.' || base === '..' ? undefined : base;
|
|
564
|
+
}
|
|
565
|
+
|
|
499
566
|
export class TextApiResponse {
|
|
500
567
|
constructor(public raw: Response) {}
|
|
501
568
|
|