/* tslint:disable */ /* eslint-disable */ /** * Apicurio Registry API [v2] * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. * * The version of the OpenAPI document: 2.4.x * Contact: apicurio@lists.jboss.org * * 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 { ArtifactTypeInfo } from '../model'; // @ts-ignore import { ConfigurationProperty } from '../model'; // @ts-ignore import { DownloadRef } from '../model'; // @ts-ignore import { LogConfiguration } from '../model'; // @ts-ignore import { NamedLogConfiguration } from '../model'; // @ts-ignore import { RoleMapping } from '../model'; // @ts-ignore import { Rule } from '../model'; // @ts-ignore import { RuleType } from '../model'; // @ts-ignore import { UpdateConfigurationProperty } from '../model'; // @ts-ignore import { UpdateRole } from '../model'; /** * AdminApi - axios parameter creator * @export */ export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ createGlobalRule: async (rule: Rule, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'rule' is not null or undefined assertParamExists('createGlobalRule', 'rule', rule) const localVarPath = `/admin/rules`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(rule, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Create a new role mapping * @param {RoleMapping} roleMapping * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRoleMapping: async (roleMapping: RoleMapping, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'roleMapping' is not null or undefined assertParamExists('createRoleMapping', 'roleMapping', roleMapping) const localVarPath = `/admin/roleMappings`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(roleMapping, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Delete all global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteAllGlobalRules: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/rules`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteGlobalRule: async (rule: RuleType, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'rule' is not null or undefined assertParamExists('deleteGlobalRule', 'rule', rule) const localVarPath = `/admin/rules/{rule}` .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRoleMapping: async (principalId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('deleteRoleMapping', 'principalId', principalId) const localVarPath = `/admin/roleMappings/{principalId}` .replace(`{${"principalId"}}`, encodeURIComponent(String(principalId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Exports registry data as a ZIP archive. * @summary Export registry data * @param {boolean} [forBrowser] Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportData: async (forBrowser?: boolean, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/export`; // 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; if (forBrowser !== undefined) { localVarQueryParameter['forBrowser'] = forBrowser; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getConfigProperty: async (propertyName: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('getConfigProperty', 'propertyName', propertyName) const localVarPath = `/admin/config/properties/{propertyName}` .replace(`{${"propertyName"}}`, encodeURIComponent(String(propertyName))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGlobalRuleConfig: async (rule: RuleType, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'rule' is not null or undefined assertParamExists('getGlobalRuleConfig', 'rule', rule) const localVarPath = `/admin/rules/{rule}` .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the configured logger configuration for the provided logger name, if no logger configuration is persisted it will return the current default log configuration in the system. * @summary Get a single logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLogConfiguration: async (logger: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'logger' is not null or undefined assertParamExists('getLogConfiguration', 'logger', logger) const localVarPath = `/admin/loggers/{logger}` .replace(`{${"logger"}}`, encodeURIComponent(String(logger))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoleMapping: async (principalId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('getRoleMapping', 'principalId', principalId) const localVarPath = `/admin/roleMappings/{principalId}` .replace(`{${"principalId"}}`, encodeURIComponent(String(principalId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data * @param {any} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ importData: async (body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('importData', 'body', body) const localVarPath = `/admin/import`; // 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; if (xRegistryPreserveGlobalId !== undefined && xRegistryPreserveGlobalId !== null) { localVarHeaderParameter['X-Registry-Preserve-GlobalId'] = String(JSON.stringify(xRegistryPreserveGlobalId)); } if (xRegistryPreserveContentId !== undefined && xRegistryPreserveContentId !== null) { localVarHeaderParameter['X-Registry-Preserve-ContentId'] = String(JSON.stringify(xRegistryPreserveContentId)); } localVarHeaderParameter['Content-Type'] = 'application/zip'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactTypes: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/artifactTypes`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties * @param {*} [options] Override http request option. * @throws {RequiredError} */ listConfigProperties: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/config/properties`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ listGlobalRules: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/rules`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List all of the configured logging levels. These override the default logging configuration. * @summary List logging configurations * @param {*} [options] Override http request option. * @throws {RequiredError} */ listLogConfigurations: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/loggers`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRoleMappings: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/roleMappings`; // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Removes the configured logger configuration (if any) for the given logger. * @summary Removes logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeLogConfiguration: async (logger: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'logger' is not null or undefined assertParamExists('removeLogConfiguration', 'logger', logger) const localVarPath = `/admin/loggers/{logger}` .replace(`{${"logger"}}`, encodeURIComponent(String(logger))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Reset a configuration property * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ resetConfigProperty: async (propertyName: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('resetConfigProperty', 'propertyName', propertyName) const localVarPath = `/admin/config/properties/{propertyName}` .replace(`{${"propertyName"}}`, encodeURIComponent(String(propertyName))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Configures the logger referenced by the provided logger name with the given configuration. * @summary Set a logger\'s configuration * @param {string} logger The name of a single logger. * @param {LogConfiguration} logConfiguration The new logger configuration. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setLogConfiguration: async (logger: string, logConfiguration: LogConfiguration, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'logger' is not null or undefined assertParamExists('setLogConfiguration', 'logger', logger) // verify required parameter 'logConfiguration' is not null or undefined assertParamExists('setLogConfiguration', 'logConfiguration', logConfiguration) const localVarPath = `/admin/loggers/{logger}` .replace(`{${"logger"}}`, encodeURIComponent(String(logger))); // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(logConfiguration, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property * @param {string} propertyName The name of a configuration property. * @param {UpdateConfigurationProperty} updateConfigurationProperty * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateConfigProperty: async (propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('updateConfigProperty', 'propertyName', propertyName) // verify required parameter 'updateConfigurationProperty' is not null or undefined assertParamExists('updateConfigProperty', 'updateConfigurationProperty', updateConfigurationProperty) const localVarPath = `/admin/config/properties/{propertyName}` .replace(`{${"propertyName"}}`, encodeURIComponent(String(propertyName))); // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateConfigurationProperty, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateGlobalRuleConfig: async (rule: RuleType, rule2: Rule, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'rule' is not null or undefined assertParamExists('updateGlobalRuleConfig', 'rule', rule) // verify required parameter 'rule2' is not null or undefined assertParamExists('updateGlobalRuleConfig', 'rule2', rule2) const localVarPath = `/admin/rules/{rule}` .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(rule2, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {UpdateRole} updateRole * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRoleMapping: async (principalId: string, updateRole: UpdateRole, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('updateRoleMapping', 'principalId', principalId) // verify required parameter 'updateRole' is not null or undefined assertParamExists('updateRoleMapping', 'updateRole', updateRole) const localVarPath = `/admin/roleMappings/{principalId}` .replace(`{${"principalId"}}`, encodeURIComponent(String(principalId))); // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateRole, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AdminApi - functional programming interface * @export */ export const AdminApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) return { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createGlobalRule(rule: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createGlobalRule(rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Create a new role mapping * @param {RoleMapping} roleMapping * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createRoleMapping(roleMapping: RoleMapping, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRoleMapping(roleMapping, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Delete all global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteAllGlobalRules(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllGlobalRules(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteGlobalRule(rule: RuleType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGlobalRule(rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteRoleMapping(principalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoleMapping(principalId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Exports registry data as a ZIP archive. * @summary Export registry data * @param {boolean} [forBrowser] Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async exportData(forBrowser?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.exportData(forBrowser, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getConfigProperty(propertyName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigProperty(propertyName, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getGlobalRuleConfig(rule: RuleType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getGlobalRuleConfig(rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the configured logger configuration for the provided logger name, if no logger configuration is persisted it will return the current default log configuration in the system. * @summary Get a single logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getLogConfiguration(logger: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getLogConfiguration(logger, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRoleMapping(principalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleMapping(principalId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data * @param {any} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listArtifactTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactTypes(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listConfigProperties(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listConfigProperties(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listGlobalRules(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listGlobalRules(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * List all of the configured logging levels. These override the default logging configuration. * @summary List logging configurations * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listLogConfigurations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listLogConfigurations(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listRoleMappings(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listRoleMappings(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Removes the configured logger configuration (if any) for the given logger. * @summary Removes logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async removeLogConfiguration(logger: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.removeLogConfiguration(logger, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Reset a configuration property * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async resetConfigProperty(propertyName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.resetConfigProperty(propertyName, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Configures the logger referenced by the provided logger name with the given configuration. * @summary Set a logger\'s configuration * @param {string} logger The name of a single logger. * @param {LogConfiguration} logConfiguration The new logger configuration. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async setLogConfiguration(logger: string, logConfiguration: LogConfiguration, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setLogConfiguration(logger, logConfiguration, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property * @param {string} propertyName The name of a configuration property. * @param {UpdateConfigurationProperty} updateConfigurationProperty * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateConfigProperty(propertyName, updateConfigurationProperty, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateGlobalRuleConfig(rule, rule2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {UpdateRole} updateRole * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateRoleMapping(principalId, updateRole, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * AdminApi - factory interface * @export */ export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AdminApiFp(configuration) return { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ createGlobalRule(rule: Rule, options?: any): AxiosPromise { return localVarFp.createGlobalRule(rule, options).then((request) => request(axios, basePath)); }, /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Create a new role mapping * @param {RoleMapping} roleMapping * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRoleMapping(roleMapping: RoleMapping, options?: any): AxiosPromise { return localVarFp.createRoleMapping(roleMapping, options).then((request) => request(axios, basePath)); }, /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Delete all global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteAllGlobalRules(options?: any): AxiosPromise { return localVarFp.deleteAllGlobalRules(options).then((request) => request(axios, basePath)); }, /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteGlobalRule(rule: RuleType, options?: any): AxiosPromise { return localVarFp.deleteGlobalRule(rule, options).then((request) => request(axios, basePath)); }, /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRoleMapping(principalId: string, options?: any): AxiosPromise { return localVarFp.deleteRoleMapping(principalId, options).then((request) => request(axios, basePath)); }, /** * Exports registry data as a ZIP archive. * @summary Export registry data * @param {boolean} [forBrowser] Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportData(forBrowser?: boolean, options?: any): AxiosPromise { return localVarFp.exportData(forBrowser, options).then((request) => request(axios, basePath)); }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getConfigProperty(propertyName: string, options?: any): AxiosPromise { return localVarFp.getConfigProperty(propertyName, options).then((request) => request(axios, basePath)); }, /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGlobalRuleConfig(rule: RuleType, options?: any): AxiosPromise { return localVarFp.getGlobalRuleConfig(rule, options).then((request) => request(axios, basePath)); }, /** * Returns the configured logger configuration for the provided logger name, if no logger configuration is persisted it will return the current default log configuration in the system. * @summary Get a single logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLogConfiguration(logger: string, options?: any): AxiosPromise { return localVarFp.getLogConfiguration(logger, options).then((request) => request(axios, basePath)); }, /** * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRoleMapping(principalId: string, options?: any): AxiosPromise { return localVarFp.getRoleMapping(principalId, options).then((request) => request(axios, basePath)); }, /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data * @param {any} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: any): AxiosPromise { return localVarFp.importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options).then((request) => request(axios, basePath)); }, /** * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactTypes(options?: any): AxiosPromise> { return localVarFp.listArtifactTypes(options).then((request) => request(axios, basePath)); }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties * @param {*} [options] Override http request option. * @throws {RequiredError} */ listConfigProperties(options?: any): AxiosPromise> { return localVarFp.listConfigProperties(options).then((request) => request(axios, basePath)); }, /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List global rules * @param {*} [options] Override http request option. * @throws {RequiredError} */ listGlobalRules(options?: any): AxiosPromise> { return localVarFp.listGlobalRules(options).then((request) => request(axios, basePath)); }, /** * List all of the configured logging levels. These override the default logging configuration. * @summary List logging configurations * @param {*} [options] Override http request option. * @throws {RequiredError} */ listLogConfigurations(options?: any): AxiosPromise> { return localVarFp.listLogConfigurations(options).then((request) => request(axios, basePath)); }, /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRoleMappings(options?: any): AxiosPromise> { return localVarFp.listRoleMappings(options).then((request) => request(axios, basePath)); }, /** * Removes the configured logger configuration (if any) for the given logger. * @summary Removes logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeLogConfiguration(logger: string, options?: any): AxiosPromise { return localVarFp.removeLogConfiguration(logger, options).then((request) => request(axios, basePath)); }, /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Reset a configuration property * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} */ resetConfigProperty(propertyName: string, options?: any): AxiosPromise { return localVarFp.resetConfigProperty(propertyName, options).then((request) => request(axios, basePath)); }, /** * Configures the logger referenced by the provided logger name with the given configuration. * @summary Set a logger\'s configuration * @param {string} logger The name of a single logger. * @param {LogConfiguration} logConfiguration The new logger configuration. * @param {*} [options] Override http request option. * @throws {RequiredError} */ setLogConfiguration(logger: string, logConfiguration: LogConfiguration, options?: any): AxiosPromise { return localVarFp.setLogConfiguration(logger, logConfiguration, options).then((request) => request(axios, basePath)); }, /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property * @param {string} propertyName The name of a configuration property. * @param {UpdateConfigurationProperty} updateConfigurationProperty * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: any): AxiosPromise { return localVarFp.updateConfigProperty(propertyName, updateConfigurationProperty, options).then((request) => request(axios, basePath)); }, /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: any): AxiosPromise { return localVarFp.updateGlobalRuleConfig(rule, rule2, options).then((request) => request(axios, basePath)); }, /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {UpdateRole} updateRole * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: any): AxiosPromise { return localVarFp.updateRoleMapping(principalId, updateRole, options).then((request) => request(axios, basePath)); }, }; }; /** * AdminApi - interface * @export * @interface AdminApi */ export interface AdminApiInterface { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ createGlobalRule(rule: Rule, options?: AxiosRequestConfig): AxiosPromise; /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Create a new role mapping * @param {RoleMapping} roleMapping * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ createRoleMapping(roleMapping: RoleMapping, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Delete all global rules * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ deleteAllGlobalRules(options?: AxiosRequestConfig): AxiosPromise; /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ deleteGlobalRule(rule: RuleType, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ deleteRoleMapping(principalId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Exports registry data as a ZIP archive. * @summary Export registry data * @param {boolean} [forBrowser] Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ exportData(forBrowser?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ getConfigProperty(propertyName: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ getGlobalRuleConfig(rule: RuleType, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the configured logger configuration for the provided logger name, if no logger configuration is persisted it will return the current default log configuration in the system. * @summary Get a single logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ getLogConfiguration(logger: string, options?: AxiosRequestConfig): AxiosPromise; /** * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ getRoleMapping(principalId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data * @param {any} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ listArtifactTypes(options?: AxiosRequestConfig): AxiosPromise>; /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ listConfigProperties(options?: AxiosRequestConfig): AxiosPromise>; /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List global rules * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ listGlobalRules(options?: AxiosRequestConfig): AxiosPromise>; /** * List all of the configured logging levels. These override the default logging configuration. * @summary List logging configurations * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ listLogConfigurations(options?: AxiosRequestConfig): AxiosPromise>; /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ listRoleMappings(options?: AxiosRequestConfig): AxiosPromise>; /** * Removes the configured logger configuration (if any) for the given logger. * @summary Removes logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ removeLogConfiguration(logger: string, options?: AxiosRequestConfig): AxiosPromise; /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Reset a configuration property * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ resetConfigProperty(propertyName: string, options?: AxiosRequestConfig): AxiosPromise; /** * Configures the logger referenced by the provided logger name with the given configuration. * @summary Set a logger\'s configuration * @param {string} logger The name of a single logger. * @param {LogConfiguration} logConfiguration The new logger configuration. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ setLogConfiguration(logger: string, logConfiguration: LogConfiguration, options?: AxiosRequestConfig): AxiosPromise; /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property * @param {string} propertyName The name of a configuration property. * @param {UpdateConfigurationProperty} updateConfigurationProperty * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: AxiosRequestConfig): AxiosPromise; /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: AxiosRequestConfig): AxiosPromise; /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {UpdateRole} updateRole * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApiInterface */ updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: AxiosRequestConfig): AxiosPromise; } /** * AdminApi - object-oriented interface * @export * @class AdminApi * @extends {BaseAPI} */ export class AdminApi extends BaseAPI implements AdminApiInterface { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public createGlobalRule(rule: Rule, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).createGlobalRule(rule, options).then((request) => request(this.axios, this.basePath)); } /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Create a new role mapping * @param {RoleMapping} roleMapping * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public createRoleMapping(roleMapping: RoleMapping, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).createRoleMapping(roleMapping, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Delete all global rules * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public deleteAllGlobalRules(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).deleteAllGlobalRules(options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public deleteGlobalRule(rule: RuleType, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).deleteGlobalRule(rule, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public deleteRoleMapping(principalId: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).deleteRoleMapping(principalId, options).then((request) => request(this.axios, this.basePath)); } /** * Exports registry data as a ZIP archive. * @summary Export registry data * @param {boolean} [forBrowser] Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public exportData(forBrowser?: boolean, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).exportData(forBrowser, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getConfigProperty(propertyName: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).getConfigProperty(propertyName, options).then((request) => request(this.axios, this.basePath)); } /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getGlobalRuleConfig(rule: RuleType, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).getGlobalRuleConfig(rule, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the configured logger configuration for the provided logger name, if no logger configuration is persisted it will return the current default log configuration in the system. * @summary Get a single logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getLogConfiguration(logger: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).getLogConfiguration(logger, options).then((request) => request(this.axios, this.basePath)); } /** * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getRoleMapping(principalId: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).getRoleMapping(principalId, options).then((request) => request(this.axios, this.basePath)); } /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data * @param {any} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options).then((request) => request(this.axios, this.basePath)); } /** * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listArtifactTypes(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).listArtifactTypes(options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listConfigProperties(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).listConfigProperties(options).then((request) => request(this.axios, this.basePath)); } /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List global rules * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listGlobalRules(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).listGlobalRules(options).then((request) => request(this.axios, this.basePath)); } /** * List all of the configured logging levels. These override the default logging configuration. * @summary List logging configurations * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listLogConfigurations(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).listLogConfigurations(options).then((request) => request(this.axios, this.basePath)); } /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public listRoleMappings(options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).listRoleMappings(options).then((request) => request(this.axios, this.basePath)); } /** * Removes the configured logger configuration (if any) for the given logger. * @summary Removes logger configuration * @param {string} logger The name of a single logger. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public removeLogConfiguration(logger: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).removeLogConfiguration(logger, options).then((request) => request(this.axios, this.basePath)); } /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Reset a configuration property * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public resetConfigProperty(propertyName: string, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).resetConfigProperty(propertyName, options).then((request) => request(this.axios, this.basePath)); } /** * Configures the logger referenced by the provided logger name with the given configuration. * @summary Set a logger\'s configuration * @param {string} logger The name of a single logger. * @param {LogConfiguration} logConfiguration The new logger configuration. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public setLogConfiguration(logger: string, logConfiguration: LogConfiguration, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).setLogConfiguration(logger, logConfiguration, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property * @param {string} propertyName The name of a configuration property. * @param {UpdateConfigurationProperty} updateConfigurationProperty * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).updateConfigProperty(propertyName, updateConfigurationProperty, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration * @param {RuleType} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).updateGlobalRuleConfig(rule, rule2, options).then((request) => request(this.axios, this.basePath)); } /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {UpdateRole} updateRole * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).updateRoleMapping(principalId, updateRole, options).then((request) => request(this.axios, this.basePath)); } }