diff --git a/generate-api-client.sh b/generate-api-client.sh index a3920d29a911e35f98cc1e35b6f9211a97345b1b..7bbb4dba6105abbbd9a01c8dba579d9dbf4698a7 100644 --- a/generate-api-client.sh +++ b/generate-api-client.sh @@ -14,7 +14,7 @@ # Defined variables: OUTPUT_DIR="temp" # The temporary directory for generated files PACKAGE_NAME="Coscine.Api" # The package name for the API client -API_SPEC_URL="https://coscine-dorsch.web.vulcanus.otc.coscine.dev/coscine/api/swagger/v2/swagger.json" # URL to the OpenAPI spec file +API_SPEC_URL="https://coscine-hristov.web.vulcanus.otc.coscine.dev/coscine/api/swagger/v2/swagger.json" # URL to the OpenAPI spec file # -------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ANSI color codes for styling diff --git a/src/Coscine.Api/@coscine/api/admin-api.ts b/src/Coscine.Api/@coscine/api/admin-api.ts index 6a11f343345a19f0f0337e5ee06f336bf0d2c0d6..4c80ce6183718761ad5bff120375d5ff881db8bc 100644 --- a/src/Coscine.Api/@coscine/api/admin-api.ts +++ b/src/Coscine.Api/@coscine/api/admin-api.ts @@ -26,8 +26,12 @@ import type { ActivityLogDtoPagedResponse } from '../../@coscine/model'; // @ts-ignore import type { CoscineHttpMethod } from '../../@coscine/model'; // @ts-ignore +import type { CreateDatasourceDtoResponse } from '../../@coscine/model'; +// @ts-ignore import type { DeployedGraphDtoPagedResponse } from '../../@coscine/model'; // @ts-ignore +import type { DsNrwReplicationGroupDto } from '../../@coscine/model'; +// @ts-ignore import type { MetadataUpdateAdminParameters } from '../../@coscine/model'; // @ts-ignore import type { ProjectAdminDtoPagedResponse } from '../../@coscine/model'; @@ -71,6 +75,57 @@ 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, + }; + }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Creates a new datasource for a specified resource and type. + * @param {string} resourceId The unique identifier of the resource. + * @param {string} typeId The unique identifier of the datasource type. + * @param {number} [quota] The allocated quota for the datasource. + * @param {DsNrwReplicationGroupDto} [replicationGroup] The replication group for the bucket. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDatasource: async (resourceId: string, typeId: string, quota?: number, replicationGroup?: DsNrwReplicationGroupDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('createDatasource', 'resourceId', resourceId) + // verify required parameter 'typeId' is not null or undefined + assertParamExists('createDatasource', 'typeId', typeId) + const localVarPath = `/api/v2/admin/resource/{resourceId}/type/{typeId}` + .replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId))) + .replace(`{${"typeId"}}`, encodeURIComponent(String(typeId))); + // 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; + + // authentication Bearer required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (quota !== undefined) { + localVarQueryParameter['quota'] = quota; + } + + if (replicationGroup !== undefined) { + localVarQueryParameter['replicationGroup'] = replicationGroup; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -508,6 +563,52 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(metadataUpdateAdminParameters, localVarRequestOptions, configuration) + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Updates the type and option ID of a specified resource. + * @param {string} resourceId The unique identifier of the resource to be updated. + * @param {string} typeId The unique identifier of the new resource type. + * @param {string} [optionId] The unique identifier of the new resource type option. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateResourceType: async (resourceId: string, typeId: string, optionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'resourceId' is not null or undefined + assertParamExists('updateResourceType', 'resourceId', resourceId) + // verify required parameter 'typeId' is not null or undefined + assertParamExists('updateResourceType', 'typeId', typeId) + const localVarPath = `/api/v2/admin/resource/{resourceId}/type/{typeId}` + .replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId))) + .replace(`{${"typeId"}}`, encodeURIComponent(String(typeId))); + // 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; + + // authentication Bearer required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (optionId !== undefined) { + localVarQueryParameter['optionId'] = optionId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -535,6 +636,22 @@ export const AdminApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AdminApi.apiV2AdminOptions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Creates a new datasource for a specified resource and type. + * @param {string} resourceId The unique identifier of the resource. + * @param {string} typeId The unique identifier of the datasource type. + * @param {number} [quota] The allocated quota for the datasource. + * @param {DsNrwReplicationGroupDto} [replicationGroup] The replication group for the bucket. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createDatasource(resourceId: string, typeId: string, quota?: number, replicationGroup?: DsNrwReplicationGroupDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateDatasourceDtoResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createDatasource(resourceId, typeId, quota, replicationGroup, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.createDatasource']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> * @summary Retrieves all activity logs. @@ -665,6 +782,21 @@ export const AdminApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AdminApi.updateMetadataGraph']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Updates the type and option ID of a specified resource. + * @param {string} resourceId The unique identifier of the resource to be updated. + * @param {string} typeId The unique identifier of the new resource type. + * @param {string} [optionId] The unique identifier of the new resource type option. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateResourceType(resourceId: string, typeId: string, optionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateResourceType(resourceId, typeId, optionId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdminApi.updateResourceType']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -684,6 +816,16 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath apiV2AdminOptions(options?: RawAxiosRequestConfig): AxiosPromise<void> { return localVarFp.apiV2AdminOptions(options).then((request) => request(axios, basePath)); }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Creates a new datasource for a specified resource and type. + * @param {AdminApiCreateDatasourceRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createDatasource(requestParameters: AdminApiCreateDatasourceRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateDatasourceDtoResponse> { + return localVarFp.createDatasource(requestParameters.resourceId, requestParameters.typeId, requestParameters.quota, requestParameters.replicationGroup, options).then((request) => request(axios, basePath)); + }, /** * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> * @summary Retrieves all activity logs. @@ -764,9 +906,54 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath updateMetadataGraph(requestParameters: AdminApiUpdateMetadataGraphRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { return localVarFp.updateMetadataGraph(requestParameters.graph, requestParameters.metadataUpdateAdminParameters, options).then((request) => request(axios, basePath)); }, + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Updates the type and option ID of a specified resource. + * @param {AdminApiUpdateResourceTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateResourceType(requestParameters: AdminApiUpdateResourceTypeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.updateResourceType(requestParameters.resourceId, requestParameters.typeId, requestParameters.optionId, options).then((request) => request(axios, basePath)); + }, }; }; +/** + * Request parameters for createDatasource operation in AdminApi. + * @export + * @interface AdminApiCreateDatasourceRequest + */ +export interface AdminApiCreateDatasourceRequest { + /** + * The unique identifier of the resource. + * @type {string} + * @memberof AdminApiCreateDatasource + */ + readonly resourceId: string + + /** + * The unique identifier of the datasource type. + * @type {string} + * @memberof AdminApiCreateDatasource + */ + readonly typeId: string + + /** + * The allocated quota for the datasource. + * @type {number} + * @memberof AdminApiCreateDatasource + */ + readonly quota?: number + + /** + * The replication group for the bucket. + * @type {DsNrwReplicationGroupDto} + * @memberof AdminApiCreateDatasource + */ + readonly replicationGroup?: DsNrwReplicationGroupDto +} + /** * Request parameters for getAllActivityLogs operation in AdminApi. * @export @@ -1061,6 +1248,34 @@ export interface AdminApiUpdateMetadataGraphRequest { readonly metadataUpdateAdminParameters?: MetadataUpdateAdminParameters } +/** + * Request parameters for updateResourceType operation in AdminApi. + * @export + * @interface AdminApiUpdateResourceTypeRequest + */ +export interface AdminApiUpdateResourceTypeRequest { + /** + * The unique identifier of the resource to be updated. + * @type {string} + * @memberof AdminApiUpdateResourceType + */ + readonly resourceId: string + + /** + * The unique identifier of the new resource type. + * @type {string} + * @memberof AdminApiUpdateResourceType + */ + readonly typeId: string + + /** + * The unique identifier of the new resource type option. + * @type {string} + * @memberof AdminApiUpdateResourceType + */ + readonly optionId?: string +} + /** * AdminApi - object-oriented interface * @export @@ -1079,6 +1294,18 @@ export class AdminApi extends BaseAPI { return AdminApiFp(this.configuration).apiV2AdminOptions(options).then((request) => request(this.axios, this.basePath)); } + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Creates a new datasource for a specified resource and type. + * @param {AdminApiCreateDatasourceRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public createDatasource(requestParameters: AdminApiCreateDatasourceRequest, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).createDatasource(requestParameters.resourceId, requestParameters.typeId, requestParameters.quota, requestParameters.replicationGroup, options).then((request) => request(this.axios, this.basePath)); + } + /** * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> * @summary Retrieves all activity logs. @@ -1174,5 +1401,17 @@ export class AdminApi extends BaseAPI { public updateMetadataGraph(requestParameters: AdminApiUpdateMetadataGraphRequest, options?: RawAxiosRequestConfig) { return AdminApiFp(this.configuration).updateMetadataGraph(requestParameters.graph, requestParameters.metadataUpdateAdminParameters, options).then((request) => request(this.axios, this.basePath)); } + + /** + * <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + * @summary Updates the type and option ID of a specified resource. + * @param {AdminApiUpdateResourceTypeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public updateResourceType(requestParameters: AdminApiUpdateResourceTypeRequest, options?: RawAxiosRequestConfig) { + return AdminApiFp(this.configuration).updateResourceType(requestParameters.resourceId, requestParameters.typeId, requestParameters.optionId, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/src/Coscine.Api/@coscine/api/notification-api.ts b/src/Coscine.Api/@coscine/api/notification-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..ca6e40e6bbe328757a673e7ac77d7631e3fdd99b --- /dev/null +++ b/src/Coscine.Api/@coscine/api/notification-api.ts @@ -0,0 +1,328 @@ +/* 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. + */ + + +import type { Configuration } from '../../configuration'; +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'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base'; +// @ts-ignore +import type { NotificationDtoPagedResponse } from '../../@coscine/model'; +// @ts-ignore +import type { NotificationDtoResponse } from '../../@coscine/model'; +/** + * NotificationApi - axios parameter creator + * @export + */ +export const NotificationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2NotificationsOptions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/notifications`; + // 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: 'OPTIONS', ...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, + }; + }, + /** + * + * @summary Retrieves a notification by ID. + * @param {string} notificationId The ID of the notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNotification: async (notificationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'notificationId' is not null or undefined + assertParamExists('getNotification', 'notificationId', notificationId) + const localVarPath = `/api/v2/notifications/{notificationId}` + .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId))); + // 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, + }; + }, + /** + * + * @summary Retrieves all notifications. + * @param {number} [pageNumber] The desired page number. Should be greater than or equal to 1. Default is 1. + * @param {number} [pageSize] The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @param {string} [orderBy] Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNotifications: async (pageNumber?: number, pageSize?: number, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/notifications`; + // 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) + + if (pageNumber !== undefined) { + localVarQueryParameter['PageNumber'] = pageNumber; + } + + if (pageSize !== undefined) { + localVarQueryParameter['PageSize'] = pageSize; + } + + if (orderBy !== undefined) { + localVarQueryParameter['OrderBy'] = orderBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotificationApi - functional programming interface + * @export + */ +export const NotificationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV2NotificationsOptions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2NotificationsOptions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationApi.apiV2NotificationsOptions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves a notification by ID. + * @param {string} notificationId The ID of the notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotificationDtoResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNotification(notificationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationApi.getNotification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves all notifications. + * @param {number} [pageNumber] The desired page number. Should be greater than or equal to 1. Default is 1. + * @param {number} [pageSize] The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @param {string} [orderBy] Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNotifications(pageNumber?: number, pageSize?: number, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotificationDtoPagedResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNotifications(pageNumber, pageSize, orderBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationApi.getNotifications']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * NotificationApi - factory interface + * @export + */ +export const NotificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationApiFp(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2NotificationsOptions(options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.apiV2NotificationsOptions(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves a notification by ID. + * @param {NotificationApiGetNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNotification(requestParameters: NotificationApiGetNotificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<NotificationDtoResponse> { + return localVarFp.getNotification(requestParameters.notificationId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves all notifications. + * @param {NotificationApiGetNotificationsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNotifications(requestParameters: NotificationApiGetNotificationsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<NotificationDtoPagedResponse> { + return localVarFp.getNotifications(requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getNotification operation in NotificationApi. + * @export + * @interface NotificationApiGetNotificationRequest + */ +export interface NotificationApiGetNotificationRequest { + /** + * The ID of the notification. + * @type {string} + * @memberof NotificationApiGetNotification + */ + readonly notificationId: string +} + +/** + * Request parameters for getNotifications operation in NotificationApi. + * @export + * @interface NotificationApiGetNotificationsRequest + */ +export interface NotificationApiGetNotificationsRequest { + /** + * The desired page number. Should be greater than or equal to 1. Default is 1. + * @type {number} + * @memberof NotificationApiGetNotifications + */ + readonly pageNumber?: number + + /** + * The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @type {number} + * @memberof NotificationApiGetNotifications + */ + readonly pageSize?: number + + /** + * Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @type {string} + * @memberof NotificationApiGetNotifications + */ + readonly orderBy?: string +} + +/** + * NotificationApi - object-oriented interface + * @export + * @class NotificationApi + * @extends {BaseAPI} + */ +export class NotificationApi extends BaseAPI { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationApi + */ + public apiV2NotificationsOptions(options?: RawAxiosRequestConfig) { + return NotificationApiFp(this.configuration).apiV2NotificationsOptions(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves a notification by ID. + * @param {NotificationApiGetNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationApi + */ + public getNotification(requestParameters: NotificationApiGetNotificationRequest, options?: RawAxiosRequestConfig) { + return NotificationApiFp(this.configuration).getNotification(requestParameters.notificationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves all notifications. + * @param {NotificationApiGetNotificationsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationApi + */ + public getNotifications(requestParameters: NotificationApiGetNotificationsRequest = {}, options?: RawAxiosRequestConfig) { + return NotificationApiFp(this.configuration).getNotifications(requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/Coscine.Api/@coscine/api/user-notification-opt-out-api.ts b/src/Coscine.Api/@coscine/api/user-notification-opt-out-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fdc3c9ee39da3733880494aad85db43cd49dcc3 --- /dev/null +++ b/src/Coscine.Api/@coscine/api/user-notification-opt-out-api.ts @@ -0,0 +1,502 @@ +/* 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. + */ + + +import type { Configuration } from '../../configuration'; +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'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base'; +// @ts-ignore +import type { UserNotificationForCreationDto } from '../../@coscine/model'; +// @ts-ignore +import type { UserNotificationOptOutDtoPagedResponse } from '../../@coscine/model'; +// @ts-ignore +import type { UserNotificationOptOutDtoResponse } from '../../@coscine/model'; +/** + * UserNotificationOptOutApi - axios parameter creator + * @export + */ +export const UserNotificationOptOutApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2UserNotificationsOptions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/user-notifications`; + // 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: 'OPTIONS', ...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, + }; + }, + /** + * + * @summary Creates a user notification for a specified user. + * @param {UserNotificationForCreationDto} [userNotificationForCreationDto] The user notification data for creation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUserNotification: async (userNotificationForCreationDto?: UserNotificationForCreationDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/user-notifications`; + // 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; + + // authentication Bearer required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(userNotificationForCreationDto, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deletes a user notification for a specified user. + * @param {string} id The Id of the user notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUserNotification: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteUserNotification', 'id', id) + const localVarPath = `/api/v2/user-notifications/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // 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; + + // 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, + }; + }, + /** + * + * @summary Retrieves a user notification for a specified notification. + * @param {string} notificationId The Id of the notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserNotification: async (notificationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'notificationId' is not null or undefined + assertParamExists('getUserNotification', 'notificationId', notificationId) + const localVarPath = `/api/v2/user-notifications/{notificationId}` + .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId))); + // 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, + }; + }, + /** + * + * @summary Retrieves all user notifications of the current user. + * @param {number} [pageNumber] The desired page number. Should be greater than or equal to 1. Default is 1. + * @param {number} [pageSize] The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @param {string} [orderBy] Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserNotifications: async (pageNumber?: number, pageSize?: number, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/user-notifications`; + // 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) + + if (pageNumber !== undefined) { + localVarQueryParameter['PageNumber'] = pageNumber; + } + + if (pageSize !== undefined) { + localVarQueryParameter['PageSize'] = pageSize; + } + + if (orderBy !== undefined) { + localVarQueryParameter['OrderBy'] = orderBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserNotificationOptOutApi - functional programming interface + * @export + */ +export const UserNotificationOptOutApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserNotificationOptOutApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV2UserNotificationsOptions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2UserNotificationsOptions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserNotificationOptOutApi.apiV2UserNotificationsOptions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Creates a user notification for a specified user. + * @param {UserNotificationForCreationDto} [userNotificationForCreationDto] The user notification data for creation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUserNotification(userNotificationForCreationDto?: UserNotificationForCreationDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserNotificationOptOutDtoResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUserNotification(userNotificationForCreationDto, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserNotificationOptOutApi.createUserNotification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Deletes a user notification for a specified user. + * @param {string} id The Id of the user notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUserNotification(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUserNotification(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserNotificationOptOutApi.deleteUserNotification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves a user notification for a specified notification. + * @param {string} notificationId The Id of the notification. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserNotificationOptOutDtoResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserNotification(notificationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserNotificationOptOutApi.getUserNotification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves all user notifications of the current user. + * @param {number} [pageNumber] The desired page number. Should be greater than or equal to 1. Default is 1. + * @param {number} [pageSize] The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @param {string} [orderBy] Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserNotifications(pageNumber?: number, pageSize?: number, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserNotificationOptOutDtoPagedResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserNotifications(pageNumber, pageSize, orderBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserNotificationOptOutApi.getUserNotifications']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * UserNotificationOptOutApi - factory interface + * @export + */ +export const UserNotificationOptOutApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserNotificationOptOutApiFp(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2UserNotificationsOptions(options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.apiV2UserNotificationsOptions(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates a user notification for a specified user. + * @param {UserNotificationOptOutApiCreateUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUserNotification(requestParameters: UserNotificationOptOutApiCreateUserNotificationRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<UserNotificationOptOutDtoResponse> { + return localVarFp.createUserNotification(requestParameters.userNotificationForCreationDto, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deletes a user notification for a specified user. + * @param {UserNotificationOptOutApiDeleteUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUserNotification(requestParameters: UserNotificationOptOutApiDeleteUserNotificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.deleteUserNotification(requestParameters.id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves a user notification for a specified notification. + * @param {UserNotificationOptOutApiGetUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserNotification(requestParameters: UserNotificationOptOutApiGetUserNotificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserNotificationOptOutDtoResponse> { + return localVarFp.getUserNotification(requestParameters.notificationId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves all user notifications of the current user. + * @param {UserNotificationOptOutApiGetUserNotificationsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserNotifications(requestParameters: UserNotificationOptOutApiGetUserNotificationsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<UserNotificationOptOutDtoPagedResponse> { + return localVarFp.getUserNotifications(requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for createUserNotification operation in UserNotificationOptOutApi. + * @export + * @interface UserNotificationOptOutApiCreateUserNotificationRequest + */ +export interface UserNotificationOptOutApiCreateUserNotificationRequest { + /** + * The user notification data for creation. + * @type {UserNotificationForCreationDto} + * @memberof UserNotificationOptOutApiCreateUserNotification + */ + readonly userNotificationForCreationDto?: UserNotificationForCreationDto +} + +/** + * Request parameters for deleteUserNotification operation in UserNotificationOptOutApi. + * @export + * @interface UserNotificationOptOutApiDeleteUserNotificationRequest + */ +export interface UserNotificationOptOutApiDeleteUserNotificationRequest { + /** + * The Id of the user notification. + * @type {string} + * @memberof UserNotificationOptOutApiDeleteUserNotification + */ + readonly id: string +} + +/** + * Request parameters for getUserNotification operation in UserNotificationOptOutApi. + * @export + * @interface UserNotificationOptOutApiGetUserNotificationRequest + */ +export interface UserNotificationOptOutApiGetUserNotificationRequest { + /** + * The Id of the notification. + * @type {string} + * @memberof UserNotificationOptOutApiGetUserNotification + */ + readonly notificationId: string +} + +/** + * Request parameters for getUserNotifications operation in UserNotificationOptOutApi. + * @export + * @interface UserNotificationOptOutApiGetUserNotificationsRequest + */ +export interface UserNotificationOptOutApiGetUserNotificationsRequest { + /** + * The desired page number. Should be greater than or equal to 1. Default is 1. + * @type {number} + * @memberof UserNotificationOptOutApiGetUserNotifications + */ + readonly pageNumber?: number + + /** + * The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @type {number} + * @memberof UserNotificationOptOutApiGetUserNotifications + */ + readonly pageSize?: number + + /** + * Gets or sets the field name used for ordering the results. The order is constructed by an order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @type {string} + * @memberof UserNotificationOptOutApiGetUserNotifications + */ + readonly orderBy?: string +} + +/** + * UserNotificationOptOutApi - object-oriented interface + * @export + * @class UserNotificationOptOutApi + * @extends {BaseAPI} + */ +export class UserNotificationOptOutApi extends BaseAPI { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserNotificationOptOutApi + */ + public apiV2UserNotificationsOptions(options?: RawAxiosRequestConfig) { + return UserNotificationOptOutApiFp(this.configuration).apiV2UserNotificationsOptions(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates a user notification for a specified user. + * @param {UserNotificationOptOutApiCreateUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserNotificationOptOutApi + */ + public createUserNotification(requestParameters: UserNotificationOptOutApiCreateUserNotificationRequest = {}, options?: RawAxiosRequestConfig) { + return UserNotificationOptOutApiFp(this.configuration).createUserNotification(requestParameters.userNotificationForCreationDto, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deletes a user notification for a specified user. + * @param {UserNotificationOptOutApiDeleteUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserNotificationOptOutApi + */ + public deleteUserNotification(requestParameters: UserNotificationOptOutApiDeleteUserNotificationRequest, options?: RawAxiosRequestConfig) { + return UserNotificationOptOutApiFp(this.configuration).deleteUserNotification(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves a user notification for a specified notification. + * @param {UserNotificationOptOutApiGetUserNotificationRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserNotificationOptOutApi + */ + public getUserNotification(requestParameters: UserNotificationOptOutApiGetUserNotificationRequest, options?: RawAxiosRequestConfig) { + return UserNotificationOptOutApiFp(this.configuration).getUserNotification(requestParameters.notificationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves all user notifications of the current user. + * @param {UserNotificationOptOutApiGetUserNotificationsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserNotificationOptOutApi + */ + public getUserNotifications(requestParameters: UserNotificationOptOutApiGetUserNotificationsRequest = {}, options?: RawAxiosRequestConfig) { + return UserNotificationOptOutApiFp(this.configuration).getUserNotifications(requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/Coscine.Api/@coscine/model/create-datasource-dto-response.ts b/src/Coscine.Api/@coscine/model/create-datasource-dto-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1d9881f6a1d6186672d0210954564b891f06c2e --- /dev/null +++ b/src/Coscine.Api/@coscine/model/create-datasource-dto-response.ts @@ -0,0 +1,51 @@ +/* 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 { CreateDatasourceDto } from './create-datasource-dto'; + +/** + * + * @export + * @interface CreateDatasourceDtoResponse + */ +export interface CreateDatasourceDtoResponse { + /** + * + * @type {CreateDatasourceDto} + * @memberof CreateDatasourceDtoResponse + */ + 'data'?: CreateDatasourceDto; + /** + * + * @type {boolean} + * @memberof CreateDatasourceDtoResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof CreateDatasourceDtoResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof CreateDatasourceDtoResponse + */ + 'traceId'?: string | null; +} + diff --git a/src/Coscine.Api/@coscine/model/create-datasource-dto.ts b/src/Coscine.Api/@coscine/model/create-datasource-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..1a2540fe697916e2c73bd27f5220dfee188cd36a --- /dev/null +++ b/src/Coscine.Api/@coscine/model/create-datasource-dto.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * Represents the data transfer object for creating a datasource. + * @export + * @interface CreateDatasourceDto + */ +export interface CreateDatasourceDto { + /** + * Gets or initializes the unique identifier of the resource type option. + * @type {string} + * @memberof CreateDatasourceDto + */ + 'resourceTypeOptionId'?: string | null; +} + diff --git a/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-resource-type-options-for-manipulation-dto.ts b/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-resource-type-options-for-manipulation-dto.ts index 030933c21bf95f9e7a54529829030a816fe46073..96f8a60be388425374d18e4b84af93325ba09a62 100644 --- a/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-resource-type-options-for-manipulation-dto.ts +++ b/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-resource-type-options-for-manipulation-dto.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import type { DsNrwReplicationGroupDto } from './ds-nrw-replication-group-dto'; // May contain unused imports in some cases // @ts-ignore import type { QuotaForManipulationDto } from './quota-for-manipulation-dto'; @@ -29,5 +32,13 @@ export interface DataStorageNrwS3ResourceTypeOptionsForManipulationDto { * @memberof DataStorageNrwS3ResourceTypeOptionsForManipulationDto */ 'quota': QuotaForManipulationDto; + /** + * + * @type {DsNrwReplicationGroupDto} + * @memberof DataStorageNrwS3ResourceTypeOptionsForManipulationDto + */ + 'replicationGroup'?: DsNrwReplicationGroupDto; } + + diff --git a/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-worm-resource-type-options-for-manipulation-dto.ts b/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-worm-resource-type-options-for-manipulation-dto.ts index d32c9632504c5a976176f0d731d4fa29bd708449..1f0bc4f40c06f3adeb9ab93fb67bbeb27d581c34 100644 --- a/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-worm-resource-type-options-for-manipulation-dto.ts +++ b/src/Coscine.Api/@coscine/model/data-storage-nrw-s3-worm-resource-type-options-for-manipulation-dto.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import type { DsNrwReplicationGroupDto } from './ds-nrw-replication-group-dto'; // May contain unused imports in some cases // @ts-ignore import type { QuotaForManipulationDto } from './quota-for-manipulation-dto'; @@ -29,5 +32,13 @@ export interface DataStorageNrwS3WormResourceTypeOptionsForManipulationDto { * @memberof DataStorageNrwS3WormResourceTypeOptionsForManipulationDto */ 'quota': QuotaForManipulationDto; + /** + * + * @type {DsNrwReplicationGroupDto} + * @memberof DataStorageNrwS3WormResourceTypeOptionsForManipulationDto + */ + 'replicationGroup'?: DsNrwReplicationGroupDto; } + + diff --git a/src/Coscine.Api/@coscine/model/data-storage-nrw-web-resource-type-options-for-manipulation-dto.ts b/src/Coscine.Api/@coscine/model/data-storage-nrw-web-resource-type-options-for-manipulation-dto.ts index 6969f7a03917617684643ae453cd1e209e1dbdd2..82bdcccf8052bd011ba3d9f37ca0d1afe3a8fb92 100644 --- a/src/Coscine.Api/@coscine/model/data-storage-nrw-web-resource-type-options-for-manipulation-dto.ts +++ b/src/Coscine.Api/@coscine/model/data-storage-nrw-web-resource-type-options-for-manipulation-dto.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import type { DsNrwReplicationGroupDto } from './ds-nrw-replication-group-dto'; // May contain unused imports in some cases // @ts-ignore import type { QuotaForManipulationDto } from './quota-for-manipulation-dto'; @@ -29,5 +32,13 @@ export interface DataStorageNrwWebResourceTypeOptionsForManipulationDto { * @memberof DataStorageNrwWebResourceTypeOptionsForManipulationDto */ 'quota': QuotaForManipulationDto; + /** + * + * @type {DsNrwReplicationGroupDto} + * @memberof DataStorageNrwWebResourceTypeOptionsForManipulationDto + */ + 'replicationGroup'?: DsNrwReplicationGroupDto; } + + diff --git a/src/Coscine.Api/@coscine/model/ds-nrw-replication-group-dto.ts b/src/Coscine.Api/@coscine/model/ds-nrw-replication-group-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..6d0fb1a1cf8fd94102ce902459cdd5cbd6c11a3d --- /dev/null +++ b/src/Coscine.Api/@coscine/model/ds-nrw-replication-group-dto.ts @@ -0,0 +1,31 @@ +/* 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. + */ + + + +/** + * Possible replication groups for the DS NRW. + * @export + * @enum {string} + */ + +export const DsNrwReplicationGroupDto = { + RWTH_UDE: 'RWTH-UDE', + UZK_UPB: 'UZK-UPB' +} as const; + +export type DsNrwReplicationGroupDto = typeof DsNrwReplicationGroupDto[keyof typeof DsNrwReplicationGroupDto]; + + + diff --git a/src/Coscine.Api/@coscine/model/index.ts b/src/Coscine.Api/@coscine/model/index.ts index 69e381a77a22e4ef9a331639df9400d2e0e1054f..217075e0272c424c0cd5be14a843b67b492ab7ed 100644 --- a/src/Coscine.Api/@coscine/model/index.ts +++ b/src/Coscine.Api/@coscine/model/index.ts @@ -13,6 +13,8 @@ export * from './application-profile-for-creation-dto-response'; export * from './application-profile-for-resource-creation-dto'; export * from './application-profile-minimal-dto'; export * from './coscine-http-method'; +export * from './create-datasource-dto'; +export * from './create-datasource-dto-response'; export * from './data-storage-nrw-s3-options-dto'; export * from './data-storage-nrw-s3-resource-type-options-for-manipulation-dto'; export * from './data-storage-nrw-s3-worm-options-dto'; @@ -27,6 +29,7 @@ export * from './discipline-dto-response'; export * from './discipline-for-project-manipulation-dto'; export * from './discipline-for-resource-manipulation-dto'; export * from './discipline-for-user-manipulation-dto'; +export * from './ds-nrw-replication-group-dto'; export * from './extracted-metadata-tree-for-creation-dto'; export * from './extracted-metadata-tree-for-update-dto'; export * from './file-action-dto'; @@ -73,6 +76,9 @@ export * from './metadata-tree-for-creation-dto'; export * from './metadata-tree-for-deletion-dto'; export * from './metadata-tree-for-update-dto'; export * from './metadata-update-admin-parameters'; +export * from './notification-dto'; +export * from './notification-dto-paged-response'; +export * from './notification-dto-response'; export * from './organization-dto'; export * from './organization-dto-paged-response'; export * from './organization-dto-response'; @@ -181,6 +187,10 @@ export * from './user-for-update-dto'; export * from './user-merge-dto'; export * from './user-merge-dto-response'; export * from './user-minimal-dto'; +export * from './user-notification-for-creation-dto'; +export * from './user-notification-opt-out-dto'; +export * from './user-notification-opt-out-dto-paged-response'; +export * from './user-notification-opt-out-dto-response'; export * from './user-organization-dto'; export * from './user-terms-of-service-accept-dto'; export * from './variant-dto'; diff --git a/src/Coscine.Api/@coscine/model/notification-dto-paged-response.ts b/src/Coscine.Api/@coscine/model/notification-dto-paged-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..f5f287110e531671fe895da4326d6cf2730cd83f --- /dev/null +++ b/src/Coscine.Api/@coscine/model/notification-dto-paged-response.ts @@ -0,0 +1,60 @@ +/* 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 { NotificationDto } from './notification-dto'; +// May contain unused imports in some cases +// @ts-ignore +import type { Pagination } from './pagination'; + +/** + * + * @export + * @interface NotificationDtoPagedResponse + */ +export interface NotificationDtoPagedResponse { + /** + * + * @type {Array<NotificationDto>} + * @memberof NotificationDtoPagedResponse + */ + 'data'?: Array<NotificationDto> | null; + /** + * + * @type {boolean} + * @memberof NotificationDtoPagedResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof NotificationDtoPagedResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof NotificationDtoPagedResponse + */ + 'traceId'?: string | null; + /** + * + * @type {Pagination} + * @memberof NotificationDtoPagedResponse + */ + 'pagination'?: Pagination; +} + diff --git a/src/Coscine.Api/@coscine/model/notification-dto-response.ts b/src/Coscine.Api/@coscine/model/notification-dto-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..395bc7b38b929f9d303818afa31854c0ca8b83c4 --- /dev/null +++ b/src/Coscine.Api/@coscine/model/notification-dto-response.ts @@ -0,0 +1,51 @@ +/* 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 { NotificationDto } from './notification-dto'; + +/** + * + * @export + * @interface NotificationDtoResponse + */ +export interface NotificationDtoResponse { + /** + * + * @type {NotificationDto} + * @memberof NotificationDtoResponse + */ + 'data'?: NotificationDto; + /** + * + * @type {boolean} + * @memberof NotificationDtoResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof NotificationDtoResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof NotificationDtoResponse + */ + 'traceId'?: string | null; +} + diff --git a/src/Coscine.Api/@coscine/model/notification-dto.ts b/src/Coscine.Api/@coscine/model/notification-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2897c08b90672b0f39c32cd53108a5cd14b3cef --- /dev/null +++ b/src/Coscine.Api/@coscine/model/notification-dto.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * Represents a minimal data transfer object (DTO) for a notification. + * @export + * @interface NotificationDto + */ +export interface NotificationDto { + /** + * Unique identifier for the project notification. + * @type {string} + * @memberof NotificationDto + */ + 'id': string; + /** + * category of the notification. + * @type {string} + * @memberof NotificationDto + */ + 'category': string; +} + diff --git a/src/Coscine.Api/@coscine/model/user-dto.ts b/src/Coscine.Api/@coscine/model/user-dto.ts index 67d98a5bda7520d34c4f57625def9d3245f5ccd7..156af9da59b802b9682bd56966f00ad51b5164a4 100644 --- a/src/Coscine.Api/@coscine/model/user-dto.ts +++ b/src/Coscine.Api/@coscine/model/user-dto.ts @@ -55,13 +55,13 @@ export interface UserDto { * @type {string} * @memberof UserDto */ - 'givenName': string; + 'givenName'?: string | null; /** * The family name of the user. * @type {string} * @memberof UserDto */ - 'familyName': string; + 'familyName'?: string | null; /** * The email addresses associated with the user. * @type {Array<UserEmailDto>} @@ -79,7 +79,7 @@ export interface UserDto { * @type {LanguageDto} * @memberof UserDto */ - 'language': LanguageDto; + 'language'?: LanguageDto; /** * Indicates if the terms of service are accepted by the user. * @type {boolean} diff --git a/src/Coscine.Api/@coscine/model/user-notification-for-creation-dto.ts b/src/Coscine.Api/@coscine/model/user-notification-for-creation-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..9443178afd4209f2a2f6f8d471d44fc23c28c61c --- /dev/null +++ b/src/Coscine.Api/@coscine/model/user-notification-for-creation-dto.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * Data transfer object (DTO) representing the creation of a user notification. + * @export + * @interface UserNotificationForCreationDto + */ +export interface UserNotificationForCreationDto { + /** + * The id of the notification. + * @type {string} + * @memberof UserNotificationForCreationDto + */ + 'notificationId': string; +} + diff --git a/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-paged-response.ts b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-paged-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..1942e9fd85a7fce80d6c8219f26b850dff77adad --- /dev/null +++ b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-paged-response.ts @@ -0,0 +1,60 @@ +/* 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 { Pagination } from './pagination'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserNotificationOptOutDto } from './user-notification-opt-out-dto'; + +/** + * + * @export + * @interface UserNotificationOptOutDtoPagedResponse + */ +export interface UserNotificationOptOutDtoPagedResponse { + /** + * + * @type {Array<UserNotificationOptOutDto>} + * @memberof UserNotificationOptOutDtoPagedResponse + */ + 'data'?: Array<UserNotificationOptOutDto> | null; + /** + * + * @type {boolean} + * @memberof UserNotificationOptOutDtoPagedResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof UserNotificationOptOutDtoPagedResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof UserNotificationOptOutDtoPagedResponse + */ + 'traceId'?: string | null; + /** + * + * @type {Pagination} + * @memberof UserNotificationOptOutDtoPagedResponse + */ + 'pagination'?: Pagination; +} + diff --git a/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-response.ts b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..267b0d70e183e786c9ae830d908945df2d4b3dbb --- /dev/null +++ b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto-response.ts @@ -0,0 +1,51 @@ +/* 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 { UserNotificationOptOutDto } from './user-notification-opt-out-dto'; + +/** + * + * @export + * @interface UserNotificationOptOutDtoResponse + */ +export interface UserNotificationOptOutDtoResponse { + /** + * + * @type {UserNotificationOptOutDto} + * @memberof UserNotificationOptOutDtoResponse + */ + 'data'?: UserNotificationOptOutDto; + /** + * + * @type {boolean} + * @memberof UserNotificationOptOutDtoResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof UserNotificationOptOutDtoResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof UserNotificationOptOutDtoResponse + */ + 'traceId'?: string | null; +} + diff --git a/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto.ts b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..c813ad5d60cb6a233bb1a6887ca84ad1594edb07 --- /dev/null +++ b/src/Coscine.Api/@coscine/model/user-notification-opt-out-dto.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * Represents a minimal data transfer object (DTO) for a user notification. + * @export + * @interface UserNotificationOptOutDto + */ +export interface UserNotificationOptOutDto { + /** + * Unique identifier for the user notification. + * @type {string} + * @memberof UserNotificationOptOutDto + */ + 'id': string; + /** + * Unique identifier of the user. + * @type {string} + * @memberof UserNotificationOptOutDto + */ + 'userId': string; + /** + * Unique identifier of the notification. + * @type {string} + * @memberof UserNotificationOptOutDto + */ + 'notificationId': string; +} + diff --git a/src/Coscine.Api/@coscine/model/user-organization-dto.ts b/src/Coscine.Api/@coscine/model/user-organization-dto.ts index 232b76a75f7fa1a3035cc40b1b1f74118bf3428d..0c0d9c657261d59986564d801d8913822b041e8f 100644 --- a/src/Coscine.Api/@coscine/model/user-organization-dto.ts +++ b/src/Coscine.Api/@coscine/model/user-organization-dto.ts @@ -13,9 +13,6 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import type { PublicationAdvisoryServiceDto } from './publication-advisory-service-dto'; /** * Represents a Data Transfer Object (DTO) for user-related organization information, inheriting from OrganizationDto. @@ -28,25 +25,13 @@ export interface UserOrganizationDto { * @type {string} * @memberof UserOrganizationDto */ - 'uri': string; + 'uri'?: string | null; /** * The display name of the organization. * @type {string} * @memberof UserOrganizationDto */ 'displayName': string; - /** - * The email address of the organization. - * @type {string} - * @memberof UserOrganizationDto - */ - 'email'?: string | null; - /** - * - * @type {PublicationAdvisoryServiceDto} - * @memberof UserOrganizationDto - */ - 'publicationAdvisoryService'?: PublicationAdvisoryServiceDto; /** * Determines if the organization\'s details can be modified. * @type {boolean} diff --git a/src/Coscine.Api/api.ts b/src/Coscine.Api/api.ts index 0c6f2912edf7e505190d2222d15659b112382301..793204da87072478b169e0ee1e86b745d8d066c3 100644 --- a/src/Coscine.Api/api.ts +++ b/src/Coscine.Api/api.ts @@ -22,6 +22,7 @@ export * from './@coscine/api/handle-api'; export * from './@coscine/api/language-api'; export * from './@coscine/api/license-api'; export * from './@coscine/api/maintenance-api'; +export * from './@coscine/api/notification-api'; export * from './@coscine/api/organization-api'; export * from './@coscine/api/pid-api'; export * from './@coscine/api/project-api'; @@ -46,6 +47,7 @@ export * from './@coscine/api/title-api'; export * from './@coscine/api/tos-api'; export * from './@coscine/api/tree-api'; export * from './@coscine/api/user-api'; +export * from './@coscine/api/user-notification-opt-out-api'; export * from './@coscine/api/visibility-api'; export * from './@coscine/api/vocabulary-api'; diff --git a/src/Coscine.Api/base.ts b/src/Coscine.Api/base.ts index 3648583157ca4a6fc5cf49091017476ae72a5242..bacb351487f315876c39d18a8b075e7483578b2a 100644 --- a/src/Coscine.Api/base.ts +++ b/src/Coscine.Api/base.ts @@ -19,7 +19,7 @@ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; -export const BASE_PATH = "https://coscine-dorsch.web.vulcanus.otc.coscine.dev/coscine".replace(/\/+$/, ""); +export const BASE_PATH = "https://coscine-hristov.web.vulcanus.otc.coscine.dev/coscine".replace(/\/+$/, ""); /** *