@openshift-migration-advisor/planner-sdk 0.16.0 → 0.17.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.
Files changed (41) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/models/AgentProxy.js +3 -3
  3. package/dist/esm/models/Datastore.js +1 -1
  4. package/dist/esm/models/Host.js +3 -3
  5. package/dist/esm/models/Identity.js +2 -2
  6. package/dist/esm/models/Info.js +2 -2
  7. package/dist/esm/models/PartnerRequest.js +3 -3
  8. package/dist/esm/models/Snapshot.js +1 -1
  9. package/dist/esm/models/Source.js +2 -2
  10. package/dist/esm/models/SourceCreate.js +2 -2
  11. package/dist/esm/models/SourceInfra.js +1 -1
  12. package/dist/esm/models/SourceUpdate.js +2 -2
  13. package/dist/esm/runtime.d.ts +1 -0
  14. package/dist/esm/runtime.js +4 -0
  15. package/dist/models/AgentProxy.js +3 -3
  16. package/dist/models/Datastore.js +1 -1
  17. package/dist/models/Host.js +3 -3
  18. package/dist/models/Identity.js +2 -2
  19. package/dist/models/Info.js +2 -2
  20. package/dist/models/PartnerRequest.js +3 -3
  21. package/dist/models/Snapshot.js +1 -1
  22. package/dist/models/Source.js +2 -2
  23. package/dist/models/SourceCreate.js +2 -2
  24. package/dist/models/SourceInfra.js +1 -1
  25. package/dist/models/SourceUpdate.js +2 -2
  26. package/dist/runtime.d.ts +1 -0
  27. package/dist/runtime.js +5 -0
  28. package/package.json +1 -1
  29. package/src/models/AgentProxy.ts +3 -3
  30. package/src/models/Datastore.ts +1 -1
  31. package/src/models/Host.ts +3 -3
  32. package/src/models/Identity.ts +2 -2
  33. package/src/models/Info.ts +2 -2
  34. package/src/models/PartnerRequest.ts +3 -3
  35. package/src/models/Snapshot.ts +1 -1
  36. package/src/models/Source.ts +2 -2
  37. package/src/models/SourceCreate.ts +2 -2
  38. package/src/models/SourceInfra.ts +1 -1
  39. package/src/models/SourceUpdate.ts +2 -2
  40. package/src/runtime.ts +5 -0
  41. package/tsconfig.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/planner-sdk@0.16.0
1
+ # @openshift-migration-advisor/planner-sdk@0.17.0
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -190,7 +190,7 @@ and is automatically generated by the
190
190
  [OpenAPI Generator](https://openapi-generator.tech) project:
191
191
 
192
192
  - API version: `v1alpha1`
193
- - Package version: `0.16.0`
193
+ - Package version: `0.17.0`
194
194
  - Generator version: `7.24.0-SNAPSHOT`
195
195
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
196
196
 
@@ -25,9 +25,9 @@ export function AgentProxyFromJSONTyped(json, ignoreDiscriminator) {
25
25
  return json;
26
26
  }
27
27
  return {
28
- 'httpUrl': json['httpUrl'] == null ? undefined : json['httpUrl'],
29
- 'httpsUrl': json['httpsUrl'] == null ? undefined : json['httpsUrl'],
30
- 'noProxy': json['noProxy'] == null ? undefined : json['noProxy'],
28
+ 'httpUrl': json['httpUrl'] === undefined ? undefined : json['httpUrl'] === null ? null : json['httpUrl'],
29
+ 'httpsUrl': json['httpsUrl'] === undefined ? undefined : json['httpsUrl'] === null ? null : json['httpsUrl'],
30
+ 'noProxy': json['noProxy'] === undefined ? undefined : json['noProxy'] === null ? null : json['noProxy'],
31
31
  };
32
32
  }
33
33
  export function AgentProxyToJSON(json) {
@@ -49,7 +49,7 @@ export function DatastoreFromJSONTyped(json, ignoreDiscriminator) {
49
49
  'hardwareAcceleratedMove': json['hardwareAcceleratedMove'],
50
50
  'protocolType': json['protocolType'],
51
51
  'model': json['model'],
52
- 'hostId': json['hostId'] == null ? undefined : json['hostId'],
52
+ 'hostId': json['hostId'] === undefined ? undefined : json['hostId'] === null ? null : json['hostId'],
53
53
  };
54
54
  }
