diff --git a/server/openapi.json b/server/openapi.json index 26c58fa29..233aad746 100644 --- a/server/openapi.json +++ b/server/openapi.json @@ -392,6 +392,12 @@ "type": "string" } }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, "secret": { "type": "string" }, @@ -469,6 +475,7 @@ "ignoreTlsErrors", "useAdvancedMatching", "notifications", + "tags", "cpuAlertThreshold", "memoryAlertThreshold", "diskAlertThreshold", @@ -2362,6 +2369,16 @@ "profilePicture": { "type": "string" }, + "password": { + "type": "string", + "minLength": 8, + "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$" + }, + "newPassword": { + "type": "string", + "minLength": 8, + "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$" + }, "profileImage": { "type": "string", "format": "binary" @@ -5207,7 +5224,8 @@ "type": "array", "items": { "type": "string" - } + }, + "minItems": 1 }, "duration": { "type": "number" @@ -5478,6 +5496,24 @@ "required": false, "name": "filter", "in": "query" + }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "required": false, + "name": "tags", + "in": "query" } ], "responses": { @@ -5672,6 +5708,24 @@ "name": "type", "in": "query" }, + { + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "required": false, + "name": "tags", + "in": "query" + }, { "schema": { "type": "boolean" @@ -6924,6 +6978,12 @@ "type": "string" } }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, "secret": { "type": "string" }, @@ -7586,6 +7646,13 @@ }, "default": [] }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, "secret": { "type": "string" }, @@ -8104,6 +8171,12 @@ "type": "string" } }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, "secret": { "type": "string" }, diff --git a/server/src/service/business/incidentService.ts b/server/src/service/business/incidentService.ts index 2070a8937..1606cc95d 100644 --- a/server/src/service/business/incidentService.ts +++ b/server/src/service/business/incidentService.ts @@ -5,7 +5,7 @@ import { AppError } from "@/utils/AppError.js"; import { getDateForRange } from "@/utils/dataUtils.js"; import type { IIncidentsRepository, IMonitorsRepository, IUsersRepository } from "@/repositories/index.js"; import type { Incident, IncidentSummary, User } from "@/types/index.js"; -import type { MonitorActionDecision } from "@/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.js"; +import type { MonitorActionDecision } from "@/service/infrastructure/JobQueues/QueueHelper.js"; import type { INotificationMessageBuilder } from "@/service/infrastructure/notificationMessageBuilder.js"; import type { ILogger } from "@/utils/logger.js"; diff --git a/server/src/service/business/monitorService.ts b/server/src/service/business/monitorService.ts index 2023a1d7a..46b81a2ca 100644 --- a/server/src/service/business/monitorService.ts +++ b/server/src/service/business/monitorService.ts @@ -23,7 +23,7 @@ import type { import demoMonitorsData from "@/utils/demoMonitors.json" with { type: "json" }; import { AppError } from "@/utils/AppError.js"; import type { ImportedMonitor } from "@/validation/monitorValidation.js"; -import { ISuperSimpleQueue } from "../infrastructure/SuperSimpleQueue/SuperSimpleQueue.js"; +import { IJobQueue } from "@/service/infrastructure/JobQueues/IJobQueue.js"; import { ILogger } from "@/utils/logger.js"; const SERVICE_NAME = "MonitorService"; @@ -96,7 +96,7 @@ export interface IMonitorService { export class MonitorService implements IMonitorService { static SERVICE_NAME = SERVICE_NAME; - private jobQueue: ISuperSimpleQueue; + private jobQueue: IJobQueue; private logger: ILogger; private games: GamesMap; private monitorsRepository: IMonitorsRepository; @@ -117,7 +117,7 @@ export class MonitorService implements IMonitorService { statusPagesRepository, incidentsRepository, }: { - jobQueue: ISuperSimpleQueue; + jobQueue: IJobQueue; logger: ILogger; games: GamesMap; monitorsRepository: IMonitorsRepository; diff --git a/server/src/service/business/userService.ts b/server/src/service/business/userService.ts index 7acca5742..8b2c52159 100644 --- a/server/src/service/business/userService.ts +++ b/server/src/service/business/userService.ts @@ -10,7 +10,7 @@ import type { User } from "@/types/index.js"; import { canManageRole, type UserRole } from "@/types/user.js"; import bcrypt from "bcryptjs"; import { AppError } from "@/utils/AppError.js"; -import { ISuperSimpleQueue } from "@/service/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js"; +import { IJobQueue } from "@/service/infrastructure/JobQueues/IJobQueue.js"; import { IEmailService } from "@/service/infrastructure/emailService.js"; import { EnvConfig, ISettingsService } from "@/service/system/settingsService.js"; import { ILogger } from "@/utils/logger.js"; @@ -55,7 +55,7 @@ export class UserService implements IUserService { private settingsService: ISettingsService; private logger: ILogger; private jwt: JwtType; - private jobQueue: ISuperSimpleQueue; + private jobQueue: IJobQueue; private crypto: CryptoType; private monitorsRepository: IMonitorsRepository; private usersRepository: IUsersRepository; @@ -83,7 +83,7 @@ export class UserService implements IUserService { settingsService: ISettingsService; logger: ILogger; jwt: JwtType; - jobQueue: ISuperSimpleQueue; + jobQueue: IJobQueue; monitorsRepository: IMonitorsRepository; usersRepository: IUsersRepository; invitesRepository: IInvitesRepository; diff --git a/server/src/service/infrastructure/JobQueues/QueueHelper.ts b/server/src/service/infrastructure/JobQueues/QueueHelper.ts index e162e8d94..ea86feae0 100644 --- a/server/src/service/infrastructure/JobQueues/QueueHelper.ts +++ b/server/src/service/infrastructure/JobQueues/QueueHelper.ts @@ -105,7 +105,7 @@ export class QueueHelper implements IQueueHelper { } get serviceName() { - return SuperSimpleQueueHelper.SERVICE_NAME; + return QueueHelper.SERVICE_NAME; } getHeartbeatJob = () => { diff --git a/server/src/service/infrastructure/notificationMessageBuilder.ts b/server/src/service/infrastructure/notificationMessageBuilder.ts index 934163b2a..bc1d7ac82 100644 --- a/server/src/service/infrastructure/notificationMessageBuilder.ts +++ b/server/src/service/infrastructure/notificationMessageBuilder.ts @@ -1,5 +1,5 @@ import type { HardwareStatusPayload, Monitor, MonitorStatusResponse } from "@/types/index.js"; -import type { MonitorActionDecision } from "@/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.js"; +import type { MonitorActionDecision } from "@/service/infrastructure/JobQueues/QueueHelper.js"; import type { NotificationMessage, NotificationType, diff --git a/server/src/service/infrastructure/notificationsService.ts b/server/src/service/infrastructure/notificationsService.ts index 90e9d637a..d1956a724 100644 --- a/server/src/service/infrastructure/notificationsService.ts +++ b/server/src/service/infrastructure/notificationsService.ts @@ -2,7 +2,7 @@ import type { Monitor, MonitorStatusResponse, Notification } from "@/types/index import type { NotificationMessage } from "@/types/notificationMessage.js"; import { IMonitorsRepository, INotificationsRepository } from "@/repositories/index.js"; import { INotificationProvider } from "./notificationProviders/INotificationProvider.js"; -import type { MonitorActionDecision } from "@/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.js"; +import type { MonitorActionDecision } from "@/service/infrastructure/JobQueues/QueueHelper.js"; import type { ISettingsService } from "@/service/system/settingsService.js"; import { ILogger } from "@/utils/logger.js"; import type { INotificationMessageBuilder } from "@/service/infrastructure/notificationMessageBuilder.js";