Combine equipment types
All equipment(warframe, weapons, pets, etc) and configs of it uses one interface.
This commit is contained in:
		
							parent
							
								
									e660e20c87
								
							
						
					
					
						commit
						82555d1f97
					
				@ -1,7 +1,7 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { IUpgradesRequest } from "@/src/types/requestTypes";
 | 
			
		||||
import { FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { IGenericItemDatabase, IMiscItem, TGenericItemKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { FocusSchool, IEquipmentDatabase } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { IMiscItem, IEquipmenItemKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
 | 
			
		||||
@ -28,7 +28,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
        switch (operation.UpgradeRequirement) {
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/OrokinReactor":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/OrokinCatalyst":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.Features ??= 0;
 | 
			
		||||
                        item.Features |= 1;
 | 
			
		||||
@ -38,7 +38,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
                break;
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/UtilityUnlocker":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/WeaponUtilityUnlocker":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.Features ??= 0;
 | 
			
		||||
                        item.Features |= 2;
 | 
			
		||||
@ -49,7 +49,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.Features ??= 0;
 | 
			
		||||
                        item.Features |= 32;
 | 
			
		||||
@ -61,7 +61,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/FormaUmbra":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/FormaAura":
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/FormaStance":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.XP = 0;
 | 
			
		||||
                        setSlotPolarity(item, operation.PolarizeSlot, operation.PolarizeValue);
 | 
			
		||||
@ -72,7 +72,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/ModSlotUnlocker":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.ModSlotPurchases ??= 0;
 | 
			
		||||
                        item.ModSlotPurchases += 1;
 | 
			
		||||
@ -87,7 +87,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            case "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker":
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        item.CustomizationSlotPurchases ??= 0;
 | 
			
		||||
                        item.CustomizationSlotPurchases += 1;
 | 
			
		||||
@ -103,7 +103,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
                break;
 | 
			
		||||
            case "":
 | 
			
		||||
                console.assert(operation.OperationType == "UOT_SWAP_POLARITY");
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
 | 
			
		||||
                for (const item of inventory[payload.ItemCategory as IEquipmenItemKey] as IEquipmentDatabase[]) {
 | 
			
		||||
                    if (item._id.toString() == payload.ItemId.$oid) {
 | 
			
		||||
                        for (let i = 0; i != operation.PolarityRemap.length; ++i) {
 | 
			
		||||
                            if (operation.PolarityRemap[i].Slot != i) {
 | 
			
		||||
@ -122,7 +122,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
 | 
			
		||||
    res.json({ InventoryChanges });
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const setSlotPolarity = (item: IGenericItemDatabase, slot: number, polarity: FocusSchool): void => {
 | 
			
		||||
const setSlotPolarity = (item: IEquipmentDatabase, slot: number, polarity: FocusSchool): void => {
 | 
			
		||||
    item.Polarity ??= [];
 | 
			
		||||
    const entry = item.Polarity.find(entry => entry.Slot == slot);
 | 
			
		||||
    if (entry) {
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,6 @@ import {
 | 
			
		||||
    IBooster,
 | 
			
		||||
    IInventoryResponse,
 | 
			
		||||
    ISlots,
 | 
			
		||||
    IGenericItem,
 | 
			
		||||
    IMailbox,
 | 
			
		||||
    IDuviriInfo,
 | 
			
		||||
    IPendingRecipe as IPendingRecipeDatabase,
 | 
			
		||||
@ -16,14 +15,13 @@ import {
 | 
			
		||||
    ITypeCount,
 | 
			
		||||
    IFocusXP,
 | 
			
		||||
    IFocusUpgrades,
 | 
			
		||||
    IGenericItem2,
 | 
			
		||||
    ITypeXPItem,
 | 
			
		||||
    IChallengeProgress,
 | 
			
		||||
    IStepSequencer,
 | 
			
		||||
    IAffiliation,
 | 
			
		||||
    INotePacks,
 | 
			
		||||
    ICompletedJobChain,
 | 
			
		||||
    ISeasonChallengeHistory,
 | 
			
		||||
    ISeasonChallenge,
 | 
			
		||||
    IPlayerSkills,
 | 
			
		||||
    ISettings,
 | 
			
		||||
    IInfestedFoundry,
 | 
			
		||||
@ -40,15 +38,14 @@ import {
 | 
			
		||||
    ILoreFragmentScan
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
 | 
			
		||||
import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IAbilityOverride,
 | 
			
		||||
    IColor,
 | 
			
		||||
    IItemConfig,
 | 
			
		||||
    IOperatorConfigClient,
 | 
			
		||||
    IOperatorConfigDatabase,
 | 
			
		||||
    IPolarity
 | 
			
		||||
    IPolarity,
 | 
			
		||||
    IEquipmentDatabase,
 | 
			
		||||
    IOperatorConfigClient,
 | 
			
		||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
@ -185,13 +182,13 @@ ItemConfigSchema.set("toJSON", {
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
//TODO: migrate to one schema for weapons and suits.. and possibly others
 | 
			
		||||
const WeaponSchema = new Schema<IWeaponDatabase>(
 | 
			
		||||
const EquipmentSchema = new Schema<IEquipmentDatabase>(
 | 
			
		||||
    {
 | 
			
		||||
        ItemType: String,
 | 
			
		||||
        Configs: [ItemConfigSchema],
 | 
			
		||||
        UpgradeVer: Number,
 | 
			
		||||
        XP: Number,
 | 
			
		||||
        InfestationDate: Date,
 | 
			
		||||
        Features: Number,
 | 
			
		||||
        Polarized: Number,
 | 
			
		||||
        Polarity: [polaritySchema],
 | 
			
		||||
@ -202,16 +199,19 @@ const WeaponSchema = new Schema<IWeaponDatabase>(
 | 
			
		||||
        UpgradeFingerprint: String,
 | 
			
		||||
        ItemName: String,
 | 
			
		||||
        ModularParts: [String],
 | 
			
		||||
        UnlockLevel: Number
 | 
			
		||||
        UnlockLevel: Number,
 | 
			
		||||
        Expiry: Date,
 | 
			
		||||
        SkillTree: String,
 | 
			
		||||
        ArchonCrystalUpgrades: [Schema.Types.Mixed], //TODO
 | 
			
		||||
    },
 | 
			
		||||
    { id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
WeaponSchema.virtual("ItemId").get(function () {
 | 
			
		||||
EquipmentSchema.virtual("ItemId").get(function () {
 | 
			
		||||
    return { $oid: this._id.toString() } satisfies IOid;
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
WeaponSchema.set("toJSON", {
 | 
			
		||||
EquipmentSchema.set("toJSON", {
 | 
			
		||||
    virtuals: true,
 | 
			
		||||
    transform(_document, returnedObject) {
 | 
			
		||||
        delete returnedObject._id;
 | 
			
		||||
@ -268,37 +268,6 @@ upgrqadesSchema.set("toJSON", {
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
//TODO: reduce weapon and suit schemas to one schema if reasonable
 | 
			
		||||
const suitSchema = new Schema<ISuitDatabase>(
 | 
			
		||||
    {
 | 
			
		||||
        ItemType: String,
 | 
			
		||||
        Configs: [ItemConfigSchema],
 | 
			
		||||
        UpgradeVer: Number,
 | 
			
		||||
        XP: Number,
 | 
			
		||||
        InfestationDate: Date,
 | 
			
		||||
        Features: Number,
 | 
			
		||||
        Polarity: [polaritySchema],
 | 
			
		||||
        Polarized: Number,
 | 
			
		||||
        ModSlotPurchases: Number,
 | 
			
		||||
        CustomizationSlotPurchases: Number,
 | 
			
		||||
        FocusLens: String,
 | 
			
		||||
        UnlockLevel: Number
 | 
			
		||||
    },
 | 
			
		||||
    { id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
suitSchema.virtual("ItemId").get(function () {
 | 
			
		||||
    return { $oid: this._id.toString() } satisfies IOid;
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
suitSchema.set("toJSON", {
 | 
			
		||||
    virtuals: true,
 | 
			
		||||
    transform(_document, returnedObject) {
 | 
			
		||||
        delete returnedObject._id;
 | 
			
		||||
        delete returnedObject.__v;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const slotsBinSchema = new Schema<ISlots>(
 | 
			
		||||
    {
 | 
			
		||||
        Slots: Number,
 | 
			
		||||
@ -321,33 +290,6 @@ FlavourItemSchema.set("toJSON", {
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const GenericItemSchema = new Schema<IGenericItem>(
 | 
			
		||||
    {
 | 
			
		||||
        ItemType: String,
 | 
			
		||||
        Configs: [ItemConfigSchema],
 | 
			
		||||
        UpgradeVer: Number,
 | 
			
		||||
        XP: Number,
 | 
			
		||||
        Features: Number,
 | 
			
		||||
        Polarity: [polaritySchema],
 | 
			
		||||
        Polarized: Number,
 | 
			
		||||
        ModSlotPurchases: Number,
 | 
			
		||||
        CustomizationSlotPurchases: Number
 | 
			
		||||
    },
 | 
			
		||||
    { id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
GenericItemSchema.virtual("ItemId").get(function () {
 | 
			
		||||
    return { $oid: this._id.toString() } satisfies IOid;
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
GenericItemSchema.set("toJSON", {
 | 
			
		||||
    virtuals: true,
 | 
			
		||||
    transform(_document, returnedObject) {
 | 
			
		||||
        delete returnedObject._id;
 | 
			
		||||
        delete returnedObject.__v;
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
//  "Mailbox": { "LastInboxId": { "$oid": "123456780000000000000000" } }
 | 
			
		||||
const MailboxSchema = new Schema<IMailbox>(
 | 
			
		||||
    {
 | 
			
		||||
@ -384,30 +326,6 @@ DuviriInfoSchema.set("toJSON", {
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
 | 
			
		||||
const GenericItemSchema2 = new Schema<IGenericItem2>({
 | 
			
		||||
    ItemType: String,
 | 
			
		||||
    ItemName: String,
 | 
			
		||||
    XP: Number,
 | 
			
		||||
    UpgradeVer: Number, //this is probably __v
 | 
			
		||||
    Features: Number,
 | 
			
		||||
    Polarized: Number,
 | 
			
		||||
    CustomizationSlotPurchases: Number,
 | 
			
		||||
    ModSlotPurchases: Number,
 | 
			
		||||
    FocusLens: String,
 | 
			
		||||
    Expiry: Date, //TODO: needs conversion
 | 
			
		||||
    Polarity: [polaritySchema],
 | 
			
		||||
    Configs: [ItemConfigSchema],
 | 
			
		||||
    ModularParts: [String],
 | 
			
		||||
    SkillTree: String,
 | 
			
		||||
    UpgradeType: String,
 | 
			
		||||
    UpgradeFingerprint: String,
 | 
			
		||||
    OffensiveUpgrade: String,
 | 
			
		||||
    DefensiveUpgrade: String,
 | 
			
		||||
    UpgradesExpiry: Date, //TODO: needs conversion
 | 
			
		||||
    ArchonCrystalUpgrades: []
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const TypeXPItemSchema = new Schema<ITypeXPItem>(
 | 
			
		||||
    {
 | 
			
		||||
        ItemType: String,
 | 
			
		||||
@ -475,7 +393,7 @@ const completedJobChainsSchema = new Schema<ICompletedJobChain>(
 | 
			
		||||
    { _id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
const seasonChallengeHistorySchema = new Schema<ISeasonChallengeHistory>(
 | 
			
		||||
const seasonChallengeHistorySchema = new Schema<ISeasonChallenge>(
 | 
			
		||||
    {
 | 
			
		||||
        challenge: String,
 | 
			
		||||
        id: String
 | 
			
		||||
@ -699,22 +617,22 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
        Upgrades: [upgrqadesSchema],
 | 
			
		||||
 | 
			
		||||
        //Warframe
 | 
			
		||||
        Suits: [suitSchema],
 | 
			
		||||
        Suits: [EquipmentSchema],
 | 
			
		||||
        //Primary    Weapon
 | 
			
		||||
        LongGuns: [WeaponSchema],
 | 
			
		||||
        LongGuns: [EquipmentSchema],
 | 
			
		||||
        //Secondary  Weapon
 | 
			
		||||
        Pistols: [WeaponSchema],
 | 
			
		||||
        Pistols: [EquipmentSchema],
 | 
			
		||||
        //Melee      Weapon
 | 
			
		||||
        Melee: [WeaponSchema],
 | 
			
		||||
        Melee: [EquipmentSchema],
 | 
			
		||||
        //Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
 | 
			
		||||
        SpecialItems: [GenericItemSchema],
 | 
			
		||||
        SpecialItems: [EquipmentSchema],
 | 
			
		||||
        //The Mandachord(Octavia) is a step sequencer
 | 
			
		||||
        StepSequencers: [StepSequencersSchema],
 | 
			
		||||
 | 
			
		||||
        //Sentinel(like Helios or modular)
 | 
			
		||||
        Sentinels: [Schema.Types.Mixed],
 | 
			
		||||
        Sentinels: [EquipmentSchema],
 | 
			
		||||
        //Any /Sentinels/SentinelWeapons/ (like warframe weapon)
 | 
			
		||||
        SentinelWeapons: [Schema.Types.Mixed],
 | 
			
		||||
        SentinelWeapons: [EquipmentSchema],
 | 
			
		||||
        //Modular Pets
 | 
			
		||||
        MoaPets: [Schema.Types.Mixed],
 | 
			
		||||
 | 
			
		||||
@ -735,12 +653,12 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
 | 
			
		||||
        //to use add SummonItem to Consumables+EquippedGear
 | 
			
		||||
        //Archwing need Suits+Melee+Guns
 | 
			
		||||
        SpaceSuits: [GenericItemSchema],
 | 
			
		||||
        SpaceMelee: [GenericItemSchema],
 | 
			
		||||
        SpaceGuns: [Schema.Types.Mixed],
 | 
			
		||||
        SpaceSuits: [EquipmentSchema],
 | 
			
		||||
        SpaceMelee: [EquipmentSchema],
 | 
			
		||||
        SpaceGuns: [EquipmentSchema],
 | 
			
		||||
        ArchwingEnabled: Boolean,
 | 
			
		||||
        //Mech need Suits+SpaceGuns+SpecialItem
 | 
			
		||||
        MechSuits: [suitSchema],
 | 
			
		||||
        MechSuits: [EquipmentSchema],
 | 
			
		||||
        ///Restoratives/HoverboardSummon (like Suit)
 | 
			
		||||
        Hoverboards: [Schema.Types.Mixed],
 | 
			
		||||
 | 
			
		||||
@ -752,10 +670,10 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
        OperatorLoadOuts: [operatorConfigSchema],
 | 
			
		||||
        //Drifter
 | 
			
		||||
        AdultOperatorLoadOuts: [operatorConfigSchema],
 | 
			
		||||
        DrifterMelee: [GenericItemSchema],
 | 
			
		||||
        DrifterGuns: [GenericItemSchema],
 | 
			
		||||
        DrifterMelee: [EquipmentSchema],
 | 
			
		||||
        DrifterGuns: [EquipmentSchema],
 | 
			
		||||
        //ErsatzHorsePowerSuit
 | 
			
		||||
        Horses: [GenericItemSchema],
 | 
			
		||||
        Horses: [EquipmentSchema],
 | 
			
		||||
 | 
			
		||||
        //LandingCraft like Liset
 | 
			
		||||
        Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
 | 
			
		||||
@ -790,7 +708,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
        FlavourItems: [FlavourItemSchema],
 | 
			
		||||
 | 
			
		||||
        //Lunaro Weapon
 | 
			
		||||
        Scoops: [GenericItemSchema],
 | 
			
		||||
        Scoops: [EquipmentSchema],
 | 
			
		||||
 | 
			
		||||
        //Mastery Rank*(Need item XPInfo to rank up)
 | 
			
		||||
        PlayerLevel: Number,
 | 
			
		||||
@ -907,7 +825,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
        InvasionChainProgress: [Schema.Types.Mixed],
 | 
			
		||||
 | 
			
		||||
        //https://warframe.fandom.com/wiki/Parazon
 | 
			
		||||
        DataKnives: [GenericItemSchema],
 | 
			
		||||
        DataKnives: [EquipmentSchema],
 | 
			
		||||
 | 
			
		||||
        //CorpusLich or GrineerLich
 | 
			
		||||
        NemesisAbandonedRewards: [String],
 | 
			
		||||
@ -1000,24 +918,24 @@ inventorySchema.set("toJSON", {
 | 
			
		||||
 | 
			
		||||
// type overwrites for subdocuments/subdocument arrays
 | 
			
		||||
type InventoryDocumentProps = {
 | 
			
		||||
    Suits: Types.DocumentArray<ISuitDatabase>;
 | 
			
		||||
    LongGuns: Types.DocumentArray<IWeaponDatabase>;
 | 
			
		||||
    Pistols: Types.DocumentArray<IWeaponDatabase>;
 | 
			
		||||
    Melee: Types.DocumentArray<IWeaponDatabase>;
 | 
			
		||||
    Suits: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    LongGuns: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    Pistols: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    Melee: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    FlavourItems: Types.DocumentArray<IFlavourItem>;
 | 
			
		||||
    RawUpgrades: Types.DocumentArray<IRawUpgrade>;
 | 
			
		||||
    Upgrades: Types.DocumentArray<ICrewShipSalvagedWeaponSkin>;
 | 
			
		||||
    MiscItems: Types.DocumentArray<IMiscItem>;
 | 
			
		||||
    Boosters: Types.DocumentArray<IBooster>;
 | 
			
		||||
    OperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>;
 | 
			
		||||
    SpecialItems: Types.DocumentArray<IGenericItem>;
 | 
			
		||||
    SpecialItems: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>; //TODO: this should still contain _id
 | 
			
		||||
    MechSuits: Types.DocumentArray<ISuitDatabase>;
 | 
			
		||||
    Scoops: Types.DocumentArray<IGenericItem>;
 | 
			
		||||
    DataKnives: Types.DocumentArray<IGenericItem>;
 | 
			
		||||
    DrifterMelee: Types.DocumentArray<IGenericItem>;
 | 
			
		||||
    Sentinels: Types.DocumentArray<IWeaponDatabase>;
 | 
			
		||||
    Horses: Types.DocumentArray<IGenericItem>;
 | 
			
		||||
    MechSuits: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    Scoops: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    DataKnives: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    DrifterMelee: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    Sentinels: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    Horses: Types.DocumentArray<IEquipmentDatabase>;
 | 
			
		||||
    PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { ILoadoutConfigDatabase, ILoadoutDatabase, IEquipmentSelection } from "@/src/types/saveLoadoutTypes";
 | 
			
		||||
import { IEquipmentSelection } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
			
		||||
import { Model, Schema, Types, model } from "mongoose";
 | 
			
		||||
 | 
			
		||||
const oidSchema = new Schema<IOid>(
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
 | 
			
		||||
import { SlotNames } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IChallengeProgress,
 | 
			
		||||
    IConsumable,
 | 
			
		||||
@ -13,7 +11,7 @@ import {
 | 
			
		||||
    IMiscItem,
 | 
			
		||||
    IMission,
 | 
			
		||||
    IRawUpgrade,
 | 
			
		||||
    ISeasonChallengeHistory,
 | 
			
		||||
    ISeasonChallenge,
 | 
			
		||||
    ITypeCount
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IGenericUpdate } from "../types/genericUpdate";
 | 
			
		||||
@ -26,6 +24,7 @@ import {
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { WeaponTypeInternal, getExalted } from "@/src/services/itemDataService";
 | 
			
		||||
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
 | 
			
		||||
import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
 | 
			
		||||
export const createInventory = async (
 | 
			
		||||
    accountOwnerId: Types.ObjectId,
 | 
			
		||||
@ -73,7 +72,7 @@ export const addSentinel = async (sentinelName: string, accountId: string) => {
 | 
			
		||||
    return changedInventory.Sentinels[sentinelIndex - 1].toJSON();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<ISuitClient> => {
 | 
			
		||||
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<IEquipmentClient> => {
 | 
			
		||||
    const specialItems = getExalted(powersuitName);
 | 
			
		||||
    if (specialItems != false) {
 | 
			
		||||
        for await (const specialItem of specialItems) {
 | 
			
		||||
@ -222,7 +221,7 @@ export const addWeapon = async (
 | 
			
		||||
    weaponType: WeaponTypeInternal,
 | 
			
		||||
    weaponName: string,
 | 
			
		||||
    accountId: string
 | 
			
		||||
): Promise<IWeaponClient> => {
 | 
			
		||||
): Promise<IEquipmentClient> => {
 | 
			
		||||
    const inventory = await getInventory(accountId);
 | 
			
		||||
 | 
			
		||||
    let weaponIndex;
 | 
			
		||||
@ -254,7 +253,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
 | 
			
		||||
 | 
			
		||||
const addGearExpByCategory = (
 | 
			
		||||
    inventory: IInventoryDatabaseDocument,
 | 
			
		||||
    gearArray: ISuitClient[] | IWeaponClient[] | undefined,
 | 
			
		||||
    gearArray: IEquipmentClient[] | undefined,
 | 
			
		||||
    categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits"
 | 
			
		||||
) => {
 | 
			
		||||
    const category = inventory[categoryName];
 | 
			
		||||
@ -355,7 +354,7 @@ export const updateChallengeProgress = async (challenges: IUpdateChallengeProgre
 | 
			
		||||
 | 
			
		||||
export const addSeasonalChallengeHistory = (
 | 
			
		||||
    inventory: IInventoryDatabaseDocument,
 | 
			
		||||
    itemsArray: ISeasonChallengeHistory[] | undefined
 | 
			
		||||
    itemsArray: ISeasonChallenge[] | undefined
 | 
			
		||||
) => {
 | 
			
		||||
    const category = inventory.SeasonChallengeHistory;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,25 +0,0 @@
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { IItemConfig } from "./commonInventoryTypes";
 | 
			
		||||
 | 
			
		||||
export interface ISuitClient extends Omit<ISuitDatabase, "_id"> {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISuitDatabase {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    InfestationDate?: Date;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
    Polarized?: number;
 | 
			
		||||
    ModSlotPurchases?: number;
 | 
			
		||||
    CustomizationSlotPurchases?: number;
 | 
			
		||||
    FocusLens?: string;
 | 
			
		||||
    UnlockLevel?: number;
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
    ItemId?: IOid; // only in response
 | 
			
		||||
}
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
export interface IPolarity {
 | 
			
		||||
@ -38,15 +38,8 @@ export interface ISlotsBin {
 | 
			
		||||
    Slots: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ISigCol? IsIgCoL? ISIGCOL!
 | 
			
		||||
export interface Isigcol {
 | 
			
		||||
    t0: number;
 | 
			
		||||
    t1: number;
 | 
			
		||||
    en: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface IItemConfigBase {
 | 
			
		||||
    Skins: string[];
 | 
			
		||||
export interface IItemConfig {
 | 
			
		||||
    Skins?: string[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
    attcol?: IColor;
 | 
			
		||||
    sigcol?: IColor;
 | 
			
		||||
@ -56,13 +49,8 @@ interface IItemConfigBase {
 | 
			
		||||
    cloth?: IColor;
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
    Name?: string;
 | 
			
		||||
    ugly?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//TODO: Proper names for the different config types, this should be something like
 | 
			
		||||
//IItemConfigPlayable
 | 
			
		||||
export interface IItemConfig extends IItemConfigBase {
 | 
			
		||||
    Songs?: ISong[];
 | 
			
		||||
    OperatorAmp?: IOid;
 | 
			
		||||
    Songs: ISong[];
 | 
			
		||||
    AbilityOverride?: IAbilityOverride;
 | 
			
		||||
    PvpUpgrades?: string[];
 | 
			
		||||
    ugly?: boolean;
 | 
			
		||||
@ -74,14 +62,46 @@ export interface ISong {
 | 
			
		||||
    p?: string;
 | 
			
		||||
    s: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//TODO: Consider renaming it to loadout instead of config
 | 
			
		||||
export interface IOperatorConfigDatabase extends IItemConfigBase {
 | 
			
		||||
export interface IOperatorConfigDatabase extends IItemConfig {
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
    AbilityOverride?: IAbilityOverride; // not present in adultOperator
 | 
			
		||||
    OperatorAmp?: IOid; // not present in adultOperator
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IOperatorConfigClient extends Omit<IOperatorConfigDatabase, "_id"> {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IEquipmentSelection {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    mod?: number;
 | 
			
		||||
    cus?: number;
 | 
			
		||||
    ItemType?: string;
 | 
			
		||||
    hide?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IEquipmentClient extends Omit<IEquipmentDatabase, "_id"> {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IEquipmentDatabase {
 | 
			
		||||
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    ItemName?: string;
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    InfestationDate?: Date;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    Polarized?: number;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
    FocusLens?: string;
 | 
			
		||||
    ModSlotPurchases?: number;
 | 
			
		||||
    CustomizationSlotPurchases?: number;
 | 
			
		||||
    UpgradeType?: string;
 | 
			
		||||
    UpgradeFingerprint?: string;
 | 
			
		||||
    ModularParts?: string[];
 | 
			
		||||
    UnlockLevel?: number;
 | 
			
		||||
    Expiry?: IMongoDate;
 | 
			
		||||
    SkillTree?: string;
 | 
			
		||||
    ArchonCrystalUpgrades?: []; //TODO
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -2,15 +2,14 @@
 | 
			
		||||
import { Document, Types } from "mongoose";
 | 
			
		||||
import { IOid, IMongoDate } from "../commonTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IAbilityOverride,
 | 
			
		||||
    IColor,
 | 
			
		||||
    FocusSchool,
 | 
			
		||||
    IPolarity,
 | 
			
		||||
    IItemConfig,
 | 
			
		||||
    IOperatorConfigClient
 | 
			
		||||
    IOperatorConfigClient,
 | 
			
		||||
    IEquipmentSelection,
 | 
			
		||||
    IEquipmentDatabase
 | 
			
		||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
 | 
			
		||||
import { IOperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
 | 
			
		||||
 | 
			
		||||
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
 | 
			
		||||
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
 | 
			
		||||
@ -61,48 +60,7 @@ export interface ITypeCount {
 | 
			
		||||
    ItemCount: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IGenericItem2 {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    XP: number;
 | 
			
		||||
    UpgradeVer: number;
 | 
			
		||||
    Features: number;
 | 
			
		||||
    Polarized: number;
 | 
			
		||||
    CustomizationSlotPurchases: number;
 | 
			
		||||
    ModSlotPurchases: number;
 | 
			
		||||
    FocusLens: string;
 | 
			
		||||
    Expiry: IMongoDate;
 | 
			
		||||
    Polarity: IPolarity[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    ModularParts: string[];
 | 
			
		||||
    SkillTree: string;
 | 
			
		||||
    UpgradeType: string;
 | 
			
		||||
    UpgradeFingerprint: string;
 | 
			
		||||
    OffensiveUpgrade: string;
 | 
			
		||||
    DefensiveUpgrade: string;
 | 
			
		||||
    UpgradesExpiry: IMongoDate;
 | 
			
		||||
    ArchonCrystalUpgrades: [];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IGenericItem {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    UpgradeVer: number;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
    Polarized?: number;
 | 
			
		||||
    ModSlotPurchases?: number;
 | 
			
		||||
    CustomizationSlotPurchases?: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IGenericItemDatabase extends Omit<IGenericItem, "ItemId"> {
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export type TGenericItemKey = "Suits" | "LongGuns" | "Pistols" | "Melee";
 | 
			
		||||
export type IEquipmenItemKey = "Suits" | "LongGuns" | "Pistols" | "Melee" | "SpecialItems" | "Sentinels" | "SentinelWeapons";
 | 
			
		||||
 | 
			
		||||
export interface IDuviriInfo {
 | 
			
		||||
    Seed: number;
 | 
			
		||||
@ -119,12 +77,12 @@ export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "Completion
 | 
			
		||||
    CompletionDate: IMongoDate;
 | 
			
		||||
}
 | 
			
		||||
export interface IInventoryResponse {
 | 
			
		||||
    Horses: IGenericItem[];
 | 
			
		||||
    DrifterMelee: IGenericItem[];
 | 
			
		||||
    DrifterGuns: IGenericItem[];
 | 
			
		||||
    Horses: IEquipmentDatabase[];
 | 
			
		||||
    DrifterMelee: IEquipmentDatabase[];
 | 
			
		||||
    DrifterGuns: IEquipmentDatabase[];
 | 
			
		||||
    DuviriInfo: IDuviriInfo;
 | 
			
		||||
    Mailbox: IMailbox;
 | 
			
		||||
    KahlLoadOuts: IGenericItem[];
 | 
			
		||||
    KahlLoadOuts: IEquipmentDatabase[];
 | 
			
		||||
    SubscribedToEmails: number;
 | 
			
		||||
    Created: IMongoDate;
 | 
			
		||||
    RewardSeed: number;
 | 
			
		||||
@ -156,19 +114,19 @@ export interface IInventoryResponse {
 | 
			
		||||
    ChallengeProgress: IChallengeProgress[];
 | 
			
		||||
    RawUpgrades: IRawUpgrade[];
 | 
			
		||||
    ReceivedStartingGear: boolean;
 | 
			
		||||
    Suits: ISuitDatabase[];
 | 
			
		||||
    LongGuns: IWeaponDatabase[];
 | 
			
		||||
    Pistols: IWeaponDatabase[];
 | 
			
		||||
    Melee: IWeaponDatabase[];
 | 
			
		||||
    Suits: IEquipmentDatabase[];
 | 
			
		||||
    LongGuns: IEquipmentDatabase[];
 | 
			
		||||
    Pistols: IEquipmentDatabase[];
 | 
			
		||||
    Melee: IEquipmentDatabase[];
 | 
			
		||||
    Ships: IShipInventory[];
 | 
			
		||||
    QuestKeys: IQuestKeyResponse[];
 | 
			
		||||
    FlavourItems: IFlavourItem[];
 | 
			
		||||
    Scoops: IGenericItem[];
 | 
			
		||||
    Scoops: IEquipmentDatabase[];
 | 
			
		||||
    TrainingRetriesLeft: number;
 | 
			
		||||
    LoadOutPresets: ILoadOutPresets;
 | 
			
		||||
    CurrentLoadOutIds: Array<any[] | IOid>;
 | 
			
		||||
    Missions: IMission[];
 | 
			
		||||
    RandomUpgradesIdentified: number;
 | 
			
		||||
    RandomUpgradesIdentified?: number;
 | 
			
		||||
    LastRegionPlayed: string;
 | 
			
		||||
    XPInfo: ITypeXPItem[];
 | 
			
		||||
    Recipes: ITypeCount[];
 | 
			
		||||
@ -198,14 +156,14 @@ export interface IInventoryResponse {
 | 
			
		||||
    Affiliations: IAffiliation[];
 | 
			
		||||
    QualifyingInvasions: any[];
 | 
			
		||||
    FactionScores: number[];
 | 
			
		||||
    SpaceSuits: IGenericItem[];
 | 
			
		||||
    SpaceMelee: IGenericItem[];
 | 
			
		||||
    SpaceSuits: IEquipmentDatabase[];
 | 
			
		||||
    SpaceMelee: IEquipmentDatabase[];
 | 
			
		||||
    SpaceGuns: ISpaceGun[];
 | 
			
		||||
    ArchwingEnabled: boolean;
 | 
			
		||||
    PendingSpectreLoadouts: any[];
 | 
			
		||||
    SpectreLoadouts: ISpectreLoadout[];
 | 
			
		||||
    SentinelWeapons: IWeaponDatabase[];
 | 
			
		||||
    Sentinels: IWeaponDatabase[];
 | 
			
		||||
    SentinelWeapons: IEquipmentDatabase[];
 | 
			
		||||
    Sentinels: IEquipmentDatabase[];
 | 
			
		||||
    EmailItems: ITypeXPItem[];
 | 
			
		||||
    CompletedSyndicates: string[];
 | 
			
		||||
    FocusXP: IFocusXP;
 | 
			
		||||
@ -224,14 +182,14 @@ export interface IInventoryResponse {
 | 
			
		||||
    CompletedJobs: ICompletedJob[];
 | 
			
		||||
    FocusAbility: string;
 | 
			
		||||
    FocusUpgrades: IFocusUpgrade[];
 | 
			
		||||
    OperatorAmps: IOperatorAmp[];
 | 
			
		||||
    HasContributedToDojo: boolean;
 | 
			
		||||
    OperatorAmps: IEquipmentDatabase[];
 | 
			
		||||
    HasContributedToDojo?: boolean;
 | 
			
		||||
    HWIDProtectEnabled: boolean;
 | 
			
		||||
    KubrowPetPrints: IKubrowPetPrint[];
 | 
			
		||||
    AlignmentReplay: IAlignment;
 | 
			
		||||
    PersonalGoalProgress: IPersonalGoalProgress[];
 | 
			
		||||
    DailyAffiliationSolaris: number;
 | 
			
		||||
    SpecialItems: IGenericItem[];
 | 
			
		||||
    SpecialItems: IEquipmentDatabase[];
 | 
			
		||||
    ThemeStyle: string;
 | 
			
		||||
    ThemeBackground: string;
 | 
			
		||||
    ThemeSounds: string;
 | 
			
		||||
@ -246,13 +204,13 @@ export interface IInventoryResponse {
 | 
			
		||||
    NodeIntrosCompleted: string[];
 | 
			
		||||
    GuildId?: IOid;
 | 
			
		||||
    CompletedJobChains: ICompletedJobChain[];
 | 
			
		||||
    SeasonChallengeHistory: ISeasonChallengeHistory[];
 | 
			
		||||
    MoaPets: IMoaPet[];
 | 
			
		||||
    SeasonChallengeHistory: ISeasonChallenge[];
 | 
			
		||||
    MoaPets: IEquipmentDatabase[];
 | 
			
		||||
    EquippedInstrument: string;
 | 
			
		||||
    InvasionChainProgress: IInvasionChainProgress[];
 | 
			
		||||
    DataKnives: IGenericItem[];
 | 
			
		||||
    DataKnives: IEquipmentDatabase[];
 | 
			
		||||
    NemesisHistory: INemesisHistory[];
 | 
			
		||||
    LastNemesisAllySpawnTime: IMongoDate;
 | 
			
		||||
    LastNemesisAllySpawnTime?: IMongoDate;
 | 
			
		||||
    Settings: ISettings;
 | 
			
		||||
    PersonalTechProjects: IPersonalTechProject[];
 | 
			
		||||
    CrewShips: ICrewShip[];
 | 
			
		||||
@ -262,12 +220,12 @@ export interface IInventoryResponse {
 | 
			
		||||
    CrewShipWeapons: ICrewShipWeapon[];
 | 
			
		||||
    CrewShipSalvagedWeapons: ICrewShipWeapon[];
 | 
			
		||||
    CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[];
 | 
			
		||||
    TradeBannedUntil: IMongoDate;
 | 
			
		||||
    TradeBannedUntil?: IMongoDate;
 | 
			
		||||
    PlayedParkourTutorial: boolean;
 | 
			
		||||
    SubscribedToEmailsPersonalized: number;
 | 
			
		||||
    DailyAffiliationEntrati: number;
 | 
			
		||||
    DailyAffiliationNecraloid: number;
 | 
			
		||||
    MechSuits: ISuitDatabase[];
 | 
			
		||||
    MechSuits: IEquipmentDatabase[];
 | 
			
		||||
    InfestedFoundry: IInfestedFoundry;
 | 
			
		||||
    BlessingCooldown: IMongoDate;
 | 
			
		||||
    CrewShipHarnesses: ICrewShipHarness[];
 | 
			
		||||
@ -297,16 +255,6 @@ export interface IInventoryResponse {
 | 
			
		||||
    DeathSquadable: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IAdultOperatorLoadOut {
 | 
			
		||||
    Skins: string[];
 | 
			
		||||
    attcol: IColor;
 | 
			
		||||
    eyecol: IColor;
 | 
			
		||||
    facial: IColor;
 | 
			
		||||
    pricol: IColor;
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IAffiliation {
 | 
			
		||||
    Initiated?: boolean;
 | 
			
		||||
    Standing: number;
 | 
			
		||||
@ -384,14 +332,11 @@ export interface ICrewMember {
 | 
			
		||||
    WeaponId: IOid;
 | 
			
		||||
    XP: number;
 | 
			
		||||
    PowersuitType: string;
 | 
			
		||||
    Configs: ICrewMemberConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    SecondInCommand: boolean;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
 | 
			
		||||
export interface ICrewMemberConfig {}
 | 
			
		||||
 | 
			
		||||
export interface ISkillEfficiency {
 | 
			
		||||
    PILOTING: ICombat;
 | 
			
		||||
    GUNNERY: ICombat;
 | 
			
		||||
@ -406,7 +351,7 @@ export interface ICombat {
 | 
			
		||||
 | 
			
		||||
export interface ICrewShipHarness {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: ICrewShipHarnessConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    Features: number;
 | 
			
		||||
    UpgradeVer: number;
 | 
			
		||||
    XP: number;
 | 
			
		||||
@ -415,10 +360,6 @@ export interface ICrewShipHarness {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ICrewShipHarnessConfig {
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISlots {
 | 
			
		||||
    Extra: number; // can be undefined, but not if used via mongoose
 | 
			
		||||
    Slots: number;
 | 
			
		||||
@ -435,14 +376,14 @@ export interface ICrewShipWeapon {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    UpgradeType?: string;
 | 
			
		||||
    UpgradeFingerprint?: string;
 | 
			
		||||
    Configs?: ICrewShipHarnessConfig[];
 | 
			
		||||
    Configs?: IItemConfig[];
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ICrewShip {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: ICrewShipConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    Weapon: ICrewshipWeapon;
 | 
			
		||||
    Customization: ICustomization;
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
@ -451,11 +392,6 @@ export interface ICrewShip {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ICrewShipConfig {
 | 
			
		||||
    Skins?: string[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ICrewMembers {
 | 
			
		||||
    SLOT_A: ISlot;
 | 
			
		||||
    SLOT_B: ISlot;
 | 
			
		||||
@ -476,16 +412,6 @@ export interface IShipExterior {
 | 
			
		||||
    ShipAttachments?: IShipAttachments;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//TODO: check whether it makes sense to use this specifity of color.
 | 
			
		||||
export interface IShipExteriorColors {
 | 
			
		||||
    t0: number;
 | 
			
		||||
    t1: number;
 | 
			
		||||
    t2: number;
 | 
			
		||||
    t3: number;
 | 
			
		||||
    m0: number;
 | 
			
		||||
    en: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IShipAttachments {
 | 
			
		||||
    HOOD_ORNAMENT: string; //TODO: Others are probably possible
 | 
			
		||||
}
 | 
			
		||||
@ -504,22 +430,12 @@ export interface ICrewshipWeapon {
 | 
			
		||||
    PORT_GUNS: IPortGuns;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IPilot {
 | 
			
		||||
    PRIMARY_A: IL;
 | 
			
		||||
    SECONDARY_A: IL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// L? Bozo.
 | 
			
		||||
export interface IL {
 | 
			
		||||
    ItemId?: IOid;
 | 
			
		||||
    mod?: number;
 | 
			
		||||
    cus?: number;
 | 
			
		||||
    ItemType?: string;
 | 
			
		||||
    hide?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IPortGuns {
 | 
			
		||||
    PRIMARY_A: IL;
 | 
			
		||||
    PRIMARY_A: IEquipmentSelection
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IPilot extends IPortGuns {
 | 
			
		||||
    SECONDARY_A: IEquipmentSelection
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IDiscoveredMarker {
 | 
			
		||||
@ -563,7 +479,7 @@ export interface IFusionTreasure {
 | 
			
		||||
 | 
			
		||||
export interface IHoverboard {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IHoverboardConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    ModularParts: string[];
 | 
			
		||||
    ItemName?: string;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
@ -573,26 +489,6 @@ export interface IHoverboard {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IHoverboardConfig {
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
    Skins?: IPurpleSkin[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
    sigcol?: ISigcol;
 | 
			
		||||
    attcol?: IColor;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export enum IPurpleSkin {
 | 
			
		||||
    Empty = "",
 | 
			
		||||
    The5Be4Af71A38E4A9306040E15 = "5be4af71a38e4a9306040e15",
 | 
			
		||||
    The5C930Ac3A38E4A24Bc3Ad5De = "5c930ac3a38e4a24bc3ad5de",
 | 
			
		||||
    The5C9C6F9857904A7A3B25656B = "5c9c6f9857904a7a3b25656b",
 | 
			
		||||
    The5Dd8A8E3A38E4A321A45E6A0 = "5dd8a8e3a38e4a321a45e6a0"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISigcol {
 | 
			
		||||
    t3: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IInfestedFoundry {
 | 
			
		||||
    Name: string;
 | 
			
		||||
    Resources: ITypeCount[];
 | 
			
		||||
@ -645,15 +541,7 @@ export interface ITraits {
 | 
			
		||||
    Personality: string;
 | 
			
		||||
    BodyType: string;
 | 
			
		||||
    Head?: string;
 | 
			
		||||
    Tail?: Tail;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export enum Tail {
 | 
			
		||||
    Empty = "",
 | 
			
		||||
    LotusTypesGameCatbrowPetTailsCatbrowTailA = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailA",
 | 
			
		||||
    LotusTypesGameCatbrowPetTailsCatbrowTailB = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailB",
 | 
			
		||||
    LotusTypesGameCatbrowPetTailsCatbrowTailC = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailC",
 | 
			
		||||
    LotusTypesGameCatbrowPetTailsCatbrowTailD = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailD"
 | 
			
		||||
    Tail?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export enum KubrowPetPrintItemType {
 | 
			
		||||
@ -662,7 +550,7 @@ export enum KubrowPetPrintItemType {
 | 
			
		||||
 | 
			
		||||
export interface IKubrowPet {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IKubrowPetConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    UpgradeVer: number;
 | 
			
		||||
    Details: IDetails;
 | 
			
		||||
    XP?: number;
 | 
			
		||||
@ -676,13 +564,6 @@ export interface IKubrowPet {
 | 
			
		||||
    ModularParts?: string[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IKubrowPetConfig {
 | 
			
		||||
    Skins?: string[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
    attcol?: IColor;
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IDetails {
 | 
			
		||||
    Name: string;
 | 
			
		||||
    IsPuppy: boolean;
 | 
			
		||||
@ -725,74 +606,32 @@ export interface ILibraryPersonalProgress {
 | 
			
		||||
 | 
			
		||||
//this needs to be checked against ILoadoutDatabase
 | 
			
		||||
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[];
 | 
			
		||||
    NORMAL: ILoadoutConfig[];
 | 
			
		||||
    NORMAL_PVP: ILoadoutConfig[];
 | 
			
		||||
    LUNARO: ILoadoutConfig[];
 | 
			
		||||
    ARCHWING: ILoadoutConfig[];
 | 
			
		||||
    SENTINEL: ILoadoutConfig[];
 | 
			
		||||
    OPERATOR: ILoadoutConfig[];
 | 
			
		||||
    GEAR: ILoadoutConfig[];
 | 
			
		||||
    KDRIVE: ILoadoutConfig[];
 | 
			
		||||
    DATAKNIFE: ILoadoutConfig[];
 | 
			
		||||
    MECH: ILoadoutConfig[];
 | 
			
		||||
    OPERATOR_ADULT: ILoadoutConfig[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IArchwing {
 | 
			
		||||
    PresetIcon: string;
 | 
			
		||||
    Favorite: boolean;
 | 
			
		||||
    n?: string;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    l?: IL;
 | 
			
		||||
    m?: IL;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    p?: IL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IGear {
 | 
			
		||||
    n: string;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    p: IL;
 | 
			
		||||
    l: IL;
 | 
			
		||||
    m: IL;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IKdrive {
 | 
			
		||||
    PresetIcon: string;
 | 
			
		||||
    Favorite: boolean;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ILunaro {
 | 
			
		||||
    n: string;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    m: IL;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IMech {
 | 
			
		||||
    PresetIcon: string;
 | 
			
		||||
    Favorite: boolean;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    h: IL;
 | 
			
		||||
    a: IL;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface INormal {
 | 
			
		||||
    FocusSchool: FocusSchool;
 | 
			
		||||
    PresetIcon: string;
 | 
			
		||||
    Favorite: boolean;
 | 
			
		||||
    n: string;
 | 
			
		||||
    s: IL;
 | 
			
		||||
    p: IL;
 | 
			
		||||
    l: IL;
 | 
			
		||||
    m: IL;
 | 
			
		||||
    h: IL;
 | 
			
		||||
    a?: IL;
 | 
			
		||||
export interface ILoadoutConfig {
 | 
			
		||||
    FocusSchool?: FocusSchool;
 | 
			
		||||
    PresetIcon?: string;
 | 
			
		||||
    Favorite?: boolean;
 | 
			
		||||
    n?: string; // Loadout name
 | 
			
		||||
    s?: IEquipmentSelection // Suit
 | 
			
		||||
    p?: IEquipmentSelection
 | 
			
		||||
    l?: IEquipmentSelection // Primary weapon
 | 
			
		||||
    m?: IEquipmentSelection // Melee weapon
 | 
			
		||||
    h?: IEquipmentSelection // Gravimag weapon
 | 
			
		||||
    a?: IEquipmentSelection
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export enum UpgradeType {
 | 
			
		||||
@ -805,16 +644,7 @@ export interface ILoreFragmentScan {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ILotusCustomization {
 | 
			
		||||
    Upgrades: any[];
 | 
			
		||||
    PvpUpgrades: any[];
 | 
			
		||||
    Skins: string[];
 | 
			
		||||
    pricol: IColor;
 | 
			
		||||
    attcol: any[];
 | 
			
		||||
    sigcol: any[];
 | 
			
		||||
    eyecol: any[];
 | 
			
		||||
    facial: any[];
 | 
			
		||||
    Songs: any[];
 | 
			
		||||
export interface ILotusCustomization extends IItemConfig {
 | 
			
		||||
    Persona: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -825,17 +655,6 @@ export interface IMission {
 | 
			
		||||
    RewardsCooldownTime?: IMongoDate;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IMoaPet {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IKubrowPetConfig[];
 | 
			
		||||
    UpgradeVer: number;
 | 
			
		||||
    ModularParts: string[];
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface INemesisHistory {
 | 
			
		||||
    fp: number;
 | 
			
		||||
@ -871,30 +690,6 @@ export enum Manifest {
 | 
			
		||||
    LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IOperatorAmp {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IKubrowPetConfig[];
 | 
			
		||||
    ModularParts?: string[];
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    ItemName?: string;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IOperatorLoadOut {
 | 
			
		||||
    Skins: string[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
    attcol?: IColor;
 | 
			
		||||
    eyecol: IColor;
 | 
			
		||||
    facial?: IColor;
 | 
			
		||||
    sigcol?: IOperatorLoadOutSigcol;
 | 
			
		||||
    OperatorAmp?: IOid;
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
    AbilityOverride: IAbilityOverride;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IPendingCoupon {
 | 
			
		||||
    Expiry: IMongoDate;
 | 
			
		||||
    Discount: number;
 | 
			
		||||
@ -1023,12 +818,7 @@ export interface IRawUpgrade {
 | 
			
		||||
    LastAdded?: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISeasonChallengeHistory {
 | 
			
		||||
    challenge: string;
 | 
			
		||||
    id: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISeasonChallengeCompletions {
 | 
			
		||||
export interface ISeasonChallenge {
 | 
			
		||||
    challenge: string;
 | 
			
		||||
    id: string;
 | 
			
		||||
}
 | 
			
		||||
@ -1054,7 +844,7 @@ export interface IShipInventory {
 | 
			
		||||
 | 
			
		||||
export interface ISpaceGun {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: ISpaceGunConfig[];
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
@ -1066,16 +856,6 @@ export interface ISpaceGun {
 | 
			
		||||
    ItemName?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISpaceGunConfig {
 | 
			
		||||
    Skins?: string[];
 | 
			
		||||
    pricol?: IColor;
 | 
			
		||||
    Upgrades?: string[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IPurpleCol {
 | 
			
		||||
    en: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ISpectreLoadout {
 | 
			
		||||
    LongGuns: string;
 | 
			
		||||
    Melee: string;
 | 
			
		||||
 | 
			
		||||
@ -1,33 +0,0 @@
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IItemConfig } from "./commonInventoryTypes";
 | 
			
		||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
export interface IWeaponClient extends Omit<IWeaponDatabase, "_id"> {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IWeaponDatabase {
 | 
			
		||||
    ItemType: string;
 | 
			
		||||
    Configs: IItemConfig[];
 | 
			
		||||
    UpgradeVer?: number;
 | 
			
		||||
    XP?: number;
 | 
			
		||||
    Features?: number;
 | 
			
		||||
    Polarized?: number;
 | 
			
		||||
    Polarity?: IPolarity[];
 | 
			
		||||
    FocusLens?: string;
 | 
			
		||||
    ModSlotPurchases?: number;
 | 
			
		||||
    CustomizationSlotPurchases?: number;
 | 
			
		||||
    UpgradeType?: string;
 | 
			
		||||
    UpgradeFingerprint?: string;
 | 
			
		||||
    ItemName?: string;
 | 
			
		||||
    ModularParts?: string[];
 | 
			
		||||
    UnlockLevel?: number;
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IOperatorLoadOutSigcol {
 | 
			
		||||
    t0?: number;
 | 
			
		||||
    t1?: number;
 | 
			
		||||
    en?: number;
 | 
			
		||||
}
 | 
			
		||||
@ -1,6 +1,5 @@
 | 
			
		||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
 | 
			
		||||
import { IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
 | 
			
		||||
import { IEquipmentClient } from "./inventoryTypes/commonInventoryTypes";
 | 
			
		||||
 | 
			
		||||
export interface IPurchaseRequest {
 | 
			
		||||
    PurchaseParams: IPurchaseParams;
 | 
			
		||||
@ -23,11 +22,11 @@ export interface IPurchaseResponse {
 | 
			
		||||
        SuitBin?: IBinChanges;
 | 
			
		||||
        WeaponBin?: IBinChanges;
 | 
			
		||||
        MechBin?: IBinChanges;
 | 
			
		||||
        MechSuits?: ISuitClient[];
 | 
			
		||||
        Suits?: ISuitClient[];
 | 
			
		||||
        LongGuns?: IWeaponClient[];
 | 
			
		||||
        Pistols?: IWeaponClient[];
 | 
			
		||||
        Melee?: IWeaponClient[];
 | 
			
		||||
        MechSuits?: IEquipmentClient[];
 | 
			
		||||
        Suits?: IEquipmentClient[];
 | 
			
		||||
        LongGuns?: IEquipmentClient[];
 | 
			
		||||
        Pistols?: IEquipmentClient[];
 | 
			
		||||
        Melee?: IEquipmentClient[];
 | 
			
		||||
        PremiumCredits?: number;
 | 
			
		||||
        PremiumCreditsFree?: number;
 | 
			
		||||
        RegularCredits?: number;
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { IOid } from "./commonTypes";
 | 
			
		||||
import { IPolarity, FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { IPolarity, FocusSchool, IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IBooster,
 | 
			
		||||
    IChallengeProgress,
 | 
			
		||||
@ -8,11 +8,8 @@ import {
 | 
			
		||||
    IMiscItem,
 | 
			
		||||
    IMission,
 | 
			
		||||
    IRawUpgrade,
 | 
			
		||||
    ISeasonChallengeCompletions,
 | 
			
		||||
    ISeasonChallengeHistory
 | 
			
		||||
    ISeasonChallenge,
 | 
			
		||||
} from "./inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IWeaponClient } from "./inventoryTypes/weaponTypes";
 | 
			
		||||
import { ISuitClient } from "./inventoryTypes/SuitTypes";
 | 
			
		||||
 | 
			
		||||
export interface IArtifactsRequest {
 | 
			
		||||
    Upgrade: ICrewShipSalvagedWeaponSkin;
 | 
			
		||||
@ -35,18 +32,18 @@ export interface IAffiliationChange {
 | 
			
		||||
 | 
			
		||||
export interface IUpdateChallengeProgressRequest {
 | 
			
		||||
    ChallengeProgress: IChallengeProgress[];
 | 
			
		||||
    SeasonChallengeHistory: ISeasonChallengeHistory[];
 | 
			
		||||
    SeasonChallengeCompletions: ISeasonChallengeCompletions[];
 | 
			
		||||
    SeasonChallengeHistory: ISeasonChallenge[];
 | 
			
		||||
    SeasonChallengeCompletions: ISeasonChallenge[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IMissionInventoryUpdateRequest {
 | 
			
		||||
    rewardsMultiplier?: number;
 | 
			
		||||
    ActiveBoosters?: IBooster[];
 | 
			
		||||
    AffiliationChanges?: IAffiliationChange[];
 | 
			
		||||
    LongGuns?: IWeaponClient[];
 | 
			
		||||
    Pistols?: IWeaponClient[];
 | 
			
		||||
    Suits?: ISuitClient[];
 | 
			
		||||
    Melee?: IWeaponClient[];
 | 
			
		||||
    LongGuns?: IEquipmentClient[];
 | 
			
		||||
    Pistols?: IEquipmentClient[];
 | 
			
		||||
    Suits?: IEquipmentClient[];
 | 
			
		||||
    Melee?: IEquipmentClient[];
 | 
			
		||||
    RawUpgrades?: IRawUpgrade[];
 | 
			
		||||
    MiscItems?: IMiscItem[];
 | 
			
		||||
    Consumables?: IConsumable[];
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { ILoadoutConfig } from "./inventoryTypes/inventoryTypes";
 | 
			
		||||
 | 
			
		||||
export interface ISaveLoadoutRequest {
 | 
			
		||||
    LoadOuts: ILoadoutClient;
 | 
			
		||||
@ -67,28 +68,8 @@ export interface ILoadoutDatabase {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ILoadoutEntry {
 | 
			
		||||
    [key: string]: ILoadoutConfigClient;
 | 
			
		||||
    [key: string]: ILoadoutConfig;
 | 
			
		||||
}
 | 
			
		||||
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
 | 
			
		||||
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfig, "ItemId"> {
 | 
			
		||||
    _id: Types.ObjectId;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// for request and response from and to client
 | 
			
		||||
export interface ILoadoutConfigClient {
 | 
			
		||||
    ItemId: IOid;
 | 
			
		||||
    Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
 | 
			
		||||
    n?: string;
 | 
			
		||||
    PresetIcon?: string;
 | 
			
		||||
    Favorite?: boolean;
 | 
			
		||||
    s?: IEquipmentSelection;
 | 
			
		||||
    p?: IEquipmentSelection;
 | 
			
		||||
    l?: IEquipmentSelection;
 | 
			
		||||
    m?: IEquipmentSelection;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IEquipmentSelection {
 | 
			
		||||
    ItemId?: IOid;
 | 
			
		||||
    mod?: number;
 | 
			
		||||
    cus?: number;
 | 
			
		||||
    hide?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user