@openshift-migration-advisor/planner-sdk 0.11.0-92891f5da8a7 → 0.11.0-ca05f2d33650
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 +2 -0
- package/README.md +5 -2
- package/dist/apis/AssessmentApi.d.ts +69 -1
- package/dist/apis/AssessmentApi.js +78 -0
- package/dist/esm/apis/AssessmentApi.d.ts +69 -1
- package/dist/esm/apis/AssessmentApi.js +79 -1
- package/dist/esm/models/PartnerRequest.d.ts +9 -2
- package/dist/esm/models/PartnerRequest.js +8 -3
- package/dist/esm/models/PartnerSummary.d.ts +50 -0
- package/dist/esm/models/PartnerSummary.js +55 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/PartnerRequest.d.ts +9 -2
- package/dist/models/PartnerRequest.js +8 -3
- package/dist/models/PartnerSummary.d.ts +50 -0
- package/dist/models/PartnerSummary.js +62 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/AssessmentApi.md +146 -0
- package/docs/PartnerRequest.md +4 -2
- package/docs/PartnerSummary.md +40 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +145 -0
- package/src/models/PartnerRequest.ts +21 -5
- package/src/models/PartnerSummary.ts +93 -0
- package/src/models/index.ts +1 -0
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PartnerRequestStatus } from './PartnerRequestStatus.js';
|
|
13
|
+
import type { PartnerSummary } from './PartnerSummary.js';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -30,10 +31,10 @@ export interface PartnerRequest {
|
|
|
30
31
|
username: string;
|
|
31
32
|
/**
|
|
32
33
|
*
|
|
33
|
-
* @type {
|
|
34
|
+
* @type {PartnerSummary}
|
|
34
35
|
* @memberof PartnerRequest
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
partner: PartnerSummary;
|
|
37
38
|
/**
|
|
38
39
|
*
|
|
39
40
|
* @type {PartnerRequestStatus}
|
|
@@ -88,6 +89,12 @@ export interface PartnerRequest {
|
|
|
88
89
|
* @memberof PartnerRequest
|
|
89
90
|
*/
|
|
90
91
|
terminatedAt?: Date | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {Date}
|
|
95
|
+
* @memberof PartnerRequest
|
|
96
|
+
*/
|
|
97
|
+
createdAt: Date;
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* Check if a given object implements the PartnerRequest interface.
|
|
@@ -19,6 +19,7 @@ exports.PartnerRequestFromJSONTyped = PartnerRequestFromJSONTyped;
|
|
|
19
19
|
exports.PartnerRequestToJSON = PartnerRequestToJSON;
|
|
20
20
|
exports.PartnerRequestToJSONTyped = PartnerRequestToJSONTyped;
|
|
21
21
|
const PartnerRequestStatus_js_1 = require("./PartnerRequestStatus.js");
|
|
22
|
+
const PartnerSummary_js_1 = require("./PartnerSummary.js");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the PartnerRequest interface.
|
|
24
25
|
*/
|
|
@@ -27,7 +28,7 @@ function instanceOfPartnerRequest(value) {
|
|
|
27
28
|
return false;
|
|
28
29
|
if (!('username' in value) || value['username'] === undefined)
|
|
29
30
|
return false;
|
|
30
|
-
if (!('
|
|
31
|
+
if (!('partner' in value) || value['partner'] === undefined)
|
|
31
32
|
return false;
|
|
32
33
|
if (!('requestStatus' in value) || value['requestStatus'] === undefined)
|
|
33
34
|
return false;
|
|
@@ -41,6 +42,8 @@ function instanceOfPartnerRequest(value) {
|
|
|
41
42
|
return false;
|
|
42
43
|
if (!('location' in value) || value['location'] === undefined)
|
|
43
44
|
return false;
|
|
45
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
46
|
+
return false;
|
|
44
47
|
return true;
|
|
45
48
|
}
|
|
46
49
|
function PartnerRequestFromJSON(json) {
|
|
@@ -53,7 +56,7 @@ function PartnerRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
56
|
return {
|
|
54
57
|
'id': json['id'],
|
|
55
58
|
'username': json['username'],
|
|
56
|
-
'
|
|
59
|
+
'partner': (0, PartnerSummary_js_1.PartnerSummaryFromJSON)(json['partner']),
|
|
57
60
|
'requestStatus': (0, PartnerRequestStatus_js_1.PartnerRequestStatusFromJSON)(json['requestStatus']),
|
|
58
61
|
'name': json['name'],
|
|
59
62
|
'contactName': json['contactName'],
|
|
@@ -63,6 +66,7 @@ function PartnerRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
63
66
|
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
64
67
|
'acceptedAt': json['acceptedAt'] == null ? undefined : (new Date(json['acceptedAt'])),
|
|
65
68
|
'terminatedAt': json['terminatedAt'] == null ? undefined : (new Date(json['terminatedAt'])),
|
|
69
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
function PartnerRequestToJSON(json) {
|
|
@@ -75,7 +79,7 @@ function PartnerRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
75
79
|
return {
|
|
76
80
|
'id': value['id'],
|
|
77
81
|
'username': value['username'],
|
|
78
|
-
'
|
|
82
|
+
'partner': (0, PartnerSummary_js_1.PartnerSummaryToJSON)(value['partner']),
|
|
79
83
|
'requestStatus': (0, PartnerRequestStatus_js_1.PartnerRequestStatusToJSON)(value['requestStatus']),
|
|
80
84
|
'name': value['name'],
|
|
81
85
|
'contactName': value['contactName'],
|
|
@@ -85,5 +89,6 @@ function PartnerRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
85
89
|
'reason': value['reason'],
|
|
86
90
|
'acceptedAt': value['acceptedAt'] == null ? value['acceptedAt'] : value['acceptedAt'].toISOString(),
|
|
87
91
|
'terminatedAt': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
|
|
92
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
88
93
|
};
|
|
89
94
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenShift Migration Advisor API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1alpha1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PartnerSummary
|
|
16
|
+
*/
|
|
17
|
+
export interface PartnerSummary {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PartnerSummary
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PartnerSummary
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PartnerSummary
|
|
34
|
+
*/
|
|
35
|
+
company: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PartnerSummary
|
|
40
|
+
*/
|
|
41
|
+
icon: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the PartnerSummary interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfPartnerSummary(value: object): value is PartnerSummary;
|
|
47
|
+
export declare function PartnerSummaryFromJSON(json: any): PartnerSummary;
|
|
48
|
+
export declare function PartnerSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartnerSummary;
|
|
49
|
+
export declare function PartnerSummaryToJSON(json: any): PartnerSummary;
|
|
50
|
+
export declare function PartnerSummaryToJSONTyped(value?: PartnerSummary | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* OpenShift Migration Advisor API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1alpha1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPartnerSummary = instanceOfPartnerSummary;
|
|
17
|
+
exports.PartnerSummaryFromJSON = PartnerSummaryFromJSON;
|
|
18
|
+
exports.PartnerSummaryFromJSONTyped = PartnerSummaryFromJSONTyped;
|
|
19
|
+
exports.PartnerSummaryToJSON = PartnerSummaryToJSON;
|
|
20
|
+
exports.PartnerSummaryToJSONTyped = PartnerSummaryToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PartnerSummary interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPartnerSummary(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('company' in value) || value['company'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('icon' in value) || value['icon'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function PartnerSummaryFromJSON(json) {
|
|
36
|
+
return PartnerSummaryFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function PartnerSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'name': json['name'],
|
|
45
|
+
'company': json['company'],
|
|
46
|
+
'icon': json['icon'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function PartnerSummaryToJSON(json) {
|
|
50
|
+
return PartnerSummaryToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function PartnerSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'id': value['id'],
|
|
58
|
+
'name': value['name'],
|
|
59
|
+
'company': value['company'],
|
|
60
|
+
'icon': value['icon'],
|
|
61
|
+
};
|
|
62
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './PartnerRequest.js';
|
|
|
47
47
|
export * from './PartnerRequestCreate.js';
|
|
48
48
|
export * from './PartnerRequestStatus.js';
|
|
49
49
|
export * from './PartnerRequestUpdate.js';
|
|
50
|
+
export * from './PartnerSummary.js';
|
|
50
51
|
export * from './PresignedUrl.js';
|
|
51
52
|
export * from './SchemaEstimationResult.js';
|
|
52
53
|
export * from './SizingOverCommitRatio.js';
|
package/dist/models/index.js
CHANGED
|
@@ -65,6 +65,7 @@ __exportStar(require("./PartnerRequest.js"), exports);
|
|
|
65
65
|
__exportStar(require("./PartnerRequestCreate.js"), exports);
|
|
66
66
|
__exportStar(require("./PartnerRequestStatus.js"), exports);
|
|
67
67
|
__exportStar(require("./PartnerRequestUpdate.js"), exports);
|
|
68
|
+
__exportStar(require("./PartnerSummary.js"), exports);
|
|
68
69
|
__exportStar(require("./PresignedUrl.js"), exports);
|
|
69
70
|
__exportStar(require("./SchemaEstimationResult.js"), exports);
|
|
70
71
|
__exportStar(require("./SizingOverCommitRatio.js"), exports);
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -13,6 +13,8 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
13
13
|
| [**getAssessment**](AssessmentApi.md#getassessment) | **GET** /api/v1/assessments/{id} | |
|
|
14
14
|
| [**getAssessmentClusterRequirementsStoredInput**](AssessmentApi.md#getassessmentclusterrequirementsstoredinput) | **GET** /api/v1/assessments/{id}/cluster-requirements/stored-input | |
|
|
15
15
|
| [**listAssessments**](AssessmentApi.md#listassessments) | **GET** /api/v1/assessments | |
|
|
16
|
+
| [**shareAssessment**](AssessmentApi.md#shareassessment) | **POST** /api/v1/assessments/{id}/share | |
|
|
17
|
+
| [**unshareAssessment**](AssessmentApi.md#unshareassessment) | **DELETE** /api/v1/assessments/{id}/share | |
|
|
16
18
|
| [**updateAssessment**](AssessmentApi.md#updateassessment) | **PUT** /api/v1/assessments/{id} | |
|
|
17
19
|
|
|
18
20
|
|
|
@@ -676,6 +678,150 @@ No authorization required
|
|
|
676
678
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
677
679
|
|
|
678
680
|
|
|
681
|
+
## shareAssessment
|
|
682
|
+
|
|
683
|
+
> Status shareAssessment(id)
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
Share an assessment with the user\'s partner organization
|
|
688
|
+
|
|
689
|
+
### Example
|
|
690
|
+
|
|
691
|
+
```ts
|
|
692
|
+
import {
|
|
693
|
+
Configuration,
|
|
694
|
+
AssessmentApi,
|
|
695
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
696
|
+
import type { ShareAssessmentRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
697
|
+
|
|
698
|
+
async function example() {
|
|
699
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
700
|
+
const api = new AssessmentApi();
|
|
701
|
+
|
|
702
|
+
const body = {
|
|
703
|
+
// string | ID of the assessment
|
|
704
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
705
|
+
} satisfies ShareAssessmentRequest;
|
|
706
|
+
|
|
707
|
+
try {
|
|
708
|
+
const data = await api.shareAssessment(body);
|
|
709
|
+
console.log(data);
|
|
710
|
+
} catch (error) {
|
|
711
|
+
console.error(error);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// Run the test
|
|
716
|
+
example().catch(console.error);
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
### Parameters
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
| Name | Type | Description | Notes |
|
|
723
|
+
|------------- | ------------- | ------------- | -------------|
|
|
724
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
725
|
+
|
|
726
|
+
### Return type
|
|
727
|
+
|
|
728
|
+
[**Status**](Status.md)
|
|
729
|
+
|
|
730
|
+
### Authorization
|
|
731
|
+
|
|
732
|
+
No authorization required
|
|
733
|
+
|
|
734
|
+
### HTTP request headers
|
|
735
|
+
|
|
736
|
+
- **Content-Type**: Not defined
|
|
737
|
+
- **Accept**: `application/json`
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
### HTTP response details
|
|
741
|
+
| Status code | Description | Response headers |
|
|
742
|
+
|-------------|-------------|------------------|
|
|
743
|
+
| **200** | OK | - |
|
|
744
|
+
| **400** | Bad Request | - |
|
|
745
|
+
| **401** | Unauthorized | - |
|
|
746
|
+
| **403** | Forbidden | - |
|
|
747
|
+
| **404** | NotFound | - |
|
|
748
|
+
| **500** | Internal error | - |
|
|
749
|
+
|
|
750
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
## unshareAssessment
|
|
754
|
+
|
|
755
|
+
> Status unshareAssessment(id)
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
Unshare an assessment from the user\'s partner organization
|
|
760
|
+
|
|
761
|
+
### Example
|
|
762
|
+
|
|
763
|
+
```ts
|
|
764
|
+
import {
|
|
765
|
+
Configuration,
|
|
766
|
+
AssessmentApi,
|
|
767
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
768
|
+
import type { UnshareAssessmentRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
769
|
+
|
|
770
|
+
async function example() {
|
|
771
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
772
|
+
const api = new AssessmentApi();
|
|
773
|
+
|
|
774
|
+
const body = {
|
|
775
|
+
// string | ID of the assessment
|
|
776
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
777
|
+
} satisfies UnshareAssessmentRequest;
|
|
778
|
+
|
|
779
|
+
try {
|
|
780
|
+
const data = await api.unshareAssessment(body);
|
|
781
|
+
console.log(data);
|
|
782
|
+
} catch (error) {
|
|
783
|
+
console.error(error);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
// Run the test
|
|
788
|
+
example().catch(console.error);
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
### Parameters
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
| Name | Type | Description | Notes |
|
|
795
|
+
|------------- | ------------- | ------------- | -------------|
|
|
796
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
797
|
+
|
|
798
|
+
### Return type
|
|
799
|
+
|
|
800
|
+
[**Status**](Status.md)
|
|
801
|
+
|
|
802
|
+
### Authorization
|
|
803
|
+
|
|
804
|
+
No authorization required
|
|
805
|
+
|
|
806
|
+
### HTTP request headers
|
|
807
|
+
|
|
808
|
+
- **Content-Type**: Not defined
|
|
809
|
+
- **Accept**: `application/json`
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
### HTTP response details
|
|
813
|
+
| Status code | Description | Response headers |
|
|
814
|
+
|-------------|-------------|------------------|
|
|
815
|
+
| **200** | OK | - |
|
|
816
|
+
| **400** | Bad Request | - |
|
|
817
|
+
| **401** | Unauthorized | - |
|
|
818
|
+
| **403** | Forbidden | - |
|
|
819
|
+
| **404** | NotFound | - |
|
|
820
|
+
| **500** | Internal error | - |
|
|
821
|
+
|
|
822
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
823
|
+
|
|
824
|
+
|
|
679
825
|
## updateAssessment
|
|
680
826
|
|
|
681
827
|
> Assessment updateAssessment(id, assessmentUpdate)
|
package/docs/PartnerRequest.md
CHANGED
|
@@ -8,7 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`username` | string
|
|
11
|
-
`
|
|
11
|
+
`partner` | [PartnerSummary](PartnerSummary.md)
|
|
12
12
|
`requestStatus` | [PartnerRequestStatus](PartnerRequestStatus.md)
|
|
13
13
|
`name` | string
|
|
14
14
|
`contactName` | string
|
|
@@ -18,6 +18,7 @@ Name | Type
|
|
|
18
18
|
`reason` | string
|
|
19
19
|
`acceptedAt` | Date
|
|
20
20
|
`terminatedAt` | Date
|
|
21
|
+
`createdAt` | Date
|
|
21
22
|
|
|
22
23
|
## Example
|
|
23
24
|
|
|
@@ -28,7 +29,7 @@ import type { PartnerRequest } from '@openshift-migration-advisor/planner-sdk'
|
|
|
28
29
|
const example = {
|
|
29
30
|
"id": null,
|
|
30
31
|
"username": null,
|
|
31
|
-
"
|
|
32
|
+
"partner": null,
|
|
32
33
|
"requestStatus": null,
|
|
33
34
|
"name": null,
|
|
34
35
|
"contactName": null,
|
|
@@ -38,6 +39,7 @@ const example = {
|
|
|
38
39
|
"reason": null,
|
|
39
40
|
"acceptedAt": null,
|
|
40
41
|
"terminatedAt": null,
|
|
42
|
+
"createdAt": null,
|
|
41
43
|
} satisfies PartnerRequest
|
|
42
44
|
|
|
43
45
|
console.log(example)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# PartnerSummary
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`company` | string
|
|
12
|
+
`icon` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PartnerSummary } from '@openshift-migration-advisor/planner-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"name": null,
|
|
23
|
+
"company": null,
|
|
24
|
+
"icon": null,
|
|
25
|
+
} satisfies PartnerSummary
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as PartnerSummary
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
MigrationEstimationByComplexityResponse,
|
|
27
27
|
MigrationEstimationRequest,
|
|
28
28
|
MigrationEstimationResponse,
|
|
29
|
+
Status,
|
|
29
30
|
} from '../models/index.js';
|
|
30
31
|
import {
|
|
31
32
|
AssessmentFromJSON,
|
|
@@ -50,6 +51,8 @@ import {
|
|
|
50
51
|
MigrationEstimationRequestToJSON,
|
|
51
52
|
MigrationEstimationResponseFromJSON,
|
|
52
53
|
MigrationEstimationResponseToJSON,
|
|
54
|
+
StatusFromJSON,
|
|
55
|
+
StatusToJSON,
|
|
53
56
|
} from '../models/index.js';
|
|
54
57
|
|
|
55
58
|
export interface CalculateAssessmentClusterRequirementsRequest {
|
|
@@ -93,6 +96,14 @@ export interface ListAssessmentsRequest {
|
|
|
93
96
|
sourceId?: string;
|
|
94
97
|
}
|
|
95
98
|
|
|
99
|
+
export interface ShareAssessmentRequest {
|
|
100
|
+
id: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface UnshareAssessmentRequest {
|
|
104
|
+
id: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
export interface UpdateAssessmentRequest {
|
|
97
108
|
id: string;
|
|
98
109
|
assessmentUpdate: AssessmentUpdate;
|
|
@@ -313,6 +324,50 @@ export interface AssessmentApiInterface {
|
|
|
313
324
|
*/
|
|
314
325
|
listAssessments(requestParameters: ListAssessmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
|
|
315
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Creates request options for shareAssessment without sending the request
|
|
329
|
+
* @param {string} id ID of the assessment
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
* @memberof AssessmentApiInterface
|
|
332
|
+
*/
|
|
333
|
+
shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts>;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Share an assessment with the user\'s partner organization
|
|
337
|
+
* @param {string} id ID of the assessment
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
* @memberof AssessmentApiInterface
|
|
341
|
+
*/
|
|
342
|
+
shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Share an assessment with the user\'s partner organization
|
|
346
|
+
*/
|
|
347
|
+
shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Creates request options for unshareAssessment without sending the request
|
|
351
|
+
* @param {string} id ID of the assessment
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
* @memberof AssessmentApiInterface
|
|
354
|
+
*/
|
|
355
|
+
unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts>;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Unshare an assessment from the user\'s partner organization
|
|
359
|
+
* @param {string} id ID of the assessment
|
|
360
|
+
* @param {*} [options] Override http request option.
|
|
361
|
+
* @throws {RequiredError}
|
|
362
|
+
* @memberof AssessmentApiInterface
|
|
363
|
+
*/
|
|
364
|
+
unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Unshare an assessment from the user\'s partner organization
|
|
368
|
+
*/
|
|
369
|
+
unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
|
|
370
|
+
|
|
316
371
|
/**
|
|
317
372
|
* Creates request options for updateAssessment without sending the request
|
|
318
373
|
* @param {string} id ID of the assessment
|
|
@@ -798,6 +853,96 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
798
853
|
return await response.value();
|
|
799
854
|
}
|
|
800
855
|
|
|
856
|
+
/**
|
|
857
|
+
* Creates request options for shareAssessment without sending the request
|
|
858
|
+
*/
|
|
859
|
+
async shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts> {
|
|
860
|
+
if (requestParameters['id'] == null) {
|
|
861
|
+
throw new runtime.RequiredError(
|
|
862
|
+
'id',
|
|
863
|
+
'Required parameter "id" was null or undefined when calling shareAssessment().'
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
const queryParameters: any = {};
|
|
868
|
+
|
|
869
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
let urlPath = `/api/v1/assessments/{id}/share`;
|
|
873
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
874
|
+
|
|
875
|
+
return {
|
|
876
|
+
path: urlPath,
|
|
877
|
+
method: 'POST',
|
|
878
|
+
headers: headerParameters,
|
|
879
|
+
query: queryParameters,
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Share an assessment with the user\'s partner organization
|
|
885
|
+
*/
|
|
886
|
+
async shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>> {
|
|
887
|
+
const requestOptions = await this.shareAssessmentRequestOpts(requestParameters);
|
|
888
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
889
|
+
|
|
890
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue));
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Share an assessment with the user\'s partner organization
|
|
895
|
+
*/
|
|
896
|
+
async shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status> {
|
|
897
|
+
const response = await this.shareAssessmentRaw(requestParameters, initOverrides);
|
|
898
|
+
return await response.value();
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Creates request options for unshareAssessment without sending the request
|
|
903
|
+
*/
|
|
904
|
+
async unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts> {
|
|
905
|
+
if (requestParameters['id'] == null) {
|
|
906
|
+
throw new runtime.RequiredError(
|
|
907
|
+
'id',
|
|
908
|
+
'Required parameter "id" was null or undefined when calling unshareAssessment().'
|
|
909
|
+
);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
const queryParameters: any = {};
|
|
913
|
+
|
|
914
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
let urlPath = `/api/v1/assessments/{id}/share`;
|
|
918
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
919
|
+
|
|
920
|
+
return {
|
|
921
|
+
path: urlPath,
|
|
922
|
+
method: 'DELETE',
|
|
923
|
+
headers: headerParameters,
|
|
924
|
+
query: queryParameters,
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Unshare an assessment from the user\'s partner organization
|
|
930
|
+
*/
|
|
931
|
+
async unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>> {
|
|
932
|
+
const requestOptions = await this.unshareAssessmentRequestOpts(requestParameters);
|
|
933
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
934
|
+
|
|
935
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue));
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Unshare an assessment from the user\'s partner organization
|
|
940
|
+
*/
|
|
941
|
+
async unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status> {
|
|
942
|
+
const response = await this.unshareAssessmentRaw(requestParameters, initOverrides);
|
|
943
|
+
return await response.value();
|
|
944
|
+
}
|
|
945
|
+
|
|
801
946
|
/**
|
|
802
947
|
* Creates request options for updateAssessment without sending the request
|
|
803
948
|
*/
|