@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.
Files changed (114) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +19 -3
  4. package/dist/apis/AssessmentApi.d.ts +257 -0
  5. package/dist/apis/AssessmentApi.js +257 -0
  6. package/dist/apis/ImageApi.d.ts +14 -0
  7. package/dist/apis/ImageApi.js +11 -1
  8. package/dist/apis/JobApi.d.ts +86 -0
  9. package/dist/apis/JobApi.js +124 -0
  10. package/dist/esm/apis/AssessmentApi.d.ts +257 -0
  11. package/dist/esm/apis/AssessmentApi.js +257 -0
  12. package/dist/esm/apis/ImageApi.d.ts +14 -0
  13. package/dist/esm/apis/ImageApi.js +10 -0
  14. package/dist/esm/apis/JobApi.d.ts +86 -0
  15. package/dist/esm/apis/JobApi.js +124 -0
  16. package/dist/esm/models/AssessmentV2.d.ts +36 -0
  17. package/dist/esm/models/AssessmentV2.js +49 -0
  18. package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
  19. package/dist/esm/models/AssessmentV2Summary.js +99 -0
  20. package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
  21. package/dist/esm/models/AssessmentVCenterV2.js +49 -0
  22. package/dist/esm/models/Datastore.d.ts +18 -2
  23. package/dist/esm/models/Datastore.js +8 -0
  24. package/dist/esm/models/Host.d.ts +26 -0
  25. package/dist/esm/models/Host.js +14 -0
  26. package/dist/esm/models/HostStorageAdapter.d.ts +58 -0
  27. package/dist/esm/models/HostStorageAdapter.js +55 -0
  28. package/dist/esm/models/HostStorageLun.d.ts +50 -0
  29. package/dist/esm/models/HostStorageLun.js +51 -0
  30. package/dist/esm/models/Info.d.ts +4 -0
  31. package/dist/esm/models/Info.js +2 -0
  32. package/dist/esm/models/Inventory.d.ts +5 -1
  33. package/dist/esm/models/Inventory.js +2 -0
  34. package/dist/esm/models/InventoryV2.d.ts +47 -0
  35. package/dist/esm/models/InventoryV2.js +55 -0
  36. package/dist/esm/models/OsInfo.d.ts +12 -0
  37. package/dist/esm/models/OsInfo.js +9 -0
  38. package/dist/esm/models/SourceType.d.ts +26 -0
  39. package/dist/esm/models/SourceType.js +44 -0
  40. package/dist/esm/models/SubResource.d.ts +30 -0
  41. package/dist/esm/models/SubResource.js +43 -0
  42. package/dist/esm/models/VsphereCoreInput.d.ts +8 -0
  43. package/dist/esm/models/VsphereCoreInput.js +4 -0
  44. package/dist/esm/models/index.d.ts +8 -0
  45. package/dist/esm/models/index.js +8 -0
  46. package/dist/esm/runtime.js +4 -3
  47. package/dist/models/AssessmentV2.d.ts +36 -0
  48. package/dist/models/AssessmentV2.js +56 -0
  49. package/dist/models/AssessmentV2Summary.d.ts +97 -0
  50. package/dist/models/AssessmentV2Summary.js +107 -0
  51. package/dist/models/AssessmentVCenterV2.d.ts +36 -0
  52. package/dist/models/AssessmentVCenterV2.js +56 -0
  53. package/dist/models/Datastore.d.ts +18 -2
  54. package/dist/models/Datastore.js +8 -0
  55. package/dist/models/Host.d.ts +26 -0
  56. package/dist/models/Host.js +14 -0
  57. package/dist/models/HostStorageAdapter.d.ts +58 -0
  58. package/dist/models/HostStorageAdapter.js +62 -0
  59. package/dist/models/HostStorageLun.d.ts +50 -0
  60. package/dist/models/HostStorageLun.js +58 -0
  61. package/dist/models/Info.d.ts +4 -0
  62. package/dist/models/Info.js +2 -0
  63. package/dist/models/Inventory.d.ts +5 -1
  64. package/dist/models/Inventory.js +2 -0
  65. package/dist/models/InventoryV2.d.ts +47 -0
  66. package/dist/models/InventoryV2.js +62 -0
  67. package/dist/models/OsInfo.d.ts +12 -0
  68. package/dist/models/OsInfo.js +10 -1
  69. package/dist/models/SourceType.d.ts +26 -0
  70. package/dist/models/SourceType.js +52 -0
  71. package/dist/models/SubResource.d.ts +30 -0
  72. package/dist/models/SubResource.js +50 -0
  73. package/dist/models/VsphereCoreInput.d.ts +8 -0
  74. package/dist/models/VsphereCoreInput.js +4 -0
  75. package/dist/models/index.d.ts +8 -0
  76. package/dist/models/index.js +8 -0
  77. package/dist/runtime.js +4 -3
  78. package/docs/AssessmentApi.md +447 -0
  79. package/docs/AssessmentV2.md +36 -0
  80. package/docs/AssessmentV2Summary.md +58 -0
  81. package/docs/AssessmentVCenterV2.md +36 -0
  82. package/docs/Datastore.md +8 -0
  83. package/docs/Host.md +12 -0
  84. package/docs/HostStorageAdapter.md +49 -0
  85. package/docs/HostStorageLun.md +45 -0
  86. package/docs/ImageApi.md +5 -2
  87. package/docs/Info.md +2 -0
  88. package/docs/Inventory.md +2 -0
  89. package/docs/InventoryV2.md +42 -0
  90. package/docs/JobApi.md +152 -0
  91. package/docs/OsInfo.md +2 -0
  92. package/docs/SourceType.md +32 -0
  93. package/docs/SubResource.md +34 -0
  94. package/docs/VsphereCoreInput.md +4 -0
  95. package/package.json +1 -1
  96. package/src/apis/AssessmentApi.ts +536 -0
  97. package/src/apis/ImageApi.ts +19 -0
  98. package/src/apis/JobApi.ts +219 -0
  99. package/src/models/AssessmentV2.ts +86 -0
  100. package/src/models/AssessmentV2Summary.ts +173 -0
  101. package/src/models/AssessmentVCenterV2.ts +86 -0
  102. package/src/models/Datastore.ts +26 -2
  103. package/src/models/Host.ts +51 -0
  104. package/src/models/HostStorageAdapter.ts +105 -0
  105. package/src/models/HostStorageLun.ts +93 -0
  106. package/src/models/Info.ts +6 -0
  107. package/src/models/Inventory.ts +7 -1
  108. package/src/models/InventoryV2.ts +97 -0
  109. package/src/models/OsInfo.ts +15 -0
  110. package/src/models/SourceType.ts +54 -0
  111. package/src/models/SubResource.ts +64 -0
  112. package/src/models/VsphereCoreInput.ts +12 -0
  113. package/src/models/index.ts +8 -0
  114. 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;