Add various missing types
This commit is contained in:
parent
cf782a8fcb
commit
6930267d8b
@ -11,6 +11,7 @@ import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGrou
|
|||||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
||||||
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 { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||||
|
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
||||||
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
||||||
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 { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||||
@ -159,12 +160,13 @@ export class MatchCallbacks
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>
|
public getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<IGetGroupStatusResponse>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody(this.matchController.getGroupStatus(info));
|
return this.httpResponse.getBody(this.matchController.getGroupStatus(info));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handle client/match/group/create */
|
/** Handle client/match/group/create */
|
||||||
|
// TODO: may have been removed from client
|
||||||
public createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>
|
public createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody(this.matchController.createGroup(sessionID, info));
|
return this.httpResponse.getBody(this.matchController.createGroup(sessionID, info));
|
||||||
|
@ -7,6 +7,7 @@ import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyR
|
|||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData";
|
import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData";
|
||||||
|
import { ICreateProfileResponse } from "@spt-aki/models/eft/profile/ICreateProfileResponse";
|
||||||
import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest";
|
import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
@ -31,10 +32,11 @@ export class ProfileCallbacks
|
|||||||
/**
|
/**
|
||||||
* Handle client/game/profile/create
|
* Handle client/game/profile/create
|
||||||
*/
|
*/
|
||||||
public createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>
|
public createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<ICreateProfileResponse>
|
||||||
{
|
{
|
||||||
this.profileController.createProfile(info, sessionID);
|
const id = this.profileController.createProfile(info, sessionID);
|
||||||
return this.httpResponse.getBody({ uid: `pmc${sessionID}` });
|
|
||||||
|
return this.httpResponse.getBody({ uid: id });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +10,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
|||||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
||||||
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 { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||||
|
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
||||||
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
||||||
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 { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||||
@ -126,7 +127,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): any
|
public getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse
|
||||||
{
|
{
|
||||||
return { players: [], maxPveCountExceeded: false };
|
return { players: [], maxPveCountExceeded: false };
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,11 @@ export class ProfileController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/create
|
* Handle client/game/profile/create
|
||||||
|
* @param info Client reqeust object
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @returns Profiles _id value
|
||||||
*/
|
*/
|
||||||
public createProfile(info: IProfileCreateRequestData, sessionID: string): void
|
public createProfile(info: IProfileCreateRequestData, sessionID: string): string
|
||||||
{
|
{
|
||||||
const account = this.saveServer.getProfile(sessionID).info;
|
const account = this.saveServer.getProfile(sessionID).info;
|
||||||
const profile: TemplateSide =
|
const profile: TemplateSide =
|
||||||
@ -212,6 +215,8 @@ export class ProfileController
|
|||||||
// Completed account creation
|
// Completed account creation
|
||||||
this.saveServer.getProfile(sessionID).info.wipe = false;
|
this.saveServer.getProfile(sessionID).info.wipe = false;
|
||||||
this.saveServer.saveProfile(sessionID);
|
this.saveServer.saveProfile(sessionID);
|
||||||
|
|
||||||
|
return pmcData._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@ import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
|||||||
|
|
||||||
export interface ICurrentGroupResponse
|
export interface ICurrentGroupResponse
|
||||||
{
|
{
|
||||||
squad: any[];
|
squad: ICurrentGroupSquadMember[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICurrentGroupSquadMember
|
export interface ICurrentGroupSquadMember
|
||||||
|
25
project/src/models/eft/match/IGetGroupStatusResponse.ts
Normal file
25
project/src/models/eft/match/IGetGroupStatusResponse.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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;
|
||||||
|
}
|
4
project/src/models/eft/profile/ICreateProfileResponse.ts
Normal file
4
project/src/models/eft/profile/ICreateProfileResponse.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface ICreateProfileResponse
|
||||||
|
{
|
||||||
|
uid: string
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user