Skip to content
Snippets Groups Projects
Commit 701f6d1a authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

Merge branch 'Issue/2981-dataPubInDb' into 'main'

New: Client for Data Publication Request feature

See merge request !116
parents be6b7ae7 02de0f5f
No related branches found
No related tags found
1 merge request!116New: Client for Data Publication Request feature
......@@ -11,7 +11,7 @@ services:
MOCKUP: "false"
command: /bin/sh -c "while sleep 2s; do :; done"
volumes:
- ..:/workspace/app:cached
- ..:/workspace/api-client:cached
- ./.vscode-server:/home/node/.vscode-server/:cached
- ${SSH_AUTH_SOCK}:/.ssh/ssh-agent.sock
networks:
......
......@@ -22,9 +22,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base';
// @ts-ignore
import type { PublicationRequestForCreationDto } from '../../@coscine/model';
import type { ProjectPublicationRequestDtoResponse } from '../../@coscine/model';
// @ts-ignore
import type { PublicationRequestForCreationDtoResponse } from '../../@coscine/model';
import type { PublicationRequestForCreationDto } from '../../@coscine/model';
/**
* ProjectPublicationRequestApi - axios parameter creator
* @export
......@@ -104,6 +104,47 @@ export const ProjectPublicationRequestApiAxiosParamCreator = function (configura
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(publicationRequestForCreationDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Retrieves a publication request.
* @param {string} projectId The ID of the project.
* @param {string} publicationRequestId The ID of the publication request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPublicationRequest: async (projectId: string, publicationRequestId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'projectId' is not null or undefined
assertParamExists('getPublicationRequest', 'projectId', projectId)
// verify required parameter 'publicationRequestId' is not null or undefined
assertParamExists('getPublicationRequest', 'publicationRequestId', publicationRequestId)
const localVarPath = `/api/v2/projects/{projectId}/publications/requests/{publicationRequestId}`
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
.replace(`{${"publicationRequestId"}}`, encodeURIComponent(String(publicationRequestId)));
// 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;
// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
......@@ -140,12 +181,26 @@ export const ProjectPublicationRequestApiFp = function(configuration?: Configura
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createPublicationRequest(projectId: string, publicationRequestForCreationDto?: PublicationRequestForCreationDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PublicationRequestForCreationDtoResponse>> {
async createPublicationRequest(projectId: string, publicationRequestForCreationDto?: PublicationRequestForCreationDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectPublicationRequestDtoResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createPublicationRequest(projectId, publicationRequestForCreationDto, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['ProjectPublicationRequestApi.createPublicationRequest']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Retrieves a publication request.
* @param {string} projectId The ID of the project.
* @param {string} publicationRequestId The ID of the publication request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getPublicationRequest(projectId: string, publicationRequestId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectPublicationRequestDtoResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicationRequest(projectId, publicationRequestId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['ProjectPublicationRequestApi.getPublicationRequest']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
......@@ -173,9 +228,19 @@ export const ProjectPublicationRequestApiFactory = function (configuration?: Con
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPublicationRequest(requestParameters: ProjectPublicationRequestApiCreatePublicationRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<PublicationRequestForCreationDtoResponse> {
createPublicationRequest(requestParameters: ProjectPublicationRequestApiCreatePublicationRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProjectPublicationRequestDtoResponse> {
return localVarFp.createPublicationRequest(requestParameters.projectId, requestParameters.publicationRequestForCreationDto, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Retrieves a publication request.
* @param {ProjectPublicationRequestApiGetPublicationRequestRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPublicationRequest(requestParameters: ProjectPublicationRequestApiGetPublicationRequestRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProjectPublicationRequestDtoResponse> {
return localVarFp.getPublicationRequest(requestParameters.projectId, requestParameters.publicationRequestId, options).then((request) => request(axios, basePath));
},
};
};
......@@ -214,6 +279,27 @@ export interface ProjectPublicationRequestApiCreatePublicationRequestRequest {
readonly publicationRequestForCreationDto?: PublicationRequestForCreationDto
}
/**
* Request parameters for getPublicationRequest operation in ProjectPublicationRequestApi.
* @export
* @interface ProjectPublicationRequestApiGetPublicationRequestRequest
*/
export interface ProjectPublicationRequestApiGetPublicationRequestRequest {
/**
* The ID of the project.
* @type {string}
* @memberof ProjectPublicationRequestApiGetPublicationRequest
*/
readonly projectId: string
/**
* The ID of the publication request.
* @type {string}
* @memberof ProjectPublicationRequestApiGetPublicationRequest
*/
readonly publicationRequestId: string
}
/**
* ProjectPublicationRequestApi - object-oriented interface
* @export
......@@ -244,5 +330,17 @@ export class ProjectPublicationRequestApi extends BaseAPI {
public createPublicationRequest(requestParameters: ProjectPublicationRequestApiCreatePublicationRequestRequest, options?: RawAxiosRequestConfig) {
return ProjectPublicationRequestApiFp(this.configuration).createPublicationRequest(requestParameters.projectId, requestParameters.publicationRequestForCreationDto, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Retrieves a publication request.
* @param {ProjectPublicationRequestApiGetPublicationRequestRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectPublicationRequestApi
*/
public getPublicationRequest(requestParameters: ProjectPublicationRequestApiGetPublicationRequestRequest, options?: RawAxiosRequestConfig) {
return ProjectPublicationRequestApiFp(this.configuration).getPublicationRequest(requestParameters.projectId, requestParameters.publicationRequestId, options).then((request) => request(this.axios, this.basePath));
}
}
......@@ -86,6 +86,8 @@ export * from './project-invitation-dto-response';
export * from './project-invitation-for-project-manipulation-dto';
export * from './project-invitation-resolve-dto';
export * from './project-minimal-dto';
export * from './project-publication-request-dto';
export * from './project-publication-request-dto-response';
export * from './project-quota-dto';
export * from './project-quota-dto-paged-response';
export * from './project-quota-dto-response';
......@@ -105,7 +107,6 @@ export * from './public-user-dto';
export * from './public-user-dto-ienumerable-response';
export * from './publication-advisory-service-dto';
export * from './publication-request-for-creation-dto';
export * from './publication-request-for-creation-dto-response';
export * from './quota-dto';
export * from './quota-for-manipulation-dto';
export * from './quota-unit';
......
......@@ -15,36 +15,36 @@
// May contain unused imports in some cases
// @ts-ignore
import type { PublicationRequestForCreationDto } from './publication-request-for-creation-dto';
import type { ProjectPublicationRequestDto } from './project-publication-request-dto';
/**
*
* @export
* @interface PublicationRequestForCreationDtoResponse
* @interface ProjectPublicationRequestDtoResponse
*/
export interface PublicationRequestForCreationDtoResponse {
export interface ProjectPublicationRequestDtoResponse {
/**
*
* @type {PublicationRequestForCreationDto}
* @memberof PublicationRequestForCreationDtoResponse
* @type {ProjectPublicationRequestDto}
* @memberof ProjectPublicationRequestDtoResponse
*/
'data'?: PublicationRequestForCreationDto;
'data'?: ProjectPublicationRequestDto;
/**
*
* @type {boolean}
* @memberof PublicationRequestForCreationDtoResponse
* @memberof ProjectPublicationRequestDtoResponse
*/
'isSuccess'?: boolean;
/**
*
* @type {number}
* @memberof PublicationRequestForCreationDtoResponse
* @memberof ProjectPublicationRequestDtoResponse
*/
'statusCode'?: number | null;
/**
*
* @type {string}
* @memberof PublicationRequestForCreationDtoResponse
* @memberof ProjectPublicationRequestDtoResponse
*/
'traceId'?: string | null;
}
......
/* tslint:disable */
/* eslint-disable */
/**
* Coscine Web API
* Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project.
*
* The version of the OpenAPI document: 2.0
* Contact: servicedesk@itc.rwth-aachen.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { ProjectMinimalDto } from './project-minimal-dto';
// May contain unused imports in some cases
// @ts-ignore
import type { ResourceMinimalDto } from './resource-minimal-dto';
// May contain unused imports in some cases
// @ts-ignore
import type { UserMinimalDto } from './user-minimal-dto';
/**
* Represents a data transfer object (DTO) for a project publication request.
* @export
* @interface ProjectPublicationRequestDto
*/
export interface ProjectPublicationRequestDto {
/**
* Unique identifier for the project publication request.
* @type {string}
* @memberof ProjectPublicationRequestDto
*/
'id'?: string;
/**
*
* @type {ProjectMinimalDto}
* @memberof ProjectPublicationRequestDto
*/
'project'?: ProjectMinimalDto;
/**
* Identifier for the publication service used for this request.
* @type {string}
* @memberof ProjectPublicationRequestDto
*/
'publicationServiceRorId'?: string;
/**
*
* @type {UserMinimalDto}
* @memberof ProjectPublicationRequestDto
*/
'creator'?: UserMinimalDto;
/**
* The date and time when the request was created.
* @type {string}
* @memberof ProjectPublicationRequestDto
*/
'dateCreated'?: string;
/**
* Optional message associated with the publication request.
* @type {string}
* @memberof ProjectPublicationRequestDto
*/
'message'?: string | null;
/**
* Collection of the resources involved in the publication request.
* @type {Array<ResourceMinimalDto>}
* @memberof ProjectPublicationRequestDto
*/
'resources'?: Array<ResourceMinimalDto>;
}
......@@ -33,10 +33,10 @@ export interface PublicationAdvisoryServiceDto {
*/
'email': string;
/**
* The data publication service\'s info text.
* The data publication service\'s description.
* @type {string}
* @memberof PublicationAdvisoryServiceDto
*/
'text'?: string;
'description'?: string | null;
}
......@@ -25,7 +25,7 @@ export interface PublicationRequestForCreationDto {
* @type {string}
* @memberof PublicationRequestForCreationDto
*/
'dataPublicationServiceRorId': string;
'publicationServiceRorId': string;
/**
* The resource guids.
* @type {Array<string>}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment