/* tslint:disable */ /* eslint-disable */ /** * EMIL Tenant Service * The EMIL TenantService API description * * The version of the OpenAPI document: 1.0 * Contact: kontakt@emil.de * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { ListRolesResponseClass } from '../models'; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; const FormData = require('form-data'); /** * RolesApi - axios parameter creator * @export */ export const RolesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns a list of roles you have previously created. The roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"identity-management.roles.view\" * @summary List roles * @param {string} [authorization] Bearer Token * @param {number} [pageSize] Page size * @param {string} [pageToken] Page token * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search query * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server. * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ listRoles: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/tenantservice/v1/roles`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (pageToken !== undefined) { localVarQueryParameter['pageToken'] = pageToken; } if (filter !== undefined) { localVarQueryParameter['filter'] = filter; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * RolesApi - functional programming interface * @export */ export const RolesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = RolesApiAxiosParamCreator(configuration) return { /** * Returns a list of roles you have previously created. The roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"identity-management.roles.view\" * @summary List roles * @param {string} [authorization] Bearer Token * @param {number} [pageSize] Page size * @param {string} [pageToken] Page token * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search query * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server. * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async listRoles(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listRoles(authorization, pageSize, pageToken, filter, search, order, expand, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * RolesApi - factory interface * @export */ export const RolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = RolesApiFp(configuration) return { /** * Returns a list of roles you have previously created. The roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"identity-management.roles.view\" * @summary List roles * @param {string} [authorization] Bearer Token * @param {number} [pageSize] Page size * @param {string} [pageToken] Page token * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search query * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server. * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ listRoles(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise { return localVarFp.listRoles(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for listRoles operation in RolesApi. * @export * @interface RolesApiListRolesRequest */ export interface RolesApiListRolesRequest { /** * Bearer Token * @type {string} * @memberof RolesApiListRoles */ readonly authorization?: string /** * Page size * @type {number} * @memberof RolesApiListRoles */ readonly pageSize?: number /** * Page token * @type {string} * @memberof RolesApiListRoles */ readonly pageToken?: string /** * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @type {string} * @memberof RolesApiListRoles */ readonly filter?: string /** * Search query * @type {string} * @memberof RolesApiListRoles */ readonly search?: string /** * Order allowing you to specify the desired order of entities retrieved from the server. * @type {string} * @memberof RolesApiListRoles */ readonly order?: string /** * You can expand roles in this endpoint. By default, permissions will be an empty array. * @type {string} * @memberof RolesApiListRoles */ readonly expand?: string } /** * RolesApi - object-oriented interface * @export * @class RolesApi * @extends {BaseAPI} */ export class RolesApi extends BaseAPI { /** * Returns a list of roles you have previously created. The roles are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"identity-management.roles.view\" * @summary List roles * @param {RolesApiListRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} * @memberof RolesApi */ public listRoles(requestParameters: RolesApiListRolesRequest = {}, options?: AxiosRequestConfig) { return RolesApiFp(this.configuration).listRoles(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath)); } }