55
55
  export function DatastoreToJSON(json) {
@@ -32,9 +32,9 @@ export function HostFromJSONTyped(json, ignoreDiscriminator) {
32
32
  'id': json['id'] == null ? undefined : json['id'],
33
33
  'vendor': json['vendor'],
34
34
  'model': json['model'],
35
- 'cpuCores': json['cpuCores'] == null ? undefined : json['cpuCores'],
36
- 'cpuSockets': json['cpuSockets'] == null ? undefined : json['cpuSockets'],
37
- 'memoryMB': json['memoryMB'] == null ? undefined : json['memoryMB'],
35
+ 'cpuCores': json['cpuCores'] === undefined ? undefined : json['cpuCores'] === null ? null : json['cpuCores'],
36
+ 'cpuSockets': json['cpuSockets'] === undefined ? undefined : json['cpuSockets'] === null ? null : json['cpuSockets'],
37
+ 'memoryMB': json['memoryMB'] === undefined ? undefined : json['memoryMB'] === null ? null : json['memoryMB'],
38
38
  };
39
39
  }
40
40
  export function HostToJSON(json) {
@@ -40,8 +40,8 @@ export function IdentityFromJSONTyped(json, ignoreDiscriminator) {
40
40
  return {
41
41
  'username': json['username'],
42
42
  'kind': json['kind'],
43
- 'groupId': json['groupId'] == null ? undefined : json['groupId'],
44
- 'partnerId': json['partnerId'] == null ? undefined : json['partnerId'],
43
+ 'groupId': json['groupId'] === undefined ? undefined : json['groupId'] === null ? null : json['groupId'],
44
+ 'partnerId': json['partnerId'] === undefined ? undefined : json['partnerId'] === null ? null : json['partnerId'],
45
45
  };
46
46
  }
47
47
  export function IdentityToJSON(json) {
@@ -31,8 +31,8 @@ export function InfoFromJSONTyped(json, ignoreDiscriminator) {
31
31
  return {
32
32
  'gitCommit': json['gitCommit'],
33
33
  'versionName': json['versionName'],
34
- 'agentGitCommit': json['agentGitCommit'] == null ? undefined : json['agentGitCommit'],
35
- 'agentVersionName': json['agentVersionName'] == null ? undefined : json['agentVersionName'],
34
+ 'agentGitCommit': json['agentGitCommit'] === undefined ? undefined : json['agentGitCommit'] === null ? null : json['agentGitCommit'],
35
+ 'agentVersionName': json['agentVersionName'] === undefined ? undefined : json['agentVersionName'] === null ? null : json['agentVersionName'],
36
36
  };
37
37
  }
38
38
  export function InfoToJSON(json) {
@@ -56,9 +56,9 @@ export function PartnerRequestFromJSONTyped(json, ignoreDiscriminator) {
56
56
  'contactPhone': json['contactPhone'],
57
57
  'email': json['email'],
58
58
  'location': json['location'],
59
- 'reason': json['reason'] == null ? undefined : json['reason'],
60
- 'acceptedAt': json['acceptedAt'] == null ? undefined : (new Date(json['acceptedAt'])),
61
- 'terminatedAt': json['terminatedAt'] == null ? undefined : (new Date(json['terminatedAt'])),
59
+ 'reason': json['reason'] === undefined ? undefined : json['reason'] === null ? null : json['reason'],
60
+ 'acceptedAt': json['acceptedAt'] === undefined ? undefined : json['acceptedAt'] === null ? null : (new Date(json['acceptedAt'])),
61
+ 'terminatedAt': json['terminatedAt'] === undefined ? undefined : json['terminatedAt'] === null ? null : (new Date(json['terminatedAt'])),
62
62
  'createdAt': (new Date(json['createdAt'])),
63
63
  };
64
64
  }
@@ -33,7 +33,7 @@ export function SnapshotFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return {
34
34
  'inventory': InventoryFromJSON(json['inventory']),
35
35
  'createdAt': (new Date(json['createdAt'])),
36
- 'subsetInventories': json['subsetInventories'] == null ? undefined : (json['subsetInventories'].map(AssessmentSubsetInventoryFromJSON)),
36
+ 'subsetInventories': json['subsetInventories'] === undefined ? undefined : json['subsetInventories'] === null ? null : (json['subsetInventories'].map(AssessmentSubsetInventoryFromJSON)),
37
37
  };
38
38
  }
39
39
  export function SnapshotToJSON(json) {
@@ -55,8 +55,8 @@ export function SourceFromJSONTyped(json, ignoreDiscriminator) {
55
55
  'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']),
56
56
  'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
57
57
  'infra': json['infra'] == null ? undefined : SourceInfraFromJSON(json['infra']),
58
- 'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
59
- 'agentVersionWarning': json['agentVersionWarning'] == null ? undefined : json['agentVersionWarning'],
58
+ 'agentVersion': json['agentVersion'] === undefined ? undefined : json['agentVersion'] === null ? null : json['agentVersion'],
59
+ 'agentVersionWarning': json['agentVersionWarning'] === undefined ? undefined : json['agentVersionWarning'] === null ? null : json['agentVersionWarning'],
60
60
  'updateType': json['updateType'] == null ? undefined : json['updateType'],
61
61
  };
