@openshift-migration-advisor/planner-sdk 0.22.0 → 0.26.0-3c24ff3aedce

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/README.md +3 -2
  2. package/dist/apis/AssessmentApi.d.ts +6 -14
  3. package/dist/apis/AssessmentApi.js +6 -9
  4. package/dist/apis/SourceApi.d.ts +47 -4
  5. package/dist/apis/SourceApi.js +63 -2
  6. package/dist/esm/apis/AssessmentApi.d.ts +6 -14
  7. package/dist/esm/apis/AssessmentApi.js +6 -9
  8. package/dist/esm/apis/SourceApi.d.ts +47 -4
  9. package/dist/esm/apis/SourceApi.js +63 -2
  10. package/dist/esm/models/ClusterRequirementsRequest.d.ts +1 -1
  11. package/dist/esm/models/Datastore.d.ts +13 -0
  12. package/dist/esm/models/Datastore.js +10 -0
  13. package/dist/esm/models/Infra.d.ts +4 -0
  14. package/dist/esm/models/Infra.js +2 -0
  15. package/dist/esm/models/MigrationComplexityRequest.d.ts +3 -2
  16. package/dist/esm/models/MigrationComplexityRequest.js +1 -3
  17. package/dist/esm/models/MigrationEstimationRequest.d.ts +3 -2
  18. package/dist/esm/models/MigrationEstimationRequest.js +1 -3
  19. package/dist/esm/models/VMs.d.ts +8 -0
  20. package/dist/esm/models/VMs.js +4 -0
  21. package/dist/esm/runtime.d.ts +22 -1
  22. package/dist/esm/runtime.js +61 -1
  23. package/dist/models/ClusterRequirementsRequest.d.ts +1 -1
  24. package/dist/models/Datastore.d.ts +13 -0
  25. package/dist/models/Datastore.js +11 -0
  26. package/dist/models/Infra.d.ts +4 -0
  27. package/dist/models/Infra.js +2 -0
  28. package/dist/models/MigrationComplexityRequest.d.ts +3 -2
  29. package/dist/models/MigrationComplexityRequest.js +1 -3
  30. package/dist/models/MigrationEstimationRequest.d.ts +3 -2
  31. package/dist/models/MigrationEstimationRequest.js +1 -3
  32. package/dist/models/VMs.d.ts +8 -0
  33. package/dist/models/VMs.js +4 -0
  34. package/dist/runtime.d.ts +22 -1
  35. package/dist/runtime.js +62 -1
  36. package/docs/AssessmentApi.md +3 -11
  37. package/docs/Datastore.md +2 -0
  38. package/docs/Infra.md +2 -0
  39. package/docs/SourceApi.md +77 -1
  40. package/docs/VMs.md +4 -0
  41. package/package.json +1 -1
  42. package/src/apis/AssessmentApi.ts +8 -21
  43. package/src/apis/SourceApi.ts +112 -4
  44. package/src/models/ClusterRequirementsRequest.ts +1 -1
  45. package/src/models/Datastore.ts +18 -0
  46. package/src/models/Infra.ts +6 -0
  47. package/src/models/MigrationComplexityRequest.ts +4 -4
  48. package/src/models/MigrationEstimationRequest.ts +4 -4
  49. package/src/models/VMs.ts +12 -0
  50. package/src/runtime.ts +69 -2
