@openshift-migration-advisor/agent-sdk 0.23.0-8b075a8243c2 → 0.23.0-c4e23ce0c052
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 +3 -2
- package/dist/apis/CollectionsApi.d.ts +30 -0
- package/dist/apis/CollectionsApi.js +34 -0
- package/dist/esm/apis/CollectionsApi.d.ts +30 -0
- package/dist/esm/apis/CollectionsApi.js +34 -0
- package/docs/CollectionsApi.md +59 -0
- package/package.json +1 -1
- package/src/apis/CollectionsApi.ts +57 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @openshift-migration-advisor/agent-sdk@0.23.0-
|
|
1
|
+
# @openshift-migration-advisor/agent-sdk@0.23.0-c4e23ce0c052
|
|
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
|
|
@@ -198,7 +199,7 @@ and is automatically generated by the
|
|
|
198
199
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
199
200
|
|
|
200
201
|
- API version: `v2`
|
|
201
|
-
- Package version: `0.23.0-
|
|
202
|
+
- Package version: `0.23.0-c4e23ce0c052`
|
|
202
203
|
- Generator version: `7.26.0-SNAPSHOT`
|
|
203
204
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
204
205
|
|
|
@@ -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
|
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|
|
@@ -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
|
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|
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/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
|
|
@@ -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
|
*/
|