diff --git a/project/src/helpers/NotificationSendHelper.ts b/project/src/helpers/NotificationSendHelper.ts index 0600d8ad..a7347a25 100644 --- a/project/src/helpers/NotificationSendHelper.ts +++ b/project/src/helpers/NotificationSendHelper.ts @@ -1,8 +1,10 @@ import { inject, injectable } from "tsyringe"; -import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; import { MessageType } from "@spt-aki/models/enums/MessageType"; +import { NotificationEventType } from "@spt-aki/models/enums/NotificationEventType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; import { NotificationService } from "@spt-aki/services/NotificationService"; @@ -24,7 +26,7 @@ export class NotificationSendHelper * @param sessionID * @param notificationMessage */ - public sendMessage(sessionID: string, notificationMessage: INotification): void + public sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void { if (this.webSocketServer.isConnectionWebSocket(sessionID)) { @@ -65,8 +67,8 @@ export class NotificationSendHelper }; dialog.messages.push(message); - const notification: INotification = { - type: NotificationType.NEW_MESSAGE, + const notification: IWsChatMessageReceived = { + type: NotificationEventType.CHAT_MESSAGE_RECEIVED, eventId: message._id, dialogId: message.uid, message: message, diff --git a/project/src/helpers/NotifierHelper.ts b/project/src/helpers/NotifierHelper.ts index 287a3982..7775879d 100644 --- a/project/src/helpers/NotifierHelper.ts +++ b/project/src/helpers/NotifierHelper.ts @@ -1,7 +1,10 @@ import { inject, injectable } from "tsyringe"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; +import { NotificationEventType } from "@spt-aki/models/enums/NotificationEventType"; @injectable() export class NotifierHelper @@ -9,12 +12,12 @@ export class NotifierHelper /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification = { type: NotificationType.PING, eventId: "ping" }; + protected defaultNotification: IWsNotificationEvent = { type: NotificationEventType.PING, eventId: "ping" }; constructor(@inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper) {} - public getDefaultNotification(): INotification + public getDefaultNotification(): IWsNotificationEvent { return this.defaultNotification; } @@ -28,12 +31,11 @@ export class NotifierHelper public createRagfairOfferSoldNotification( dialogueMessage: Message, ragfairData: MessageContentRagfair, - ): INotification + ): IWsRagfairOfferSold { return { - type: NotificationType.RAGFAIR_OFFER_SOLD, + type: NotificationEventType.RAGFAIR_OFFER_SOLD, eventId: dialogueMessage._id, - dialogId: dialogueMessage.uid, ...ragfairData, }; } @@ -43,10 +45,10 @@ export class NotifierHelper * @param dialogueMessage * @returns */ - public createNewMessageNotification(dialogueMessage: Message): INotification + public createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived { return { - type: NotificationType.NEW_MESSAGE, + type: NotificationEventType.CHAT_MESSAGE_RECEIVED, eventId: dialogueMessage._id, dialogId: dialogueMessage.uid, message: dialogueMessage, diff --git a/project/src/models/eft/notifier/INotifier.ts b/project/src/models/eft/notifier/INotifier.ts index f21d5a81..86c67229 100644 --- a/project/src/models/eft/notifier/INotifier.ts +++ b/project/src/models/eft/notifier/INotifier.ts @@ -1,49 +1,9 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; - export interface INotifierChannel { server: string + // eslint-disable-next-line @typescript-eslint/naming-convention channel_id: string url: string notifierServer: string ws: string } - -export interface INotification -{ - type: NotificationType - eventId: string - dialogId?: string - message?: Message -} - -export enum NotificationType -{ - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader", - GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", - GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", - GROUP_MATCH_RAID_READY = "groupMatchRaidReady", - GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", - GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", - GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", - GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", - GROUP_MATCH_START_GAME = "groupMatchStartGame", - GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", - GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", - GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", - USER_CONFIRMED = "userConfirmed", - CHANNEL_DELETED = "channel_deleted", - FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", - FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", - FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", - FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", - YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", -} diff --git a/project/src/models/eft/ws/IWsAid.ts b/project/src/models/eft/ws/IWsAid.ts new file mode 100644 index 00000000..b602b7fc --- /dev/null +++ b/project/src/models/eft/ws/IWsAid.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsAid extends IWsNotificationEvent +{ + aid: number +} diff --git a/project/src/models/eft/ws/IWsAidNickname.ts b/project/src/models/eft/ws/IWsAidNickname.ts new file mode 100644 index 00000000..660cd576 --- /dev/null +++ b/project/src/models/eft/ws/IWsAidNickname.ts @@ -0,0 +1,7 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsAidNickname extends IWsNotificationEvent +{ + aid: number + Nickname: string +} diff --git a/project/src/models/eft/ws/IWsChatMessageReceived.ts b/project/src/models/eft/ws/IWsChatMessageReceived.ts new file mode 100644 index 00000000..1f4cdb5b --- /dev/null +++ b/project/src/models/eft/ws/IWsChatMessageReceived.ts @@ -0,0 +1,10 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; + +export interface IWsChatMessageReceived extends IWsNotificationEvent +{ + dialogId: string + message: Message + profiles?: IGroupCharacter[] +} diff --git a/project/src/models/eft/ws/IWsGroupId.ts b/project/src/models/eft/ws/IWsGroupId.ts new file mode 100644 index 00000000..7905454f --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupId.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupId extends IWsNotificationEvent +{ + groupId: string +} diff --git a/project/src/models/eft/ws/IWsGroupMatchInviteAccept.ts b/project/src/models/eft/ws/IWsGroupMatchInviteAccept.ts new file mode 100644 index 00000000..9d17c085 --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchInviteAccept.ts @@ -0,0 +1,7 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; + +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter +{ + +} diff --git a/project/src/models/eft/ws/IWsGroupMatchInviteDecline.ts b/project/src/models/eft/ws/IWsGroupMatchInviteDecline.ts new file mode 100644 index 00000000..ac27e1be --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchInviteDecline.ts @@ -0,0 +1,7 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent +{ + aid: number + Nickname: string +} diff --git a/project/src/models/eft/ws/IWsGroupMatchInviteSend.ts b/project/src/models/eft/ws/IWsGroupMatchInviteSend.ts new file mode 100644 index 00000000..5c623441 --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchInviteSend.ts @@ -0,0 +1,9 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent +{ + requestId: string + from: number + members: IGroupCharacter[] +} diff --git a/project/src/models/eft/ws/IWsGroupMatchLeaderChanged.ts b/project/src/models/eft/ws/IWsGroupMatchLeaderChanged.ts new file mode 100644 index 00000000..b6461547 --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchLeaderChanged.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent +{ + owner: number +} diff --git a/project/src/models/eft/ws/IWsGroupMatchRaidReady.ts b/project/src/models/eft/ws/IWsGroupMatchRaidReady.ts new file mode 100644 index 00000000..ec58350c --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchRaidReady.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent +{ + extendedProfile: IGroupCharacter +} diff --git a/project/src/models/eft/ws/IWsGroupMatchRaidSettings.ts b/project/src/models/eft/ws/IWsGroupMatchRaidSettings.ts new file mode 100644 index 00000000..ac1f2dae --- /dev/null +++ b/project/src/models/eft/ws/IWsGroupMatchRaidSettings.ts @@ -0,0 +1,7 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent +{ + raidSettings: IRaidSettings +} diff --git a/project/src/models/eft/ws/IWsNotificationEvent.ts b/project/src/models/eft/ws/IWsNotificationEvent.ts new file mode 100644 index 00000000..5346f44e --- /dev/null +++ b/project/src/models/eft/ws/IWsNotificationEvent.ts @@ -0,0 +1,5 @@ +export interface IWsNotificationEvent +{ + type: string + eventId: string +} diff --git a/project/src/models/eft/ws/IWsPing.ts b/project/src/models/eft/ws/IWsPing.ts new file mode 100644 index 00000000..5e32118d --- /dev/null +++ b/project/src/models/eft/ws/IWsPing.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsPing extends IWsNotificationEvent +{ + +} diff --git a/project/src/models/eft/ws/IWsRagfairOfferSold.ts b/project/src/models/eft/ws/IWsRagfairOfferSold.ts new file mode 100644 index 00000000..dce4e350 --- /dev/null +++ b/project/src/models/eft/ws/IWsRagfairOfferSold.ts @@ -0,0 +1,8 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; + +export interface IWsRagfairOfferSold extends IWsNotificationEvent +{ + offerId: string + count: number + handbookId: string +} diff --git a/project/src/models/eft/ws/IWsUserConfirmed.ts b/project/src/models/eft/ws/IWsUserConfirmed.ts new file mode 100644 index 00000000..a202e3a6 --- /dev/null +++ b/project/src/models/eft/ws/IWsUserConfirmed.ts @@ -0,0 +1,20 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; + +export interface IWsUserConfirmed extends IWsNotificationEvent +{ + profileid: string + profileToken: string + status: ProfileStatus + ip: string + port: number + sid: string + version: string + location: string + raidMode: RaidMode + mode: string + shortId: string + // eslint-disable-next-line @typescript-eslint/naming-convention + additional_info: any[] +} diff --git a/project/src/models/enums/DateTime.ts b/project/src/models/enums/DateTime.ts new file mode 100644 index 00000000..5c00969a --- /dev/null +++ b/project/src/models/enums/DateTime.ts @@ -0,0 +1,5 @@ +export enum DateTime +{ + CURR = "CURR", + PAST = "PAST", +} diff --git a/project/src/models/enums/NotificationEventType.ts b/project/src/models/enums/NotificationEventType.ts new file mode 100644 index 00000000..2381f90f --- /dev/null +++ b/project/src/models/enums/NotificationEventType.ts @@ -0,0 +1,29 @@ +export enum NotificationEventType +{ + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", +} diff --git a/project/src/models/enums/PlayersSpawnPlace.ts b/project/src/models/enums/PlayersSpawnPlace.ts new file mode 100644 index 00000000..f0263d3c --- /dev/null +++ b/project/src/models/enums/PlayersSpawnPlace.ts @@ -0,0 +1,6 @@ +export enum PlayersSpawnPlace +{ + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap", +} diff --git a/project/src/models/enums/ProfileStatus.ts b/project/src/models/enums/ProfileStatus.ts new file mode 100644 index 00000000..4d61d105 --- /dev/null +++ b/project/src/models/enums/ProfileStatus.ts @@ -0,0 +1,8 @@ +export enum ProfileStatus +{ + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer", +} diff --git a/project/src/models/enums/BotAmount.ts b/project/src/models/enums/RaidSettings/BotAmount.ts similarity index 84% rename from project/src/models/enums/BotAmount.ts rename to project/src/models/enums/RaidSettings/BotAmount.ts index 80ad9233..dd13559f 100644 --- a/project/src/models/enums/BotAmount.ts +++ b/project/src/models/enums/RaidSettings/BotAmount.ts @@ -1,6 +1,7 @@ export enum BotAmount { AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/project/src/models/enums/BotDifficulty.ts b/project/src/models/enums/RaidSettings/BotDifficulty.ts similarity index 100% rename from project/src/models/enums/BotDifficulty.ts rename to project/src/models/enums/RaidSettings/BotDifficulty.ts diff --git a/project/src/models/enums/RaidSettings/TimeAndWeather/CloudinessType.ts b/project/src/models/enums/RaidSettings/TimeAndWeather/CloudinessType.ts new file mode 100644 index 00000000..eda0403b --- /dev/null +++ b/project/src/models/enums/RaidSettings/TimeAndWeather/CloudinessType.ts @@ -0,0 +1,9 @@ +export enum CloudinessType +{ + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud", +} diff --git a/project/src/models/enums/RaidSettings/TimeAndWeather/FogType.ts b/project/src/models/enums/RaidSettings/TimeAndWeather/FogType.ts new file mode 100644 index 00000000..c6ed34c1 --- /dev/null +++ b/project/src/models/enums/RaidSettings/TimeAndWeather/FogType.ts @@ -0,0 +1,8 @@ +export enum FogType +{ + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous", +} diff --git a/project/src/models/enums/RaidSettings/TimeAndWeather/RainType.ts b/project/src/models/enums/RaidSettings/TimeAndWeather/RainType.ts new file mode 100644 index 00000000..c17f4b64 --- /dev/null +++ b/project/src/models/enums/RaidSettings/TimeAndWeather/RainType.ts @@ -0,0 +1,8 @@ +export enum RainType +{ + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower", +} diff --git a/project/src/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.ts b/project/src/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.ts new file mode 100644 index 00000000..21540363 --- /dev/null +++ b/project/src/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.ts @@ -0,0 +1,11 @@ +export enum TimeFlowType +{ + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8", +} diff --git a/project/src/models/enums/RaidSettings/TimeAndWeather/WindSpeed.ts b/project/src/models/enums/RaidSettings/TimeAndWeather/WindSpeed.ts new file mode 100644 index 00000000..d4cb5912 --- /dev/null +++ b/project/src/models/enums/RaidSettings/TimeAndWeather/WindSpeed.ts @@ -0,0 +1,8 @@ +export enum WindSpeed +{ + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane", +} diff --git a/project/src/models/enums/SideType.ts b/project/src/models/enums/SideType.ts new file mode 100644 index 00000000..60686e0f --- /dev/null +++ b/project/src/models/enums/SideType.ts @@ -0,0 +1,6 @@ +export enum SideType +{ + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random", +} diff --git a/project/src/servers/WebSocketServer.ts b/project/src/servers/WebSocketServer.ts index 8a96922d..73dc55a1 100644 --- a/project/src/servers/WebSocketServer.ts +++ b/project/src/servers/WebSocketServer.ts @@ -3,8 +3,9 @@ import { inject, injectable } from "tsyringe"; import WebSocket from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; +import { NotificationEventType } from "@spt-aki/models/enums/NotificationEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; @@ -29,7 +30,7 @@ export class WebSocketServer } protected httpConfig: IHttpConfig; - protected defaultNotification: INotification = { type: NotificationType.PING, eventId: "ping" }; + protected defaultNotification: IWsNotificationEvent = { type: NotificationEventType.PING, eventId: "ping" }; protected webSocketServer: WebSocket.Server; protected webSockets: Record = {}; @@ -62,7 +63,7 @@ export class WebSocketServer this.webSocketServer.addListener("connection", this.wsOnConnection.bind(this)); } - public sendMessage(sessionID: string, output: INotification): void + public sendMessage(sessionID: string, output: IWsNotificationEvent): void { try { diff --git a/project/src/services/NotificationService.ts b/project/src/services/NotificationService.ts index f26ad928..57d89aa4 100644 --- a/project/src/services/NotificationService.ts +++ b/project/src/services/NotificationService.ts @@ -1,5 +1,5 @@ import { injectable } from "tsyringe"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; @injectable() export class NotificationService @@ -37,7 +37,7 @@ export class NotificationService /** * Add message to queue */ - public add(sessionID: string, message: INotification): void + public add(sessionID: string, message: IWsNotificationEvent): void { this.get(sessionID).push(message); }