From a9318632498efaf9df7c17eaafe1e995701bbab8 Mon Sep 17 00:00:00 2001 From: 7f8ddd <141754874+7f8ddd@users.noreply.github.com> Date: Tue, 5 Sep 2023 07:37:30 -0500 Subject: [PATCH] Fix interface names, +genericUpdate (#51) Co-authored-by: nk Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com> --- .../api/genericUpdateController.ts | 27 +- .../api/missionInventoryUpdateController.ts | 17 +- src/managers/sessionManager.ts | 20 +- src/models/inventoryModel.ts | 22 +- src/models/shipModel.ts | 4 +- src/services/inventoryService.ts | 59 +- src/types/commonTypes.ts | 2 +- src/types/genericUpdate.ts | 4 + src/types/inventoryTypes/SuitTypes.ts | 18 +- .../inventoryTypes/commonInventoryTypes.ts | 11 +- src/types/inventoryTypes/inventoryTypes.ts | 757 +++++++++--------- src/types/inventoryTypes/weaponTypes.ts | 16 +- src/types/loginTypes.ts | 2 +- src/types/missionInventoryUpdateType.ts | 47 +- src/types/purchaseTypes.ts | 5 +- src/types/session.ts | 4 +- src/types/shipTypes.ts | 7 +- 17 files changed, 534 insertions(+), 488 deletions(-) create mode 100644 src/types/genericUpdate.ts diff --git a/src/controllers/api/genericUpdateController.ts b/src/controllers/api/genericUpdateController.ts index ce541ada..63453c94 100644 --- a/src/controllers/api/genericUpdateController.ts +++ b/src/controllers/api/genericUpdateController.ts @@ -1,7 +1,30 @@ +import { updateGeneric } from "@/src/services/inventoryService"; +import { IGenericUpdate } from "@/src/types/genericUpdate"; import { RequestHandler } from "express"; -const genericUpdateController: RequestHandler = (_req, res) => { - res.json({}); +// TODO: Nightwave evidence submission support is the only thing missing. +// TODO: Also, you might want to test this, because I definitely didn't. +const genericUpdateController: RequestHandler = async (request, response) => { + const accountId = request.query.accountId as string; + + const [body] = String(request.body).split("\n"); + + let reply = {}; + try { + const update = JSON.parse(body) as IGenericUpdate; + if (typeof update !== "object") { + throw new Error("Invalid data format"); + } + + reply = await updateGeneric(update, accountId); + } catch (err) { + console.error("Error parsing JSON data:", err); + } + + // Response support added for when Nightwave is supported below. + // response.json(reply); + + response.json({}); }; export { genericUpdateController }; diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index bde878af..16eeb0e4 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -1,6 +1,6 @@ import { RequestHandler } from "express"; import { missionInventoryUpdate } from "@/src/services/inventoryService"; -import { MissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType"; +import { IMissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType"; /* - [ ] crossPlaySetting - [ ] rewardsMultiplier @@ -25,13 +25,13 @@ import { MissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType"; - [ ] hosts - [x] ChallengeProgress - [ ] SeasonChallengeHistory -- [ ] PS +- [ ] PS (Passive anti-cheat data which includes your username, module list, process list, and system name.) - [ ] ActiveDojoColorResearch - [ ] RewardInfo - [ ] ReceivedCeremonyMsg - [ ] LastCeremonyResetDate -- [ ] MissionPTS -- [ ] RepHash +- [ ] MissionPTS (Used to validate the mission/alive time above.) +- [ ] RepHash (A hash from the replication manager/RepMgr Unknown what it does.) - [ ] EndOfMatchUpload - [ ] ObjectiveReached - [ ] FpsAvg @@ -42,20 +42,19 @@ import { MissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType"; // eslint-disable-next-line @typescript-eslint/no-misused-promises const missionInventoryUpdateController: RequestHandler = async (req, res) => { - const [data] = String(req.body).split("\n"); const id = req.query.accountId as string; - // TODO - salt check + const [data] = String(req.body).split("\n"); try { - const parsedData = JSON.parse(data) as MissionInventoryUpdate; - if (typeof parsedData !== "object" || parsedData === null) throw new Error("Invalid data format"); + const parsedData = JSON.parse(data) as IMissionInventoryUpdate; + if (typeof parsedData !== "object") throw new Error("Invalid data format"); await missionInventoryUpdate(parsedData, id); } catch (err) { console.error("Error parsing JSON data:", err); } - // TODO - get original response + // TODO - Return the updated inventory the way the game does it. res.json({}); }; diff --git a/src/managers/sessionManager.ts b/src/managers/sessionManager.ts index de990f9e..e6558d57 100644 --- a/src/managers/sessionManager.ts +++ b/src/managers/sessionManager.ts @@ -1,10 +1,10 @@ -import { Session, FindSessionRequest } from "@/src/types/session"; +import { ISession, IFindSessionRequest } from "@/src/types/session"; -const sessions: Session[] = []; +const sessions: ISession[] = []; -function createNewSession(sessionData: Session, Creator: string): Session { +function createNewSession(sessionData: ISession, Creator: string): ISession { const sessionId = getNewSessionID(); - const newSession: Session = { + const newSession: ISession = { sessionId, creatorId: Creator, maxPlayers: sessionData.maxPlayers || 4, @@ -35,15 +35,15 @@ function createNewSession(sessionData: Session, Creator: string): Session { return newSession; } -function getAllSessions(): Session[] { +function getAllSessions(): ISession[] { return sessions; } -function getSessionByID(sessionId: string): Session | undefined { +function getSessionByID(sessionId: string): ISession | undefined { return sessions.find(session => session.sessionId === sessionId); } -function getSession(sessionIdOrRequest: string | FindSessionRequest): any[] { +function getSession(sessionIdOrRequest: string | IFindSessionRequest): any[] { if (typeof sessionIdOrRequest === "string") { const session = sessions.find(session => session.sessionId === sessionIdOrRequest); if (session) { @@ -58,10 +58,10 @@ function getSession(sessionIdOrRequest: string | FindSessionRequest): any[] { return []; } - const request = sessionIdOrRequest as FindSessionRequest; + const request = sessionIdOrRequest as IFindSessionRequest; const matchingSessions = sessions.filter(session => { for (const key in request) { - if (key !== "eloRating" && key !== "queryId" && request[key] !== session[key as keyof Session]) { + if (key !== "eloRating" && key !== "queryId" && request[key] !== session[key as keyof ISession]) { return false; } } @@ -74,7 +74,7 @@ function getSession(sessionIdOrRequest: string | FindSessionRequest): any[] { })); } -function getSessionByCreatorID(creatorId: string): Session | undefined { +function getSessionByCreatorID(creatorId: string): ISession | undefined { return sessions.find(session => session.creatorId === creatorId); } diff --git a/src/models/inventoryModel.ts b/src/models/inventoryModel.ts index f73dd1fb..9578d314 100644 --- a/src/models/inventoryModel.ts +++ b/src/models/inventoryModel.ts @@ -1,6 +1,12 @@ import { Model, Schema, Types, model } from "mongoose"; -import { FlavourItem, RawUpgrade, MiscItem, IInventoryDatabase, Booster } from "../types/inventoryTypes/inventoryTypes"; -import { Oid } from "../types/commonTypes"; +import { + IFlavourItem, + IRawUpgrade, + IMiscItem, + IInventoryDatabase, + IBooster +} from "../types/inventoryTypes/inventoryTypes"; +import { IOid } from "../types/commonTypes"; import { ISuitDatabase, ISuitDocument } from "@/src/types/inventoryTypes/SuitTypes"; import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes"; @@ -74,7 +80,7 @@ const BoosterSchema = new Schema({ WeaponSchema.set("toJSON", { transform(_document, returnedObject) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call - returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies Oid; + returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies IOid; delete returnedObject._id; delete returnedObject.__v; } @@ -130,7 +136,7 @@ const suitSchema = new Schema({ suitSchema.set("toJSON", { transform(_document, returnedObject) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call - returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies Oid; + returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies IOid; delete returnedObject._id; delete returnedObject.__v; } @@ -338,10 +344,10 @@ type InventoryDocumentProps = { LongGuns: Types.DocumentArray; Pistols: Types.DocumentArray; Melee: Types.DocumentArray; - FlavourItems: Types.DocumentArray; - RawUpgrades: Types.DocumentArray; - MiscItems: Types.DocumentArray; - Boosters: Types.DocumentArray; + FlavourItems: Types.DocumentArray; + RawUpgrades: Types.DocumentArray; + MiscItems: Types.DocumentArray; + Boosters: Types.DocumentArray; }; type InventoryModelType = Model; diff --git a/src/models/shipModel.ts b/src/models/shipModel.ts index 463a95c2..bd56d933 100644 --- a/src/models/shipModel.ts +++ b/src/models/shipModel.ts @@ -1,6 +1,6 @@ import { Schema, model } from "mongoose"; import { IShip } from "../types/shipTypes"; -import { Oid } from "../types/commonTypes"; +import { IOid } from "../types/commonTypes"; const roomSchema = new Schema( { @@ -19,7 +19,7 @@ const shipSchema = new Schema({ shipSchema.set("toJSON", { transform(_document, returnedObject) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call - returnedObject.ShipId = { $oid: returnedObject._id.toString() } satisfies Oid; + returnedObject.ShipId = { $oid: returnedObject._id.toString() } satisfies IOid; delete returnedObject._id; } }); diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 19900497..565dd910 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -5,13 +5,18 @@ import { Types } from "mongoose"; import { ISuitResponse } from "@/src/types/inventoryTypes/SuitTypes"; import { SlotType } from "@/src/types/purchaseTypes"; import { IWeaponResponse } from "@/src/types/inventoryTypes/weaponTypes"; -import { ChallengeProgress, FlavourItem, IInventoryDatabaseDocument } from "@/src/types/inventoryTypes/inventoryTypes"; import { - MissionInventoryUpdate, - MissionInventoryUpdateCard, - MissionInventoryUpdateGear, - MissionInventoryUpdateItem + IChallengeProgress, + IFlavourItem, + IInventoryDatabaseDocument +} from "@/src/types/inventoryTypes/inventoryTypes"; +import { + IMissionInventoryUpdate, + IMissionInventoryUpdateCard, + IMissionInventoryUpdateGear, + IMissionInventoryUpdateItem } from "../types/missionInventoryUpdateType"; +import { IGenericUpdate } from "../types/genericUpdate"; const createInventory = async (accountOwnerId: Types.ObjectId) => { try { @@ -76,6 +81,27 @@ export const updateCurrency = async (price: number, usePremium: boolean, account return { [currencyName]: -price }; }; +// TODO: AffiliationMods support (Nightwave). +export const updateGeneric = async (data: IGenericUpdate, accountId: string) => { + const inventory = await getInventory(accountId); + + // Make it an array for easier parsing. + if (typeof data.NodeIntrosCompleted === "string") { + data.NodeIntrosCompleted = [data.NodeIntrosCompleted]; + } + + // Combine the two arrays into one. + data.NodeIntrosCompleted = inventory.NodeIntrosCompleted.concat(data.NodeIntrosCompleted); + + // Remove duplicate entries. + const nodes = [...new Set(data.NodeIntrosCompleted)]; + + inventory.NodeIntrosCompleted = nodes; + await inventory.save(); + + return data; +}; + export type WeaponTypeInternal = "LongGuns" | "Pistols" | "Melee"; export const addWeapon = async ( @@ -104,7 +130,7 @@ export const addWeapon = async ( return changedInventory[weaponType][weaponIndex - 1].toJSON(); }; -export const addCustomization = async (customizatonName: string, accountId: string): Promise => { +export const addCustomization = async (customizatonName: string, accountId: string): Promise => { const inventory = await getInventory(accountId); const flavourItemIndex = inventory.FlavourItems.push({ ItemType: customizatonName }) - 1; @@ -114,7 +140,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri const addGearExpByCategory = ( inventory: IInventoryDatabaseDocument, - gearArray: MissionInventoryUpdateGear[] | undefined, + gearArray: IMissionInventoryUpdateGear[] | undefined, categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits" ) => { const category = inventory[categoryName]; @@ -132,7 +158,7 @@ const addGearExpByCategory = ( const addItemsByCategory = ( inventory: IInventoryDatabaseDocument, - itemsArray: (MissionInventoryUpdateItem | MissionInventoryUpdateCard)[] | undefined, + itemsArray: (IMissionInventoryUpdateItem | IMissionInventoryUpdateCard)[] | undefined, categoryName: "RawUpgrades" | "MiscItems" ) => { const category = inventory[categoryName]; @@ -149,7 +175,7 @@ const addItemsByCategory = ( }); }; -const addChallenges = (inventory: IInventoryDatabaseDocument, itemsArray: ChallengeProgress[] | undefined) => { +const addChallenges = (inventory: IInventoryDatabaseDocument, itemsArray: IChallengeProgress[] | undefined) => { const category = inventory.ChallengeProgress; itemsArray?.forEach(({ Name, Progress }) => { @@ -167,19 +193,16 @@ const addChallenges = (inventory: IInventoryDatabaseDocument, itemsArray: Challe const gearKeys = ["Suits", "Pistols", "LongGuns", "Melee"] as const; type GearKeysType = (typeof gearKeys)[number]; -export const missionInventoryUpdate = async (data: MissionInventoryUpdate, accountId: string): Promise => { +export const missionInventoryUpdate = async (data: IMissionInventoryUpdate, accountId: string): Promise => { const { RawUpgrades, MiscItems, RegularCredits, ChallengeProgress } = data; const inventory = await getInventory(accountId); - // TODO - multipliers logic - // credits - inventory.RegularCredits += RegularCredits || 0; - - // gear exp + // Gear XP gearKeys.forEach((key: GearKeysType) => addGearExpByCategory(inventory, data[key], key)); - // other - addItemsByCategory(inventory, RawUpgrades, "RawUpgrades"); // TODO - check mods fusion level + // Other + // TODO: Ensure mods have a valid fusion level and items have a valid quantity, preferably inside of the functions themselves. + addItemsByCategory(inventory, RawUpgrades, "RawUpgrades"); addItemsByCategory(inventory, MiscItems, "MiscItems"); addChallenges(inventory, ChallengeProgress); @@ -187,7 +210,7 @@ export const missionInventoryUpdate = async (data: MissionInventoryUpdate, accou }; export const addBooster = async (ItemType: string, time: number, accountId: string): Promise => { - const currentTime = Math.floor(Date.now() / 1000) - 129600; // booster time getting more without 129600, probably defence logic, idk + const currentTime = Math.floor(Date.now() / 1000) - 129600; // Value is wrong without 129600. Figure out why, please. :) const inventory = await getInventory(accountId); const { Boosters } = inventory; diff --git a/src/types/commonTypes.ts b/src/types/commonTypes.ts index 4c1a7bf7..8b7f30b9 100644 --- a/src/types/commonTypes.ts +++ b/src/types/commonTypes.ts @@ -1,3 +1,3 @@ -export interface Oid { +export interface IOid { $oid: string; } diff --git a/src/types/genericUpdate.ts b/src/types/genericUpdate.ts new file mode 100644 index 00000000..3f61f671 --- /dev/null +++ b/src/types/genericUpdate.ts @@ -0,0 +1,4 @@ +export interface IGenericUpdate { + NodeIntrosCompleted: string | string[]; + // AffiliationMods: any[]; +} \ No newline at end of file diff --git a/src/types/inventoryTypes/SuitTypes.ts b/src/types/inventoryTypes/SuitTypes.ts index 7dc8ca5f..033b1967 100644 --- a/src/types/inventoryTypes/SuitTypes.ts +++ b/src/types/inventoryTypes/SuitTypes.ts @@ -1,5 +1,5 @@ -import { Oid } from "@/src/types/commonTypes"; -import { AbilityOverride, Color, Polarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { IOid } from "@/src/types/commonTypes"; +import { IAbilityOverride, IColor, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { Document, Types } from "mongoose"; // export interface ISuitDocument extends ISuitResponse, Document {} @@ -8,7 +8,7 @@ export interface ISuitDocument extends Document, ISuitResponse { } export interface ISuitResponse extends ISuitDatabase { - ItemId: Oid; + ItemId: IOid; } export interface ISuitDatabase { @@ -18,7 +18,7 @@ export interface ISuitDatabase { XP?: number; InfestationDate?: Date; Features?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; Polarized?: number; ModSlotPurchases?: number; FocusLens?: string; @@ -28,14 +28,14 @@ export interface ISuitDatabase { export interface SuitConfig { Skins?: string[]; - pricol?: Color; - attcol?: Color; - eyecol?: Color; - sigcol?: Color; + pricol?: IColor; + attcol?: IColor; + eyecol?: IColor; + sigcol?: IColor; Upgrades?: string[]; Songs?: Song[]; Name?: string; - AbilityOverride?: AbilityOverride; + AbilityOverride?: IAbilityOverride; PvpUpgrades?: string[]; ugly?: boolean; } diff --git a/src/types/inventoryTypes/commonInventoryTypes.ts b/src/types/inventoryTypes/commonInventoryTypes.ts index fd59073c..0664407f 100644 --- a/src/types/inventoryTypes/commonInventoryTypes.ts +++ b/src/types/inventoryTypes/commonInventoryTypes.ts @@ -1,4 +1,4 @@ -export interface Polarity { +export interface IPolarity { Slot: number; Value: FocusSchool; } @@ -15,7 +15,7 @@ export enum FocusSchool { ApWard = "AP_WARD" } -export interface Color { +export interface IColor { t0?: number; t1?: number; t2?: number; @@ -26,16 +26,17 @@ export interface Color { m1?: number; } -export interface AbilityOverride { +export interface IAbilityOverride { Ability: string; Index: number; } -export interface SlotsBin { +export interface ISlotsBin { Slots: number; } -export interface sigcol { +// ISigCol? IsIgCoL? ISIGCOL! +export interface Isigcol { t0: number; t1: number; en: number; diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index aacfdc15..9fef903d 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -1,10 +1,8 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - import { Document, Types } from "mongoose"; -import { Oid } from "../commonTypes"; -import { AbilityOverride, Color, FocusSchool, Polarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { IOid } from "../commonTypes"; +import { IAbilityOverride, IColor, FocusSchool, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes"; -import { OperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes"; +import { IOperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes"; export interface IInventoryDatabase extends IInventoryResponse { accountOwnerId: Types.ObjectId; @@ -20,14 +18,14 @@ export interface IInventoryResponse { PremiumCredits: number; PremiumCreditsFree: number; FusionPoints: number; - SuitBin: CrewShipSalvageBinClass; - WeaponBin: CrewShipSalvageBinClass; - SentinelBin: CrewShipSalvageBinClass; - SpaceSuitBin: CrewShipSalvageBinClass; - SpaceWeaponBin: CrewShipSalvageBinClass; - PvpBonusLoadoutBin: CrewMemberBinClass; - PveBonusLoadoutBin: CrewShipSalvageBinClass; - RandomModBin: CrewShipSalvageBinClass; + SuitBin: ICrewShipSalvageBinClass; + WeaponBin: ICrewShipSalvageBinClass; + SentinelBin: ICrewShipSalvageBinClass; + SpaceSuitBin: ICrewShipSalvageBinClass; + SpaceWeaponBin: ICrewShipSalvageBinClass; + PvpBonusLoadoutBin: ICrewMemberBinClass; + PveBonusLoadoutBin: ICrewShipSalvageBinClass; + RandomModBin: ICrewShipSalvageBinClass; TradesRemaining: number; DailyAffiliation: number; DailyAffiliationPvp: number; @@ -35,137 +33,137 @@ export interface IInventoryResponse { DailyFocus: number; GiftsRemaining: number; HandlerPoints: number; - MiscItems: Consumable[]; + MiscItems: IConsumable[]; ChallengesFixVersion: number; - ChallengeProgress: ChallengeProgress[]; - RawUpgrades: RawUpgrade[]; + ChallengeProgress: IChallengeProgress[]; + RawUpgrades: IRawUpgrade[]; ReceivedStartingGear: boolean; Suits: ISuitDatabase[]; LongGuns: IWeaponDatabase[]; Pistols: IWeaponDatabase[]; Melee: IWeaponDatabase[]; - Ships: Ship[]; - QuestKeys: QuestKey[]; - FlavourItems: FlavourItem[]; - Scoops: Scoop[]; + Ships: IShip[]; + QuestKeys: IQuestKey[]; + FlavourItems: IFlavourItem[]; + Scoops: IScoop[]; TrainingRetriesLeft: number; - LoadOutPresets: LoadOutPresets; - CurrentLoadOutIds: Array; - Missions: Mission[]; + LoadOutPresets: ILoadOutPresets; + CurrentLoadOutIds: Array; + Missions: IMission[]; RandomUpgradesIdentified: number; LastRegionPlayed: string; - XPInfo: EmailItem[]; - Recipes: Consumable[]; - WeaponSkins: WeaponSkin[]; - PendingRecipes: PendingRecipe[]; + XPInfo: IEmailItem[]; + Recipes: IConsumable[]; + WeaponSkins: IWeaponSkin[]; + PendingRecipes: IPendingRecipe[]; TrainingDate: Date; PlayerLevel: number; - Upgrades: CrewShipSalvagedWeaponSkin[]; + Upgrades: ICrewShipSalvagedWeaponSkin[]; EquippedGear: string[]; DeathMarks: string[]; - FusionTreasures: FusionTreasure[]; - WebFlags: WebFlags; + FusionTreasures: IFusionTreasure[]; + WebFlags: IWebFlags; CompletedAlerts: string[]; - Consumables: Consumable[]; - LevelKeys: Consumable[]; - TauntHistory: TauntHistory[]; + Consumables: IConsumable[]; + LevelKeys: IConsumable[]; + TauntHistory: ITauntHistory[]; StoryModeChoice: string; - PeriodicMissionCompletions: PeriodicMissionCompletion[]; - KubrowPetEggs: KubrowPetEgg[]; - LoreFragmentScans: LoreFragmentScan[]; + PeriodicMissionCompletions: IPeriodicMissionCompletion[]; + KubrowPetEggs: IKubrowPetEgg[]; + LoreFragmentScans: ILoreFragmentScan[]; EquippedEmotes: string[]; - PendingTrades: PendingTrade[]; - Boosters: Booster[]; + PendingTrades: IPendingTrade[]; + Boosters: IBooster[]; ActiveDojoColorResearch: string; - SentientSpawnChanceBoosters: SentientSpawnChanceBoosters; - Affiliations: Affiliation[]; + SentientSpawnChanceBoosters: ISentientSpawnChanceBoosters; + Affiliations: IAffiliation[]; QualifyingInvasions: any[]; FactionScores: number[]; - SpaceSuits: Space[]; - SpaceMelee: Space[]; - SpaceGuns: SpaceGun[]; + SpaceSuits: ISpace[]; + SpaceMelee: ISpace[]; + SpaceGuns: ISpaceGun[]; ArchwingEnabled: boolean; PendingSpectreLoadouts: any[]; - SpectreLoadouts: SpectreLoadout[]; - SentinelWeapons: SentinelWeapon[]; - Sentinels: Sentinel[]; - EmailItems: EmailItem[]; + SpectreLoadouts: ISpectreLoadout[]; + SentinelWeapons: ISentinelWeapon[]; + Sentinels: ISentinel[]; + EmailItems: IEmailItem[]; CompletedSyndicates: string[]; - FocusXP: FocusXP; + FocusXP: IFocusXP; Wishlist: string[]; - Alignment: Alignment; + Alignment: IAlignment; CompletedSorties: string[]; - LastSortieReward: LastSortieReward[]; - Drones: Drone[]; - StepSequencers: StepSequencer[]; + LastSortieReward: ILastSortieReward[]; + Drones: IDrone[]; + StepSequencers: IStepSequencer[]; ActiveAvatarImageType: string; - KubrowPets: KubrowPet[]; - ShipDecorations: Consumable[]; - OperatorAmpBin: CrewShipSalvageBinClass; + KubrowPets: IKubrowPet[]; + ShipDecorations: IConsumable[]; + OperatorAmpBin: ICrewShipSalvageBinClass; DailyAffiliationCetus: number; DailyAffiliationQuills: number; - DiscoveredMarkers: DiscoveredMarker[]; - CompletedJobs: CompletedJob[]; + DiscoveredMarkers: IDiscoveredMarker[]; + CompletedJobs: ICompletedJob[]; FocusAbility: string; - FocusUpgrades: FocusUpgrade[]; - OperatorAmps: OperatorAmp[]; + FocusUpgrades: IFocusUpgrade[]; + OperatorAmps: IOperatorAmp[]; HasContributedToDojo: boolean; HWIDProtectEnabled: boolean; - KubrowPetPrints: KubrowPetPrint[]; - AlignmentReplay: Alignment; - PersonalGoalProgress: PersonalGoalProgress[]; + KubrowPetPrints: IKubrowPetPrint[]; + AlignmentReplay: IAlignment; + PersonalGoalProgress: IPersonalGoalProgress[]; DailyAffiliationSolaris: number; - SpecialItems: SpecialItem[]; + SpecialItems: ISpecialItem[]; ThemeStyle: string; ThemeBackground: string; ThemeSounds: string; BountyScore: number; - ChallengeInstanceStates: ChallengeInstanceState[]; + ChallengeInstanceStates: IChallengeInstanceState[]; LoginMilestoneRewards: string[]; - OperatorLoadOuts: OperatorLoadOut[]; + OperatorLoadOuts: IOperatorLoadOut[]; DailyAffiliationVentkids: number; DailyAffiliationVox: number; RecentVendorPurchases: Array; - Hoverboards: Hoverboard[]; + Hoverboards: IHoverboard[]; NodeIntrosCompleted: string[]; - CompletedJobChains: CompletedJobChain[]; - SeasonChallengeHistory: SeasonChallengeHistory[]; - MoaPets: MoaPet[]; + CompletedJobChains: ICompletedJobChain[]; + SeasonChallengeHistory: ISeasonChallengeHistory[]; + MoaPets: IMoaPet[]; EquippedInstrument: string; - InvasionChainProgress: InvasionChainProgress[]; - DataKnives: DataKnife[]; - NemesisHistory: NemesisHistory[]; + InvasionChainProgress: IInvasionChainProgress[]; + DataKnives: IDataKnife[]; + NemesisHistory: INemesisHistory[]; LastNemesisAllySpawnTime: Date; - Settings: Settings; - PersonalTechProjects: PersonalTechProject[]; - CrewShips: CrewShip[]; - CrewShipSalvageBin: CrewShipSalvageBinClass; - PlayerSkills: PlayerSkills; - CrewShipAmmo: Consumable[]; - CrewShipSalvagedWeaponSkins: CrewShipSalvagedWeaponSkin[]; - CrewShipWeapons: CrewShipWeapon[]; - CrewShipSalvagedWeapons: CrewShipWeapon[]; - CrewShipWeaponSkins: CrewShipSalvagedWeaponSkin[]; + Settings: ISettings; + PersonalTechProjects: IPersonalTechProject[]; + CrewShips: ICrewShip[]; + CrewShipSalvageBin: ICrewShipSalvageBinClass; + PlayerSkills: IPlayerSkills; + CrewShipAmmo: IConsumable[]; + CrewShipSalvagedWeaponSkins: ICrewShipSalvagedWeaponSkin[]; + CrewShipWeapons: ICrewShipWeapon[]; + CrewShipSalvagedWeapons: ICrewShipWeapon[]; + CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[]; TradeBannedUntil: Date; PlayedParkourTutorial: boolean; SubscribedToEmailsPersonalized: number; - MechBin: CrewMemberBinClass; + MechBin: ICrewMemberBinClass; DailyAffiliationEntrati: number; DailyAffiliationNecraloid: number; - MechSuits: MechSuit[]; - InfestedFoundry: InfestedFoundry; + MechSuits: IMechSuit[]; + InfestedFoundry: IInfestedFoundry; BlessingCooldown: Date; - CrewMemberBin: CrewMemberBinClass; - CrewShipHarnesses: CrewShipHarness[]; - CrewShipRawSalvage: Consumable[]; - CrewMembers: CrewMember[]; - AdultOperatorLoadOuts: AdultOperatorLoadOut[]; - LotusCustomization: LotusCustomization; + CrewMemberBin: ICrewMemberBinClass; + CrewShipHarnesses: ICrewShipHarness[]; + CrewShipRawSalvage: IConsumable[]; + CrewMembers: ICrewMember[]; + AdultOperatorLoadOuts: IAdultOperatorLoadOut[]; + LotusCustomization: ILotusCustomization; UseAdultOperatorLoadout: boolean; DailyAffiliationZariman: number; NemesisAbandonedRewards: string[]; DailyAffiliationKahl: number; - LastInventorySync: Oid; + LastInventorySync: IOid; NextRefill: Date; ActiveLandscapeTraps: any[]; EvolutionProgress: any[]; @@ -174,26 +172,26 @@ export interface IInventoryResponse { Quests: any[]; Robotics: any[]; UsedDailyDeals: any[]; - LibraryPersonalProgress: LibraryPersonalProgress[]; - CollectibleSeries: CollectibleSery[]; - LibraryAvailableDailyTaskInfo: LibraryAvailableDailyTaskInfo; + LibraryPersonalProgress: ILibraryPersonalProgress[]; + CollectibleSeries: ICollectibleSery[]; + LibraryAvailableDailyTaskInfo: ILibraryAvailableDailyTaskInfo; HasResetAccount: boolean; - PendingCoupon: PendingCoupon; + PendingCoupon: IPendingCoupon; Harvestable: boolean; DeathSquadable: boolean; } -export interface AdultOperatorLoadOut { +export interface IAdultOperatorLoadOut { Skins: string[]; - attcol: Color; - eyecol: Color; - facial: Color; - pricol: Color; + attcol: IColor; + eyecol: IColor; + facial: IColor; + pricol: IColor; Upgrades?: string[]; - ItemId: Oid; + ItemId: IOid; } -export interface Affiliation { +export interface IAffiliation { Initiated?: boolean; Standing: number; Title?: number; @@ -202,253 +200,254 @@ export interface Affiliation { Tag: string; } -export interface Alignment { +export interface IAlignment { Wisdom: number; Alignment: number; } -export interface Date { +export interface IDate { $date: { $numberLong: string }; } -export interface Booster { +export interface IBooster { ExpiryDate: number; ItemType: string; } -export interface ChallengeInstanceState { - id: Oid; +export interface IChallengeInstanceState { + id: IOid; Progress: number; - params: Param[]; + params: IParam[]; IsRewardCollected: boolean; } -export interface Param { +export interface IParam { n: string; v: string; } -export interface ChallengeProgress { +export interface IChallengeProgress { Progress: number; Name: string; Completed?: string[]; } -export interface CollectibleSery { +export interface ICollectibleSery { CollectibleType: string; Count: number; Tracking: string; ReqScans: number; - IncentiveStates: IncentiveState[]; + IncentiveStates: IIncentiveState[]; } -export interface IncentiveState { +export interface IIncentiveState { threshold: number; complete: boolean; sent: boolean; } -export interface CompletedJobChain { +export interface ICompletedJobChain { LocationTag: string; Jobs: string[]; } -export interface CompletedJob { +export interface ICompletedJob { JobId: string; StageCompletions: number[]; } -export interface Consumable { +export interface IConsumable { ItemCount: number; ItemType: string; } -export interface CrewMemberBinClass { +export interface ICrewMemberBinClass { Slots: number; } -export interface CrewMember { +export interface ICrewMember { ItemType: string; NemesisFingerprint: number; Seed: number; HireDate: Date; AssignedRole: number; - SkillEfficiency: SkillEfficiency; + SkillEfficiency: ISkillEfficiency; WeaponConfigIdx: number; - WeaponId: Oid; + WeaponId: IOid; XP: number; PowersuitType: string; - Configs: CrewMemberConfig[]; + Configs: ICrewMemberConfig[]; SecondInCommand: boolean; - ItemId: Oid; + ItemId: IOid; } // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface CrewMemberConfig {} +export interface ICrewMemberConfig {} -export interface SkillEfficiency { - PILOTING: Combat; - GUNNERY: Combat; - ENGINEERING: Combat; - COMBAT: Combat; - SURVIVABILITY: Combat; +export interface ISkillEfficiency { + PILOTING: ICombat; + GUNNERY: ICombat; + ENGINEERING: ICombat; + COMBAT: ICombat; + SURVIVABILITY: ICombat; } -export interface Combat { +export interface ICombat { Assigned: number; } -export interface CrewShipHarness { +export interface ICrewShipHarness { ItemType: string; - Configs: CrewShipHarnessConfig[]; + Configs: ICrewShipHarnessConfig[]; Features: number; UpgradeVer: number; XP: number; - Polarity: Polarity[]; + Polarity: IPolarity[]; Polarized: number; - ItemId: Oid; + ItemId: IOid; } -export interface CrewShipHarnessConfig { +export interface ICrewShipHarnessConfig { Upgrades?: string[]; } -export interface CrewShipSalvageBinClass { +export interface ICrewShipSalvageBinClass { Extra: number; Slots: number; } -export interface CrewShipSalvagedWeaponSkin { +export interface ICrewShipSalvagedWeaponSkin { ItemType: string; UpgradeFingerprint?: string; - ItemId: Oid; + ItemId: IOid; } -export interface CrewShipWeapon { +export interface ICrewShipWeapon { ItemType: string; UpgradeType?: string; UpgradeFingerprint?: string; - Configs?: CrewShipHarnessConfig[]; + Configs?: ICrewShipHarnessConfig[]; UpgradeVer?: number; - ItemId: Oid; + ItemId: IOid; } -export interface CrewShip { +export interface ICrewShip { ItemType: string; - Configs: CrewShipConfig[]; - Weapon: CrewshipWeapon; - Customization: Customization; + Configs: ICrewShipConfig[]; + Weapon: ICrewshipWeapon; + Customization: ICustomization; ItemName: string; - RailjackImage: FlavourItem; - CrewMembers: CrewMembers; - ItemId: Oid; + RailjackImage: IFlavourItem; + CrewMembers: ICrewMembers; + ItemId: IOid; } -export interface CrewShipConfig { +export interface ICrewShipConfig { Skins?: string[]; - pricol?: Color; + pricol?: IColor; } -export interface CrewMembers { - SLOT_A: Slot; - SLOT_B: Slot; - SLOT_C: Slot; +export interface ICrewMembers { + SLOT_A: ISlot; + SLOT_B: ISlot; + SLOT_C: ISlot; } -export interface Slot { - ItemId: Oid; +export interface ISlot { + ItemId: IOid; } -export interface Customization { - CrewshipInterior: Terior; +export interface ICustomization { + CrewshipInterior: ITerior; } -export interface Terior { +export interface ITerior { SkinFlavourItem: string; - Colors: Color; - ShipAttachments?: ShipAttachments; + Colors: IColor; + ShipAttachments?: IShipAttachments; } -export interface ShipAttachments { +export interface IShipAttachments { HOOD_ORNAMENT: string; } -export interface FlavourItem { +export interface IFlavourItem { ItemType: string; } -export interface RawUpgrade { +export interface IRawUpgrade { ItemCount: number; ItemType: string; } -export interface MiscItem { +export interface IMiscItem { ItemCount: number; ItemType: string; } -export interface CrewshipWeapon { - PILOT: Pilot; - PORT_GUNS: PortGuns; +export interface ICrewshipWeapon { + PILOT: IPilot; + PORT_GUNS: IPortGuns; } -export interface Pilot { - PRIMARY_A: L; - SECONDARY_A: L; +export interface IPilot { + PRIMARY_A: IL; + SECONDARY_A: IL; } -export interface L { - ItemId?: Oid; +// L? Bozo. +export interface IL { + ItemId?: IOid; mod?: number; cus?: number; ItemType?: string; hide?: boolean; } -export interface PortGuns { - PRIMARY_A: L; +export interface IPortGuns { + PRIMARY_A: IL; } -export interface DataKnife { +export interface IDataKnife { ItemType: string; XP: number; - Configs: DataKnifeConfig[]; + Configs: IDataKnifeConfig[]; UpgradeVer: number; - ItemId: Oid; + ItemId: IOid; } -export interface DataKnifeConfig { +export interface IDataKnifeConfig { Upgrades?: string[]; - pricol?: Color; + pricol?: IColor; Skins: string[]; - attcol?: Color; - sigcol?: Color; + attcol?: IColor; + sigcol?: IColor; } -export interface DiscoveredMarker { +export interface IDiscoveredMarker { tag: string; discoveryState: number[]; } -export interface Drone { +export interface IDrone { ItemType: string; CurrentHP: number; - ItemId: Oid; + ItemId: IOid; RepairStart?: Date; } -export interface EmailItem { +export interface IEmailItem { ItemType: string; XP: number; } -export interface FocusUpgrade { +export interface IFocusUpgrade { ItemType: string; Level?: number; IsUniversal?: boolean; } -export interface FocusXP { +export interface IFocusXP { AP_POWER: number; AP_TACTIC: number; AP_DEFENSE: number; @@ -456,33 +455,33 @@ export interface FocusXP { AP_WARD: number; } -export interface FusionTreasure { +export interface IFusionTreasure { ItemCount: number; ItemType: string; Sockets: number; } -export interface Hoverboard { +export interface IHoverboard { ItemType: string; - Configs: HoverboardConfig[]; + Configs: IHoverboardConfig[]; ModularParts: string[]; ItemName?: string; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; UpgradeVer: number; XP: number; Features: number; - ItemId: Oid; + ItemId: IOid; } -export interface HoverboardConfig { +export interface IHoverboardConfig { Upgrades?: string[]; - Skins?: PurpleSkin[]; - pricol?: Color; - sigcol?: Sigcol; - attcol?: Color; + Skins?: IPurpleSkin[]; + pricol?: IColor; + sigcol?: ISigcol; + attcol?: IColor; } -export enum PurpleSkin { +export enum IPurpleSkin { Empty = "", The5Be4Af71A38E4A9306040E15 = "5be4af71a38e4a9306040e15", The5C930Ac3A38E4A24Bc3Ad5De = "5c930ac3a38e4a24bc3ad5de", @@ -490,58 +489,58 @@ export enum PurpleSkin { The5Dd8A8E3A38E4A321A45E6A0 = "5dd8a8e3a38e4a321a45e6a0" } -export interface Sigcol { +export interface ISigcol { t3: number; } -export interface InfestedFoundry { +export interface IInfestedFoundry { Name: string; - Resources: Resource[]; + Resources: IResource[]; Slots: number; XP: number; - ConsumedSuits: ConsumedSuit[]; + ConsumedSuits: IConsumedSuit[]; InvigorationIndex: number; InvigorationSuitOfferings: string[]; InvigorationsApplied: number; } -export interface ConsumedSuit { +export interface IConsumedSuit { s: string; - c?: Color; + c?: IColor; } -export interface Resource { +export interface IResource { ItemType: string; Count: number; } -export interface InvasionChainProgress { - id: Oid; +export interface IInvasionChainProgress { + id: IOid; count: number; } -export interface KubrowPetEgg { +export interface IKubrowPetEgg { ItemType: KubrowPetEggItemType; ExpirationDate: Date; - ItemId: Oid; + ItemId: IOid; } export enum KubrowPetEggItemType { LotusTypesGameKubrowPetEggsKubrowEgg = "/Lotus/Types/Game/KubrowPet/Eggs/KubrowEgg" } -export interface KubrowPetPrint { +export interface IKubrowPetPrint { ItemType: KubrowPetPrintItemType; Name: string; IsMale: boolean; Size: number; - DominantTraits: Traits; - RecessiveTraits: Traits; - ItemId: Oid; + DominantTraits: ITraits; + RecessiveTraits: ITraits; + ItemId: IOid; InheritedModularParts?: any[]; } -export interface Traits { +export interface ITraits { BaseColor: string; SecondaryColor: string; TertiaryColor: string; @@ -566,38 +565,38 @@ export enum KubrowPetPrintItemType { LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint" } -export interface KubrowPet { +export interface IKubrowPet { ItemType: string; - Configs: KubrowPetConfig[]; + Configs: IKubrowPetConfig[]; UpgradeVer: number; - Details: Details; + Details: IDetails; XP?: number; Polarized?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; Features?: number; InfestationDate?: Date; InfestationDays?: number; InfestationType?: string; - ItemId: Oid; + ItemId: IOid; ModularParts?: string[]; } -export interface KubrowPetConfig { +export interface IKubrowPetConfig { Skins?: string[]; - pricol?: Color; - attcol?: Color; + pricol?: IColor; + attcol?: IColor; Upgrades?: string[]; } -export interface Details { +export interface IDetails { Name: string; IsPuppy: boolean; HasCollar: boolean; PrintsRemaining: number; Status: Status; HatchDate: Date; - DominantTraits: Traits; - RecessiveTraits: Traits; + DominantTraits: ITraits; + RecessiveTraits: ITraits; IsMale: boolean; Size: number; } @@ -607,13 +606,13 @@ export enum Status { StatusStasis = "STATUS_STASIS" } -export interface LastSortieReward { - SortieId: Oid; +export interface ILastSortieReward { + SortieId: IOid; StoreItem: string; Manifest: string; } -export interface LibraryAvailableDailyTaskInfo { +export interface ILibraryAvailableDailyTaskInfo { EnemyTypes: string[]; EnemyLocTag: string; EnemyIcon: string; @@ -623,98 +622,98 @@ export interface LibraryAvailableDailyTaskInfo { RewardStanding: number; } -export interface LibraryPersonalProgress { +export interface ILibraryPersonalProgress { TargetType: string; Scans: number; Completed: boolean; } -export interface LoadOutPresets { - NORMAL: Normal[]; - NORMAL_PVP: Archwing[]; - LUNARO: Lunaro[]; - ARCHWING: Archwing[]; - SENTINEL: Archwing[]; - OPERATOR: Archwing[]; - GEAR: Gear[]; - KDRIVE: Kdrive[]; - DATAKNIFE: Archwing[]; - MECH: Mech[]; - OPERATOR_ADULT: Archwing[]; +export interface ILoadOutPresets { + NORMAL: INormal[]; + NORMAL_PVP: IArchwing[]; + LUNARO: ILunaro[]; + ARCHWING: IArchwing[]; + SENTINEL: IArchwing[]; + OPERATOR: IArchwing[]; + GEAR: IGear[]; + KDRIVE: IKdrive[]; + DATAKNIFE: IArchwing[]; + MECH: IMech[]; + OPERATOR_ADULT: IArchwing[]; } -export interface Archwing { +export interface IArchwing { PresetIcon: string; Favorite: boolean; n?: string; - s: L; - l?: L; - m?: L; - ItemId: Oid; - p?: L; + s: IL; + l?: IL; + m?: IL; + ItemId: IOid; + p?: IL; } -export interface Gear { +export interface IGear { n: string; - s: L; - p: L; - l: L; - m: L; - ItemId: Oid; + s: IL; + p: IL; + l: IL; + m: IL; + ItemId: IOid; } -export interface Kdrive { +export interface IKdrive { PresetIcon: string; Favorite: boolean; - s: L; - ItemId: Oid; + s: IL; + ItemId: IOid; } -export interface Lunaro { +export interface ILunaro { n: string; - s: L; - m: L; - ItemId: Oid; + s: IL; + m: IL; + ItemId: IOid; } -export interface Mech { +export interface IMech { PresetIcon: string; Favorite: boolean; - s: L; - h: L; - a: L; - ItemId: Oid; + s: IL; + h: IL; + a: IL; + ItemId: IOid; } -export interface Normal { +export interface INormal { FocusSchool: FocusSchool; PresetIcon: string; Favorite: boolean; n: string; - s: L; - p: L; - l: L; - m: L; - h: L; - a?: L; - ItemId: Oid; + s: IL; + p: IL; + l: IL; + m: IL; + h: IL; + a?: IL; + ItemId: IOid; } export enum UpgradeType { LotusWeaponsGrineerKuvaLichUpgradesInnateDamageRandomMod = "/Lotus/Weapons/Grineer/KuvaLich/Upgrades/InnateDamageRandomMod" } -export interface LoreFragmentScan { +export interface ILoreFragmentScan { Progress: number; Region?: string; ItemType: string; } -export interface LotusCustomization { +export interface ILotusCustomization { Upgrades: any[]; PvpUpgrades: any[]; Skins: string[]; - pricol: Color; + pricol: IColor; attcol: any[]; sigcol: any[]; eyecol: any[]; @@ -723,37 +722,37 @@ export interface LotusCustomization { Persona: string; } -export interface MechSuit { +export interface IMechSuit { ItemType: string; - Configs: DataKnifeConfig[]; + Configs: IDataKnifeConfig[]; Features: number; UpgradeVer: number; XP: number; - Polarity: Polarity[]; + Polarity: IPolarity[]; Polarized: number; - ItemId: Oid; + ItemId: IOid; } -export interface Mission { +export interface IMission { Completes: number; Tier?: number; Tag: string; RewardsCooldownTime?: Date; } -export interface MoaPet { +export interface IMoaPet { ItemType: string; - Configs: KubrowPetConfig[]; + Configs: IKubrowPetConfig[]; UpgradeVer: number; ModularParts: string[]; XP?: number; Features?: number; ItemName: string; - Polarity?: Polarity[]; - ItemId: Oid; + Polarity?: IPolarity[]; + ItemId: IOid; } -export interface NemesisHistory { +export interface INemesisHistory { fp: number; manifest: Manifest; KillingSuit: string; @@ -787,74 +786,74 @@ export enum Manifest { LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo" } -export interface OperatorAmp { +export interface IOperatorAmp { ItemType: string; - Configs: KubrowPetConfig[]; + Configs: IKubrowPetConfig[]; ModularParts?: string[]; XP?: number; UpgradeVer?: number; ItemName?: string; Features?: number; - ItemId: Oid; + ItemId: IOid; } -export interface OperatorLoadOut { +export interface IOperatorLoadOut { Skins: string[]; - pricol?: Color; - attcol?: Color; - eyecol: Color; - facial?: Color; - sigcol?: OperatorLoadOutSigcol; - OperatorAmp?: Oid; + pricol?: IColor; + attcol?: IColor; + eyecol: IColor; + facial?: IColor; + sigcol?: IOperatorLoadOutSigcol; + OperatorAmp?: IOid; Upgrades?: string[]; - AbilityOverride: AbilityOverride; - ItemId: Oid; + AbilityOverride: IAbilityOverride; + ItemId: IOid; } -export interface PendingCoupon { +export interface IPendingCoupon { Expiry: Date; Discount: number; } -export interface PendingRecipe { +export interface IPendingRecipe { ItemType: string; CompletionDate: Date; - ItemId: Oid; + ItemId: IOid; } -export interface PendingTrade { +export interface IPendingTrade { State: number; SelfReady: boolean; BuddyReady: boolean; - Giving?: Giving; + Giving?: IGiving; Revision: number; - Getting: Getting; - ItemId: Oid; + Getting: IGetting; + ItemId: IOid; ClanTax?: number; } -export interface Getting { - RandomUpgrades?: RandomUpgrade[]; +export interface IGetting { + RandomUpgrades?: IRandomUpgrade[]; _SlotOrderInfo: GettingSlotOrderInfo[]; PremiumCredits?: number; } -export interface RandomUpgrade { - UpgradeFingerprint: UpgradeFingerprint; +export interface IRandomUpgrade { + UpgradeFingerprint: IUpgradeFingerprint; ItemType: string; - ItemId: Oid; + ItemId: IOid; } -export interface UpgradeFingerprint { +export interface IUpgradeFingerprint { compat: string; lim: number; lvlReq: number; pol: FocusSchool; - buffs: Buff[]; - curses: Buff[]; + buffs: IBuff[]; + curses: IBuff[]; } -export interface Buff { +export interface IBuff { Tag: string; Value: number; } @@ -865,8 +864,8 @@ export enum GettingSlotOrderInfo { P = "P" } -export interface Giving { - RawUpgrades: Consumable[]; +export interface IGiving { + RawUpgrades: IConsumable[]; _SlotOrderInfo: GivingSlotOrderInfo[]; } @@ -876,34 +875,34 @@ export enum GivingSlotOrderInfo { LotusUpgradesModsPistolDualStatElectEventPistolMod = "/Lotus/Upgrades/Mods/Pistol/DualStat/ElectEventPistolMod" } -export interface PeriodicMissionCompletion { +export interface IPeriodicMissionCompletion { date: Date; tag: string; count?: number; } -export interface PersonalGoalProgress { +export interface IPersonalGoalProgress { Count: number; Tag: string; Best?: number; - _id: Oid; + _id: IOid; ReceivedClanReward0?: boolean; ReceivedClanReward1?: boolean; } -export interface PersonalTechProject { +export interface IPersonalTechProject { State: number; ReqCredits: number; ItemType: string; - ReqItems: Consumable[]; + ReqItems: IConsumable[]; CompletionDate?: Date; - ItemId: Oid; + ItemId: IOid; ProductCategory?: string; - CategoryItemId?: Oid; + CategoryItemId?: IOid; HasContributions?: boolean; } -export interface PlayerSkills { +export interface IPlayerSkills { LPP_SPACE: number; LPP_DRIFTER: number; LPS_NONE: number; @@ -918,59 +917,59 @@ export interface PlayerSkills { LPS_DRIFT_ENDURANCE: number; } -export interface QuestKey { - Progress?: Progress[]; +export interface IQuestKey { + Progress?: IProgress[]; unlock?: boolean; Completed?: boolean; ItemType: string; CompletionDate?: Date; } -export interface Progress { +export interface IProgress { c: number; i: boolean; m: boolean; b?: any[]; } -export interface RawUpgrade { +export interface IRawUpgrade { ItemCount: number; - LastAdded?: Oid; + LastAdded?: IOid; ItemType: string; } -export interface Scoop { +export interface IScoop { ItemType: string; - Configs: ScoopConfig[]; + Configs: IScoopConfig[]; UpgradeVer: number; - ItemId: Oid; + ItemId: IOid; } -export interface ScoopConfig { - pricol?: Color; +export interface IScoopConfig { + pricol?: IColor; } -export interface SeasonChallengeHistory { +export interface ISeasonChallengeHistory { challenge: string; id: string; } -export interface SentientSpawnChanceBoosters { +export interface ISentientSpawnChanceBoosters { numOceanMissionsCompleted: number; } -export interface SentinelWeapon { +export interface ISentinelWeapon { ItemType: string; - Configs: SentinelWeaponConfig[]; + Configs: ISentinelWeaponConfig[]; UpgradeVer?: number; XP?: number; - ItemId: Oid; + ItemId: IOid; Features?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; Polarized?: number; } -export interface SentinelWeaponConfig { +export interface ISentinelWeaponConfig { Skins?: FluffySkin[]; Upgrades?: string[]; } @@ -982,18 +981,18 @@ export enum FluffySkin { LotusUpgradesSkinsHolsterCustomizationsRifleUpperBack = "/Lotus/Upgrades/Skins/HolsterCustomizations/RifleUpperBack" } -export interface Sentinel { +export interface ISentinel { ItemType: string; - Configs: KubrowPetConfig[]; + Configs: IKubrowPetConfig[]; UpgradeVer: number; XP: number; Features?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; Polarized?: number; - ItemId: Oid; + ItemId: IOid; } -export interface Settings { +export interface ISettings { FriendInvRestriction: string; GiftMode: string; GuildInvRestriction: string; @@ -1001,69 +1000,69 @@ export interface Settings { TradingRulesConfirmed: boolean; } -export interface Ship { +export interface IShip { ItemType: string; - ShipExterior: Terior; + ShipExterior: ITerior; AirSupportPower: string; - ItemId: Oid; + ItemId: IOid; } -export interface SpaceGun { +export interface ISpaceGun { ItemType: string; - Configs: SpaceGunConfig[]; + Configs: ISpaceGunConfig[]; XP?: number; UpgradeVer?: number; - ItemId: Oid; + ItemId: IOid; Features?: number; Polarized?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; UpgradeType?: UpgradeType; UpgradeFingerprint?: string; ItemName?: string; } -export interface SpaceGunConfig { +export interface ISpaceGunConfig { Skins?: string[]; - pricol?: Color; + pricol?: IColor; Upgrades?: string[]; } -export interface Space { +export interface ISpace { ItemType: string; - Configs: KubrowPetConfig[]; + Configs: IKubrowPetConfig[]; XP: number; UpgradeVer: number; - ItemId: Oid; + ItemId: IOid; Features?: number; } -export interface SpecialItem { +export interface ISpecialItem { ItemType: string; - Configs: SpecialItemConfig[]; + Configs: ISpecialItemConfig[]; XP?: number; UpgradeVer?: number; Features: number; - ItemId: Oid; + ItemId: IOid; Polarized?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; ModSlotPurchases?: number; } -export interface SpecialItemConfig { +export interface ISpecialItemConfig { Upgrades?: string[]; - pricol?: Color; + pricol?: IColor; Skins?: string[]; - attcol?: Color; - eyecol?: PurpleCol; - sigcol?: PurpleCol; + attcol?: IColor; + eyecol?: IPurpleCol; + sigcol?: IPurpleCol; Name?: string; } -export interface PurpleCol { +export interface IPurpleCol { en: number; } -export interface SpectreLoadout { +export interface ISpectreLoadout { LongGuns: string; Melee: string; Pistols: string; @@ -1073,30 +1072,30 @@ export interface SpectreLoadout { ItemType: string; } -export interface StepSequencer { - NotePacks: NotePacks; +export interface IStepSequencer { + NotePacks: INotePacks; FingerPrint: string; Name: string; - ItemId: Oid; + ItemId: IOid; } -export interface NotePacks { +export interface INotePacks { MELODY: string; BASS: string; PERCUSSION: string; } -export interface TauntHistory { +export interface ITauntHistory { node: string; state: string; } -export interface WeaponSkin { +export interface IWeaponSkin { ItemType: string; - ItemId: Oid; + ItemId: IOid; } -export interface WebFlags { +export interface IWebFlags { activeBuyPlat: number; noShow2FA: boolean; Tennocon2018Digital: boolean; diff --git a/src/types/inventoryTypes/weaponTypes.ts b/src/types/inventoryTypes/weaponTypes.ts index 7fe6bf40..032becba 100644 --- a/src/types/inventoryTypes/weaponTypes.ts +++ b/src/types/inventoryTypes/weaponTypes.ts @@ -1,9 +1,9 @@ -import { Oid } from "@/src/types/commonTypes"; -import { Color, Polarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { IOid } from "@/src/types/commonTypes"; +import { IColor, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; import { Types } from "mongoose"; export interface IWeaponResponse extends IWeaponDatabase { - ItemId: Oid; + ItemId: IOid; } export interface IWeaponDatabase { @@ -13,7 +13,7 @@ export interface IWeaponDatabase { XP?: number; Features?: number; Polarized?: number; - Polarity?: Polarity[]; + Polarity?: IPolarity[]; FocusLens?: string; ModSlotPurchases?: number; UpgradeType?: string; @@ -26,15 +26,15 @@ export interface IWeaponDatabase { export interface WeaponConfig { Skins?: string[]; - pricol?: Color; + pricol?: IColor; Upgrades?: string[]; - attcol?: Color; - eyecol?: OperatorLoadOutSigcol; + attcol?: IColor; + eyecol?: IOperatorLoadOutSigcol; Name?: string; PvpUpgrades?: string[]; } -export interface OperatorLoadOutSigcol { +export interface IOperatorLoadOutSigcol { t0?: number; t1?: number; en?: number; diff --git a/src/types/loginTypes.ts b/src/types/loginTypes.ts index 1d53de43..472a5d5f 100644 --- a/src/types/loginTypes.ts +++ b/src/types/loginTypes.ts @@ -10,7 +10,7 @@ export interface ILoginResponse extends Omit