@migration-planner-ui/agent-client 0.0.31 → 0.0.33

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 (87) hide show
  1. package/README.md +112 -25
  2. package/dist/apis/AgentUiApi.d.ts +126 -0
  3. package/dist/apis/AgentUiApi.d.ts.map +1 -0
  4. package/dist/apis/AgentUiApi.js +163 -0
  5. package/dist/apis/index.d.ts +2 -0
  6. package/dist/apis/index.d.ts.map +1 -0
  7. package/dist/apis/index.js +3 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +5 -0
  11. package/dist/models/Credentials.d.ts +51 -0
  12. package/dist/models/Credentials.d.ts.map +1 -0
  13. package/dist/models/Credentials.js +53 -0
  14. package/dist/models/Datastore.d.ts +81 -0
  15. package/dist/models/Datastore.d.ts.map +1 -0
  16. package/dist/models/Datastore.js +73 -0
  17. package/dist/models/DiskSizeTierSummary.d.ts +39 -0
  18. package/dist/models/DiskSizeTierSummary.d.ts.map +1 -0
  19. package/dist/models/DiskSizeTierSummary.js +47 -0
  20. package/dist/models/DiskTypeSummary.d.ts +39 -0
  21. package/dist/models/DiskTypeSummary.d.ts.map +1 -0
  22. package/dist/models/DiskTypeSummary.js +47 -0
  23. package/dist/models/Histogram.d.ts +45 -0
  24. package/dist/models/Histogram.d.ts.map +1 -0
  25. package/dist/models/Histogram.js +51 -0
  26. package/dist/models/Host.d.ts +63 -0
  27. package/dist/models/Host.d.ts.map +1 -0
  28. package/dist/models/Host.js +55 -0
  29. package/dist/models/Infra.d.ts +107 -0
  30. package/dist/models/Infra.d.ts.map +1 -0
  31. package/dist/models/Infra.js +74 -0
  32. package/dist/models/Inventory.d.ts +48 -0
  33. package/dist/models/Inventory.d.ts.map +1 -0
  34. package/dist/models/Inventory.js +51 -0
  35. package/dist/models/InventoryData.d.ts +48 -0
  36. package/dist/models/InventoryData.d.ts.map +1 -0
  37. package/dist/models/InventoryData.js +52 -0
  38. package/dist/models/InventoryReply.d.ts +40 -0
  39. package/dist/models/InventoryReply.d.ts.map +1 -0
  40. package/dist/models/InventoryReply.js +48 -0
  41. package/dist/models/MigrationIssue.d.ts +51 -0
  42. package/dist/models/MigrationIssue.d.ts.map +1 -0
  43. package/dist/models/MigrationIssue.js +53 -0
  44. package/dist/models/ModelError.d.ts +33 -0
  45. package/dist/models/ModelError.d.ts.map +1 -0
  46. package/dist/models/ModelError.js +43 -0
  47. package/dist/models/Network.d.ts +67 -0
  48. package/dist/models/Network.d.ts.map +1 -0
  49. package/dist/models/Network.js +62 -0
  50. package/dist/models/OsInfo.d.ts +45 -0
  51. package/dist/models/OsInfo.d.ts.map +1 -0
  52. package/dist/models/OsInfo.js +49 -0
  53. package/dist/models/ServiceUIReply.d.ts +33 -0
  54. package/dist/models/ServiceUIReply.d.ts.map +1 -0
  55. package/dist/models/ServiceUIReply.js +43 -0
  56. package/dist/models/StatusReply.d.ts +81 -0
  57. package/dist/models/StatusReply.d.ts.map +1 -0
  58. package/dist/models/StatusReply.js +70 -0
  59. package/dist/models/VCenter.d.ts +33 -0
  60. package/dist/models/VCenter.d.ts.map +1 -0
  61. package/dist/models/VCenter.js +43 -0
  62. package/dist/models/VMResourceBreakdown.d.ts +59 -0
  63. package/dist/models/VMResourceBreakdown.d.ts.map +1 -0
  64. package/dist/models/VMResourceBreakdown.js +58 -0
  65. package/dist/models/VMs.d.ts +149 -0
  66. package/dist/models/VMs.d.ts.map +1 -0
  67. package/dist/models/VMs.js +97 -0
  68. package/dist/models/VersionReply.d.ts +33 -0
  69. package/dist/models/VersionReply.d.ts.map +1 -0
  70. package/dist/models/VersionReply.js +43 -0
  71. package/dist/models/index.d.ts +21 -0
  72. package/dist/models/index.d.ts.map +1 -0
  73. package/dist/models/index.js +22 -0
  74. package/dist/runtime.d.ts +185 -0
  75. package/dist/runtime.d.ts.map +1 -0
  76. package/dist/runtime.js +334 -0
  77. package/package.json +31 -15
  78. package/src/apis/AgentApi.ts +0 -83
  79. package/src/apis/index.ts +0 -1
  80. package/src/models/Credentials.ts +0 -6
  81. package/src/models/CredentialsError.ts +0 -17
  82. package/src/models/Either.ts +0 -1
  83. package/src/models/SourceStatus.ts +0 -7
  84. package/src/models/StatusReply.ts +0 -6
  85. package/src/models/index.ts +0 -5
  86. package/tsconfig.json +0 -17
  87. package/tsconfig.tsbuildinfo +0 -1
