@openshift-migration-advisor/agent-sdk 0.0.0-62ab9022d189

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 (267) hide show
  1. package/.openapi-generator/FILES +91 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +170 -0
  5. package/dist/apis/DefaultApi.d.ts +761 -0
  6. package/dist/apis/DefaultApi.js +878 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +19 -0
  9. package/dist/esm/apis/DefaultApi.d.ts +761 -0
  10. package/dist/esm/apis/DefaultApi.js +874 -0
  11. package/dist/esm/apis/index.d.ts +1 -0
  12. package/dist/esm/apis/index.js +3 -0
  13. package/dist/esm/index.d.ts +3 -0
  14. package/dist/esm/index.js +5 -0
  15. package/dist/esm/models/AgentModeRequest.d.ts +40 -0
  16. package/dist/esm/models/AgentModeRequest.js +50 -0
  17. package/dist/esm/models/AgentStatus.d.ts +60 -0
  18. package/dist/esm/models/AgentStatus.js +63 -0
  19. package/dist/esm/models/CollectorStartRequest.d.ts +44 -0
  20. package/dist/esm/models/CollectorStartRequest.js +51 -0
  21. package/dist/esm/models/CollectorStatus.d.ts +51 -0
  22. package/dist/esm/models/CollectorStatus.js +57 -0
  23. package/dist/esm/models/CreateGroupRequest.d.ts +50 -0
  24. package/dist/esm/models/CreateGroupRequest.js +51 -0
  25. package/dist/esm/models/Datastore.d.ts +80 -0
  26. package/dist/esm/models/Datastore.js +73 -0
  27. package/dist/esm/models/DiskSizeTierSummary.d.ts +38 -0
  28. package/dist/esm/models/DiskSizeTierSummary.js +47 -0
  29. package/dist/esm/models/DiskTypeSummary.d.ts +38 -0
  30. package/dist/esm/models/DiskTypeSummary.js +47 -0
  31. package/dist/esm/models/GetInventory200Response.d.ts +23 -0
  32. package/dist/esm/models/GetInventory200Response.js +51 -0
  33. package/dist/esm/models/Group.d.ts +68 -0
  34. package/dist/esm/models/Group.js +59 -0
  35. package/dist/esm/models/GroupListResponse.d.ts +51 -0
  36. package/dist/esm/models/GroupListResponse.js +56 -0
  37. package/dist/esm/models/GroupResponse.d.ts +58 -0
  38. package/dist/esm/models/GroupResponse.js +61 -0
  39. package/dist/esm/models/GuestNetwork.d.ts +56 -0
  40. package/dist/esm/models/GuestNetwork.js +49 -0
  41. package/dist/esm/models/Histogram.d.ts +44 -0
  42. package/dist/esm/models/Histogram.js +51 -0
  43. package/dist/esm/models/Host.d.ts +62 -0
  44. package/dist/esm/models/Host.js +55 -0
  45. package/dist/esm/models/Infra.d.ts +106 -0
  46. package/dist/esm/models/Infra.js +74 -0
  47. package/dist/esm/models/InspectorStartRequest.d.ts +39 -0
  48. package/dist/esm/models/InspectorStartRequest.js +48 -0
  49. package/dist/esm/models/InspectorStatus.d.ts +51 -0
  50. package/dist/esm/models/InspectorStatus.js +57 -0
  51. package/dist/esm/models/Inventory.d.ts +47 -0
  52. package/dist/esm/models/Inventory.js +51 -0
  53. package/dist/esm/models/InventoryData.d.ts +47 -0
  54. package/dist/esm/models/InventoryData.js +52 -0
  55. package/dist/esm/models/MigrationIssue.d.ts +50 -0
  56. package/dist/esm/models/MigrationIssue.js +53 -0
  57. package/dist/esm/models/Network.d.ts +66 -0
  58. package/dist/esm/models/Network.js +62 -0
  59. package/dist/esm/models/OsInfo.d.ts +44 -0
  60. package/dist/esm/models/OsInfo.js +49 -0
  61. package/dist/esm/models/UpdateGroupRequest.d.ts +50 -0
  62. package/dist/esm/models/UpdateGroupRequest.js +47 -0
  63. package/dist/esm/models/UpdateInventory.d.ts +39 -0
  64. package/dist/esm/models/UpdateInventory.js +48 -0
  65. package/dist/esm/models/VCenter.d.ts +32 -0
  66. package/dist/esm/models/VCenter.js +43 -0
  67. package/dist/esm/models/VMDevice.d.ts +32 -0
  68. package/dist/esm/models/VMDevice.js +41 -0
  69. package/dist/esm/models/VMDisk.d.ts +68 -0
  70. package/dist/esm/models/VMDisk.js +53 -0
  71. package/dist/esm/models/VMIssue.d.ts +56 -0
  72. package/dist/esm/models/VMIssue.js +62 -0
  73. package/dist/esm/models/VMNIC.d.ts +44 -0
  74. package/dist/esm/models/VMNIC.js +45 -0
  75. package/dist/esm/models/VMResourceBreakdown.d.ts +58 -0
  76. package/dist/esm/models/VMResourceBreakdown.js +58 -0
  77. package/dist/esm/models/VMs.d.ts +170 -0
  78. package/dist/esm/models/VMs.js +103 -0
  79. package/dist/esm/models/VcenterCredentials.d.ts +44 -0
  80. package/dist/esm/models/VcenterCredentials.js +51 -0
  81. package/dist/esm/models/VddkPost200Response.d.ts +38 -0
  82. package/dist/esm/models/VddkPost200Response.js +47 -0
  83. package/dist/esm/models/VersionInfo.d.ts +44 -0
  84. package/dist/esm/models/VersionInfo.js +51 -0
  85. package/dist/esm/models/VirtualMachine.d.ts +99 -0
  86. package/dist/esm/models/VirtualMachine.js +82 -0
  87. package/dist/esm/models/VirtualMachineDetail.d.ts +218 -0
  88. package/dist/esm/models/VirtualMachineDetail.js +125 -0
  89. package/dist/esm/models/VirtualMachineListResponse.d.ts +51 -0
  90. package/dist/esm/models/VirtualMachineListResponse.js +56 -0
  91. package/dist/esm/models/VmInspectionStatus.d.ts +56 -0
  92. package/dist/esm/models/VmInspectionStatus.js +58 -0
  93. package/dist/esm/models/index.d.ts +39 -0
  94. package/dist/esm/models/index.js +41 -0
  95. package/dist/esm/runtime.d.ts +184 -0
  96. package/dist/esm/runtime.js +349 -0
  97. package/dist/index.d.ts +3 -0
  98. package/dist/index.js +21 -0
  99. package/dist/models/AgentModeRequest.d.ts +40 -0
  100. package/dist/models/AgentModeRequest.js +58 -0
  101. package/dist/models/AgentStatus.d.ts +60 -0
  102. package/dist/models/AgentStatus.js +71 -0
  103. package/dist/models/CollectorStartRequest.d.ts +44 -0
  104. package/dist/models/CollectorStartRequest.js +58 -0
  105. package/dist/models/CollectorStatus.d.ts +51 -0
  106. package/dist/models/CollectorStatus.js +65 -0
  107. package/dist/models/CreateGroupRequest.d.ts +50 -0
  108. package/dist/models/CreateGroupRequest.js +58 -0
  109. package/dist/models/Datastore.d.ts +80 -0
  110. package/dist/models/Datastore.js +80 -0
  111. package/dist/models/DiskSizeTierSummary.d.ts +38 -0
  112. package/dist/models/DiskSizeTierSummary.js +54 -0
  113. package/dist/models/DiskTypeSummary.d.ts +38 -0
  114. package/dist/models/DiskTypeSummary.js +54 -0
  115. package/dist/models/GetInventory200Response.d.ts +23 -0
  116. package/dist/models/GetInventory200Response.js +57 -0
  117. package/dist/models/Group.d.ts +68 -0
  118. package/dist/models/Group.js +66 -0
  119. package/dist/models/GroupListResponse.d.ts +51 -0
  120. package/dist/models/GroupListResponse.js +63 -0
  121. package/dist/models/GroupResponse.d.ts +58 -0
  122. package/dist/models/GroupResponse.js +68 -0
  123. package/dist/models/GuestNetwork.d.ts +56 -0
  124. package/dist/models/GuestNetwork.js +56 -0
  125. package/dist/models/Histogram.d.ts +44 -0
  126. package/dist/models/Histogram.js +58 -0
  127. package/dist/models/Host.d.ts +62 -0
  128. package/dist/models/Host.js +62 -0
  129. package/dist/models/Infra.d.ts +106 -0
  130. package/dist/models/Infra.js +81 -0
  131. package/dist/models/InspectorStartRequest.d.ts +39 -0
  132. package/dist/models/InspectorStartRequest.js +55 -0
  133. package/dist/models/InspectorStatus.d.ts +51 -0
  134. package/dist/models/InspectorStatus.js +65 -0
  135. package/dist/models/Inventory.d.ts +47 -0
  136. package/dist/models/Inventory.js +58 -0
  137. package/dist/models/InventoryData.d.ts +47 -0
  138. package/dist/models/InventoryData.js +59 -0
  139. package/dist/models/MigrationIssue.d.ts +50 -0
  140. package/dist/models/MigrationIssue.js +60 -0
  141. package/dist/models/Network.d.ts +66 -0
  142. package/dist/models/Network.js +70 -0
  143. package/dist/models/OsInfo.d.ts +44 -0
  144. package/dist/models/OsInfo.js +56 -0
  145. package/dist/models/UpdateGroupRequest.d.ts +50 -0
  146. package/dist/models/UpdateGroupRequest.js +54 -0
  147. package/dist/models/UpdateInventory.d.ts +39 -0
  148. package/dist/models/UpdateInventory.js +55 -0
  149. package/dist/models/VCenter.d.ts +32 -0
  150. package/dist/models/VCenter.js +50 -0
  151. package/dist/models/VMDevice.d.ts +32 -0
  152. package/dist/models/VMDevice.js +48 -0
  153. package/dist/models/VMDisk.d.ts +68 -0
  154. package/dist/models/VMDisk.js +60 -0
  155. package/dist/models/VMIssue.d.ts +56 -0
  156. package/dist/models/VMIssue.js +70 -0
  157. package/dist/models/VMNIC.d.ts +44 -0
  158. package/dist/models/VMNIC.js +52 -0
  159. package/dist/models/VMResourceBreakdown.d.ts +58 -0
  160. package/dist/models/VMResourceBreakdown.js +65 -0
  161. package/dist/models/VMs.d.ts +170 -0
  162. package/dist/models/VMs.js +110 -0
  163. package/dist/models/VcenterCredentials.d.ts +44 -0
  164. package/dist/models/VcenterCredentials.js +58 -0
  165. package/dist/models/VddkPost200Response.d.ts +38 -0
  166. package/dist/models/VddkPost200Response.js +54 -0
  167. package/dist/models/VersionInfo.d.ts +44 -0
  168. package/dist/models/VersionInfo.js +58 -0
  169. package/dist/models/VirtualMachine.d.ts +99 -0
  170. package/dist/models/VirtualMachine.js +89 -0
  171. package/dist/models/VirtualMachineDetail.d.ts +218 -0
  172. package/dist/models/VirtualMachineDetail.js +132 -0
  173. package/dist/models/VirtualMachineListResponse.d.ts +51 -0
  174. package/dist/models/VirtualMachineListResponse.js +63 -0
  175. package/dist/models/VmInspectionStatus.d.ts +56 -0
  176. package/dist/models/VmInspectionStatus.js +66 -0
  177. package/dist/models/index.d.ts +39 -0
  178. package/dist/models/index.js +57 -0
  179. package/dist/runtime.d.ts +184 -0
  180. package/dist/runtime.js +365 -0
  181. package/docs/AgentModeRequest.md +34 -0
  182. package/docs/AgentStatus.md +38 -0
  183. package/docs/CollectorStartRequest.md +38 -0
  184. package/docs/CollectorStatus.md +36 -0
  185. package/docs/CreateGroupRequest.md +40 -0
  186. package/docs/Datastore.md +50 -0
  187. package/docs/DefaultApi.md +1419 -0
  188. package/docs/DiskSizeTierSummary.md +36 -0
  189. package/docs/DiskTypeSummary.md +36 -0
  190. package/docs/GetInventory200Response.md +42 -0
  191. package/docs/Group.md +46 -0
  192. package/docs/GroupListResponse.md +40 -0
  193. package/docs/GroupResponse.md +42 -0
  194. package/docs/GuestNetwork.md +42 -0
  195. package/docs/Histogram.md +38 -0
  196. package/docs/Host.md +44 -0
  197. package/docs/Infra.md +56 -0
  198. package/docs/InspectorStartRequest.md +36 -0
  199. package/docs/InspectorStatus.md +36 -0
  200. package/docs/Inventory.md +38 -0
  201. package/docs/InventoryData.md +38 -0
  202. package/docs/MigrationIssue.md +40 -0
  203. package/docs/Network.md +42 -0
  204. package/docs/OsInfo.md +38 -0
  205. package/docs/UpdateGroupRequest.md +40 -0
  206. package/docs/UpdateInventory.md +36 -0
  207. package/docs/VCenter.md +34 -0
  208. package/docs/VMDevice.md +34 -0
  209. package/docs/VMDisk.md +46 -0
  210. package/docs/VMIssue.md +38 -0
  211. package/docs/VMNIC.md +38 -0
  212. package/docs/VMResourceBreakdown.md +42 -0
  213. package/docs/VMs.md +72 -0
  214. package/docs/VcenterCredentials.md +38 -0
  215. package/docs/VddkPost200Response.md +36 -0
  216. package/docs/VersionInfo.md +38 -0
  217. package/docs/VirtualMachine.md +56 -0
  218. package/docs/VirtualMachineDetail.md +94 -0
  219. package/docs/VirtualMachineListResponse.md +40 -0
  220. package/docs/VmInspectionStatus.md +38 -0
  221. package/package.json +22 -0
  222. package/src/apis/DefaultApi.ts +1607 -0
  223. package/src/apis/index.ts +3 -0
  224. package/src/index.ts +5 -0
  225. package/src/models/AgentModeRequest.ts +77 -0
  226. package/src/models/AgentStatus.ts +103 -0
  227. package/src/models/CollectorStartRequest.ts +84 -0
  228. package/src/models/CollectorStatus.ts +90 -0
  229. package/src/models/CreateGroupRequest.ts +91 -0
  230. package/src/models/Datastore.ts +137 -0
  231. package/src/models/DiskSizeTierSummary.ts +75 -0
  232. package/src/models/DiskTypeSummary.ts +75 -0
  233. package/src/models/GetInventory200Response.ts +76 -0
  234. package/src/models/Group.ts +116 -0
  235. package/src/models/GroupListResponse.ts +101 -0
  236. package/src/models/GroupResponse.ts +117 -0
  237. package/src/models/GuestNetwork.ts +97 -0
  238. package/src/models/Histogram.ts +84 -0
  239. package/src/models/Host.ts +107 -0
  240. package/src/models/Infra.ts +182 -0
  241. package/src/models/InspectorStartRequest.ts +83 -0
  242. package/src/models/InspectorStatus.ts +90 -0
  243. package/src/models/Inventory.ts +91 -0
  244. package/src/models/InventoryData.ts +105 -0
  245. package/src/models/MigrationIssue.ts +92 -0
  246. package/src/models/Network.ts +112 -0
  247. package/src/models/OsInfo.ts +83 -0
  248. package/src/models/UpdateGroupRequest.ts +89 -0
  249. package/src/models/UpdateInventory.ts +83 -0
  250. package/src/models/VCenter.ts +66 -0
  251. package/src/models/VMDevice.ts +65 -0
  252. package/src/models/VMDisk.ts +113 -0
  253. package/src/models/VMIssue.ts +99 -0
  254. package/src/models/VMNIC.ts +81 -0
  255. package/src/models/VMResourceBreakdown.ts +110 -0
  256. package/src/models/VMs.ts +263 -0
  257. package/src/models/VcenterCredentials.ts +84 -0
  258. package/src/models/VddkPost200Response.ts +75 -0
  259. package/src/models/VersionInfo.ts +84 -0
  260. package/src/models/VirtualMachine.ts +170 -0
  261. package/src/models/VirtualMachineDetail.ts +357 -0
  262. package/src/models/VirtualMachineListResponse.ts +101 -0
  263. package/src/models/VmInspectionStatus.ts +97 -0
  264. package/src/models/index.ts +41 -0
  265. package/src/runtime.ts +450 -0
  266. package/tsconfig.esm.json +7 -0
  267. package/tsconfig.json +16 -0
