mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 08:50:43 -05:00
Moved interfaces out of ISptProfile
into their own files to reduce circular deps
This commit is contained in:
parent
b5936286bd
commit
733a23f994
@ -10,7 +10,8 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis
|
||||
import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData";
|
||||
import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IDialogue, IDialogueInfo, IMessage, ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { IWsFriendsListAccept } from "@spt/models/eft/ws/IWsFriendsListAccept";
|
||||
import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes";
|
||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand";
|
||||
import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { MailSendService } from "@spt/services/MailSendService";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
|
||||
export interface IChatCommand {
|
||||
getCommandPrefix(): string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand";
|
||||
import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
|
@ -5,7 +5,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
|
||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
|
||||
export interface ISptCommand {
|
||||
getCommand(): string;
|
||||
|
@ -4,7 +4,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||
import { PresetHelper } from "@spt/helpers/PresetHelper";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { Money } from "@spt/models/enums/Money";
|
||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
||||
|
@ -3,7 +3,7 @@ import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptComm
|
||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||
import { PresetHelper } from "@spt/helpers/PresetHelper";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { Money } from "@spt/models/enums/Money";
|
||||
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
@ -56,7 +56,7 @@ export class TraderSptCommand implements ISptCommand {
|
||||
|
||||
const trader: string = result.groups.trader;
|
||||
const command: string = result.groups.command;
|
||||
let quantity: number = +result.groups.quantity;
|
||||
let quantity = +result.groups.quantity;
|
||||
|
||||
const dbTrader = Object.values(this.databaseService.getTraders()).find(
|
||||
(t) => t.base.nickname.toLocaleLowerCase() === trader.toLocaleLowerCase(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot";
|
||||
import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { MailSendService } from "@spt/services/MailSendService";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
|
||||
export interface IDialogueChatBot {
|
||||
getChatBot(): IUserDialogInfo;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||
import { GiftSentResult } from "@spt/models/enums/GiftSentResult";
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IDialogue, IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IDialogue, IMessage } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair";
|
||||
import { IMessage } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||
import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold";
|
||||
|
@ -12,7 +12,8 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||
import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader";
|
||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ISptProfile, ISystemData } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ISystemData } from "@spt/models/eft/profile/ISystemData";
|
||||
import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer";
|
||||
import { ISearchRequestData, OfferOwnerType } from "@spt/models/eft/ragfair/ISearchRequestData";
|
||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "../profile/IUserDialogInfo";
|
||||
|
||||
export interface IGetFriendListDataResponse {
|
||||
Friends: IUserDialogInfo[];
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IMessage } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "../profile/IUserDialogInfo";
|
||||
|
||||
export interface IGetMailDialogViewResponseData {
|
||||
messages: IMessage[];
|
||||
|
5
project/src/models/eft/profile/IMessageContentRagfair.ts
Normal file
5
project/src/models/eft/profile/IMessageContentRagfair.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IMessageContentRagfair {
|
||||
offerId: string;
|
||||
count: number;
|
||||
handbookId: string;
|
||||
}
|
@ -4,6 +4,8 @@ import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType";
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
import { MessageType } from "@spt/models/enums/MessageType";
|
||||
import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails";
|
||||
import { ISystemData } from "./ISystemData";
|
||||
import { IUserDialogInfo } from "./IUserDialogInfo";
|
||||
|
||||
export interface ISptProfile {
|
||||
info: Info;
|
||||
@ -98,20 +100,6 @@ export interface IDialogue {
|
||||
_id: string;
|
||||
}
|
||||
|
||||
export interface IUserDialogInfo {
|
||||
_id: string;
|
||||
aid: number;
|
||||
Info?: IUserDialogDetails;
|
||||
}
|
||||
|
||||
export interface IUserDialogDetails {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: MemberCategory;
|
||||
SelectedMemberCategory: MemberCategory;
|
||||
}
|
||||
|
||||
// @Cleanup: Maybe the same as Dialogue?
|
||||
export interface IDialogueInfo {
|
||||
attachmentsNew: number;
|
||||
@ -163,15 +151,6 @@ export interface IMessageItems {
|
||||
data?: IItem[];
|
||||
}
|
||||
|
||||
export interface ISystemData {
|
||||
date?: string;
|
||||
time?: string;
|
||||
location?: string;
|
||||
buyerNickname?: string;
|
||||
soldItem?: string;
|
||||
itemCount?: number;
|
||||
}
|
||||
|
||||
export interface IUpdatableChatMember {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
@ -282,9 +261,3 @@ export interface IInsurance {
|
||||
messageTemplateId: string;
|
||||
items: IItem[];
|
||||
}
|
||||
|
||||
export interface IMessageContentRagfair {
|
||||
offerId: string;
|
||||
count: number;
|
||||
handbookId: string;
|
||||
}
|
||||
|
8
project/src/models/eft/profile/ISystemData.ts
Normal file
8
project/src/models/eft/profile/ISystemData.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export interface ISystemData {
|
||||
date?: string;
|
||||
time?: string;
|
||||
location?: string;
|
||||
buyerNickname?: string;
|
||||
soldItem?: string;
|
||||
itemCount?: number;
|
||||
}
|
15
project/src/models/eft/profile/IUserDialogInfo.ts
Normal file
15
project/src/models/eft/profile/IUserDialogInfo.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
|
||||
export interface IUserDialogInfo {
|
||||
_id: string;
|
||||
aid: number;
|
||||
Info?: IUserDialogDetails;
|
||||
}
|
||||
|
||||
export interface IUserDialogDetails {
|
||||
Nickname: string;
|
||||
Side: string;
|
||||
Level: number;
|
||||
MemberCategory: MemberCategory;
|
||||
SelectedMemberCategory: MemberCategory;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { GiftSenderType } from "@spt/models/enums/GiftSenderType";
|
||||
import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType";
|
||||
import { Traders } from "@spt/models/enums/Traders";
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||
import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair";
|
||||
import { ISystemData } from "@spt/models/eft/profile/ISystemData";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { MessageType } from "@spt/models/enums/MessageType";
|
||||
import { Traders } from "@spt/models/enums/Traders";
|
||||
|
||||
|
@ -4,14 +4,10 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper";
|
||||
import { NotifierHelper } from "@spt/helpers/NotifierHelper";
|
||||
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||
import {
|
||||
IDialogue,
|
||||
IMessage,
|
||||
IMessageContentRagfair,
|
||||
IMessageItems,
|
||||
ISystemData,
|
||||
IUserDialogInfo,
|
||||
} from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair";
|
||||
import { IDialogue, IMessage, IMessageItems } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ISystemData } from "@spt/models/eft/profile/ISystemData";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||
import { MessageType } from "@spt/models/enums/MessageType";
|
||||
import { Traders } from "@spt/models/enums/Traders";
|
||||
|
@ -2,7 +2,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper";
|
||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { IAggressor, IVictim } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo";
|
||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||
import { MessageType } from "@spt/models/enums/MessageType";
|
||||
|
Loading…
x
Reference in New Issue
Block a user