@migration-planner-ui/api-client 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.openapi-generator/FILES +7 -3
  2. package/dist/apis/SourceApi.d.ts +26 -1
  3. package/dist/apis/SourceApi.js +51 -1
  4. package/dist/models/AgentProxy.d.ts +3 -3
  5. package/dist/models/Histogram.d.ts +43 -0
  6. package/dist/models/Histogram.js +48 -0
  7. package/dist/models/Host.d.ts +37 -0
  8. package/dist/models/Host.js +44 -0
  9. package/dist/models/Infra.d.ts +22 -3
  10. package/dist/models/Infra.js +21 -8
  11. package/dist/models/Inventory.js +9 -6
  12. package/dist/models/Label.d.ts +37 -0
  13. package/dist/models/Label.js +44 -0
  14. package/dist/models/MigrationIssue.d.ts +49 -0
  15. package/dist/models/MigrationIssue.js +50 -0
  16. package/dist/models/Network.d.ts +59 -0
  17. package/dist/models/Network.js +57 -0
  18. package/dist/models/OsInfo.d.ts +37 -0
  19. package/dist/models/OsInfo.js +44 -0
  20. package/dist/models/Source.d.ts +7 -0
  21. package/dist/models/Source.js +3 -0
  22. package/dist/models/SourceCreate.d.ts +2 -2
  23. package/dist/models/UploadRvtoolsFile200Response.d.ts +31 -0
  24. package/dist/models/UploadRvtoolsFile200Response.js +38 -0
  25. package/dist/models/VMResourceBreakdown.d.ts +3 -3
  26. package/dist/models/VMResourceBreakdown.js +3 -3
  27. package/dist/models/VMs.d.ts +15 -5
  28. package/dist/models/VMs.js +18 -13
  29. package/dist/models/index.d.ts +10 -6
  30. package/dist/models/index.js +10 -6
  31. package/package.json +1 -1
  32. package/src/apis/SourceApi.ts +84 -0
  33. package/src/models/AgentProxy.ts +3 -3
  34. package/src/models/Histogram.ts +79 -0
  35. package/src/models/Host.ts +70 -0
  36. package/src/models/Infra.ts +47 -14
  37. package/src/models/Inventory.ts +6 -6
  38. package/src/models/Label.ts +70 -0
  39. package/src/models/MigrationIssue.ts +87 -0
  40. package/src/models/Network.ts +99 -0
  41. package/src/models/OsInfo.ts +70 -0
  42. package/src/models/Source.ts +14 -0
  43. package/src/models/SourceCreate.ts +2 -2
  44. package/src/models/UploadRvtoolsFile200Response.ts +60 -0
  45. package/src/models/VMResourceBreakdown.ts +9 -9
  46. package/src/models/VMs.ts +36 -21
  47. package/src/models/index.ts +10 -6
  48. package/dist/apis/UiEventsApi.d.ts +0 -49
  49. package/dist/apis/UiEventsApi.js +0 -59
  50. package/src/apis/UiEventsApi.ts +0 -96
@@ -0,0 +1,60 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UploadRvtoolsFile200Response
20
+ */
21
+ export interface UploadRvtoolsFile200Response {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UploadRvtoolsFile200Response
26
+ */
27
+ message?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the UploadRvtoolsFile200Response interface.
32
+ */
33
+ export function instanceOfUploadRvtoolsFile200Response(value: object): value is UploadRvtoolsFile200Response {
34
+ return true;
35
+ }
36
+
37
+ export function UploadRvtoolsFile200ResponseFromJSON(json: any): UploadRvtoolsFile200Response {
38
+ return UploadRvtoolsFile200ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function UploadRvtoolsFile200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadRvtoolsFile200Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'message': json['message'] == null ? undefined : json['message'],
48
+ };
49
+ }
50
+
51
+ export function UploadRvtoolsFile200ResponseToJSON(value?: UploadRvtoolsFile200Response | null): any {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+
57
+ 'message': value['message'],
58
+ };
59
+ }
60
+
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { VMResourceBreakdownHistogram } from './VMResourceBreakdownHistogram';
16
+ import type { Histogram } from './Histogram';
17
17
  import {
18
- VMResourceBreakdownHistogramFromJSON,
19
- VMResourceBreakdownHistogramFromJSONTyped,
20
- VMResourceBreakdownHistogramToJSON,
21
- } from './VMResourceBreakdownHistogram';
18
+ HistogramFromJSON,
19
+ HistogramFromJSONTyped,
20
+ HistogramToJSON,
21
+ } from './Histogram';
22
22
 