62
62
  }
@@ -38,9 +38,9 @@ export function SourceCreateFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  return {
40
40
  'name': json['name'],
41
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
41
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
42
42
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
43
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
43
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
44
44
  'network': json['network'] == null ? undefined : VmNetworkFromJSON(json['network']),
45
45
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
46
46
  'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
@@ -28,7 +28,7 @@ export function SourceInfraFromJSONTyped(json, ignoreDiscriminator) {
28
28
  }
29
29
  return {
30
30
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
31
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
31
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
32
32
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
33
33
  };
34
34
  }
@@ -37,8 +37,8 @@ export function SourceUpdateFromJSONTyped(json, ignoreDiscriminator) {
37
37
  return {
38
38
  'name': json['name'] == null ? undefined : json['name'],
39
39
  'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
40
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
41
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
40
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
41
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
42
42
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
43
43
  'network': json['network'] == null ? undefined : VmNetworkFromJSON(json['network']),
44
44
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
@@ -127,6 +127,7 @@ export declare function exists(json: any, key: string): boolean;
127
127
  export declare function mapValues(data: any, fn: (item: any) => any): {
128
128
  [key: string]: any;
129
129
  };
130
+ export declare function anyToJSON(value: any): any;
130
131
  export declare function canConsumeForm(consumes: Consume[]): boolean;
131
132
  export interface Consume {
132
133
  contentType: string;
@@ -296,6 +296,10 @@ export function mapValues(data, fn) {
296
296
  }
297
297
  return result;
298
298
  }
299
+ // Pass-through serializer for `any`-typed properties in form data. See #1877.
300
+ export function anyToJSON(value) {
301
+ return value;
302
+ }
299
303
  export function canConsumeForm(consumes) {
300
304
  var _a;
301
305
  for (const consume of consumes) {
@@ -32,9 +32,9 @@ function AgentProxyFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
- 'httpUrl': json['httpUrl'] == null ? undefined : json['httpUrl'],
36
- 'httpsUrl': json['httpsUrl'] == null ? undefined : json['httpsUrl'],
37
- 'noProxy': json['noProxy'] == null ? undefined : json['noProxy'],
35
+ 'httpUrl': json['httpUrl'] === undefined ? undefined : json['httpUrl'] === null ? null : json['httpUrl'],
36
+ 'httpsUrl': json['httpsUrl'] === undefined ? undefined : json['httpsUrl'] === null ? null : json['httpsUrl'],
37
+ 'noProxy': json['noProxy'] === undefined ? undefined : json['noProxy'] === null ? null : json['noProxy'],
38
38
  };
39
39
  }
40
40
  function AgentProxyToJSON(json) {
@@ -56,7 +56,7 @@ function DatastoreFromJSONTyped(json, ignoreDiscriminator) {
56
56
  'hardwareAcceleratedMove': json['hardwareAcceleratedMove'],
57
57
  'protocolType': json['protocolType'],
58
58
  'model': json['model'],
59
- 'hostId': json['hostId'] == null ? undefined : json['hostId'],
59
+ 'hostId': json['hostId'] === undefined ? undefined : json['hostId'] === null ? null : json['hostId'],
60
60
  };
61
61
  }
62
62
  function DatastoreToJSON(json) {
@@ -39,9 +39,9 @@ function HostFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'id': json['id'] == null ? undefined : json['id'],
40
40
  'vendor': json['vendor'],
41
41
  'model': json['model'],
42
- 'cpuCores': json['cpuCores'] == null ? undefined : json['cpuCores'],
43
- 'cpuSockets': json['cpuSockets'] == null ? undefined : json['cpuSockets'],
44
- 'memoryMB': json['memoryMB'] == null ? undefined : json['memoryMB'],
42
+ 'cpuCores': json['cpuCores'] === undefined ? undefined : json['cpuCores'] === null ? null : json['cpuCores'],
43
+ 'cpuSockets': json['cpuSockets'] === undefined ? undefined : json['cpuSockets'] === null ? null : json['cpuSockets'],
44
+ 'memoryMB': json['memoryMB'] === undefined ? undefined : json['memoryMB'] === null ? null : json['memoryMB'],
45
45
  };
46
46
  }
47
47
  function HostToJSON(json) {
@@ -48,8 +48,8 @@ function IdentityFromJSONTyped(json, ignoreDiscriminator) {
48
48
  return {
49
49
  'username': json['username'],
50
50
  'kind': json['kind'],
51
- 'groupId': json['groupId'] == null ? undefined : json['groupId'],
52
- 'partnerId': json['partnerId'] == null ? undefined : json['partnerId'],
51
+ 'groupId': json['groupId'] === undefined ? undefined : json['groupId'] === null ? null : json['groupId'],
52
+ 'partnerId': json['partnerId'] === undefined ? undefined : json['partnerId'] === null ? null : json['partnerId'],
53
53
  };
54
54
  }
55
55
  function IdentityToJSON(json) {
@@ -38,8 +38,8 @@ function InfoFromJSONTyped(json, ignoreDiscriminator) {
38
38
  return {
39
39
  'gitCommit': json['gitCommit'],
40
40
  'versionName': json['versionName'],
41
- 'agentGitCommit': json['agentGitCommit'] == null ? undefined : json['agentGitCommit'],
42
- 'agentVersionName': json['agentVersionName'] == null ? undefined : json['agentVersionName'],
41
+ 'agentGitCommit': json['agentGitCommit'] === undefined ? undefined : json['agentGitCommit'] === null ? null : json['agentGitCommit'],
42
+ 'agentVersionName': json['agentVersionName'] === undefined ? undefined : json['agentVersionName'] === null ? null : json['agentVersionName'],
43
43
  };
44
44
  }
45
45
  function InfoToJSON(json) {
@@ -63,9 +63,9 @@ function PartnerRequestFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'contactPhone': json['contactPhone'],
64
64
  'email': json['email'],
65
65
  'location': json['location'],
66
- 'reason': json['reason'] == null ? undefined : json['reason'],
67
- 'acceptedAt': json['acceptedAt'] == null ? undefined : (new Date(json['acceptedAt'])),
68
- 'terminatedAt': json['terminatedAt'] == null ? undefined : (new Date(json['terminatedAt'])),
66
+ 'reason': json['reason'] === undefined ? undefined : json['reason'] === null ? null : json['reason'],
67
+ 'acceptedAt': json['acceptedAt'] === undefined ? undefined : json['acceptedAt'] === null ? null : (new Date(json['acceptedAt'])),
68
+ 'terminatedAt': json['terminatedAt'] === undefined ? undefined : json['terminatedAt'] === null ? null : (new Date(json['terminatedAt'])),
69
69
  'createdAt': (new Date(json['createdAt'])),
70
70
  };
71
71
  }
@@ -40,7 +40,7 @@ function SnapshotFromJSONTyped(json, ignoreDiscriminator) {
40
40
  return {
41
41
  'inventory': (0, Inventory_js_1.InventoryFromJSON)(json['inventory']),
42
42
  'createdAt': (new Date(json['createdAt'])),
43
- 'subsetInventories': json['subsetInventories'] == null ? undefined : (json['subsetInventories'].map(AssessmentSubsetInventory_js_1.AssessmentSubsetInventoryFromJSON)),
43
+ 'subsetInventories': json['subsetInventories'] === undefined ? undefined : json['subsetInventories'] === null ? null : (json['subsetInventories'].map(AssessmentSubsetInventory_js_1.AssessmentSubsetInventoryFromJSON)),
44
44
  };
45
45
  }
46
46
  function SnapshotToJSON(json) {
@@ -63,8 +63,8 @@ function SourceFromJSONTyped(json, ignoreDiscriminator) {
63
63
  'agent': json['agent'] == null ? undefined : (0, Agent_js_1.AgentFromJSON)(json['agent']),
64
64
  'labels': json['labels'] == null ? undefined : (json['labels'].map(Label_js_1.LabelFromJSON)),
65
65
  'infra': json['infra'] == null ? undefined : (0, SourceInfra_js_1.SourceInfraFromJSON)(json['infra']),
66
- 'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
67
- 'agentVersionWarning': json['agentVersionWarning'] == null ? undefined : json['agentVersionWarning'],
66
+ 'agentVersion': json['agentVersion'] === undefined ? undefined : json['agentVersion'] === null ? null : json['agentVersion'],
67
+ 'agentVersionWarning': json['agentVersionWarning'] === undefined ? undefined : json['agentVersionWarning'] === null ? null : json['agentVersionWarning'],
68
68
  'updateType': json['updateType'] == null ? undefined : json['updateType'],
69
69
  };
70
70
  }
@@ -46,9 +46,9 @@ function SourceCreateFromJSONTyped(json, ignoreDiscriminator) {
46
46
  }
47
47
  return {
48
48
  'name': json['name'],
49
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
49
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
50
50
  'proxy': json['proxy'] == null ? undefined : (0, AgentProxy_js_1.AgentProxyFromJSON)(json['proxy']),
51
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
51
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
52
52
  'network': json['network'] == null ? undefined : (0, VmNetwork_js_1.VmNetworkFromJSON)(json['network']),
53
53
  'vmNetwork': json['vmNetwork'] == null ? undefined : (0, VmNetwork_js_1.VmNetworkFromJSON)(json['vmNetwork']),
54
54
  'labels': json['labels'] == null ? undefined : (json['labels'].map(Label_js_1.LabelFromJSON)),
@@ -35,7 +35,7 @@ function SourceInfraFromJSONTyped(json, ignoreDiscriminator) {
35
35
  }
36
36
  return {
37
37
  'proxy': json['proxy'] == null ? undefined : (0, AgentProxy_js_1.AgentProxyFromJSON)(json['proxy']),
38
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
38
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
39
39
  'vmNetwork': json['vmNetwork'] == null ? undefined : (0, VmNetwork_js_1.VmNetworkFromJSON)(json['vmNetwork']),
40
40
  };
41
41
  }
@@ -45,8 +45,8 @@ function SourceUpdateFromJSONTyped(json, ignoreDiscriminator) {
45
45
  return {
46
46
  'name': json['name'] == null ? undefined : json['name'],
47
47
  'labels': json['labels'] == null ? undefined : (json['labels'].map(Label_js_1.LabelFromJSON)),
48
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
49
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
48
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
49
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
50
50
  'proxy': json['proxy'] == null ? undefined : (0, AgentProxy_js_1.AgentProxyFromJSON)(json['proxy']),
51
51
  'network': json['network'] == null ? undefined : (0, VmNetwork_js_1.VmNetworkFromJSON)(json['network']),
52
52
  'vmNetwork': json['vmNetwork'] == null ? undefined : (0, VmNetwork_js_1.VmNetworkFromJSON)(json['vmNetwork']),
package/dist/runtime.d.ts CHANGED
@@ -127,6 +127,7 @@ export declare function exists(json: any, key: string): boolean;
127
127
  export declare function mapValues(data: any, fn: (item: any) => any): {
128
128
  [key: string]: any;
129
129
  };
130
+ export declare function anyToJSON(value: any): any;
130
131
  export declare function canConsumeForm(consumes: Consume[]): boolean;
131
132
  export interface Consume {
132
133
  contentType: string;
package/dist/runtime.js CHANGED
@@ -26,6 +26,7 @@ exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = ex
26
26
  exports.querystring = querystring;
27
27
  exports.exists = exists;
28
28
  exports.mapValues = mapValues;
29
+ exports.anyToJSON = anyToJSON;
29
30
  exports.canConsumeForm = canConsumeForm;
30
31
  exports.BASE_PATH = "https://raw.githubusercontent.com".replace(/\/+$/, "");
31
32
  class Configuration {
@@ -308,6 +309,10 @@ function mapValues(data, fn) {
308
309
  }
309
310
  return result;
310
311
  }
312
+ // Pass-through serializer for `any`-typed properties in form data. See #1877.
313
+ function anyToJSON(value) {
314
+ return value;
315
+ }
311
316
  function canConsumeForm(consumes) {
312
317
  var _a;
313
318
  for (const consume of consumes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/planner-sdk",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/planner-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -56,9 +56,9 @@ export function AgentProxyFromJSONTyped(json: any, ignoreDiscriminator: boolean)
56
56
  }
57
57
  return {
58
58
 
59
- 'httpUrl': json['httpUrl'] == null ? undefined : json['httpUrl'],
60
- 'httpsUrl': json['httpsUrl'] == null ? undefined : json['httpsUrl'],
61
- 'noProxy': json['noProxy'] == null ? undefined : json['noProxy'],
59
+ 'httpUrl': json['httpUrl'] === undefined ? undefined : json['httpUrl'] === null ? null : json['httpUrl'],
60
+ 'httpsUrl': json['httpsUrl'] === undefined ? undefined : json['httpsUrl'] === null ? null : json['httpsUrl'],
61
+ 'noProxy': json['noProxy'] === undefined ? undefined : json['noProxy'] === null ? null : json['noProxy'],
62
62
  };
63
63
  }
64
64
 
@@ -108,7 +108,7 @@ export function DatastoreFromJSONTyped(json: any, ignoreDiscriminator: boolean):
108
108
  'hardwareAcceleratedMove': json['hardwareAcceleratedMove'],
109
109
  'protocolType': json['protocolType'],
110
110
  'model': json['model'],
111
- 'hostId': json['hostId'] == null ? undefined : json['hostId'],
111
+ 'hostId': json['hostId'] === undefined ? undefined : json['hostId'] === null ? null : json['hostId'],
112
112
  };
113
113
  }
114
114
 
@@ -79,9 +79,9 @@ export function HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): Host
79
79
  'id': json['id'] == null ? undefined : json['id'],
80
80
  'vendor': json['vendor'],
81
81
  'model': json['model'],
82
- 'cpuCores': json['cpuCores'] == null ? undefined : json['cpuCores'],
83
- 'cpuSockets': json['cpuSockets'] == null ? undefined : json['cpuSockets'],
84
- 'memoryMB': json['memoryMB'] == null ? undefined : json['memoryMB'],
82
+ 'cpuCores': json['cpuCores'] === undefined ? undefined : json['cpuCores'] === null ? null : json['cpuCores'],
83
+ 'cpuSockets': json['cpuSockets'] === undefined ? undefined : json['cpuSockets'] === null ? null : json['cpuSockets'],
84
+ 'memoryMB': json['memoryMB'] === undefined ? undefined : json['memoryMB'] === null ? null : json['memoryMB'],
85
85
  };
86
86
  }
