ClearVision/types/helpers/NotificationSendHelper.d.ts

37 lines
1.8 KiB
TypeScript
Raw Normal View History

2022-07-09 16:03:26 -04:00
import { INotification } from "../models/eft/notifier/INotifier";
2023-05-18 15:57:25 -04:00
import { Dialogue, IUserDialogInfo } from "../models/eft/profile/IAkiProfile";
import { MessageType } from "../models/enums/MessageType";
import { SaveServer } from "../servers/SaveServer";
2022-11-20 14:59:15 -05:00
import { WebSocketServer } from "../servers/WebSocketServer";
2022-07-09 16:03:26 -04:00
import { NotificationService } from "../services/NotificationService";
2023-05-18 15:57:25 -04:00
import { HashUtil } from "../utils/HashUtil";
2022-07-09 16:03:26 -04:00
export declare class NotificationSendHelper {
2022-11-20 14:59:15 -05:00
protected webSocketServer: WebSocketServer;
2023-05-18 15:57:25 -04:00
protected hashUtil: HashUtil;
protected saveServer: SaveServer;
2022-07-09 16:03:26 -04:00
protected notificationService: NotificationService;
2023-05-18 15:57:25 -04:00
constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService);
2022-07-09 16:03:26 -04:00
/**
2023-05-18 15:57:25 -04:00
* Send notification message to the appropriate channel
* @param sessionID
* @param notificationMessage
2022-07-09 16:03:26 -04:00
*/
sendMessage(sessionID: string, notificationMessage: INotification): void;
2023-05-18 15:57:25 -04:00
/**
* Send a message directly to the player
* @param sessionId Session id
* @param senderDetails Who is sendin the message to player
* @param messageText Text to send player
* @param messageType Underlying type of message being sent
*/
sendMessageToPlayer(sessionId: string, senderDetails: IUserDialogInfo, messageText: string, messageType: MessageType): void;
/**
* Helper function for sendMessageToPlayer(), get new dialog for storage in profile or find existing by sender id
* @param sessionId Session id
* @param messageType Type of message to generate
* @param senderDetails Who is sending the message
* @returns Dialogue
*/
protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue;
2022-07-09 16:03:26 -04:00
}