diff --git a/src/.openapi-generator/VERSION b/src/.openapi-generator/VERSION index 1e20ec3..e7e42a4 100644 --- a/src/.openapi-generator/VERSION +++ b/src/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.3.0 \ No newline at end of file diff --git a/src/api.ts b/src/api.ts index 0a15832..ced8216 100644 --- a/src/api.ts +++ b/src/api.ts @@ -4,7 +4,7 @@ * 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.2.4-SNAPSHOT + * The version of the OpenAPI document: 2.4.1.Final * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // 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'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * @@ -77,10 +79,10 @@ export interface ArtifactMetaData { 'version': string; /** * - * @type {ArtifactType} + * @type {string} * @memberof ArtifactMetaData */ - 'type': ArtifactType; + 'type': string; /** * * @type {number} @@ -124,6 +126,21 @@ export interface ArtifactMetaData { */ 'references'?: Array; } + + +/** + * Describes the ownership of an artifact. + * @export + * @interface ArtifactOwner + */ +export interface ArtifactOwner { + /** + * + * @type {string} + * @memberof ArtifactOwner + */ + 'owner'?: string; +} /** * A reference to a different artifact. Typically used with artifact types that can have dependencies like Protobuf. * @export @@ -192,25 +209,16 @@ export type ArtifactState = typeof ArtifactState[keyof typeof ArtifactState]; /** * * @export - * @enum {string} + * @interface ArtifactTypeInfo */ - -export const ArtifactType = { - Avro: 'AVRO', - Protobuf: 'PROTOBUF', - Json: 'JSON', - Openapi: 'OPENAPI', - Asyncapi: 'ASYNCAPI', - Graphql: 'GRAPHQL', - Kconnect: 'KCONNECT', - Wsdl: 'WSDL', - Xsd: 'XSD', - Xml: 'XML' -} as const; - -export type ArtifactType = typeof ArtifactType[keyof typeof ArtifactType]; - - +export interface ArtifactTypeInfo { + /** + * + * @type {string} + * @memberof ArtifactTypeInfo + */ + 'name'?: string; +} /** * * @export @@ -255,7 +263,7 @@ export interface ConfigurationProperty { */ export interface ContentCreateRequest { /** - * Raw content of the artifact. + * Raw content of the artifact or a valid (and accessible) URL where the content can be found. * @type {string} * @memberof ContentCreateRequest */ @@ -267,6 +275,31 @@ export interface ContentCreateRequest { */ 'references': Array; } +/** + * + * @export + * @interface CreateGroupMetaData + */ +export interface CreateGroupMetaData { + /** + * + * @type {string} + * @memberof CreateGroupMetaData + */ + 'description'?: string; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof CreateGroupMetaData + */ + 'properties'?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof CreateGroupMetaData + */ + 'id': string; +} /** * Models a download \"link\". Useful for browser use-cases. * @export @@ -317,6 +350,74 @@ export interface EditableMetaData { */ 'properties'?: { [key: string]: string; }; } +/** + * + * @export + * @interface GroupMetaData + */ +export interface GroupMetaData { + /** + * An ID of a single artifact group. + * @type {string} + * @memberof GroupMetaData + */ + 'id': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'description': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'createdBy': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'createdOn': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'modifiedBy': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'modifiedOn': string; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof GroupMetaData + */ + 'properties': { [key: string]: string; }; +} +/** + * Describes the response received when searching for groups. + * @export + * @interface GroupSearchResults + */ +export interface GroupSearchResults { + /** + * The groups returned in the result set. + * @type {Array} + * @memberof GroupSearchResults + */ + 'groups': Array; + /** + * The total number of groups that matched the query that produced the result set (may be more than the number of groups in the result set). + * @type {number} + * @memberof GroupSearchResults + */ + 'count': number; +} /** * * @export @@ -425,6 +526,8 @@ export interface LogConfiguration { */ 'level': LogLevel; } + + /** * * @export @@ -498,6 +601,8 @@ export interface NamedLogConfiguration { */ 'level': LogLevel; } + + /** * * @export @@ -536,6 +641,8 @@ export interface RoleMapping { */ 'principalName'?: string; } + + /** * * @export @@ -570,6 +677,8 @@ export interface Rule { */ 'type'?: RuleType; } + + /** * * @export @@ -691,10 +800,10 @@ export interface SearchedArtifact { 'createdBy': string; /** * - * @type {ArtifactType} + * @type {string} * @memberof SearchedArtifact */ - 'type': ArtifactType; + 'type': string; /** * * @type {Array} @@ -726,6 +835,51 @@ export interface SearchedArtifact { */ 'groupId'?: string; } + + +/** + * Models a single group from the result set returned when searching for groups. + * @export + * @interface SearchedGroup + */ +export interface SearchedGroup { + /** + * An ID of a single artifact group. + * @type {string} + * @memberof SearchedGroup + */ + 'id': string; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'description': string; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'createdOn': string; + /** + * + * @type {any} + * @memberof SearchedGroup + */ + 'createdBy': any; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'modifiedOn': string; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'modifiedBy': string; +} /** * Models a single artifact from the result set returned when searching for artifacts. * @export @@ -758,10 +912,10 @@ export interface SearchedVersion { 'createdBy': string; /** * - * @type {ArtifactType} + * @type {string} * @memberof SearchedVersion */ - 'type': ArtifactType; + 'type': string; /** * * @type {Array} @@ -805,6 +959,8 @@ export interface SearchedVersion { */ 'references': Array; } + + /** * * @export @@ -890,6 +1046,8 @@ export interface UpdateRole { */ 'role': RoleType; } + + /** * * @export @@ -903,6 +1061,8 @@ export interface UpdateState { */ 'state': ArtifactState; } + + /** * Information about a single user. * @export @@ -978,10 +1138,10 @@ export interface VersionMetaData { 'createdOn': string; /** * - * @type {ArtifactType} + * @type {string} * @memberof VersionMetaData */ - 'type': ArtifactType; + 'type': string; /** * * @type {number} @@ -1025,6 +1185,8 @@ export interface VersionMetaData { */ 'contentId': number; } + + /** * Describes the response received when searching for artifacts. * @export @@ -1258,7 +1420,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get the value of a configuration property + * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1359,7 +1521,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Gets the details of a single role mapping (by principalId). This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. @@ -1395,13 +1557,13 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data - * @param {any} body The ZIP file representing the previously exported registry data. + * @param {File} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - importData: async (body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options: AxiosRequestConfig = {}): Promise => { + importData: async (body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('importData', 'body', body) const localVarPath = `/admin/import`; @@ -1416,12 +1578,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (xRegistryPreserveGlobalId !== undefined && xRegistryPreserveGlobalId !== null) { - localVarHeaderParameter['X-Registry-Preserve-GlobalId'] = String(JSON.stringify(xRegistryPreserveGlobalId)); + if (xRegistryPreserveGlobalId != null) { + localVarHeaderParameter['X-Registry-Preserve-GlobalId'] = typeof xRegistryPreserveGlobalId === 'string' + ? xRegistryPreserveGlobalId + : JSON.stringify(xRegistryPreserveGlobalId); } - if (xRegistryPreserveContentId !== undefined && xRegistryPreserveContentId !== null) { - localVarHeaderParameter['X-Registry-Preserve-ContentId'] = String(JSON.stringify(xRegistryPreserveContentId)); + if (xRegistryPreserveContentId != null) { + localVarHeaderParameter['X-Registry-Preserve-ContentId'] = typeof xRegistryPreserveContentId === 'string' + ? xRegistryPreserveContentId + : JSON.stringify(xRegistryPreserveContentId); } @@ -1438,6 +1604,36 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration options: localVarRequestOptions, }; }, + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listArtifactTypes: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/artifactTypes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties @@ -1857,13 +2053,13 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async exportData(forBrowser?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async exportData(forBrowser?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.exportData(forBrowser, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get the value of a configuration property + * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1895,7 +2091,7 @@ export const AdminApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Gets the details of a single role mapping (by principalId). This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. @@ -1908,16 +2104,26 @@ export const AdminApiFp = function(configuration?: Configuration) { /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data - * @param {any} body The ZIP file representing the previously exported registry data. + * @param {File} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listArtifactTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactTypes(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties @@ -2094,12 +2300,12 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - exportData(forBrowser?: boolean, options?: any): AxiosPromise { + exportData(forBrowser?: boolean, options?: any): AxiosPromise { return localVarFp.exportData(forBrowser, options).then((request) => request(axios, basePath)); }, /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get the value of a configuration property + * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2128,7 +2334,7 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath return localVarFp.getLogConfiguration(logger, options).then((request) => request(axios, basePath)); }, /** - * Gets the details of a single role mapping (by principalId). This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. @@ -2140,15 +2346,24 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data - * @param {any} body The ZIP file representing the previously exported registry data. + * @param {File} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: any): AxiosPromise { + importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: any): AxiosPromise { return localVarFp.importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options).then((request) => request(axios, basePath)); }, + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listArtifactTypes(options?: any): AxiosPromise> { + return localVarFp.listArtifactTypes(options).then((request) => request(axios, basePath)); + }, /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties @@ -2332,7 +2547,7 @@ export class AdminApi extends BaseAPI { /** * Returns the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get the value of a configuration property + * @summary Get configuration property value * @param {string} propertyName The name of a configuration property. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2367,7 +2582,7 @@ export class AdminApi extends BaseAPI { } /** - * Gets the details of a single role mapping (by principalId). This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Gets the details of a single role mapping (by `principalId`). This operation can fail for the following reasons: * No role mapping for the `principalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Return a single role mapping * @param {string} principalId Unique id of a principal (typically either a user or service account). * @param {*} [options] Override http request option. @@ -2381,17 +2596,28 @@ export class AdminApi extends BaseAPI { /** * Imports registry data that was previously exported using the `/admin/export` operation. * @summary Import registry data - * @param {any} body The ZIP file representing the previously exported registry data. + * @param {File} body The ZIP file representing the previously exported registry data. * @param {boolean} [xRegistryPreserveGlobalId] If this header is set to false, global ids of imported data will be ignored and replaced by next id in global id sequence. This allows to import any data even thought the global ids would cause a conflict. * @param {boolean} [xRegistryPreserveContentId] If this header is set to false, content ids of imported data will be ignored and replaced by next id in content id sequence. The mapping between content and artifacts will be preserved. This allows to import any data even thought the content ids would cause a conflict. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public importData(body: any, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig) { + public importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public listArtifactTypes(options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).listArtifactTypes(options).then((request) => request(this.axios, this.basePath)); + } + /** * Returns a list of all configuration properties that have been set. The list is not paged. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) * @summary List all configuration properties @@ -3119,35 +3345,19 @@ export class ArtifactRulesApi extends BaseAPI { /** - * ArtifactsApi - axios parameter creator + * ArtifactTypeApi - axios parameter creator * @export */ -export const ArtifactsApiAxiosParamCreator = function (configuration?: Configuration) { +export const ArtifactTypeApiAxiosParamCreator = 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 Unique ID of an artifact group. - * @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 {ArtifactType} [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. + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifact: async (groupId: string, body: any, xRegistryArtifactType?: ArtifactType, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: 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))); + listArtifactTypes: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/artifactTypes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3155,65 +3365,189 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...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(JSON.stringify(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); - } - - localVarHeaderParameter['Content-Type'] = 'application/create.extended+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, }; }, + } +}; + +/** + * ArtifactTypeApi - functional programming interface + * @export + */ +export const ArtifactTypeApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ArtifactTypeApiAxiosParamCreator(configuration) + return { /** - * 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. + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listArtifactTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactTypes(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ArtifactTypeApi - factory interface + * @export + */ +export const ArtifactTypeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ArtifactTypeApiFp(configuration) + return { + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listArtifactTypes(options?: any): AxiosPromise> { + return localVarFp.listArtifactTypes(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ArtifactTypeApi - object-oriented interface + * @export + * @class ArtifactTypeApi + * @extends {BaseAPI} + */ +export class ArtifactTypeApi extends BaseAPI { + /** + * Gets a list of all the configured artifact types. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary List artifact types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactTypeApi + */ + public listArtifactTypes(options?: AxiosRequestConfig) { + return ArtifactTypeApiFp(this.configuration).listArtifactTypes(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * 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 {*} [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', 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 != null) { + localVarHeaderParameter['X-Registry-ArtifactType'] = String(xRegistryArtifactType); + } + + if (xRegistryArtifactId != null) { + localVarHeaderParameter['X-Registry-ArtifactId'] = String(xRegistryArtifactId); + } + + if (xRegistryVersion != null) { + localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); + } + + if (xRegistryDescription != null) { + localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); + } + + if (xRegistryDescriptionEncoded != null) { + localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); + } + + if (xRegistryName != null) { + localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); + } + + if (xRegistryNameEncoded != null) { + localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); + } + + if (xRegistryContentHash != null) { + localVarHeaderParameter['X-Registry-Content-Hash'] = String(xRegistryContentHash); + } + + if (xRegistryHashAlgorithm != null) { + localVarHeaderParameter['X-Registry-Hash-Algorithm'] = String(xRegistryHashAlgorithm); + } + + + + localVarHeaderParameter['Content-Type'] = 'application/create.extended+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} */ @@ -3249,8 +3583,8 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }, /** * Deletes all of the artifacts that exist in a given group. - * @summary Deletes all artifacts in a group - * @param {string} groupId Unique ID of an artifact 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} */ @@ -3434,7 +3768,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group - * @param {string} groupId Unique ID of an artifact 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`). @@ -3487,7 +3821,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }, /** * 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 Returns a list with all the references for the artifact with the given hash + * @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} @@ -3520,8 +3854,8 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Returns a list containing all the artifact references using the artifact contentId. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) - * @summary Returns a list with all the references for the artifact with the given content id. + * 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} @@ -3554,8 +3888,8 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * 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 Returns a list with all the references for the artifact with the given global id. + * 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} @@ -3675,9 +4009,9 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura /** * Returns a paginated list of all artifacts with at least one version that matches the posted content. * @summary Search for artifacts by content - * @param {any} body The content to search for. + * @param {File} body The content to search for. * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for matching artifacts. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. Must be used along with the `artifactType` query parameter. - * @param {ArtifactType} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. + * @param {string} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. * @param {number} [offset] The number of artifacts to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {'asc' | 'desc'} [order] Sort order, ascending (`asc`) or descending (`desc`). @@ -3685,7 +4019,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchArtifactsByContent: async (body: any, canonical?: boolean, artifactType?: ArtifactType, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options: AxiosRequestConfig = {}): Promise => { + searchArtifactsByContent: async (body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('searchArtifactsByContent', 'body', body) const localVarPath = `/search/artifacts`; @@ -3773,23 +4107,23 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (xRegistryVersion !== undefined && xRegistryVersion !== null) { + if (xRegistryVersion != null) { localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); } - if (xRegistryName !== undefined && xRegistryName !== null) { + if (xRegistryName != null) { localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); } - if (xRegistryNameEncoded !== undefined && xRegistryNameEncoded !== null) { + if (xRegistryNameEncoded != null) { localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); } - if (xRegistryDescription !== undefined && xRegistryDescription !== null) { + if (xRegistryDescription != null) { localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); } - if (xRegistryDescriptionEncoded !== undefined && xRegistryDescriptionEncoded !== null) { + if (xRegistryDescriptionEncoded != null) { localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); } @@ -3864,9 +4198,9 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { /** * 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 Unique ID of an artifact 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 {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 {ArtifactType} [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} [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. @@ -3875,11 +4209,13 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @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 {*} [options] Override http request option. * @throws {RequiredError} */ - async createArtifact(groupId: string, body: any, xRegistryArtifactType?: ArtifactType, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: 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, options); + 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', 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, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3896,8 +4232,8 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { }, /** * Deletes all of the artifacts that exist in a given group. - * @summary Deletes all artifacts in a group - * @param {string} groupId Unique ID of an artifact 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} */ @@ -3913,7 +4249,7 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getContentByGlobalId(globalId: number, dereference?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); }, @@ -3924,7 +4260,7 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getContentByHash(contentHash: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); }, @@ -3935,7 +4271,7 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getContentById(contentId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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); }, @@ -3948,14 +4284,14 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + 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 Unique ID of an artifact 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`). @@ -3969,7 +4305,7 @@ export const ArtifactsApiFp = function(configuration?: 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 Returns a list with all the references for the artifact with the given hash + * @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} @@ -3979,8 +4315,8 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns a list containing all the artifact references using the artifact contentId. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) - * @summary Returns a list with all the references for the artifact with the given content id. + * 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} @@ -3990,8 +4326,8 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { 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 Returns a list with all the references for the artifact with the given global id. + * 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} @@ -4024,9 +4360,9 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { /** * Returns a paginated list of all artifacts with at least one version that matches the posted content. * @summary Search for artifacts by content - * @param {any} body The content to search for. + * @param {File} body The content to search for. * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for matching artifacts. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. Must be used along with the `artifactType` query parameter. - * @param {ArtifactType} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. + * @param {string} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. * @param {number} [offset] The number of artifacts to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {'asc' | 'desc'} [order] Sort order, ascending (`asc`) or descending (`desc`). @@ -4034,7 +4370,7 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async searchArtifactsByContent(body: any, canonical?: boolean, artifactType?: ArtifactType, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.searchArtifactsByContent(body, canonical, artifactType, offset, limit, order, orderby, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4082,9 +4418,9 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base /** * 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 Unique ID of an artifact 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 {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 {ArtifactType} [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} [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. @@ -4093,11 +4429,13 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @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 {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifact(groupId: string, body: any, xRegistryArtifactType?: ArtifactType, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, options?: any): AxiosPromise { - return localVarFp.createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, options).then((request) => request(axios, basePath)); + 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', options?: any): AxiosPromise { + return localVarFp.createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, xRegistryContentHash, xRegistryHashAlgorithm, 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`) @@ -4112,8 +4450,8 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base }, /** * Deletes all of the artifacts that exist in a given group. - * @summary Deletes all artifacts in a group - * @param {string} groupId Unique ID of an artifact 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} */ @@ -4128,7 +4466,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentByGlobalId(globalId: number, dereference?: boolean, options?: any): AxiosPromise { + getContentByGlobalId(globalId: number, dereference?: boolean, options?: any): AxiosPromise { return localVarFp.getContentByGlobalId(globalId, dereference, options).then((request) => request(axios, basePath)); }, /** @@ -4138,7 +4476,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentByHash(contentHash: string, options?: any): AxiosPromise { + getContentByHash(contentHash: string, options?: any): AxiosPromise { return localVarFp.getContentByHash(contentHash, options).then((request) => request(axios, basePath)); }, /** @@ -4148,7 +4486,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentById(contentId: number, options?: any): AxiosPromise { + getContentById(contentId: number, options?: any): AxiosPromise { return localVarFp.getContentById(contentId, options).then((request) => request(axios, basePath)); }, /** @@ -4160,13 +4498,13 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLatestArtifact(groupId: string, artifactId: string, dereference?: boolean, options?: any): AxiosPromise { + 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 Unique ID of an artifact 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`). @@ -4179,7 +4517,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base }, /** * 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 Returns a list with all the references for the artifact with the given hash + * @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} @@ -4188,8 +4526,8 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base return localVarFp.referencesByContentHash(contentHash, options).then((request) => request(axios, basePath)); }, /** - * Returns a list containing all the artifact references using the artifact contentId. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) - * @summary Returns a list with all the references for the artifact with the given content id. + * 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} @@ -4198,8 +4536,8 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base 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 Returns a list with all the references for the artifact with the given global id. + * 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} @@ -4230,9 +4568,9 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base /** * Returns a paginated list of all artifacts with at least one version that matches the posted content. * @summary Search for artifacts by content - * @param {any} body The content to search for. + * @param {File} body The content to search for. * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for matching artifacts. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. Must be used along with the `artifactType` query parameter. - * @param {ArtifactType} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. + * @param {string} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. * @param {number} [offset] The number of artifacts to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {'asc' | 'desc'} [order] Sort order, ascending (`asc`) or descending (`desc`). @@ -4240,7 +4578,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchArtifactsByContent(body: any, canonical?: boolean, artifactType?: ArtifactType, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: any): AxiosPromise { + searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: any): AxiosPromise { return localVarFp.searchArtifactsByContent(body, canonical, artifactType, offset, limit, order, orderby, options).then((request) => request(axios, basePath)); }, /** @@ -4285,9 +4623,9 @@ export class ArtifactsApi extends BaseAPI { /** * 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 Unique ID of an artifact 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 {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 {ArtifactType} [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} [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. @@ -4296,12 +4634,14 @@ export class ArtifactsApi extends BaseAPI { * @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 {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public createArtifact(groupId: string, body: any, xRegistryArtifactType?: ArtifactType, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, options).then((request) => request(this.axios, this.basePath)); + 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', options?: AxiosRequestConfig) { + return ArtifactsApiFp(this.configuration).createArtifact(groupId, body, xRegistryArtifactType, xRegistryArtifactId, xRegistryVersion, ifExists, canonical, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryName, xRegistryNameEncoded, xRegistryContentHash, xRegistryHashAlgorithm, options).then((request) => request(this.axios, this.basePath)); } /** @@ -4319,8 +4659,8 @@ export class ArtifactsApi extends BaseAPI { /** * Deletes all of the artifacts that exist in a given group. - * @summary Deletes all artifacts in a group - * @param {string} groupId Unique ID of an artifact 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 @@ -4383,7 +4723,7 @@ export class ArtifactsApi extends BaseAPI { /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group - * @param {string} groupId Unique ID of an artifact 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`). @@ -4398,7 +4738,7 @@ export class ArtifactsApi extends BaseAPI { /** * 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 Returns a list with all the references for the artifact with the given hash + * @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} @@ -4409,8 +4749,8 @@ export class ArtifactsApi extends BaseAPI { } /** - * Returns a list containing all the artifact references using the artifact contentId. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) - * @summary Returns a list with all the references for the artifact with the given content id. + * 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} @@ -4421,8 +4761,8 @@ export class ArtifactsApi extends BaseAPI { } /** - * 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 Returns a list with all the references for the artifact with the given global id. + * 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} @@ -4457,9 +4797,9 @@ export class ArtifactsApi extends BaseAPI { /** * Returns a paginated list of all artifacts with at least one version that matches the posted content. * @summary Search for artifacts by content - * @param {any} body The content to search for. + * @param {File} body The content to search for. * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for matching artifacts. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. Must be used along with the `artifactType` query parameter. - * @param {ArtifactType} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. + * @param {string} [artifactType] Indicates the type of artifact represented by the content being used for the search. This is only needed when using the `canonical` query parameter, so that the server knows how to canonicalize the content prior to searching for matching artifacts. * @param {number} [offset] The number of artifacts to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {'asc' | 'desc'} [order] Sort order, ascending (`asc`) or descending (`desc`). @@ -4468,7 +4808,7 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public searchArtifactsByContent(body: any, canonical?: boolean, artifactType?: ArtifactType, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: AxiosRequestConfig) { + public searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: 'asc' | 'desc', orderby?: 'name' | 'createdOn', options?: AxiosRequestConfig) { return ArtifactsApiFp(this.configuration).searchArtifactsByContent(body, canonical, artifactType, offset, limit, order, orderby, options).then((request) => request(this.axios, this.basePath)); } @@ -4507,6 +4847,339 @@ export class ArtifactsApi extends BaseAPI { } +/** + * GroupsApi - axios parameter creator + * @export + */ +export const GroupsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a new group. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group already exist (HTTP error `409`) + * @summary Create a new group + * @param {CreateGroupMetaData} createGroupMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createGroup: async (createGroupMetaData: CreateGroupMetaData, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createGroupMetaData' is not null or undefined + assertParamExists('createGroup', 'createGroupMetaData', createGroupMetaData) + const localVarPath = `/groups`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createGroupMetaData, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a group by identifier. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group does not exist (HTTP error `404`) + * @summary Delete a group by the specified ID. + * @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} + */ + deleteGroupById: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('deleteGroupById', 'groupId', groupId) + const localVarPath = `/groups/{groupId}` + .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, + }; + }, + /** + * Returns a group using the specified id. This operation can fail for the following reasons: * No group exists with the specified ID (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get a group by the specified ID. + * @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} + */ + getGroupById: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('getGroupById', 'groupId', groupId) + const localVarPath = `/groups/{groupId}` + .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; + + + + 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 groups. This list is paged. + * @summary List groups + * @param {number} [limit] The number of groups to return. Defaults to 20. + * @param {number} [offset] The number of groups 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} + */ + listGroups: async (limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/groups`; + // 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, + }; + }, + } +}; + +/** + * GroupsApi - functional programming interface + * @export + */ +export const GroupsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GroupsApiAxiosParamCreator(configuration) + return { + /** + * Creates a new group. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group already exist (HTTP error `409`) + * @summary Create a new group + * @param {CreateGroupMetaData} createGroupMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createGroup(createGroupMetaData: CreateGroupMetaData, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGroup(createGroupMetaData, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a group by identifier. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group does not exist (HTTP error `404`) + * @summary Delete a group by the specified ID. + * @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 deleteGroupById(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupById(groupId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a group using the specified id. This operation can fail for the following reasons: * No group exists with the specified ID (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get a group by the specified ID. + * @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 getGroupById(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGroupById(groupId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of all groups. This list is paged. + * @summary List groups + * @param {number} [limit] The number of groups to return. Defaults to 20. + * @param {number} [offset] The number of groups 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 listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroups(limit, offset, order, orderby, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * GroupsApi - factory interface + * @export + */ +export const GroupsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GroupsApiFp(configuration) + return { + /** + * Creates a new group. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group already exist (HTTP error `409`) + * @summary Create a new group + * @param {CreateGroupMetaData} createGroupMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createGroup(createGroupMetaData: CreateGroupMetaData, options?: any): AxiosPromise { + return localVarFp.createGroup(createGroupMetaData, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a group by identifier. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group does not exist (HTTP error `404`) + * @summary Delete a group by the specified ID. + * @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} + */ + deleteGroupById(groupId: string, options?: any): AxiosPromise { + return localVarFp.deleteGroupById(groupId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a group using the specified id. This operation can fail for the following reasons: * No group exists with the specified ID (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get a group by the specified ID. + * @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} + */ + getGroupById(groupId: string, options?: any): AxiosPromise { + return localVarFp.getGroupById(groupId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all groups. This list is paged. + * @summary List groups + * @param {number} [limit] The number of groups to return. Defaults to 20. + * @param {number} [offset] The number of groups 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} + */ + listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: any): AxiosPromise { + return localVarFp.listGroups(limit, offset, order, orderby, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GroupsApi - object-oriented interface + * @export + * @class GroupsApi + * @extends {BaseAPI} + */ +export class GroupsApi extends BaseAPI { + /** + * Creates a new group. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group already exist (HTTP error `409`) + * @summary Create a new group + * @param {CreateGroupMetaData} createGroupMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public createGroup(createGroupMetaData: CreateGroupMetaData, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).createGroup(createGroupMetaData, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a group by identifier. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * The group does not exist (HTTP error `404`) + * @summary Delete a group by the specified ID. + * @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 GroupsApi + */ + public deleteGroupById(groupId: string, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).deleteGroupById(groupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a group using the specified id. This operation can fail for the following reasons: * No group exists with the specified ID (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get a group by the specified ID. + * @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 GroupsApi + */ + public getGroupById(groupId: string, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).getGroupById(groupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all groups. This list is paged. + * @summary List groups + * @param {number} [limit] The number of groups to return. Defaults to 20. + * @param {number} [offset] The number of groups 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 GroupsApi + */ + public listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).listGroups(limit, offset, order, orderby, options).then((request) => request(this.axios, this.basePath)); + } +} + + /** * MetadataApi - axios parameter creator * @export @@ -4584,6 +5257,44 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets the owner of an artifact in the registry. 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 Get artifact owner + * @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} + */ + getArtifactOwner: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('getArtifactOwner', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('getArtifactOwner', 'artifactId', artifactId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/owner` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4728,6 +5439,50 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat options: localVarRequestOptions, }; }, + /** + * Changes the ownership of an artifact. 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 owner + * @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 {ArtifactOwner} artifactOwner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateArtifactOwner: async (groupId: string, artifactId: string, artifactOwner: ArtifactOwner, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('updateArtifactOwner', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('updateArtifactOwner', 'artifactId', artifactId) + // verify required parameter 'artifactOwner' is not null or undefined + assertParamExists('updateArtifactOwner', 'artifactOwner', artifactOwner) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/owner` + .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(artifactOwner, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Updates the user-editable portion of the artifact version\'s metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not. 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 metadata @@ -4811,6 +5566,18 @@ export const MetadataApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactMetaData(groupId, artifactId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Gets the owner of an artifact in the registry. 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 Get artifact owner + * @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 getArtifactOwner(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactOwner(groupId, artifactId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific to the version (for example, this doesn\'t include `modifiedOn`). 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 metadata @@ -4851,6 +5618,19 @@ export const MetadataApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactMetaData(groupId, artifactId, editableMetaData, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Changes the ownership of an artifact. 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 owner + * @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 {ArtifactOwner} artifactOwner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateArtifactOwner(groupId: string, artifactId: string, artifactOwner: ArtifactOwner, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactOwner(groupId, artifactId, artifactOwner, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Updates the user-editable portion of the artifact version\'s metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not. 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 metadata @@ -4898,6 +5678,17 @@ export const MetadataApiFactory = function (configuration?: Configuration, baseP getArtifactMetaData(groupId: string, artifactId: string, options?: any): AxiosPromise { return localVarFp.getArtifactMetaData(groupId, artifactId, options).then((request) => request(axios, basePath)); }, + /** + * Gets the owner of an artifact in the registry. 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 Get artifact owner + * @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} + */ + getArtifactOwner(groupId: string, artifactId: string, options?: any): AxiosPromise { + return localVarFp.getArtifactOwner(groupId, artifactId, options).then((request) => request(axios, basePath)); + }, /** * Retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific to the version (for example, this doesn\'t include `modifiedOn`). 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 metadata @@ -4935,6 +5726,18 @@ export const MetadataApiFactory = function (configuration?: Configuration, baseP updateArtifactMetaData(groupId: string, artifactId: string, editableMetaData: EditableMetaData, options?: any): AxiosPromise { return localVarFp.updateArtifactMetaData(groupId, artifactId, editableMetaData, options).then((request) => request(axios, basePath)); }, + /** + * Changes the ownership of an artifact. 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 owner + * @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 {ArtifactOwner} artifactOwner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateArtifactOwner(groupId: string, artifactId: string, artifactOwner: ArtifactOwner, options?: any): AxiosPromise { + return localVarFp.updateArtifactOwner(groupId, artifactId, artifactOwner, options).then((request) => request(axios, basePath)); + }, /** * Updates the user-editable portion of the artifact version\'s metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not. 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 metadata @@ -4985,6 +5788,19 @@ export class MetadataApi extends BaseAPI { return MetadataApiFp(this.configuration).getArtifactMetaData(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Gets the owner of an artifact in the registry. 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 Get artifact owner + * @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 MetadataApi + */ + public getArtifactOwner(groupId: string, artifactId: string, options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).getArtifactOwner(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific to the version (for example, this doesn\'t include `modifiedOn`). 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 metadata @@ -5028,6 +5844,20 @@ export class MetadataApi extends BaseAPI { return MetadataApiFp(this.configuration).updateArtifactMetaData(groupId, artifactId, editableMetaData, options).then((request) => request(this.axios, this.basePath)); } + /** + * Changes the ownership of an artifact. 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 owner + * @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 {ArtifactOwner} artifactOwner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public updateArtifactOwner(groupId: string, artifactId: string, artifactOwner: ArtifactOwner, options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).updateArtifactOwner(groupId, artifactId, artifactOwner, options).then((request) => request(this.axios, this.basePath)); + } + /** * Updates the user-editable portion of the artifact version\'s metadata. Only some of the metadata fields are editable by the user. For example, `description` is editable, but `createdOn` is not. 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 metadata @@ -5342,23 +6172,23 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (xRegistryVersion !== undefined && xRegistryVersion !== null) { + if (xRegistryVersion != null) { localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); } - if (xRegistryName !== undefined && xRegistryName !== null) { + if (xRegistryName != null) { localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); } - if (xRegistryDescription !== undefined && xRegistryDescription !== null) { + if (xRegistryDescription != null) { localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); } - if (xRegistryDescriptionEncoded !== undefined && xRegistryDescriptionEncoded !== null) { + if (xRegistryDescriptionEncoded != null) { localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); } - if (xRegistryNameEncoded !== undefined && xRegistryNameEncoded !== null) { + if (xRegistryNameEncoded != null) { localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); } @@ -5599,7 +6429,7 @@ export const VersionsApiFp = function(configuration?: Configuration) { * @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> { + 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); }, @@ -5681,7 +6511,7 @@ export const VersionsApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersion(groupId: string, artifactId: string, version: string, dereference?: boolean, options?: any): AxiosPromise { + 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)); }, /** diff --git a/src/base.ts b/src/base.ts index 7d8d12f..326a745 100644 --- a/src/base.ts +++ b/src/base.ts @@ -4,7 +4,7 @@ * 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.2.4-SNAPSHOT + * The version of the OpenAPI document: 2.4.1.Final * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); @@ -64,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/src/common.ts b/src/common.ts index feab643..6aa38e7 100644 --- a/src/common.ts +++ b/src/common.ts @@ -4,7 +4,7 @@ * 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.2.4-SNAPSHOT + * The version of the OpenAPI document: 2.4.1.Final * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * @@ -83,24 +84,35 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + /** * * @export */ export const setSearchParams = function (url: URL, ...objects: any[]) { const searchParams = new URLSearchParams(url.search); - for (const object of objects) { - for (const key in object) { - if (Array.isArray(object[key])) { - searchParams.delete(key); - for (const item of object[key]) { - searchParams.append(key, item); - } - } else { - searchParams.set(key, object[key]); - } - } - } + setFlattenedQueryParams(searchParams, objects); url.search = searchParams.toString(); } diff --git a/src/configuration.ts b/src/configuration.ts index 0cbc6a9..c1a29b4 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -4,7 +4,7 @@ * 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.2.4-SNAPSHOT + * The version of the OpenAPI document: 2.4.1.Final * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/index.ts b/src/index.ts index 026969f..8120de6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ * 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.2.4-SNAPSHOT + * The version of the OpenAPI document: 2.4.1.Final * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).