@openshift-migration-advisor/planner-sdk 0.11.0-92891f5da8a7 → 0.11.0-f3a9690b65b0

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 CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/planner-sdk@0.11.0-92891f5da8a7
1
+ # @openshift-migration-advisor/planner-sdk@0.11.0-f3a9690b65b0
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -69,6 +69,8 @@ All URIs are relative to *https://raw.githubusercontent.com*
69
69
  *AssessmentApi* | [**getAssessment**](docs/AssessmentApi.md#getassessment) | **GET** /api/v1/assessments/{id} |
70
70
  *AssessmentApi* | [**getAssessmentClusterRequirementsStoredInput**](docs/AssessmentApi.md#getassessmentclusterrequirementsstoredinput) | **GET** /api/v1/assessments/{id}/cluster-requirements/stored-input |
71
71
  *AssessmentApi* | [**listAssessments**](docs/AssessmentApi.md#listassessments) | **GET** /api/v1/assessments |
72
+ *AssessmentApi* | [**shareAssessment**](docs/AssessmentApi.md#shareassessment) | **POST** /api/v1/assessments/{id}/share |
73
+ *AssessmentApi* | [**unshareAssessment**](docs/AssessmentApi.md#unshareassessment) | **DELETE** /api/v1/assessments/{id}/share |
72
74
  *AssessmentApi* | [**updateAssessment**](docs/AssessmentApi.md#updateassessment) | **PUT** /api/v1/assessments/{id} |
73
75
  *HealthApi* | [**health**](docs/HealthApi.md#health) | **GET** /health |
74
76
  *ImageApi* | [**getSourceDownloadURL**](docs/ImageApi.md#getsourcedownloadurl) | **GET** /api/v1/sources/{id}/image-url |
@@ -175,7 +177,7 @@ and is automatically generated by the
175
177
  [OpenAPI Generator](https://openapi-generator.tech) project:
176
178
 
177
179
  - API version: `v1alpha1`
178
- - Package version: `0.11.0-92891f5da8a7`
180
+ - Package version: `0.11.0-f3a9690b65b0`
179
181
  - Generator version: `7.22.0-SNAPSHOT`
180
182
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
181
183
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, ClusterRequirementsStoredInput, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationByComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse } from '../models/index.js';
13
+ import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, ClusterRequirementsStoredInput, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationByComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse, Status } from '../models/index.js';
14
14
  export interface CalculateAssessmentClusterRequirementsRequest {
15
15
  id: string;
16
16
  clusterRequirementsRequest: ClusterRequirementsRequest;
@@ -43,6 +43,12 @@ export interface GetAssessmentClusterRequirementsStoredInputRequest {
43
43
  export interface ListAssessmentsRequest {
44
44
  sourceId?: string;
45
45
  }
46
+ export interface ShareAssessmentRequest {
47
+ id: string;
48
+ }
49
+ export interface UnshareAssessmentRequest {
50
+ id: string;
51
+ }
46
52
  export interface UpdateAssessmentRequest {
47
53
  id: string;
48
54
  assessmentUpdate: AssessmentUpdate;
@@ -235,6 +241,44 @@ export interface AssessmentApiInterface {
235
241
  * List assessments
236
242
  */
237
243
  listAssessments(requestParameters: ListAssessmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
244
+ /**
245
+ * Creates request options for shareAssessment without sending the request
246
+ * @param {string} id ID of the assessment
247
+ * @throws {RequiredError}
248
+ * @memberof AssessmentApiInterface
249
+ */
250
+ shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts>;
251
+ /**
252
+ * Share an assessment with the user\'s partner organization
253
+ * @param {string} id ID of the assessment
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ * @memberof AssessmentApiInterface
257
+ */
258
+ shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
259
+ /**
260
+ * Share an assessment with the user\'s partner organization
261
+ */
262
+ shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
263
+ /**
264
+ * Creates request options for unshareAssessment without sending the request
265
+ * @param {string} id ID of the assessment
266
+ * @throws {RequiredError}
267
+ * @memberof AssessmentApiInterface
268
+ */
269
+ unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts>;
270
+ /**
271
+ * Unshare an assessment from the user\'s partner organization
272
+ * @param {string} id ID of the assessment
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ * @memberof AssessmentApiInterface
276
+ */
277
+ unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
278
+ /**
279
+ * Unshare an assessment from the user\'s partner organization
280
+ */
281
+ unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
238
282
  /**
239
283
  * Creates request options for updateAssessment without sending the request
240
284
  * @param {string} id ID of the assessment
@@ -369,6 +413,30 @@ export declare class AssessmentApi extends runtime.BaseAPI implements Assessment
369
413
  * List assessments
370
414
  */
371
415
  listAssessments(requestParameters?: ListAssessmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
416
+ /**
417
+ * Creates request options for shareAssessment without sending the request
418
+ */
419
+ shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts>;
420
+ /**
421
+ * Share an assessment with the user\'s partner organization
422
+ */
423
+ shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
424
+ /**
425
+ * Share an assessment with the user\'s partner organization
426
+ */
427
+ shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
428
+ /**
429
+ * Creates request options for unshareAssessment without sending the request
430
+ */
431
+ unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts>;
432
+ /**
433
+ * Unshare an assessment from the user\'s partner organization
434
+ */
435
+ unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
436
+ /**
437
+ * Unshare an assessment from the user\'s partner organization
438
+ */
439
+ unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
372
440
  /**
373
441
  * Creates request options for updateAssessment without sending the request
374
442
  */
@@ -406,6 +406,84 @@ class AssessmentApi extends runtime.BaseAPI {
406
406
  return yield response.value();
407
407
  });
408
408
  }
409
+ /**
410
+ * Creates request options for shareAssessment without sending the request
411
+ */
412
+ shareAssessmentRequestOpts(requestParameters) {
413
+ return __awaiter(this, void 0, void 0, function* () {
414
+ if (requestParameters['id'] == null) {
415
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling shareAssessment().');
416
+ }
417
+ const queryParameters = {};
418
+ const headerParameters = {};
419
+ let urlPath = `/api/v1/assessments/{id}/share`;
420
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
421
+ return {
422
+ path: urlPath,
423
+ method: 'POST',
424
+ headers: headerParameters,
425
+ query: queryParameters,
426
+ };
427
+ });
428
+ }
429
+ /**
430
+ * Share an assessment with the user\'s partner organization
431
+ */
432
+ shareAssessmentRaw(requestParameters, initOverrides) {
433
+ return __awaiter(this, void 0, void 0, function* () {
434
+ const requestOptions = yield this.shareAssessmentRequestOpts(requestParameters);
435
+ const response = yield this.request(requestOptions, initOverrides);
436
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.StatusFromJSON)(jsonValue));
437
+ });
438
+ }
439
+ /**
440
+ * Share an assessment with the user\'s partner organization
441
+ */
442
+ shareAssessment(requestParameters, initOverrides) {
443
+ return __awaiter(this, void 0, void 0, function* () {
444
+ const response = yield this.shareAssessmentRaw(requestParameters, initOverrides);
445
+ return yield response.value();
446
+ });
447
+ }
448
+ /**
449
+ * Creates request options for unshareAssessment without sending the request
450
+ */
451
+ unshareAssessmentRequestOpts(requestParameters) {
452
+ return __awaiter(this, void 0, void 0, function* () {
453
+ if (requestParameters['id'] == null) {
454
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling unshareAssessment().');
455
+ }
456
+ const queryParameters = {};
457
+ const headerParameters = {};
458
+ let urlPath = `/api/v1/assessments/{id}/share`;
459
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
460
+ return {
461
+ path: urlPath,
462
+ method: 'DELETE',
463
+ headers: headerParameters,
464
+ query: queryParameters,
465
+ };
466
+ });
467
+ }
468
+ /**
469
+ * Unshare an assessment from the user\'s partner organization
470
+ */
471
+ unshareAssessmentRaw(requestParameters, initOverrides) {
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ const requestOptions = yield this.unshareAssessmentRequestOpts(requestParameters);
474
+ const response = yield this.request(requestOptions, initOverrides);
475
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.StatusFromJSON)(jsonValue));
476
+ });
477
+ }
478
+ /**
479
+ * Unshare an assessment from the user\'s partner organization
480
+ */
481
+ unshareAssessment(requestParameters, initOverrides) {
482
+ return __awaiter(this, void 0, void 0, function* () {
483
+ const response = yield this.unshareAssessmentRaw(requestParameters, initOverrides);
484
+ return yield response.value();
485
+ });
486
+ }
409
487
  /**
410
488
  * Creates request options for updateAssessment without sending the request
411
489
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, ClusterRequirementsStoredInput, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationByComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse } from '../models/index.js';
13
+ import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, ClusterRequirementsStoredInput, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationByComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse, Status } from '../models/index.js';
14
14
  export interface CalculateAssessmentClusterRequirementsRequest {
15
15
  id: string;
16
16
  clusterRequirementsRequest: ClusterRequirementsRequest;
@@ -43,6 +43,12 @@ export interface GetAssessmentClusterRequirementsStoredInputRequest {
43
43
  export interface ListAssessmentsRequest {
44
44
  sourceId?: string;
45
45
  }
46
+ export interface ShareAssessmentRequest {
47
+ id: string;
48
+ }
49
+ export interface UnshareAssessmentRequest {
50
+ id: string;
51
+ }
46
52
  export interface UpdateAssessmentRequest {
47
53
  id: string;
48
54
  assessmentUpdate: AssessmentUpdate;
@@ -235,6 +241,44 @@ export interface AssessmentApiInterface {
235
241
  * List assessments
236
242
  */
237
243
  listAssessments(requestParameters: ListAssessmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
244
+ /**
245
+ * Creates request options for shareAssessment without sending the request
246
+ * @param {string} id ID of the assessment
247
+ * @throws {RequiredError}
248
+ * @memberof AssessmentApiInterface
249
+ */
250
+ shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts>;
251
+ /**
252
+ * Share an assessment with the user\'s partner organization
253
+ * @param {string} id ID of the assessment
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ * @memberof AssessmentApiInterface
257
+ */
258
+ shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
259
+ /**
260
+ * Share an assessment with the user\'s partner organization
261
+ */
262
+ shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
263
+ /**
264
+ * Creates request options for unshareAssessment without sending the request
265
+ * @param {string} id ID of the assessment
266
+ * @throws {RequiredError}
267
+ * @memberof AssessmentApiInterface
268
+ */
269
+ unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts>;
270
+ /**
271
+ * Unshare an assessment from the user\'s partner organization
272
+ * @param {string} id ID of the assessment
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ * @memberof AssessmentApiInterface
276
+ */
277
+ unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
278
+ /**
279
+ * Unshare an assessment from the user\'s partner organization
280
+ */
281
+ unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
238
282
  /**
239
283
  * Creates request options for updateAssessment without sending the request
240
284
  * @param {string} id ID of the assessment
@@ -369,6 +413,30 @@ export declare class AssessmentApi extends runtime.BaseAPI implements Assessment
369
413
  * List assessments
370
414
  */
371
415
  listAssessments(requestParameters?: ListAssessmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
416
+ /**
417
+ * Creates request options for shareAssessment without sending the request
418
+ */
419
+ shareAssessmentRequestOpts(requestParameters: ShareAssessmentRequest): Promise<runtime.RequestOpts>;
420
+ /**
421
+ * Share an assessment with the user\'s partner organization
422
+ */
423
+ shareAssessmentRaw(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
424
+ /**
425
+ * Share an assessment with the user\'s partner organization
426
+ */
427
+ shareAssessment(requestParameters: ShareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
428
+ /**
429
+ * Creates request options for unshareAssessment without sending the request
430
+ */
431
+ unshareAssessmentRequestOpts(requestParameters: UnshareAssessmentRequest): Promise<runtime.RequestOpts>;
432
+ /**
433
+ * Unshare an assessment from the user\'s partner organization
434
+ */
435
+ unshareAssessmentRaw(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Status>>;
436
+ /**
437
+ * Unshare an assessment from the user\'s partner organization
438
+ */
439
+ unshareAssessment(requestParameters: UnshareAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Status>;
372
440
  /**
373
441
  * Creates request options for updateAssessment without sending the request
374
442
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { AssessmentFromJSON, AssessmentFormToJSON, AssessmentUpdateToJSON, ClusterRequirementsRequestToJSON, ClusterRequirementsResponseFromJSON, ClusterRequirementsStoredInputFromJSON, MigrationComplexityRequestToJSON, MigrationComplexityResponseFromJSON, MigrationEstimationByComplexityResponseFromJSON, MigrationEstimationRequestToJSON, MigrationEstimationResponseFromJSON, } from '../models/index.js';
24
+ import { AssessmentFromJSON, AssessmentFormToJSON, AssessmentUpdateToJSON, ClusterRequirementsRequestToJSON, ClusterRequirementsResponseFromJSON, ClusterRequirementsStoredInputFromJSON, MigrationComplexityRequestToJSON, MigrationComplexityResponseFromJSON, MigrationEstimationByComplexityResponseFromJSON, MigrationEstimationRequestToJSON, MigrationEstimationResponseFromJSON, StatusFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -403,6 +403,84 @@ export class AssessmentApi extends runtime.BaseAPI {
403
403
  return yield response.value();
404
404
  });
405
405
  }
406
+ /**
407
+ * Creates request options for shareAssessment without sending the request
408
+ */
409
+ shareAssessmentRequestOpts(requestParameters) {
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ if (requestParameters['id'] == null) {
412
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling shareAssessment().');
413
+ }
414
+ const queryParameters = {};
415
+ const headerParameters = {};
416
+ let urlPath = `/api/v1/assessments/{id}/share`;
417
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
418
+ return {
419
+ path: urlPath,
420
+ method: 'POST',
421
+ headers: headerParameters,
422
+ query: queryParameters,
423
+ };
424
+ });
425
+ }
426
+ /**
427
+ * Share an assessment with the user\'s partner organization
428
+ */
429
+ shareAssessmentRaw(requestParameters, initOverrides) {
430
+ return __awaiter(this, void 0, void 0, function* () {
431
+ const requestOptions = yield this.shareAssessmentRequestOpts(requestParameters);
432
+ const response = yield this.request(requestOptions, initOverrides);
433
+ return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue));
434
+ });
435
+ }
436
+ /**
437
+ * Share an assessment with the user\'s partner organization
438
+ */
439
+ shareAssessment(requestParameters, initOverrides) {
440
+ return __awaiter(this, void 0, void 0, function* () {
441
+ const response = yield this.shareAssessmentRaw(requestParameters, initOverrides);
442
+ return yield response.value();
443
+ });
444
+ }
445
+ /**
446
+ * Creates request options for unshareAssessment without sending the request
447
+ */
448
+ unshareAssessmentRequestOpts(requestParameters) {
449
+ return __awaiter(this, void 0, void 0, function* () {
450
+ if (requestParameters['id'] == null) {
451
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling unshareAssessment().');
452
+ }
453
+ const queryParameters = {};
454
+ const headerParameters = {};
455
+ let urlPath = `/api/v1/assessments/{id}/share`;
456
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
457
+ return {
458
+ path: urlPath,
459
+ method: 'DELETE',
460
+ headers: headerParameters,
461
+ query: queryParameters,
462
+ };
463
+ });
464
+ }
465
+ /**
466
+ * Unshare an assessment from the user\'s partner organization
467
+ */
468
+ unshareAssessmentRaw(requestParameters, initOverrides) {
469
+ return __awaiter(this, void 0, void 0, function* () {
470
+ const requestOptions = yield this.unshareAssessmentRequestOpts(requestParameters);
471
+ const response = yield this.request(requestOptions, initOverrides);
472
+ return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue));
473
+ });
474
+ }
475
+ /**
476
+ * Unshare an assessment from the user\'s partner organization
477
+ */
478
+ unshareAssessment(requestParameters, initOverrides) {
479
+ return __awaiter(this, void 0, void 0, function* () {
480
+ const response = yield this.unshareAssessmentRaw(requestParameters, initOverrides);
481
+ return yield response.value();
482
+ });
483
+ }
406
484
  /**
407
485
  * Creates request options for updateAssessment without sending the request
408
486
  */
@@ -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\&#39;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\&#39;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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/planner-sdk",
3
- "version": "0.11.0-92891f5da8a7",
3
+ "version": "0.11.0-f3a9690b65b0",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/planner-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
  */