87
87
 
@@ -79,8 +79,8 @@ export function IdentityFromJSONTyped(json: any, ignoreDiscriminator: boolean):
79
79
 
80
80
  'username': json['username'],
81
81
  'kind': json['kind'],
82
- 'groupId': json['groupId'] == null ? undefined : json['groupId'],
83
- 'partnerId': json['partnerId'] == null ? undefined : json['partnerId'],
82
+ 'groupId': json['groupId'] === undefined ? undefined : json['groupId'] === null ? null : json['groupId'],
83
+ 'partnerId': json['partnerId'] === undefined ? undefined : json['partnerId'] === null ? null : json['partnerId'],
84
84
  };
85
85
  }
86
86
 
@@ -66,8 +66,8 @@ export function InfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Info
66
66
 
67
67
  'gitCommit': json['gitCommit'],
68
68
  'versionName': json['versionName'],
69
- 'agentGitCommit': json['agentGitCommit'] == null ? undefined : json['agentGitCommit'],
70
- 'agentVersionName': json['agentVersionName'] == null ? undefined : json['agentVersionName'],
69
+ 'agentGitCommit': json['agentGitCommit'] === undefined ? undefined : json['agentGitCommit'] === null ? null : json['agentGitCommit'],
70
+ 'agentVersionName': json['agentVersionName'] === undefined ? undefined : json['agentVersionName'] === null ? null : json['agentVersionName'],
71
71
  };
