Server/project/src/models/eft/profile/IAkiProfile.ts

251 lines
4.0 KiB
TypeScript
Raw Normal View History

import { MemberCategory } from "../../../models/enums/MemberCategory";
import { MessageType } from "../../enums/MessageType";
import { IPmcData } from "../common/IPmcData";
import { Item } from "../common/tables/IItem";
2023-03-03 15:23:46 +00:00
export interface IAkiProfile
{
info: Info
characters: Characters
suits: string[]
weaponbuilds: WeaponBuild[]
dialogues: Record<string, Dialogue>
aki: Aki
vitality: Vitality
inraid: Inraid
insurance: Insurance[]
/** Assort purchases made by player since last trader refresh */
traderPurchases?: Record<string, Record<string, TraderPurchaseData>>
}
export class TraderPurchaseData
{
count: number;
purchaseTimestamp: number;
2023-03-03 15:23:46 +00:00
}
export interface Info
{
id: string
username: string
password: string
wipe: boolean
edition: string
}
export interface Characters
{
pmc: IPmcData
scav: IPmcData
}
export interface WeaponBuild
{
id: string
name: string
root: string
items: Item[]
}
export interface Dialogue
{
attachmentsNew: number
type: MessageType
new: number
2023-03-03 15:23:46 +00:00
_id: string
Users?: IUserDialogInfo[]
2023-03-03 15:23:46 +00:00
pinned: boolean
messages: Message[]
}
export interface IUserDialogInfo
{
_id: string
info: IUserDialogDetails
}
export interface IUserDialogDetails
{
Nickname: string
Side: string
Level: number
MemberCategory: MemberCategory
2023-03-03 15:23:46 +00:00
}
// @Cleanup: Maybe the same as Dialogue?
export interface DialogueInfo
{
attachmentsNew: number
new: number
_id: string
2023-03-03 15:23:46 +00:00
type: MessageType
pinned: boolean
Users?: any[]
2023-03-03 15:23:46 +00:00
message: MessagePreview
}
export interface Message
{
_id: string
uid: string
type: MessageType
dt: number
UtcDateTime?: number
Member?: IUpdatableChatMember
templateId?: string
2023-03-03 15:23:46 +00:00
text?: string
hasRewards: boolean
rewardCollected: boolean
items: MessageItems
maxStorageTime?: number
systemData?: ISystemData
profileChangeEvents?: any[]
}
export interface MessagePreview
{
uid: string
type: MessageType
dt: number
templateId: string
text?: string
systemData?: ISystemData
2023-03-03 15:23:46 +00:00
}
export interface MessageItems
{
stash?: string
data?: Item[]
}
export interface ISystemData
{
date?: string
time?: string
location?: string
buyerNickname?: string
soldItem?: string
itemCount?: number
}
export interface IUpdatableChatMember
{
Nickname: string
Side: string
Level: number
MemberCategory: string
Ignored: boolean
Banned: boolean
}
export interface DateTime
{
date: string
time: string
}
export interface Aki
{
version: string
mods?: ModDetails[]
}
export interface ModDetails
{
name: string
version: string
author: string
dateAdded: number
}
export interface Vitality
{
health: Health
effects: Effects
}
export interface Health
{
Hydration: number
Energy: number
Temperature: number
Head: number
Chest: number
Stomach: number
LeftArm: number
RightArm: number
LeftLeg: number
RightLeg: number
}
export interface Effects
{
Head: Head
Chest: Chest
Stomach: Stomach
LeftArm: LeftArm
RightArm: RightArm
LeftLeg: LeftLeg
RightLeg: RightLeg
}
export interface Head
{ }
export interface Chest
{ }
export interface Stomach
{ }
export interface LeftArm
{
Fracture?: number
}
export interface RightArm
{
Fracture?: number
}
export interface LeftLeg
{
Fracture?: number
}
export interface RightLeg
{
Fracture?: number
}
export interface Inraid
{
location: string
character: string
}
export interface Insurance
{
scheduledTime: number
traderId: string
messageContent: MessageContent
items: Item[]
}
export interface MessageContent
{
ragfair?: MessageContentRagfair
text?: string
templateId: string
type: MessageType
maxStorageTime?: number
profileChangeEvents?: any[]
systemData?: ISystemData
}
export interface MessageContentRagfair
{
offerId: string
count: number
handbookId: string
}