@openshift-migration-advisor/agent-sdk 0.28.0 → 0.29.0-1f84d7c08794
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/esm/models/Inventory1.d.ts +5 -1
- package/dist/esm/models/Inventory1.js +2 -0
- package/dist/esm/models/VMFilterOptionsResponse.d.ts +6 -0
- package/dist/esm/models/VMFilterOptionsResponse.js +4 -0
- package/dist/esm/models/VirtualMachineDetail.d.ts +7 -1
- package/dist/esm/models/VirtualMachineDetail.js +1 -0
- package/dist/models/Inventory1.d.ts +5 -1
- package/dist/models/Inventory1.js +2 -0
- package/dist/models/VMFilterOptionsResponse.d.ts +6 -0
- package/dist/models/VMFilterOptionsResponse.js +4 -0
- package/dist/models/VirtualMachineDetail.d.ts +7 -1
- package/dist/models/VirtualMachineDetail.js +1 -0
- package/docs/Inventory1.md +2 -0
- package/docs/VMFilterOptionsResponse.md +2 -0
- package/docs/VirtualMachineDetail.md +2 -0
- package/package.json +1 -1
- package/src/models/Inventory1.ts +7 -1
- package/src/models/VMFilterOptionsResponse.ts +7 -0
- package/src/models/VirtualMachineDetail.ts +6 -1
- package/src/runtime.ts +8 -8
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @openshift-migration-advisor/agent-sdk@0.
|
|
1
|
+
# @openshift-migration-advisor/agent-sdk@0.29.0-1f84d7c08794
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the raw.githubusercontent.com API.
|
|
4
4
|
|
|
@@ -200,7 +200,7 @@ and is automatically generated by the
|
|
|
200
200
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
201
201
|
|
|
202
202
|
- API version: `v2`
|
|
203
|
-
- Package version: `0.
|
|
203
|
+
- Package version: `0.29.0-1f84d7c08794`
|
|
204
204
|
- Generator version: `7.27.0-SNAPSHOT`
|
|
205
205
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
206
206
|
|
|
@@ -35,9 +35,13 @@ export interface Inventory1 {
|
|
|
35
35
|
*/
|
|
36
36
|
vcenter?: InventoryData;
|
|
37
37
|
/**
|
|
38
|
-
* Timestamp when the inventory
|
|
38
|
+
* Timestamp when the inventory document was built
|
|
39
39
|
*/
|
|
40
40
|
created_at?: Date;
|
|
41
|
+
/**
|
|
42
|
+
* Oldest known source collection time. Agent data uses collection database creation time; RVTools uses export metadata, assuming UTC when no timezone is specified. Null when unknown.
|
|
43
|
+
*/
|
|
44
|
+
collection_time?: Date | null;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* Check if a given object implements the Inventory1 interface.
|
|
@@ -36,6 +36,7 @@ export function Inventory1FromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)),
|
|
37
37
|
'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
|
|
38
38
|
'created_at': json['created_at'] == null ? undefined : (parseDateTime(json['created_at'])),
|
|
39
|
+
'collection_time': json['collection_time'] === undefined ? undefined : json['collection_time'] === null ? null : (parseDateTime(json['collection_time'])),
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
export function Inventory1ToJSON(json) {
|
|
@@ -51,5 +52,6 @@ export function Inventory1ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
51
52
|
'clusters': (mapValues(value['clusters'], InventoryDataToJSON)),
|
|
52
53
|
'vcenter': InventoryDataToJSON(value['vcenter']),
|
|
53
54
|
'created_at': value['created_at'] == null ? value['created_at'] : serializeDateTime(value['created_at']),
|
|
55
|
+
'collection_time': value['collection_time'] == null ? value['collection_time'] : serializeDateTime(value['collection_time']),
|
|
54
56
|
};
|
|
55
57
|
}
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* @interface VMFilterOptionsResponse
|
|
16
16
|
*/
|
|
17
17
|
export interface VMFilterOptionsResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Distinct metadata values grouped by key, available for VM filtering.
|
|
20
|
+
*/
|
|
21
|
+
metadata: {
|
|
22
|
+
[key: string]: Array<string>;
|
|
23
|
+
};
|
|
18
24
|
/**
|
|
19
25
|
* Distinct cluster names
|
|
20
26
|
*/
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* Check if a given object implements the VMFilterOptionsResponse interface.
|
|
16
16
|
*/
|
|
17
17
|
export function instanceOfVMFilterOptionsResponse(value) {
|
|
18
|
+
if (!('metadata' in value) || value['metadata'] === undefined)
|
|
19
|
+
return false;
|
|
18
20
|
if (!('clusters' in value) || value['clusters'] === undefined)
|
|
19
21
|
return false;
|
|
20
22
|
if (!('datacenters' in value) || value['datacenters'] === undefined)
|
|
@@ -35,6 +37,7 @@ export function VMFilterOptionsResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
35
37
|
return json;
|
|
36
38
|
}
|
|
37
39
|
return {
|
|
40
|
+
'metadata': json['metadata'],
|
|
38
41
|
'clusters': json['clusters'],
|
|
39
42
|
'datacenters': json['datacenters'],
|
|
40
43
|
'concernLabels': json['concernLabels'],
|
|
@@ -50,6 +53,7 @@ export function VMFilterOptionsResponseToJSONTyped(value, ignoreDiscriminator =
|
|
|
50
53
|
return value;
|
|
51
54
|
}
|
|
52
55
|
return {
|
|
56
|
+
'metadata': value['metadata'],
|
|
53
57
|
'clusters': value['clusters'],
|
|
54
58
|
'datacenters': value['datacenters'],
|
|
55
59
|
'concernLabels': value['concernLabels'],
|
|
@@ -128,6 +128,12 @@ export interface VirtualMachineDetail {
|
|
|
128
128
|
* Whether Fault Tolerance is enabled
|
|
129
129
|
*/
|
|
130
130
|
faultToleranceEnabled?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Tags and custom attributes collected from vCenter or RVTools, grouped by tag category name, custom attribute name, or RVTools column header. Empty object when absent. vCenter tags with unresolved category names are omitted.
|
|
133
|
+
*/
|
|
134
|
+
readonly metadata?: {
|
|
135
|
+
[key: string]: Array<string>;
|
|
136
|
+
};
|
|
131
137
|
/**
|
|
132
138
|
* Whether nested virtualization is enabled
|
|
133
139
|
*/
|
|
@@ -180,4 +186,4 @@ export declare function instanceOfVirtualMachineDetail(value: object): value is
|
|
|
180
186
|
export declare function VirtualMachineDetailFromJSON(json: any): VirtualMachineDetail;
|
|
181
187
|
export declare function VirtualMachineDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualMachineDetail;
|
|
182
188
|
export declare function VirtualMachineDetailToJSON(json: any): VirtualMachineDetail;
|
|
183
|
-
export declare function VirtualMachineDetailToJSONTyped(value?: VirtualMachineDetail | null, ignoreDiscriminator?: boolean): any;
|
|
189
|
+
export declare function VirtualMachineDetailToJSONTyped(value?: Omit<VirtualMachineDetail, 'metadata'> | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -80,6 +80,7 @@ export function VirtualMachineDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
80
80
|
'inspectionStatus': json['inspectionStatus'] == null ? undefined : InspectionStatusFromJSON(json['inspectionStatus']),
|
|
81
81
|
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
82
82
|
'faultToleranceEnabled': json['faultToleranceEnabled'] == null ? undefined : json['faultToleranceEnabled'],
|
|
83
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
83
84
|
'nestedHVEnabled': json['nestedHVEnabled'] == null ? undefined : json['nestedHVEnabled'],
|
|
84
85
|
'toolsStatus': json['toolsStatus'] == null ? undefined : json['toolsStatus'],
|
|
85
86
|
'toolsRunningStatus': json['toolsRunningStatus'] == null ? undefined : json['toolsRunningStatus'],
|
|
@@ -35,9 +35,13 @@ export interface Inventory1 {
|
|
|
35
35
|
*/
|
|
36
36
|
vcenter?: InventoryData;
|
|
37
37
|
/**
|
|
38
|
-
* Timestamp when the inventory
|
|
38
|
+
* Timestamp when the inventory document was built
|
|
39
39
|
*/
|
|
40
40
|
created_at?: Date;
|
|
41
|
+
/**
|
|
42
|
+
* Oldest known source collection time. Agent data uses collection database creation time; RVTools uses export metadata, assuming UTC when no timezone is specified. Null when unknown.
|
|
43
|
+
*/
|
|
44
|
+
collection_time?: Date | null;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* Check if a given object implements the Inventory1 interface.
|
|
@@ -43,6 +43,7 @@ function Inventory1FromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'clusters': ((0, runtime_js_1.mapValues)(json['clusters'], InventoryData_js_1.InventoryDataFromJSON)),
|
|
44
44
|
'vcenter': json['vcenter'] == null ? undefined : (0, InventoryData_js_1.InventoryDataFromJSON)(json['vcenter']),
|
|
45
45
|
'created_at': json['created_at'] == null ? undefined : ((0, runtime_js_1.parseDateTime)(json['created_at'])),
|
|
46
|
+
'collection_time': json['collection_time'] === undefined ? undefined : json['collection_time'] === null ? null : ((0, runtime_js_1.parseDateTime)(json['collection_time'])),
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
function Inventory1ToJSON(json) {
|
|
@@ -58,5 +59,6 @@ function Inventory1ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
58
59
|
'clusters': ((0, runtime_js_1.mapValues)(value['clusters'], InventoryData_js_1.InventoryDataToJSON)),
|
|
59
60
|
'vcenter': (0, InventoryData_js_1.InventoryDataToJSON)(value['vcenter']),
|
|
60
61
|
'created_at': value['created_at'] == null ? value['created_at'] : (0, runtime_js_1.serializeDateTime)(value['created_at']),
|
|
62
|
+
'collection_time': value['collection_time'] == null ? value['collection_time'] : (0, runtime_js_1.serializeDateTime)(value['collection_time']),
|
|
61
63
|
};
|
|
62
64
|
}
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* @interface VMFilterOptionsResponse
|
|
16
16
|
*/
|
|
17
17
|
export interface VMFilterOptionsResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Distinct metadata values grouped by key, available for VM filtering.
|
|
20
|
+
*/
|
|
21
|
+
metadata: {
|
|
22
|
+
[key: string]: Array<string>;
|
|
23
|
+
};
|
|
18
24
|
/**
|
|
19
25
|
* Distinct cluster names
|
|
20
26
|
*/
|
|
@@ -22,6 +22,8 @@ exports.VMFilterOptionsResponseToJSONTyped = VMFilterOptionsResponseToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the VMFilterOptionsResponse interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfVMFilterOptionsResponse(value) {
|
|
25
|
+
if (!('metadata' in value) || value['metadata'] === undefined)
|
|
26
|
+
return false;
|
|
25
27
|
if (!('clusters' in value) || value['clusters'] === undefined)
|
|
26
28
|
return false;
|
|
27
29
|
if (!('datacenters' in value) || value['datacenters'] === undefined)
|
|
@@ -42,6 +44,7 @@ function VMFilterOptionsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
44
|
return json;
|
|
43
45
|
}
|
|
44
46
|
return {
|
|
47
|
+
'metadata': json['metadata'],
|
|
45
48
|
'clusters': json['clusters'],
|
|
46
49
|
'datacenters': json['datacenters'],
|
|
47
50
|
'concernLabels': json['concernLabels'],
|
|
@@ -57,6 +60,7 @@ function VMFilterOptionsResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
57
60
|
return value;
|
|
58
61
|
}
|
|
59
62
|
return {
|
|
63
|
+
'metadata': value['metadata'],
|
|
60
64
|
'clusters': value['clusters'],
|
|
61
65
|
'datacenters': value['datacenters'],
|
|
62
66
|
'concernLabels': value['concernLabels'],
|
|
@@ -128,6 +128,12 @@ export interface VirtualMachineDetail {
|
|
|
128
128
|
* Whether Fault Tolerance is enabled
|
|
129
129
|
*/
|
|
130
130
|
faultToleranceEnabled?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Tags and custom attributes collected from vCenter or RVTools, grouped by tag category name, custom attribute name, or RVTools column header. Empty object when absent. vCenter tags with unresolved category names are omitted.
|
|
133
|
+
*/
|
|
134
|
+
readonly metadata?: {
|
|
135
|
+
[key: string]: Array<string>;
|
|
136
|
+
};
|
|
131
137
|
/**
|
|
132
138
|
* Whether nested virtualization is enabled
|
|
133
139
|
*/
|
|
@@ -180,4 +186,4 @@ export declare function instanceOfVirtualMachineDetail(value: object): value is
|
|
|
180
186
|
export declare function VirtualMachineDetailFromJSON(json: any): VirtualMachineDetail;
|
|
181
187
|
export declare function VirtualMachineDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualMachineDetail;
|
|
182
188
|
export declare function VirtualMachineDetailToJSON(json: any): VirtualMachineDetail;
|
|
183
|
-
export declare function VirtualMachineDetailToJSONTyped(value?: VirtualMachineDetail | null, ignoreDiscriminator?: boolean): any;
|
|
189
|
+
export declare function VirtualMachineDetailToJSONTyped(value?: Omit<VirtualMachineDetail, 'metadata'> | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -87,6 +87,7 @@ function VirtualMachineDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
87
87
|
'inspectionStatus': json['inspectionStatus'] == null ? undefined : (0, InspectionStatus_js_1.InspectionStatusFromJSON)(json['inspectionStatus']),
|
|
88
88
|
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
89
89
|
'faultToleranceEnabled': json['faultToleranceEnabled'] == null ? undefined : json['faultToleranceEnabled'],
|
|
90
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
90
91
|
'nestedHVEnabled': json['nestedHVEnabled'] == null ? undefined : json['nestedHVEnabled'],
|
|
91
92
|
'toolsStatus': json['toolsStatus'] == null ? undefined : json['toolsStatus'],
|
|
92
93
|
'toolsRunningStatus': json['toolsRunningStatus'] == null ? undefined : json['toolsRunningStatus'],
|
package/docs/Inventory1.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`clusters` | [{ [key: string]: InventoryData; }](InventoryData.md)
|
|
12
12
|
`vcenter` | [InventoryData](InventoryData.md)
|
|
13
13
|
`created_at` | Date
|
|
14
|
+
`collection_time` | Date
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"clusters": null,
|
|
25
26
|
"vcenter": null,
|
|
26
27
|
"created_at": null,
|
|
28
|
+
"collection_time": null,
|
|
27
29
|
} satisfies Inventory1
|
|
28
30
|
|
|
29
31
|
console.log(example)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
+
`metadata` | { [key: string]: Array<string>; }
|
|
9
10
|
`clusters` | Array<string>
|
|
10
11
|
`datacenters` | Array<string>
|
|
11
12
|
`concernLabels` | Array<string>
|
|
@@ -19,6 +20,7 @@ import type { VMFilterOptionsResponse } from '@openshift-migration-advisor/agent
|
|
|
19
20
|
|
|
20
21
|
// TODO: Update the object below with actual values
|
|
21
22
|
const example = {
|
|
23
|
+
"metadata": null,
|
|
22
24
|
"clusters": null,
|
|
23
25
|
"datacenters": null,
|
|
24
26
|
"concernLabels": null,
|
|
@@ -32,6 +32,7 @@ Name | Type
|
|
|
32
32
|
`inspectionStatus` | [InspectionStatus](InspectionStatus.md)
|
|
33
33
|
`labels` | Array<string>
|
|
34
34
|
`faultToleranceEnabled` | boolean
|
|
35
|
+
`metadata` | { [key: string]: Array<string>; }
|
|
35
36
|
`nestedHVEnabled` | boolean
|
|
36
37
|
`toolsStatus` | string
|
|
37
38
|
`toolsRunningStatus` | string
|
|
@@ -77,6 +78,7 @@ const example = {
|
|
|
77
78
|
"inspectionStatus": null,
|
|
78
79
|
"labels": null,
|
|
79
80
|
"faultToleranceEnabled": null,
|
|
81
|
+
"metadata": null,
|
|
80
82
|
"nestedHVEnabled": null,
|
|
81
83
|
"toolsStatus": null,
|
|
82
84
|
"toolsRunningStatus": null,
|
package/package.json
CHANGED
package/src/models/Inventory1.ts
CHANGED
|
@@ -44,9 +44,13 @@ export interface Inventory1 {
|
|
|
44
44
|
*/
|
|
45
45
|
vcenter?: InventoryData;
|
|
46
46
|
/**
|
|
47
|
-
* Timestamp when the inventory
|
|
47
|
+
* Timestamp when the inventory document was built
|
|
48
48
|
*/
|
|
49
49
|
created_at?: Date;
|
|
50
|
+
/**
|
|
51
|
+
* Oldest known source collection time. Agent data uses collection database creation time; RVTools uses export metadata, assuming UTC when no timezone is specified. Null when unknown.
|
|
52
|
+
*/
|
|
53
|
+
collection_time?: Date | null;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
/**
|
|
@@ -73,6 +77,7 @@ export function Inventory1FromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
73
77
|
'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)),
|
|
74
78
|
'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
|
|
75
79
|
'created_at': json['created_at'] == null ? undefined : (parseDateTime(json['created_at'])),
|
|
80
|
+
'collection_time': json['collection_time'] === undefined ? undefined : json['collection_time'] === null ? null : (parseDateTime(json['collection_time'])),
|
|
76
81
|
};
|
|
77
82
|
}
|
|
78
83
|
|
|
@@ -92,6 +97,7 @@ export function Inventory1ToJSONTyped(value?: Inventory1 | null, ignoreDiscrimin
|
|
|
92
97
|
'clusters': (mapValues(value['clusters'], InventoryDataToJSON)),
|
|
93
98
|
'vcenter': InventoryDataToJSON(value['vcenter']),
|
|
94
99
|
'created_at': value['created_at'] == null ? value['created_at'] : serializeDateTime(value['created_at']),
|
|
100
|
+
'collection_time': value['collection_time'] == null ? value['collection_time'] : serializeDateTime(value['collection_time']),
|
|
95
101
|
};
|
|
96
102
|
}
|
|
97
103
|
|
|
@@ -19,6 +19,10 @@ import { mapValues } from '../runtime.js';
|
|
|
19
19
|
* @interface VMFilterOptionsResponse
|
|
20
20
|
*/
|
|
21
21
|
export interface VMFilterOptionsResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Distinct metadata values grouped by key, available for VM filtering.
|
|
24
|
+
*/
|
|
25
|
+
metadata: { [key: string]: Array<string>; };
|
|
22
26
|
/**
|
|
23
27
|
* Distinct cluster names
|
|
24
28
|
*/
|
|
@@ -45,6 +49,7 @@ export interface VMFilterOptionsResponse {
|
|
|
45
49
|
* Check if a given object implements the VMFilterOptionsResponse interface.
|
|
46
50
|
*/
|
|
47
51
|
export function instanceOfVMFilterOptionsResponse(value: object): value is VMFilterOptionsResponse {
|
|
52
|
+
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
48
53
|
if (!('clusters' in value) || value['clusters'] === undefined) return false;
|
|
49
54
|
if (!('datacenters' in value) || value['datacenters'] === undefined) return false;
|
|
50
55
|
if (!('concernLabels' in value) || value['concernLabels'] === undefined) return false;
|
|
@@ -63,6 +68,7 @@ export function VMFilterOptionsResponseFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
63
68
|
}
|
|
64
69
|
return {
|
|
65
70
|
|
|
71
|
+
'metadata': json['metadata'],
|
|
66
72
|
'clusters': json['clusters'],
|
|
67
73
|
'datacenters': json['datacenters'],
|
|
68
74
|
'concernLabels': json['concernLabels'],
|
|
@@ -82,6 +88,7 @@ export function VMFilterOptionsResponseToJSONTyped(value?: VMFilterOptionsRespon
|
|
|
82
88
|
|
|
83
89
|
return {
|
|
84
90
|
|
|
91
|
+
'metadata': value['metadata'],
|
|
85
92
|
'clusters': value['clusters'],
|
|
86
93
|
'datacenters': value['datacenters'],
|
|
87
94
|
'concernLabels': value['concernLabels'],
|
|
@@ -187,6 +187,10 @@ export interface VirtualMachineDetail {
|
|
|
187
187
|
* Whether Fault Tolerance is enabled
|
|
188
188
|
*/
|
|
189
189
|
faultToleranceEnabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Tags and custom attributes collected from vCenter or RVTools, grouped by tag category name, custom attribute name, or RVTools column header. Empty object when absent. vCenter tags with unresolved category names are omitted.
|
|
192
|
+
*/
|
|
193
|
+
readonly metadata?: { [key: string]: Array<string>; };
|
|
190
194
|
/**
|
|
191
195
|
* Whether nested virtualization is enabled
|
|
192
196
|
*/
|
|
@@ -286,6 +290,7 @@ export function VirtualMachineDetailFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
286
290
|
'inspectionStatus': json['inspectionStatus'] == null ? undefined : InspectionStatusFromJSON(json['inspectionStatus']),
|
|
287
291
|
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
288
292
|
'faultToleranceEnabled': json['faultToleranceEnabled'] == null ? undefined : json['faultToleranceEnabled'],
|
|
293
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
289
294
|
'nestedHVEnabled': json['nestedHVEnabled'] == null ? undefined : json['nestedHVEnabled'],
|
|
290
295
|
'toolsStatus': json['toolsStatus'] == null ? undefined : json['toolsStatus'],
|
|
291
296
|
'toolsRunningStatus': json['toolsRunningStatus'] == null ? undefined : json['toolsRunningStatus'],
|
|
@@ -304,7 +309,7 @@ export function VirtualMachineDetailToJSON(json: any): VirtualMachineDetail {
|
|
|
304
309
|
return VirtualMachineDetailToJSONTyped(json, false);
|
|
305
310
|
}
|
|
306
311
|
|
|
307
|
-
export function VirtualMachineDetailToJSONTyped(value?: VirtualMachineDetail | null, ignoreDiscriminator: boolean = false): any {
|
|
312
|
+
export function VirtualMachineDetailToJSONTyped(value?: Omit<VirtualMachineDetail, 'metadata'> | null, ignoreDiscriminator: boolean = false): any {
|
|
308
313
|
if (value == null) {
|
|
309
314
|
return value;
|
|
310
315
|
}
|
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/api/v2".replace(/\/+$/, "");
|
|
15
|
+
export const BASE_PATH: string = "https://raw.githubusercontent.com/api/v2".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]);
|