72
72
  }
73
73
 
@@ -152,9 +152,9 @@ export function PartnerRequestFromJSONTyped(json: any, ignoreDiscriminator: bool
152
152
  'contactPhone': json['contactPhone'],
153
153
  'email': json['email'],
154
154
  'location': json['location'],
155
- 'reason': json['reason'] == null ? undefined : json['reason'],
156
- 'acceptedAt': json['acceptedAt'] == null ? undefined : (new Date(json['acceptedAt'])),
157
- 'terminatedAt': json['terminatedAt'] == null ? undefined : (new Date(json['terminatedAt'])),
155
+ 'reason': json['reason'] === undefined ? undefined : json['reason'] === null ? null : json['reason'],
156
+ 'acceptedAt': json['acceptedAt'] === undefined ? undefined : json['acceptedAt'] === null ? null : (new Date(json['acceptedAt'])),
157
+ 'terminatedAt': json['terminatedAt'] === undefined ? undefined : json['terminatedAt'] === null ? null : (new Date(json['terminatedAt'])),
158
158
  'createdAt': (new Date(json['createdAt'])),
159
159
  };
160
160
  }
@@ -75,7 +75,7 @@ export function SnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean):
75
75
 
76
76
  'inventory': InventoryFromJSON(json['inventory']),
