Files
auth/backend/keycloak/kc-client/apis/ClientRoleMappingsApi.ts
2022-09-05 17:02:45 +02:00

587 lines
28 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Keycloak Admin REST API
* This is a REST API reference for the Keycloak Admin
*
* The version of the OpenAPI document: 1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import {
RoleRepresentation,
RoleRepresentationFromJSON,
RoleRepresentationToJSON,
} from '../models';
export interface RealmGroupsIdRoleMappingsClientsClientAvailableGetRequest {
realm: string;
id: string;
client: string;
}
export interface RealmGroupsIdRoleMappingsClientsClientCompositeGetRequest {
realm: string;
id: string;
client: string;
briefRepresentation?: boolean;
}
export interface RealmGroupsIdRoleMappingsClientsClientDeleteRequest {
realm: string;
id: string;
client: string;
roleRepresentation: Array<RoleRepresentation>;
}
export interface RealmGroupsIdRoleMappingsClientsClientGetRequest {
realm: string;
id: string;
client: string;
}
export interface RealmGroupsIdRoleMappingsClientsClientPostRequest {
realm: string;
id: string;
client: string;
roleRepresentation: Array<RoleRepresentation>;
}
export interface RealmUsersIdRoleMappingsClientsClientAvailableGetRequest {
realm: string;
id: string;
client: string;
}
export interface RealmUsersIdRoleMappingsClientsClientCompositeGetRequest {
realm: string;
id: string;
client: string;
briefRepresentation?: boolean;
}
export interface RealmUsersIdRoleMappingsClientsClientDeleteRequest {
realm: string;
id: string;
client: string;
roleRepresentation: Array<RoleRepresentation>;
}
export interface RealmUsersIdRoleMappingsClientsClientGetRequest {
realm: string;
id: string;
client: string;
}
export interface RealmUsersIdRoleMappingsClientsClientPostRequest {
realm: string;
id: string;
client: string;
roleRepresentation: Array<RoleRepresentation>;
}
/**
*
*/
export class ClientRoleMappingsApi extends runtime.BaseAPI {
/**
* Get available client-level roles that can be mapped to the user
*/
async realmGroupsIdRoleMappingsClientsClientAvailableGetRaw(requestParameters: RealmGroupsIdRoleMappingsClientsClientAvailableGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmGroupsIdRoleMappingsClientsClientAvailableGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmGroupsIdRoleMappingsClientsClientAvailableGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmGroupsIdRoleMappingsClientsClientAvailableGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/groups/{id}/role-mappings/clients/{client}/available`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get available client-level roles that can be mapped to the user
*/
async realmGroupsIdRoleMappingsClientsClientAvailableGet(requestParameters: RealmGroupsIdRoleMappingsClientsClientAvailableGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmGroupsIdRoleMappingsClientsClientAvailableGetRaw(requestParameters);
return await response.value();
}
/**
* Get effective client-level role mappings This recurses any composite roles
*/
async realmGroupsIdRoleMappingsClientsClientCompositeGetRaw(requestParameters: RealmGroupsIdRoleMappingsClientsClientCompositeGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmGroupsIdRoleMappingsClientsClientCompositeGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmGroupsIdRoleMappingsClientsClientCompositeGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmGroupsIdRoleMappingsClientsClientCompositeGet.');
}
const queryParameters: runtime.HTTPQuery = {};
if (requestParameters.briefRepresentation !== undefined) {
queryParameters['briefRepresentation'] = requestParameters.briefRepresentation;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/groups/{id}/role-mappings/clients/{client}/composite`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get effective client-level role mappings This recurses any composite roles
*/
async realmGroupsIdRoleMappingsClientsClientCompositeGet(requestParameters: RealmGroupsIdRoleMappingsClientsClientCompositeGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmGroupsIdRoleMappingsClientsClientCompositeGetRaw(requestParameters);
return await response.value();
}
/**
* Delete client-level roles from user role mapping
*/
async realmGroupsIdRoleMappingsClientsClientDeleteRaw(requestParameters: RealmGroupsIdRoleMappingsClientsClientDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmGroupsIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmGroupsIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmGroupsIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.roleRepresentation === null || requestParameters.roleRepresentation === undefined) {
throw new runtime.RequiredError('roleRepresentation','Required parameter requestParameters.roleRepresentation was null or undefined when calling realmGroupsIdRoleMappingsClientsClientDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/groups/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
body: requestParameters.roleRepresentation.map(RoleRepresentationToJSON),
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete client-level roles from user role mapping
*/
async realmGroupsIdRoleMappingsClientsClientDelete(requestParameters: RealmGroupsIdRoleMappingsClientsClientDeleteRequest): Promise<void> {
await this.realmGroupsIdRoleMappingsClientsClientDeleteRaw(requestParameters);
}
/**
* Get client-level role mappings for the user, and the app
*/
async realmGroupsIdRoleMappingsClientsClientGetRaw(requestParameters: RealmGroupsIdRoleMappingsClientsClientGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmGroupsIdRoleMappingsClientsClientGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmGroupsIdRoleMappingsClientsClientGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmGroupsIdRoleMappingsClientsClientGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/groups/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get client-level role mappings for the user, and the app
*/
async realmGroupsIdRoleMappingsClientsClientGet(requestParameters: RealmGroupsIdRoleMappingsClientsClientGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmGroupsIdRoleMappingsClientsClientGetRaw(requestParameters);
return await response.value();
}
/**
* Add client-level roles to the user role mapping
*/
async realmGroupsIdRoleMappingsClientsClientPostRaw(requestParameters: RealmGroupsIdRoleMappingsClientsClientPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmGroupsIdRoleMappingsClientsClientPost.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmGroupsIdRoleMappingsClientsClientPost.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmGroupsIdRoleMappingsClientsClientPost.');
}
if (requestParameters.roleRepresentation === null || requestParameters.roleRepresentation === undefined) {
throw new runtime.RequiredError('roleRepresentation','Required parameter requestParameters.roleRepresentation was null or undefined when calling realmGroupsIdRoleMappingsClientsClientPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/groups/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.roleRepresentation.map(RoleRepresentationToJSON),
});
return new runtime.VoidApiResponse(response);
}
/**
* Add client-level roles to the user role mapping
*/
async realmGroupsIdRoleMappingsClientsClientPost(requestParameters: RealmGroupsIdRoleMappingsClientsClientPostRequest): Promise<void> {
await this.realmGroupsIdRoleMappingsClientsClientPostRaw(requestParameters);
}
/**
* Get available client-level roles that can be mapped to the user
*/
async realmUsersIdRoleMappingsClientsClientAvailableGetRaw(requestParameters: RealmUsersIdRoleMappingsClientsClientAvailableGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmUsersIdRoleMappingsClientsClientAvailableGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmUsersIdRoleMappingsClientsClientAvailableGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmUsersIdRoleMappingsClientsClientAvailableGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/users/{id}/role-mappings/clients/{client}/available`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get available client-level roles that can be mapped to the user
*/
async realmUsersIdRoleMappingsClientsClientAvailableGet(requestParameters: RealmUsersIdRoleMappingsClientsClientAvailableGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmUsersIdRoleMappingsClientsClientAvailableGetRaw(requestParameters);
return await response.value();
}
/**
* Get effective client-level role mappings This recurses any composite roles
*/
async realmUsersIdRoleMappingsClientsClientCompositeGetRaw(requestParameters: RealmUsersIdRoleMappingsClientsClientCompositeGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmUsersIdRoleMappingsClientsClientCompositeGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmUsersIdRoleMappingsClientsClientCompositeGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmUsersIdRoleMappingsClientsClientCompositeGet.');
}
const queryParameters: runtime.HTTPQuery = {};
if (requestParameters.briefRepresentation !== undefined) {
queryParameters['briefRepresentation'] = requestParameters.briefRepresentation;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/users/{id}/role-mappings/clients/{client}/composite`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get effective client-level role mappings This recurses any composite roles
*/
async realmUsersIdRoleMappingsClientsClientCompositeGet(requestParameters: RealmUsersIdRoleMappingsClientsClientCompositeGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmUsersIdRoleMappingsClientsClientCompositeGetRaw(requestParameters);
return await response.value();
}
/**
* Delete client-level roles from user role mapping
*/
async realmUsersIdRoleMappingsClientsClientDeleteRaw(requestParameters: RealmUsersIdRoleMappingsClientsClientDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmUsersIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmUsersIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmUsersIdRoleMappingsClientsClientDelete.');
}
if (requestParameters.roleRepresentation === null || requestParameters.roleRepresentation === undefined) {
throw new runtime.RequiredError('roleRepresentation','Required parameter requestParameters.roleRepresentation was null or undefined when calling realmUsersIdRoleMappingsClientsClientDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/users/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
body: requestParameters.roleRepresentation.map(RoleRepresentationToJSON),
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete client-level roles from user role mapping
*/
async realmUsersIdRoleMappingsClientsClientDelete(requestParameters: RealmUsersIdRoleMappingsClientsClientDeleteRequest): Promise<void> {
await this.realmUsersIdRoleMappingsClientsClientDeleteRaw(requestParameters);
}
/**
* Get client-level role mappings for the user, and the app
*/
async realmUsersIdRoleMappingsClientsClientGetRaw(requestParameters: RealmUsersIdRoleMappingsClientsClientGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmUsersIdRoleMappingsClientsClientGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmUsersIdRoleMappingsClientsClientGet.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmUsersIdRoleMappingsClientsClientGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/users/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get client-level role mappings for the user, and the app
*/
async realmUsersIdRoleMappingsClientsClientGet(requestParameters: RealmUsersIdRoleMappingsClientsClientGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmUsersIdRoleMappingsClientsClientGetRaw(requestParameters);
return await response.value();
}
/**
* Add client-level roles to the user role mapping
*/
async realmUsersIdRoleMappingsClientsClientPostRaw(requestParameters: RealmUsersIdRoleMappingsClientsClientPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmUsersIdRoleMappingsClientsClientPost.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmUsersIdRoleMappingsClientsClientPost.');
}
if (requestParameters.client === null || requestParameters.client === undefined) {
throw new runtime.RequiredError('client','Required parameter requestParameters.client was null or undefined when calling realmUsersIdRoleMappingsClientsClientPost.');
}
if (requestParameters.roleRepresentation === null || requestParameters.roleRepresentation === undefined) {
throw new runtime.RequiredError('roleRepresentation','Required parameter requestParameters.roleRepresentation was null or undefined when calling realmUsersIdRoleMappingsClientsClientPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/users/{id}/role-mappings/clients/{client}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"client"}}`, encodeURIComponent(String(requestParameters.client))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.roleRepresentation.map(RoleRepresentationToJSON),
});
return new runtime.VoidApiResponse(response);
}
/**
* Add client-level roles to the user role mapping
*/
async realmUsersIdRoleMappingsClientsClientPost(requestParameters: RealmUsersIdRoleMappingsClientsClientPostRequest): Promise<void> {
await this.realmUsersIdRoleMappingsClientsClientPostRaw(requestParameters);
}
}