package/README.md CHANGED
@@ -1,43 +1,130 @@
1
- ## @migration-planner-ui/agent-client@1.0.0-alpha
1
+ # @migration-planner-ui/agent-client
2
2
 
3
- This package is a TypeScript/JavaScript client for the [Migration Planner - Agent API](https://github.com/kubev2v/migration-planner) that utilizes the [Fetch API](https://fetch.spec.whatwg.org/). It can be used in the following environments:
3
+ A TypeScript SDK client for the Migration Planner Agent API.
4
4
 
5
- Environment
6
- * Node.js
7
- * Modern browsers
5
+ ## Usage
8
6
 
9
- Language level
10
- * ES6
7
+ First, install the SDK from npm.
11
8
 
12
- Module system
13
- * ES6 module system
9
+ ```bash
10
+ npm install @migration-planner-ui/agent-client --save
11
+ ```
14
12
 
15
- It can be used in both TypeScript and JavaScript. In TypeScript, the definitions will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
13
+ Next, try it out.
16
14
 
17
- ### Building
18
15
 
19
- To build and transpile the typescript sources to javascript use:
20
- ```
21
- yarn install
22
- yarn build
16
+ ```ts
17
+ import {
18
+ Configuration,
19
+ AgentUiApi,
20
+ } from '@migration-planner-ui/agent-client';
21
+ import type { GetAgentStatusRequest } from '@migration-planner-ui/agent-client';
22
+
23
+ async function example() {
24
+ console.log("🚀 Testing @migration-planner-ui/agent-client SDK...");
25
+ const api = new AgentUiApi();
26
+
27
+ try {
28
+ const data = await api.getAgentStatus();
29
+ console.log(data);
30
+ } catch (error) {
31
+ console.error(error);
32
+ }
33
+ }
34
+
35
+ // Run the test
36
+ example().catch(console.error);
23
37
  ```
24
38
 
25
- ### Publishing
26
39
 
27
- First build the package then run `yarn npm publish`
40
+ ## Documentation
28
41
 
29
- ### Consuming
42
+ ### API Endpoints
30
43
 
31
- Navigate to the folder of your consuming project and run one of the following commands.
44
+ All URIs are relative to *http://localhost*
32
45
 
33
- _published:_
46
+ | Class | Method | HTTP request | Description
47
+ | ----- | ------ | ------------ | -------------
48
+ *AgentUiApi* | [**getAgentStatus**](docs/AgentUiApi.md#getagentstatus) | **GET** /api/v1/status |
49
+ *AgentUiApi* | [**getAgentVersion**](docs/AgentUiApi.md#getagentversion) | **GET** /api/v1/version |
50
+ *AgentUiApi* | [**getInventory**](docs/AgentUiApi.md#getinventory) | **GET** /api/v1/inventory |
51
+ *AgentUiApi* | [**getPlannerUrl**](docs/AgentUiApi.md#getplannerurl) | **GET** /api/v1/url |
52
+ *AgentUiApi* | [**submitCredentials**](docs/AgentUiApi.md#submitcredentials) | **PUT** /api/v1/credentials |
34
53
 
35
- ```
36
- yarn add @migration-planner-ui/agent-client@1.0.0-alpha
37
- ```
38
54
 
39
- _unPublished (not recommended):_
55
+ ### Models
56
+
57
+ - [Credentials](docs/Credentials.md)
58
+ - [Datastore](docs/Datastore.md)
59
+ - [DiskSizeTierSummary](docs/DiskSizeTierSummary.md)
60
+ - [DiskTypeSummary](docs/DiskTypeSummary.md)
61
+ - [Histogram](docs/Histogram.md)
62
+ - [Host](docs/Host.md)
63
+ - [Infra](docs/Infra.md)
64
+ - [Inventory](docs/Inventory.md)
65
+ - [InventoryData](docs/InventoryData.md)
66
+ - [InventoryReply](docs/InventoryReply.md)
67
+ - [MigrationIssue](docs/MigrationIssue.md)
68
+ - [ModelError](docs/ModelError.md)
69
+ - [Network](docs/Network.md)
70
+ - [OsInfo](docs/OsInfo.md)
71
+ - [ServiceUIReply](docs/ServiceUIReply.md)
72
+ - [StatusReply](docs/StatusReply.md)
73
+ - [VCenter](docs/VCenter.md)
74
+ - [VMResourceBreakdown](docs/VMResourceBreakdown.md)
75
+ - [VMs](docs/VMs.md)
76
+ - [VersionReply](docs/VersionReply.md)
77
+
78
+ ### Authorization
79
+
80
+ Endpoints do not require authorization.
81
+
82
+
83
+ ## About
84
+
85
+ This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
86
+ and is automatically generated by the
87
+ [OpenAPI Generator](https://openapi-generator.tech) project:
40
88
 
89
+ - API version: `undefined`
90
+ - Package version: `1.0.0-alpha`
91
+ - Generator version: `7.18.0`
92
+ - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
93
+
94
+ The generated npm module supports the following:
95
+
96
+ - Environments
97
+ * Node.js
98
+ * Webpack
99
+ * Browserify
100
+ - Language levels
101
+ * ES5 - you must have a Promises/A+ library installed
102
+ * ES6
103
+ - Module systems
104
+ * CommonJS
105
+ * ES6 module system
106
+
107
+
108
+ ## Development
109
+
110
+ ### Building
111
+
112
+ To build the TypeScript source code, you need to have Node.js and npm installed.
113
+ After cloning the repository, navigate to the project directory and run:
114
+
115
+ ```bash
116
+ npm install
117
+ npm run build
41
118
  ```
42
- yarn add PATH_TO_GENERATED_PACKAGE
119
+
120
+ ### Publishing
121
+
122
+ Once you've built the package, you can publish it to npm:
123
+
124
+ ```bash
125
+ npm publish
43
126
  ```
127
+
128
+ ## License
129
+
130
+ [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Migration Planner Agent UI API
3
+ * API endpoints for the agent UI to interact with the migration discovery VM
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.js';
13
+ import type { Credentials, InventoryReply, ServiceUIReply, StatusReply, VersionReply } from '../models/index.js';
14
+ export interface SubmitCredentialsRequest {
15
+ credentials: Credentials;
16
+ }
17
+ /**
18
+ * AgentUiApi - interface
19
+ *
20
+ * @export
21
+ * @interface AgentUiApiInterface
22
+ */
23
+ export interface AgentUiApiInterface {
24
+ /**
25
+ * Get the current status of the agent
26
+ * @param {*} [options] Override http request option.
27
+ * @throws {RequiredError}
28
+ * @memberof AgentUiApiInterface
29
+ */
30
+ getAgentStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusReply>>;
31
+ /**
32
+ * Get the current status of the agent
33
+ */
34
+ getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusReply>;
35
+ /**
36
+ * Get the version of the agent
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ * @memberof AgentUiApiInterface
40
+ */
41
+ getAgentVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionReply>>;
42
+ /**
43
+ * Get the version of the agent
44
+ */
45
+ getAgentVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionReply>;
46
+ /**
47
+ * Download the collected inventory data
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ * @memberof AgentUiApiInterface
51
+ */
52
+ getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InventoryReply>>;
53
+ /**
54
+ * Download the collected inventory data
55
+ */
56
+ getInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InventoryReply>;
57
+ /**
58
+ * Get the planner service UI URL
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ * @memberof AgentUiApiInterface
62
+ */
63
+ getPlannerUrlRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceUIReply>>;
64
+ /**
65
+ * Get the planner service UI URL
66
+ */
67
+ getPlannerUrl(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceUIReply>;
68
+ /**
69
+ * Submit VMware credentials for the discovery process
70
+ * @param {Credentials} credentials
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ * @memberof AgentUiApiInterface
74
+ */
75
+ submitCredentialsRaw(requestParameters: SubmitCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
76
+ /**
77
+ * Submit VMware credentials for the discovery process
78
+ */
79
+ submitCredentials(requestParameters: SubmitCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
80
+ }
81
+ /**
82
+ *
83
+ */
84
+ export declare class AgentUiApi extends runtime.BaseAPI implements AgentUiApiInterface {
85
+ /**
86
+ * Get the current status of the agent
87
+ */
88
+ getAgentStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusReply>>;
89
+ /**
90
+ * Get the current status of the agent
91
+ */
92
+ getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusReply>;
93
+ /**
94
+ * Get the version of the agent
95
+ */
96
+ getAgentVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionReply>>;
97
+ /**
98
+ * Get the version of the agent
99
+ */
100
+ getAgentVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionReply>;
101
+ /**
102
+ * Download the collected inventory data
103
+ */
104
+ getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InventoryReply>>;
105
+ /**
106
+ * Download the collected inventory data
107
+ */
108
+ getInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InventoryReply>;
109
+ /**
110
+ * Get the planner service UI URL
111
+ */
112
+ getPlannerUrlRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceUIReply>>;
113
+ /**
114
+ * Get the planner service UI URL
115
+ */
116
+ getPlannerUrl(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceUIReply>;
117
+ /**
118
+ * Submit VMware credentials for the discovery process
119
+ */
120
+ submitCredentialsRaw(requestParameters: SubmitCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
121
+ /**
122
+ * Submit VMware credentials for the discovery process
123
+ */
124
+ submitCredentials(requestParameters: SubmitCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
125
+ }
126
+ //# sourceMappingURL=AgentUiApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentUiApi.d.ts","sourceRoot":"","sources":["../../src/apis/AgentUiApi.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,163 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner Agent UI API
5
+ * API endpoints for the agent UI to interact with the migration discovery VM
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.js';
24
+ import { CredentialsToJSON, InventoryReplyFromJSON, ServiceUIReplyFromJSON, StatusReplyFromJSON, VersionReplyFromJSON, } from '../models/index.js';
25
+ /**
26
+ *
27
+ */
28
+ export class AgentUiApi extends runtime.BaseAPI {
29
+ /**
30
+ * Get the current status of the agent
31
+ */
32
+ getAgentStatusRaw(initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ let urlPath = `/api/v1/status`;
37
+ const response = yield this.request({
38
+ path: urlPath,
39
+ method: 'GET',
40
+ headers: headerParameters,
41
+ query: queryParameters,
42
+ }, initOverrides);
43
+ return new runtime.JSONApiResponse(response, (jsonValue) => StatusReplyFromJSON(jsonValue));
44
+ });
45
+ }
46
+ /**
47
+ * Get the current status of the agent
48
+ */
49
+ getAgentStatus(initOverrides) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const response = yield this.getAgentStatusRaw(initOverrides);
52
+ return yield response.value();
53
+ });
54
+ }
55
+ /**
56
+ * Get the version of the agent
57
+ */
58
+ getAgentVersionRaw(initOverrides) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const queryParameters = {};
61
+ const headerParameters = {};
62
+ let urlPath = `/api/v1/version`;
63
+ const response = yield this.request({
64
+ path: urlPath,
65
+ method: 'GET',
66
+ headers: headerParameters,
67
+ query: queryParameters,
68
+ }, initOverrides);
69
+ return new runtime.JSONApiResponse(response, (jsonValue) => VersionReplyFromJSON(jsonValue));
70
+ });
71
+ }
72
+ /**
73
+ * Get the version of the agent
74
+ */
75
+ getAgentVersion(initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const response = yield this.getAgentVersionRaw(initOverrides);
78
+ return yield response.value();
79
+ });
80
+ }
81
+ /**
82
+ * Download the collected inventory data
83
+ */
84
+ getInventoryRaw(initOverrides) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const queryParameters = {};
87
+ const headerParameters = {};
88
+ let urlPath = `/api/v1/inventory`;
89
+ const response = yield this.request({
90
+ path: urlPath,
91
+ method: 'GET',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ }, initOverrides);
95
+ return new runtime.JSONApiResponse(response, (jsonValue) => InventoryReplyFromJSON(jsonValue));
96
+ });
97
+ }
98
+ /**
99
+ * Download the collected inventory data
100
+ */
101
+ getInventory(initOverrides) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const response = yield this.getInventoryRaw(initOverrides);
104
+ return yield response.value();
105
+ });
106
+ }
107
+ /**
108
+ * Get the planner service UI URL
109
+ */
110
+ getPlannerUrlRaw(initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ const queryParameters = {};
113
+ const headerParameters = {};
114
+ let urlPath = `/api/v1/url`;
115
+ const response = yield this.request({
116
+ path: urlPath,
117
+ method: 'GET',
118
+ headers: headerParameters,
119
+ query: queryParameters,
120
+ }, initOverrides);
121
+ return new runtime.JSONApiResponse(response, (jsonValue) => ServiceUIReplyFromJSON(jsonValue));
122
+ });
123
+ }
124
+ /**
125
+ * Get the planner service UI URL
126
+ */
127
+ getPlannerUrl(initOverrides) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const response = yield this.getPlannerUrlRaw(initOverrides);
130
+ return yield response.value();
131
+ });
132
+ }
133
+ /**
134
+ * Submit VMware credentials for the discovery process
135
+ */
136
+ submitCredentialsRaw(requestParameters, initOverrides) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ if (requestParameters['credentials'] == null) {
139
+ throw new runtime.RequiredError('credentials', 'Required parameter "credentials" was null or undefined when calling submitCredentials().');
140
+ }
141
+ const queryParameters = {};
142
+ const headerParameters = {};
143
+ headerParameters['Content-Type'] = 'application/json';
144
+ let urlPath = `/api/v1/credentials`;
145
+ const response = yield this.request({
146
+ path: urlPath,
147
+ method: 'PUT',
148
+ headers: headerParameters,
149
+ query: queryParameters,
150
+ body: CredentialsToJSON(requestParameters['credentials']),
151
+ }, initOverrides);
152
+ return new runtime.VoidApiResponse(response);
153
+ });
154
+ }
155
+ /**
156
+ * Submit VMware credentials for the discovery process
157
+ */
158
+ submitCredentials(requestParameters, initOverrides) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ yield this.submitCredentialsRaw(requestParameters, initOverrides);
161
+ });
162
+ }
163
+ }
@@ -0,0 +1,2 @@
1
+ export * from './AgentUiApi.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './AgentUiApi.js';
@@ -0,0 +1,4 @@
1
+ export * from './runtime.js';
2
+ export * from './apis/index.js';
3
+ export * from './models/index.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime.js';
4
+ export * from './apis/index.js';
5
+ export * from './models/index.js';
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Migration Planner Agent UI API
3
+ * API endpoints for the agent UI to interact with the migration discovery VM
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
+ /**
13
+ * VMware credentials for the discovery process
14
+ * @export
15
+ * @interface Credentials
16
+ */
17
+ export interface Credentials {
18
+ /**
19
+ * URL of the VMware vCenter server
20
+ * @type {string}
21
+ * @memberof Credentials
22
+ */
23
+ url: string;
24
+ /**
25
+ * Username for VMware authentication
26
+ * @type {string}
27
+ * @memberof Credentials
28
+ */
29
+ username: string;
30
+ /**
31
+ * Password for VMware authentication
32
+ * @type {string}
33
+ * @memberof Credentials
34
+ */
35
+ password: string;
36
+ /**
37
+ * Whether the user agrees to share aggregated data with Red Hat
38
+ * @type {boolean}
39
+ * @memberof Credentials
40
+ */
41
+ isDataSharingAllowed?: boolean;
42
+ }
43
+ /**
44
+ * Check if a given object implements the Credentials interface.
45
+ */
46
+ export declare function instanceOfCredentials(value: object): value is Credentials;
47
+ export declare function CredentialsFromJSON(json: any): Credentials;
48
+ export declare function CredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Credentials;
49
+ export declare function CredentialsToJSON(json: any): Credentials;
50
+ export declare function CredentialsToJSONTyped(value?: Credentials | null, ignoreDiscriminator?: boolean): any;
51
+ //# sourceMappingURL=Credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Credentials.d.ts","sourceRoot":"","sources":["../../src/models/Credentials.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAKzE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW,CAE1D;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,WAAW,CAW7F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW,CAExD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAY5G"}
@@ -0,0 +1,53 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner Agent UI API
5
+ * API endpoints for the agent UI to interact with the migration discovery VM
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
+ * Check if a given object implements the Credentials interface.
16
+ */
17
+ export function instanceOfCredentials(value) {
18
+ if (!('url' in value) || value['url'] === undefined)
19
+ return false;
20
+ if (!('username' in value) || value['username'] === undefined)
21
+ return false;
22
+ if (!('password' in value) || value['password'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function CredentialsFromJSON(json) {
27
+ return CredentialsFromJSONTyped(json, false);
28
+ }
29
+ export function CredentialsFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'url': json['url'],
35
+ 'username': json['username'],
36
+ 'password': json['password'],
37
+ 'isDataSharingAllowed': json['isDataSharingAllowed'] == null ? undefined : json['isDataSharingAllowed'],
38
+ };
39
+ }
40
+ export function CredentialsToJSON(json) {
41
+ return CredentialsToJSONTyped(json, false);
42
+ }
43
+ export function CredentialsToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'url': value['url'],
49
+ 'username': value['username'],
50
+ 'password': value['password'],
51
+ 'isDataSharingAllowed': value['isDataSharingAllowed'],
52
+ };
53
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Migration Planner Agent UI API
3
+ * API endpoints for the agent UI to interact with the migration discovery VM
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface Datastore
16
+ */
17
+ export interface Datastore {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof Datastore
22
+ */
23
+ type: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof Datastore
28
+ */
29
+ totalCapacityGB: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof Datastore
34
+ */
35
+ freeCapacityGB: number;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Datastore
40
+ */
41
+ vendor: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof Datastore
46
+ */
47
+ diskId: string;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof Datastore
52
+ */
53
+ hardwareAcceleratedMove: boolean;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof Datastore
58
+ */
59
+ protocolType: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof Datastore
64
+ */
65
+ model: string;
66
+ /**
67
+ * Identifier of the host where this datastore is attached
68
+ * @type {string}
69
+ * @memberof Datastore
70
+ */
71
+ hostId?: string | null;
72
+ }
73
+ /**
74
+ * Check if a given object implements the Datastore interface.
75
+ */
76
+ export declare function instanceOfDatastore(value: object): value is Datastore;
77
+ export declare function DatastoreFromJSON(json: any): Datastore;
78
+ export declare function DatastoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): Datastore;
79
+ export declare function DatastoreToJSON(json: any): Datastore;
80
+ export declare function DatastoreToJSONTyped(value?: Datastore | null, ignoreDiscriminator?: boolean): any;
81
+ //# sourceMappingURL=Datastore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Datastore.d.ts","sourceRoot":"","sources":["../../src/models/Datastore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAUrE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS,CAEtD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,SAAS,CAgBzF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS,CAEpD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAiBxG"}