77
77
  'createdAt': (new Date(json['createdAt'])),
78
- 'subsetInventories': json['subsetInventories'] == null ? undefined : ((json['subsetInventories'] as Array<any>).map(AssessmentSubsetInventoryFromJSON)),
78
+ 'subsetInventories': json['subsetInventories'] === undefined ? undefined : json['subsetInventories'] === null ? null : ((json['subsetInventories'] as Array<any>).map(AssessmentSubsetInventoryFromJSON)),
79
79
  };
80
80
  }
81
81
 
@@ -164,8 +164,8 @@ export function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): So
164
164
  'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']),
165
165
  'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
166
166
  'infra': json['infra'] == null ? undefined : SourceInfraFromJSON(json['infra']),
167
- 'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
168
- 'agentVersionWarning': json['agentVersionWarning'] == null ? undefined : json['agentVersionWarning'],
167
+ 'agentVersion': json['agentVersion'] === undefined ? undefined : json['agentVersion'] === null ? null : json['agentVersion'],
168
+ 'agentVersionWarning': json['agentVersionWarning'] === undefined ? undefined : json['agentVersionWarning'] === null ? null : json['agentVersionWarning'],
169
169
  'updateType': json['updateType'] == null ? undefined : json['updateType'],
170
170
  };
171
171
  }
