@openshift-migration-advisor/planner-sdk 0.27.0 → 0.28.0-187c2d948808
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +16 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +19 -3
- package/dist/apis/AssessmentApi.d.ts +257 -0
- package/dist/apis/AssessmentApi.js +257 -0
- package/dist/apis/ImageApi.d.ts +14 -0
- package/dist/apis/ImageApi.js +11 -1
- package/dist/apis/JobApi.d.ts +86 -0
- package/dist/apis/JobApi.js +124 -0
- package/dist/esm/apis/AssessmentApi.d.ts +257 -0
- package/dist/esm/apis/AssessmentApi.js +257 -0
- package/dist/esm/apis/ImageApi.d.ts +14 -0
- package/dist/esm/apis/ImageApi.js +10 -0
- package/dist/esm/apis/JobApi.d.ts +86 -0
- package/dist/esm/apis/JobApi.js +124 -0
- package/dist/esm/models/AssessmentV2.d.ts +36 -0
- package/dist/esm/models/AssessmentV2.js +49 -0
- package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/esm/models/AssessmentV2Summary.js +99 -0
- package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/esm/models/AssessmentVCenterV2.js +49 -0
- package/dist/esm/models/Datastore.d.ts +18 -2
- package/dist/esm/models/Datastore.js +8 -0
- package/dist/esm/models/Host.d.ts +26 -0
- package/dist/esm/models/Host.js +14 -0
- package/dist/esm/models/HostStorageAdapter.d.ts +58 -0
- package/dist/esm/models/HostStorageAdapter.js +55 -0
- package/dist/esm/models/HostStorageLun.d.ts +50 -0
- package/dist/esm/models/HostStorageLun.js +51 -0
- package/dist/esm/models/Info.d.ts +4 -0
- package/dist/esm/models/Info.js +2 -0
- package/dist/esm/models/Inventory.d.ts +5 -1
- package/dist/esm/models/Inventory.js +2 -0
- package/dist/esm/models/InventoryV2.d.ts +47 -0
- package/dist/esm/models/InventoryV2.js +55 -0
- package/dist/esm/models/OsInfo.d.ts +12 -0
- package/dist/esm/models/OsInfo.js +9 -0
- package/dist/esm/models/SourceType.d.ts +26 -0
- package/dist/esm/models/SourceType.js +44 -0
- package/dist/esm/models/SubResource.d.ts +30 -0
- package/dist/esm/models/SubResource.js +43 -0
- package/dist/esm/models/VsphereCoreInput.d.ts +8 -0
- package/dist/esm/models/VsphereCoreInput.js +4 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/runtime.js +4 -3
- package/dist/models/AssessmentV2.d.ts +36 -0
- package/dist/models/AssessmentV2.js +56 -0
- package/dist/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/models/AssessmentV2Summary.js +107 -0
- package/dist/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/models/AssessmentVCenterV2.js +56 -0
- package/dist/models/Datastore.d.ts +18 -2
- package/dist/models/Datastore.js +8 -0
- package/dist/models/Host.d.ts +26 -0
- package/dist/models/Host.js +14 -0
- package/dist/models/HostStorageAdapter.d.ts +58 -0
- package/dist/models/HostStorageAdapter.js +62 -0
- package/dist/models/HostStorageLun.d.ts +50 -0
- package/dist/models/HostStorageLun.js +58 -0
- package/dist/models/Info.d.ts +4 -0
- package/dist/models/Info.js +2 -0
- package/dist/models/Inventory.d.ts +5 -1
- package/dist/models/Inventory.js +2 -0
- package/dist/models/InventoryV2.d.ts +47 -0
- package/dist/models/InventoryV2.js +62 -0
- package/dist/models/OsInfo.d.ts +12 -0
- package/dist/models/OsInfo.js +10 -1
- package/dist/models/SourceType.d.ts +26 -0
- package/dist/models/SourceType.js +52 -0
- package/dist/models/SubResource.d.ts +30 -0
- package/dist/models/SubResource.js +50 -0
- package/dist/models/VsphereCoreInput.d.ts +8 -0
- package/dist/models/VsphereCoreInput.js +4 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/dist/runtime.js +4 -3
- package/docs/AssessmentApi.md +447 -0
- package/docs/AssessmentV2.md +36 -0
- package/docs/AssessmentV2Summary.md +58 -0
- package/docs/AssessmentVCenterV2.md +36 -0
- package/docs/Datastore.md +8 -0
- package/docs/Host.md +12 -0
- package/docs/HostStorageAdapter.md +49 -0
- package/docs/HostStorageLun.md +45 -0
- package/docs/ImageApi.md +5 -2
- package/docs/Info.md +2 -0
- package/docs/Inventory.md +2 -0
- package/docs/InventoryV2.md +42 -0
- package/docs/JobApi.md +152 -0
- package/docs/OsInfo.md +2 -0
- package/docs/SourceType.md +32 -0
- package/docs/SubResource.md +34 -0
- package/docs/VsphereCoreInput.md +4 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +536 -0
- package/src/apis/ImageApi.ts +19 -0
- package/src/apis/JobApi.ts +219 -0
- package/src/models/AssessmentV2.ts +86 -0
- package/src/models/AssessmentV2Summary.ts +173 -0
- package/src/models/AssessmentVCenterV2.ts +86 -0
- package/src/models/Datastore.ts +26 -2
- package/src/models/Host.ts +51 -0
- package/src/models/HostStorageAdapter.ts +105 -0
- package/src/models/HostStorageLun.ts +93 -0
- package/src/models/Info.ts +6 -0
- package/src/models/Inventory.ts +7 -1
- package/src/models/InventoryV2.ts +97 -0
- package/src/models/OsInfo.ts +15 -0
- package/src/models/SourceType.ts +54 -0
- package/src/models/SubResource.ts +64 -0
- package/src/models/VsphereCoreInput.ts +12 -0
- package/src/models/index.ts +8 -0
- package/src/runtime.ts +11 -11
package/src/runtime.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
export const BASE_PATH = "https://raw.githubusercontent.com".replace(/\/+$/, "");
|
|
15
|
+
export const BASE_PATH: string = "https://raw.githubusercontent.com".replace(/\/+$/, "");
|
|
16
16
|
|
|
17
17
|
export interface ConfigurationParameters {
|
|
18
18
|
basePath?: string; // override base path
|
|
@@ -83,7 +83,7 @@ export class Configuration {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export const DefaultConfig = new Configuration();
|
|
86
|
+
export const DefaultConfig: Configuration = new Configuration();
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* This is the base class for all generated API classes.
|
|
@@ -93,22 +93,22 @@ export class BaseAPI {
|
|
|
93
93
|
private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
|
|
94
94
|
private middleware: Middleware[];
|
|
95
95
|
|
|
96
|
-
constructor(protected configuration = DefaultConfig) {
|
|
96
|
+
constructor(protected configuration: Configuration = DefaultConfig) {
|
|
97
97
|
this.middleware = configuration.middleware;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
|
|
100
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T {
|
|
101
101
|
const next = this.clone<T>();
|
|
102
102
|
next.middleware = next.middleware.concat(...middlewares);
|
|
103
103
|
return next;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
|
|
106
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T {
|
|
107
107
|
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
108
108
|
return this.withMiddleware<T>(...middlewares);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
|
|
111
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T {
|
|
112
112
|
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
113
113
|
return this.withMiddleware<T>(...middlewares);
|
|
114
114
|
}
|
|
@@ -354,7 +354,7 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
|
|
354
354
|
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
export function exists(json: any, key: string) {
|
|
357
|
+
export function exists(json: any, key: string): boolean {
|
|
358
358
|
const value = json[key];
|
|
359
359
|
return value !== null && value !== undefined;
|
|
360
360
|
}
|
|
@@ -410,7 +410,7 @@ export function parseDateTime(value: any): Date {
|
|
|
410
410
|
return new Date(value);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
export function mapValues(data: any, fn: (item: any) => any) {
|
|
413
|
+
export function mapValues(data: any, fn: (item: any) => any): { [key: string]: any } {
|
|
414
414
|
const result: { [key: string]: any } = {};
|
|
415
415
|
for (const key of Object.keys(data)) {
|
|
416
416
|
result[key] = fn(data[key]);
|
|
@@ -533,7 +533,7 @@ export function parseContentDispositionFilename(headers: Headers): string | unde
|
|
|
533
533
|
function decodeExtValue(value: string | undefined): string | undefined {
|
|
534
534
|
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
535
535
|
try {
|
|
536
|
-
return match ? decodeURIComponent(match[1]) : undefined;
|
|
536
|
+
return match?.[1] !== undefined ? decodeURIComponent(match[1]) : undefined;
|
|
537
537
|
} catch {
|
|
538
538
|
return undefined;
|
|
539
539
|
}
|
|
@@ -549,9 +549,9 @@ function parseHeaderParameters(value: string): Map<string, string> {
|
|
|
549
549
|
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
550
550
|
let match: RegExpExecArray | null;
|
|
551
551
|
while ((match = parameter.exec(value)) !== null) {
|
|
552
|
-
const name = match[1].toLowerCase();
|
|
552
|
+
const name = (match[1] ?? '').toLowerCase();
|
|
553
553
|
if (!params.has(name)) {
|
|
554
|
-
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
554
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : (match[3] ?? '').trim());
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
return params;
|