@openshift-migration-advisor/planner-sdk 0.20.3 → 0.21.0-515d930cc594
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 +22 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +16 -3
- package/dist/apis/AccountApi.js +1 -1
- package/dist/apis/AssessmentApi.d.ts +81 -0
- package/dist/apis/AssessmentApi.js +84 -0
- package/dist/esm/apis/AccountApi.js +1 -1
- package/dist/esm/apis/AssessmentApi.d.ts +81 -0
- package/dist/esm/apis/AssessmentApi.js +84 -0
- package/dist/esm/models/ActiveEnvironmentsInput.d.ts +41 -0
- package/dist/esm/models/ActiveEnvironmentsInput.js +51 -0
- package/dist/esm/models/Agent.js +6 -5
- package/dist/esm/models/AriaAutomationInput.d.ts +51 -0
- package/dist/esm/models/AriaAutomationInput.js +61 -0
- package/dist/esm/models/AriaOpsInput.d.ts +49 -0
- package/dist/esm/models/AriaOpsInput.js +59 -0
- package/dist/esm/models/AriaSecureInput.d.ts +41 -0
- package/dist/esm/models/AriaSecureInput.js +51 -0
- package/dist/esm/models/Assessment.js +5 -4
- package/dist/esm/models/AssessmentSubsetInventory.js +3 -2
- package/dist/esm/models/ClusterFeatures.d.ts +2 -2
- package/dist/esm/models/ClusterFeatures.js +3 -3
- package/dist/esm/models/ClusterRequirementsRequest.js +1 -1
- package/dist/esm/models/ClusterRequirementsStoredInput.js +3 -3
- package/dist/esm/models/CpuOverCommitRatio.js +1 -1
- package/dist/esm/models/CustomerDetailsInput.d.ts +34 -0
- package/dist/esm/models/CustomerDetailsInput.js +43 -0
- package/dist/esm/models/DeployedEnvironmentInput.d.ts +40 -0
- package/dist/esm/models/DeployedEnvironmentInput.js +50 -0
- package/dist/esm/models/EnhancementData.d.ts +76 -0
- package/dist/esm/models/EnhancementData.js +69 -0
- package/dist/esm/models/Group.js +6 -5
- package/dist/esm/models/GroupCreate.js +1 -1
- package/dist/esm/models/Host.d.ts +8 -0
- package/dist/esm/models/Host.js +4 -0
- package/dist/esm/models/Identity.js +1 -1
- package/dist/esm/models/Infra.d.ts +4 -0
- package/dist/esm/models/Infra.js +2 -0
- package/dist/esm/models/Inventory.d.ts +4 -0
- package/dist/esm/models/Inventory.js +3 -1
- package/dist/esm/models/JobStatus.js +1 -1
- package/dist/esm/models/Member.js +5 -4
- package/dist/esm/models/MemoryOverCommitRatio.js +1 -1
- package/dist/esm/models/Network.js +1 -1
- package/dist/esm/models/NsxInput.d.ts +46 -0
- package/dist/esm/models/NsxInput.js +56 -0
- package/dist/esm/models/OptimizationStatus.js +1 -1
- package/dist/esm/models/OsInfo.js +1 -1
- package/dist/esm/models/PartnerRequest.js +7 -6
- package/dist/esm/models/PartnerRequestStatus.js +1 -1
- package/dist/esm/models/PresignedUrl.js +3 -2
- package/dist/esm/models/Snapshot.js +3 -2
- package/dist/esm/models/Source.js +6 -5
- package/dist/esm/models/SourceCreate.js +1 -1
- package/dist/esm/models/SourceUpdate.js +1 -1
- package/dist/esm/models/StandaloneClusterRequirementsRequest.js +1 -1
- package/dist/esm/models/StorageIoConfiguration.js +1 -1
- package/dist/esm/models/VMs.d.ts +4 -0
- package/dist/esm/models/VMs.js +2 -0
- package/dist/esm/models/VMwareSubscriptionInput.d.ts +42 -0
- package/dist/esm/models/VMwareSubscriptionInput.js +52 -0
- package/dist/esm/models/VMwareVersionCountsInput.d.ts +42 -0
- package/dist/esm/models/VMwareVersionCountsInput.js +47 -0
- package/dist/esm/models/VsphereCoreInput.d.ts +38 -0
- package/dist/esm/models/VsphereCoreInput.js +45 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/esm/runtime.d.ts +11 -0
- package/dist/esm/runtime.js +47 -1
- package/dist/models/ActiveEnvironmentsInput.d.ts +41 -0
- package/dist/models/ActiveEnvironmentsInput.js +59 -0
- package/dist/models/Agent.js +6 -5
- package/dist/models/AriaAutomationInput.d.ts +51 -0
- package/dist/models/AriaAutomationInput.js +69 -0
- package/dist/models/AriaOpsInput.d.ts +49 -0
- package/dist/models/AriaOpsInput.js +67 -0
- package/dist/models/AriaSecureInput.d.ts +41 -0
- package/dist/models/AriaSecureInput.js +59 -0
- package/dist/models/Assessment.js +5 -4
- package/dist/models/AssessmentSubsetInventory.js +3 -2
- package/dist/models/ClusterFeatures.d.ts +2 -2
- package/dist/models/ClusterFeatures.js +3 -3
- package/dist/models/ClusterRequirementsRequest.js +1 -1
- package/dist/models/ClusterRequirementsStoredInput.js +3 -3
- package/dist/models/CpuOverCommitRatio.js +1 -1
- package/dist/models/CustomerDetailsInput.d.ts +34 -0
- package/dist/models/CustomerDetailsInput.js +50 -0
- package/dist/models/DeployedEnvironmentInput.d.ts +40 -0
- package/dist/models/DeployedEnvironmentInput.js +58 -0
- package/dist/models/EnhancementData.d.ts +76 -0
- package/dist/models/EnhancementData.js +76 -0
- package/dist/models/Group.js +6 -5
- package/dist/models/GroupCreate.js +1 -1
- package/dist/models/Host.d.ts +8 -0
- package/dist/models/Host.js +4 -0
- package/dist/models/Identity.js +1 -1
- package/dist/models/Infra.d.ts +4 -0
- package/dist/models/Infra.js +2 -0
- package/dist/models/Inventory.d.ts +4 -0
- package/dist/models/Inventory.js +2 -0
- package/dist/models/JobStatus.js +1 -1
- package/dist/models/Member.js +5 -4
- package/dist/models/MemoryOverCommitRatio.js +1 -1
- package/dist/models/Network.js +1 -1
- package/dist/models/NsxInput.d.ts +46 -0
- package/dist/models/NsxInput.js +64 -0
- package/dist/models/OptimizationStatus.js +1 -1
- package/dist/models/OsInfo.js +1 -1
- package/dist/models/PartnerRequest.js +7 -6
- package/dist/models/PartnerRequestStatus.js +1 -1
- package/dist/models/PresignedUrl.js +3 -2
- package/dist/models/Snapshot.js +3 -2
- package/dist/models/Source.js +6 -5
- package/dist/models/SourceCreate.js +1 -1
- package/dist/models/SourceUpdate.js +1 -1
- package/dist/models/StandaloneClusterRequirementsRequest.js +1 -1
- package/dist/models/StorageIoConfiguration.js +1 -1
- package/dist/models/VMs.d.ts +4 -0
- package/dist/models/VMs.js +2 -0
- package/dist/models/VMwareSubscriptionInput.d.ts +42 -0
- package/dist/models/VMwareSubscriptionInput.js +60 -0
- package/dist/models/VMwareVersionCountsInput.d.ts +42 -0
- package/dist/models/VMwareVersionCountsInput.js +54 -0
- package/dist/models/VsphereCoreInput.d.ts +38 -0
- package/dist/models/VsphereCoreInput.js +52 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/dist/runtime.d.ts +11 -0
- package/dist/runtime.js +51 -1
- package/docs/ActiveEnvironmentsInput.md +34 -0
- package/docs/AriaAutomationInput.md +34 -0
- package/docs/AriaOpsInput.md +34 -0
- package/docs/AriaSecureInput.md +34 -0
- package/docs/AssessmentApi.md +148 -0
- package/docs/ClusterFeatures.md +2 -2
- package/docs/CustomerDetailsInput.md +36 -0
- package/docs/DeployedEnvironmentInput.md +34 -0
- package/docs/EnhancementData.md +53 -0
- package/docs/Host.md +4 -0
- package/docs/Infra.md +2 -0
- package/docs/Inventory.md +2 -0
- package/docs/NsxInput.md +34 -0
- package/docs/VMs.md +2 -0
- package/docs/VMwareSubscriptionInput.md +34 -0
- package/docs/VMwareVersionCountsInput.md +40 -0
- package/docs/VsphereCoreInput.md +38 -0
- package/package.json +1 -1
- package/src/apis/AccountApi.ts +1 -1
- package/src/apis/AssessmentApi.ts +169 -0
- package/src/models/ActiveEnvironmentsInput.ts +77 -0
- package/src/models/Agent.ts +6 -6
- package/src/models/AriaAutomationInput.ts +87 -0
- package/src/models/AriaOpsInput.ts +85 -0
- package/src/models/AriaSecureInput.ts +77 -0
- package/src/models/Assessment.ts +5 -5
- package/src/models/AssessmentSubsetInventory.ts +3 -3
- package/src/models/ClusterFeatures.ts +5 -5
- package/src/models/ClusterRequirementsRequest.ts +1 -1
- package/src/models/ClusterRequirementsStoredInput.ts +3 -3
- package/src/models/CpuOverCommitRatio.ts +1 -1
- package/src/models/CustomerDetailsInput.ts +69 -0
- package/src/models/DeployedEnvironmentInput.ts +76 -0
- package/src/models/EnhancementData.ts +188 -0
- package/src/models/Group.ts +6 -6
- package/src/models/GroupCreate.ts +1 -1
- package/src/models/Host.ts +12 -0
- package/src/models/Identity.ts +1 -1
- package/src/models/Infra.ts +6 -0
- package/src/models/Inventory.ts +7 -1
- package/src/models/JobStatus.ts +1 -1
- package/src/models/Member.ts +5 -5
- package/src/models/MemoryOverCommitRatio.ts +1 -1
- package/src/models/Network.ts +1 -1
- package/src/models/NsxInput.ts +82 -0
- package/src/models/OptimizationStatus.ts +1 -1
- package/src/models/OsInfo.ts +1 -1
- package/src/models/PartnerRequest.ts +7 -7
- package/src/models/PartnerRequestStatus.ts +1 -1
- package/src/models/PresignedUrl.ts +3 -3
- package/src/models/Snapshot.ts +3 -3
- package/src/models/Source.ts +6 -6
- package/src/models/SourceCreate.ts +1 -1
- package/src/models/SourceUpdate.ts +1 -1
- package/src/models/StandaloneClusterRequirementsRequest.ts +1 -1
- package/src/models/StorageIoConfiguration.ts +1 -1
- package/src/models/VMs.ts +6 -0
- package/src/models/VMwareSubscriptionInput.ts +78 -0
- package/src/models/VMwareVersionCountsInput.ts +81 -0
- package/src/models/VsphereCoreInput.ts +75 -0
- package/src/models/index.ts +11 -0
- package/src/runtime.ts +52 -1
package/src/runtime.ts
CHANGED
|
@@ -346,7 +346,7 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
|
|
346
346
|
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
347
347
|
}
|
|
348
348
|
if (value instanceof Date) {
|
|
349
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value
|
|
349
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(serializeDateTime(value))}`;
|
|
350
350
|
}
|
|
351
351
|
if (value instanceof Object) {
|
|
352
352
|
return querystring(value as HTTPQuery, fullKey);
|
|
@@ -359,6 +359,57 @@ export function exists(json: any, key: string) {
|
|
|
359
359
|
return value !== null && value !== undefined;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Every generated date call site routes through these.
|
|
364
|
+
*
|
|
365
|
+
* `format: date` is a calendar date, with no time and no offset, so it is converted
|
|
366
|
+
* against the local calendar on both ends: they have to agree or the date shifts by
|
|
367
|
+
* a day. `format: date-time` is an instant and uses UTC.
|
|
368
|
+
*/
|
|
369
|
+
export function serializeDateTime(value: Date): string {
|
|
370
|
+
return value.toISOString();
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export function serializeDate(value: Date): string {
|
|
374
|
+
if (isNaN(value.getTime())) {
|
|
375
|
+
throw new RangeError('Invalid time value');
|
|
376
|
+
}
|
|
377
|
+
const year = ('000' + value.getFullYear()).slice(-4);
|
|
378
|
+
const month = ('0' + (value.getMonth() + 1)).slice(-2);
|
|
379
|
+
const day = ('0' + value.getDate()).slice(-2);
|
|
380
|
+
return `${year}-${month}-${day}`;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
export function parseDate(value: Date | string): Date {
|
|
385
|
+
if (value instanceof Date) {
|
|
386
|
+
return value;
|
|
387
|
+
}
|
|
388
|
+
// `new Date("2026-08-05")` would parse as UTC midnight: a different day west of UTC.
|
|
389
|
+
// Local midnight is the stated day everywhere. setFullYear avoids the 1900 offset the
|
|
390
|
+
// multi-argument constructor applies to years 0-99.
|
|
391
|
+
const fullDate = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(value));
|
|
392
|
+
if (fullDate) {
|
|
393
|
+
const year = Number(fullDate[1]);
|
|
394
|
+
const month = Number(fullDate[2]) - 1;
|
|
395
|
+
const day = Number(fullDate[3]);
|
|
396
|
+
const date = new Date(0);
|
|
397
|
+
date.setFullYear(year, month, day);
|
|
398
|
+
date.setHours(0, 0, 0, 0);
|
|
399
|
+
// Out-of-range components (or a day the local zone skipped) silently roll over,
|
|
400
|
+
// which would hand back a date the server never sent.
|
|
401
|
+
if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) {
|
|
402
|
+
return new Date(NaN);
|
|
403
|
+
}
|
|
404
|
+
return date;
|
|
405
|
+
}
|
|
406
|
+
return new Date(value);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export function parseDateTime(value: any): Date {
|
|
410
|
+
return new Date(value);
|
|
411
|
+
}
|
|
412
|
+
|
|
362
413
|
export function mapValues(data: any, fn: (item: any) => any) {
|
|
363
414
|
const result: { [key: string]: any } = {};
|
|
364
415
|
for (const key of Object.keys(data)) {
|