/* 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 { ApiLicenseLegalApplicationReportDTO, ApiLicenseLegalComponentReportDTO, ComponentIdentifier, } from '../models/index'; import { ApiLicenseLegalApplicationReportDTOFromJSON, ApiLicenseLegalApplicationReportDTOToJSON, ApiLicenseLegalComponentReportDTOFromJSON, ApiLicenseLegalComponentReportDTOToJSON, ComponentIdentifierFromJSON, ComponentIdentifierToJSON, } from '../models/index'; export interface LicenseLegalMetadataReportApiGetLicenseLegalApplicationHTMLReportRequest { applicationId: string; stageId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalApplicationReportRequest { applicationId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalApplicationReport1Request { applicationId: string; stageId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalComponentReportRequest { ownerType: GetLicenseLegalComponentReportOwnerTypeEnum; ownerId: string; componentIdentifier?: ComponentIdentifier; packageUrl?: string; hash?: string; identificationSource?: string; scanId?: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReportRequest { applicationId: string; stageId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReport1Request { applicationId: string; stageId: string; templateId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalCustomMultiApplicationHTMLReport1Request { templateId: string; } export interface LicenseLegalMetadataReportApiGetLicenseLegalMultiApplicationReportFromActiveUserFilterRequest { templateId: string; } /** * LicenseLegalMetadataReportApi - interface * * @export * @interface LicenseLegalMetadataReportApiInterface */ export interface LicenseLegalMetadataReportApiInterface { /** * Use this method to retrieve the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses * @param {string} applicationId Enter the application id or public id. * @param {string} stageId Enter the stageId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalApplicationHTMLReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalApplicationHTMLReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this REST API to retrieve the raw license legal data for components in an application. Permissions required: Review Legal Obligations For Components Licenses * @param {string} applicationId Enter the application id or public id. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalApplicationReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this REST API to retrieve the raw license legal data for components in an application. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalApplicationReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve the raw license legal data for components in an application based on the application scan at a specific stage. Permissions required: Review Legal Obligations For Components Licenses * @param {string} applicationId Enter the application id or public id. * @param {string} stageId Enter the stageId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalApplicationReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve the raw license legal data for components in an application based on the application scan at a specific stage. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalApplicationReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve the raw license legal data for a component by specifying the component identifier or package URL or the component hash. Permissions required: Review Legal Obligations For Components Licenses * @param {'application' | 'organization'} ownerType Enter the ownerType * @param {string} ownerId Enter the ownerId corresponding to the ownerType. * @param {ComponentIdentifier} [componentIdentifier] Enter the componentIdentifier consisting of format and coordinates. * @param {string} [packageUrl] Enter the package URL. * @param {string} [hash] Enter the component hash. * @param {string} [identificationSource] Enter the identification source if a third party scan is used. * @param {string} [scanId] Enter the scanId for the report where the component was identified (required if identified by third party scan). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalComponentReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalComponentReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve the raw license legal data for a component by specifying the component identifier or package URL or the component hash. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalComponentReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalComponentReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve and customize the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses * @param {string} applicationId Enter the application id or public id. * @param {string} stageId Enter the stageId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalCustomApplicationHTMLReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve and customize the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalCustomApplicationHTMLReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to generate a license legal report in the specified HTML template format. Permissions required: Review Legal Obligations For Components Licenses * @param {string} applicationId Enter the application id or public id. * @param {string} stageId Enter the stageId. * @param {string} templateId Enter the templateId for the HTML report format. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalCustomApplicationHTMLReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to generate a license legal report in the specified HTML template format. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalCustomApplicationHTMLReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to generate license legal data for all applications in HTML format based on the given template. Permissions required: Review Legal Obligations For Components Licenses * @param {string} templateId Enter the `templateId` for the HTML report. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalCustomMultiApplicationHTMLReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomMultiApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to generate license legal data for all applications in HTML format based on the given template. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalCustomMultiApplicationHTMLReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomMultiApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to generate license legal data in HTML format. Permissions required: Review Legal Obligations For Components Licenses * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalMultiApplicationHTMLReportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to generate license legal data in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ getLicenseLegalMultiApplicationHTMLReport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to generate license legal data in HTML format for applications ,on which the logged in user has permissions. Permission required: Review Legal Obligations For Components Licenses * @param {string} templateId Enter the templateId for the license legal data. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LicenseLegalMetadataReportApiInterface */ getLicenseLegalMultiApplicationReportFromActiveUserFilterRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalMultiApplicationReportFromActiveUserFilterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to generate license legal data in HTML format for applications ,on which the logged in user has permissions. Permission required: Review Legal Obligations For Components Licenses */ getLicenseLegalMultiApplicationReportFromActiveUserFilter(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalMultiApplicationReportFromActiveUserFilterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * */ export class LicenseLegalMetadataReportApi extends runtime.BaseAPI implements LicenseLegalMetadataReportApiInterface { /** * Use this method to retrieve the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationHTMLReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getLicenseLegalApplicationHTMLReport().' ); } if (requestParameters['stageId'] == null) { throw new runtime.RequiredError( 'stageId', 'Required parameter "stageId" was null or undefined when calling getLicenseLegalApplicationHTMLReport().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/application/{applicationId}/stage/{stageId}/report`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"stageId"}}`, encodeURIComponent(String(requestParameters['stageId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); if (this.isJsonMime(response.headers.get('content-type'))) { return new runtime.JSONApiResponse(response); } else { return new runtime.TextApiResponse(response) as any; } } /** * Use this method to retrieve the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationHTMLReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalApplicationHTMLReportRaw(requestParameters, initOverrides); return await response.value(); } /** * Use this REST API to retrieve the raw license legal data for components in an application. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getLicenseLegalApplicationReport().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/application/{applicationId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApiLicenseLegalApplicationReportDTOFromJSON(jsonValue)); } /** * Use this REST API to retrieve the raw license legal data for components in an application. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalApplicationReportRaw(requestParameters, initOverrides); return await response.value(); } /** * Use this method to retrieve the raw license legal data for components in an application based on the application scan at a specific stage. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getLicenseLegalApplicationReport1().' ); } if (requestParameters['stageId'] == null) { throw new runtime.RequiredError( 'stageId', 'Required parameter "stageId" was null or undefined when calling getLicenseLegalApplicationReport1().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/application/{applicationId}/stage/{stageId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"stageId"}}`, encodeURIComponent(String(requestParameters['stageId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApiLicenseLegalApplicationReportDTOFromJSON(jsonValue)); } /** * Use this method to retrieve the raw license legal data for components in an application based on the application scan at a specific stage. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalApplicationReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalApplicationReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalApplicationReport1Raw(requestParameters, initOverrides); return await response.value(); } /** * Use this method to retrieve the raw license legal data for a component by specifying the component identifier or package URL or the component hash. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalComponentReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalComponentReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['ownerType'] == null) { throw new runtime.RequiredError( 'ownerType', 'Required parameter "ownerType" was null or undefined when calling getLicenseLegalComponentReport().' ); } if (requestParameters['ownerId'] == null) { throw new runtime.RequiredError( 'ownerId', 'Required parameter "ownerId" was null or undefined when calling getLicenseLegalComponentReport().' ); } const queryParameters: any = {}; if (requestParameters['componentIdentifier'] != null) { queryParameters['componentIdentifier'] = requestParameters['componentIdentifier']; } if (requestParameters['packageUrl'] != null) { queryParameters['packageUrl'] = requestParameters['packageUrl']; } if (requestParameters['hash'] != null) { queryParameters['hash'] = requestParameters['hash']; } if (requestParameters['identificationSource'] != null) { queryParameters['identificationSource'] = requestParameters['identificationSource']; } if (requestParameters['scanId'] != null) { queryParameters['scanId'] = requestParameters['scanId']; } 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/licenseLegalMetadata/{ownerType}/{ownerId}/component`; urlPath = urlPath.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters['ownerType']))); urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApiLicenseLegalComponentReportDTOFromJSON(jsonValue)); } /** * Use this method to retrieve the raw license legal data for a component by specifying the component identifier or package URL or the component hash. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalComponentReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalComponentReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalComponentReportRaw(requestParameters, initOverrides); return await response.value(); } /** * Use this method to retrieve and customize the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomApplicationHTMLReportRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getLicenseLegalCustomApplicationHTMLReport().' ); } if (requestParameters['stageId'] == null) { throw new runtime.RequiredError( 'stageId', 'Required parameter "stageId" was null or undefined when calling getLicenseLegalCustomApplicationHTMLReport().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/application/{applicationId}/stage/{stageId}/report`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"stageId"}}`, encodeURIComponent(String(requestParameters['stageId']))); const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); if (this.isJsonMime(response.headers.get('content-type'))) { return new runtime.JSONApiResponse(response); } else { return new runtime.TextApiResponse(response) as any; } } /** * Use this method to retrieve and customize the license legal data for components in an application at a specific stage, in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomApplicationHTMLReport(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalCustomApplicationHTMLReportRaw(requestParameters, initOverrides); return await response.value(); } /** * Use this method to generate a license legal report in the specified HTML template format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomApplicationHTMLReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getLicenseLegalCustomApplicationHTMLReport1().' ); } if (requestParameters['stageId'] == null) { throw new runtime.RequiredError( 'stageId', 'Required parameter "stageId" was null or undefined when calling getLicenseLegalCustomApplicationHTMLReport1().' ); } if (requestParameters['templateId'] == null) { throw new runtime.RequiredError( 'templateId', 'Required parameter "templateId" was null or undefined when calling getLicenseLegalCustomApplicationHTMLReport1().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/application/{applicationId}/stage/{stageId}/report/templateId/{templateId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"stageId"}}`, encodeURIComponent(String(requestParameters['stageId']))); urlPath = urlPath.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId']))); const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.VoidApiResponse(response); } /** * Use this method to generate a license legal report in the specified HTML template format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomApplicationHTMLReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.getLicenseLegalCustomApplicationHTMLReport1Raw(requestParameters, initOverrides); } /** * Use this method to generate license legal data for all applications in HTML format based on the given template. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomMultiApplicationHTMLReport1Raw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomMultiApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['templateId'] == null) { throw new runtime.RequiredError( 'templateId', 'Required parameter "templateId" was null or undefined when calling getLicenseLegalCustomMultiApplicationHTMLReport1().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/multiApplication/report/templateId/{templateId}`; urlPath = urlPath.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId']))); const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.VoidApiResponse(response); } /** * Use this method to generate license legal data for all applications in HTML format based on the given template. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalCustomMultiApplicationHTMLReport1(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalCustomMultiApplicationHTMLReport1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.getLicenseLegalCustomMultiApplicationHTMLReport1Raw(requestParameters, initOverrides); } /** * Use this method to generate license legal data in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalMultiApplicationHTMLReportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; 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/licenseLegalMetadata/multiApplication/report`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.VoidApiResponse(response); } /** * Use this method to generate license legal data in HTML format. Permissions required: Review Legal Obligations For Components Licenses */ async getLicenseLegalMultiApplicationHTMLReport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.getLicenseLegalMultiApplicationHTMLReportRaw(initOverrides); } /** * Use this method to generate license legal data in HTML format for applications ,on which the logged in user has permissions. Permission required: Review Legal Obligations For Components Licenses */ async getLicenseLegalMultiApplicationReportFromActiveUserFilterRaw(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalMultiApplicationReportFromActiveUserFilterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['templateId'] == null) { throw new runtime.RequiredError( 'templateId', 'Required parameter "templateId" was null or undefined when calling getLicenseLegalMultiApplicationReportFromActiveUserFilter().' ); } const queryParameters: any = {}; 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/licenseLegalMetadata/multiApplication/activeUserFilter/report/templateId/{templateId}`; urlPath = urlPath.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId']))); const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); if (this.isJsonMime(response.headers.get('content-type'))) { return new runtime.JSONApiResponse(response); } else { return new runtime.TextApiResponse(response) as any; } } /** * Use this method to generate license legal data in HTML format for applications ,on which the logged in user has permissions. Permission required: Review Legal Obligations For Components Licenses */ async getLicenseLegalMultiApplicationReportFromActiveUserFilter(requestParameters: LicenseLegalMetadataReportApiGetLicenseLegalMultiApplicationReportFromActiveUserFilterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLicenseLegalMultiApplicationReportFromActiveUserFilterRaw(requestParameters, initOverrides); return await response.value(); } } /** * @export */ export const GetLicenseLegalComponentReportOwnerTypeEnum = { Application: 'application', Organization: 'organization' } as const; export type GetLicenseLegalComponentReportOwnerTypeEnum = typeof GetLicenseLegalComponentReportOwnerTypeEnum[keyof typeof GetLicenseLegalComponentReportOwnerTypeEnum];