@@ -127,9 +127,9 @@ export function SourceCreateFromJSONTyped(json: any, ignoreDiscriminator: boolea
127
127
  return {
128
128
 
129
129
  'name': json['name'],
130
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
130
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
131
131
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
132
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
132
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
133
133
  'network': json['network'] == null ? undefined : VmNetworkFromJSON(json['network']),
134
134
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
135
135
  'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
@@ -72,7 +72,7 @@ export function SourceInfraFromJSONTyped(json: any, ignoreDiscriminator: boolean
72
72
  return {
73
73
 
74
74
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
75
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
75
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
76
76
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
77
77
  };
78
78
  }
@@ -127,8 +127,8 @@ export function SourceUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolea
127
127
 
128
128
  'name': json['name'] == null ? undefined : json['name'],
129
129
  'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
130
- 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
131
- 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
130
+ 'sshPublicKey': json['sshPublicKey'] === undefined ? undefined : json['sshPublicKey'] === null ? null : json['sshPublicKey'],
131
+ 'certificateChain': json['certificateChain'] === undefined ? undefined : json['certificateChain'] === null ? null : json['certificateChain'],
132
132
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
133
133
  'network': json['network'] == null ? undefined : VmNetworkFromJSON(json['network']),
134
134
  'vmNetwork': json['vmNetwork'] == null ? undefined : VmNetworkFromJSON(json['vmNetwork']),
package/src/runtime.ts CHANGED
@@ -367,6 +367,11 @@ export function mapValues(data: any, fn: (item: any) => any) {
367
367
  return result;
368
368
  }
369
369
 
370
+ // Pass-through serializer for `any`-typed properties in form data. See #1877.
371
+ export function anyToJSON(value: any): any {
372
+ return value;
373
+ }
374
+
370
375
  export function canConsumeForm(consumes: Consume[]): boolean {
371
376
  for (const consume of consumes) {
372
377
  if (consume.contentType?.startsWith('multipart/form-data') == true) {
package/tsconfig.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "declaration": true,
4
4
  "target": "es6",
5
5
  "module": "commonjs",
6
- "moduleResolution": "node",
7
6
  "outDir": "dist",
7
+ "rootDir": "src",
8
8
  "typeRoots": [
9
9
  "node_modules/@types"
10
10
  ]