Additional type changes

This commit is contained in:
Dev 2023-07-14 13:07:41 +01:00
parent 7f5966b2a3
commit 65659372dd
5 changed files with 56 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -60,9 +60,22 @@ export declare class DialogueCallbacks implements OnUpdate {
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
/** Handle client/friend/request/list/outbox */
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/**
* Handle client/friend/request/list/inbox
*/
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/**
* Handle client/friend/request/send
*/
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
/**
* Handle client/friend/request/accept
*/
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
/**
* Handle client/friend/request/cancel
*/
cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -41,8 +41,17 @@ declare class GameCallbacks {
* @returns IGameConfigResponse
*/
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
/**
* Handle client/server/list
*/
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
/**
* Handle client/match/group/current
*/
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any;
/**
* Handle client/checkVersion
*/
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
/**
* Handle client/game/keepalive

View File

@ -46,9 +46,26 @@ export declare class GameController {
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
/**
* Handle client/game/start
*/
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/** Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json */
protected validateQuestAssortUnlocksExist(): void;
/**
* Handle client/game/config
*/
getGameConfig(sessionID: string): IGameConfigResponse;
/**
* Handle client/server/list
*/
getServer(sessionId: string): IServerDetails[];
/**
* Handle client/match/group/current
*/
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
/**
* Handle client/checkVersion
*/
getValidGameVersion(sessionId: string): ICheckVersionResponse;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
*/
@ -81,6 +98,10 @@ export declare class GameController {
* @param fullProfile Profile to add mod details to
*/
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
/**
* Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json
*/
protected validateQuestAssortUnlocksExist(): void;
/**
* Add the logged in players name to PMC name pool
* @param pmcProfile
@ -95,8 +116,4 @@ export declare class GameController {
*/
protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { LocalisationService } from "../services/LocalisationService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class HealthController {
protected logger: ILogger;
@ -21,8 +22,9 @@ export declare class HealthController {
protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper;
protected localisationService: LocalisationService;
protected httpResponse: HttpResponseUtil;
protected healthHelper: HealthHelper;
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper);
/**
* stores in-raid player health
* @param pmcData Player profile
@ -40,6 +42,7 @@ export declare class HealthController {
*/
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle Eat event
* Consume food/water outside of a raid
* @param pmcData Player profile
* @param body request Object
@ -48,6 +51,7 @@ export declare class HealthController {
*/
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle RestoreHealth event
* Occurs on post-raid healing page
* @param pmcData player profile
* @param healthTreatmentRequest Request data from client

View File

@ -1,3 +1,7 @@
export interface IAcceptFriendRequestData {
export interface IAcceptFriendRequestData extends IBaseFriendRequest {
}
export interface ICancelFriendRequestData extends IBaseFriendRequest {
}
export interface IBaseFriendRequest {
request_id: string;
}