23
23
  /**
24
24
  *
@@ -52,10 +52,10 @@ export interface VMResourceBreakdown {
52
52
  totalForNotMigratable: number;
53
53
  /**
54
54
  *
55
- * @type {VMResourceBreakdownHistogram}
55
+ * @type {Histogram}
56
56
  * @memberof VMResourceBreakdown
57
57
  */
58
- histogram: VMResourceBreakdownHistogram;
58
+ histogram: Histogram;
59
59
  }
60
60
 
61
61
  /**
@@ -84,7 +84,7 @@ export function VMResourceBreakdownFromJSONTyped(json: any, ignoreDiscriminator:
84
84
  'totalForMigratable': json['totalForMigratable'],
85
85
  'totalForMigratableWithWarnings': json['totalForMigratableWithWarnings'],
86
86
  'totalForNotMigratable': json['totalForNotMigratable'],
87
- 'histogram': VMResourceBreakdownHistogramFromJSON(json['histogram']),
87
+ 'histogram': HistogramFromJSON(json['histogram']),
88
88
  };
89
89
  }
90
90
 
@@ -98,7 +98,7 @@ export function VMResourceBreakdownToJSON(value?: VMResourceBreakdown | null): a
98
98
  'totalForMigratable': value['totalForMigratable'],
99
99
  'totalForMigratableWithWarnings': value['totalForMigratableWithWarnings'],
100
100
  'totalForNotMigratable': value['totalForNotMigratable'],
101
- 'histogram': VMResourceBreakdownHistogramToJSON(value['histogram']),
101
+ 'histogram': HistogramToJSON(value['histogram']),
102
102
  };
103
103
  }
104
104
 
package/src/models/VMs.ts CHANGED
@@ -13,12 +13,18 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { MigrationIssuesInner } from './MigrationIssuesInner';
16
+ import type { MigrationIssue } from './MigrationIssue';
17
17
  import {
18
- MigrationIssuesInnerFromJSON,
19
- MigrationIssuesInnerFromJSONTyped,
20
- MigrationIssuesInnerToJSON,
21
- } from './MigrationIssuesInner';
18
+ MigrationIssueFromJSON,
19
+ MigrationIssueFromJSONTyped,
20
+ MigrationIssueToJSON,
21
+ } from './MigrationIssue';
22
+ import type { OsInfo } from './OsInfo';
23
+ import {
24
+ OsInfoFromJSON,
25
+ OsInfoFromJSONTyped,
26
+ OsInfoToJSON,
27
+ } from './OsInfo';
22
28
  import type { VMResourceBreakdown } from './VMResourceBreakdown';
23
29
  import {
24
30
  VMResourceBreakdownFromJSON,
@@ -84,20 +90,27 @@ export interface VMs {
84
90
  *
85
91
  * @type {{ [key: string]: number; }}
86
92
  * @memberof VMs
93
+ * @deprecated
87
94
  */
88
95
  os: { [key: string]: number; };
89
96
  /**
90
97
  *
91
- * @type {Array<MigrationIssuesInner>}
98
+ * @type {{ [key: string]: OsInfo; }}
99
+ * @memberof VMs
100
+ */
101
+ osInfo?: { [key: string]: OsInfo; };
102
+ /**
103
+ *
104
+ * @type {Array<MigrationIssue>}
92
105
  * @memberof VMs
93
106
  */
94
- notMigratableReasons: Array<MigrationIssuesInner>;
107
+ notMigratableReasons: Array<MigrationIssue>;
95
108
  /**
96
109
  *
97
- * @type {Array<MigrationIssuesInner>}
110
+ * @type {Array<MigrationIssue>}
98
111
  * @memberof VMs
99
112
  */
100
- migrationWarnings: Array<MigrationIssuesInner>;
113
+ migrationWarnings: Array<MigrationIssue>;
101
114
  }
102
115
 
