/* 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 { ArtifactContent } from '../model'; // @ts-ignore import { ArtifactMetaData } from '../model'; // @ts-ignore import { ArtifactReference } from '../model'; // @ts-ignore import { ArtifactSearchResults } from '../model'; // @ts-ignore import { IfExists } from '../model'; // @ts-ignore import { RuleViolationError } from '../model'; // @ts-ignore import { SortBy } from '../model'; // @ts-ignore import { SortOrder } from '../model'; // @ts-ignore import { UpdateState } from '../model'; /** * ArtifactsApi - axios parameter creator * @export */ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new artifact by posting 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 registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create 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 {any} body The content of the artifact being created. 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 {string} [xRegistryArtifactType] Specifies the type of the artifact being added. Possible values include: * 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 {string} [xRegistryArtifactId] A client-provided, globally unique identifier for the new artifact. * @param {string} [xRegistryVersion] Specifies the version number of this initial version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically (starting with version `1`). * @param {IfExists} [ifExists] Set this option to instruct the server on what to do if the artifact already exists. * @param {boolean} [canonical] Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. * @param {string} [xRegistryDescription] Specifies the description of artifact being added. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the description of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryName] Specifies the name of artifact being added. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the name of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryContentHash] Specifies the (optional) hash of the artifact to be verified. * @param {'SHA256' | 'MD5'} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createArtifact: async (groupId: string, body: any, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: 'SHA256' | 'MD5', contentType?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('createArtifact', 'groupId', groupId) // verify required parameter 'body' is not null or undefined assertParamExists('createArtifact', 'body', body) const localVarPath = `/groups/{groupId}/artifacts` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); // 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 (ifExists !== undefined) { localVarQueryParameter['ifExists'] = ifExists; } if (canonical !== undefined) { localVarQueryParameter['canonical'] = canonical; } if (xRegistryArtifactType !== undefined && xRegistryArtifactType !== null) { localVarHeaderParameter['X-Registry-ArtifactType'] = String(xRegistryArtifactType); } if (xRegistryArtifactId !== undefined && xRegistryArtifactId !== null) { localVarHeaderParameter['X-Registry-ArtifactId'] = String(xRegistryArtifactId); } if (xRegistryVersion !== undefined && xRegistryVersion !== null) { localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); } if (xRegistryDescription !== undefined && xRegistryDescription !== null) { localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); } if (xRegistryDescriptionEncoded !== undefined && xRegistryDescriptionEncoded !== null) { localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); } if (xRegistryName !== undefined && xRegistryName !== null) { localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); } if (xRegistryNameEncoded !== undefined && xRegistryNameEncoded !== null) { localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); } if (xRegistryContentHash !== undefined && xRegistryContentHash !== null) { localVarHeaderParameter['X-Registry-Content-Hash'] = String(xRegistryContentHash); } if (xRegistryHashAlgorithm !== undefined && xRegistryHashAlgorithm !== null) { localVarHeaderParameter['X-Registry-Hash-Algorithm'] = String(xRegistryHashAlgorithm); } if (contentType !== undefined && contentType !== null) { localVarHeaderParameter['Content-Type'] = String(contentType); } 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, }; }, /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete 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 {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifact: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifact', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifact', 'artifactId', artifactId) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` .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, }; }, /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactsInGroup: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactsInGroup', 'groupId', groupId) const localVarPath = `/groups/{groupId}/artifacts` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); // 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, }; }, /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact by global ID * @param {number} globalId Global identifier for an artifact version. * @param {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentByGlobalId: async (globalId: number, dereference?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'globalId' is not null or undefined assertParamExists('getContentByGlobalId', 'globalId', globalId) const localVarPath = `/ids/globalIds/{globalId}` .replace(`{${"globalId"}}`, encodeURIComponent(String(globalId))); // 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 (dereference !== undefined) { localVarQueryParameter['dereference'] = dereference; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by SHA-256 hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentByHash: async (contentHash: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contentHash' is not null or undefined assertParamExists('getContentByHash', 'contentHash', contentHash) const localVarPath = `/ids/contentHashes/{contentHash}/` .replace(`{${"contentHash"}}`, encodeURIComponent(String(contentHash))); // 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 content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentById: async (contentId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contentId' is not null or undefined assertParamExists('getContentById', 'contentId', contentId) const localVarPath = `/ids/contentIds/{contentId}/` .replace(`{${"contentId"}}`, encodeURIComponent(String(contentId))); // 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 latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get latest 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 {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLatestArtifact: async (groupId: string, artifactId: string, dereference?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getLatestArtifact', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getLatestArtifact', 'artifactId', artifactId) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` .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; if (dereference !== undefined) { localVarQueryParameter['dereference'] = dereference; } 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 artifacts in the group. This list is paged. * @summary List artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactsInGroup: async (groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactsInGroup', 'groupId', groupId) const localVarPath = `/groups/{groupId}/artifacts` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); // 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 (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (orderby !== undefined) { localVarQueryParameter['orderby'] = orderby; } 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 containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByContentHash: async (contentHash: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contentHash' is not null or undefined assertParamExists('referencesByContentHash', 'contentHash', contentHash) const localVarPath = `/ids/contentHashes/{contentHash}/references` .replace(`{${"contentHash"}}`, encodeURIComponent(String(contentHash))); // 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 containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by content ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByContentId: async (contentId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contentId' is not null or undefined assertParamExists('referencesByContentId', 'contentId', contentId) const localVarPath = `/ids/contentIds/{contentId}/references` .replace(`{${"contentId"}}`, encodeURIComponent(String(contentId))); // 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 containing all the artifact references using the artifact global ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by global ID * @param {number} globalId Global identifier for an artifact version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByGlobalId: async (globalId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'globalId' is not null or undefined assertParamExists('referencesByGlobalId', 'globalId', globalId) const localVarPath = `/ids/globalIds/{globalId}/references` .replace(`{${"globalId"}}`, encodeURIComponent(String(globalId))); // 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, }; }, /** * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. 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 type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). 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`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. * @summary 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 new content of the artifact being updated. 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 {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifact: async (groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, contentType?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifact', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifact', 'artifactId', artifactId) // verify required parameter 'body' is not null or undefined assertParamExists('updateArtifact', 'body', body) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` .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; if (xRegistryVersion !== undefined && xRegistryVersion !== null) { localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); } if (xRegistryName !== undefined && xRegistryName !== null) { localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); } if (xRegistryNameEncoded !== undefined && xRegistryNameEncoded !== null) { localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); } if (xRegistryDescription !== undefined && xRegistryDescription !== null) { localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); } if (xRegistryDescriptionEncoded !== undefined && xRegistryDescriptionEncoded !== null) { localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); } if (contentType !== undefined && contentType !== null) { localVarHeaderParameter['Content-Type'] = String(contentType); } 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 state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. 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 Update artifact state * @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 {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactState: async (groupId: string, artifactId: string, updateState: UpdateState, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifactState', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifactState', 'artifactId', artifactId) // verify required parameter 'updateState' is not null or undefined assertParamExists('updateArtifactState', 'updateState', updateState) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/state` .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(updateState, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ArtifactsApi - functional programming interface * @export */ export const ArtifactsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ArtifactsApiAxiosParamCreator(configuration) return { /** * Creates a new artifact by posting 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 registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create 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 {any} body The content of the artifact being created. 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 {string} [xRegistryArtifactType] Specifies the type of the artifact being added. Possible values include: * 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 {string} [xRegistryArtifactId] A client-provided, globally unique identifier for the new artifact. * @param {string} [xRegistryVersion] Specifies the version number of this initial version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically (starting with version `1`). * @param {IfExists} [ifExists] Set this option to instruct the server on what to do if the artifact already exists. * @param {boolean} [canonical] Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. * @param {string} [xRegistryDescription] Specifies the description of artifact being added. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the description of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryName] Specifies the name of artifact being added. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the name of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryContentHash] Specifies the (optional) hash of the artifact to be verified. * @param {'SHA256' | 'MD5'} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createArtifact(groupId: string, body: any, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: 'SHA256' | 'MD5', contentType?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, xRegistryContentHash, xRegistryHashAlgorithm, contentType, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete 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 {*} [options] Override http request option. * @throws {RequiredError} */ async deleteArtifact(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifact(groupId, artifactId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteArtifactsInGroup(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactsInGroup(groupId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact by global ID * @param {number} globalId Global identifier for an artifact version. * @param {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getContentByGlobalId(globalId: number, dereference?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentByGlobalId(globalId, dereference, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by SHA-256 hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getContentByHash(contentHash: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentByHash(contentHash, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets the content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getContentById(contentId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentById(contentId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get latest 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 {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getLatestArtifact(groupId, artifactId, dereference, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactsInGroup(groupId, limit, offset, order, orderby, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async referencesByContentHash(contentHash: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByContentHash(contentHash, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by content ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async referencesByContentId(contentId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByContentId(contentId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list containing all the artifact references using the artifact global ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by global ID * @param {number} globalId Global identifier for an artifact version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async referencesByGlobalId(globalId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByGlobalId(globalId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. 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 type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). 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`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. * @summary 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 new content of the artifact being updated. 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 {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateArtifact(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, contentType?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, contentType, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. 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 Update artifact state * @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 {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactState(groupId, artifactId, updateState, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ArtifactsApi - factory interface * @export */ export const ArtifactsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ArtifactsApiFp(configuration) return { /** * Creates a new artifact by posting 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 registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create 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 {any} body The content of the artifact being created. 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 {string} [xRegistryArtifactType] Specifies the type of the artifact being added. Possible values include: * 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 {string} [xRegistryArtifactId] A client-provided, globally unique identifier for the new artifact. * @param {string} [xRegistryVersion] Specifies the version number of this initial version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically (starting with version `1`). * @param {IfExists} [ifExists] Set this option to instruct the server on what to do if the artifact already exists. * @param {boolean} [canonical] Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. * @param {string} [xRegistryDescription] Specifies the description of artifact being added. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the description of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryName] Specifies the name of artifact being added. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the name of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryContentHash] Specifies the (optional) hash of the artifact to be verified. * @param {'SHA256' | 'MD5'} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createArtifact(groupId: string, body: any, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: 'SHA256' | 'MD5', contentType?: string, options?: any): AxiosPromise { return localVarFp.createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, xRegistryContentHash, xRegistryHashAlgorithm, contentType, options).then((request) => request(axios, basePath)); }, /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete 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 {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifact(groupId: string, artifactId: string, options?: any): AxiosPromise { return localVarFp.deleteArtifact(groupId, artifactId, options).then((request) => request(axios, basePath)); }, /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactsInGroup(groupId: string, options?: any): AxiosPromise { return localVarFp.deleteArtifactsInGroup(groupId, options).then((request) => request(axios, basePath)); }, /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact by global ID * @param {number} globalId Global identifier for an artifact version. * @param {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentByGlobalId(globalId: number, dereference?: boolean, options?: any): AxiosPromise { return localVarFp.getContentByGlobalId(globalId, dereference, options).then((request) => request(axios, basePath)); }, /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by SHA-256 hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentByHash(contentHash: string, options?: any): AxiosPromise { return localVarFp.getContentByHash(contentHash, options).then((request) => request(axios, basePath)); }, /** * Gets the content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContentById(contentId: number, options?: any): AxiosPromise { return localVarFp.getContentById(contentId, options).then((request) => request(axios, basePath)); }, /** * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get latest 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 {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} */ getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: any): AxiosPromise { return localVarFp.getLatestArtifact(groupId, artifactId, dereference, options).then((request) => request(axios, basePath)); }, /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: any): AxiosPromise { return localVarFp.listArtifactsInGroup(groupId, limit, offset, order, orderby, options).then((request) => request(axios, basePath)); }, /** * Returns a list containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByContentHash(contentHash: string, options?: any): AxiosPromise> { return localVarFp.referencesByContentHash(contentHash, options).then((request) => request(axios, basePath)); }, /** * Returns a list containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by content ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByContentId(contentId: number, options?: any): AxiosPromise> { return localVarFp.referencesByContentId(contentId, options).then((request) => request(axios, basePath)); }, /** * Returns a list containing all the artifact references using the artifact global ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by global ID * @param {number} globalId Global identifier for an artifact version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ referencesByGlobalId(globalId: number, options?: any): AxiosPromise> { return localVarFp.referencesByGlobalId(globalId, options).then((request) => request(axios, basePath)); }, /** * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. 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 type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). 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`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. * @summary 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 new content of the artifact being updated. 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 {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifact(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, contentType?: string, options?: any): AxiosPromise { return localVarFp.updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, contentType, options).then((request) => request(axios, basePath)); }, /** * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. 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 Update artifact state * @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 {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: any): AxiosPromise { return localVarFp.updateArtifactState(groupId, artifactId, updateState, options).then((request) => request(axios, basePath)); }, }; }; /** * ArtifactsApi - interface * @export * @interface ArtifactsApi */ export interface ArtifactsApiInterface { /** * Creates a new artifact by posting 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 registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create 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 {any} body The content of the artifact being created. 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 {string} [xRegistryArtifactType] Specifies the type of the artifact being added. Possible values include: * 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 {string} [xRegistryArtifactId] A client-provided, globally unique identifier for the new artifact. * @param {string} [xRegistryVersion] Specifies the version number of this initial version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically (starting with version `1`). * @param {IfExists} [ifExists] Set this option to instruct the server on what to do if the artifact already exists. * @param {boolean} [canonical] Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. * @param {string} [xRegistryDescription] Specifies the description of artifact being added. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the description of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryName] Specifies the name of artifact being added. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the name of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryContentHash] Specifies the (optional) hash of the artifact to be verified. * @param {'SHA256' | 'MD5'} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ createArtifact(groupId: string, body: any, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: 'SHA256' | 'MD5', contentType?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete 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 {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ deleteArtifact(groupId: string, artifactId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ deleteArtifactsInGroup(groupId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact by global ID * @param {number} globalId Global identifier for an artifact version. * @param {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ getContentByGlobalId(globalId: number, dereference?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by SHA-256 hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ getContentByHash(contentHash: string, options?: AxiosRequestConfig): AxiosPromise; /** * Gets the content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ getContentById(contentId: number, options?: AxiosRequestConfig): AxiosPromise; /** * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get latest 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 {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig): AxiosPromise; /** * Returns a list containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ referencesByContentHash(contentHash: string, options?: AxiosRequestConfig): AxiosPromise>; /** * Returns a list containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by content ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ referencesByContentId(contentId: number, options?: AxiosRequestConfig): AxiosPromise>; /** * Returns a list containing all the artifact references using the artifact global ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by global ID * @param {number} globalId Global identifier for an artifact version. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ referencesByGlobalId(globalId: number, options?: AxiosRequestConfig): AxiosPromise>; /** * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. 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 type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). 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`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. * @summary 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 new content of the artifact being updated. 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 {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ updateArtifact(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, contentType?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. 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 Update artifact state * @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 {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApiInterface */ updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: AxiosRequestConfig): AxiosPromise; } /** * ArtifactsApi - object-oriented interface * @export * @class ArtifactsApi * @extends {BaseAPI} */ export class ArtifactsApi extends BaseAPI implements ArtifactsApiInterface { /** * Creates a new artifact by posting 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 registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create 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 {any} body The content of the artifact being created. 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 {string} [xRegistryArtifactType] Specifies the type of the artifact being added. Possible values include: * 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 {string} [xRegistryArtifactId] A client-provided, globally unique identifier for the new artifact. * @param {string} [xRegistryVersion] Specifies the version number of this initial version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically (starting with version `1`). * @param {IfExists} [ifExists] Set this option to instruct the server on what to do if the artifact already exists. * @param {boolean} [canonical] Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. * @param {string} [xRegistryDescription] Specifies the description of artifact being added. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the description of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryName] Specifies the name of artifact being added. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the name of artifact being added. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryContentHash] Specifies the (optional) hash of the artifact to be verified. * @param {'SHA256' | 'MD5'} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public createArtifact(groupId: string, body: any, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: 'SHA256' | 'MD5', contentType?: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, xRegistryContentHash, xRegistryHashAlgorithm, contentType, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete 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 {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public deleteArtifact(groupId: string, artifactId: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).deleteArtifact(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public deleteArtifactsInGroup(groupId: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).deleteArtifactsInGroup(groupId, options).then((request) => request(this.axios, this.basePath)); } /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact by global ID * @param {number} globalId Global identifier for an artifact version. * @param {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public getContentByGlobalId(globalId: number, dereference?: boolean, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentByGlobalId(globalId, dereference, options).then((request) => request(this.axios, this.basePath)); } /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by SHA-256 hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public getContentByHash(contentHash: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentByHash(contentHash, options).then((request) => request(this.axios, this.basePath)); } /** * Gets the content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact content by ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public getContentById(contentId: number, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentById(contentId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get latest 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 {boolean} [dereference] Allows the user to specify if the content should be dereferenced when being returned * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getLatestArtifact(groupId, artifactId, dereference, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).listArtifactsInGroup(groupId, limit, offset, order, orderby, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by hash * @param {string} contentHash SHA-256 content hash for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public referencesByContentHash(contentHash: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByContentHash(contentHash, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by content ID * @param {number} contentId Global identifier for a single artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public referencesByContentId(contentId: number, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByContentId(contentId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list containing all the artifact references using the artifact global ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List artifact references by global ID * @param {number} globalId Global identifier for an artifact version. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public referencesByGlobalId(globalId: number, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByGlobalId(globalId, options).then((request) => request(this.axios, this.basePath)); } /** * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. 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 type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). 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`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. * @summary 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 new content of the artifact being updated. 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 {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. * @param {string} [contentType] This header is explicit so clients using the OpenAPI Generator are able select the content type. Ignore otherwise. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public updateArtifact(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, contentType?: string, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, contentType, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. 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 Update artifact state * @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 {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ public updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).updateArtifactState(groupId, artifactId, updateState, options).then((request) => request(this.axios, this.basePath)); } }