/* tslint:disable */ /* eslint-disable */ /** * Sonatype Lifecycle Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.207.0-01 * * * 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 type { ApiLicensedSolutionDTO, } from '../models/index'; import { ApiLicensedSolutionDTOFromJSON, ApiLicensedSolutionDTOToJSON, } from '../models/index'; export interface SolutionsApiGetLicensedSolutionsRequest { allowRelativeUrls?: boolean; } /** * SolutionsApi - interface * * @export * @interface SolutionsApiInterface */ export interface SolutionsApiInterface { /** * Retrieves a list of licensed solutions. The base URL must be set to get results unless relative URLs are allowed. Permissions required: None * @param {boolean} [allowRelativeUrls] Whether or not relative URLs should be allowed. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SolutionsApiInterface */ getLicensedSolutionsRaw(requestParameters: SolutionsApiGetLicensedSolutionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Retrieves a list of licensed solutions. The base URL must be set to get results unless relative URLs are allowed. Permissions required: None */ getLicensedSolutions(requestParameters: SolutionsApiGetLicensedSolutionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; } /** * */ export class SolutionsApi extends runtime.BaseAPI implements SolutionsApiInterface { /** * Retrieves a list of licensed solutions. The base URL must be set to get results unless relative URLs are allowed. Permissions required: None */ async getLicensedSolutionsRaw(requestParameters: SolutionsApiGetLicensedSolutionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; if (requestParameters['allowRelativeUrls'] != null) { queryParameters['allowRelativeUrls'] = requestParameters['allowRelativeUrls']; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; const tokenString = await token("BearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } let urlPath = `/api/v2/solutions/licensed`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiLicensedSolutionDTOFromJSON)); } /** * Retrieves a list of licensed solutions. The base URL must be set to get results unless relative URLs are allowed. Permissions required: None */ async getLicensedSolutions(requestParameters: SolutionsApiGetLicensedSolutionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getLicensedSolutionsRaw(requestParameters, initOverrides); return await response.value(); } }