two-slot-extended-mags/types/callbacks/NotifierCallbacks.d.ts

35 lines
2.1 KiB
TypeScript
Raw Normal View History

2024-04-03 20:15:11 +11:00
import { NotifierController } from "@spt-aki/controllers/NotifierController";
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
2023-06-11 15:10:34 +10:00
export declare class NotifierCallbacks {
protected httpServerHelper: HttpServerHelper;
protected httpResponse: HttpResponseUtil;
2023-10-09 20:21:00 +11:00
protected jsonUtil: JsonUtil;
2023-06-11 15:10:34 +10:00
protected notifierController: NotifierController;
2023-10-09 20:21:00 +11:00
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, notifierController: NotifierController);
2023-06-11 15:10:34 +10:00
/**
* If we don't have anything to send, it's ok to not send anything back
* because notification requests can be long-polling. In fact, we SHOULD wait
* until we actually have something to send because otherwise we'd spam the client
* and the client would abort the connection due to spam.
*/
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
2023-10-09 20:21:00 +11:00
/** Handle push/notifier/get */
/** Handle push/notifier/getwebsocket */
2023-06-11 15:10:34 +10:00
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
2023-10-09 20:21:00 +11:00
/** Handle client/notifier/channel/create */
2023-06-11 15:10:34 +10:00
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
/**
* Handle client/game/profile/select
* @returns ISelectProfileResponse
*/
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
notify(url: string, info: any, sessionID: string): string;
}