@@ -0,0 +1,101 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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.js';
16
+ import type { VirtualMachine } from './VirtualMachine.js';
17
+ import {
18
+ VirtualMachineFromJSON,
19
+ VirtualMachineFromJSONTyped,
20
+ VirtualMachineToJSON,
21
+ VirtualMachineToJSONTyped,
22
+ } from './VirtualMachine.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface VirtualMachineListResponse
28
+ */
29
+ export interface VirtualMachineListResponse {
30
+ /**
31
+ *
32
+ * @type {Array<VirtualMachine>}
33
+ * @memberof VirtualMachineListResponse
34
+ */
35
+ vms: Array<VirtualMachine>;
36
+ /**
37
+ * Total number of VMs matching the filter
38
+ * @type {number}
39
+ * @memberof VirtualMachineListResponse
40
+ */
41
+ total: number;
42
+ /**
43
+ * Current page number
44
+ * @type {number}
45
+ * @memberof VirtualMachineListResponse
46
+ */
47
+ page: number;
48
+ /**
49
+ * Total number of pages
50
+ * @type {number}
51
+ * @memberof VirtualMachineListResponse
52
+ */
53
+ pageCount: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the VirtualMachineListResponse interface.
58
+ */
59
+ export function instanceOfVirtualMachineListResponse(value: object): value is VirtualMachineListResponse {
60
+ if (!('vms' in value) || value['vms'] === undefined) return false;
61
+ if (!('total' in value) || value['total'] === undefined) return false;
62
+ if (!('page' in value) || value['page'] === undefined) return false;
63
+ if (!('pageCount' in value) || value['pageCount'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function VirtualMachineListResponseFromJSON(json: any): VirtualMachineListResponse {
68
+ return VirtualMachineListResponseFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function VirtualMachineListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualMachineListResponse {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'vms': ((json['vms'] as Array<any>).map(VirtualMachineFromJSON)),
78
+ 'total': json['total'],
79
+ 'page': json['page'],
80
+ 'pageCount': json['pageCount'],
81
+ };
82
+ }
83
+
84
+ export function VirtualMachineListResponseToJSON(json: any): VirtualMachineListResponse {
85
+ return VirtualMachineListResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function VirtualMachineListResponseToJSONTyped(value?: VirtualMachineListResponse | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'vms': ((value['vms'] as Array<any>).map(VirtualMachineToJSON)),
96
+ 'total': value['total'],
97
+ 'page': value['page'],
98
+ 'pageCount': value['pageCount'],
99
+ };
100
+ }
101
+
@@ -0,0 +1,97 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface VmInspectionStatus
20
+ */
21
+ export interface VmInspectionStatus {
22
+ /**
23
+ * Current inspection state
24
+ * @type {VmInspectionStatusStateEnum}
25
+ * @memberof VmInspectionStatus
26
+ */
27
+ state: VmInspectionStatusStateEnum;
28
+ /**
29
+ * Error message when state is error
30
+ * @type {string}
31
+ * @memberof VmInspectionStatus
32
+ */
33
+ error?: string;
34
+ /**
35
+ * Inspection results
36
+ * @type {object}
37
+ * @memberof VmInspectionStatus
38
+ */
39
+ results?: object;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const VmInspectionStatusStateEnum = {
47
+ VmInspectionStatusStatePending: 'pending',
48
+ VmInspectionStatusStateRunning: 'running',
49
+ VmInspectionStatusStateCompleted: 'completed',
50
+ VmInspectionStatusStateCanceled: 'canceled',
51
+ VmInspectionStatusStateError: 'error',
52
+ VmInspectionStatusStateNotFound: 'not_found'
53
+ } as const;
54
+ export type VmInspectionStatusStateEnum = typeof VmInspectionStatusStateEnum[keyof typeof VmInspectionStatusStateEnum];
55
+
56
+
57
+ /**
58
+ * Check if a given object implements the VmInspectionStatus interface.
59
+ */
60
+ export function instanceOfVmInspectionStatus(value: object): value is VmInspectionStatus {
61
+ if (!('state' in value) || value['state'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function VmInspectionStatusFromJSON(json: any): VmInspectionStatus {
66
+ return VmInspectionStatusFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function VmInspectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): VmInspectionStatus {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'state': json['state'],
76
+ 'error': json['error'] == null ? undefined : json['error'],
77
+ 'results': json['results'] == null ? undefined : json['results'],
78
+ };
79
+ }
80
+
81
+ export function VmInspectionStatusToJSON(json: any): VmInspectionStatus {
82
+ return VmInspectionStatusToJSONTyped(json, false);
83
+ }
84
+
85
+ export function VmInspectionStatusToJSONTyped(value?: VmInspectionStatus | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'state': value['state'],
93
+ 'error': value['error'],
94
+ 'results': value['results'],
95
+ };
96
+ }
97
+
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './AgentModeRequest.js';
4
+ export * from './AgentStatus.js';
5
+ export * from './CollectorStartRequest.js';
6
+ export * from './CollectorStatus.js';
7
+ export * from './CreateGroupRequest.js';
8
+ export * from './Datastore.js';
9
+ export * from './DiskSizeTierSummary.js';
10
+ export * from './DiskTypeSummary.js';
11
+ export * from './GetInventory200Response.js';
12
+ export * from './Group.js';
13
+ export * from './GroupListResponse.js';
14
+ export * from './GroupResponse.js';
15
+ export * from './GuestNetwork.js';
16
+ export * from './Histogram.js';
17
+ export * from './Host.js';
18
+ export * from './Infra.js';
19
+ export * from './InspectorStartRequest.js';
20
+ export * from './InspectorStatus.js';
21
+ export * from './Inventory.js';
22
+ export * from './InventoryData.js';
23
+ export * from './MigrationIssue.js';
24
+ export * from './Network.js';
25
+ export * from './OsInfo.js';
26
+ export * from './UpdateGroupRequest.js';
27
+ export * from './UpdateInventory.js';
28
+ export * from './VCenter.js';
29
+ export * from './VMDevice.js';
30
+ export * from './VMDisk.js';
31
+ export * from './VMIssue.js';
32
+ export * from './VMNIC.js';
33
+ export * from './VMResourceBreakdown.js';
34
+ export * from './VMs.js';
35
+ export * from './VcenterCredentials.js';
36
+ export * from './VddkPost200Response.js';
37
+ export * from './VersionInfo.js';
38
+ export * from './VirtualMachine.js';
39
+ export * from './VirtualMachineDetail.js';
40
+ export * from './VirtualMachineListResponse.js';
41
+ export * from './VmInspectionStatus.js';
package/src/runtime.ts ADDED
@@ -0,0 +1,450 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ export const BASE_PATH = "https://raw.githubusercontent.com/api/v1".replace(/\/+$/, "");
17
+
18
+ export interface ConfigurationParameters {
19
+ basePath?: string; // override base path
20
+ fetchApi?: FetchAPI; // override for fetch implementation
21
+ middleware?: Middleware[]; // middleware to apply before/after fetch requests
22
+ queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
23
+ username?: string; // parameter for basic security
24
+ password?: string; // parameter for basic security
25
+ apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
26
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
27
+ headers?: HTTPHeaders; //header params we want to use on every request
28
+ credentials?: RequestCredentials; //value for the credentials param we want to use on each request
29
+ }
30
+
31
+ export class Configuration {
32
+ constructor(private configuration: ConfigurationParameters = {}) {}
33
+
34
+ set config(configuration: Configuration) {
35
+ this.configuration = configuration;
36
+ }
37
+
38
+ get basePath(): string {
39
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
40
+ }
41
+
42
+ get fetchApi(): FetchAPI | undefined {
43
+ return this.configuration.fetchApi;
44
+ }
45
+
46
+ get middleware(): Middleware[] {
47
+ return this.configuration.middleware || [];
48
+ }
49
+
50
+ get queryParamsStringify(): (params: HTTPQuery) => string {
51
+ return this.configuration.queryParamsStringify || querystring;
52
+ }
53
+
54
+ get username(): string | undefined {
55
+ return this.configuration.username;
56
+ }
57
+
58
+ get password(): string | undefined {
59
+ return this.configuration.password;
60
+ }
61
+
62
+ get apiKey(): ((name: string) => string | Promise<string>) | undefined {
63
+ const apiKey = this.configuration.apiKey;
64
+ if (apiKey) {
65
+ return typeof apiKey === 'function' ? apiKey : () => apiKey;
66
+ }
67
+ return undefined;
68
+ }
69
+
70
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined {
71
+ const accessToken = this.configuration.accessToken;
72
+ if (accessToken) {
73
+ return typeof accessToken === 'function' ? accessToken : async () => accessToken;
74
+ }
75
+ return undefined;
76
+ }
77
+
78
+ get headers(): HTTPHeaders | undefined {
79
+ return this.configuration.headers;
80
+ }
81
+
82
+ get credentials(): RequestCredentials | undefined {
83
+ return this.configuration.credentials;
84
+ }
85
+ }
86
+
87
+ export const DefaultConfig = new Configuration();
88
+
89
+ /**
90
+ * This is the base class for all generated API classes.
91
+ */
92
+ export class BaseAPI {
93
+
94
+ private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
95
+ private middleware: Middleware[];
96
+
97
+ constructor(protected configuration = DefaultConfig) {
98
+ this.middleware = configuration.middleware;
99
+ }
100
+
101
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
102
+ const next = this.clone<T>();
103
+ next.middleware = next.middleware.concat(...middlewares);
104
+ return next;
105
+ }
106
+
107
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
108
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
109
+ return this.withMiddleware<T>(...middlewares);
110
+ }
111
+
112
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
113
+ const middlewares = postMiddlewares.map((post) => ({ post }));
114
+ return this.withMiddleware<T>(...middlewares);
115
+ }
116
+
117
+ /**
118
+ * Check if the given MIME is a JSON MIME.
119
+ * JSON MIME examples:
120
+ * application/json
121
+ * application/json; charset=UTF8
122
+ * APPLICATION/JSON
123
+ * application/vnd.company+json
124
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
125
+ * @return True if the given MIME is JSON, false otherwise.
126
+ */
127
+ protected isJsonMime(mime: string | null | undefined): boolean {
128
+ if (!mime) {
129
+ return false;
130
+ }
131
+ return BaseAPI.jsonRegex.test(mime);
132
+ }
133
+
134
+ protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response> {
135
+ const { url, init } = await this.createFetchParams(context, initOverrides);
136
+ const response = await this.fetchApi(url, init);
137
+ if (response && (response.status >= 200 && response.status < 300)) {
138
+ return response;
139
+ }
140
+ throw new ResponseError(response, 'Response returned an error code');
141
+ }
142
+
143
+ private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
144
+ let url = this.configuration.basePath + context.path;
145
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
146
+ // only add the querystring to the URL if there are query parameters.
147
+ // this is done to avoid urls ending with a "?" character which buggy webservers
148
+ // do not handle correctly sometimes.
149
+ url += '?' + this.configuration.queryParamsStringify(context.query);
150
+ }
151
+
152
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
153
+ Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
154
+
155
+ const initOverrideFn =
156
+ typeof initOverrides === "function"
157
+ ? initOverrides
158
+ : async () => initOverrides;
159
+
160
+ const initParams = {
161
+ method: context.method,
162
+ headers,
163
+ body: context.body,
164
+ credentials: this.configuration.credentials,
165
+ };
166
+
167
+ const overriddenInit: RequestInit = {
168
+ ...initParams,
169
+ ...(await initOverrideFn({
170
+ init: initParams,
171
+ context,
172
+ }))
173
+ };
174
+
175
+ let body: any;
176
+ if (isFormData(overriddenInit.body)
177
+ || (overriddenInit.body instanceof URLSearchParams)
178
+ || isBlob(overriddenInit.body)) {
179
+ body = overriddenInit.body;
180
+ } else if (this.isJsonMime(headers['Content-Type'])) {
181
+ body = JSON.stringify(overriddenInit.body);
182
+ } else {
183
+ body = overriddenInit.body;
184
+ }
185
+
186
+ const init: RequestInit = {
187
+ ...overriddenInit,
188
+ body
189
+ };
190
+
191
+ return { url, init };
192
+ }
193
+
194
+ private fetchApi = async (url: string, init: RequestInit) => {
195
+ let fetchParams = { url, init };
196
+ for (const middleware of this.middleware) {
197
+ if (middleware.pre) {
198
+ fetchParams = await middleware.pre({
199
+ fetch: this.fetchApi,
200
+ ...fetchParams,
201
+ }) || fetchParams;
202
+ }
203
+ }
204
+ let response: Response | undefined = undefined;
205
+ try {
206
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
207
+ } catch (e) {
208
+ for (const middleware of this.middleware) {
209
+ if (middleware.onError) {
210
+ response = await middleware.onError({
211
+ fetch: this.fetchApi,
212
+ url: fetchParams.url,
213
+ init: fetchParams.init,
214
+ error: e,
215
+ response: response ? response.clone() : undefined,
216
+ }) || response;
217
+ }
218
+ }
219
+ if (response === undefined) {
220
+ if (e instanceof Error) {
221
+ throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
222
+ } else {
223
+ throw e;
224
+ }
225
+ }
226
+ }
227
+ for (const middleware of this.middleware) {
228
+ if (middleware.post) {
229
+ response = await middleware.post({
230
+ fetch: this.fetchApi,
231
+ url: fetchParams.url,
232
+ init: fetchParams.init,
233
+ response: response.clone(),
234
+ }) || response;
235
+ }
236
+ }
237
+ return response;
238
+ }
239
+
240
+ /**
241
+ * Create a shallow clone of `this` by constructing a new instance
242
+ * and then shallow cloning data members.
243
+ */
244
+ private clone<T extends BaseAPI>(this: T): T {
245
+ const constructor = this.constructor as any;
246
+ const next = new constructor(this.configuration);
247
+ next.middleware = this.middleware.slice();
248
+ return next;
249
+ }
250
+ };
251
+
252
+ function isBlob(value: any): value is Blob {
253
+ return typeof Blob !== 'undefined' && value instanceof Blob;
254
+ }
255
+
256
+ function isFormData(value: any): value is FormData {
257
+ return typeof FormData !== "undefined" && value instanceof FormData;
258
+ }
259
+
260
+ export class ResponseError extends Error {
261
+ override name: "ResponseError" = "ResponseError";
262
+ constructor(public response: Response, msg?: string) {
263
+ super(msg);
264
+
265
+ // restore prototype chain
266
+ const actualProto = new.target.prototype;
267
+ if (Object.setPrototypeOf) {
268
+ Object.setPrototypeOf(this, actualProto);
269
+ }
270
+ }
271
+ }
272
+
273
+ export class FetchError extends Error {
274
+ override name: "FetchError" = "FetchError";
275
+ constructor(public cause: Error, msg?: string) {
276
+ super(msg);
277
+
278
+ // restore prototype chain
279
+ const actualProto = new.target.prototype;
280
+ if (Object.setPrototypeOf) {
281
+ Object.setPrototypeOf(this, actualProto);
282
+ }
283
+ }
284
+ }
285
+
286
+ export class RequiredError extends Error {
287
+ override name: "RequiredError" = "RequiredError";
288
+ constructor(public field: string, msg?: string) {
289
+ super(msg);
290
+
291
+ // restore prototype chain
292
+ const actualProto = new.target.prototype;
293
+ if (Object.setPrototypeOf) {
294
+ Object.setPrototypeOf(this, actualProto);
295
+ }
296
+ }
297
+ }
298
+
299
+ export const COLLECTION_FORMATS = {
300
+ csv: ",",
301
+ ssv: " ",
302
+ tsv: "\t",
303
+ pipes: "|",
304
+ };
305
+
306
+ export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
307
+
308
+ export type Json = any;
309
+ export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
310
+ export type HTTPHeaders = { [key: string]: string };
311
+ export type HTTPQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery };
312
+ export type HTTPBody = Json | FormData | URLSearchParams;
313
+ export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody };
314
+ export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
315
+
316
+ export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>
317
+
318
+ export interface FetchParams {
319
+ url: string;
320
+ init: RequestInit;
321
+ }
322
+
323
+ export interface RequestOpts {
324
+ path: string;
325
+ method: HTTPMethod;
326
+ headers: HTTPHeaders;
327
+ query?: HTTPQuery;
328
+ body?: HTTPBody;
329
+ }
330
+
331
+ export function querystring(params: HTTPQuery, prefix: string = ''): string {
332
+ return Object.keys(params)
333
+ .map(key => querystringSingleKey(key, params[key], prefix))
334
+ .filter(part => part.length > 0)
335
+ .join('&');
336
+ }
337
+
338
+ function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
339
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
340
+ if (value instanceof Array) {
341
+ const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
342
+ .join(`&${encodeURIComponent(fullKey)}=`);
343
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
344
+ }
345
+ if (value instanceof Set) {
346
+ const valueAsArray = Array.from(value);
347
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
348
+ }
349
+ if (value instanceof Date) {
350
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
351
+ }
352
+ if (value instanceof Object) {
353
+ return querystring(value as HTTPQuery, fullKey);
354
+ }
355
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
356
+ }
357
+
358
+ export function exists(json: any, key: string) {
359
+ const value = json[key];
360
+ return value !== null && value !== undefined;
361
+ }
362
+
363
+ export function mapValues(data: any, fn: (item: any) => any) {
364
+ const result: { [key: string]: any } = {};
365
+ for (const key of Object.keys(data)) {
366
+ result[key] = fn(data[key]);
367
+ }
368
+ return result;
369
+ }
370
+
371
+ export function canConsumeForm(consumes: Consume[]): boolean {
372
+ for (const consume of consumes) {
373
+ if ('multipart/form-data' === consume.contentType) {
374
+ return true;
375
+ }
376
+ }
377
+ return false;
378
+ }
379
+
380
+ export interface Consume {
381
+ contentType: string;
382
+ }
383
+
384
+ export interface RequestContext {
385
+ fetch: FetchAPI;
386
+ url: string;
387
+ init: RequestInit;
388
+ }
389
+
390
+ export interface ResponseContext {
391
+ fetch: FetchAPI;
392
+ url: string;
393
+ init: RequestInit;
394
+ response: Response;
395
+ }
396
+
397
+ export interface ErrorContext {
398
+ fetch: FetchAPI;
399
+ url: string;
400
+ init: RequestInit;
401
+ error: unknown;
402
+ response?: Response;
403
+ }
404
+
405
+ export interface Middleware {
406
+ pre?(context: RequestContext): Promise<FetchParams | void>;
407
+ post?(context: ResponseContext): Promise<Response | void>;
408
+ onError?(context: ErrorContext): Promise<Response | void>;
409
+ }
410
+
411
+ export interface ApiResponse<T> {
412
+ raw: Response;
413
+ value(): Promise<T>;
414
+ }
415
+
416
+ export interface ResponseTransformer<T> {
417
+ (json: any): T;
418
+ }
419
+
420
+ export class JSONApiResponse<T> {
421
+ constructor(public raw: Response, private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue) {}
422
+
423
+ async value(): Promise<T> {
424
+ return this.transformer(await this.raw.json());
425
+ }
426
+ }
427
+
428
+ export class VoidApiResponse {
429
+ constructor(public raw: Response) {}
430
+
431
+ async value(): Promise<void> {
432
+ return undefined;
433
+ }
434
+ }
435
+
436
+ export class BlobApiResponse {
437
+ constructor(public raw: Response) {}
438
+
439
+ async value(): Promise<Blob> {
440
+ return await this.raw.blob();
441
+ };
442
+ }
443
+
444
+ export class TextApiResponse {
445
+ constructor(public raw: Response) {}
446
+
447
+ async value(): Promise<string> {
448
+ return await this.raw.text();
449
+ };
450
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "esnext",
5
+ "outDir": "dist/esm"
6
+ }
7
+ }