/* 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 { ArtifactReference } from '../model'; // @ts-ignore import { RuleViolationError } from '../model'; // @ts-ignore import { UpdateState } from '../model'; // @ts-ignore import { VersionMetaData } from '../model'; // @ts-ignore import { VersionSearchResults } from '../model'; /** * VersionsApi - axios parameter creator * @export */ export const VersionsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `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`) * @summary Create artifact version * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact version being created or the content and a set of references to other artifacts. 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. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. * @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} [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} [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} [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} */ createArtifactVersion: async (groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, contentType?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('createArtifactVersion', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('createArtifactVersion', 'artifactId', artifactId) // verify required parameter 'body' is not null or undefined assertParamExists('createArtifactVersion', 'body', body) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (xRegistryVersion !== undefined && xRegistryVersion !== null) { localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); } if (xRegistryName !== undefined && xRegistryName !== null) { localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); } if (xRegistryDescription !== undefined && xRegistryDescription !== null) { localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); } if (xRegistryDescriptionEncoded !== undefined && xRegistryDescriptionEncoded !== null) { localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); } if (xRegistryNameEncoded !== undefined && xRegistryNameEncoded !== null) { localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); } 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 a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactVersion: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactVersion', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactVersion', 'artifactId', artifactId) // verify required parameter 'version' is not null or undefined assertParamExists('deleteArtifactVersion', 'version', version) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .replace(`{${"version"}}`, encodeURIComponent(String(version))); // 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, }; }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @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} */ getArtifactVersion: async (groupId: string, artifactId: string, version: string, dereference?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getArtifactVersion', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getArtifactVersion', 'artifactId', artifactId) // verify required parameter 'version' is not null or undefined assertParamExists('getArtifactVersion', 'version', version) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .replace(`{${"version"}}`, encodeURIComponent(String(version))); // 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, }; }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getArtifactVersionReferences: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getArtifactVersionReferences', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getArtifactVersionReferences', 'artifactId', artifactId) // verify required parameter 'version' is not null or undefined assertParamExists('getArtifactVersionReferences', 'version', version) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/references` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .replace(`{${"version"}}`, encodeURIComponent(String(version))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions * @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 {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactVersions: async (groupId: string, artifactId: string, offset?: number, limit?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactVersions', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('listArtifactVersions', 'artifactId', artifactId) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions` .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 (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact version 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 {string} version The unique identifier of a specific version of the artifact content. * @param {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactVersionState: async (groupId: string, artifactId: string, version: string, updateState: UpdateState, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifactVersionState', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifactVersionState', 'artifactId', artifactId) // verify required parameter 'version' is not null or undefined assertParamExists('updateArtifactVersionState', 'version', version) // verify required parameter 'updateState' is not null or undefined assertParamExists('updateArtifactVersionState', 'updateState', updateState) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/state` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) .replace(`{${"version"}}`, encodeURIComponent(String(version))); // 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, }; }, } }; /** * VersionsApi - functional programming interface * @export */ export const VersionsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = VersionsApiAxiosParamCreator(configuration) return { /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `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`) * @summary Create artifact version * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact version being created or the content and a set of references to other artifacts. 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. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. * @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} [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} [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} [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 createArtifactVersion(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, contentType?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, contentType, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersion(groupId, artifactId, version, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @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 getArtifactVersion(groupId: string, artifactId: string, version: string, dereference?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersion(groupId, artifactId, version, dereference, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getArtifactVersionReferences(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionReferences(groupId, artifactId, version, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions * @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 {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactVersions(groupId, artifactId, offset, limit, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact version 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 {string} version The unique identifier of a specific version of the artifact content. * @param {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionState(groupId, artifactId, version, updateState, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * VersionsApi - factory interface * @export */ export const VersionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = VersionsApiFp(configuration) return { /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `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`) * @summary Create artifact version * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact version being created or the content and a set of references to other artifacts. 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. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. * @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} [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} [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} [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} */ createArtifactVersion(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, contentType?: string, options?: any): AxiosPromise { return localVarFp.createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, contentType, options).then((request) => request(axios, basePath)); }, /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise { return localVarFp.deleteArtifactVersion(groupId, artifactId, version, options).then((request) => request(axios, basePath)); }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @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} */ getArtifactVersion(groupId: string, artifactId: string, version: string, dereference?: boolean, options?: any): AxiosPromise { return localVarFp.getArtifactVersion(groupId, artifactId, version, dereference, options).then((request) => request(axios, basePath)); }, /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getArtifactVersionReferences(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise> { return localVarFp.getArtifactVersionReferences(groupId, artifactId, version, options).then((request) => request(axios, basePath)); }, /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions * @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 {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: any): AxiosPromise { return localVarFp.listArtifactVersions(groupId, artifactId, offset, limit, options).then((request) => request(axios, basePath)); }, /** * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact version 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 {string} version The unique identifier of a specific version of the artifact content. * @param {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: any): AxiosPromise { return localVarFp.updateArtifactVersionState(groupId, artifactId, version, updateState, options).then((request) => request(axios, basePath)); }, }; }; /** * VersionsApi - interface * @export * @interface VersionsApi */ export interface VersionsApiInterface { /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `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`) * @summary Create artifact version * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact version being created or the content and a set of references to other artifacts. 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. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. * @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} [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} [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} [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 VersionsApiInterface */ createArtifactVersion(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, contentType?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApiInterface */ deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): AxiosPromise; /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @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 VersionsApiInterface */ getArtifactVersion(groupId: string, artifactId: string, version: string, dereference?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApiInterface */ getArtifactVersionReferences(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): AxiosPromise>; /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions * @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 {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApiInterface */ listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: AxiosRequestConfig): AxiosPromise; /** * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact version 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 {string} version The unique identifier of a specific version of the artifact content. * @param {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApiInterface */ updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: AxiosRequestConfig): AxiosPromise; } /** * VersionsApi - object-oriented interface * @export * @class VersionsApi * @extends {BaseAPI} */ export class VersionsApi extends BaseAPI implements VersionsApiInterface { /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `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`) * @summary Create artifact version * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. * @param {any} body The content of the artifact version being created or the content and a set of references to other artifacts. 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. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. * @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} [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} [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} [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 VersionsApi */ public createArtifactVersion(groupId: string, artifactId: string, body: any, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, contentType?: string, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, contentType, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ public deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).deleteArtifactVersion(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @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 VersionsApi */ public getArtifactVersion(groupId: string, artifactId: string, version: string, dereference?: boolean, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).getArtifactVersion(groupId, artifactId, version, dereference, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. 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`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact version * @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 {string} version The unique identifier of a specific version of the artifact content. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ public getArtifactVersionReferences(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).getArtifactVersionReferences(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions * @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 {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ public listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).listArtifactVersions(groupId, artifactId, offset, limit, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact version 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 {string} version The unique identifier of a specific version of the artifact content. * @param {UpdateState} updateState * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ public updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: AxiosRequestConfig) { return VersionsApiFp(this.configuration).updateArtifactVersionState(groupId, artifactId, version, updateState, options).then((request) => request(this.axios, this.basePath)); } }