Add missing types for handled match routes
This commit is contained in:
parent
2696a2dff2
commit
9d127cbb6c
@ -3,21 +3,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController";
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest";
|
|
||||||
import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse";
|
|
||||||
import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest";
|
|
||||||
import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest";
|
|
||||||
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
|
||||||
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
|
||||||
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IGroupCurrentResponse } from "@spt-aki/models/eft/match/IGroupCurrentResponse";
|
import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter";
|
||||||
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse";
|
||||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest";
|
||||||
|
import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest";
|
||||||
|
import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest";
|
||||||
|
import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest";
|
||||||
|
import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse";
|
||||||
|
import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest";
|
||||||
|
import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse";
|
||||||
import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData";
|
import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData";
|
||||||
import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest";
|
import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest";
|
||||||
import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest";
|
|
||||||
import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest";
|
|
||||||
import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData";
|
import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -59,7 +57,7 @@ export class MatchCallbacks
|
|||||||
url: string,
|
url: string,
|
||||||
info: IEmptyRequestData,
|
info: IEmptyRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<IGroupCurrentResponse>
|
): IGetBodyResponseData<IMatchGroupCurrentResponse>
|
||||||
{
|
{
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
@ -78,7 +76,11 @@ export class MatchCallbacks
|
|||||||
|
|
||||||
/** Handle client/match/group/invite/send */
|
/** Handle client/match/group/invite/send */
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>
|
public sendGroupInvite(
|
||||||
|
url: string,
|
||||||
|
info: IMatchGroupInviteSendRequest,
|
||||||
|
sessionID: string,
|
||||||
|
): IGetBodyResponseData<string>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody("2427943f23698ay9f2863735");
|
return this.httpResponse.getBody("2427943f23698ay9f2863735");
|
||||||
}
|
}
|
||||||
@ -87,9 +89,9 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public acceptGroupInvite(
|
public acceptGroupInvite(
|
||||||
url: string,
|
url: string,
|
||||||
info: IAcceptGroupInviteRequest,
|
info: IRequestIdRequest,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
): IGetBodyResponseData<IAcceptGroupInviteResponse[]>
|
): IGetBodyResponseData<IGroupCharacter[]>
|
||||||
{
|
{
|
||||||
const result = [];
|
const result = [];
|
||||||
result.push({});
|
result.push({});
|
||||||
@ -101,7 +103,7 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public declineGroupInvite(
|
public declineGroupInvite(
|
||||||
url: string,
|
url: string,
|
||||||
info: IDeclineGroupInviteRequest,
|
info: IRequestIdRequest,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
): IGetBodyResponseData<boolean>
|
): IGetBodyResponseData<boolean>
|
||||||
{
|
{
|
||||||
@ -112,7 +114,7 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public cancelGroupInvite(
|
public cancelGroupInvite(
|
||||||
url: string,
|
url: string,
|
||||||
info: ICancelGroupInviteRequest,
|
info: IRequestIdRequest,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<boolean>
|
): IGetBodyResponseData<boolean>
|
||||||
{
|
{
|
||||||
@ -123,7 +125,7 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public transferGroup(
|
public transferGroup(
|
||||||
url: string,
|
url: string,
|
||||||
info: ITransferGroupRequest,
|
info: IMatchGroupTransferRequest,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
): IGetBodyResponseData<boolean>
|
): IGetBodyResponseData<boolean>
|
||||||
{
|
{
|
||||||
@ -160,9 +162,9 @@ export class MatchCallbacks
|
|||||||
/** Handle match/group/start_game */
|
/** Handle match/group/start_game */
|
||||||
public joinMatch(
|
public joinMatch(
|
||||||
url: string,
|
url: string,
|
||||||
info: IJoinMatchRequestData,
|
info: IMatchGroupStartGameRequest,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<IJoinMatchResult>
|
): IGetBodyResponseData<IProfileStatusResponse>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody(this.matchController.joinMatch(info, sessionID));
|
return this.httpResponse.getBody(this.matchController.joinMatch(info, sessionID));
|
||||||
}
|
}
|
||||||
@ -182,16 +184,16 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public getGroupStatus(
|
public getGroupStatus(
|
||||||
url: string,
|
url: string,
|
||||||
info: IGetGroupStatusRequestData,
|
info: IMatchGroupStatusRequest,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<IGetGroupStatusResponse>
|
): IGetBodyResponseData<IMatchGroupStatusResponse>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody(this.matchController.getGroupStatus(info));
|
return this.httpResponse.getBody(this.matchController.getGroupStatus(info));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handle client/match/group/delete */
|
/** Handle client/match/group/delete */
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public deleteGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<boolean>
|
public deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>
|
||||||
{
|
{
|
||||||
this.matchController.deleteGroup(info);
|
this.matchController.deleteGroup(info);
|
||||||
return this.httpResponse.getBody(true);
|
return this.httpResponse.getBody(true);
|
||||||
@ -208,7 +210,7 @@ export class MatchCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public removePlayerFromGroup(
|
public removePlayerFromGroup(
|
||||||
url: string,
|
url: string,
|
||||||
info: IRemovePlayerFromGroupRequest,
|
info: IMatchGroupPlayerRemoveRequest,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<boolean>
|
): IGetBodyResponseData<boolean>
|
||||||
{
|
{
|
||||||
|
@ -7,11 +7,11 @@ import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
|
||||||
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
|
||||||
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest";
|
||||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest";
|
||||||
|
import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse";
|
||||||
|
import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse";
|
||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
@ -76,9 +76,9 @@ export class MatchController
|
|||||||
|
|
||||||
/** Handle match/group/start_game */
|
/** Handle match/group/start_game */
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult
|
public joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse
|
||||||
{
|
{
|
||||||
const output: IJoinMatchResult = { maxPveCountExceeded: false, profiles: [] };
|
const output: IProfileStatusResponse = { maxPveCountExceeded: false, profiles: [] };
|
||||||
|
|
||||||
// get list of players joining into the match
|
// get list of players joining into the match
|
||||||
output.profiles.push({
|
output.profiles.push({
|
||||||
@ -92,7 +92,7 @@ export class MatchController
|
|||||||
location: "TODO get location",
|
location: "TODO get location",
|
||||||
raidMode: "Online",
|
raidMode: "Online",
|
||||||
mode: "deathmatch",
|
mode: "deathmatch",
|
||||||
shortid: null,
|
shortId: null,
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
additional_info: null,
|
additional_info: null,
|
||||||
});
|
});
|
||||||
@ -102,7 +102,7 @@ export class MatchController
|
|||||||
|
|
||||||
/** Handle client/match/group/status */
|
/** Handle client/match/group/status */
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse
|
public getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse
|
||||||
{
|
{
|
||||||
return { players: [], maxPveCountExceeded: false };
|
return { players: [], maxPveCountExceeded: false };
|
||||||
}
|
}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
export interface IAcceptGroupInviteRequest
|
|
||||||
{
|
|
||||||
requestId: string
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
export interface IAcceptGroupInviteResponse
|
|
||||||
{
|
|
||||||
_id: string
|
|
||||||
aid: number
|
|
||||||
Info: PlayerInviteInfo
|
|
||||||
isLeader: boolean
|
|
||||||
isReady: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PlayerInviteInfo
|
|
||||||
{
|
|
||||||
Nickname: string
|
|
||||||
Side: string
|
|
||||||
Level: number
|
|
||||||
MemberCategory: number
|
|
||||||
GameVersion: string
|
|
||||||
SavageLockTime: number
|
|
||||||
SavageNickname: string
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface ICancelGroupInviteRequest
|
|
||||||
{
|
|
||||||
requestId: string
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
import { RaidMode } from "@spt-aki/models/enums/RaidMode";
|
|
||||||
|
|
||||||
export interface ICreateGroupRequestData
|
|
||||||
{
|
|
||||||
location: string
|
|
||||||
raidMode: RaidMode
|
|
||||||
startInGroup: boolean
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface IDeclineGroupInviteRequest
|
|
||||||
{
|
|
||||||
requestId: string;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
|
||||||
|
|
||||||
export interface IGetGroupStatusResponse
|
|
||||||
{
|
|
||||||
players: IPlayer[]
|
|
||||||
maxPveCountExceeded: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPlayer
|
|
||||||
{
|
|
||||||
aid: string
|
|
||||||
_id: string
|
|
||||||
lookingGroup: boolean
|
|
||||||
IsLeader: boolean
|
|
||||||
IsReady: boolean
|
|
||||||
Info: ICurrentGroupMemberInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ICurrentGroupMemberInfo
|
|
||||||
{
|
|
||||||
Nickname: string
|
|
||||||
Side: string
|
|
||||||
Level: string
|
|
||||||
MemberCategory: MemberCategory
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface IGetProfileRequestData
|
|
||||||
{
|
|
||||||
profileId: string
|
|
||||||
}
|
|
@ -1,71 +1,8 @@
|
|||||||
export interface IGetRaidConfigurationRequestData
|
import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings";
|
||||||
|
|
||||||
|
export interface IGetRaidConfigurationRequestData extends IRaidSettings
|
||||||
{
|
{
|
||||||
keyId: string
|
keyId: string
|
||||||
side: string
|
|
||||||
location: string
|
|
||||||
timeVariant: string
|
|
||||||
raidMode: string
|
|
||||||
metabolismDisabled: boolean
|
|
||||||
playersSpawnPlace: string
|
|
||||||
timeAndWeatherSettings: TimeAndWeatherSettings
|
|
||||||
botSettings: BotSettings
|
|
||||||
wavesSettings: WavesSettings
|
|
||||||
CanShowGroupPreview: boolean
|
CanShowGroupPreview: boolean
|
||||||
MaxGroupCount: number
|
MaxGroupCount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
// {
|
|
||||||
// keyId: "",
|
|
||||||
// side: "Pmc",
|
|
||||||
// location: "factory4_day",
|
|
||||||
// timeVariant: "CURR", or "PAST"
|
|
||||||
// raidMode: "Local",
|
|
||||||
// metabolismDisabled: false,
|
|
||||||
// playersSpawnPlace: "SamePlace",
|
|
||||||
// timeAndWeatherSettings: {
|
|
||||||
// isRandomTime: false,
|
|
||||||
// isRandomWeather: false,
|
|
||||||
// cloudinessType: "Clear",
|
|
||||||
// rainType: "NoRain",
|
|
||||||
// windType: "Light",
|
|
||||||
// fogType: "NoFog",
|
|
||||||
// timeFlowType: "x1",
|
|
||||||
// hourOfDay: -1
|
|
||||||
// },
|
|
||||||
// botSettings: {
|
|
||||||
// isScavWars: false,
|
|
||||||
// botAmount: "AsOnline"
|
|
||||||
// },
|
|
||||||
// wavesSettings: {
|
|
||||||
// botAmount: "AsOnline",
|
|
||||||
// botDifficulty: "AsOnline",
|
|
||||||
// isBosses: true,
|
|
||||||
// isTaggedAndCursed: false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
export interface TimeAndWeatherSettings
|
|
||||||
{
|
|
||||||
isRandomTime: boolean
|
|
||||||
isRandomWeather: boolean
|
|
||||||
cloudinessType: string
|
|
||||||
rainType: string
|
|
||||||
windType: string
|
|
||||||
fogType: string
|
|
||||||
timeFlowType: string
|
|
||||||
hourOfDay: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BotSettings
|
|
||||||
{
|
|
||||||
isScavWars: boolean
|
|
||||||
botAmount: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface WavesSettings
|
|
||||||
{
|
|
||||||
botAmount: string
|
|
||||||
botDifficulty: string
|
|
||||||
isBosses: boolean
|
|
||||||
isTaggedAndCursed: boolean
|
|
||||||
}
|
|
||||||
|
41
project/src/models/eft/match/IGroupCharacter.ts
Normal file
41
project/src/models/eft/match/IGroupCharacter.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
|
|
||||||
|
export interface IGroupCharacter
|
||||||
|
{
|
||||||
|
_id: string
|
||||||
|
aid: number
|
||||||
|
Info: {
|
||||||
|
Nickname: string
|
||||||
|
Side: string
|
||||||
|
Level: number
|
||||||
|
MemberCategory: MemberCategory
|
||||||
|
GameVersion?: string
|
||||||
|
SavageLockTime?: number
|
||||||
|
SavageNickname?: string
|
||||||
|
hasCoopExtension?: boolean
|
||||||
|
}
|
||||||
|
PlayerVisualRepresentation?: {
|
||||||
|
Info: {
|
||||||
|
Side: string
|
||||||
|
Level: number
|
||||||
|
Nickname: string
|
||||||
|
MemberCategory: MemberCategory
|
||||||
|
GameVersion: string
|
||||||
|
}
|
||||||
|
Customization: {
|
||||||
|
Head: string
|
||||||
|
Body: string
|
||||||
|
Feet: string
|
||||||
|
Hands: string
|
||||||
|
}
|
||||||
|
Equipment: {
|
||||||
|
Id: string
|
||||||
|
Items: Item[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isLeader: boolean
|
||||||
|
isReady?: boolean
|
||||||
|
region?: string
|
||||||
|
lookingGroup?: boolean
|
||||||
|
}
|
@ -1,13 +0,0 @@
|
|||||||
export interface IGroupCurrentResponse
|
|
||||||
{
|
|
||||||
squad: ISquadMember[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISquadMember
|
|
||||||
{
|
|
||||||
_id: string
|
|
||||||
aid: number
|
|
||||||
Info: any
|
|
||||||
isLeader: boolean
|
|
||||||
isReady: boolean
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
export interface IJoinMatchRequestData
|
|
||||||
{
|
|
||||||
groupId: string
|
|
||||||
servers: Server[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Server
|
|
||||||
{
|
|
||||||
ping: number
|
|
||||||
ip: string
|
|
||||||
port: string
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
export interface IJoinMatchResult
|
|
||||||
{
|
|
||||||
maxPveCountExceeded: boolean
|
|
||||||
profiles: IJoinMatchPlayerProfile[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IJoinMatchPlayerProfile
|
|
||||||
{
|
|
||||||
profileid: string
|
|
||||||
profileToken: string
|
|
||||||
status: string
|
|
||||||
sid: string
|
|
||||||
ip: string
|
|
||||||
port: number
|
|
||||||
version: string
|
|
||||||
location: string
|
|
||||||
raidMode: string
|
|
||||||
mode: string
|
|
||||||
shortid: string
|
|
||||||
additional_info: any[]
|
|
||||||
}
|
|
@ -0,0 +1,6 @@
|
|||||||
|
import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter";
|
||||||
|
|
||||||
|
export interface IMatchGroupCurrentResponse
|
||||||
|
{
|
||||||
|
squad: IGroupCharacter[]
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
export interface IMatchGroupInviteSendRequest
|
||||||
|
{
|
||||||
|
to: string
|
||||||
|
inLobby: boolean
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export interface IMatchGroupPlayerRemoveRequest
|
||||||
|
{
|
||||||
|
aidToKick: string
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
import { IServer } from "@spt-aki/models/eft/match/IServer";
|
||||||
|
|
||||||
|
export interface IMatchGroupStartGameRequest
|
||||||
|
{
|
||||||
|
groupId: string
|
||||||
|
servers: IServer[]
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import { RaidMode } from "@spt-aki/models/enums/RaidMode";
|
import { RaidMode } from "@spt-aki/models/enums/RaidMode";
|
||||||
|
|
||||||
export interface IGetGroupStatusRequestData
|
export interface IMatchGroupStatusRequest
|
||||||
{
|
{
|
||||||
location: string
|
location: string
|
||||||
savage: boolean
|
savage: boolean
|
@ -0,0 +1,7 @@
|
|||||||
|
import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter";
|
||||||
|
|
||||||
|
export interface IMatchGroupStatusResponse
|
||||||
|
{
|
||||||
|
players: IGroupCharacter[]
|
||||||
|
maxPveCountExceeded: boolean
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export interface IMatchGroupTransferRequest
|
||||||
|
{
|
||||||
|
aidToChange: string
|
||||||
|
}
|
4
project/src/models/eft/match/IProfileStatusRequest.ts
Normal file
4
project/src/models/eft/match/IProfileStatusRequest.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IProfileStatusRequest
|
||||||
|
{
|
||||||
|
groupId: number
|
||||||
|
}
|
7
project/src/models/eft/match/IProfileStatusResponse.ts
Normal file
7
project/src/models/eft/match/IProfileStatusResponse.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus";
|
||||||
|
|
||||||
|
export interface IProfileStatusResponse
|
||||||
|
{
|
||||||
|
maxPveCountExceeded: boolean
|
||||||
|
profiles: ISessionStatus[]
|
||||||
|
}
|
50
project/src/models/eft/match/IRaidSettings.ts
Normal file
50
project/src/models/eft/match/IRaidSettings.ts
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import { DateTime } from "@spt-aki/models/enums/DateTime";
|
||||||
|
import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace";
|
||||||
|
import { RaidMode } from "@spt-aki/models/enums/RaidMode";
|
||||||
|
import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount";
|
||||||
|
import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty";
|
||||||
|
import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType";
|
||||||
|
import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType";
|
||||||
|
import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType";
|
||||||
|
import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType";
|
||||||
|
import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed";
|
||||||
|
import { SideType } from "@spt-aki/models/enums/SideType";
|
||||||
|
|
||||||
|
export interface IRaidSettings
|
||||||
|
{
|
||||||
|
location: string
|
||||||
|
timeVariant: DateTime
|
||||||
|
raidMode: RaidMode
|
||||||
|
metabolismDisabled: boolean
|
||||||
|
playersSpawnPlace: PlayersSpawnPlace
|
||||||
|
timeAndWeatherSettings: TimeAndWeatherSettings
|
||||||
|
botSettings: BotSettings
|
||||||
|
wavesSettings: WavesSettings
|
||||||
|
side: SideType
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimeAndWeatherSettings
|
||||||
|
{
|
||||||
|
isRandomTime: boolean
|
||||||
|
isRandomWeather: boolean
|
||||||
|
cloudinessType: CloudinessType
|
||||||
|
rainType: RainType
|
||||||
|
fogType: FogType
|
||||||
|
windType: WindSpeed
|
||||||
|
timeFlowType: TimeFlowType
|
||||||
|
hourOfDay: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BotSettings
|
||||||
|
{
|
||||||
|
isScavWars: boolean
|
||||||
|
botAmount: BotAmount
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface WavesSettings
|
||||||
|
{
|
||||||
|
botAmount: BotAmount
|
||||||
|
botDifficulty: BotDifficulty
|
||||||
|
isBosses: boolean
|
||||||
|
isTaggedAndCursed: boolean
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
export interface IRemovePlayerFromGroupRequest
|
|
||||||
{
|
|
||||||
aidToKick: string
|
|
||||||
}
|
|
4
project/src/models/eft/match/IRequestIdRequest.ts
Normal file
4
project/src/models/eft/match/IRequestIdRequest.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IRequestIdRequest
|
||||||
|
{
|
||||||
|
requestId: string
|
||||||
|
}
|
@ -1,5 +0,0 @@
|
|||||||
export interface ISendGroupInviteRequest
|
|
||||||
{
|
|
||||||
to: string
|
|
||||||
inLobby: boolean
|
|
||||||
}
|
|
6
project/src/models/eft/match/IServer.ts
Normal file
6
project/src/models/eft/match/IServer.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IServer
|
||||||
|
{
|
||||||
|
ping: number
|
||||||
|
ip: string
|
||||||
|
port: number
|
||||||
|
}
|
16
project/src/models/eft/match/ISessionStatus.ts
Normal file
16
project/src/models/eft/match/ISessionStatus.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export interface ISessionStatus
|
||||||
|
{
|
||||||
|
profileid: string
|
||||||
|
profileToken: string
|
||||||
|
status: string
|
||||||
|
ip: string
|
||||||
|
port: number
|
||||||
|
sid: string
|
||||||
|
version?: string
|
||||||
|
location?: string
|
||||||
|
raidMode?: string
|
||||||
|
mode?: string
|
||||||
|
shortId?: string
|
||||||
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
|
additional_info?: any[]
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
export interface ITransferGroupRequest
|
|
||||||
{
|
|
||||||
aidToChange: string
|
|
||||||
}
|
|
@ -45,5 +45,5 @@ export enum NotificationType
|
|||||||
FRIEND_LIST_NEW_REQUEST = "friendListNewRequest",
|
FRIEND_LIST_NEW_REQUEST = "friendListNewRequest",
|
||||||
FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList",
|
FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList",
|
||||||
YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList",
|
YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList",
|
||||||
YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList"
|
YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList",
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@ import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse";
|
import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter";
|
||||||
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse";
|
||||||
import { IGroupCurrentResponse } from "@spt-aki/models/eft/match/IGroupCurrentResponse";
|
import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse";
|
||||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse";
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class MatchStaticRouter extends StaticRouter
|
export class MatchStaticRouter extends StaticRouter
|
||||||
@ -41,7 +41,7 @@ export class MatchStaticRouter extends StaticRouter
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<IJoinMatchResult>> =>
|
): Promise<IGetBodyResponseData<IProfileStatusResponse>> =>
|
||||||
{
|
{
|
||||||
return this.matchCallbacks.joinMatch(url, info, sessionID);
|
return this.matchCallbacks.joinMatch(url, info, sessionID);
|
||||||
},
|
},
|
||||||
@ -84,7 +84,7 @@ export class MatchStaticRouter extends StaticRouter
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<IGetGroupStatusResponse>> =>
|
): Promise<IGetBodyResponseData<IMatchGroupStatusResponse>> =>
|
||||||
{
|
{
|
||||||
return this.matchCallbacks.getGroupStatus(url, info, sessionID);
|
return this.matchCallbacks.getGroupStatus(url, info, sessionID);
|
||||||
},
|
},
|
||||||
@ -96,7 +96,7 @@ export class MatchStaticRouter extends StaticRouter
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<IJoinMatchResult>> =>
|
): Promise<IGetBodyResponseData<IProfileStatusResponse>> =>
|
||||||
{
|
{
|
||||||
return this.matchCallbacks.joinMatch(url, info, sessionID);
|
return this.matchCallbacks.joinMatch(url, info, sessionID);
|
||||||
},
|
},
|
||||||
@ -115,7 +115,7 @@ export class MatchStaticRouter extends StaticRouter
|
|||||||
info: IEmptyRequestData,
|
info: IEmptyRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<IGroupCurrentResponse>> =>
|
): Promise<IGetBodyResponseData<IMatchGroupCurrentResponse>> =>
|
||||||
{
|
{
|
||||||
return this.matchCallbacks.groupCurrent(url, info, sessionID);
|
return this.matchCallbacks.groupCurrent(url, info, sessionID);
|
||||||
},
|
},
|
||||||
@ -153,7 +153,7 @@ export class MatchStaticRouter extends StaticRouter
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<IAcceptGroupInviteResponse[]>> =>
|
): Promise<IGetBodyResponseData<IGroupCharacter[]>> =>
|
||||||
{
|
{
|
||||||
return this.matchCallbacks.acceptGroupInvite(url, info, sessionID);
|
return this.matchCallbacks.acceptGroupInvite(url, info, sessionID);
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { inject, injectable } from "tsyringe";
|
import { inject, injectable } from "tsyringe";
|
||||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user