|
1 | 1 | import * as runtime from '../../../lib/runtime.js'; |
2 | 2 | import type { InitOverride, ApiResponse } from '../../../lib/runtime.js'; |
3 | 3 | import type { |
| 4 | + ClearAssessorsRequestContent, |
4 | 5 | DeletePermissionsRequest, |
5 | 6 | DeleteUserIdentityByUserId200ResponseInner, |
6 | 7 | DeleteUserRolesRequest, |
@@ -64,6 +65,7 @@ import type { |
64 | 65 | PatchAuthenticationMethodsByAuthenticationMethodIdOperationRequest, |
65 | 66 | PatchUsersByIdRequest, |
66 | 67 | PostAuthenticationMethodsOperationRequest, |
| 68 | + PostClearAssessorsRequest, |
67 | 69 | PostIdentitiesOperationRequest, |
68 | 70 | PostInvalidateRememberBrowserRequest, |
69 | 71 | PostPermissionsOperationRequest, |
@@ -1069,6 +1071,38 @@ export class UsersManager extends BaseAPI { |
1069 | 1071 | return runtime.JSONApiResponse.fromResponse(response); |
1070 | 1072 | } |
1071 | 1073 |
|
| 1074 | + /** |
| 1075 | + * Clear risk assessment assessors for a specific user |
| 1076 | + * |
| 1077 | + * @throws {RequiredError} |
| 1078 | + */ |
| 1079 | + async clearRiskAssessors( |
| 1080 | + requestParameters: PostClearAssessorsRequest, |
| 1081 | + bodyParameters: ClearAssessorsRequestContent, |
| 1082 | + initOverrides?: InitOverride |
| 1083 | + ): Promise<ApiResponse<void>> { |
| 1084 | + runtime.validateRequiredRequestParams(requestParameters, ['id']); |
| 1085 | + |
| 1086 | + const headerParameters: runtime.HTTPHeaders = {}; |
| 1087 | + |
| 1088 | + headerParameters['Content-Type'] = 'application/json'; |
| 1089 | + |
| 1090 | + const response = await this.request( |
| 1091 | + { |
| 1092 | + path: `/users/{id}/risk-assessments/clear`.replace( |
| 1093 | + '{id}', |
| 1094 | + encodeURIComponent(String(requestParameters.id)) |
| 1095 | + ), |
| 1096 | + method: 'POST', |
| 1097 | + headers: headerParameters, |
| 1098 | + body: bodyParameters, |
| 1099 | + }, |
| 1100 | + initOverrides |
| 1101 | + ); |
| 1102 | + |
| 1103 | + return runtime.VoidApiResponse.fromResponse(response); |
| 1104 | + } |
| 1105 | + |
1072 | 1106 | /** |
1073 | 1107 | * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. |
1074 | 1108 | * |
|
0 commit comments