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

321 lines
5.8 KiB
TypeScript
Raw Normal View History

import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Item } from "@spt/models/eft/common/tables/IItem";
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";
2023-03-03 15:23:46 +00:00
export interface ISptProfile
2023-03-03 15:23:46 +00:00
{
info: Info
characters: Characters
2023-07-15 11:00:35 +01:00
/** Clothing purchases */
suits: string[]
userbuilds: IUserBuilds
dialogues: Record<string, Dialogue>
spt: Spt
vitality: Vitality
inraid: Inraid
insurance: Insurance[]
2023-03-03 15:23:46 +00:00
/** Assort purchases made by player since last trader refresh */
traderPurchases?: Record<string, Record<string, TraderPurchaseData>>
/** Achievements earned by player */
achievements: Record<string, number>
2023-03-03 15:23:46 +00:00
}
export class TraderPurchaseData
{
count: number;
purchaseTimestamp: number;
2023-03-03 15:23:46 +00:00
}
export interface Info
{
/** main profile id */
id: string
scavId: string
aid: number
username: string
password: string
wipe: boolean
edition: string
2023-03-03 15:23:46 +00:00
}
export interface Characters
{
pmc: IPmcData
scav: IPmcData
2023-03-03 15:23:46 +00:00
}
/** used by profile.userbuilds */
export interface IUserBuilds
{
weaponBuilds: IWeaponBuild[]
equipmentBuilds: IEquipmentBuild[]
magazineBuilds: IMagazineBuild[]
}
export interface IUserBuild
{
Id: string
Name: string
}
export interface IWeaponBuild extends IUserBuild
{
Root: string
Items: Item[] // Same as PMC inventory items
2023-03-03 15:23:46 +00:00
}
export interface IEquipmentBuild extends IUserBuild
{
Root: string
Items: Item[] // Same as PMC inventory items
BuildType: EquipmentBuildType
}
export interface IMagazineBuild extends IUserBuild
2023-12-27 20:19:17 +00:00
{
Caliber: string
TopCount: number
BottomCount: number
Items: IMagazineTemplateAmmoItem[]
2023-12-28 12:02:37 +00:00
}
export interface IMagazineTemplateAmmoItem
{
TemplateId: string
Count: number
2023-12-27 20:19:17 +00:00
}
/** Used by defaultEquipmentPresets.json */
export interface IDefaultEquipmentPreset extends IUserBuild
{
Items: Item[]
Root: string
BuildType: EquipmentBuildType
type: string
}
2023-03-03 15:23:46 +00:00
export interface Dialogue
{
attachmentsNew: number
new: number
type: MessageType
Users?: IUserDialogInfo[]
pinned: boolean
messages: Message[]
_id: string
}
export interface IUserDialogInfo
{
_id: string
aid: number
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
type: MessageType
pinned: boolean
Users?: IUserDialogInfo[]
message: MessagePreview
2023-03-03 15:23:46 +00:00
}
export interface Message
{
_id: string
uid: string
type: MessageType
dt: number
UtcDateTime?: number
Member?: IUpdatableChatMember
templateId?: string
text?: string
replyTo?: IReplyTo
hasRewards?: boolean
rewardCollected: boolean
items?: MessageItems
maxStorageTime?: number
systemData?: ISystemData
profileChangeEvents?: IProfileChangeEvent[]
2023-03-03 15:23:46 +00:00
}
export interface IReplyTo
{
_id: string
uid: string
type: MessageType
dt: number
text?: string
}
2023-03-03 15:23:46 +00:00
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[]
2023-03-03 15:23:46 +00:00
}
export interface ISystemData
{
date?: string
time?: string
location?: string
buyerNickname?: string
soldItem?: string
itemCount?: number
2023-03-03 15:23:46 +00:00
}
export interface IUpdatableChatMember
{
Nickname: string
Side: string
Level: number
MemberCategory: MemberCategory
Ignored: boolean
Banned: boolean
2023-03-03 15:23:46 +00:00
}
export interface DateTime
{
date: string
time: string
2023-03-03 15:23:46 +00:00
}
export interface Spt
2023-03-03 15:23:46 +00:00
{
/** What version of SPT was this profile made with */
version: string
/** What mods has this profile loaded at any point in time */
mods?: ModDetails[]
/** What gifts has this profile received and how many */
receivedGifts: ReceivedGift[]
/** item TPLs blacklisted from being sold on flea for this profile */
blacklistedItemTpls?: string[]
/** key: daily type */
freeRepeatableRefreshUsedCount: Record<string, number>
2023-03-03 15:23:46 +00:00
}
export interface ModDetails
{
name: string
version: string
author: string
dateAdded: number
url: string
2023-03-03 15:23:46 +00:00
}
export interface ReceivedGift
{
giftId: string
timestampLastAccepted: number
current: number
}
2023-03-03 15:23:46 +00:00
export interface Vitality
{
health: Health
effects: Effects
2023-03-03 15:23:46 +00:00
}
export interface Health
{
Hydration: number
Energy: number
Temperature: number
Head: number
Chest: number
Stomach: number
LeftArm: number
RightArm: number
LeftLeg: number
RightLeg: number
2023-03-03 15:23:46 +00:00
}
export interface Effects
{
Head: Head
Chest: Chest
Stomach: Stomach
LeftArm: LeftArm
RightArm: RightArm
LeftLeg: LeftLeg
RightLeg: RightLeg
2023-03-03 15:23:46 +00:00
}
export interface Head
{}
2023-03-03 15:23:46 +00:00
export interface Chest
{}
2023-03-03 15:23:46 +00:00
export interface Stomach
{}
2023-03-03 15:23:46 +00:00
export interface LeftArm
2023-03-03 15:23:46 +00:00
{
Fracture?: number
2023-03-03 15:23:46 +00:00
}
export interface RightArm
2023-03-03 15:23:46 +00:00
{
Fracture?: number
2023-03-03 15:23:46 +00:00
}
export interface LeftLeg
2023-03-03 15:23:46 +00:00
{
Fracture?: number
2023-03-03 15:23:46 +00:00
}
export interface RightLeg
2023-03-03 15:23:46 +00:00
{
Fracture?: number
2023-03-03 15:23:46 +00:00
}
export interface Inraid
{
location: string
character: string
2023-03-03 15:23:46 +00:00
}
export interface Insurance
{
scheduledTime: number
traderId: string
maxStorageTime: number
systemData: ISystemData
messageType: MessageType
messageTemplateId: string
items: Item[]
2023-03-03 15:23:46 +00:00
}
export interface MessageContentRagfair
2023-03-03 15:23:46 +00:00
{
offerId: string
count: number
handbookId: string
}