/* tslint:disable */ /* eslint-disable */ /** * userroles * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded, } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap, } from '../base'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { PatchOperation } from '../models'; // @ts-ignore import type { Role } from '../models'; /** * UserRolesApi - axios parameter creator */ export const UserRolesApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Delete user role * @param {string} roleId ID or encoded key of the user role to delete. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: async ( roleId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'roleId' is not null or undefined assertParamExists('_delete', 'roleId', roleId); const localVarPath = `/userroles/{roleId}`.replace( `{${'roleId'}}`, encodeURIComponent(String(roleId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create user role * @param {Role} role User role to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create: async ( role: Role, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'role' is not null or undefined assertParamExists('create', 'role', role); const localVarPath = `/userroles`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( role, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get user roles * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: async ( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/userroles`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get user role * @param {string} roleId ID or encoded key of the user role to return. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById: async ( roleId: string, detailsLevel?: GetByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'roleId' is not null or undefined assertParamExists('getById', 'roleId', roleId); const localVarPath = `/userroles/{roleId}`.replace( `{${'roleId'}}`, encodeURIComponent(String(roleId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Partially update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: async ( roleId: string, patchOperation: Array, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'roleId' is not null or undefined assertParamExists('patch', 'roleId', roleId); // verify required parameter 'patchOperation' is not null or undefined assertParamExists('patch', 'patchOperation', patchOperation); const localVarPath = `/userroles/{roleId}`.replace( `{${'roleId'}}`, encodeURIComponent(String(roleId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( patchOperation, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Role} role User role to be updated. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update: async ( roleId: string, role: Role, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'roleId' is not null or undefined assertParamExists('update', 'roleId', roleId); // verify required parameter 'role' is not null or undefined assertParamExists('update', 'role', role); const localVarPath = `/userroles/{roleId}`.replace( `{${'roleId'}}`, encodeURIComponent(String(roleId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( role, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * UserRolesApi - functional programming interface */ export const UserRolesApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = UserRolesApiAxiosParamCreator(configuration); return { /** * * @summary Delete user role * @param {string} roleId ID or encoded key of the user role to delete. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async _delete( roleId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator._delete( roleId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi._delete']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create user role * @param {Role} role User role to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async create( role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.create( role, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi.create']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get user roles * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAll( offset, limit, paginationDetails, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi.getAll']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get user role * @param {string} roleId ID or encoded key of the user role to return. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getById( roleId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getById( roleId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi.getById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Partially update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patch( roleId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.patch( roleId, patchOperation, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi.patch']?.[localVarOperationServerIndex] ?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Role} role User role to be updated. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update( roleId: string, role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.update( roleId, role, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserRolesApi.update']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * UserRolesApi - factory interface */ export const UserRolesApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = UserRolesApiFp(configuration); return { /** * * @summary Delete user role * @param {string} roleId ID or encoded key of the user role to delete. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete( roleId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp ._delete(roleId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create user role * @param {Role} role User role to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create( role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .create(role, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get user roles * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAll(offset, limit, paginationDetails, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get user role * @param {string} roleId ID or encoded key of the user role to return. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById( roleId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getById(roleId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Partially update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch( roleId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .patch(roleId, patchOperation, options) .then((request) => request(axios, basePath)); }, /** * * @summary Update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Role} role User role to be updated. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update( roleId: string, role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .update(roleId, role, idempotencyKey, options) .then((request) => request(axios, basePath)); }, }; }; /** * UserRolesApi - object-oriented interface */ export class UserRolesApi extends BaseAPI { /** * * @summary Delete user role * @param {string} roleId ID or encoded key of the user role to delete. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public _delete(roleId: string, options?: RawAxiosRequestConfig) { return UserRolesApiFp(this.configuration) ._delete(roleId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create user role * @param {Role} role User role to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public create( role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return UserRolesApiFp(this.configuration) .create(role, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get user roles * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return UserRolesApiFp(this.configuration) .getAll(offset, limit, paginationDetails, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get user role * @param {string} roleId ID or encoded key of the user role to return. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getById( roleId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return UserRolesApiFp(this.configuration) .getById(roleId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Partially update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public patch( roleId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ) { return UserRolesApiFp(this.configuration) .patch(roleId, patchOperation, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update user role * @param {string} roleId ID or encoded key of the user role to update. * @param {Role} role User role to be updated. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public update( roleId: string, role: Role, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return UserRolesApiFp(this.configuration) .update(roleId, role, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } } export const GetAllPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllPaginationDetailsEnum = (typeof GetAllPaginationDetailsEnum)[keyof typeof GetAllPaginationDetailsEnum]; export const GetAllDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetAllDetailsLevelEnum = (typeof GetAllDetailsLevelEnum)[keyof typeof GetAllDetailsLevelEnum]; export const GetByIdDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetByIdDetailsLevelEnum = (typeof GetByIdDetailsLevelEnum)[keyof typeof GetByIdDetailsLevelEnum];