@openshift-migration-advisor/planner-sdk 0.20.3-7b7fa251be69 → 0.21.0
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/README.md +2 -2
- package/dist/apis/AccountApi.js +1 -1
- package/dist/esm/apis/AccountApi.js +1 -1
- package/dist/esm/models/ActiveEnvironmentsInput.js +1 -1
- package/dist/esm/models/Agent.js +6 -5
- package/dist/esm/models/AriaAutomationInput.js +1 -1
- package/dist/esm/models/AriaOpsInput.js +1 -1
- package/dist/esm/models/AriaSecureInput.js +1 -1
- package/dist/esm/models/Assessment.js +5 -4
- package/dist/esm/models/AssessmentSubsetInventory.js +3 -2
- package/dist/esm/models/ClusterFeatures.d.ts +4 -0
- package/dist/esm/models/ClusterFeatures.js +3 -1
- 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/DeployedEnvironmentInput.js +1 -1
- package/dist/esm/models/Group.js +6 -5
- package/dist/esm/models/GroupCreate.js +1 -1
- package/dist/esm/models/Identity.js +1 -1
- package/dist/esm/models/Inventory.js +3 -3
- 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.js +1 -1
- 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/VMwareSubscriptionInput.js +1 -1
- package/dist/esm/runtime.d.ts +11 -0
- package/dist/esm/runtime.js +47 -1
- package/dist/models/ActiveEnvironmentsInput.js +1 -1
- package/dist/models/Agent.js +6 -5
- package/dist/models/AriaAutomationInput.js +1 -1
- package/dist/models/AriaOpsInput.js +1 -1
- package/dist/models/AriaSecureInput.js +1 -1
- package/dist/models/Assessment.js +5 -4
- package/dist/models/AssessmentSubsetInventory.js +3 -2
- package/dist/models/ClusterFeatures.d.ts +4 -0
- package/dist/models/ClusterFeatures.js +3 -1
- package/dist/models/ClusterRequirementsRequest.js +1 -1
- package/dist/models/ClusterRequirementsStoredInput.js +3 -3
- package/dist/models/CpuOverCommitRatio.js +1 -1
- package/dist/models/DeployedEnvironmentInput.js +1 -1
- package/dist/models/Group.js +6 -5
- package/dist/models/GroupCreate.js +1 -1
- package/dist/models/Identity.js +1 -1
- package/dist/models/Inventory.js +2 -2
- 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.js +1 -1
- 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/VMwareSubscriptionInput.js +1 -1
- package/dist/runtime.d.ts +11 -0
- package/dist/runtime.js +51 -1
- package/docs/ClusterFeatures.md +2 -0
- package/package.json +1 -1
- package/src/apis/AccountApi.ts +1 -1
- package/src/models/ActiveEnvironmentsInput.ts +1 -1
- package/src/models/Agent.ts +6 -6
- package/src/models/AriaAutomationInput.ts +1 -1
- package/src/models/AriaOpsInput.ts +1 -1
- package/src/models/AriaSecureInput.ts +1 -1
- package/src/models/Assessment.ts +5 -5
- package/src/models/AssessmentSubsetInventory.ts +3 -3
- package/src/models/ClusterFeatures.ts +7 -1
- package/src/models/ClusterRequirementsRequest.ts +1 -1
- package/src/models/ClusterRequirementsStoredInput.ts +3 -3
- package/src/models/CpuOverCommitRatio.ts +1 -1
- package/src/models/DeployedEnvironmentInput.ts +1 -1
- package/src/models/Group.ts +6 -6
- package/src/models/GroupCreate.ts +1 -1
- package/src/models/Identity.ts +1 -1
- package/src/models/Inventory.ts +3 -3
- 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 +1 -1
- 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/VMwareSubscriptionInput.ts +1 -1
- package/src/runtime.ts +52 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { mapValues } from '../runtime.js';
|
|
15
|
+
import { mapValues, parseDate, parseDateTime, serializeDate, serializeDateTime } from '../runtime.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
@@ -48,7 +48,7 @@ export function PresignedUrlFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
48
48
|
return {
|
|
49
49
|
|
|
50
50
|
'url': json['url'],
|
|
51
|
-
'expiresAt': json['expires_at'] == null ? undefined : (
|
|
51
|
+
'expiresAt': json['expires_at'] == null ? undefined : (parseDateTime(json['expires_at'])),
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -64,7 +64,7 @@ export function PresignedUrlToJSONTyped(value?: PresignedUrl | null, ignoreDiscr
|
|
|
64
64
|
return {
|
|
65
65
|
|
|
66
66
|
'url': value['url'],
|
|
67
|
-
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt']
|
|
67
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : serializeDateTime(value['expiresAt']),
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
package/src/models/Snapshot.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { mapValues } from '../runtime.js';
|
|
15
|
+
import { mapValues, parseDate, parseDateTime, serializeDate, serializeDateTime } from '../runtime.js';
|
|
16
16
|
import type { AssessmentSubsetInventory } from './AssessmentSubsetInventory.js';
|
|
17
17
|
import {
|
|
18
18
|
AssessmentSubsetInventoryFromJSON,
|
|
@@ -68,7 +68,7 @@ export function SnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
68
68
|
return {
|
|
69
69
|
|
|
70
70
|
'inventory': InventoryFromJSON(json['inventory']),
|
|
71
|
-
'createdAt': (json['createdAt'] == null ? json['createdAt'] :
|
|
71
|
+
'createdAt': (json['createdAt'] == null ? json['createdAt'] : parseDateTime(json['createdAt'])),
|
|
72
72
|
'subsetInventories': json['subsetInventories'] === undefined ? undefined : json['subsetInventories'] === null ? null : ((json['subsetInventories'] as Array<any>).map(AssessmentSubsetInventoryFromJSON)),
|
|
73
73
|
};
|
|
74
74
|
}
|
|
@@ -85,7 +85,7 @@ export function SnapshotToJSONTyped(value?: Snapshot | null, ignoreDiscriminator
|
|
|
85
85
|
return {
|
|
86
86
|
|
|
87
87
|
'inventory': InventoryToJSON(value['inventory']),
|
|
88
|
-
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt']
|
|
88
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
89
89
|
'subsetInventories': value['subsetInventories'] == null ? undefined : ((value['subsetInventories'] as Array<any>).map(AssessmentSubsetInventoryToJSON)),
|
|
90
90
|
};
|
|
91
91
|
}
|
package/src/models/Source.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { mapValues } from '../runtime.js';
|
|
15
|
+
import { mapValues, parseDate, parseDateTime, serializeDate, serializeDateTime } from '../runtime.js';
|
|
16
16
|
import type { SourceInfra } from './SourceInfra.js';
|
|
17
17
|
import {
|
|
18
18
|
SourceInfraFromJSON,
|
|
@@ -104,7 +104,7 @@ export interface Source {
|
|
|
104
104
|
*/
|
|
105
105
|
export const SourceUpdateTypeEnum = {
|
|
106
106
|
Auto: 'auto',
|
|
107
|
-
Manual: 'manual'
|
|
107
|
+
Manual: 'manual',
|
|
108
108
|
} as const;
|
|
109
109
|
export type SourceUpdateTypeEnum = typeof SourceUpdateTypeEnum[keyof typeof SourceUpdateTypeEnum];
|
|
110
110
|
|
|
@@ -134,8 +134,8 @@ export function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): So
|
|
|
134
134
|
'id': json['id'],
|
|
135
135
|
'name': json['name'],
|
|
136
136
|
'inventory': json['inventory'] == null ? undefined : InventoryFromJSON(json['inventory']),
|
|
137
|
-
'createdAt': (json['createdAt'] == null ? json['createdAt'] :
|
|
138
|
-
'updatedAt': (json['updatedAt'] == null ? json['updatedAt'] :
|
|
137
|
+
'createdAt': (json['createdAt'] == null ? json['createdAt'] : parseDateTime(json['createdAt'])),
|
|
138
|
+
'updatedAt': (json['updatedAt'] == null ? json['updatedAt'] : parseDateTime(json['updatedAt'])),
|
|
139
139
|
'onPremises': json['onPremises'],
|
|
140
140
|
'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']),
|
|
141
141
|
'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
|
|
@@ -160,8 +160,8 @@ export function SourceToJSONTyped(value?: Source | null, ignoreDiscriminator: bo
|
|
|
160
160
|
'id': value['id'],
|
|
161
161
|
'name': value['name'],
|
|
162
162
|
'inventory': InventoryToJSON(value['inventory']),
|
|
163
|
-
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt']
|
|
164
|
-
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt']
|
|
163
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
164
|
+
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
|
|
165
165
|
'onPremises': value['onPremises'],
|
|
166
166
|
'agent': AgentToJSON(value['agent']),
|
|
167
167
|
'labels': value['labels'] == null ? undefined : ((value['labels'] as Array<any>).map(LabelToJSON)),
|
|
@@ -85,7 +85,7 @@ export interface SourceCreate {
|
|
|
85
85
|
*/
|
|
86
86
|
export const SourceCreateNetworkConfigTypeEnum = {
|
|
87
87
|
Dhcp: 'dhcp',
|
|
88
|
-
Static: 'static'
|
|
88
|
+
Static: 'static',
|
|
89
89
|
} as const;
|
|
90
90
|
export type SourceCreateNetworkConfigTypeEnum = typeof SourceCreateNetworkConfigTypeEnum[keyof typeof SourceCreateNetworkConfigTypeEnum];
|
|
91
91
|
|
|
@@ -85,7 +85,7 @@ export interface SourceUpdate {
|
|
|
85
85
|
*/
|
|
86
86
|
export const SourceUpdateNetworkConfigTypeEnum = {
|
|
87
87
|
Dhcp: 'dhcp',
|
|
88
|
-
Static: 'static'
|
|
88
|
+
Static: 'static',
|
|
89
89
|
} as const;
|
|
90
90
|
export type SourceUpdateNetworkConfigTypeEnum = typeof SourceUpdateNetworkConfigTypeEnum[keyof typeof SourceUpdateNetworkConfigTypeEnum];
|
|
91
91
|
|
|
@@ -98,7 +98,7 @@ export interface StandaloneClusterRequirementsRequest {
|
|
|
98
98
|
*/
|
|
99
99
|
export const StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum = {
|
|
100
100
|
NUMBER_1: 1,
|
|
101
|
-
NUMBER_3: 3
|
|
101
|
+
NUMBER_3: 3,
|
|
102
102
|
} as const;
|
|
103
103
|
export type StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum = typeof StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum[keyof typeof StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum];
|
|
104
104
|
|
|
@@ -43,7 +43,7 @@ export interface StorageIoConfiguration {
|
|
|
43
43
|
*/
|
|
44
44
|
export const StorageIoConfigurationCongestionThresholdModeEnum = {
|
|
45
45
|
Automatic: 'automatic',
|
|
46
|
-
Manual: 'manual'
|
|
46
|
+
Manual: 'manual',
|
|
47
47
|
} as const;
|
|
48
48
|
export type StorageIoConfigurationCongestionThresholdModeEnum = typeof StorageIoConfigurationCongestionThresholdModeEnum[keyof typeof StorageIoConfigurationCongestionThresholdModeEnum];
|
|
49
49
|
|
|
@@ -35,7 +35,7 @@ export const VMwareSubscriptionInputLevelEnum = {
|
|
|
35
35
|
Vvs: 'vvs',
|
|
36
36
|
Vvep: 'vvep',
|
|
37
37
|
Vsphere: 'vsphere',
|
|
38
|
-
NotAssessed: 'not_assessed'
|
|
38
|
+
NotAssessed: 'not_assessed',
|
|
39
39
|
} as const;
|
|
40
40
|
export type VMwareSubscriptionInputLevelEnum = typeof VMwareSubscriptionInputLevelEnum[keyof typeof VMwareSubscriptionInputLevelEnum];
|
|
41
41
|
|
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)) {
|