diff --git a/src/.openapi-generator/VERSION b/src/.openapi-generator/VERSION index 4122521..1985849 100644 --- a/src/.openapi-generator/VERSION +++ b/src/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +7.7.0 diff --git a/src/api.ts b/src/api.ts index 652cbdd..112a9ae 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * Apicurio Registry API [v2] - * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. + * Apicurio Registry API [v3] + * 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/v3` by default. Therefore you must prefix all API operation paths with `/apis/registry/v3` in this case. For example: `/apis/registry/v3/ids/globalIds/{globalId}`. * - * The version of the OpenAPI document: 2.4.x + * The version of the OpenAPI document: 3.0.x * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,33 +14,27 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } 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, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * * @export - * @interface ArtifactContent + * @interface AddVersionToBranch */ -export interface ArtifactContent { +export interface AddVersionToBranch { /** - * Raw content of the artifact or a valid (and accessible) URL where the content can be found. + * * @type {string} - * @memberof ArtifactContent - */ - 'content': string; - /** - * Collection of references to other artifacts. - * @type {Array} - * @memberof ArtifactContent + * @memberof AddVersionToBranch */ - 'references': Array; + 'version': string; } /** * @@ -65,7 +59,7 @@ export interface ArtifactMetaData { * @type {string} * @memberof ArtifactMetaData */ - 'createdBy': string; + 'owner': string; /** * * @type {string} @@ -84,81 +78,30 @@ export interface ArtifactMetaData { * @memberof ArtifactMetaData */ 'modifiedOn': string; - /** - * The ID of a single artifact. - * @type {string} - * @memberof ArtifactMetaData - */ - 'id': string; - /** - * - * @type {string} - * @memberof ArtifactMetaData - */ - 'version': string; /** * * @type {string} * @memberof ArtifactMetaData */ - 'type': string; - /** - * - * @type {number} - * @memberof ArtifactMetaData - */ - 'globalId': number; - /** - * - * @type {ArtifactState} - * @memberof ArtifactMetaData - */ - 'state': ArtifactState; - /** - * - * @type {Array} - * @memberof ArtifactMetaData - */ - 'labels'?: Array; + 'artifactType': string; /** * User-defined name-value pairs. Name and value must be strings. * @type {{ [key: string]: string; }} * @memberof ArtifactMetaData */ - 'properties'?: { [key: string]: string; }; + 'labels'?: { [key: string]: string; }; /** * An ID of a single artifact group. * @type {string} * @memberof ArtifactMetaData */ - 'groupId'?: string; - /** - * - * @type {number} - * @memberof ArtifactMetaData - */ - 'contentId': number; - /** - * - * @type {Array} - * @memberof ArtifactMetaData - */ - 'references'?: Array; -} - - -/** - * Describes the ownership of an artifact. - * @export - * @interface ArtifactOwner - */ -export interface ArtifactOwner { + 'groupId': string; /** - * + * The ID of a single artifact. * @type {string} - * @memberof ArtifactOwner + * @memberof ArtifactMetaData */ - 'owner'?: string; + 'artifactId': string; } /** * A reference to a different artifact. Typically used with artifact types that can have dependencies like Protobuf. @@ -211,18 +154,20 @@ export interface ArtifactSearchResults { 'count': number; } /** - * Describes the state of an artifact or artifact version. The following states are possible: * ENABLED * DISABLED * DEPRECATED + * * @export * @enum {string} */ -export const ArtifactState = { - Enabled: 'ENABLED', - Disabled: 'DISABLED', - Deprecated: 'DEPRECATED' +export const ArtifactSortBy = { + ArtifactId: 'artifactId', + CreatedOn: 'createdOn', + ModifiedOn: 'modifiedOn', + ArtifactType: 'artifactType', + Name: 'name' } as const; -export type ArtifactState = typeof ArtifactState[keyof typeof ArtifactState]; +export type ArtifactSortBy = typeof ArtifactSortBy[keyof typeof ArtifactSortBy]; /** @@ -238,6 +183,86 @@ export interface ArtifactTypeInfo { */ 'name'?: string; } +/** + * + * @export + * @interface BranchMetaData + */ +export interface BranchMetaData { + /** + * An ID of a single artifact group. + * @type {string} + * @memberof BranchMetaData + */ + 'groupId': string; + /** + * The ID of a single artifact. + * @type {string} + * @memberof BranchMetaData + */ + 'artifactId': string; + /** + * The ID of a single artifact branch. + * @type {string} + * @memberof BranchMetaData + */ + 'branchId': string; + /** + * + * @type {string} + * @memberof BranchMetaData + */ + 'createdOn': string; + /** + * + * @type {string} + * @memberof BranchMetaData + */ + 'modifiedBy': string; + /** + * + * @type {string} + * @memberof BranchMetaData + */ + 'modifiedOn': string; + /** + * + * @type {string} + * @memberof BranchMetaData + */ + 'owner': string; + /** + * + * @type {string} + * @memberof BranchMetaData + */ + 'description'?: string; + /** + * + * @type {boolean} + * @memberof BranchMetaData + */ + 'systemDefined': boolean; +} +/** + * Describes the response received when searching for branches. + * @export + * @interface BranchSearchResults + */ +export interface BranchSearchResults { + /** + * The branches returned in the result set. + * @type {Array} + * @memberof BranchSearchResults + */ + 'branches': Array; + /** + * The total number of branches that matched the query that produced the result set (may be more than the number of branches in the result set). + * @type {number} + * @memberof BranchSearchResults + */ + 'count': number; +} /** * * @export @@ -261,7 +286,7 @@ export interface Comment { * @type {string} * @memberof Comment */ - 'createdBy': string; + 'owner': string; /** * * @type {string} @@ -307,195 +332,424 @@ export interface ConfigurationProperty { 'description': string; } /** - * + * Data sent when creating a new artifact. * @export - * @interface CreateGroupMetaData + * @interface CreateArtifact */ -export interface CreateGroupMetaData { +export interface CreateArtifact { + /** + * The ID of a single artifact. + * @type {string} + * @memberof CreateArtifact + */ + 'artifactId': string; + /** + * + * @type {string} + * @memberof CreateArtifact + */ + 'artifactType'?: string; + /** + * + * @type {string} + * @memberof CreateArtifact + */ + 'name'?: string; /** * * @type {string} - * @memberof CreateGroupMetaData + * @memberof CreateArtifact */ 'description'?: string; /** * User-defined name-value pairs. Name and value must be strings. * @type {{ [key: string]: string; }} - * @memberof CreateGroupMetaData + * @memberof CreateArtifact */ - 'properties'?: { [key: string]: string; }; + 'labels'?: { [key: string]: string; }; /** * - * @type {string} - * @memberof CreateGroupMetaData + * @type {CreateVersion} + * @memberof CreateArtifact */ - 'id': string; + 'firstVersion'?: CreateVersion; } /** - * Models a download \"link\". Useful for browser use-cases. + * * @export - * @interface DownloadRef + * @interface CreateArtifactResponse */ -export interface DownloadRef { +export interface CreateArtifactResponse { /** * - * @type {string} - * @memberof DownloadRef + * @type {ArtifactMetaData} + * @memberof CreateArtifactResponse */ - 'downloadId': string; + 'artifact': ArtifactMetaData; /** * - * @type {string} - * @memberof DownloadRef + * @type {VersionMetaData} + * @memberof CreateArtifactResponse */ - 'href'?: string; + 'version'?: VersionMetaData; } /** * * @export - * @interface EditableMetaData + * @interface CreateBranch */ -export interface EditableMetaData { +export interface CreateBranch { /** * * @type {string} - * @memberof EditableMetaData + * @memberof CreateBranch */ - 'name'?: string; + 'description'?: string; /** - * + * The ID of a single artifact branch. * @type {string} - * @memberof EditableMetaData + * @memberof CreateBranch */ - 'description'?: string; + 'branchId': string; /** * * @type {Array} - * @memberof EditableMetaData + * @memberof CreateBranch + */ + 'versions'?: Array; +} +/** + * + * @export + * @interface CreateGroup + */ +export interface CreateGroup { + /** + * + * @type {string} + * @memberof CreateGroup */ - 'labels'?: Array; + 'description'?: string; /** * User-defined name-value pairs. Name and value must be strings. * @type {{ [key: string]: string; }} - * @memberof EditableMetaData + * @memberof CreateGroup */ - 'properties'?: { [key: string]: string; }; + 'labels'?: { [key: string]: string; }; + /** + * An ID of a single artifact group. + * @type {string} + * @memberof CreateGroup + */ + 'groupId': string; } /** * * @export - * @interface GroupMetaData + * @interface CreateRule */ -export interface GroupMetaData { +export interface CreateRule { /** - * An ID of a single artifact group. + * * @type {string} - * @memberof GroupMetaData + * @memberof CreateRule */ - 'id': string; + 'config': string; /** * - * @type {string} - * @memberof GroupMetaData + * @type {RuleType} + * @memberof CreateRule */ - 'description': string; + 'ruleType'?: RuleType; +} + + +/** + * + * @export + * @interface CreateVersion + */ +export interface CreateVersion { /** - * + * A single version of an artifact. Can be provided by the client when creating a new version, or it can be server-generated. The value can be any string unique to the artifact, but it is recommended to use a simple integer or a semver value. * @type {string} - * @memberof GroupMetaData + * @memberof CreateVersion */ - 'createdBy': string; + 'version'?: string; /** * - * @type {string} - * @memberof GroupMetaData + * @type {VersionContent} + * @memberof CreateVersion */ - 'createdOn': string; + 'content': VersionContent; /** * * @type {string} - * @memberof GroupMetaData + * @memberof CreateVersion */ - 'modifiedBy': string; + 'name'?: string; /** * * @type {string} - * @memberof GroupMetaData + * @memberof CreateVersion */ - 'modifiedOn': string; + 'description'?: string; /** * User-defined name-value pairs. Name and value must be strings. * @type {{ [key: string]: string; }} - * @memberof GroupMetaData + * @memberof CreateVersion + */ + 'labels'?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof CreateVersion */ - 'properties': { [key: string]: string; }; + 'branches'?: Array; } /** - * Describes the response received when searching for groups. + * Models a download \"link\". Useful for browser use-cases. * @export - * @interface GroupSearchResults + * @interface DownloadRef */ -export interface GroupSearchResults { +export interface DownloadRef { /** - * The groups returned in the result set. - * @type {Array} - * @memberof GroupSearchResults + * + * @type {string} + * @memberof DownloadRef */ - 'groups': Array; + 'downloadId': string; /** - * 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 + * + * @type {string} + * @memberof DownloadRef */ - 'count': number; + 'href'?: string; } -/** - * How to handle references when retrieving content. References can either be left unchanged (`PRESERVE`), re-written so they are valid in the context of the registry (`REWRITE`), or fully dereferenced such that all externally referenced content is internalized (`DEREFERENCE`). - * @export - * @enum {string} - */ - -export const HandleReferencesType = { - Preserve: 'PRESERVE', - Dereference: 'DEREFERENCE', - Rewrite: 'REWRITE' -} as const; - -export type HandleReferencesType = typeof HandleReferencesType[keyof typeof HandleReferencesType]; - - /** * * @export - * @enum {string} - */ - -export const IfExists = { - Fail: 'FAIL', - Update: 'UPDATE', - Return: 'RETURN', - ReturnOrUpdate: 'RETURN_OR_UPDATE' -} as const; - -export type IfExists = typeof IfExists[keyof typeof IfExists]; - - -/** - * List of limitations on used resources, that are applied on the current instance of Registry. Keys represent the resource type and are suffixed by the corresponding unit. Values are integers. Only non-negative values are allowed, with the exception of -1, which means that the limit is not applied. - * @export - * @interface Limits + * @interface EditableArtifactMetaData */ -export interface Limits { +export interface EditableArtifactMetaData { /** * - * @type {number} - * @memberof Limits + * @type {string} + * @memberof EditableArtifactMetaData */ - 'maxTotalSchemasCount'?: number; + 'name'?: string; /** * - * @type {number} - * @memberof Limits + * @type {string} + * @memberof EditableArtifactMetaData + */ + 'description'?: string; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof EditableArtifactMetaData + */ + 'labels'?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof EditableArtifactMetaData + */ + 'owner'?: string; +} +/** + * + * @export + * @interface EditableBranchMetaData + */ +export interface EditableBranchMetaData { + /** + * + * @type {string} + * @memberof EditableBranchMetaData + */ + 'description'?: string; +} +/** + * + * @export + * @interface EditableGroupMetaData + */ +export interface EditableGroupMetaData { + /** + * + * @type {string} + * @memberof EditableGroupMetaData + */ + 'description'?: string; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof EditableGroupMetaData + */ + 'labels'?: { [key: string]: string; }; +} +/** + * + * @export + * @interface EditableVersionMetaData + */ +export interface EditableVersionMetaData { + /** + * + * @type {string} + * @memberof EditableVersionMetaData + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof EditableVersionMetaData + */ + 'description'?: string; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof EditableVersionMetaData + */ + 'labels'?: { [key: string]: string; }; + /** + * + * @type {VersionState} + * @memberof EditableVersionMetaData + */ + 'state'?: VersionState; +} + + +/** + * + * @export + * @interface GroupMetaData + */ +export interface GroupMetaData { + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'description': string; + /** + * + * @type {string} + * @memberof GroupMetaData + */ + 'owner': 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 + */ + 'labels': { [key: string]: string; }; + /** + * An ID of a single artifact group. + * @type {string} + * @memberof GroupMetaData + */ + 'groupId': 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 + * @enum {string} + */ + +export const GroupSortBy = { + GroupId: 'groupId', + CreatedOn: 'createdOn' +} as const; + +export type GroupSortBy = typeof GroupSortBy[keyof typeof GroupSortBy]; + + +/** + * How to handle references when retrieving content. References can either be left unchanged (`PRESERVE`), re-written so they are valid in the context of the registry (`REWRITE`), or fully dereferenced such that all externally referenced content is internalized (`DEREFERENCE`). + * @export + * @enum {string} + */ + +export const HandleReferencesType = { + Preserve: 'PRESERVE', + Dereference: 'DEREFERENCE', + Rewrite: 'REWRITE' +} as const; + +export type HandleReferencesType = typeof HandleReferencesType[keyof typeof HandleReferencesType]; + + +/** + * + * @export + * @enum {string} + */ + +export const IfArtifactExists = { + Fail: 'FAIL', + CreateVersion: 'CREATE_VERSION', + FindOrCreateVersion: 'FIND_OR_CREATE_VERSION' +} as const; + +export type IfArtifactExists = typeof IfArtifactExists[keyof typeof IfArtifactExists]; + + +/** + * List of limitations on used resources, that are applied on the current instance of Registry. Keys represent the resource type and are suffixed by the corresponding unit. Values are integers. Only non-negative values are allowed, with the exception of -1, which means that the limit is not applied. + * @export + * @interface Limits + */ +export interface Limits { + /** + * + * @type {number} + * @memberof Limits + */ + 'maxTotalSchemasCount'?: number; + /** + * + * @type {number} + * @memberof Limits */ 'maxSchemaSizeBytes'?: number; /** @@ -617,6 +871,19 @@ export const ReferenceType = { export type ReferenceType = typeof ReferenceType[keyof typeof ReferenceType]; +/** + * + * @export + * @interface ReplaceBranchVersions + */ +export interface ReplaceBranchVersions { + /** + * + * @type {Array} + * @memberof ReplaceBranchVersions + */ + 'versions': Array; +} /** * The mapping between a user/principal and their role. * @export @@ -644,6 +911,25 @@ export interface RoleMapping { } +/** + * Describes the response received when searching for artifacts. + * @export + * @interface RoleMappingSearchResults + */ +export interface RoleMappingSearchResults { + /** + * The role mappings returned in the result set. + * @type {Array} + * @memberof RoleMappingSearchResults + */ + 'roleMappings': Array; + /** + * The total number of role mappings that matched the query that produced the result set (may be more than the number of role mappings in the result set). + * @type {number} + * @memberof RoleMappingSearchResults + */ + 'count': number; +} /** * * @export @@ -676,7 +962,7 @@ export interface Rule { * @type {RuleType} * @memberof Rule */ - 'type'?: RuleType; + 'ruleType'?: RuleType; } @@ -757,12 +1043,6 @@ export interface RuleViolationError { * @interface SearchedArtifact */ export interface SearchedArtifact { - /** - * The ID of a single artifact. - * @type {string} - * @memberof SearchedArtifact - */ - 'id': string; /** * * @type {string} @@ -786,184 +1066,230 @@ export interface SearchedArtifact { * @type {string} * @memberof SearchedArtifact */ - 'createdBy': string; + 'owner': string; /** * * @type {string} * @memberof SearchedArtifact */ - 'type': string; - /** - * - * @type {Array} - * @memberof SearchedArtifact - */ - 'labels'?: Array; + 'artifactType': string; /** * - * @type {ArtifactState} + * @type {string} * @memberof SearchedArtifact */ - 'state': ArtifactState; + 'modifiedOn': string; /** * * @type {string} * @memberof SearchedArtifact */ - 'modifiedOn'?: string; + 'modifiedBy': string; /** - * + * An ID of a single artifact group. * @type {string} * @memberof SearchedArtifact */ - 'modifiedBy'?: string; + 'groupId': string; /** - * An ID of a single artifact group. + * The ID of a single artifact. * @type {string} * @memberof SearchedArtifact */ - 'groupId'?: string; + 'artifactId': string; } - - /** - * Models a single group from the result set returned when searching for groups. + * * @export - * @interface SearchedGroup + * @interface SearchedBranch */ -export interface SearchedGroup { +export interface SearchedBranch { /** * An ID of a single artifact group. * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'id': string; + 'groupId': string; /** - * + * The ID of a single artifact. * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'description': string; + 'artifactId': string; /** - * + * The ID of a single artifact branch. * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'createdOn': string; + 'branchId': string; /** * * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'createdBy': string; + 'createdOn': string; /** * * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'modifiedOn': string; + 'owner': string; /** * * @type {string} - * @memberof SearchedGroup + * @memberof SearchedBranch */ - 'modifiedBy': string; -} -/** - * Models a single artifact from the result set returned when searching for artifacts. - * @export - * @interface SearchedVersion - */ -export interface SearchedVersion { + 'modifiedOn': string; /** * * @type {string} - * @memberof SearchedVersion + * @memberof SearchedBranch */ - 'name'?: string; + 'modifiedBy': string; /** * * @type {string} - * @memberof SearchedVersion + * @memberof SearchedBranch */ 'description'?: string; /** * - * @type {string} - * @memberof SearchedVersion + * @type {boolean} + * @memberof SearchedBranch + */ + 'systemDefined': boolean; +} +/** + * Models a single group from the result set returned when searching for groups. + * @export + * @interface SearchedGroup + */ +export interface SearchedGroup { + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'description': string; + /** + * + * @type {string} + * @memberof SearchedGroup */ 'createdOn': string; /** * * @type {string} - * @memberof SearchedVersion + * @memberof SearchedGroup + */ + 'owner': string; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'modifiedOn': string; + /** + * + * @type {string} + * @memberof SearchedGroup + */ + 'modifiedBy': string; + /** + * An ID of a single artifact group. + * @type {string} + * @memberof SearchedGroup */ - 'createdBy': string; + 'groupId': string; +} +/** + * Models a single artifact from the result set returned when searching for artifacts. + * @export + * @interface SearchedVersion + */ +export interface SearchedVersion { /** * * @type {string} * @memberof SearchedVersion */ - 'type': string; + 'name'?: string; /** * - * @type {Array} + * @type {string} * @memberof SearchedVersion */ - 'labels'?: Array; + 'description'?: string; /** * - * @type {ArtifactState} + * @type {string} * @memberof SearchedVersion */ - 'state': ArtifactState; + 'createdOn': string; /** * - * @type {number} + * @type {string} * @memberof SearchedVersion */ - 'globalId': number; + 'owner': string; /** * * @type {string} * @memberof SearchedVersion */ - 'version': string; + 'artifactType': string; /** - * User-defined name-value pairs. Name and value must be strings. - * @type {{ [key: string]: string; }} + * + * @type {VersionState} * @memberof SearchedVersion */ - 'properties'?: { [key: string]: string; }; + 'state': VersionState; /** * * @type {number} * @memberof SearchedVersion */ - 'contentId': number; + 'globalId': number; + /** + * A single version of an artifact. Can be provided by the client when creating a new version, or it can be server-generated. The value can be any string unique to the artifact, but it is recommended to use a simple integer or a semver value. + * @type {string} + * @memberof SearchedVersion + */ + 'version': string; /** * - * @type {Array} + * @type {number} + * @memberof SearchedVersion + */ + 'contentId': number; + /** + * The ID of a single artifact. + * @type {string} + * @memberof SearchedVersion + */ + 'artifactId': string; + /** + * An ID of a single artifact group. + * @type {string} * @memberof SearchedVersion */ - 'references': Array; + 'groupId'?: string; } /** * * @export - * @enum {string} + * @interface SnapshotMetaData */ - -export const SortBy = { - Name: 'name', - CreatedOn: 'createdOn' -} as const; - -export type SortBy = typeof SortBy[keyof typeof SortBy]; - - +export interface SnapshotMetaData { + /** + * + * @type {string} + * @memberof SnapshotMetaData + */ + 'snapshotId': string; +} /** * * @export @@ -1037,21 +1363,6 @@ export interface UpdateRole { } -/** - * - * @export - * @interface UpdateState - */ -export interface UpdateState { - /** - * - * @type {ArtifactState} - * @memberof UpdateState - */ - 'state': ArtifactState; -} - - /** * Information about a single user. * @export @@ -1089,6 +1400,170 @@ export interface UserInfo { */ 'viewer'?: boolean; } +/** + * Defines the user interface configuration data type. + * @export + * @interface UserInterfaceConfig + */ +export interface UserInterfaceConfig { + /** + * + * @type {UserInterfaceConfigUi} + * @memberof UserInterfaceConfig + */ + 'ui'?: UserInterfaceConfigUi; + /** + * + * @type {UserInterfaceConfigAuth} + * @memberof UserInterfaceConfig + */ + 'auth': UserInterfaceConfigAuth; + /** + * + * @type {UserInterfaceConfigFeatures} + * @memberof UserInterfaceConfig + */ + 'features'?: UserInterfaceConfigFeatures; +} +/** + * + * @export + * @interface UserInterfaceConfigAuth + */ +export interface UserInterfaceConfigAuth { + /** + * + * @type {string} + * @memberof UserInterfaceConfigAuth + */ + 'type'?: UserInterfaceConfigAuthTypeEnum; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigAuth + */ + 'rbacEnabled': boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigAuth + */ + 'obacEnabled': boolean; + /** + * User-defined name-value pairs. Name and value must be strings. + * @type {{ [key: string]: string; }} + * @memberof UserInterfaceConfigAuth + */ + 'options'?: { [key: string]: string; }; +} + +export const UserInterfaceConfigAuthTypeEnum = { + None: 'none', + Basic: 'basic', + Oidc: 'oidc' +} as const; + +export type UserInterfaceConfigAuthTypeEnum = typeof UserInterfaceConfigAuthTypeEnum[keyof typeof UserInterfaceConfigAuthTypeEnum]; + +/** + * + * @export + * @interface UserInterfaceConfigFeatures + */ +export interface UserInterfaceConfigFeatures { + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'readOnly'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'breadcrumbs'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'roleManagement'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'settings'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'deleteGroup'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'deleteArtifact'?: boolean; + /** + * + * @type {boolean} + * @memberof UserInterfaceConfigFeatures + */ + 'deleteVersion'?: boolean; +} +/** + * + * @export + * @interface UserInterfaceConfigUi + */ +export interface UserInterfaceConfigUi { + /** + * + * @type {string} + * @memberof UserInterfaceConfigUi + */ + 'contextPath'?: string; + /** + * + * @type {string} + * @memberof UserInterfaceConfigUi + */ + 'navPrefixPath'?: string; + /** + * + * @type {string} + * @memberof UserInterfaceConfigUi + */ + 'oaiDocsUrl'?: string; +} +/** + * + * @export + * @interface VersionContent + */ +export interface VersionContent { + /** + * Raw content of the artifact version or a valid (and accessible) URL where the content can be found. + * @type {string} + * @memberof VersionContent + */ + 'content': string; + /** + * Collection of references to other artifacts. + * @type {Array} + * @memberof VersionContent + */ + 'references'?: Array; + /** + * The content-type, such as `application/json` or `text/xml`. + * @type {string} + * @memberof VersionContent + */ + 'contentType': string; +} /** * * @export @@ -1096,7 +1571,7 @@ export interface UserInfo { */ export interface VersionMetaData { /** - * + * A single version of an artifact. Can be provided by the client when creating a new version, or it can be server-generated. The value can be any string unique to the artifact, but it is recommended to use a simple integer or a semver value. * @type {string} * @memberof VersionMetaData */ @@ -1118,7 +1593,7 @@ export interface VersionMetaData { * @type {string} * @memberof VersionMetaData */ - 'createdBy': string; + 'owner': string; /** * * @type {string} @@ -1130,7 +1605,7 @@ export interface VersionMetaData { * @type {string} * @memberof VersionMetaData */ - 'type': string; + 'artifactType': string; /** * * @type {number} @@ -1139,28 +1614,16 @@ export interface VersionMetaData { 'globalId': number; /** * - * @type {ArtifactState} - * @memberof VersionMetaData - */ - 'state'?: ArtifactState; - /** - * The ID of a single artifact. - * @type {string} - * @memberof VersionMetaData - */ - 'id': string; - /** - * - * @type {Array} + * @type {VersionState} * @memberof VersionMetaData */ - 'labels'?: Array; + 'state'?: VersionState; /** * User-defined name-value pairs. Name and value must be strings. * @type {{ [key: string]: string; }} * @memberof VersionMetaData */ - 'properties'?: { [key: string]: string; }; + 'labels'?: { [key: string]: string; }; /** * An ID of a single artifact group. * @type {string} @@ -1173,6 +1636,12 @@ export interface VersionMetaData { * @memberof VersionMetaData */ 'contentId': number; + /** + * The ID of a single artifact. + * @type {string} + * @memberof VersionMetaData + */ + 'artifactId': string; } @@ -1195,6 +1664,38 @@ export interface VersionSearchResults { */ 'versions': Array; } +/** + * + * @export + * @enum {string} + */ + +export const VersionSortBy = { + Version: 'version', + Name: 'name', + CreatedOn: 'createdOn', + ModifiedOn: 'modifiedOn', + GlobalId: 'globalId' +} as const; + +export type VersionSortBy = typeof VersionSortBy[keyof typeof VersionSortBy]; + + +/** + * Describes the state of an artifact or artifact version. The following states are possible: * ENABLED * DISABLED * DEPRECATED + * @export + * @enum {string} + */ + +export const VersionState = { + Enabled: 'ENABLED', + Disabled: 'DISABLED', + Deprecated: 'DEPRECATED' +} as const; + +export type VersionState = typeof VersionState[keyof typeof VersionState]; + + /** * AdminApi - axios parameter creator @@ -1205,13 +1706,13 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule - * @param {Rule} rule + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createGlobalRule: async (rule: Rule, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'rule' is not null or undefined - assertParamExists('createGlobalRule', 'rule', rule) + createGlobalRule: async (createRule: CreateRule, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createRule' is not null or undefined + assertParamExists('createGlobalRule', 'createRule', createRule) const localVarPath = `/admin/rules`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1231,7 +1732,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rule, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createRule, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -1245,7 +1746,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createRoleMapping: async (roleMapping: RoleMapping, options: AxiosRequestConfig = {}): Promise => { + createRoleMapping: async (roleMapping: RoleMapping, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'roleMapping' is not null or undefined assertParamExists('createRoleMapping', 'roleMapping', roleMapping) const localVarPath = `/admin/roleMappings`; @@ -1280,7 +1781,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAllGlobalRules: async (options: AxiosRequestConfig = {}): Promise => { + deleteAllGlobalRules: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/rules`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1307,15 +1808,15 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteGlobalRule: async (rule: RuleType, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'rule' is not null or undefined - assertParamExists('deleteGlobalRule', 'rule', rule) - const localVarPath = `/admin/rules/{rule}` - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + deleteGlobalRule: async (ruleType: RuleType, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('deleteGlobalRule', 'ruleType', ruleType) + const localVarPath = `/admin/rules/{ruleType}` + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1345,7 +1846,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteRoleMapping: async (principalId: string, options: AxiosRequestConfig = {}): Promise => { + deleteRoleMapping: async (principalId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('deleteRoleMapping', 'principalId', principalId) const localVarPath = `/admin/roleMappings/{principalId}` @@ -1379,7 +1880,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - exportData: async (forBrowser?: boolean, options: AxiosRequestConfig = {}): Promise => { + exportData: async (forBrowser?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/export`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1414,7 +1915,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getConfigProperty: async (propertyName: string, options: AxiosRequestConfig = {}): Promise => { + getConfigProperty: async (propertyName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('getConfigProperty', 'propertyName', propertyName) const localVarPath = `/admin/config/properties/{propertyName}` @@ -1444,15 +1945,15 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGlobalRuleConfig: async (rule: RuleType, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'rule' is not null or undefined - assertParamExists('getGlobalRuleConfig', 'rule', rule) - const localVarPath = `/admin/rules/{rule}` - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + getGlobalRuleConfig: async (ruleType: RuleType, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('getGlobalRuleConfig', 'ruleType', ruleType) + const localVarPath = `/admin/rules/{ruleType}` + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1482,7 +1983,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRoleMapping: async (principalId: string, options: AxiosRequestConfig = {}): Promise => { + getRoleMapping: async (principalId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('getRoleMapping', 'principalId', principalId) const localVarPath = `/admin/roleMappings/{principalId}` @@ -1518,7 +2019,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - importData: async (body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options: AxiosRequestConfig = {}): Promise => { + importData: async (body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('importData', 'body', body) const localVarPath = `/admin/import`; @@ -1565,8 +2066,8 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactTypes: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/admin/artifactTypes`; + listArtifactTypes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/config/artifactTypes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1595,7 +2096,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listConfigProperties: async (options: AxiosRequestConfig = {}): Promise => { + listConfigProperties: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/config/properties`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1625,7 +2126,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listGlobalRules: async (options: AxiosRequestConfig = {}): Promise => { + listGlobalRules: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/rules`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1652,10 +2153,12 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings + * @param {number} [limit] The number of role mappings to return. Defaults to 20. + * @param {number} [offset] The number of role mappings to skip before starting the result set. Defaults to 0. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRoleMappings: async (options: AxiosRequestConfig = {}): Promise => { + listRoleMappings: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/admin/roleMappings`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1668,6 +2171,14 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -1686,7 +2197,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resetConfigProperty: async (propertyName: string, options: AxiosRequestConfig = {}): Promise => { + resetConfigProperty: async (propertyName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('resetConfigProperty', 'propertyName', propertyName) const localVarPath = `/admin/config/properties/{propertyName}` @@ -1704,6 +2215,36 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + triggerSnapshot: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/snapshots`; + // 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; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1721,7 +2262,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateConfigProperty: async (propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options: AxiosRequestConfig = {}): Promise => { + updateConfigProperty: async (propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'propertyName' is not null or undefined assertParamExists('updateConfigProperty', 'propertyName', propertyName) // verify required parameter 'updateConfigurationProperty' is not null or undefined @@ -1756,18 +2297,18 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration - * @param {RuleType} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {RuleType} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateGlobalRuleConfig: async (rule: RuleType, rule2: Rule, options: AxiosRequestConfig = {}): Promise => { + updateGlobalRuleConfig: async (ruleType: RuleType, rule: Rule, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('updateGlobalRuleConfig', 'ruleType', ruleType) // verify required parameter 'rule' is not null or undefined assertParamExists('updateGlobalRuleConfig', 'rule', rule) - // verify required parameter 'rule2' is not null or undefined - assertParamExists('updateGlobalRuleConfig', 'rule2', rule2) - const localVarPath = `/admin/rules/{rule}` - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + const localVarPath = `/admin/rules/{ruleType}` + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -1786,7 +2327,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rule2, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(rule, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -1801,7 +2342,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateRoleMapping: async (principalId: string, updateRole: UpdateRole, options: AxiosRequestConfig = {}): Promise => { + updateRoleMapping: async (principalId: string, updateRole: UpdateRole, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'principalId' is not null or undefined assertParamExists('updateRoleMapping', 'principalId', principalId) // verify required parameter 'updateRole' is not null or undefined @@ -1846,13 +2387,15 @@ export const AdminApiFp = function(configuration?: Configuration) { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule - * @param {Rule} rule + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createGlobalRule(rule: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createGlobalRule(rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async createGlobalRule(createRule: CreateRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGlobalRule(createRule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.createGlobalRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) @@ -1861,9 +2404,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createRoleMapping(roleMapping: RoleMapping, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createRoleMapping(roleMapping: RoleMapping, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRoleMapping(roleMapping, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.createRoleMapping']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes all globally configured rules. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) @@ -1871,20 +2416,24 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteAllGlobalRules(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteAllGlobalRules(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllGlobalRules(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.deleteAllGlobalRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteGlobalRule(rule: RuleType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGlobalRule(rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async deleteGlobalRule(ruleType: RuleType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGlobalRule(ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.deleteGlobalRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -1893,9 +2442,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteRoleMapping(principalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteRoleMapping(principalId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoleMapping(principalId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.deleteRoleMapping']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Exports registry data as a ZIP archive. @@ -1904,9 +2455,11 @@ 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?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.exportData(forBrowser, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.exportData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) @@ -1915,20 +2468,24 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getConfigProperty(propertyName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getConfigProperty(propertyName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigProperty(propertyName, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.getConfigProperty']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getGlobalRuleConfig(rule: RuleType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGlobalRuleConfig(rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getGlobalRuleConfig(ruleType: RuleType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGlobalRuleConfig(ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.getGlobalRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) @@ -1937,9 +2494,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRoleMapping(principalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getRoleMapping(principalId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleMapping(principalId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.getRoleMapping']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Imports registry data that was previously exported using the `/admin/export` operation. @@ -1950,9 +2509,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.importData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) @@ -1960,9 +2521,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listArtifactTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async listArtifactTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactTypes(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.listArtifactTypes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) @@ -1970,9 +2533,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listConfigProperties(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async listConfigProperties(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listConfigProperties(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.listConfigProperties']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a list of all the currently configured global rules (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) @@ -1980,19 +2545,25 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listGlobalRules(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async listGlobalRules(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listGlobalRules(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.listGlobalRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings + * @param {number} [limit] The number of role mappings to return. Defaults to 20. + * @param {number} [offset] The number of role mappings to skip before starting the result set. Defaults to 0. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listRoleMappings(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listRoleMappings(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async listRoleMappings(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRoleMappings(limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.listRoleMappings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2001,9 +2572,23 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async resetConfigProperty(propertyName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async resetConfigProperty(propertyName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.resetConfigProperty(propertyName, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.resetConfigProperty']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async triggerSnapshot(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSnapshot(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.triggerSnapshot']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2013,21 +2598,25 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateConfigProperty(propertyName, updateConfigurationProperty, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.updateConfigProperty']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration - * @param {RuleType} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {RuleType} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateGlobalRuleConfig(rule, rule2, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async updateGlobalRuleConfig(ruleType: RuleType, rule: Rule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGlobalRuleConfig(ruleType, rule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.updateGlobalRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2037,9 +2626,11 @@ export const AdminApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateRoleMapping(principalId, updateRole, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.updateRoleMapping']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -2054,12 +2645,12 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule - * @param {Rule} rule + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createGlobalRule(rule: Rule, options?: any): AxiosPromise { - return localVarFp.createGlobalRule(rule, options).then((request) => request(axios, basePath)); + createGlobalRule(createRule: CreateRule, options?: any): AxiosPromise { + return localVarFp.createGlobalRule(createRule, options).then((request) => request(axios, basePath)); }, /** * Creates a new mapping between a user/principal and a role. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) @@ -2083,12 +2674,12 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteGlobalRule(rule: RuleType, options?: any): AxiosPromise { - return localVarFp.deleteGlobalRule(rule, options).then((request) => request(axios, basePath)); + deleteGlobalRule(ruleType: RuleType, options?: any): AxiosPromise { + return localVarFp.deleteGlobalRule(ruleType, options).then((request) => request(axios, basePath)); }, /** * Deletes a single role mapping, effectively denying access to a user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2123,12 +2714,12 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGlobalRuleConfig(rule: RuleType, options?: any): AxiosPromise { - return localVarFp.getGlobalRuleConfig(rule, options).then((request) => request(axios, basePath)); + getGlobalRuleConfig(ruleType: RuleType, options?: any): AxiosPromise { + return localVarFp.getGlobalRuleConfig(ruleType, 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`) @@ -2182,11 +2773,13 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings + * @param {number} [limit] The number of role mappings to return. Defaults to 20. + * @param {number} [offset] The number of role mappings to skip before starting the result set. Defaults to 0. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRoleMappings(options?: any): AxiosPromise> { - return localVarFp.listRoleMappings(options).then((request) => request(axios, basePath)); + listRoleMappings(limit?: number, offset?: number, options?: any): AxiosPromise { + return localVarFp.listRoleMappings(limit, offset, options).then((request) => request(axios, basePath)); }, /** * Resets the value of a single configuration property. This will return the property to its default value (see external documentation for supported properties and their default values). This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2198,6 +2791,15 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath resetConfigProperty(propertyName: string, options?: any): AxiosPromise { return localVarFp.resetConfigProperty(propertyName, options).then((request) => request(axios, basePath)); }, + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + triggerSnapshot(options?: any): AxiosPromise { + return localVarFp.triggerSnapshot(options).then((request) => request(axios, basePath)); + }, /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property @@ -2212,13 +2814,13 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration - * @param {RuleType} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {RuleType} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: any): AxiosPromise { - return localVarFp.updateGlobalRuleConfig(rule, rule2, options).then((request) => request(axios, basePath)); + updateGlobalRuleConfig(ruleType: RuleType, rule: Rule, options?: any): AxiosPromise { + return localVarFp.updateGlobalRuleConfig(ruleType, rule, options).then((request) => request(axios, basePath)); }, /** * Updates a single role mapping for one user/principal. This operation can fail for the following reasons: * No role mapping for the principalId exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -2244,13 +2846,13 @@ export class AdminApi extends BaseAPI { /** * Adds a rule to the list of globally configured rules. This operation can fail for the following reasons: * The rule type is unknown (HTTP error `400`) * The rule already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create global rule - * @param {Rule} rule + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public createGlobalRule(rule: Rule, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).createGlobalRule(rule, options).then((request) => request(this.axios, this.basePath)); + public createGlobalRule(createRule: CreateRule, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).createGlobalRule(createRule, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2261,7 +2863,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public createRoleMapping(roleMapping: RoleMapping, options?: AxiosRequestConfig) { + public createRoleMapping(roleMapping: RoleMapping, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).createRoleMapping(roleMapping, options).then((request) => request(this.axios, this.basePath)); } @@ -2272,20 +2874,20 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public deleteAllGlobalRules(options?: AxiosRequestConfig) { + public deleteAllGlobalRules(options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).deleteAllGlobalRules(options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single global rule. If this is the only rule configured, this is the same as deleting **all** rules. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * Rule cannot be deleted (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Delete global rule - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public deleteGlobalRule(rule: RuleType, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteGlobalRule(rule, options).then((request) => request(this.axios, this.basePath)); + public deleteGlobalRule(ruleType: RuleType, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).deleteGlobalRule(ruleType, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2296,7 +2898,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public deleteRoleMapping(principalId: string, options?: AxiosRequestConfig) { + public deleteRoleMapping(principalId: string, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).deleteRoleMapping(principalId, options).then((request) => request(this.axios, this.basePath)); } @@ -2308,7 +2910,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public exportData(forBrowser?: boolean, options?: AxiosRequestConfig) { + public exportData(forBrowser?: boolean, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).exportData(forBrowser, options).then((request) => request(this.axios, this.basePath)); } @@ -2320,20 +2922,20 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public getConfigProperty(propertyName: string, options?: AxiosRequestConfig) { + public getConfigProperty(propertyName: string, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).getConfigProperty(propertyName, options).then((request) => request(this.axios, this.basePath)); } /** * Returns information about the named globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get global rule configuration - * @param {RuleType} rule The unique name/type of a rule. + * @param {RuleType} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public getGlobalRuleConfig(rule: RuleType, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getGlobalRuleConfig(rule, options).then((request) => request(this.axios, this.basePath)); + public getGlobalRuleConfig(ruleType: RuleType, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).getGlobalRuleConfig(ruleType, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2344,7 +2946,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public getRoleMapping(principalId: string, options?: AxiosRequestConfig) { + public getRoleMapping(principalId: string, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).getRoleMapping(principalId, options).then((request) => request(this.axios, this.basePath)); } @@ -2358,7 +2960,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: AxiosRequestConfig) { + public importData(body: File, xRegistryPreserveGlobalId?: boolean, xRegistryPreserveContentId?: boolean, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).importData(body, xRegistryPreserveGlobalId, xRegistryPreserveContentId, options).then((request) => request(this.axios, this.basePath)); } @@ -2369,7 +2971,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public listArtifactTypes(options?: AxiosRequestConfig) { + public listArtifactTypes(options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).listArtifactTypes(options).then((request) => request(this.axios, this.basePath)); } @@ -2380,7 +2982,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public listConfigProperties(options?: AxiosRequestConfig) { + public listConfigProperties(options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).listConfigProperties(options).then((request) => request(this.axios, this.basePath)); } @@ -2391,19 +2993,21 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public listGlobalRules(options?: AxiosRequestConfig) { + public listGlobalRules(options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).listGlobalRules(options).then((request) => request(this.axios, this.basePath)); } /** * Gets a list of all role mappings configured in the registry (if any). This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary List all role mappings + * @param {number} [limit] The number of role mappings to return. Defaults to 20. + * @param {number} [offset] The number of role mappings to skip before starting the result set. Defaults to 0. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public listRoleMappings(options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).listRoleMappings(options).then((request) => request(this.axios, this.basePath)); + public listRoleMappings(limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).listRoleMappings(limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2414,10 +3018,21 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public resetConfigProperty(propertyName: string, options?: AxiosRequestConfig) { + public resetConfigProperty(propertyName: string, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).resetConfigProperty(propertyName, options).then((request) => request(this.axios, this.basePath)); } + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public triggerSnapshot(options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).triggerSnapshot(options).then((request) => request(this.axios, this.basePath)); + } + /** * Updates the value of a single configuration property. This operation may fail for one of the following reasons: * Property not found or not configured (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update a configuration property @@ -2427,21 +3042,21 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: AxiosRequestConfig) { + public updateConfigProperty(propertyName: string, updateConfigurationProperty: UpdateConfigurationProperty, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).updateConfigProperty(propertyName, updateConfigurationProperty, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the configuration for a globally configured rule. This operation can fail for the following reasons: * Invalid rule name/type (HTTP error `400`) * No rule with name/type `rule` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update global rule configuration - * @param {RuleType} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {RuleType} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ - public updateGlobalRuleConfig(rule: RuleType, rule2: Rule, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).updateGlobalRuleConfig(rule, rule2, options).then((request) => request(this.axios, this.basePath)); + public updateGlobalRuleConfig(ruleType: RuleType, rule: Rule, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).updateGlobalRuleConfig(ruleType, rule, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2453,7 +3068,7 @@ export class AdminApi extends BaseAPI { * @throws {RequiredError} * @memberof AdminApi */ - public updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: AxiosRequestConfig) { + public updateRoleMapping(principalId: string, updateRole: UpdateRole, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).updateRoleMapping(principalId, updateRole, options).then((request) => request(this.axios, this.basePath)); } } @@ -2467,21 +3082,21 @@ export class AdminApi extends BaseAPI { export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) + * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {Rule} rule + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifactRule: async (groupId: string, artifactId: string, rule: Rule, options: AxiosRequestConfig = {}): Promise => { + createArtifactRule: async (groupId: string, artifactId: string, createRule: CreateRule, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('createArtifactRule', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('createArtifactRule', 'artifactId', artifactId) - // verify required parameter 'rule' is not null or undefined - assertParamExists('createArtifactRule', 'rule', rule) + // verify required parameter 'createRule' is not null or undefined + assertParamExists('createArtifactRule', 'createRule', createRule) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); @@ -2503,7 +3118,7 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rule, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createRule, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2513,23 +3128,23 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {DeleteArtifactRuleRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {DeleteArtifactRuleRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactRule: async (groupId: string, artifactId: string, rule: DeleteArtifactRuleRuleEnum, options: AxiosRequestConfig = {}): Promise => { + deleteArtifactRule: async (groupId: string, artifactId: string, ruleType: DeleteArtifactRuleRuleTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactRule', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactRule', 'artifactId', artifactId) - // verify required parameter 'rule' is not null or undefined - assertParamExists('deleteArtifactRule', 'rule', rule) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('deleteArtifactRule', 'ruleType', ruleType) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{ruleType}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2555,12 +3170,12 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactRules: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { + deleteArtifactRules: async (groupId: string, artifactId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactRules', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined @@ -2593,23 +3208,23 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {GetArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {GetArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactRuleConfig: async (groupId: string, artifactId: string, rule: GetArtifactRuleConfigRuleEnum, options: AxiosRequestConfig = {}): Promise => { + getArtifactRuleConfig: async (groupId: string, artifactId: string, ruleType: GetArtifactRuleConfigRuleTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getArtifactRuleConfig', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getArtifactRuleConfig', 'artifactId', artifactId) - // verify required parameter 'rule' is not null or undefined - assertParamExists('getArtifactRuleConfig', 'rule', rule) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('getArtifactRuleConfig', 'ruleType', ruleType) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{ruleType}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2633,14 +3248,14 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactRules: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { + listArtifactRules: async (groupId: string, artifactId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactRules', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined @@ -2670,73 +3285,29 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi options: localVarRequestOptions, }; }, - /** - * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). - * @summary Test update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testUpdateArtifact: async (groupId: string, artifactId: string, body: File, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('testUpdateArtifact', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('testUpdateArtifact', 'artifactId', artifactId) - // verify required parameter 'body' is not null or undefined - assertParamExists('testUpdateArtifact', 'body', body) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/test` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {UpdateArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactRuleConfig: async (groupId: string, artifactId: string, rule: UpdateArtifactRuleConfigRuleEnum, rule2: Rule, options: AxiosRequestConfig = {}): Promise => { + updateArtifactRuleConfig: async (groupId: string, artifactId: string, ruleType: UpdateArtifactRuleConfigRuleTypeEnum, rule: Rule, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'artifactId', artifactId) + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('updateArtifactRuleConfig', 'ruleType', ruleType) // verify required parameter 'rule' is not null or undefined assertParamExists('updateArtifactRuleConfig', 'rule', rule) - // verify required parameter 'rule2' is not null or undefined - assertParamExists('updateArtifactRuleConfig', 'rule2', rule2) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{rule}` + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/rules/{ruleType}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"rule"}}`, encodeURIComponent(String(rule))); + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2755,7 +3326,7 @@ export const ArtifactRulesApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rule2, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(rule, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2773,94 +3344,93 @@ export const ArtifactRulesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ArtifactRulesApiAxiosParamCreator(configuration) return { /** - * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) + * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {Rule} rule + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactRule(groupId, artifactId, rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async createArtifactRule(groupId: string, artifactId: string, createRule: CreateRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactRule(groupId, artifactId, createRule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.createArtifactRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {DeleteArtifactRuleRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {DeleteArtifactRuleRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteArtifactRule(groupId: string, artifactId: string, rule: DeleteArtifactRuleRuleEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactRule(groupId, artifactId, rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async deleteArtifactRule(groupId: string, artifactId: string, ruleType: DeleteArtifactRuleRuleTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactRule(groupId, artifactId, ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.deleteArtifactRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteArtifactRules(groupId: string, artifactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactRules(groupId, artifactId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.deleteArtifactRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {GetArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {GetArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactRuleConfig(groupId: string, artifactId: string, rule: GetArtifactRuleConfigRuleEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactRuleConfig(groupId, artifactId, rule, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getArtifactRuleConfig(groupId: string, artifactId: string, ruleType: GetArtifactRuleConfigRuleTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactRuleConfig(groupId, artifactId, ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.getArtifactRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async listArtifactRules(groupId: string, artifactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactRules(groupId, artifactId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). - * @summary Test update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async testUpdateArtifact(groupId: string, artifactId: string, body: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.testUpdateArtifact(groupId, artifactId, body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.listArtifactRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {UpdateArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateArtifactRuleConfig(groupId: string, artifactId: string, rule: UpdateArtifactRuleConfigRuleEnum, rule2: Rule, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async updateArtifactRuleConfig(groupId: string, artifactId: string, ruleType: UpdateArtifactRuleConfigRuleTypeEnum, rule: Rule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactRuleConfig(groupId, artifactId, ruleType, rule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactRulesApi.updateArtifactRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -2873,34 +3443,34 @@ export const ArtifactRulesApiFactory = function (configuration?: Configuration, const localVarFp = ArtifactRulesApiFp(configuration) return { /** - * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) + * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {Rule} rule + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: any): AxiosPromise { - return localVarFp.createArtifactRule(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); + createArtifactRule(groupId: string, artifactId: string, createRule: CreateRule, options?: any): AxiosPromise { + return localVarFp.createArtifactRule(groupId, artifactId, createRule, options).then((request) => request(axios, basePath)); }, /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {DeleteArtifactRuleRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {DeleteArtifactRuleRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactRule(groupId: string, artifactId: string, rule: DeleteArtifactRuleRuleEnum, options?: any): AxiosPromise { - return localVarFp.deleteArtifactRule(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); + deleteArtifactRule(groupId: string, artifactId: string, ruleType: DeleteArtifactRuleRuleTypeEnum, options?: any): AxiosPromise { + return localVarFp.deleteArtifactRule(groupId, artifactId, ruleType, options).then((request) => request(axios, basePath)); }, /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -2910,50 +3480,38 @@ export const ArtifactRulesApiFactory = function (configuration?: Configuration, /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {GetArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {GetArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactRuleConfig(groupId: string, artifactId: string, rule: GetArtifactRuleConfigRuleEnum, options?: any): AxiosPromise { - return localVarFp.getArtifactRuleConfig(groupId, artifactId, rule, options).then((request) => request(axios, basePath)); + getArtifactRuleConfig(groupId: string, artifactId: string, ruleType: GetArtifactRuleConfigRuleTypeEnum, options?: any): AxiosPromise { + return localVarFp.getArtifactRuleConfig(groupId, artifactId, ruleType, options).then((request) => request(axios, basePath)); }, /** - * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listArtifactRules(groupId: string, artifactId: string, options?: any): AxiosPromise> { return localVarFp.listArtifactRules(groupId, artifactId, options).then((request) => request(axios, basePath)); }, - /** - * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). - * @summary Test update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testUpdateArtifact(groupId: string, artifactId: string, body: File, options?: any): AxiosPromise { - return localVarFp.testUpdateArtifact(groupId, artifactId, body, options).then((request) => request(axios, basePath)); - }, /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {UpdateArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactRuleConfig(groupId: string, artifactId: string, rule: UpdateArtifactRuleConfigRuleEnum, rule2: Rule, options?: any): AxiosPromise { - return localVarFp.updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options).then((request) => request(axios, basePath)); + updateArtifactRuleConfig(groupId: string, artifactId: string, ruleType: UpdateArtifactRuleConfigRuleTypeEnum, rule: Rule, options?: any): AxiosPromise { + return localVarFp.updateArtifactRuleConfig(groupId, artifactId, ruleType, rule, options).then((request) => request(axios, basePath)); }, }; }; @@ -2966,130 +3524,116 @@ export const ArtifactRulesApiFactory = function (configuration?: Configuration, */ export class ArtifactRulesApi extends BaseAPI { /** - * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * A server error occurred (HTTP error `500`) + * Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {Rule} rule + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public createArtifactRule(groupId: string, artifactId: string, rule: Rule, options?: AxiosRequestConfig) { - return ArtifactRulesApiFp(this.configuration).createArtifactRule(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); + public createArtifactRule(groupId: string, artifactId: string, createRule: CreateRule, options?: RawAxiosRequestConfig) { + return ArtifactRulesApiFp(this.configuration).createArtifactRule(groupId, artifactId, createRule, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting **all** rules, and the globally configured rules now apply to this artifact. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rule - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {DeleteArtifactRuleRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {DeleteArtifactRuleRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public deleteArtifactRule(groupId: string, artifactId: string, rule: DeleteArtifactRuleRuleEnum, options?: AxiosRequestConfig) { - return ArtifactRulesApiFp(this.configuration).deleteArtifactRule(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); + public deleteArtifactRule(groupId: string, artifactId: string, ruleType: DeleteArtifactRuleRuleTypeEnum, options?: RawAxiosRequestConfig) { + return ArtifactRulesApiFp(this.configuration).deleteArtifactRule(groupId, artifactId, ruleType, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public deleteArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig) { + public deleteArtifactRules(groupId: string, artifactId: string, options?: RawAxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).deleteArtifactRules(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Get artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {GetArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {GetArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public getArtifactRuleConfig(groupId: string, artifactId: string, rule: GetArtifactRuleConfigRuleEnum, options?: AxiosRequestConfig) { - return ArtifactRulesApiFp(this.configuration).getArtifactRuleConfig(groupId, artifactId, rule, options).then((request) => request(this.axios, this.basePath)); + public getArtifactRuleConfig(groupId: string, artifactId: string, ruleType: GetArtifactRuleConfigRuleTypeEnum, options?: RawAxiosRequestConfig) { + return ArtifactRulesApiFp(this.configuration).getArtifactRuleConfig(groupId, artifactId, ruleType, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, then the rules configured for the group is used. If no rules are configured at the group level, then the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact rules - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public listArtifactRules(groupId: string, artifactId: string, options?: AxiosRequestConfig) { + public listArtifactRules(groupId: string, artifactId: string, options?: RawAxiosRequestConfig) { return ArtifactRulesApiFp(this.configuration).listArtifactRules(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } - /** - * Tests whether an update to the artifact\'s content *would* succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * The provided artifact type is not recognized (HTTP error `404`) * A server error occurred (HTTP error `500`) When successful, this operation simply returns a *No Content* response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled). - * @summary Test update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact being tested. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactRulesApi - */ - public testUpdateArtifact(groupId: string, artifactId: string, body: File, options?: AxiosRequestConfig) { - return ArtifactRulesApiFp(this.configuration).testUpdateArtifact(groupId, artifactId, body, options).then((request) => request(this.axios, this.basePath)); - } - /** * Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Update artifact rule configuration - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateArtifactRuleConfigRuleEnum} rule The unique name/type of a rule. - * @param {Rule} rule2 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {UpdateArtifactRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactRulesApi */ - public updateArtifactRuleConfig(groupId: string, artifactId: string, rule: UpdateArtifactRuleConfigRuleEnum, rule2: Rule, options?: AxiosRequestConfig) { - return ArtifactRulesApiFp(this.configuration).updateArtifactRuleConfig(groupId, artifactId, rule, rule2, options).then((request) => request(this.axios, this.basePath)); + public updateArtifactRuleConfig(groupId: string, artifactId: string, ruleType: UpdateArtifactRuleConfigRuleTypeEnum, rule: Rule, options?: RawAxiosRequestConfig) { + return ArtifactRulesApiFp(this.configuration).updateArtifactRuleConfig(groupId, artifactId, ruleType, rule, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const DeleteArtifactRuleRuleEnum = { +export const DeleteArtifactRuleRuleTypeEnum = { Validity: 'VALIDITY', Compatibility: 'COMPATIBILITY', Integrity: 'INTEGRITY' } as const; -export type DeleteArtifactRuleRuleEnum = typeof DeleteArtifactRuleRuleEnum[keyof typeof DeleteArtifactRuleRuleEnum]; +export type DeleteArtifactRuleRuleTypeEnum = typeof DeleteArtifactRuleRuleTypeEnum[keyof typeof DeleteArtifactRuleRuleTypeEnum]; /** * @export */ -export const GetArtifactRuleConfigRuleEnum = { +export const GetArtifactRuleConfigRuleTypeEnum = { Validity: 'VALIDITY', Compatibility: 'COMPATIBILITY', Integrity: 'INTEGRITY' } as const; -export type GetArtifactRuleConfigRuleEnum = typeof GetArtifactRuleConfigRuleEnum[keyof typeof GetArtifactRuleConfigRuleEnum]; +export type GetArtifactRuleConfigRuleTypeEnum = typeof GetArtifactRuleConfigRuleTypeEnum[keyof typeof GetArtifactRuleConfigRuleTypeEnum]; /** * @export */ -export const UpdateArtifactRuleConfigRuleEnum = { +export const UpdateArtifactRuleConfigRuleTypeEnum = { Validity: 'VALIDITY', Compatibility: 'COMPATIBILITY', Integrity: 'INTEGRITY' } as const; -export type UpdateArtifactRuleConfigRuleEnum = typeof UpdateArtifactRuleConfigRuleEnum[keyof typeof UpdateArtifactRuleConfigRuleEnum]; +export type UpdateArtifactRuleConfigRuleTypeEnum = typeof UpdateArtifactRuleConfigRuleTypeEnum[keyof typeof UpdateArtifactRuleConfigRuleTypeEnum]; /** @@ -3104,8 +3648,8 @@ export const ArtifactTypeApiAxiosParamCreator = function (configuration?: Config * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactTypes: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/admin/artifactTypes`; + listArtifactTypes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/config/artifactTypes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3144,9 +3688,11 @@ export const ArtifactTypeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listArtifactTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async listArtifactTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactTypes(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactTypeApi.listArtifactTypes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -3184,7 +3730,7 @@ export class ArtifactTypeApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactTypeApi */ - public listArtifactTypes(options?: AxiosRequestConfig) { + public listArtifactTypes(options?: RawAxiosRequestConfig) { return ArtifactTypeApiFp(this.configuration).listArtifactTypes(options).then((request) => request(this.axios, this.basePath)); } } @@ -3198,29 +3744,21 @@ export class ArtifactTypeApi extends BaseAPI { 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`) + * Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version. If the artifact type is not provided, 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`) An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server will generate a unique ID for the artifact. It is typically recommended that callers provide the ID, because it is typically a meaningful identifier, and as such 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`) Note that if the `dryRun` query parameter is set to `true`, then this operation will not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if an artifact is valid or if a new version passes configured compatibility checks. * @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 {File} 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateArtifact} createArtifact The artifact being created. + * @param {IfArtifactExists} [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 {CreateArtifactXRegistryHashAlgorithmEnum} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifact: async (groupId: string, body: File, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: CreateArtifactXRegistryHashAlgorithmEnum, options: AxiosRequestConfig = {}): Promise => { + createArtifact: async (groupId: string, createArtifact: CreateArtifact, ifExists?: IfArtifactExists, canonical?: boolean, dryRun?: boolean, options: RawAxiosRequestConfig = {}): 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) + // verify required parameter 'createArtifact' is not null or undefined + assertParamExists('createArtifact', 'createArtifact', createArtifact) const localVarPath = `/groups/{groupId}/artifacts` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -3242,50 +3780,18 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura 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); + if (dryRun !== undefined) { + localVarQueryParameter['dryRun'] = dryRun; } - localVarHeaderParameter['Content-Type'] = 'application/create.extended+json'; + localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createArtifact, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3295,12 +3801,12 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura /** * 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifact: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { + deleteArtifact: async (groupId: string, artifactId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifact', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined @@ -3333,11 +3839,11 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactsInGroup: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { + deleteArtifactsInGroup: async (groupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactsInGroup', 'groupId', groupId) const localVarPath = `/groups/{groupId}/artifacts` @@ -3372,7 +3878,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentByGlobalId: async (globalId: number, references?: HandleReferencesType, options: AxiosRequestConfig = {}): Promise => { + getContentByGlobalId: async (globalId: number, references?: HandleReferencesType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'globalId' is not null or undefined assertParamExists('getContentByGlobalId', 'globalId', globalId) const localVarPath = `/ids/globalIds/{globalId}` @@ -3410,10 +3916,10 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentByHash: async (contentHash: string, options: AxiosRequestConfig = {}): Promise => { + getContentByHash: async (contentHash: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'contentHash' is not null or undefined assertParamExists('getContentByHash', 'contentHash', contentHash) - const localVarPath = `/ids/contentHashes/{contentHash}/` + const localVarPath = `/ids/contentHashes/{contentHash}` .replace(`{${"contentHash"}}`, encodeURIComponent(String(contentHash))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3444,10 +3950,10 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContentById: async (contentId: number, options: AxiosRequestConfig = {}): Promise => { + getContentById: async (contentId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'contentId' is not null or undefined assertParamExists('getContentById', 'contentId', contentId) - const localVarPath = `/ids/contentIds/{contentId}/` + const localVarPath = `/ids/contentIds/{contentId}` .replace(`{${"contentId"}}`, encodeURIComponent(String(contentId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3462,49 +3968,6 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get latest artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLatestArtifact: async (groupId: string, artifactId: string, references?: HandleReferencesType, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('getLatestArtifact', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getLatestArtifact', 'artifactId', artifactId) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (references !== undefined) { - localVarQueryParameter['references'] = references; - } - - - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3517,15 +3980,15 @@ 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 The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactsInGroup: async (groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options: AxiosRequestConfig = {}): Promise => { + listArtifactsInGroup: async (groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: ArtifactSortBy, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactsInGroup', 'groupId', groupId) const localVarPath = `/groups/{groupId}/artifacts` @@ -3575,7 +4038,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - referencesByContentHash: async (contentHash: string, options: AxiosRequestConfig = {}): Promise => { + referencesByContentHash: async (contentHash: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'contentHash' is not null or undefined assertParamExists('referencesByContentHash', 'contentHash', contentHash) const localVarPath = `/ids/contentHashes/{contentHash}/references` @@ -3609,7 +4072,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - referencesByContentId: async (contentId: number, options: AxiosRequestConfig = {}): Promise => { + referencesByContentId: async (contentId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'contentId' is not null or undefined assertParamExists('referencesByContentId', 'contentId', contentId) const localVarPath = `/ids/contentIds/{contentId}/references` @@ -3644,7 +4107,7 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - referencesByGlobalId: async (globalId: number, refType?: ReferenceType, options: AxiosRequestConfig = {}): Promise => { + referencesByGlobalId: async (globalId: number, refType?: ReferenceType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'globalId' is not null or undefined assertParamExists('referencesByGlobalId', 'globalId', globalId) const localVarPath = `/ids/globalIds/{globalId}/references` @@ -3676,23 +4139,23 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Returns a paginated list of all artifacts that match the provided filter criteria. + * Returns a paginated list of all artifacts that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Search for artifacts * @param {string} [name] Filter by artifact name. * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {Array} [labels] Filter by label. Include one or more label to only return artifacts containing all of the specified labels. - * @param {Array} [properties] Filter by one or more name/value property. Separate each name/value pair using a colon. For example `properties=foo:bar` will return only artifacts with a custom property named `foo` and value `bar`. + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. * @param {string} [description] Filter by description. - * @param {string} [group] Filter by artifact group. + * @param {string} [groupId] Filter by artifact group. * @param {number} [globalId] Filter by globalId. * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchArtifacts: async (name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: SortBy, labels?: Array, properties?: Array, description?: string, group?: string, globalId?: number, contentId?: number, options: AxiosRequestConfig = {}): Promise => { + searchArtifacts: async (name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/search/artifacts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3729,16 +4192,12 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['labels'] = labels; } - if (properties) { - localVarQueryParameter['properties'] = properties; - } - if (description !== undefined) { localVarQueryParameter['description'] = description; } - if (group !== undefined) { - localVarQueryParameter['group'] = group; + if (groupId !== undefined) { + localVarQueryParameter['groupId'] = groupId; } if (globalId !== undefined) { @@ -3749,6 +4208,10 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['contentId'] = contentId; } + if (artifactId !== undefined) { + localVarQueryParameter['artifactId'] = artifactId; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3761,19 +4224,20 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura }; }, /** - * Returns a paginated list of all artifacts with at least one version that matches the posted content. + * Returns a paginated list of all artifacts with at least one version that matches the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Search for artifacts by content * @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 {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 {string} [groupId] Filter by artifact group. * @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 {SearchArtifactsByContentOrderEnum} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SearchArtifactsByContentOrderbyEnum} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchArtifactsByContent: async (body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SearchArtifactsByContentOrderEnum, orderby?: SearchArtifactsByContentOrderbyEnum, options: AxiosRequestConfig = {}): Promise => { + searchArtifactsByContent: async (body: File, canonical?: boolean, artifactType?: string, groupId?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('searchArtifactsByContent', 'body', body) const localVarPath = `/search/artifacts`; @@ -3796,6 +4260,10 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura localVarQueryParameter['artifactType'] = artifactType; } + if (groupId !== undefined) { + localVarQueryParameter['groupId'] = groupId; + } + if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } @@ -3826,174 +4294,59 @@ export const ArtifactsApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, + } +}; + +/** + * ArtifactsApi - functional programming interface + * @export + */ +export const ArtifactsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ArtifactsApiAxiosParamCreator(configuration) + return { /** - * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. - * @summary Update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The new content of the artifact being updated. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. + * Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version. If the artifact type is not provided, 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`) An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server will generate a unique ID for the artifact. It is typically recommended that callers provide the ID, because it is typically a meaningful identifier, and as such 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`) Note that if the `dryRun` query parameter is set to `true`, then this operation will not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if an artifact is valid or if a new version passes configured compatibility checks. + * @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. Must follow the \".{1,512}\" pattern. + * @param {CreateArtifact} createArtifact The artifact being created. + * @param {IfArtifactExists} [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 {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifact: async (groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifact', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('updateArtifact', 'artifactId', artifactId) - // verify required parameter 'body' is not null or undefined - assertParamExists('updateArtifact', 'body', body) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (xRegistryVersion != null) { - localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); - } - - if (xRegistryName != null) { - localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); - } - - if (xRegistryNameEncoded != null) { - localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); - } - - if (xRegistryDescription != null) { - localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); - } - - if (xRegistryDescriptionEncoded != null) { - localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); - } - - - - 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, - }; + async createArtifact(groupId: string, createArtifact: CreateArtifact, ifExists?: IfArtifactExists, canonical?: boolean, dryRun?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifact(groupId, createArtifact, ifExists, canonical, dryRun, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.createArtifact']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateState} updateState + * 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. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactState: async (groupId: string, artifactId: string, updateState: UpdateState, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifactState', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('updateArtifactState', 'artifactId', artifactId) - // verify required parameter 'updateState' is not null or undefined - assertParamExists('updateArtifactState', 'updateState', updateState) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/state` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateState, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ArtifactsApi - functional programming interface - * @export - */ -export const ArtifactsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ArtifactsApiAxiosParamCreator(configuration) - return { - /** - * Creates a new artifact by posting the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) - * @summary Create artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {File} 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 {CreateArtifactXRegistryHashAlgorithmEnum} [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: File, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: CreateArtifactXRegistryHashAlgorithmEnum, 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); - }, - /** - * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Delete artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteArtifact(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteArtifact(groupId: string, artifactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifact(groupId, artifactId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.deleteArtifact']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteArtifactsInGroup(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteArtifactsInGroup(groupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactsInGroup(groupId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.deleteArtifactsInGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the content for an artifact version in the registry using its globally unique identifier. This operation may fail for one of the following reasons: * No artifact version with this `globalId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -4003,9 +4356,11 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getContentByGlobalId(globalId: number, references?: HandleReferencesType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getContentByGlobalId(globalId: number, references?: HandleReferencesType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentByGlobalId(globalId, references, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.getContentByGlobalId']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the content for an artifact version in the registry using the SHA-256 hash of the content. This content hash may be shared by multiple artifact versions in the case where the artifact versions have identical content. This operation may fail for one of the following reasons: * No content with this `contentHash` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -4014,9 +4369,11 @@ 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?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentByHash(contentHash, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.getContentByHash']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Gets the content for an artifact version in the registry using the unique content identifier for that content. This content ID may be shared by multiple artifact versions in the case where the artifact versions are identical. This operation may fail for one of the following reasons: * No content with this `contentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) @@ -4025,37 +4382,28 @@ 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?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getContentById(contentId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get latest artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLatestArtifact(groupId: string, artifactId: string, references?: HandleReferencesType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLatestArtifact(groupId, artifactId, references, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.getContentById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactsInGroup(groupId, limit, offset, order, orderby, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.listArtifactsInGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list containing all the artifact references using the artifact content hash. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) @@ -4064,9 +4412,11 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async referencesByContentHash(contentHash: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async referencesByContentHash(contentHash: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByContentHash(contentHash, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.referencesByContentHash']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list containing all the artifact references using the artifact content ID. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) @@ -4075,9 +4425,11 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async referencesByContentId(contentId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async referencesByContentId(contentId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByContentId(contentId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.referencesByContentId']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) @@ -4087,78 +4439,54 @@ export const ArtifactsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async referencesByGlobalId(globalId: number, refType?: ReferenceType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async referencesByGlobalId(globalId: number, refType?: ReferenceType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.referencesByGlobalId(globalId, refType, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.referencesByGlobalId']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a paginated list of all artifacts that match the provided filter criteria. + * Returns a paginated list of all artifacts that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Search for artifacts * @param {string} [name] Filter by artifact name. * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {Array} [labels] Filter by label. Include one or more label to only return artifacts containing all of the specified labels. - * @param {Array} [properties] Filter by one or more name/value property. Separate each name/value pair using a colon. For example `properties=foo:bar` will return only artifacts with a custom property named `foo` and value `bar`. + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. * @param {string} [description] Filter by description. - * @param {string} [group] Filter by artifact group. + * @param {string} [groupId] Filter by artifact group. * @param {number} [globalId] Filter by globalId. * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: SortBy, labels?: Array, properties?: Array, description?: string, group?: string, globalId?: number, contentId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchArtifacts(name, offset, limit, order, orderby, labels, properties, description, group, globalId, contentId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchArtifacts(name, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.searchArtifacts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a paginated list of all artifacts with at least one version that matches the posted content. + * Returns a paginated list of all artifacts with at least one version that matches the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Search for artifacts by content * @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 {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 {string} [groupId] Filter by artifact group. * @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 {SearchArtifactsByContentOrderEnum} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SearchArtifactsByContentOrderbyEnum} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SearchArtifactsByContentOrderEnum, orderby?: SearchArtifactsByContentOrderbyEnum, 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); - }, - /** - * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. - * @summary Update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The new content of the artifact being updated. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateArtifact(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateState} updateState + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactState(groupId, artifactId, updateState, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, groupId?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchArtifactsByContent(body, canonical, artifactType, groupId, offset, limit, order, orderby, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ArtifactsApi.searchArtifactsByContent']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -4171,32 +4499,24 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base const localVarFp = ArtifactsApiFp(configuration) return { /** - * Creates a new artifact by posting the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The registry attempts to figure out what kind of artifact is being added from the following supported list: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request\'s `Content-Type`. For example: ``` Content-Type: application/json; artifactType=AVRO ``` An artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the `X-Registry-ArtifactId` request header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the `ifExists` query parameter to alter this default behavior. The `ifExists` query parameter can have one of the following values: * `FAIL` (*default*) - server rejects the content with a 409 error * `UPDATE` - server updates the existing artifact and returns the new metadata * `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is created This operation may fail for one of the following reasons: * An invalid `ArtifactType` was indicated (HTTP error `400`) * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) * Provided content (request body) was empty (HTTP error `400`) * An artifact with the provided ID already exists (HTTP error `409`) * The content violates one of the configured global rules (HTTP error `409`) * A server error occurred (HTTP error `500`) + * Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version. If the artifact type is not provided, 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`) An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server will generate a unique ID for the artifact. It is typically recommended that callers provide the ID, because it is typically a meaningful identifier, and as such 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`) Note that if the `dryRun` query parameter is set to `true`, then this operation will not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if an artifact is valid or if a new version passes configured compatibility checks. * @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 {File} 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateArtifact} createArtifact The artifact being created. + * @param {IfArtifactExists} [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 {CreateArtifactXRegistryHashAlgorithmEnum} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifact(groupId: string, body: File, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: CreateArtifactXRegistryHashAlgorithmEnum, 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)); + createArtifact(groupId: string, createArtifact: CreateArtifact, ifExists?: IfArtifactExists, canonical?: boolean, dryRun?: boolean, options?: any): AxiosPromise { + return localVarFp.createArtifact(groupId, createArtifact, ifExists, canonical, dryRun, options).then((request) => request(axios, basePath)); }, /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -4206,7 +4526,7 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -4244,30 +4564,18 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base getContentById(contentId: number, options?: any): AxiosPromise { return localVarFp.getContentById(contentId, options).then((request) => request(axios, basePath)); }, - /** - * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get latest artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLatestArtifact(groupId: string, artifactId: string, references?: HandleReferencesType, options?: any): AxiosPromise { - return localVarFp.getLatestArtifact(groupId, artifactId, references, options).then((request) => request(axios, basePath)); - }, /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: any): AxiosPromise { + listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: any): AxiosPromise { return localVarFp.listArtifactsInGroup(groupId, limit, offset, order, orderby, options).then((request) => request(axios, basePath)); }, /** @@ -4302,69 +4610,41 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base return localVarFp.referencesByGlobalId(globalId, refType, options).then((request) => request(axios, basePath)); }, /** - * Returns a paginated list of all artifacts that match the provided filter criteria. + * Returns a paginated list of all artifacts that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Search for artifacts * @param {string} [name] Filter by artifact name. * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {Array} [labels] Filter by label. Include one or more label to only return artifacts containing all of the specified labels. - * @param {Array} [properties] Filter by one or more name/value property. Separate each name/value pair using a colon. For example `properties=foo:bar` will return only artifacts with a custom property named `foo` and value `bar`. + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. * @param {string} [description] Filter by description. - * @param {string} [group] Filter by artifact group. + * @param {string} [groupId] Filter by artifact group. * @param {number} [globalId] Filter by globalId. * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: SortBy, labels?: Array, properties?: Array, description?: string, group?: string, globalId?: number, contentId?: number, options?: any): AxiosPromise { - return localVarFp.searchArtifacts(name, offset, limit, order, orderby, labels, properties, description, group, globalId, contentId, options).then((request) => request(axios, basePath)); + searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, options?: any): AxiosPromise { + return localVarFp.searchArtifacts(name, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, options).then((request) => request(axios, basePath)); }, /** - * Returns a paginated list of all artifacts with at least one version that matches the posted content. + * Returns a paginated list of all artifacts with at least one version that matches the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Search for artifacts by content * @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 {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 {string} [groupId] Filter by artifact group. * @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 {SearchArtifactsByContentOrderEnum} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SearchArtifactsByContentOrderbyEnum} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SearchArtifactsByContentOrderEnum, orderby?: SearchArtifactsByContentOrderbyEnum, options?: any): AxiosPromise { - return localVarFp.searchArtifactsByContent(body, canonical, artifactType, offset, limit, order, orderby, options).then((request) => request(axios, basePath)); - }, - /** - * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. - * @summary Update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The new content of the artifact being updated. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateArtifact(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, options?: any): AxiosPromise { - return localVarFp.updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, options).then((request) => request(axios, basePath)); - }, - /** - * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateState} updateState + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: any): AxiosPromise { - return localVarFp.updateArtifactState(groupId, artifactId, updateState, options).then((request) => request(axios, basePath)); + searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, groupId?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: any): AxiosPromise { + return localVarFp.searchArtifactsByContent(body, canonical, artifactType, groupId, offset, limit, order, orderby, options).then((request) => request(axios, basePath)); }, }; }; @@ -4377,51 +4657,43 @@ export const ArtifactsApiFactory = function (configuration?: Configuration, base */ 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`) + * Creates a new artifact. The body of the request should be a `CreateArtifact` object, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version. If the artifact type is not provided, 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`) An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server will generate a unique ID for the artifact. It is typically recommended that callers provide the ID, because it is typically a meaningful identifier, and as such 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`) Note that if the `dryRun` query parameter is set to `true`, then this operation will not actually make any changes. Instead it will succeed or fail based on whether it **would have worked**. Use this option to, for example, check if an artifact is valid or if a new version passes configured compatibility checks. * @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 {File} 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateArtifact} createArtifact The artifact being created. + * @param {IfArtifactExists} [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 {CreateArtifactXRegistryHashAlgorithmEnum} [xRegistryHashAlgorithm] The algorithm to use when checking the content validity. (available: SHA256, MD5; default: SHA256) + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public createArtifact(groupId: string, body: File, xRegistryArtifactType?: string, xRegistryArtifactId?: string, xRegistryVersion?: string, ifExists?: IfExists, canonical?: boolean, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryContentHash?: string, xRegistryHashAlgorithm?: CreateArtifactXRegistryHashAlgorithmEnum, 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)); + public createArtifact(groupId: string, createArtifact: CreateArtifact, ifExists?: IfArtifactExists, canonical?: boolean, dryRun?: boolean, options?: RawAxiosRequestConfig) { + return ArtifactsApiFp(this.configuration).createArtifact(groupId, createArtifact, ifExists, canonical, dryRun, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public deleteArtifact(groupId: string, artifactId: string, options?: AxiosRequestConfig) { + public deleteArtifact(groupId: string, artifactId: string, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).deleteArtifact(groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes all of the artifacts that exist in a given group. * @summary Delete artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public deleteArtifactsInGroup(groupId: string, options?: AxiosRequestConfig) { + public deleteArtifactsInGroup(groupId: string, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).deleteArtifactsInGroup(groupId, options).then((request) => request(this.axios, this.basePath)); } @@ -4434,7 +4706,7 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public getContentByGlobalId(globalId: number, references?: HandleReferencesType, options?: AxiosRequestConfig) { + public getContentByGlobalId(globalId: number, references?: HandleReferencesType, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentByGlobalId(globalId, references, options).then((request) => request(this.axios, this.basePath)); } @@ -4446,7 +4718,7 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public getContentByHash(contentHash: string, options?: AxiosRequestConfig) { + public getContentByHash(contentHash: string, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentByHash(contentHash, options).then((request) => request(this.axios, this.basePath)); } @@ -4458,37 +4730,23 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public getContentById(contentId: number, options?: AxiosRequestConfig) { + public getContentById(contentId: number, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).getContentById(contentId, options).then((request) => request(this.axios, this.basePath)); } - /** - * Returns the latest version of the artifact in its raw form. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. This operation may fail for one of the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get latest artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactsApi - */ - public getLatestArtifact(groupId: string, artifactId: string, references?: HandleReferencesType, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).getLatestArtifact(groupId, artifactId, references, options).then((request) => request(this.axios, this.basePath)); - } - /** * Returns a list of all artifacts in the group. This list is paged. * @summary List artifacts in group - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {number} [limit] The number of artifacts to return. Defaults to 20. * @param {number} [offset] The number of artifacts to skip before starting the result set. Defaults to 0. * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: SortBy, options?: AxiosRequestConfig) { + public listArtifactsInGroup(groupId: string, limit?: number, offset?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).listArtifactsInGroup(groupId, limit, offset, order, orderby, options).then((request) => request(this.axios, this.basePath)); } @@ -4500,7 +4758,7 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public referencesByContentHash(contentHash: string, options?: AxiosRequestConfig) { + public referencesByContentHash(contentHash: string, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByContentHash(contentHash, options).then((request) => request(this.axios, this.basePath)); } @@ -4512,7 +4770,7 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public referencesByContentId(contentId: number, options?: AxiosRequestConfig) { + public referencesByContentId(contentId: number, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByContentId(contentId, options).then((request) => request(this.axios, this.basePath)); } @@ -4525,108 +4783,1328 @@ export class ArtifactsApi extends BaseAPI { * @throws {RequiredError} * @memberof ArtifactsApi */ - public referencesByGlobalId(globalId: number, refType?: ReferenceType, options?: AxiosRequestConfig) { + public referencesByGlobalId(globalId: number, refType?: ReferenceType, options?: RawAxiosRequestConfig) { return ArtifactsApiFp(this.configuration).referencesByGlobalId(globalId, refType, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a paginated list of all artifacts that match the provided filter criteria. + * Returns a paginated list of all artifacts that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) * @summary Search for artifacts * @param {string} [name] Filter by artifact name. * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` - * @param {Array} [labels] Filter by label. Include one or more label to only return artifacts containing all of the specified labels. - * @param {Array} [properties] Filter by one or more name/value property. Separate each name/value pair using a colon. For example `properties=foo:bar` will return only artifacts with a custom property named `foo` and value `bar`. + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. * @param {string} [description] Filter by description. - * @param {string} [group] Filter by artifact group. + * @param {string} [groupId] Filter by artifact group. * @param {number} [globalId] Filter by globalId. * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtifactsApi */ - public searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: SortBy, labels?: Array, properties?: Array, description?: string, group?: string, globalId?: number, contentId?: number, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).searchArtifacts(name, offset, limit, order, orderby, labels, properties, description, group, globalId, contentId, options).then((request) => request(this.axios, this.basePath)); + public searchArtifacts(name?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, options?: RawAxiosRequestConfig) { + return ArtifactsApiFp(this.configuration).searchArtifacts(name, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a paginated list of all artifacts with at least one version that matches the posted content. + * Returns a paginated list of all artifacts with at least one version that matches the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) * @summary Search for artifacts by content * @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 {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 {string} [groupId] Filter by artifact group. * @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 {SearchArtifactsByContentOrderEnum} [order] Sort order, ascending (`asc`) or descending (`desc`). - * @param {SearchArtifactsByContentOrderbyEnum} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {ArtifactSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactsApi + */ + public searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, groupId?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: ArtifactSortBy, options?: RawAxiosRequestConfig) { + return ArtifactsApiFp(this.configuration).searchArtifactsByContent(body, canonical, artifactType, groupId, offset, limit, order, orderby, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * BranchesApi - axios parameter creator + * @export + */ +export const BranchesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Add a new version to a branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {AddVersionToBranch} addVersionToBranch The version to add to the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addVersionToBranch: async (groupId: string, artifactId: string, branchId: string, addVersionToBranch: AddVersionToBranch, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('addVersionToBranch', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('addVersionToBranch', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('addVersionToBranch', 'branchId', branchId) + // verify required parameter 'addVersionToBranch' is not null or undefined + assertParamExists('addVersionToBranch', 'addVersionToBranch', addVersionToBranch) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // 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(addVersionToBranch, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a new branch for the artifact. A new branch consists of metadata and a list of versions. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A branch with the given `branchId` already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create a new branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateBranch} createBranch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBranch: async (groupId: string, artifactId: string, createBranch: CreateBranch, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('createBranch', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('createBranch', 'artifactId', artifactId) + // verify required parameter 'createBranch' is not null or undefined + assertParamExists('createBranch', 'createBranch', createBranch) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createBranch, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a single branch in the artifact. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBranch: async (groupId: string, artifactId: string, branchId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('deleteBranch', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('deleteBranch', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('deleteBranch', 'branchId', branchId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // 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 the metaData of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBranchMetaData: async (groupId: string, artifactId: string, branchId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('getBranchMetaData', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('getBranchMetaData', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('getBranchMetaData', 'branchId', branchId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // 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, + }; + }, + /** + * Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBranchVersions: async (groupId: string, artifactId: string, branchId: string, offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('listBranchVersions', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('listBranchVersions', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('listBranchVersions', 'branchId', branchId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all branches in the artifact. Each branch is a list of version identifiers, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List branches + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {number} [offset] The number of branches to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of branches to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBranches: async (groupId: string, artifactId: string, offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('listBranches', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('listBranches', 'artifactId', artifactId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Replace list of versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {ReplaceBranchVersions} replaceBranchVersions A new list of versions that should be on the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + replaceBranchVersions: async (groupId: string, artifactId: string, branchId: string, replaceBranchVersions: ReplaceBranchVersions, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('replaceBranchVersions', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('replaceBranchVersions', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('replaceBranchVersions', 'branchId', branchId) + // verify required parameter 'replaceBranchVersions' is not null or undefined + assertParamExists('replaceBranchVersions', 'replaceBranchVersions', replaceBranchVersions) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // 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(replaceBranchVersions, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates the metadata of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableBranchMetaData} editableBranchMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateBranchMetaData: async (groupId: string, artifactId: string, branchId: string, editableBranchMetaData: EditableBranchMetaData, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('updateBranchMetaData', 'groupId', groupId) + // verify required parameter 'artifactId' is not null or undefined + assertParamExists('updateBranchMetaData', 'artifactId', artifactId) + // verify required parameter 'branchId' is not null or undefined + assertParamExists('updateBranchMetaData', 'branchId', branchId) + // verify required parameter 'editableBranchMetaData' is not null or undefined + assertParamExists('updateBranchMetaData', 'editableBranchMetaData', editableBranchMetaData) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/branches/{branchId}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"branchId"}}`, encodeURIComponent(String(branchId))); + // 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(editableBranchMetaData, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BranchesApi - functional programming interface + * @export + */ +export const BranchesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BranchesApiAxiosParamCreator(configuration) + return { + /** + * Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Add a new version to a branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {AddVersionToBranch} addVersionToBranch The version to add to the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addVersionToBranch(groupId: string, artifactId: string, branchId: string, addVersionToBranch: AddVersionToBranch, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addVersionToBranch(groupId, artifactId, branchId, addVersionToBranch, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.addVersionToBranch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Creates a new branch for the artifact. A new branch consists of metadata and a list of versions. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A branch with the given `branchId` already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create a new branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateBranch} createBranch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBranch(groupId: string, artifactId: string, createBranch: CreateBranch, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBranch(groupId, artifactId, createBranch, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.createBranch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a single branch in the artifact. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteBranch(groupId: string, artifactId: string, branchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBranch(groupId, artifactId, branchId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.deleteBranch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the metaData of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBranchMetaData(groupId: string, artifactId: string, branchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBranchMetaData(groupId, artifactId, branchId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.getBranchMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listBranchVersions(groupId: string, artifactId: string, branchId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBranchVersions(groupId, artifactId, branchId, offset, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.listBranchVersions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of all branches in the artifact. Each branch is a list of version identifiers, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List branches + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {number} [offset] The number of branches to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of branches to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listBranches(groupId: string, artifactId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBranches(groupId, artifactId, offset, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.listBranches']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Replace list of versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {ReplaceBranchVersions} replaceBranchVersions A new list of versions that should be on the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async replaceBranchVersions(groupId: string, artifactId: string, branchId: string, replaceBranchVersions: ReplaceBranchVersions, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.replaceBranchVersions(groupId, artifactId, branchId, replaceBranchVersions, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.replaceBranchVersions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates the metadata of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableBranchMetaData} editableBranchMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateBranchMetaData(groupId: string, artifactId: string, branchId: string, editableBranchMetaData: EditableBranchMetaData, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateBranchMetaData(groupId, artifactId, branchId, editableBranchMetaData, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BranchesApi.updateBranchMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * BranchesApi - factory interface + * @export + */ +export const BranchesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BranchesApiFp(configuration) + return { + /** + * Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Add a new version to a branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {AddVersionToBranch} addVersionToBranch The version to add to the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addVersionToBranch(groupId: string, artifactId: string, branchId: string, addVersionToBranch: AddVersionToBranch, options?: any): AxiosPromise { + return localVarFp.addVersionToBranch(groupId, artifactId, branchId, addVersionToBranch, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a new branch for the artifact. A new branch consists of metadata and a list of versions. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A branch with the given `branchId` already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create a new branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateBranch} createBranch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBranch(groupId: string, artifactId: string, createBranch: CreateBranch, options?: any): AxiosPromise { + return localVarFp.createBranch(groupId, artifactId, createBranch, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a single branch in the artifact. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBranch(groupId: string, artifactId: string, branchId: string, options?: any): AxiosPromise { + return localVarFp.deleteBranch(groupId, artifactId, branchId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the metaData of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBranchMetaData(groupId: string, artifactId: string, branchId: string, options?: any): AxiosPromise { + return localVarFp.getBranchMetaData(groupId, artifactId, branchId, options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBranchVersions(groupId: string, artifactId: string, branchId: string, offset?: number, limit?: number, options?: any): AxiosPromise { + return localVarFp.listBranchVersions(groupId, artifactId, branchId, offset, limit, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all branches in the artifact. Each branch is a list of version identifiers, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List branches + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {number} [offset] The number of branches to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of branches to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBranches(groupId: string, artifactId: string, offset?: number, limit?: number, options?: any): AxiosPromise { + return localVarFp.listBranches(groupId, artifactId, offset, limit, options).then((request) => request(axios, basePath)); + }, + /** + * Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Replace list of versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {ReplaceBranchVersions} replaceBranchVersions A new list of versions that should be on the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + replaceBranchVersions(groupId: string, artifactId: string, branchId: string, replaceBranchVersions: ReplaceBranchVersions, options?: any): AxiosPromise { + return localVarFp.replaceBranchVersions(groupId, artifactId, branchId, replaceBranchVersions, options).then((request) => request(axios, basePath)); + }, + /** + * Updates the metadata of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableBranchMetaData} editableBranchMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateBranchMetaData(groupId: string, artifactId: string, branchId: string, editableBranchMetaData: EditableBranchMetaData, options?: any): AxiosPromise { + return localVarFp.updateBranchMetaData(groupId, artifactId, branchId, editableBranchMetaData, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BranchesApi - object-oriented interface + * @export + * @class BranchesApi + * @extends {BaseAPI} + */ +export class BranchesApi extends BaseAPI { + /** + * Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * Branch already contains the given version. Artifact branches are append-only, cycles and history rewrites, except by replacing the entire branch using the replaceBranchVersions operation, are not supported. (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Add a new version to a branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {AddVersionToBranch} addVersionToBranch The version to add to the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public addVersionToBranch(groupId: string, artifactId: string, branchId: string, addVersionToBranch: AddVersionToBranch, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).addVersionToBranch(groupId, artifactId, branchId, addVersionToBranch, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates a new branch for the artifact. A new branch consists of metadata and a list of versions. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A branch with the given `branchId` already exists (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create a new branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateBranch} createBranch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public createBranch(groupId: string, artifactId: string, createBranch: CreateBranch, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).createBranch(groupId, artifactId, createBranch, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a single branch in the artifact. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete branch. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public deleteBranch(groupId: string, artifactId: string, branchId: string, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).deleteBranch(groupId, artifactId, branchId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the metaData of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public getBranchMetaData(groupId: string, artifactId: string, branchId: string, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).getBranchMetaData(groupId, artifactId, branchId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public listBranchVersions(groupId: string, artifactId: string, branchId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).listBranchVersions(groupId, artifactId, branchId, offset, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all branches in the artifact. Each branch is a list of version identifiers, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List branches + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {number} [offset] The number of branches to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of branches to return. Defaults to 20. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public listBranches(groupId: string, artifactId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).listBranches(groupId, artifactId, offset, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Replace list of versions in branch + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {ReplaceBranchVersions} replaceBranchVersions A new list of versions that should be on the branch. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public replaceBranchVersions(groupId: string, artifactId: string, branchId: string, replaceBranchVersions: ReplaceBranchVersions, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).replaceBranchVersions(groupId, artifactId, branchId, replaceBranchVersions, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the metadata of a branch. This operation can fail for the following reasons: * No artifact with this `groupId` and `artifactId` exists (HTTP error `404`) * No branch with this `branchId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update branch metaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} branchId Artifact branch ID. Must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableBranchMetaData} editableBranchMetaData + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BranchesApi + */ + public updateBranchMetaData(groupId: string, artifactId: string, branchId: string, editableBranchMetaData: EditableBranchMetaData, options?: RawAxiosRequestConfig) { + return BranchesApiFp(this.configuration).updateBranchMetaData(groupId, artifactId, branchId, editableBranchMetaData, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * GroupRulesApi - axios parameter creator + * @export + */ +export const GroupRulesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a rule to the list of rules that get applied to an artifact in the group when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createGroupRule: async (groupId: string, createRule: CreateRule, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('createGroupRule', 'groupId', groupId) + // verify required parameter 'createRule' is not null or undefined + assertParamExists('createGroupRule', 'createRule', createRule) + const localVarPath = `/groups/{groupId}/rules` + .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; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createRule, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a rule from the group. This results in the rule no longer applying for this group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply to this group. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this group (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Delete group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {DeleteGroupRuleRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupRule: async (groupId: string, ruleType: DeleteGroupRuleRuleTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('deleteGroupRule', 'groupId', groupId) + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('deleteGroupRule', 'ruleType', ruleType) + const localVarPath = `/groups/{groupId}/rules/{ruleType}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes all of the rules configured for the group. After this is done, the global rules apply to artifacts in the group again. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupRules: async (groupId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('deleteGroupRules', 'groupId', groupId) + const localVarPath = `/groups/{groupId}/rules` + .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 information about a single rule configured for a group. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Get group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {GetGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupRuleConfig: async (groupId: string, ruleType: GetGroupRuleConfigRuleTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('getGroupRuleConfig', 'groupId', groupId) + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('getGroupRuleConfig', 'ruleType', ruleType) + const localVarPath = `/groups/{groupId}/rules/{ruleType}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all rules configured for the group. The set of rules determines how the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGroupRules: async (groupId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('listGroupRules', 'groupId', groupId) + const localVarPath = `/groups/{groupId}/rules` + .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, + }; + }, + /** + * Updates the configuration of a single rule for the group. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Update group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {UpdateGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupRuleConfig: async (groupId: string, ruleType: UpdateGroupRuleConfigRuleTypeEnum, rule: Rule, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('updateGroupRuleConfig', 'groupId', groupId) + // verify required parameter 'ruleType' is not null or undefined + assertParamExists('updateGroupRuleConfig', 'ruleType', ruleType) + // verify required parameter 'rule' is not null or undefined + assertParamExists('updateGroupRuleConfig', 'rule', rule) + const localVarPath = `/groups/{groupId}/rules/{ruleType}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"ruleType"}}`, encodeURIComponent(String(ruleType))); + // 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(rule, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GroupRulesApi - functional programming interface + * @export + */ +export const GroupRulesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GroupRulesApiAxiosParamCreator(configuration) + return { + /** + * Adds a rule to the list of rules that get applied to an artifact in the group when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createGroupRule(groupId: string, createRule: CreateRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGroupRule(groupId, createRule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.createGroupRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a rule from the group. This results in the rule no longer applying for this group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply to this group. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this group (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Delete group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {DeleteGroupRuleRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteGroupRule(groupId: string, ruleType: DeleteGroupRuleRuleTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupRule(groupId, ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.deleteGroupRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes all of the rules configured for the group. After this is done, the global rules apply to artifacts in the group again. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteGroupRules(groupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupRules(groupId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.deleteGroupRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns information about a single rule configured for a group. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Get group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {GetGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getGroupRuleConfig(groupId: string, ruleType: GetGroupRuleConfigRuleTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGroupRuleConfig(groupId, ruleType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.getGroupRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of all rules configured for the group. The set of rules determines how the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listGroupRules(groupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listGroupRules(groupId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.listGroupRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates the configuration of a single rule for the group. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Update group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {UpdateGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateGroupRuleConfig(groupId: string, ruleType: UpdateGroupRuleConfigRuleTypeEnum, rule: Rule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGroupRuleConfig(groupId, ruleType, rule, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupRulesApi.updateGroupRuleConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * GroupRulesApi - factory interface + * @export + */ +export const GroupRulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GroupRulesApiFp(configuration) + return { + /** + * Adds a rule to the list of rules that get applied to an artifact in the group when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createGroupRule(groupId: string, createRule: CreateRule, options?: any): AxiosPromise { + return localVarFp.createGroupRule(groupId, createRule, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a rule from the group. This results in the rule no longer applying for this group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply to this group. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this group (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Delete group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {DeleteGroupRuleRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupRule(groupId: string, ruleType: DeleteGroupRuleRuleTypeEnum, options?: any): AxiosPromise { + return localVarFp.deleteGroupRule(groupId, ruleType, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes all of the rules configured for the group. After this is done, the global rules apply to artifacts in the group again. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupRules(groupId: string, options?: any): AxiosPromise { + return localVarFp.deleteGroupRules(groupId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns information about a single rule configured for a group. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Get group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {GetGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupRuleConfig(groupId: string, ruleType: GetGroupRuleConfigRuleTypeEnum, options?: any): AxiosPromise { + return localVarFp.getGroupRuleConfig(groupId, ruleType, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all rules configured for the group. The set of rules determines how the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGroupRules(groupId: string, options?: any): AxiosPromise> { + return localVarFp.listGroupRules(groupId, options).then((request) => request(axios, basePath)); + }, + /** + * Updates the configuration of a single rule for the group. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Update group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {UpdateGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupRuleConfig(groupId: string, ruleType: UpdateGroupRuleConfigRuleTypeEnum, rule: Rule, options?: any): AxiosPromise { + return localVarFp.updateGroupRuleConfig(groupId, ruleType, rule, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GroupRulesApi - object-oriented interface + * @export + * @class GroupRulesApi + * @extends {BaseAPI} + */ +export class GroupRulesApi extends BaseAPI { + /** + * Adds a rule to the list of rules that get applied to an artifact in the group when adding new versions. All configured rules must pass to successfully add a new artifact version. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * Rule (named in the request body) is unknown (HTTP error `400`) * Rule is already configured (HTTP error `409`) * A server error occurred (HTTP error `500`) + * @summary Create group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {CreateRule} createRule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupRulesApi + */ + public createGroupRule(groupId: string, createRule: CreateRule, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).createGroupRule(groupId, createRule, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a rule from the group. This results in the rule no longer applying for this group. If this is the only rule configured for the group, this is the same as deleting **all** rules, and the globally configured rules now apply to this group. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this group (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Delete group rule + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {DeleteGroupRuleRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupRulesApi + */ + public deleteGroupRule(groupId: string, ruleType: DeleteGroupRuleRuleTypeEnum, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).deleteGroupRule(groupId, ruleType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes all of the rules configured for the group. After this is done, the global rules apply to artifacts in the group again. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Delete group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupRulesApi + */ + public deleteGroupRules(groupId: string, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).deleteGroupRules(groupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about a single rule configured for a group. This is useful when you want to know what the current configuration settings are for a specific rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Get group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {GetGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArtifactsApi + * @memberof GroupRulesApi */ - public searchArtifactsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SearchArtifactsByContentOrderEnum, orderby?: SearchArtifactsByContentOrderbyEnum, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).searchArtifactsByContent(body, canonical, artifactType, offset, limit, order, orderby, options).then((request) => request(this.axios, this.basePath)); + public getGroupRuleConfig(groupId: string, ruleType: GetGroupRuleConfigRuleTypeEnum, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).getGroupRuleConfig(groupId, ruleType, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for *most* of the supported types, but may be in another format for a few (for example, `PROTOBUF`). The type of the content should be compatible with the artifact\'s type (it would be an error to update an `AVRO` artifact with new `OPENAPI` content, for example). The update could fail for a number of reasons including: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact. - * @summary Update artifact - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The new content of the artifact being updated. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. If not provided, the server will assign a version number automatically. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. + * Returns a list of all rules configured for the group. The set of rules determines how the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary List group rules + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArtifactsApi + * @memberof GroupRulesApi */ - public updateArtifact(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryNameEncoded?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).updateArtifact(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryNameEncoded, xRegistryDescription, xRegistryDescriptionEncoded, options).then((request) => request(this.axios, this.basePath)); + public listGroupRules(groupId: string, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).listGroupRules(groupId, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as `DEPRECATED`. The operation changes the state of the latest version of the artifact, even if this version is `DISABLED`. If multiple versions exist, only the most recent is changed. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {UpdateState} updateState + * Updates the configuration of a single rule for the group. The configuration data is specific to each rule type, so the configuration of the `COMPATIBILITY` rule is in a different format from the configuration of the `VALIDITY` rule. This operation can fail for the following reasons: * No group with this `groupId` exists (HTTP error `404`) * No rule with this name/type is configured for this artifact (HTTP error `404`) * Invalid rule type (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Update group rule configuration + * @param {string} groupId The group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {UpdateGroupRuleConfigRuleTypeEnum} ruleType The unique name/type of a rule. + * @param {Rule} rule * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArtifactsApi + * @memberof GroupRulesApi */ - public updateArtifactState(groupId: string, artifactId: string, updateState: UpdateState, options?: AxiosRequestConfig) { - return ArtifactsApiFp(this.configuration).updateArtifactState(groupId, artifactId, updateState, options).then((request) => request(this.axios, this.basePath)); + public updateGroupRuleConfig(groupId: string, ruleType: UpdateGroupRuleConfigRuleTypeEnum, rule: Rule, options?: RawAxiosRequestConfig) { + return GroupRulesApiFp(this.configuration).updateGroupRuleConfig(groupId, ruleType, rule, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const CreateArtifactXRegistryHashAlgorithmEnum = { - Sha256: 'SHA256', - Md5: 'MD5' +export const DeleteGroupRuleRuleTypeEnum = { + Validity: 'VALIDITY', + Compatibility: 'COMPATIBILITY', + Integrity: 'INTEGRITY' } as const; -export type CreateArtifactXRegistryHashAlgorithmEnum = typeof CreateArtifactXRegistryHashAlgorithmEnum[keyof typeof CreateArtifactXRegistryHashAlgorithmEnum]; +export type DeleteGroupRuleRuleTypeEnum = typeof DeleteGroupRuleRuleTypeEnum[keyof typeof DeleteGroupRuleRuleTypeEnum]; /** * @export */ -export const SearchArtifactsByContentOrderEnum = { - Asc: 'asc', - Desc: 'desc' +export const GetGroupRuleConfigRuleTypeEnum = { + Validity: 'VALIDITY', + Compatibility: 'COMPATIBILITY', + Integrity: 'INTEGRITY' } as const; -export type SearchArtifactsByContentOrderEnum = typeof SearchArtifactsByContentOrderEnum[keyof typeof SearchArtifactsByContentOrderEnum]; +export type GetGroupRuleConfigRuleTypeEnum = typeof GetGroupRuleConfigRuleTypeEnum[keyof typeof GetGroupRuleConfigRuleTypeEnum]; /** * @export */ -export const SearchArtifactsByContentOrderbyEnum = { - Name: 'name', - CreatedOn: 'createdOn' +export const UpdateGroupRuleConfigRuleTypeEnum = { + Validity: 'VALIDITY', + Compatibility: 'COMPATIBILITY', + Integrity: 'INTEGRITY' } as const; -export type SearchArtifactsByContentOrderbyEnum = typeof SearchArtifactsByContentOrderbyEnum[keyof typeof SearchArtifactsByContentOrderbyEnum]; +export type UpdateGroupRuleConfigRuleTypeEnum = typeof UpdateGroupRuleConfigRuleTypeEnum[keyof typeof UpdateGroupRuleConfigRuleTypeEnum]; /** @@ -4638,13 +6116,13 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio /** * 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 {CreateGroup} createGroup * @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) + createGroup: async (createGroup: CreateGroup, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createGroup' is not null or undefined + assertParamExists('createGroup', 'createGroup', createGroup) const localVarPath = `/groups`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4664,7 +6142,7 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createGroupMetaData, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createGroup, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -4672,13 +6150,13 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * 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`) + * Deletes a group by identifier. This operation also deletes all artifacts within the group, so should be used very carefully. 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteGroupById: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { + deleteGroupById: async (groupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteGroupById', 'groupId', groupId) const localVarPath = `/groups/{groupId}` @@ -4708,11 +6186,11 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio /** * 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGroupById: async (groupId: string, options: AxiosRequestConfig = {}): Promise => { + getGroupById: async (groupId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getGroupById', 'groupId', groupId) const localVarPath = `/groups/{groupId}` @@ -4745,11 +6223,11 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio * @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 {GroupSortBy} [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 => { + listGroups: async (limit?: number, offset?: number, order?: SortOrder, orderby?: GroupSortBy, options: RawAxiosRequestConfig = {}): 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); @@ -4784,6 +6262,111 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a paginated list of all groups that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for groups + * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {GroupSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by group name. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchGroups: async (offset?: number, limit?: number, order?: SortOrder, orderby?: GroupSortBy, labels?: Array, description?: string, groupId?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/search/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 (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + if (orderby !== undefined) { + localVarQueryParameter['orderby'] = orderby; + } + + if (labels) { + localVarQueryParameter['labels'] = labels; + } + + if (description !== undefined) { + localVarQueryParameter['description'] = description; + } + + if (groupId !== undefined) { + localVarQueryParameter['groupId'] = groupId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates the metadata of 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 Update group metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {EditableGroupMetaData} editableGroupMetaData The new group metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupById: async (groupId: string, editableGroupMetaData: EditableGroupMetaData, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('updateGroupById', 'groupId', groupId) + // verify required parameter 'editableGroupMetaData' is not null or undefined + assertParamExists('updateGroupById', 'editableGroupMetaData', editableGroupMetaData) + 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: '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(editableGroupMetaData, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -4802,35 +6385,41 @@ export const GroupsApiFp = function(configuration?: Configuration) { /** * 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 {CreateGroup} createGroup * @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); + async createGroup(createGroup: CreateGroup, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createGroup(createGroup, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.createGroup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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`) + * Deletes a group by identifier. This operation also deletes all artifacts within the group, so should be used very carefully. 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteGroupById(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteGroupById(groupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupById(groupId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.deleteGroupById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getGroupById(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getGroupById(groupId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getGroupById(groupId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.getGroupById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list of all groups. This list is paged. @@ -4838,13 +6427,48 @@ export const GroupsApiFp = function(configuration?: Configuration) { * @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 {GroupSortBy} [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> { + async listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: GroupSortBy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listGroups(limit, offset, order, orderby, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.listGroups']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a paginated list of all groups that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for groups + * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {GroupSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by group name. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchGroups(offset?: number, limit?: number, order?: SortOrder, orderby?: GroupSortBy, labels?: Array, description?: string, groupId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchGroups(offset, limit, order, orderby, labels, description, groupId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.searchGroups']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates the metadata of 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 Update group metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {EditableGroupMetaData} editableGroupMetaData The new group metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateGroupById(groupId: string, editableGroupMetaData: EditableGroupMetaData, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGroupById(groupId, editableGroupMetaData, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GroupsApi.updateGroupById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -4859,17 +6483,17 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat /** * 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 {CreateGroup} createGroup * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createGroup(createGroupMetaData: CreateGroupMetaData, options?: any): AxiosPromise { - return localVarFp.createGroup(createGroupMetaData, options).then((request) => request(axios, basePath)); + createGroup(createGroup: CreateGroup, options?: any): AxiosPromise { + return localVarFp.createGroup(createGroup, 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`) + * Deletes a group by identifier. This operation also deletes all artifacts within the group, so should be used very carefully. 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -4879,7 +6503,7 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat /** * 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -4892,13 +6516,40 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat * @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 {GroupSortBy} [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 { + listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: GroupSortBy, options?: any): AxiosPromise { return localVarFp.listGroups(limit, offset, order, orderby, options).then((request) => request(axios, basePath)); }, + /** + * Returns a paginated list of all groups that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for groups + * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {GroupSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by group name. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchGroups(offset?: number, limit?: number, order?: SortOrder, orderby?: GroupSortBy, labels?: Array, description?: string, groupId?: string, options?: any): AxiosPromise { + return localVarFp.searchGroups(offset, limit, order, orderby, labels, description, groupId, options).then((request) => request(axios, basePath)); + }, + /** + * Updates the metadata of 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 Update group metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {EditableGroupMetaData} editableGroupMetaData The new group metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupById(groupId: string, editableGroupMetaData: EditableGroupMetaData, options?: any): AxiosPromise { + return localVarFp.updateGroupById(groupId, editableGroupMetaData, options).then((request) => request(axios, basePath)); + }, }; }; @@ -4912,36 +6563,36 @@ 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 {CreateGroup} createGroup * @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)); + public createGroup(createGroup: CreateGroup, options?: RawAxiosRequestConfig) { + return GroupsApiFp(this.configuration).createGroup(createGroup, 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`) + * Deletes a group by identifier. This operation also deletes all artifacts within the group, so should be used very carefully. 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GroupsApi */ - public deleteGroupById(groupId: string, options?: AxiosRequestConfig) { + public deleteGroupById(groupId: string, options?: RawAxiosRequestConfig) { 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GroupsApi */ - public getGroupById(groupId: string, options?: AxiosRequestConfig) { + public getGroupById(groupId: string, options?: RawAxiosRequestConfig) { return GroupsApiFp(this.configuration).getGroupById(groupId, options).then((request) => request(this.axios, this.basePath)); } @@ -4951,44 +6602,63 @@ export class GroupsApi extends BaseAPI { * @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 {GroupSortBy} [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) { + public listGroups(limit?: number, offset?: number, order?: SortOrder, orderby?: GroupSortBy, options?: RawAxiosRequestConfig) { return GroupsApiFp(this.configuration).listGroups(limit, offset, order, orderby, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Returns a paginated list of all groups that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for groups + * @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 {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {GroupSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by group name. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public searchGroups(offset?: number, limit?: number, order?: SortOrder, orderby?: GroupSortBy, labels?: Array, description?: string, groupId?: string, options?: RawAxiosRequestConfig) { + return GroupsApiFp(this.configuration).searchGroups(offset, limit, order, orderby, labels, description, groupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the metadata of 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 Update group metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {EditableGroupMetaData} editableGroupMetaData The new group metadata. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public updateGroupById(groupId: string, editableGroupMetaData: EditableGroupMetaData, options?: RawAxiosRequestConfig) { + return GroupsApiFp(this.configuration).updateGroupById(groupId, editableGroupMetaData, options).then((request) => request(this.axios, this.basePath)); + } } /** - * MetadataApi - axios parameter creator + * KafkaSQLApi - axios parameter creator * @export */ -export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { +export const KafkaSQLApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Deletes the user-editable metadata properties of the artifact version. Any properties that are not user-editable are preserved. 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 Delete artifact version metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactVersionMetaData: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('deleteArtifactVersionMetaData', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('deleteArtifactVersionMetaData', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('deleteArtifactVersionMetaData', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + triggerSnapshot: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/snapshots`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -4996,7 +6666,7 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -5011,142 +6681,91 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat options: localVarRequestOptions, }; }, - /** - * Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description). This operation can fail for the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact metadata - * @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} - */ - getArtifactMetaData: async (groupId: string, artifactId: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('getArtifactMetaData', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getArtifactMetaData', 'artifactId', artifactId) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/meta` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + } +}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * KafkaSQLApi - functional programming interface + * @export + */ +export const KafkaSQLApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = KafkaSQLApiAxiosParamCreator(configuration) + return { /** - * 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. + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot * @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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async triggerSnapshot(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSnapshot(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['KafkaSQLApi.triggerSnapshot']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * KafkaSQLApi - factory interface + * @export + */ +export const KafkaSQLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = KafkaSQLApiFp(configuration) + return { /** - * 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionMetaData: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('getArtifactVersionMetaData', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getArtifactVersionMetaData', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('getArtifactVersionMetaData', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } + triggerSnapshot(options?: any): AxiosPromise { + return localVarFp.triggerSnapshot(options).then((request) => request(axios, basePath)); + }, + }; +}; - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; +/** + * KafkaSQLApi - object-oriented interface + * @export + * @class KafkaSQLApi + * @extends {BaseAPI} + */ +export class KafkaSQLApi extends BaseAPI { + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof KafkaSQLApi + */ + public triggerSnapshot(options?: RawAxiosRequestConfig) { + return KafkaSQLApiFp(this.configuration).triggerSnapshot(options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * MetadataApi - axios parameter creator + * @export + */ +export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * No artifact version matching the provided content exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version metadata by content - * @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 {File} body The content of an artifact version. - * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. + * Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description). This operation can fail for the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get artifact metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionMetaDataByContent: async (groupId: string, artifactId: string, body: File, canonical?: boolean, options: AxiosRequestConfig = {}): Promise => { + getArtifactMetaData: async (groupId: string, artifactId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('getArtifactVersionMetaDataByContent', 'groupId', groupId) + assertParamExists('getArtifactMetaData', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getArtifactVersionMetaDataByContent', 'artifactId', artifactId) - // verify required parameter 'body' is not null or undefined - assertParamExists('getArtifactVersionMetaDataByContent', 'body', body) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/meta` + assertParamExists('getArtifactMetaData', 'artifactId', artifactId) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -5156,22 +6775,15 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (canonical !== undefined) { - localVarQueryParameter['canonical'] = canonical; - } - - localVarHeaderParameter['Content-Type'] = 'application/get.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), @@ -5179,24 +6791,25 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. For example, `createdOn` and `createdBy` are both read-only properties. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact metadata - * @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 {EditableMetaData} editableMetaData Updated artifact metadata. + * 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 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactMetaData: async (groupId: string, artifactId: string, editableMetaData: EditableMetaData, options: AxiosRequestConfig = {}): Promise => { + getArtifactVersionMetaData: async (groupId: string, artifactId: string, versionExpression: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifactMetaData', 'groupId', groupId) + assertParamExists('getArtifactVersionMetaData', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined - assertParamExists('updateArtifactMetaData', 'artifactId', artifactId) - // verify required parameter 'editableMetaData' is not null or undefined - assertParamExists('updateArtifactMetaData', 'editableMetaData', editableMetaData) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/meta` + assertParamExists('getArtifactVersionMetaData', 'artifactId', artifactId) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('getArtifactVersionMetaData', 'versionExpression', versionExpression) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); + .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5204,18 +6817,15 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...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(editableMetaData, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5223,22 +6833,22 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * 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 + * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. Note that only the properties included will be updated. You can update only the name by including only the `name` property in the payload of the request. Properties that are allowed but not present will result in the artifact\'s metadata not being changed. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update artifact metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {EditableArtifactMetaData} editableArtifactMetaData Updated artifact metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactOwner: async (groupId: string, artifactId: string, artifactOwner: ArtifactOwner, options: AxiosRequestConfig = {}): Promise => { + updateArtifactMetaData: async (groupId: string, artifactId: string, editableArtifactMetaData: EditableArtifactMetaData, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifactOwner', 'groupId', groupId) + assertParamExists('updateArtifactMetaData', '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` + assertParamExists('updateArtifactMetaData', 'artifactId', artifactId) + // verify required parameter 'editableArtifactMetaData' is not null or undefined + assertParamExists('updateArtifactMetaData', 'editableArtifactMetaData', editableArtifactMetaData) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -5259,7 +6869,7 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(artifactOwner, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(editableArtifactMetaData, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5269,26 +6879,26 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat /** * 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {EditableMetaData} editableMetaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableVersionMetaData} editableVersionMetaData * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionMetaData: async (groupId: string, artifactId: string, version: string, editableMetaData: EditableMetaData, options: AxiosRequestConfig = {}): Promise => { + updateArtifactVersionMetaData: async (groupId: string, artifactId: string, versionExpression: string, editableVersionMetaData: EditableVersionMetaData, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('updateArtifactVersionMetaData', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('updateArtifactVersionMetaData', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('updateArtifactVersionMetaData', 'version', version) - // verify required parameter 'editableMetaData' is not null or undefined - assertParamExists('updateArtifactVersionMetaData', 'editableMetaData', editableMetaData) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta` + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('updateArtifactVersionMetaData', 'versionExpression', versionExpression) + // verify required parameter 'editableVersionMetaData' is not null or undefined + assertParamExists('updateArtifactVersionMetaData', 'editableVersionMetaData', editableVersionMetaData) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5307,7 +6917,7 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(editableMetaData, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(editableVersionMetaData, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5324,109 +6934,65 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat export const MetadataApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration) return { - /** - * Deletes the user-editable metadata properties of the artifact version. Any properties that are not user-editable are preserved. 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 Delete artifact version metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersionMetaData(groupId, artifactId, version, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description). This operation can fail for the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactMetaData(groupId: string, artifactId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getArtifactMetaData(groupId: string, artifactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { 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); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.getArtifactMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionMetaData(groupId, artifactId, version, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * No artifact version matching the provided content exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version metadata by content - * @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 {File} body The content of an artifact version. - * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactVersionMetaDataByContent(groupId: string, artifactId: string, body: File, canonical?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionMetaDataByContent(groupId, artifactId, body, canonical, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionMetaData(groupId, artifactId, versionExpression, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.getArtifactVersionMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. For example, `createdOn` and `createdBy` are both read-only properties. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. Note that only the properties included will be updated. You can update only the name by including only the `name` property in the payload of the request. Properties that are allowed but not present will result in the artifact\'s metadata not being changed. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact metadata - * @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 {EditableMetaData} editableMetaData Updated artifact metadata. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateArtifactMetaData(groupId: string, artifactId: string, editableMetaData: EditableMetaData, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - 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 {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {EditableArtifactMetaData} editableArtifactMetaData Updated artifact metadata. * @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); + async updateArtifactMetaData(groupId: string, artifactId: string, editableArtifactMetaData: EditableArtifactMetaData, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactMetaData(groupId, artifactId, editableArtifactMetaData, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.updateArtifactMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {EditableMetaData} editableMetaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableVersionMetaData} editableVersionMetaData * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateArtifactVersionMetaData(groupId: string, artifactId: string, version: string, editableMetaData: EditableMetaData, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionMetaData(groupId, artifactId, version, editableMetaData, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async updateArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, editableVersionMetaData: EditableVersionMetaData, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionMetaData(groupId, artifactId, versionExpression, editableVersionMetaData, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.updateArtifactVersionMetaData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -5438,101 +7004,53 @@ export const MetadataApiFp = function(configuration?: Configuration) { export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = MetadataApiFp(configuration) return { - /** - * Deletes the user-editable metadata properties of the artifact version. Any properties that are not user-editable are preserved. 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 Delete artifact version metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise { - return localVarFp.deleteArtifactVersionMetaData(groupId, artifactId, version, options).then((request) => request(axios, basePath)); - }, /** * Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description). This operation can fail for the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise { - return localVarFp.getArtifactVersionMetaData(groupId, artifactId, version, options).then((request) => request(axios, basePath)); - }, - /** - * Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * No artifact version matching the provided content exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version metadata by content - * @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 {File} body The content of an artifact version. - * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionMetaDataByContent(groupId: string, artifactId: string, body: File, canonical?: boolean, options?: any): AxiosPromise { - return localVarFp.getArtifactVersionMetaDataByContent(groupId, artifactId, body, canonical, options).then((request) => request(axios, basePath)); + getArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, options?: any): AxiosPromise { + return localVarFp.getArtifactVersionMetaData(groupId, artifactId, versionExpression, options).then((request) => request(axios, basePath)); }, /** - * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. For example, `createdOn` and `createdBy` are both read-only properties. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. Note that only the properties included will be updated. You can update only the name by including only the `name` property in the payload of the request. Properties that are allowed but not present will result in the artifact\'s metadata not being changed. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Update artifact metadata - * @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 {EditableMetaData} editableMetaData Updated artifact metadata. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {EditableArtifactMetaData} editableArtifactMetaData Updated artifact metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - 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)); + updateArtifactMetaData(groupId: string, artifactId: string, editableArtifactMetaData: EditableArtifactMetaData, options?: any): AxiosPromise { + return localVarFp.updateArtifactMetaData(groupId, artifactId, editableArtifactMetaData, 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {EditableMetaData} editableMetaData + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableVersionMetaData} editableVersionMetaData * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionMetaData(groupId: string, artifactId: string, version: string, editableMetaData: EditableMetaData, options?: any): AxiosPromise { - return localVarFp.updateArtifactVersionMetaData(groupId, artifactId, version, editableMetaData, options).then((request) => request(axios, basePath)); + updateArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, editableVersionMetaData: EditableVersionMetaData, options?: any): AxiosPromise { + return localVarFp.updateArtifactVersionMetaData(groupId, artifactId, versionExpression, editableVersionMetaData, options).then((request) => request(axios, basePath)); }, }; }; @@ -5544,116 +7062,161 @@ export const MetadataApiFactory = function (configuration?: Configuration, baseP * @extends {BaseAPI} */ export class MetadataApi extends BaseAPI { - /** - * Deletes the user-editable metadata properties of the artifact version. Any properties that are not user-editable are preserved. 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 Delete artifact version metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MetadataApi - */ - public deleteArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).deleteArtifactVersionMetaData(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); - } - /** * Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as `DISABLED`, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description). This operation can fail for the following reasons: * No artifact with this `artifactId` exists or all versions are `DISABLED` (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Get artifact metadata - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetadataApi */ - public getArtifactMetaData(groupId: string, artifactId: string, options?: AxiosRequestConfig) { + public getArtifactMetaData(groupId: string, artifactId: string, options?: RawAxiosRequestConfig) { 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetadataApi */ - public getArtifactVersionMetaData(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).getArtifactVersionMetaData(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); + public getArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig) { + return MetadataApiFp(this.configuration).getArtifactVersionMetaData(groupId, artifactId, versionExpression, options).then((request) => request(this.axios, this.basePath)); } /** - * Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with the `artifactId` exists (HTTP error `404`) * No artifact version matching the provided content exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version metadata by content - * @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 {File} body The content of an artifact version. - * @param {boolean} [canonical] Parameter that can be set to `true` to indicate that the server should \"canonicalize\" the content when searching for a matching version. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner. + * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. Note that only the properties included will be updated. You can update only the name by including only the `name` property in the payload of the request. Properties that are allowed but not present will result in the artifact\'s metadata not being changed. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update artifact metadata + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {EditableArtifactMetaData} editableArtifactMetaData Updated artifact metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetadataApi */ - public getArtifactVersionMetaDataByContent(groupId: string, artifactId: string, body: File, canonical?: boolean, options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).getArtifactVersionMetaDataByContent(groupId, artifactId, body, canonical, options).then((request) => request(this.axios, this.basePath)); + public updateArtifactMetaData(groupId: string, artifactId: string, editableArtifactMetaData: EditableArtifactMetaData, options?: RawAxiosRequestConfig) { + return MetadataApiFp(this.configuration).updateArtifactMetaData(groupId, artifactId, editableArtifactMetaData, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates the editable parts of the artifact\'s metadata. Not all metadata fields can be updated. For example, `createdOn` and `createdBy` are both read-only properties. This operation can fail for the following reasons: * No artifact with the `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact metadata - * @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 {EditableMetaData} editableMetaData Updated artifact metadata. + * 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 + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {EditableVersionMetaData} editableVersionMetaData * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetadataApi */ - public updateArtifactMetaData(groupId: string, artifactId: string, editableMetaData: EditableMetaData, options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).updateArtifactMetaData(groupId, artifactId, editableMetaData, options).then((request) => request(this.axios, this.basePath)); + public updateArtifactVersionMetaData(groupId: string, artifactId: string, versionExpression: string, editableVersionMetaData: EditableVersionMetaData, options?: RawAxiosRequestConfig) { + return MetadataApiFp(this.configuration).updateArtifactVersionMetaData(groupId, artifactId, versionExpression, editableVersionMetaData, 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)); + + +/** + * SnapshotApi - axios parameter creator + * @export + */ +export const SnapshotApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + triggerSnapshot: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/snapshots`; + // 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; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SnapshotApi - functional programming interface + * @export + */ +export const SnapshotApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SnapshotApiAxiosParamCreator(configuration) + return { + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async triggerSnapshot(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSnapshot(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SnapshotApi.triggerSnapshot']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } +}; + +/** + * SnapshotApi - factory interface + * @export + */ +export const SnapshotApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SnapshotApiFp(configuration) + return { + /** + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + triggerSnapshot(options?: any): AxiosPromise { + return localVarFp.triggerSnapshot(options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * SnapshotApi - object-oriented interface + * @export + * @class SnapshotApi + * @extends {BaseAPI} + */ +export class SnapshotApi extends BaseAPI { /** - * 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 - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {EditableMetaData} editableMetaData + * Triggers the creation of a snapshot of the internal database for compatible storages. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Trigger storage snapshot * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MetadataApi + * @memberof SnapshotApi */ - public updateArtifactVersionMetaData(groupId: string, artifactId: string, version: string, editableMetaData: EditableMetaData, options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).updateArtifactVersionMetaData(groupId, artifactId, version, editableMetaData, options).then((request) => request(this.axios, this.basePath)); + public triggerSnapshot(options?: RawAxiosRequestConfig) { + return SnapshotApiFp(this.configuration).triggerSnapshot(options).then((request) => request(this.axios, this.basePath)); } } @@ -5671,7 +7234,7 @@ export const SystemApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getResourceLimits: async (options: AxiosRequestConfig = {}): Promise => { + getResourceLimits: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/system/limits`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5701,7 +7264,7 @@ export const SystemApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSystemInfo: async (options: AxiosRequestConfig = {}): Promise => { + getSystemInfo: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/system/info`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5716,6 +7279,36 @@ export const SystemApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the UI configuration properties for this server. The registry UI can be connected to a backend using just a URL. The rest of the UI configuration can then be fetched from the backend using this operation. This allows UI and backend to both be configured in the same place. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) + * @summary Get UI config + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUIConfig: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/system/uiConfig`; + // 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}; @@ -5741,9 +7334,11 @@ export const SystemApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getResourceLimits(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getResourceLimits(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getResourceLimits(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemApi.getResourceLimits']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This operation retrieves information about the running registry system, such as the version of the software and when it was built. @@ -5751,9 +7346,23 @@ export const SystemApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getSystemInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getSystemInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSystemInfo(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemApi.getSystemInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the UI configuration properties for this server. The registry UI can be connected to a backend using just a URL. The rest of the UI configuration can then be fetched from the backend using this operation. This allows UI and backend to both be configured in the same place. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) + * @summary Get UI config + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUIConfig(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUIConfig(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemApi.getUIConfig']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -5783,6 +7392,15 @@ export const SystemApiFactory = function (configuration?: Configuration, basePat getSystemInfo(options?: any): AxiosPromise { return localVarFp.getSystemInfo(options).then((request) => request(axios, basePath)); }, + /** + * Returns the UI configuration properties for this server. The registry UI can be connected to a backend using just a URL. The rest of the UI configuration can then be fetched from the backend using this operation. This allows UI and backend to both be configured in the same place. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) + * @summary Get UI config + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUIConfig(options?: any): AxiosPromise { + return localVarFp.getUIConfig(options).then((request) => request(axios, basePath)); + }, }; }; @@ -5800,7 +7418,7 @@ export class SystemApi extends BaseAPI { * @throws {RequiredError} * @memberof SystemApi */ - public getResourceLimits(options?: AxiosRequestConfig) { + public getResourceLimits(options?: RawAxiosRequestConfig) { return SystemApiFp(this.configuration).getResourceLimits(options).then((request) => request(this.axios, this.basePath)); } @@ -5811,9 +7429,20 @@ export class SystemApi extends BaseAPI { * @throws {RequiredError} * @memberof SystemApi */ - public getSystemInfo(options?: AxiosRequestConfig) { + public getSystemInfo(options?: RawAxiosRequestConfig) { return SystemApiFp(this.configuration).getSystemInfo(options).then((request) => request(this.axios, this.basePath)); } + + /** + * Returns the UI configuration properties for this server. The registry UI can be connected to a backend using just a URL. The rest of the UI configuration can then be fetched from the backend using this operation. This allows UI and backend to both be configured in the same place. This operation may fail for one of the following reasons: * A server error occurred (HTTP error `500`) + * @summary Get UI config + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemApi + */ + public getUIConfig(options?: RawAxiosRequestConfig) { + return SystemApiFp(this.configuration).getUIConfig(options).then((request) => request(this.axios, this.basePath)); + } } @@ -5830,7 +7459,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getCurrentUserInfo: async (options: AxiosRequestConfig = {}): Promise => { + getCurrentUserInfo: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/users/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5870,9 +7499,11 @@ export const UsersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getCurrentUserInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getCurrentUserInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUserInfo(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UsersApi.getCurrentUserInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -5910,7 +7541,7 @@ export class UsersApi extends BaseAPI { * @throws {RequiredError} * @memberof UsersApi */ - public getCurrentUserInfo(options?: AxiosRequestConfig) { + public getCurrentUserInfo(options?: RawAxiosRequestConfig) { return UsersApiFp(this.configuration).getCurrentUserInfo(options).then((request) => request(this.axios, this.basePath)); } } @@ -5926,26 +7557,26 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Adds a new comment to the artifact version. Both the `artifactId` and the unique `version` number must be provided. 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 Add new comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addArtifactVersionComment: async (groupId: string, artifactId: string, version: string, newComment: NewComment, options: AxiosRequestConfig = {}): Promise => { + addArtifactVersionComment: async (groupId: string, artifactId: string, versionExpression: string, newComment: NewComment, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('addArtifactVersionComment', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('addArtifactVersionComment', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('addArtifactVersionComment', 'version', version) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('addArtifactVersionComment', 'versionExpression', versionExpression) // verify required parameter 'newComment' is not null or undefined assertParamExists('addArtifactVersionComment', 'newComment', newComment) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments` + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5974,24 +7605,20 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact version being created or the content and a set of references to other artifacts. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateVersion} createVersion The version to be created. + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifactVersion: async (groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, options: AxiosRequestConfig = {}): Promise => { + createArtifactVersion: async (groupId: string, artifactId: string, createVersion: CreateVersion, dryRun?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('createArtifactVersion', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('createArtifactVersion', 'artifactId', artifactId) - // verify required parameter 'body' is not null or undefined - assertParamExists('createArtifactVersion', 'body', body) + // verify required parameter 'createVersion' is not null or undefined + assertParamExists('createArtifactVersion', 'createVersion', createVersion) const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))); @@ -6006,34 +7633,18 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (xRegistryVersion != null) { - localVarHeaderParameter['X-Registry-Version'] = String(xRegistryVersion); - } - - if (xRegistryName != null) { - localVarHeaderParameter['X-Registry-Name'] = String(xRegistryName); - } - - if (xRegistryDescription != null) { - localVarHeaderParameter['X-Registry-Description'] = String(xRegistryDescription); - } - - if (xRegistryDescriptionEncoded != null) { - localVarHeaderParameter['X-Registry-Description-Encoded'] = String(xRegistryDescriptionEncoded); - } - - if (xRegistryNameEncoded != null) { - localVarHeaderParameter['X-Registry-Name-Encoded'] = String(xRegistryNameEncoded); + if (dryRun !== undefined) { + localVarQueryParameter['dryRun'] = dryRun; } - localVarHeaderParameter['Content-Type'] = 'application/create.extended+json'; + localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createVersion, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6043,23 +7654,23 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactVersion: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { + deleteArtifactVersion: async (groupId: string, artifactId: string, versionExpression: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactVersion', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactVersion', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('deleteArtifactVersion', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}` + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('deleteArtifactVersion', 'versionExpression', versionExpression) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6085,26 +7696,26 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Deletes a single comment in an artifact version. Only the owner of the comment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a single comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {string} commentId The unique identifier of a single comment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactVersionComment: async (groupId: string, artifactId: string, version: string, commentId: string, options: AxiosRequestConfig = {}): Promise => { + deleteArtifactVersionComment: async (groupId: string, artifactId: string, versionExpression: string, commentId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('deleteArtifactVersionComment', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('deleteArtifactVersionComment', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('deleteArtifactVersionComment', 'version', version) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('deleteArtifactVersionComment', 'versionExpression', versionExpression) // verify required parameter 'commentId' is not null or undefined assertParamExists('deleteArtifactVersionComment', 'commentId', commentId) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments/{commentId}` + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments/{commentId}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))) + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))) .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6129,26 +7740,25 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. + * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersion: async (groupId: string, artifactId: string, version: string, references?: HandleReferencesType, options: AxiosRequestConfig = {}): Promise => { + getArtifactVersionComments: async (groupId: string, artifactId: string, versionExpression: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('getArtifactVersion', 'groupId', groupId) + assertParamExists('getArtifactVersionComments', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getArtifactVersion', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('getArtifactVersion', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}` + assertParamExists('getArtifactVersionComments', 'artifactId', artifactId) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('getArtifactVersionComments', 'versionExpression', versionExpression) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6160,10 +7770,6 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (references !== undefined) { - localVarQueryParameter['references'] = references; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6176,25 +7782,26 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get artifact version + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionComments: async (groupId: string, artifactId: string, version: string, options: AxiosRequestConfig = {}): Promise => { + getArtifactVersionContent: async (groupId: string, artifactId: string, versionExpression: string, references?: HandleReferencesType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('getArtifactVersionComments', 'groupId', groupId) + assertParamExists('getArtifactVersionContent', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined - assertParamExists('getArtifactVersionComments', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('getArtifactVersionComments', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments` + assertParamExists('getArtifactVersionContent', 'artifactId', artifactId) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('getArtifactVersionContent', 'versionExpression', versionExpression) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/content` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6206,6 +7813,10 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (references !== undefined) { + localVarQueryParameter['references'] = references; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6220,24 +7831,24 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Retrieves all references for a single version of an artifact. Both the `artifactId` and the unique `version` number must be provided. Using the `refType` query parameter, it is possible to retrieve an array of either the inbound or outbound references. 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 references - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {ReferenceType} [refType] Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionReferences: async (groupId: string, artifactId: string, version: string, refType?: ReferenceType, options: AxiosRequestConfig = {}): Promise => { + getArtifactVersionReferences: async (groupId: string, artifactId: string, versionExpression: string, refType?: ReferenceType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('getArtifactVersionReferences', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined assertParamExists('getArtifactVersionReferences', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('getArtifactVersionReferences', 'version', version) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/references` + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('getArtifactVersionReferences', 'versionExpression', versionExpression) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/references` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6267,14 +7878,16 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `version` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactVersions: async (groupId: string, artifactId: string, offset?: number, limit?: number, options: AxiosRequestConfig = {}): Promise => { + listArtifactVersions: async (groupId: string, artifactId: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined assertParamExists('listArtifactVersions', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined @@ -6301,6 +7914,14 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['limit'] = limit; } + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + if (orderby !== undefined) { + localVarQueryParameter['orderby'] = orderby; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6313,32 +7934,25 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update a comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {string} commentId The unique identifier of a single comment. - * @param {NewComment} newComment + * Returns a paginated list of all versions that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for versions + * @param {string} [version] Filter by version number. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by artifact group. + * @param {number} [globalId] Filter by globalId. + * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. + * @param {string} [name] Filter by name. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionComment: async (groupId: string, artifactId: string, version: string, commentId: string, newComment: NewComment, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifactVersionComment', 'groupId', groupId) - // verify required parameter 'artifactId' is not null or undefined - assertParamExists('updateArtifactVersionComment', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('updateArtifactVersionComment', 'version', version) - // verify required parameter 'commentId' is not null or undefined - assertParamExists('updateArtifactVersionComment', 'commentId', commentId) - // verify required parameter 'newComment' is not null or undefined - assertParamExists('updateArtifactVersionComment', 'newComment', newComment) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/comments/{commentId}` - .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) - .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))) - .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); + searchVersions: async (version?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, name?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/search/versions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6346,10 +7960,131 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (version !== undefined) { + localVarQueryParameter['version'] = version; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + if (orderby !== undefined) { + localVarQueryParameter['orderby'] = orderby; + } + + if (labels) { + localVarQueryParameter['labels'] = labels; + } + + if (description !== undefined) { + localVarQueryParameter['description'] = description; + } + + if (groupId !== undefined) { + localVarQueryParameter['groupId'] = groupId; + } + + if (globalId !== undefined) { + localVarQueryParameter['globalId'] = globalId; + } + + if (contentId !== undefined) { + localVarQueryParameter['contentId'] = contentId; + } + + if (artifactId !== undefined) { + localVarQueryParameter['artifactId'] = artifactId; + } + + if (name !== undefined) { + localVarQueryParameter['name'] = name; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a paginated list of all versions that match the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Search for versions by content + * @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 {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 versions. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {string} [groupId] Filter by group Id. + * @param {string} [artifactId] Filter by artifact Id. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchVersionsByContent: async (body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, groupId?: string, artifactId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('searchVersionsByContent', 'body', body) + const localVarPath = `/search/versions`; + // 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 (canonical !== undefined) { + localVarQueryParameter['canonical'] = canonical; + } + + if (artifactType !== undefined) { + localVarQueryParameter['artifactType'] = artifactType; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + if (orderby !== undefined) { + localVarQueryParameter['orderby'] = orderby; + } + + if (groupId !== undefined) { + localVarQueryParameter['groupId'] = groupId; + } + + if (artifactId !== undefined) { + localVarQueryParameter['artifactId'] = artifactId; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6357,7 +8092,7 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(newComment, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6365,28 +8100,32 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact version state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {UpdateState} updateState + * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update a comment + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {string} commentId The unique identifier of a single comment. + * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionState: async (groupId: string, artifactId: string, version: string, updateState: UpdateState, options: AxiosRequestConfig = {}): Promise => { + updateArtifactVersionComment: async (groupId: string, artifactId: string, versionExpression: string, commentId: string, newComment: NewComment, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'groupId' is not null or undefined - assertParamExists('updateArtifactVersionState', 'groupId', groupId) + assertParamExists('updateArtifactVersionComment', 'groupId', groupId) // verify required parameter 'artifactId' is not null or undefined - assertParamExists('updateArtifactVersionState', 'artifactId', artifactId) - // verify required parameter 'version' is not null or undefined - assertParamExists('updateArtifactVersionState', 'version', version) - // verify required parameter 'updateState' is not null or undefined - assertParamExists('updateArtifactVersionState', 'updateState', updateState) - const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{version}/state` + assertParamExists('updateArtifactVersionComment', 'artifactId', artifactId) + // verify required parameter 'versionExpression' is not null or undefined + assertParamExists('updateArtifactVersionComment', 'versionExpression', versionExpression) + // verify required parameter 'commentId' is not null or undefined + assertParamExists('updateArtifactVersionComment', 'commentId', commentId) + // verify required parameter 'newComment' is not null or undefined + assertParamExists('updateArtifactVersionComment', 'newComment', newComment) + const localVarPath = `/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments/{commentId}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) .replace(`{${"artifactId"}}`, encodeURIComponent(String(artifactId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"versionExpression"}}`, encodeURIComponent(String(versionExpression))) + .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6405,7 +8144,7 @@ export const VersionsApiAxiosParamCreator = function (configuration?: Configurat setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateState, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(newComment, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6425,145 +8164,192 @@ export const VersionsApiFp = function(configuration?: Configuration) { /** * Adds a new comment to the artifact version. Both the `artifactId` and the unique `version` number must be provided. 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 Add new comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addArtifactVersionComment(groupId: string, artifactId: string, version: string, newComment: NewComment, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addArtifactVersionComment(groupId, artifactId, version, newComment, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async addArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, newComment: NewComment, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addArtifactVersionComment(groupId, artifactId, versionExpression, newComment, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.addArtifactVersionComment']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact version being created or the content and a set of references to other artifacts. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateVersion} createVersion The version to be created. + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createArtifactVersion(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async createArtifactVersion(groupId: string, artifactId: string, createVersion: CreateVersion, dryRun?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createArtifactVersion(groupId, artifactId, createVersion, dryRun, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.createArtifactVersion']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersion(groupId, artifactId, version, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async deleteArtifactVersion(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersion(groupId, artifactId, versionExpression, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.deleteArtifactVersion']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Deletes a single comment in an artifact version. Only the owner of the comment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a single comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {string} commentId The unique identifier of a single comment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersionComment(groupId, artifactId, version, commentId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async deleteArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteArtifactVersionComment(groupId, artifactId, versionExpression, commentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.deleteArtifactVersionComment']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. + * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactVersion(groupId: string, artifactId: string, version: string, references?: HandleReferencesType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersion(groupId, artifactId, version, references, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getArtifactVersionComments(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionComments(groupId, artifactId, versionExpression, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.getArtifactVersionComments']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get artifact version + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactVersionComments(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionComments(groupId, artifactId, version, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getArtifactVersionContent(groupId: string, artifactId: string, versionExpression: string, references?: HandleReferencesType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionContent(groupId, artifactId, versionExpression, references, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.getArtifactVersionContent']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieves all references for a single version of an artifact. Both the `artifactId` and the unique `version` number must be provided. Using the `refType` query parameter, it is possible to retrieve an array of either the inbound or outbound references. 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 references - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {ReferenceType} [refType] Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArtifactVersionReferences(groupId: string, artifactId: string, version: string, refType?: ReferenceType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionReferences(groupId, artifactId, version, refType, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async getArtifactVersionReferences(groupId: string, artifactId: string, versionExpression: string, refType?: ReferenceType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactVersionReferences(groupId, artifactId, versionExpression, refType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.getArtifactVersionReferences']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `version` * `createdOn` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactVersions(groupId, artifactId, offset, limit, order, orderby, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.listArtifactVersions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a paginated list of all versions that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for versions + * @param {string} [version] Filter by version number. * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by artifact group. + * @param {number} [globalId] Filter by globalId. + * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. + * @param {string} [name] Filter by name. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listArtifactVersions(groupId, artifactId, offset, limit, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async searchVersions(version?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchVersions(version, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.searchVersions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update a comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {string} commentId The unique identifier of a single comment. - * @param {NewComment} newComment + * Returns a paginated list of all versions that match the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Search for versions by content + * @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 {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 versions. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {string} [groupId] Filter by group Id. + * @param {string} [artifactId] Filter by artifact Id. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, newComment: NewComment, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionComment(groupId, artifactId, version, commentId, newComment, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async searchVersionsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, groupId?: string, artifactId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchVersionsByContent(body, canonical, artifactType, offset, limit, order, orderby, groupId, artifactId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.searchVersionsByContent']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact version state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {UpdateState} updateState + * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update a comment + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {string} commentId The unique identifier of a single comment. + * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionState(groupId, artifactId, version, updateState, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + async updateArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, newComment: NewComment, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateArtifactVersionComment(groupId, artifactId, versionExpression, commentId, newComment, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VersionsApi.updateArtifactVersionComment']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -6578,135 +8364,159 @@ export const VersionsApiFactory = function (configuration?: Configuration, baseP /** * Adds a new comment to the artifact version. Both the `artifactId` and the unique `version` number must be provided. 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 Add new comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addArtifactVersionComment(groupId: string, artifactId: string, version: string, newComment: NewComment, options?: any): AxiosPromise { - return localVarFp.addArtifactVersionComment(groupId, artifactId, version, newComment, options).then((request) => request(axios, basePath)); + addArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, newComment: NewComment, options?: any): AxiosPromise { + return localVarFp.addArtifactVersionComment(groupId, artifactId, versionExpression, newComment, options).then((request) => request(axios, basePath)); }, /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact version being created or the content and a set of references to other artifacts. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateVersion} createVersion The version to be created. + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createArtifactVersion(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, options?: any): AxiosPromise { - return localVarFp.createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, options).then((request) => request(axios, basePath)); + createArtifactVersion(groupId: string, artifactId: string, createVersion: CreateVersion, dryRun?: boolean, options?: any): AxiosPromise { + return localVarFp.createArtifactVersion(groupId, artifactId, createVersion, dryRun, options).then((request) => request(axios, basePath)); }, /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise { - return localVarFp.deleteArtifactVersion(groupId, artifactId, version, options).then((request) => request(axios, basePath)); + deleteArtifactVersion(groupId: string, artifactId: string, versionExpression: string, options?: any): AxiosPromise { + return localVarFp.deleteArtifactVersion(groupId, artifactId, versionExpression, options).then((request) => request(axios, basePath)); }, /** * Deletes a single comment in an artifact version. Only the owner of the comment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a single comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {string} commentId The unique identifier of a single comment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, options?: any): AxiosPromise { - return localVarFp.deleteArtifactVersionComment(groupId, artifactId, version, commentId, options).then((request) => request(axios, basePath)); + deleteArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, options?: any): AxiosPromise { + return localVarFp.deleteArtifactVersionComment(groupId, artifactId, versionExpression, commentId, options).then((request) => request(axios, basePath)); }, /** - * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. + * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersion(groupId: string, artifactId: string, version: string, references?: HandleReferencesType, options?: any): AxiosPromise { - return localVarFp.getArtifactVersion(groupId, artifactId, version, references, options).then((request) => request(axios, basePath)); + getArtifactVersionComments(groupId: string, artifactId: string, versionExpression: string, options?: any): AxiosPromise> { + return localVarFp.getArtifactVersionComments(groupId, artifactId, versionExpression, options).then((request) => request(axios, basePath)); }, /** - * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get artifact version + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionComments(groupId: string, artifactId: string, version: string, options?: any): AxiosPromise> { - return localVarFp.getArtifactVersionComments(groupId, artifactId, version, options).then((request) => request(axios, basePath)); + getArtifactVersionContent(groupId: string, artifactId: string, versionExpression: string, references?: HandleReferencesType, options?: any): AxiosPromise { + return localVarFp.getArtifactVersionContent(groupId, artifactId, versionExpression, references, options).then((request) => request(axios, basePath)); }, /** * Retrieves all references for a single version of an artifact. Both the `artifactId` and the unique `version` number must be provided. Using the `refType` query parameter, it is possible to retrieve an array of either the inbound or outbound references. 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 references - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {ReferenceType} [refType] Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArtifactVersionReferences(groupId: string, artifactId: string, version: string, refType?: ReferenceType, options?: any): AxiosPromise> { - return localVarFp.getArtifactVersionReferences(groupId, artifactId, version, refType, options).then((request) => request(axios, basePath)); + getArtifactVersionReferences(groupId: string, artifactId: string, versionExpression: string, refType?: ReferenceType, options?: any): AxiosPromise> { + return localVarFp.getArtifactVersionReferences(groupId, artifactId, versionExpression, refType, options).then((request) => request(axios, basePath)); }, /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `version` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: any): AxiosPromise { - return localVarFp.listArtifactVersions(groupId, artifactId, offset, limit, options).then((request) => request(axios, basePath)); + listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, options?: any): AxiosPromise { + return localVarFp.listArtifactVersions(groupId, artifactId, offset, limit, order, orderby, options).then((request) => request(axios, basePath)); }, /** - * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update a comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {string} commentId The unique identifier of a single comment. - * @param {NewComment} newComment + * Returns a paginated list of all versions that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for versions + * @param {string} [version] Filter by version number. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by artifact group. + * @param {number} [globalId] Filter by globalId. + * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. + * @param {string} [name] Filter by name. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchVersions(version?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, name?: string, options?: any): AxiosPromise { + return localVarFp.searchVersions(version, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, name, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a paginated list of all versions that match the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Search for versions by content + * @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 {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 versions. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {string} [groupId] Filter by group Id. + * @param {string} [artifactId] Filter by artifact Id. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, newComment: NewComment, options?: any): AxiosPromise { - return localVarFp.updateArtifactVersionComment(groupId, artifactId, version, commentId, newComment, options).then((request) => request(axios, basePath)); + searchVersionsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, groupId?: string, artifactId?: string, options?: any): AxiosPromise { + return localVarFp.searchVersionsByContent(body, canonical, artifactType, offset, limit, order, orderby, groupId, artifactId, options).then((request) => request(axios, basePath)); }, /** - * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact version state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {UpdateState} updateState + * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update a comment + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {string} commentId The unique identifier of a single comment. + * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: any): AxiosPromise { - return localVarFp.updateArtifactVersionState(groupId, artifactId, version, updateState, options).then((request) => request(axios, basePath)); + updateArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, newComment: NewComment, options?: any): AxiosPromise { + return localVarFp.updateArtifactVersionComment(groupId, artifactId, versionExpression, commentId, newComment, options).then((request) => request(axios, basePath)); }, }; }; @@ -6721,154 +8531,180 @@ export class VersionsApi extends BaseAPI { /** * Adds a new comment to the artifact version. Both the `artifactId` and the unique `version` number must be provided. 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 Add new comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public addArtifactVersionComment(groupId: string, artifactId: string, version: string, newComment: NewComment, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).addArtifactVersionComment(groupId, artifactId, version, newComment, options).then((request) => request(this.axios, this.basePath)); + public addArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, newComment: NewComment, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).addArtifactVersionComment(groupId, artifactId, versionExpression, newComment, options).then((request) => request(this.axios, this.basePath)); } /** * Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned. The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact\'s type (for example if the artifact type is `AVRO` then the content of the request should be an Apache Avro document). This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * No artifact with this `artifactId` exists (HTTP error `404`) * The new content violates one of the rules configured for the artifact (HTTP error `409`) * A server error occurred (HTTP error `500`) * @summary Create artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {File} body The content of the artifact version being created or the content and a set of references to other artifacts. This is often, but not always, JSON data representing one of the supported artifact types: * Avro (`AVRO`) * Protobuf (`PROTOBUF`) * JSON Schema (`JSON`) * Kafka Connect (`KCONNECT`) * OpenAPI (`OPENAPI`) * AsyncAPI (`ASYNCAPI`) * GraphQL (`GRAPHQL`) * Web Services Description Language (`WSDL`) * XML Schema (`XSD`) - * @param {string} [xRegistryVersion] Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content. - * @param {string} [xRegistryName] Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content. - * @param {string} [xRegistryDescription] Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryDescriptionEncoded] Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content. - * @param {string} [xRegistryNameEncoded] Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {CreateVersion} createVersion The version to be created. + * @param {boolean} [dryRun] When set to `true`, the operation will not result in any changes. Instead, it will return a result based on whether the operation **would have succeeded**. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public createArtifactVersion(groupId: string, artifactId: string, body: File, xRegistryVersion?: string, xRegistryName?: string, xRegistryDescription?: string, xRegistryDescriptionEncoded?: string, xRegistryNameEncoded?: string, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).createArtifactVersion(groupId, artifactId, body, xRegistryVersion, xRegistryName, xRegistryDescription, xRegistryDescriptionEncoded, xRegistryNameEncoded, options).then((request) => request(this.axios, this.basePath)); + public createArtifactVersion(groupId: string, artifactId: string, createVersion: CreateVersion, dryRun?: boolean, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).createArtifactVersion(groupId, artifactId, createVersion, dryRun, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single version of the artifact. Parameters `groupId`, `artifactId` and the unique `version` are needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact. This feature is disabled by default and it\'s discouraged for normal usage. To enable it, set the `registry.rest.artifact.deletion.enabled` property to true. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * Feature is disabled (HTTP error `405`) * A server error occurred (HTTP error `500`) * @summary Delete artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public deleteArtifactVersion(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).deleteArtifactVersion(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); + public deleteArtifactVersion(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).deleteArtifactVersion(groupId, artifactId, versionExpression, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a single comment in an artifact version. Only the owner of the comment can delete it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary Delete a single comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {string} commentId The unique identifier of a single comment. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public deleteArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).deleteArtifactVersionComment(groupId, artifactId, version, commentId, options).then((request) => request(this.axios, this.basePath)); + public deleteArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).deleteArtifactVersionComment(groupId, artifactId, versionExpression, commentId, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Get artifact version - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. + * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public getArtifactVersion(groupId: string, artifactId: string, version: string, references?: HandleReferencesType, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).getArtifactVersion(groupId, artifactId, version, references, options).then((request) => request(this.axios, this.basePath)); + public getArtifactVersionComments(groupId: string, artifactId: string, versionExpression: string, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).getArtifactVersionComments(groupId, artifactId, versionExpression, options).then((request) => request(this.axios, this.basePath)); } /** - * Retrieves all comments for a version of an artifact. Both the `artifactId` and the unique `version` number must be provided. 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 comments - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * Retrieves a single version of the artifact content. Both the `artifactId` and the unique `version` number must be provided. The `Content-Type` of the response depends on the artifact type. In most cases, this is `application/json`, but for some types it may be different (for example, `PROTOBUF`). This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Get artifact version + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {HandleReferencesType} [references] Allows the user to specify how references in the content should be treated. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public getArtifactVersionComments(groupId: string, artifactId: string, version: string, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).getArtifactVersionComments(groupId, artifactId, version, options).then((request) => request(this.axios, this.basePath)); + public getArtifactVersionContent(groupId: string, artifactId: string, versionExpression: string, references?: HandleReferencesType, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).getArtifactVersionContent(groupId, artifactId, versionExpression, references, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves all references for a single version of an artifact. Both the `artifactId` and the unique `version` number must be provided. Using the `refType` query parameter, it is possible to retrieve an array of either the inbound or outbound references. 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 references - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. * @param {ReferenceType} [refType] Determines the type of reference to return, either INBOUND or OUTBOUND. Defaults to OUTBOUND. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public getArtifactVersionReferences(groupId: string, artifactId: string, version: string, refType?: ReferenceType, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).getArtifactVersionReferences(groupId, artifactId, version, refType, options).then((request) => request(this.axios, this.basePath)); + public getArtifactVersionReferences(groupId: string, artifactId: string, versionExpression: string, refType?: ReferenceType, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).getArtifactVersionReferences(groupId, artifactId, versionExpression, refType, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of all versions of the artifact. The result set is paged. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) * @summary List artifact versions - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `version` * `createdOn` * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).listArtifactVersions(groupId, artifactId, offset, limit, options).then((request) => request(this.axios, this.basePath)); + public listArtifactVersions(groupId: string, artifactId: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).listArtifactVersions(groupId, artifactId, offset, limit, order, orderby, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update a comment - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {string} commentId The unique identifier of a single comment. - * @param {NewComment} newComment + * Returns a paginated list of all versions that match the provided filter criteria. This operation can fail for the following reasons: * A server error occurred (HTTP error `500`) + * @summary Search for versions + * @param {string} [version] Filter by version number. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {Array} [labels] Filter by one or more name/value label. Separate each name/value pair using a colon. For example `labels=foo:bar` will return only artifacts with a label named `foo` and value `bar`. + * @param {string} [description] Filter by description. + * @param {string} [groupId] Filter by artifact group. + * @param {number} [globalId] Filter by globalId. + * @param {number} [contentId] Filter by contentId. + * @param {string} [artifactId] Filter by artifactId. + * @param {string} [name] Filter by name. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public updateArtifactVersionComment(groupId: string, artifactId: string, version: string, commentId: string, newComment: NewComment, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).updateArtifactVersionComment(groupId, artifactId, version, commentId, newComment, options).then((request) => request(this.axios, this.basePath)); + public searchVersions(version?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, labels?: Array, description?: string, groupId?: string, globalId?: number, contentId?: number, artifactId?: string, name?: string, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).searchVersions(version, offset, limit, order, orderby, labels, description, groupId, globalId, contentId, artifactId, name, options).then((request) => request(this.axios, this.basePath)); } /** - * Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version. This operation can fail for the following reasons: * No artifact with this `artifactId` exists (HTTP error `404`) * No version with this `version` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) - * @summary Update artifact version state - * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. - * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. - * @param {string} version The unique identifier of a specific version of the artifact content. - * @param {UpdateState} updateState + * Returns a paginated list of all versions that match the posted content. This operation can fail for the following reasons: * Provided content (request body) was empty (HTTP error `400`) * A server error occurred (HTTP error `500`) + * @summary Search for versions by content + * @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 {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 versions. + * @param {number} [offset] The number of versions to skip before starting to collect the result set. Defaults to 0. + * @param {number} [limit] The number of versions to return. Defaults to 20. + * @param {SortOrder} [order] Sort order, ascending (`asc`) or descending (`desc`). + * @param {VersionSortBy} [orderby] The field to sort by. Can be one of: * `name` * `createdOn` + * @param {string} [groupId] Filter by group Id. + * @param {string} [artifactId] Filter by artifact Id. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VersionsApi + */ + public searchVersionsByContent(body: File, canonical?: boolean, artifactType?: string, offset?: number, limit?: number, order?: SortOrder, orderby?: VersionSortBy, groupId?: string, artifactId?: string, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).searchVersionsByContent(body, canonical, artifactType, offset, limit, order, orderby, groupId, artifactId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The `artifactId`, unique `version` number, and `commentId` must be provided. 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`) * No comment with this `commentId` exists (HTTP error `404`) * A server error occurred (HTTP error `500`) + * @summary Update a comment + * @param {string} groupId The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. Must follow the \".{1,512}\" pattern. + * @param {string} artifactId The artifact ID. Can be a string (client-provided) or UUID (server-generated), representing the unique artifact identifier. Must follow the \".{1,512}\" pattern. + * @param {string} versionExpression An expression resolvable to a specific version ID within the given group and artifact. The following rules apply: - If the expression is in the form \"branch={branchId}\", and artifact branch {branchId} exists: The expression is resolved to a version that the branch points to. - Otherwise: The expression is resolved to a version with the same ID, which must follow the \"[a-zA-Z0-9._\\\\-+]{1,256}\" pattern. + * @param {string} commentId The unique identifier of a single comment. + * @param {NewComment} newComment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VersionsApi */ - public updateArtifactVersionState(groupId: string, artifactId: string, version: string, updateState: UpdateState, options?: AxiosRequestConfig) { - return VersionsApiFp(this.configuration).updateArtifactVersionState(groupId, artifactId, version, updateState, options).then((request) => request(this.axios, this.basePath)); + public updateArtifactVersionComment(groupId: string, artifactId: string, versionExpression: string, commentId: string, newComment: NewComment, options?: RawAxiosRequestConfig) { + return VersionsApiFp(this.configuration).updateArtifactVersionComment(groupId, artifactId, versionExpression, commentId, newComment, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/base.ts b/src/base.ts index 2f1218b..0afc541 100644 --- a/src/base.ts +++ b/src/base.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * Apicurio Registry API [v2] - * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. + * Apicurio Registry API [v3] + * 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/v3` by default. Therefore you must prefix all API operation paths with `/apis/registry/v3` in this case. For example: `/apis/registry/v3/ids/globalIds/{globalId}`. * - * The version of the OpenAPI document: 2.4.x + * The version of the OpenAPI document: 3.0.x * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** @@ -53,7 +53,7 @@ export class BaseAPI { constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; + this.basePath = configuration.basePath ?? basePath; } } }; @@ -70,3 +70,17 @@ export class RequiredError extends Error { this.name = "RequiredError" } } + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/src/common.ts b/src/common.ts index b5f1509..c6c34b8 100644 --- a/src/common.ts +++ b/src/common.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * Apicurio Registry API [v2] - * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. + * Apicurio Registry API [v3] + * 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/v3` by default. Therefore you must prefix all API operation paths with `/apis/registry/v3` in this case. For example: `/apis/registry/v3/ids/globalIds/{globalId}`. * - * The version of the OpenAPI document: 2.4.x + * The version of the OpenAPI document: 3.0.x * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -144,7 +144,7 @@ export const toPathString = function (url: URL) { */ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url}; + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; return axios.request(axiosRequestArgs); }; } diff --git a/src/configuration.ts b/src/configuration.ts index 14e2c5f..61a34ab 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * Apicurio Registry API [v2] - * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. + * Apicurio Registry API [v3] + * 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/v3` by default. Therefore you must prefix all API operation paths with `/apis/registry/v3` in this case. For example: `/apis/registry/v3/ids/globalIds/{globalId}`. * - * The version of the OpenAPI document: 2.4.x + * The version of the OpenAPI document: 3.0.x * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,6 +19,7 @@ export interface ConfigurationParameters { password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); basePath?: string; + serverIndex?: number; baseOptions?: any; formDataCtor?: new () => any; } @@ -58,6 +59,13 @@ export class Configuration { * @memberof Configuration */ basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; /** * base options for axios calls * @@ -80,6 +88,7 @@ export class Configuration { this.password = param.password; this.accessToken = param.accessToken; this.basePath = param.basePath; + this.serverIndex = param.serverIndex; this.baseOptions = param.baseOptions; this.formDataCtor = param.formDataCtor; } diff --git a/src/index.ts b/src/index.ts index 52d19c4..db65375 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * Apicurio Registry API [v2] - * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. + * Apicurio Registry API [v3] + * 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/v3` by default. Therefore you must prefix all API operation paths with `/apis/registry/v3` in this case. For example: `/apis/registry/v3/ids/globalIds/{globalId}`. * - * The version of the OpenAPI document: 2.4.x + * The version of the OpenAPI document: 3.0.x * Contact: apicurio@lists.jboss.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).