/* 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 { CacheInvalidationResponse, SystemConfig, SystemConfigProperty, } from '../models/index'; import { CacheInvalidationResponseFromJSON, CacheInvalidationResponseToJSON, SystemConfigFromJSON, SystemConfigToJSON, SystemConfigPropertyFromJSON, SystemConfigPropertyToJSON, } from '../models/index'; export interface ConfigurationApiDeleteConfiguration1Request { property?: Set; } export interface ConfigurationApiGetConfiguration1Request { property?: Set; } export interface ConfigurationApiSetConfiguration1Request { systemConfig?: SystemConfig; } /** * ConfigurationApi - interface * * @export * @interface ConfigurationApiInterface */ export interface ConfigurationApiInterface { /** * Use this method to disable one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users * @param {Set} [property] Enter the names of the system properties. Values provided for name are case-sensitive. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurationApiInterface */ deleteConfiguration1Raw(requestParameters: ConfigurationApiDeleteConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to disable one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ deleteConfiguration1(requestParameters: ConfigurationApiDeleteConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve the configured value for an IQ Server system property. Permissions required: Edit System Configuration and Users or system property dependent * @param {Set} [property] Enter the names of the system properties. Values provided for name are case-sensitive. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurationApiInterface */ getConfiguration1Raw(requestParameters: ConfigurationApiGetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve the configured value for an IQ Server system property. Permissions required: Edit System Configuration and Users or system property dependent */ getConfiguration1(requestParameters: ConfigurationApiGetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Clear the integration version cache. Use this endpoint after a new integration version is released to ensure IQ Server immediately recognizes the new version instead of waiting for cache expiration (10 minutes). Permissions required: Edit System Configuration and Users * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurationApiInterface */ invalidateCacheRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Clear the integration version cache. Use this endpoint after a new integration version is released to ensure IQ Server immediately recognizes the new version instead of waiting for cache expiration (10 minutes). Permissions required: Edit System Configuration and Users */ invalidateCache(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to configure one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users * @param {SystemConfig} [systemConfig] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurationApiInterface */ setConfiguration1Raw(requestParameters: ConfigurationApiSetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to configure one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ setConfiguration1(requestParameters: ConfigurationApiSetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * */ export class ConfigurationApi extends runtime.BaseAPI implements ConfigurationApiInterface { /** * Use this method to disable one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ async deleteConfiguration1Raw(requestParameters: ConfigurationApiDeleteConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; if (requestParameters['property'] != null) { queryParameters['property'] = requestParameters['property']; } 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/config`; const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.VoidApiResponse(response); } /** * Use this method to disable one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ async deleteConfiguration1(requestParameters: ConfigurationApiDeleteConfiguration1Request = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.deleteConfiguration1Raw(requestParameters, initOverrides); } /** * Use this method to retrieve the configured value for an IQ Server system property. Permissions required: Edit System Configuration and Users or system property dependent */ async getConfiguration1Raw(requestParameters: ConfigurationApiGetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; if (requestParameters['property'] != null) { queryParameters['property'] = requestParameters['property']; } 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/config`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigFromJSON(jsonValue)); } /** * Use this method to retrieve the configured value for an IQ Server system property. Permissions required: Edit System Configuration and Users or system property dependent */ async getConfiguration1(requestParameters: ConfigurationApiGetConfiguration1Request = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getConfiguration1Raw(requestParameters, initOverrides); return await response.value(); } /** * Clear the integration version cache. Use this endpoint after a new integration version is released to ensure IQ Server immediately recognizes the new version instead of waiting for cache expiration (10 minutes). Permissions required: Edit System Configuration and Users */ async invalidateCacheRaw(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/config/integrationVersions/cache`; const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CacheInvalidationResponseFromJSON(jsonValue)); } /** * Clear the integration version cache. Use this endpoint after a new integration version is released to ensure IQ Server immediately recognizes the new version instead of waiting for cache expiration (10 minutes). Permissions required: Edit System Configuration and Users */ async invalidateCache(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.invalidateCacheRaw(initOverrides); return await response.value(); } /** * Use this method to configure one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ async setConfiguration1Raw(requestParameters: ConfigurationApiSetConfiguration1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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/config`; const response = await this.request({ path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, body: SystemConfigToJSON(requestParameters['systemConfig']), }, initOverrides); return new runtime.VoidApiResponse(response); } /** * Use this method to configure one or more IQ Server system properties. The property names are case-sensitive. Permissions required: Edit System Configuration and Users */ async setConfiguration1(requestParameters: ConfigurationApiSetConfiguration1Request = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.setConfiguration1Raw(requestParameters, initOverrides); } }