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