diff --git a/.vscode/settings.json b/.vscode/settings.json index b7e02b5c94d7353c40d5df8c0a4e6b7d388ebc72..1b1d65cf8e40a1ab92a111c92c716704193c9a1f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,12 @@ { + "workbench.colorCustomizations": { + "activityBar.background": "#678367", + "activityBar.foreground": "#dcdcdc", + "activityBar.inactiveForeground": "#384238", + "activityBar.activeBorder": "#384238", + "activityBarBadge.background": "#384238", + "activityBarBadge.foreground": "#dcdcdc" + }, "search.exclude": { "**/.yarn": true, "**/.pnp.*": true @@ -7,4 +15,4 @@ "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", "typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true -} +} \ No newline at end of file diff --git a/src/Coscine.Api/@coscine/api/maintenance-api.ts b/src/Coscine.Api/@coscine/api/maintenance-api.ts index 717150ab3c165575361e3f0f2ca01e986d05620b..fd59206591ec527dcd525e6634b65345eaae3c44 100644 --- a/src/Coscine.Api/@coscine/api/maintenance-api.ts +++ b/src/Coscine.Api/@coscine/api/maintenance-api.ts @@ -66,6 +66,7 @@ export const MaintenanceApiAxiosParamCreator = function (configuration?: Configu * * @summary Retrieves the current maintenance messages. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getCurrentMaintenances: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { @@ -121,6 +122,7 @@ export const MaintenanceApiFp = function(configuration?: Configuration) { * * @summary Retrieves the current maintenance messages. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async getCurrentMaintenances(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MaintenanceDtoPagedResponse>> { @@ -152,6 +154,7 @@ export const MaintenanceApiFactory = function (configuration?: Configuration, ba * * @summary Retrieves the current maintenance messages. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getCurrentMaintenances(options?: RawAxiosRequestConfig): AxiosPromise<MaintenanceDtoPagedResponse> { @@ -182,6 +185,7 @@ export class MaintenanceApi extends BaseAPI { * * @summary Retrieves the current maintenance messages. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof MaintenanceApi */ diff --git a/src/Coscine.Api/@coscine/api/system-status-api.ts b/src/Coscine.Api/@coscine/api/system-status-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..d4992da469511fe2a319423988a75962fa3eb641 --- /dev/null +++ b/src/Coscine.Api/@coscine/api/system-status-api.ts @@ -0,0 +1,527 @@ +/* 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 { MessageDtoPagedResponse } from '../../@coscine/model'; +// @ts-ignore +import type { MessageType } from '../../@coscine/model'; +/** + * SystemStatusApi - axios parameter creator + * @export + */ +export const SystemStatusApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2SystemStatusOptions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/system/status`; + // 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 the internal messages. + * @param {string} [startDateAfter] Will only return messages that have their start date after this date. + * @param {string} [startDateBefore] Will only return messages that have their start date before this date. + * @param {string} [endDateAfter] Will only return messages that have their end date after this date. + * @param {string} [endDateBefore] Will only return messages that have their end date before this date. + * @param {MessageType} [type] Filter messages by their type (e.g. information, warning, error). + * @param {string} [searchTerm] Filter messages by text contained in the messages or title. + * @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 a 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} + */ + getInternalMessages: async (startDateAfter?: string, startDateBefore?: string, endDateAfter?: string, endDateBefore?: string, type?: MessageType, searchTerm?: string, pageNumber?: number, pageSize?: number, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/system/status/internal`; + // 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 (startDateAfter !== undefined) { + localVarQueryParameter['StartDateAfter'] = (startDateAfter as any instanceof Date) ? + (startDateAfter as any).toISOString() : + startDateAfter; + } + + if (startDateBefore !== undefined) { + localVarQueryParameter['StartDateBefore'] = (startDateBefore as any instanceof Date) ? + (startDateBefore as any).toISOString() : + startDateBefore; + } + + if (endDateAfter !== undefined) { + localVarQueryParameter['EndDateAfter'] = (endDateAfter as any instanceof Date) ? + (endDateAfter as any).toISOString() : + endDateAfter; + } + + if (endDateBefore !== undefined) { + localVarQueryParameter['EndDateBefore'] = (endDateBefore as any instanceof Date) ? + (endDateBefore as any).toISOString() : + endDateBefore; + } + + if (type !== undefined) { + localVarQueryParameter['Type'] = type; + } + + if (searchTerm !== undefined) { + localVarQueryParameter['SearchTerm'] = searchTerm; + } + + 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, + }; + }, + /** + * + * @summary Retrieves the NOC messages. + * @param {string} [startDateAfter] Will only return messages that have their start date after this date. + * @param {string} [startDateBefore] Will only return messages that have their start date before this date. + * @param {string} [endDateAfter] Will only return messages that have their end date after this date. + * @param {string} [endDateBefore] Will only return messages that have their end date before this date. + * @param {MessageType} [type] Filter messages by their type (e.g. information, warning, error). + * @param {string} [searchTerm] Filter messages by text contained in the messages or title. + * @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 a 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} + */ + getNocMessages: async (startDateAfter?: string, startDateBefore?: string, endDateAfter?: string, endDateBefore?: string, type?: MessageType, searchTerm?: string, pageNumber?: number, pageSize?: number, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/api/v2/system/status/noc`; + // 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 (startDateAfter !== undefined) { + localVarQueryParameter['StartDateAfter'] = (startDateAfter as any instanceof Date) ? + (startDateAfter as any).toISOString() : + startDateAfter; + } + + if (startDateBefore !== undefined) { + localVarQueryParameter['StartDateBefore'] = (startDateBefore as any instanceof Date) ? + (startDateBefore as any).toISOString() : + startDateBefore; + } + + if (endDateAfter !== undefined) { + localVarQueryParameter['EndDateAfter'] = (endDateAfter as any instanceof Date) ? + (endDateAfter as any).toISOString() : + endDateAfter; + } + + if (endDateBefore !== undefined) { + localVarQueryParameter['EndDateBefore'] = (endDateBefore as any instanceof Date) ? + (endDateBefore as any).toISOString() : + endDateBefore; + } + + if (type !== undefined) { + localVarQueryParameter['Type'] = type; + } + + if (searchTerm !== undefined) { + localVarQueryParameter['SearchTerm'] = searchTerm; + } + + 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, + }; + }, + } +}; + +/** + * SystemStatusApi - functional programming interface + * @export + */ +export const SystemStatusApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SystemStatusApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiV2SystemStatusOptions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2SystemStatusOptions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemStatusApi.apiV2SystemStatusOptions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves the internal messages. + * @param {string} [startDateAfter] Will only return messages that have their start date after this date. + * @param {string} [startDateBefore] Will only return messages that have their start date before this date. + * @param {string} [endDateAfter] Will only return messages that have their end date after this date. + * @param {string} [endDateBefore] Will only return messages that have their end date before this date. + * @param {MessageType} [type] Filter messages by their type (e.g. information, warning, error). + * @param {string} [searchTerm] Filter messages by text contained in the messages or title. + * @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 a 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 getInternalMessages(startDateAfter?: string, startDateBefore?: string, endDateAfter?: string, endDateBefore?: string, type?: MessageType, searchTerm?: string, pageNumber?: number, pageSize?: number, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageDtoPagedResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInternalMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemStatusApi.getInternalMessages']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieves the NOC messages. + * @param {string} [startDateAfter] Will only return messages that have their start date after this date. + * @param {string} [startDateBefore] Will only return messages that have their start date before this date. + * @param {string} [endDateAfter] Will only return messages that have their end date after this date. + * @param {string} [endDateBefore] Will only return messages that have their end date before this date. + * @param {MessageType} [type] Filter messages by their type (e.g. information, warning, error). + * @param {string} [searchTerm] Filter messages by text contained in the messages or title. + * @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 a 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 getNocMessages(startDateAfter?: string, startDateBefore?: string, endDateAfter?: string, endDateBefore?: string, type?: MessageType, searchTerm?: string, pageNumber?: number, pageSize?: number, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageDtoPagedResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNocMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemStatusApi.getNocMessages']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SystemStatusApi - factory interface + * @export + */ +export const SystemStatusApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SystemStatusApiFp(configuration) + return { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiV2SystemStatusOptions(options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.apiV2SystemStatusOptions(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves the internal messages. + * @param {SystemStatusApiGetInternalMessagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInternalMessages(requestParameters: SystemStatusApiGetInternalMessagesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<MessageDtoPagedResponse> { + return localVarFp.getInternalMessages(requestParameters.startDateAfter, requestParameters.startDateBefore, requestParameters.endDateAfter, requestParameters.endDateBefore, requestParameters.type, requestParameters.searchTerm, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieves the NOC messages. + * @param {SystemStatusApiGetNocMessagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNocMessages(requestParameters: SystemStatusApiGetNocMessagesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<MessageDtoPagedResponse> { + return localVarFp.getNocMessages(requestParameters.startDateAfter, requestParameters.startDateBefore, requestParameters.endDateAfter, requestParameters.endDateBefore, requestParameters.type, requestParameters.searchTerm, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getInternalMessages operation in SystemStatusApi. + * @export + * @interface SystemStatusApiGetInternalMessagesRequest + */ +export interface SystemStatusApiGetInternalMessagesRequest { + /** + * Will only return messages that have their start date after this date. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly startDateAfter?: string + + /** + * Will only return messages that have their start date before this date. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly startDateBefore?: string + + /** + * Will only return messages that have their end date after this date. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly endDateAfter?: string + + /** + * Will only return messages that have their end date before this date. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly endDateBefore?: string + + /** + * Filter messages by their type (e.g. information, warning, error). + * @type {MessageType} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly type?: MessageType + + /** + * Filter messages by text contained in the messages or title. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly searchTerm?: string + + /** + * The desired page number. Should be greater than or equal to 1. Default is 1. + * @type {number} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly pageNumber?: number + + /** + * The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @type {number} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly pageSize?: number + + /** + * Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @type {string} + * @memberof SystemStatusApiGetInternalMessages + */ + readonly orderBy?: string +} + +/** + * Request parameters for getNocMessages operation in SystemStatusApi. + * @export + * @interface SystemStatusApiGetNocMessagesRequest + */ +export interface SystemStatusApiGetNocMessagesRequest { + /** + * Will only return messages that have their start date after this date. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly startDateAfter?: string + + /** + * Will only return messages that have their start date before this date. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly startDateBefore?: string + + /** + * Will only return messages that have their end date after this date. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly endDateAfter?: string + + /** + * Will only return messages that have their end date before this date. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly endDateBefore?: string + + /** + * Filter messages by their type (e.g. information, warning, error). + * @type {MessageType} + * @memberof SystemStatusApiGetNocMessages + */ + readonly type?: MessageType + + /** + * Filter messages by text contained in the messages or title. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly searchTerm?: string + + /** + * The desired page number. Should be greater than or equal to 1. Default is 1. + * @type {number} + * @memberof SystemStatusApiGetNocMessages + */ + readonly pageNumber?: number + + /** + * The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. + * @type {number} + * @memberof SystemStatusApiGetNocMessages + */ + readonly pageSize?: number + + /** + * Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. + * @type {string} + * @memberof SystemStatusApiGetNocMessages + */ + readonly orderBy?: string +} + +/** + * SystemStatusApi - object-oriented interface + * @export + * @class SystemStatusApi + * @extends {BaseAPI} + */ +export class SystemStatusApi extends BaseAPI { + /** + * + * @summary Responds with the HTTP methods allowed for the endpoint. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemStatusApi + */ + public apiV2SystemStatusOptions(options?: RawAxiosRequestConfig) { + return SystemStatusApiFp(this.configuration).apiV2SystemStatusOptions(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves the internal messages. + * @param {SystemStatusApiGetInternalMessagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemStatusApi + */ + public getInternalMessages(requestParameters: SystemStatusApiGetInternalMessagesRequest = {}, options?: RawAxiosRequestConfig) { + return SystemStatusApiFp(this.configuration).getInternalMessages(requestParameters.startDateAfter, requestParameters.startDateBefore, requestParameters.endDateAfter, requestParameters.endDateBefore, requestParameters.type, requestParameters.searchTerm, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieves the NOC messages. + * @param {SystemStatusApiGetNocMessagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemStatusApi + */ + public getNocMessages(requestParameters: SystemStatusApiGetNocMessagesRequest = {}, options?: RawAxiosRequestConfig) { + return SystemStatusApiFp(this.configuration).getNocMessages(requestParameters.startDateAfter, requestParameters.startDateBefore, requestParameters.endDateAfter, requestParameters.endDateBefore, requestParameters.type, requestParameters.searchTerm, requestParameters.pageNumber, requestParameters.pageSize, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/Coscine.Api/@coscine/model/index.ts b/src/Coscine.Api/@coscine/model/index.ts index 0bb429faca0b7e5423dd8bcb6218d7b5274d96f8..77fda8d0142b65a7dc6321b1451f62f9b6f1da28 100644 --- a/src/Coscine.Api/@coscine/model/index.ts +++ b/src/Coscine.Api/@coscine/model/index.ts @@ -55,6 +55,9 @@ export * from './license-dto-response'; export * from './license-for-resource-manipulation-dto'; export * from './maintenance-dto'; export * from './maintenance-dto-paged-response'; +export * from './message-dto'; +export * from './message-dto-paged-response'; +export * from './message-type'; export * from './metadata-tree-dto'; export * from './metadata-tree-dto-paged-response'; export * from './metadata-tree-dto-response'; diff --git a/src/Coscine.Api/@coscine/model/message-dto-paged-response.ts b/src/Coscine.Api/@coscine/model/message-dto-paged-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..82313a1be6ad4ed3ba03af41f29ec89cb565ee7c --- /dev/null +++ b/src/Coscine.Api/@coscine/model/message-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 { MessageDto } from './message-dto'; +// May contain unused imports in some cases +// @ts-ignore +import type { Pagination } from './pagination'; + +/** + * + * @export + * @interface MessageDtoPagedResponse + */ +export interface MessageDtoPagedResponse { + /** + * + * @type {Array<MessageDto>} + * @memberof MessageDtoPagedResponse + */ + 'data'?: Array<MessageDto> | null; + /** + * + * @type {boolean} + * @memberof MessageDtoPagedResponse + */ + 'isSuccess'?: boolean; + /** + * + * @type {number} + * @memberof MessageDtoPagedResponse + */ + 'statusCode'?: number | null; + /** + * + * @type {string} + * @memberof MessageDtoPagedResponse + */ + 'traceId'?: string | null; + /** + * + * @type {Pagination} + * @memberof MessageDtoPagedResponse + */ + 'pagination'?: Pagination; +} + diff --git a/src/Coscine.Api/@coscine/model/message-dto.ts b/src/Coscine.Api/@coscine/model/message-dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d07078dfb9ae69a5915bc79a22de19aaadb9882 --- /dev/null +++ b/src/Coscine.Api/@coscine/model/message-dto.ts @@ -0,0 +1,71 @@ +/* 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 { MessageType } from './message-type'; + +/** + * + * @export + * @interface MessageDto + */ +export interface MessageDto { + /** + * ID of the message. + * @type {string} + * @memberof MessageDto + */ + 'id'?: string; + /** + * Message body in multiple languages as key-value pairs. The key is the ISO 639-1 Alpha-2 two-letter language code, and the value is the message in that language. + * @type {{ [key: string]: string; }} + * @memberof MessageDto + */ + 'body'?: { [key: string]: string; } | null; + /** + * + * @type {MessageType} + * @memberof MessageDto + */ + 'type'?: MessageType; + /** + * Title of the message. + * @type {string} + * @memberof MessageDto + */ + 'title'?: string | null; + /** + * URL related to the message. + * @type {string} + * @memberof MessageDto + */ + 'href'?: string | null; + /** + * Start date of the message. + * @type {string} + * @memberof MessageDto + */ + 'startDate'?: string | null; + /** + * End date of the message. + * @type {string} + * @memberof MessageDto + */ + 'endDate'?: string | null; +} + + + diff --git a/src/Coscine.Api/@coscine/model/message-type.ts b/src/Coscine.Api/@coscine/model/message-type.ts new file mode 100644 index 0000000000000000000000000000000000000000..a87e381a08a729d0a0b8955bd4b9e9c3dca24c25 --- /dev/null +++ b/src/Coscine.Api/@coscine/model/message-type.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + + +/** + * Defines the various types of messages. + * @export + * @enum {string} + */ + +export const MessageType = { + Disturbance: 'Disturbance', + PartialDisturbance: 'PartialDisturbance', + Maintenance: 'Maintenance', + PartialMaintenance: 'PartialMaintenance', + LimitedOperation: 'LimitedOperation', + Interruption: 'Interruption', + Change: 'Change', + Hint: 'Hint', + Warning: 'Warning', + Information: 'Information' +} as const; + +export type MessageType = typeof MessageType[keyof typeof MessageType]; + + + diff --git a/src/Coscine.Api/api.ts b/src/Coscine.Api/api.ts index f9a602912456d891a8b21036be18da3400fb542b..6ff3909a2768d64c4ce8a5b36b390b4775df1ed7 100644 --- a/src/Coscine.Api/api.ts +++ b/src/Coscine.Api/api.ts @@ -40,6 +40,7 @@ export * from './@coscine/api/search-api'; export * from './@coscine/api/self-api'; export * from './@coscine/api/self-api-token-api'; export * from './@coscine/api/self-session-api'; +export * from './@coscine/api/system-status-api'; export * from './@coscine/api/title-api'; export * from './@coscine/api/tos-api'; export * from './@coscine/api/tree-api'; diff --git a/src/apis.ts b/src/apis.ts index 8c8edd57e1dfa468726affe05fac75ead8fef372..4e1b0f6fd886a4d1334532d07f7869b7def51a76 100644 --- a/src/apis.ts +++ b/src/apis.ts @@ -29,6 +29,7 @@ import { SelfApiFactory, SelfApiTokenApiFactory, SelfSessionApiFactory, + SystemStatusApiFactory, TitleApiFactory, TosApiFactory, TreeApiFactory, @@ -103,6 +104,7 @@ function implementations(axios?: AxiosInstance) { SelfApiTokenApi: SelfApiTokenApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), SelfSessionApi: SelfSessionApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), ShibbolethApi: ShibbolethApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine/api/Coscine.Api.STS', axios), + SystemStatusApi: SystemStatusApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), TitleApi: TitleApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), TosApi: TosApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), TreeApi: TreeApiFactory(new Configuration({ 'accessToken': accessToken }), 'https://' + getHostName() + '/coscine', axios), diff --git a/src/index.ts b/src/index.ts index 2ea2382566ac182d223def697bc9a59e3f6ddd7b..58975734eb88a721181e00bba69367625a5d8ecf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,6 +33,7 @@ export const SearchApi = apis.SearchApi; export const SelfApi = apis.SelfApi; export const SelfApiTokenApi = apis.SelfApiTokenApi; export const ShibbolethApi = apis.ShibbolethApi; +export const SystemStatusApi = apis.SystemStatusApi; export const TitleApi = apis.TitleApi; export const TosApi = apis.TosApi; export const TreeApi = apis.TreeApi;