/* 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 { Rule } from '../model'; // @ts-ignore import { RuleType } from '../model'; // @ts-ignore import { RuleViolationError } from '../model'; /** * ArtifactRulesApi - axios parameter creator * @export */ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ createArtifactRule: async (groupId: string, artifactId: string, rule: Rule, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('createArtifactRule', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('createArtifactRule', 'artifactId', artifactId) // verify required parameter 'rule' is not null or undefined assertParamExists('createArtifactRule', 'rule', rule) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // 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, }; }, /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactRule: async (groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactRule', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactRule', 'artifactId', artifactId) // verify required parameter 'rule' is not null or undefined assertParamExists('deleteArtifactRule', 'rule', rule) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .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 all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactRules: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactRules', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactRules', 'artifactId', artifactId) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // 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, }; }, /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getArtifactRuleConfig: async (groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getArtifactRuleConfig', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getArtifactRuleConfig', 'artifactId', artifactId) // verify required parameter 'rule' is not null or undefined assertParamExists('getArtifactRuleConfig', 'rule', rule) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .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 a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactRules: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactRules', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('listArtifactRules', 'artifactId', artifactId) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // 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, }; }, /** * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). * @summary Test update artifact * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) * @param {*} [options] Override http request option. * @throws {RequiredError} */ testUpdateArtifact: async (groupId: string, artifactId: string, body: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('testUpdateArtifact', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('testUpdateArtifact', 'artifactId', artifactId) // verify required parameter 'body' is not null or undefined assertParamExists('testUpdateArtifact', 'body', body) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/test` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // 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(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactRuleConfig: async (groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', rule2: Rule, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'artifactId', artifactId) // verify required parameter 'rule' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'rule', rule) // verify required parameter 'rule2' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'rule2', rule2) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .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, }; }, } }; /** * ArtifactRulesApi - functional programming interface * @export */ export const ArtifactRulesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ArtifactRulesApiAxiosParamCreator(configuration) return { /** * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactRule(groupId, artifactId, rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteArtifactRule(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactRule(groupId, artifactId, rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactRules(groupId, artifactId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactRuleConfig(groupId, artifactId, rule, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactRules(groupId, artifactId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). * @summary Test update artifact * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) * @param {*} [options] Override http request option. * @throws {RequiredError} */ async testUpdateArtifact(groupId: string, artifactId: string, body: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testUpdateArtifact(groupId, artifactId, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', rule2: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ArtifactRulesApi - factory interface * @export */ export const ArtifactRulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ArtifactRulesApiFp(configuration) return { /** * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: any): AxiosPromise { return localVarFp.createArtifactRule(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); }, /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactRule(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: any): AxiosPromise { return localVarFp.deleteArtifactRule(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); }, /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactRules(groupId: string, artifactId: string, options?: any): AxiosPromise { return localVarFp.deleteArtifactRules(groupId, artifactId, options).then((request) => request(axios, basePath)); }, /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: any): AxiosPromise { return localVarFp.getArtifactRuleConfig(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); }, /** * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactRules(groupId: string, artifactId: string, options?: any): AxiosPromise> { return localVarFp.listArtifactRules(groupId, artifactId, options).then((request) => request(axios, basePath)); }, /** * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). * @summary Test update artifact * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) * @param {*} [options] Override http request option. * @throws {RequiredError} */ testUpdateArtifact(groupId: string, artifactId: string, body: any, options?: any): AxiosPromise { return localVarFp.testUpdateArtifact(groupId, artifactId, body, options).then((request) => request(axios, basePath)); }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', rule2: Rule, options?: any): AxiosPromise { return localVarFp.updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options).then((request) => request(axios, basePath)); }, }; }; /** * ArtifactRulesApi - interface * @export * @interface ArtifactRulesApi */ export interface ArtifactRulesApiInterface { /** * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ deleteArtifactRule(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig): AxiosPromise; /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ deleteArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ getArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig): AxiosPromise; /** * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ listArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): AxiosPromise>; /** * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). * @summary Test update artifact * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ testUpdateArtifact(groupId: string, artifactId: string, body: any, options?: AxiosRequestConfig): AxiosPromise; /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApiInterface */ updateArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', rule2: Rule, options?: AxiosRequestConfig): AxiosPromise; } /** * ArtifactRulesApi - object-oriented interface * @export * @class ArtifactRulesApi * @extends {BaseAPI} */ export class ArtifactRulesApi extends BaseAPI implements ArtifactRulesApiInterface { /** * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).createArtifactRule(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public deleteArtifactRule(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).deleteArtifactRule(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public deleteArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).deleteArtifactRules(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public getArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).getArtifactRuleConfig(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public listArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).listArtifactRules(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). * @summary Test update artifact * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public testUpdateArtifact(groupId: string, artifactId: string, body: any, options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).testUpdateArtifact(groupId, artifactId, body, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {'VALIDITY' | 'COMPATIBILITY'} rule The unique name/type of a rule. * @param {Rule} rule2 * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ public updateArtifactRuleConfig(groupId: string, artifactId: string, rule: 'VALIDITY' | 'COMPATIBILITY', rule2: Rule, options?: AxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options).then((request) => request(this.axios, this.basePath)); } }