103
116
  /**
@@ -130,14 +143,15 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
130
143
  'total': json['total'],
131
144
  'totalMigratable': json['totalMigratable'],
132
145
  'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
133
- 'cpuCores': json['cpuCores'],
134
- 'ramGB': json['ramGB'],
135
- 'diskGB': json['diskGB'],
136
- 'diskCount': json['diskCount'],
146
+ 'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
147
+ 'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
148
+ 'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
149
+ 'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
137
150
  'powerStates': json['powerStates'],
138
151
  'os': json['os'],
139
- 'notMigratableReasons': ((json['notMigratableReasons'] as Array<any>).map(MigrationIssuesInnerFromJSON)),
140
- 'migrationWarnings': ((json['migrationWarnings'] as Array<any>).map(MigrationIssuesInnerFromJSON)),
152
+ 'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
153
+ 'notMigratableReasons': ((json['notMigratableReasons'] as Array<any>).map(MigrationIssueFromJSON)),
154
+ 'migrationWarnings': ((json['migrationWarnings'] as Array<any>).map(MigrationIssueFromJSON)),
141
155
  };
142
156
  }
143
157
 
@@ -150,14 +164,15 @@ export function VMsToJSON(value?: VMs | null): any {
150
164
  'total': value['total'],
151
165
  'totalMigratable': value['totalMigratable'],
152
166
  'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
153
- 'cpuCores': value['cpuCores'],
154
- 'ramGB': value['ramGB'],
155
- 'diskGB': value['diskGB'],
156
- 'diskCount': value['diskCount'],
167
+ 'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
168
+ 'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
169
+ 'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
170
+ 'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
157
171
  'powerStates': value['powerStates'],
158
172
  'os': value['os'],
159
- 'notMigratableReasons': ((value['notMigratableReasons'] as Array<any>).map(MigrationIssuesInnerToJSON)),
160
- 'migrationWarnings': ((value['migrationWarnings'] as Array<any>).map(MigrationIssuesInnerToJSON)),
173
+ 'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),
174
+ 'notMigratableReasons': ((value['notMigratableReasons'] as Array<any>).map(MigrationIssueToJSON)),
175
+ 'migrationWarnings': ((value['migrationWarnings'] as Array<any>).map(MigrationIssueToJSON)),
161
176
  };
162
177
  }
163
178
 
@@ -3,20 +3,24 @@
3
3
  export * from './Agent';
4
4
  export * from './AgentProxy';
5
5
  export * from './Datastore';
6
- export * from './Event';
7
- export * from './EventData';
6
+ export * from './Histogram';
7
+ export * from './Host';
8
8
  export * from './Infra';
9
- export * from './InfraDatastoresInner';
10
- export * from './InfraNetworksInner';
11
9
  export * from './Inventory';
12
- export * from './MigrationIssuesInner';
10
+ export * from './Label';
11
+ export * from './MigrationIssue';
13
12
  export * from './ModelError';
13
+ export * from './Network';
14
+ export * from './OsInfo';
14
15
  export * from './PresignedUrl';
15
16
  export * from './Source';
16
17
  export * from './SourceCreate';
17
18
  export * from './SourceUpdateOnPrem';
18
19
  export * from './Status';
20
+ export * from './UploadRvtoolsFile200Response';
19
21
  export * from './VCenter';
20
22
  export * from './VMResourceBreakdown';
21
- export * from './VMResourceBreakdownHistogram';
22
23
  export * from './VMs';
24
+ export * from './InfraDatastoresInner';
25
+ export * from './InfraNetworksInner';
26
+ export * from './MigrationIssuesInner';
@@ -1,49 +0,0 @@
1
- /**
2
- * Migration Planner API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: undefined
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime';
13
- import type { Event, Source } from '../models/index';
14
- export interface PushEventsRequest {
15
- event: Event;
16
- }
17
- /**
18
- * UiEventsApi - interface
19
- *
20
- * @export
21
- * @interface UiEventsApiInterface
22
- */
23
- export interface UiEventsApiInterface {
24
- /**
25
- * Pass events from ui to kafka
26
- * @param {Event} event
27
- * @param {*} [options] Override http request option.
28
- * @throws {RequiredError}
29
- * @memberof UiEventsApiInterface
30
- */
31
- pushEventsRaw(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>>;
32
- /**
33
- * Pass events from ui to kafka
34
- */
35
- pushEvents(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
36
- }
37
- /**
38
- *
39
- */
40
- export declare class UiEventsApi extends runtime.BaseAPI implements UiEventsApiInterface {
41
- /**
42
- * Pass events from ui to kafka
43
- */
44
- pushEventsRaw(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>>;
45
- /**
46
- * Pass events from ui to kafka
47
- */
48
- pushEvents(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
49
- }
@@ -1,59 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Migration Planner API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: undefined
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import * as runtime from '../runtime';
24
- import { EventToJSON, SourceFromJSON, } from '../models/index';
25
- /**
26
- *
27
- */
28
- export class UiEventsApi extends runtime.BaseAPI {
29
- /**
30
- * Pass events from ui to kafka
31
- */
32
- pushEventsRaw(requestParameters, initOverrides) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- if (requestParameters['event'] == null) {
35
- throw new runtime.RequiredError('event', 'Required parameter "event" was null or undefined when calling pushEvents().');
36
- }
37
- const queryParameters = {};
38
- const headerParameters = {};
39
- headerParameters['Content-Type'] = 'application/json';
40
- const response = yield this.request({
41
- path: `/api/v1/events`,
42
- method: 'POST',
43
- headers: headerParameters,
44
- query: queryParameters,
45
- body: EventToJSON(requestParameters['event']),
46
- }, initOverrides);
47
- return new runtime.JSONApiResponse(response, (jsonValue) => SourceFromJSON(jsonValue));
48
- });
49
- }
50
- /**
51
- * Pass events from ui to kafka
52
- */
53
- pushEvents(requestParameters, initOverrides) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- const response = yield this.pushEventsRaw(requestParameters, initOverrides);
56
- return yield response.value();
57
- });
58
- }
59
- }
@@ -1,96 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Migration Planner API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: undefined
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import * as runtime from '../runtime';
17
- import type {
18
- Event,
19
- Source,
20
- } from '../models/index';
21
- import {
22
- EventFromJSON,
23
- EventToJSON,
24
- SourceFromJSON,
25
- SourceToJSON,
26
- } from '../models/index';
27
-
28
- export interface PushEventsRequest {
29
- event: Event;
30
- }
31
-
32
- /**
33
- * UiEventsApi - interface
34
- *
35
- * @export
36
- * @interface UiEventsApiInterface
37
- */
38
- export interface UiEventsApiInterface {
39
- /**
40
- * Pass events from ui to kafka
41
- * @param {Event} event
42
- * @param {*} [options] Override http request option.
43
- * @throws {RequiredError}
44
- * @memberof UiEventsApiInterface
45
- */
46
- pushEventsRaw(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>>;
47
-
48
- /**
49
- * Pass events from ui to kafka
50
- */
51
- pushEvents(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
52
-
53
- }
54
-
55
- /**
56
- *
57
- */
58
- export class UiEventsApi extends runtime.BaseAPI implements UiEventsApiInterface {
59
-
60
- /**
61
- * Pass events from ui to kafka
62
- */
63
- async pushEventsRaw(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>> {
64
- if (requestParameters['event'] == null) {
65
- throw new runtime.RequiredError(
66
- 'event',
67
- 'Required parameter "event" was null or undefined when calling pushEvents().'
68
- );
69
- }
70
-
71
- const queryParameters: any = {};
72
-
73
- const headerParameters: runtime.HTTPHeaders = {};
74
-
75
- headerParameters['Content-Type'] = 'application/json';
76
-
77
- const response = await this.request({
78
- path: `/api/v1/events`,
79
- method: 'POST',
80
- headers: headerParameters,
81
- query: queryParameters,
82
- body: EventToJSON(requestParameters['event']),
83
- }, initOverrides);
84
-
85
- return new runtime.JSONApiResponse(response, (jsonValue) => SourceFromJSON(jsonValue));
86
- }
87
-
88
- /**
89
- * Pass events from ui to kafka
90
- */
91
- async pushEvents(requestParameters: PushEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source> {
92
- const response = await this.pushEventsRaw(requestParameters, initOverrides);
93
- return await response.value();
94
- }
95
-
96
- }