@@ -22,6 +22,10 @@ export interface Infra {
22
22
  *
23
23
  */
24
24
  totalHosts: number;
25
+ /**
26
+ * Whether any hosts run without vCenter cluster management (not part of any cluster)
27
+ */
28
+ standaloneHostsDetected?: boolean;
25
29
  /**
26
30
  *
27
31
  */
@@ -37,6 +37,7 @@ export function InfraFromJSONTyped(json, ignoreDiscriminator) {
37
37
  }
38
38
  return {
39
39
  'totalHosts': json['totalHosts'],
40
+ 'standaloneHostsDetected': json['standaloneHostsDetected'] == null ? undefined : json['standaloneHostsDetected'],
40
41
  'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
41
42
  'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
42
43
  'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
@@ -60,6 +61,7 @@ export function InfraToJSONTyped(value, ignoreDiscriminator = false) {
60
61
  }
61
62
  return {
62
63
  'totalHosts': value['totalHosts'],
64
+ 'standaloneHostsDetected': value['standaloneHostsDetected'],
63
65
  'totalDatacenters': value['totalDatacenters'],
64
66
  'totalClusters': value['totalClusters'],
65
67
  'clustersPerDatacenter': value['clustersPerDatacenter'],
@@ -16,9 +16,10 @@
16
16
  */
17
17
  export interface MigrationComplexityRequest {
18
18
  /**
19
- * ID of the cluster to calculate complexity estimation for
19
+ * ID of the cluster to calculate complexity estimation for. When omitted or empty, the vCenter-level aggregate is used.
20
+ *
20
21
  */
21
- clusterId: string;
22
+ clusterId?: string;
22
23
  }
23
24
  /**
24
25
  * Check if a given object implements the MigrationComplexityRequest interface.
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the MigrationComplexityRequest interface.
16
16
  */
17
17
  export function instanceOfMigrationComplexityRequest(value) {
18
- if (!('clusterId' in value) || value['clusterId'] === undefined)
19
- return false;
20
18
  return true;
21
19
  }
22
20
  export function MigrationComplexityRequestFromJSON(json) {
@@ -27,7 +25,7 @@ export function MigrationComplexityRequestFromJSONTyped(json, ignoreDiscriminato
27
25
  return json;
28
26
  }
29
27
  return {
30
- 'clusterId': json['clusterId'],
28
+ 'clusterId': json['clusterId'] == null ? undefined : json['clusterId'],
31
29
  };
32
30
  }
33
31
  export function MigrationComplexityRequestToJSON(json) {
@@ -16,9 +16,10 @@
16
16
  */
17
17
  export interface MigrationEstimationRequest {
18
18
  /**
19
- * ID of the cluster to calculate migration estimation for
19
+ * ID of the cluster to calculate migration estimation for. When omitted or empty, the vCenter-level aggregate is used.
20
+ *
20
21
  */
21
- clusterId: string;
22
+ clusterId?: string;
22
23
  /**
23
24
  * Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
24
25
  *
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the MigrationEstimationRequest interface.
16
16
  */
17
17
  export function instanceOfMigrationEstimationRequest(value) {
18
- if (!('clusterId' in value) || value['clusterId'] === undefined)
19
- return false;
20
18
  return true;
21
19
  }
22
20
  export function MigrationEstimationRequestFromJSON(json) {
@@ -27,7 +25,7 @@ export function MigrationEstimationRequestFromJSONTyped(json, ignoreDiscriminato
27
25
  return json;
28
26
  }
29
27
  return {
30
- 'clusterId': json['clusterId'],
28
+ 'clusterId': json['clusterId'] == null ? undefined : json['clusterId'],
31
29
  'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
32
30
  'params': json['params'] == null ? undefined : json['params'],
33
31
  };
@@ -37,6 +37,14 @@ export interface VMs {
37
37
  * Number of VMs that have at least one shared disk
38
38
  */
39
39
  totalWithSharedDisks?: number;
40
+ /**
41
+ * Number of VMs that have at least one raw device mapping (RDM) disk
42
+ */
43
+ totalWithRDM?: number;
44
+ /**
45
+ * Number of VMs that have Fault Tolerance enabled
46
+ */
47
+ totalWithFaultTolerance?: number;
40
48
  /**
41
49
  *
42
50
  */
@@ -54,6 +54,8 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
54
54
  'totalMigratable': json['totalMigratable'],
55
55
  'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
56
56
  'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
57
+ 'totalWithRDM': json['totalWithRDM'] == null ? undefined : json['totalWithRDM'],
58
+ 'totalWithFaultTolerance': json['totalWithFaultTolerance'] == null ? undefined : json['totalWithFaultTolerance'],
57
59
  'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
58
60
  'diskSizeTier': json['diskSizeTier'] == null ? undefined : (mapValues(json['diskSizeTier'], DiskSizeTierSummaryFromJSON)),
59
61
  'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : (mapValues(json['diskComplexityTier'], DiskSizeTierSummaryFromJSON)),
@@ -87,6 +89,8 @@ export function VMsToJSONTyped(value, ignoreDiscriminator = false) {
87
89
  'totalMigratable': value['totalMigratable'],
88
90
  'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
89
91
  'totalWithSharedDisks': value['totalWithSharedDisks'],
92
+ 'totalWithRDM': value['totalWithRDM'],
93
+ 'totalWithFaultTolerance': value['totalWithFaultTolerance'],
90
94
  'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
91
95
  'diskSizeTier': value['diskSizeTier'] == null ? undefined : (mapValues(value['diskSizeTier'], DiskSizeTierSummaryToJSON)),
92
96
  'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : (mapValues(value['diskComplexityTier'], DiskSizeTierSummaryToJSON)),
@@ -184,11 +184,32 @@ export declare class VoidApiResponse {
184
184
  constructor(raw: Response);
185
185
  value(): Promise<void>;
186
186
  }
187
+ /**
188
+ * A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
189
+ * wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
190
+ * `typescript` generator's browser HttpFile.
191
+ */
192
+ export type HttpFile = Blob & {
193
+ readonly name: string;
194
+ };
187
195
  export declare class BlobApiResponse {
188
196
  raw: Response;
189
197
  constructor(raw: Response);
190
- value(): Promise<Blob>;
198
+ /**
199
+ * The body named after the Content-Disposition header, so that a download keeps the name the
200
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
201
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
202
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
203
+ * would stringify instead of wrapping.
204
+ */
205
+ value(): Promise<HttpFile>;
191
206
  }
207
+ /**
208
+ * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
209
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
210
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
211
+ */
212
+ export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
192
213
  export declare class TextApiResponse {
193
214
  raw: Response;
194
215
  constructor(raw: Response);
@@ -380,13 +380,73 @@ export class BlobApiResponse {
380
380
  constructor(raw) {
381
381
  this.raw = raw;
382
382
  }
383
+ /**
384
+ * The body named after the Content-Disposition header, so that a download keeps the name the
385
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
386
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
387
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
388
+ * would stringify instead of wrapping.
389
+ */
383
390
  value() {
384
391
  return __awaiter(this, void 0, void 0, function* () {
385
- return yield this.raw.blob();
392
+ var _a;
393
+ const blob = yield this.raw.blob();
394
+ const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
395
+ if (typeof File !== 'undefined' && blob instanceof Blob) {
396
+ try {
397
+ return new File([blob], name, { type: blob.type });
398
+ }
399
+ catch (_b) {
400
+ // File cannot be constructed: name the Blob itself
401
+ }
402
+ }
403
+ return Object.assign(blob, { name });
386
404
  });
387
405
  }
388
406
  ;
389
407
  }
408
+ /**
409
+ * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
410
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
411
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
412
+ */
413
+ export function parseContentDispositionFilename(headers) {
414
+ var _a, _b;
415
+ const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
416
+ return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
417
+ }
418
+ /** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
419
+ function decodeExtValue(value) {
420
+ const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
421
+ try {
422
+ return match ? decodeURIComponent(match[1]) : undefined;
423
+ }
424
+ catch (_a) {
425
+ return undefined;
426
+ }
427
+ }
428
+ /**
429
+ * The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
430
+ * taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
431
+ * backslash escapes resolved, and the first occurrence of a name wins.
432
+ */
433
+ function parseHeaderParameters(value) {
434
+ const params = new Map();
435
+ const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
436
+ let match;
437
+ while ((match = parameter.exec(value)) !== null) {
438
+ const name = match[1].toLowerCase();
439
+ if (!params.has(name)) {
440
+ params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
441
+ }
442
+ }
443
+ return params;
444
+ }
445
+ /** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
446
+ function basename(name) {
447
+ const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
448
+ return !base || base === '.' || base === '..' ? undefined : base;
449
+ }
390
450
  export class TextApiResponse {
391
451
  constructor(raw) {
392
452
  this.raw = raw;
@@ -18,7 +18,7 @@ import type { MemoryOverCommitRatio } from './MemoryOverCommitRatio.js';
18
18
  */
19
19
  export interface ClusterRequirementsRequest {
20
20
  /**
21
- * ID of the cluster to calculate requirements for
21
+ * ID of the cluster to calculate requirements for. An empty value uses the vCenter-wide aggregate.
22
22
  */
23
23
  clusterId: string;
24
24
  /**
@@ -20,6 +20,10 @@ export interface Datastore {
20
20
  *
21
21
  */
22
22
  type: string;
23
+ /**
24
+ * Storage access category derived from Datastore.Type
25
+ */
26
+ storageProtocol?: DatastoreStorageProtocolEnum;
23
27
  /**
24
28
  *
25
29
  */
@@ -57,6 +61,15 @@ export interface Datastore {
57
61
  */
58
62
  storageIoConfiguration?: StorageIoConfiguration;
59
63
  }
64
+ /**
65
+ * @export
66
+ */
67
+ export declare const DatastoreStorageProtocolEnum: {
68
+ readonly Block: "Block";
69
+ readonly File: "File";
70
+ readonly Object: "Object";
71
+ };
72
+ export type DatastoreStorageProtocolEnum = typeof DatastoreStorageProtocolEnum[keyof typeof DatastoreStorageProtocolEnum];
60
73
  /**
61
74
  * Check if a given object implements the Datastore interface.
62
75
  */
@@ -13,12 +13,21 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.DatastoreStorageProtocolEnum = void 0;
16
17
  exports.instanceOfDatastore = instanceOfDatastore;
17
18
  exports.DatastoreFromJSON = DatastoreFromJSON;
18
19
  exports.DatastoreFromJSONTyped = DatastoreFromJSONTyped;
19
20
  exports.DatastoreToJSON = DatastoreToJSON;
20
21
  exports.DatastoreToJSONTyped = DatastoreToJSONTyped;
21
22
  const StorageIoConfiguration_js_1 = require("./StorageIoConfiguration.js");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.DatastoreStorageProtocolEnum = {
27
+ Block: 'Block',
28
+ File: 'File',
29
+ Object: 'Object',
30
+ };
22
31
  /**
23
32
  * Check if a given object implements the Datastore interface.
24
33
  */
@@ -50,6 +59,7 @@ function DatastoreFromJSONTyped(json, ignoreDiscriminator) {
50
59
  }
51
60
  return {
52
61
  'type': json['type'],
62
+ 'storageProtocol': json['storageProtocol'] == null ? undefined : json['storageProtocol'],
53
63
  'totalCapacityGB': json['totalCapacityGB'],
54
64
  'freeCapacityGB': json['freeCapacityGB'],
55
65
  'vendor': json['vendor'],
@@ -70,6 +80,7 @@ function DatastoreToJSONTyped(value, ignoreDiscriminator = false) {
70
80
  }
71
81
  return {
72
82
  'type': value['type'],
83
+ 'storageProtocol': value['storageProtocol'],
73
84
  'totalCapacityGB': value['totalCapacityGB'],
74
85
  'freeCapacityGB': value['freeCapacityGB'],
75
86
  'vendor': value['vendor'],
@@ -22,6 +22,10 @@ export interface Infra {
22
22
  *
23
23
  */
24
24
  totalHosts: number;
25
+ /**
26
+ * Whether any hosts run without vCenter cluster management (not part of any cluster)
27
+ */
28
+ standaloneHostsDetected?: boolean;
25
29
  /**
26
30
  *
27
31
  */
@@ -44,6 +44,7 @@ function InfraFromJSONTyped(json, ignoreDiscriminator) {
44
44
  }
45
45
  return {
46
46
  'totalHosts': json['totalHosts'],
47
+ 'standaloneHostsDetected': json['standaloneHostsDetected'] == null ? undefined : json['standaloneHostsDetected'],
47
48
  'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
48
49
  'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
49
50
  'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
@@ -67,6 +68,7 @@ function InfraToJSONTyped(value, ignoreDiscriminator = false) {
67
68
  }
68
69
  return {
69
70
  'totalHosts': value['totalHosts'],
71
+ 'standaloneHostsDetected': value['standaloneHostsDetected'],
70
72
  'totalDatacenters': value['totalDatacenters'],
71
73
  'totalClusters': value['totalClusters'],
72
74
  'clustersPerDatacenter': value['clustersPerDatacenter'],
@@ -16,9 +16,10 @@
16
16
  */
17
17
  export interface MigrationComplexityRequest {
18
18
  /**
19
- * ID of the cluster to calculate complexity estimation for
19
+ * ID of the cluster to calculate complexity estimation for. When omitted or empty, the vCenter-level aggregate is used.
20
+ *
20
21
  */
21
- clusterId: string;
22
+ clusterId?: string;
22
23
  }
23
24
  /**
24
25
  * Check if a given object implements the MigrationComplexityRequest interface.
@@ -22,8 +22,6 @@ exports.MigrationComplexityRequestToJSONTyped = MigrationComplexityRequestToJSON
22
22
  * Check if a given object implements the MigrationComplexityRequest interface.
23
23
  */
24
24
  function instanceOfMigrationComplexityRequest(value) {
25
- if (!('clusterId' in value) || value['clusterId'] === undefined)
26
- return false;
27
25
  return true;
28
26
  }
29
27
  function MigrationComplexityRequestFromJSON(json) {
@@ -34,7 +32,7 @@ function MigrationComplexityRequestFromJSONTyped(json, ignoreDiscriminator) {
34
32
  return json;
35
33
  }
36
34
  return {
37
- 'clusterId': json['clusterId'],
35
+ 'clusterId': json['clusterId'] == null ? undefined : json['clusterId'],
38
36
  };
39
37
  }
40
38
  function MigrationComplexityRequestToJSON(json) {
@@ -16,9 +16,10 @@
16
16
  */
17
17
  export interface MigrationEstimationRequest {
18
18
  /**
19
- * ID of the cluster to calculate migration estimation for
19
+ * ID of the cluster to calculate migration estimation for. When omitted or empty, the vCenter-level aggregate is used.
20
+ *
20
21
  */
21
- clusterId: string;
22
+ clusterId?: string;
22
23
  /**
23
24
  * Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
24
25
  *
@@ -22,8 +22,6 @@ exports.MigrationEstimationRequestToJSONTyped = MigrationEstimationRequestToJSON
22
22
  * Check if a given object implements the MigrationEstimationRequest interface.
23
23
  */
24
24
  function instanceOfMigrationEstimationRequest(value) {
25
- if (!('clusterId' in value) || value['clusterId'] === undefined)
26
- return false;
27
25
  return true;
28
26
  }
29
27
  function MigrationEstimationRequestFromJSON(json) {
@@ -34,7 +32,7 @@ function MigrationEstimationRequestFromJSONTyped(json, ignoreDiscriminator) {
34
32
  return json;
35
33
  }
36
34
  return {
37
- 'clusterId': json['clusterId'],
35
+ 'clusterId': json['clusterId'] == null ? undefined : json['clusterId'],
38
36
  'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
39
37
  'params': json['params'] == null ? undefined : json['params'],
40
38
  };
@@ -37,6 +37,14 @@ export interface VMs {
37
37
  * Number of VMs that have at least one shared disk
38
38
  */
39
39
  totalWithSharedDisks?: number;
40
+ /**
41
+ * Number of VMs that have at least one raw device mapping (RDM) disk
42
+ */
43
+ totalWithRDM?: number;
44
+ /**
45
+ * Number of VMs that have Fault Tolerance enabled
46
+ */
47
+ totalWithFaultTolerance?: number;
40
48
  /**
41
49
  *
42
50
  */
@@ -61,6 +61,8 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
61
61
  'totalMigratable': json['totalMigratable'],
62
62
  'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
63
63
  'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
64
+ 'totalWithRDM': json['totalWithRDM'] == null ? undefined : json['totalWithRDM'],
65
+ 'totalWithFaultTolerance': json['totalWithFaultTolerance'] == null ? undefined : json['totalWithFaultTolerance'],
64
66
  'cpuCores': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['cpuCores']),
65
67
  'diskSizeTier': json['diskSizeTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['diskSizeTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
66
68
  'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['diskComplexityTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
@@ -94,6 +96,8 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
94
96
  'totalMigratable': value['totalMigratable'],
95
97
  'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
96
98
  'totalWithSharedDisks': value['totalWithSharedDisks'],
99
+ 'totalWithRDM': value['totalWithRDM'],
100
+ 'totalWithFaultTolerance': value['totalWithFaultTolerance'],
97
101
  'cpuCores': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['cpuCores']),
98
102
  'diskSizeTier': value['diskSizeTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['diskSizeTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
99
103
  'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['diskComplexityTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
package/dist/runtime.d.ts CHANGED
@@ -184,11 +184,32 @@ export declare class VoidApiResponse {
184
184
  constructor(raw: Response);
185
185
  value(): Promise<void>;
186
186
  }
187
+ /**
188
+ * A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
189
+ * wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
190
+ * `typescript` generator's browser HttpFile.
191
+ */
192
+ export type HttpFile = Blob & {
193
+ readonly name: string;
194
+ };
187
195
  export declare class BlobApiResponse {
188
196
  raw: Response;
189
197
  constructor(raw: Response);
190
- value(): Promise<Blob>;
198
+ /**
199
+ * The body named after the Content-Disposition header, so that a download keeps the name the
200
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
201
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
202
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
203
+ * would stringify instead of wrapping.
204
+ */
205
+ value(): Promise<HttpFile>;
191
206
  }
207
+ /**
208
+ * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
209
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
210
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
211
+ */
212
+ export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
192
213
  export declare class TextApiResponse {
193
214
  raw: Response;
194
215
  constructor(raw: Response);
package/dist/runtime.js CHANGED
@@ -32,6 +32,7 @@ exports.parseDateTime = parseDateTime;
32
32
  exports.mapValues = mapValues;
33
33
  exports.anyToJSON = anyToJSON;
34
34
  exports.canConsumeForm = canConsumeForm;
35
+ exports.parseContentDispositionFilename = parseContentDispositionFilename;
35
36
  exports.BASE_PATH = "https://raw.githubusercontent.com".replace(/\/+$/, "");
36
37
  class Configuration {
37
38
  constructor(configuration = {}) {
@@ -399,14 +400,74 @@ class BlobApiResponse {
399
400
  constructor(raw) {
400
401
  this.raw = raw;
401
402
  }
403
+ /**
404
+ * The body named after the Content-Disposition header, so that a download keeps the name the
405
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
406
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
407
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
408
+ * would stringify instead of wrapping.
409
+ */
402
410
  value() {
403
411
  return __awaiter(this, void 0, void 0, function* () {
404
- return yield this.raw.blob();
412
+ var _a;
413
+ const blob = yield this.raw.blob();
414
+ const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
415
+ if (typeof File !== 'undefined' && blob instanceof Blob) {
416
+ try {
417
+ return new File([blob], name, { type: blob.type });
418
+ }
419
+ catch (_b) {
420
+ // File cannot be constructed: name the Blob itself
421
+ }
422
+ }
423
+ return Object.assign(blob, { name });
405
424
  });
406
425
  }
407
426
  ;
408
427
  }
409
428
  exports.BlobApiResponse = BlobApiResponse;
429
+ /**
430
+ * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
431
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
432
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
433
+ */
434
+ function parseContentDispositionFilename(headers) {
435
+ var _a, _b;
436
+ const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
437
+ return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
438
+ }
439
+ /** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
440
+ function decodeExtValue(value) {
441
+ const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
442
+ try {
443
+ return match ? decodeURIComponent(match[1]) : undefined;
444
+ }
445
+ catch (_a) {
446
+ return undefined;
447
+ }
448
+ }
449
+ /**
450
+ * The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
451
+ * taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
452
+ * backslash escapes resolved, and the first occurrence of a name wins.
453
+ */
454
+ function parseHeaderParameters(value) {
455
+ const params = new Map();
456
+ const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
457
+ let match;
458
+ while ((match = parameter.exec(value)) !== null) {
459
+ const name = match[1].toLowerCase();
460
+ if (!params.has(name)) {
461
+ params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
462
+ }
463
+ }
464
+ return params;
465
+ }
466
+ /** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
467
+ function basename(name) {
468
+ const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
469
+ return !base || base === '.' || base === '..' ? undefined : base;
470
+ }
410
471
  class TextApiResponse {
411
472
  constructor(raw) {
412
473
  this.raw = raw;
@@ -684,7 +684,7 @@ No authorization required
684
684
 
685
685
  ## listAssessments
686
686
 
687
- > Array&lt;Assessment&gt; listAssessments(sourceId)
687
+ > Array&lt;Assessment&gt; listAssessments()
688
688
 
689
689
 
690
690
 
@@ -703,13 +703,8 @@ async function example() {
703
703
  console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
704
704
  const api = new AssessmentApi();
705
705
 
706
- const body = {
707
- // string | Filter assessments by source ID (optional)
708
- sourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
709
- } satisfies ListAssessmentsRequest;
710
-
711
706
  try {
712
- const data = await api.listAssessments(body);
707
+ const data = await api.listAssessments();
713
708
  console.log(data);
714
709
  } catch (error) {
715
710
  console.error(error);
@@ -722,10 +717,7 @@ example().catch(console.error);
722
717
 
723
718
  ### Parameters
724
719
 
725
-
726
- | Name | Type | Description | Notes |
727
- |------------- | ------------- | ------------- | -------------|
728
- | **sourceId** | `string` | Filter assessments by source ID | [Optional] [Defaults to `undefined`] |
720
+ This endpoint does not need any parameter.
729
721
 
730
722
  ### Return type
731
723
 
package/docs/Datastore.md CHANGED
@@ -7,6 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `type` | string
10
+ `storageProtocol` | string
10
11
  `totalCapacityGB` | number
11
12
  `freeCapacityGB` | number
12
13
  `vendor` | string
@@ -25,6 +26,7 @@ import type { Datastore } from '@openshift-migration-advisor/planner-sdk'
25
26
  // TODO: Update the object below with actual values
26
27
  const example = {
27
28
  "type": null,
29
+ "storageProtocol": null,
28
30
  "totalCapacityGB": null,
29
31
  "freeCapacityGB": null,
30
32
  "vendor": null,
package/docs/Infra.md CHANGED
@@ -7,6 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `totalHosts` | number
10
+ `standaloneHostsDetected` | boolean
10
11
  `totalDatacenters` | number
11
12
  `totalClusters` | number
12
13
  `clustersPerDatacenter` | Array&lt;number&gt;
@@ -28,6 +29,7 @@ import type { Infra } from '@openshift-migration-advisor/planner-sdk'
28
29
  // TODO: Update the object below with actual values
29
30
  const example = {
30
31
  "totalHosts": null,
32
+ "standaloneHostsDetected": null,
31
33
  "totalDatacenters": null,
32
34
  "totalClusters": null,
33
35
  "clustersPerDatacenter": null,