2025-02-20 02:58:44 -08:00
|
|
|
import { IEquipmentClient } from "./inventoryTypes/commonInventoryTypes";
|
2025-03-07 00:41:18 -08:00
|
|
|
import {
|
|
|
|
IDroneClient,
|
|
|
|
IInfestedFoundryClient,
|
|
|
|
IMiscItem,
|
|
|
|
ITypeCount,
|
|
|
|
TEquipmentKey
|
|
|
|
} from "./inventoryTypes/inventoryTypes";
|
2025-01-05 07:16:48 +01:00
|
|
|
|
2023-06-14 02:26:19 +02:00
|
|
|
export interface IPurchaseRequest {
|
|
|
|
PurchaseParams: IPurchaseParams;
|
|
|
|
buildLabel: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPurchaseParams {
|
|
|
|
Source: number;
|
2024-12-22 23:28:59 +01:00
|
|
|
SourceId?: string; // for Source 7 & 18
|
2023-06-14 02:26:19 +02:00
|
|
|
StoreItem: string;
|
|
|
|
StorePage: string;
|
|
|
|
SearchTerm: string;
|
|
|
|
CurrentLocation: string;
|
|
|
|
Quantity: number;
|
|
|
|
UsePremium: boolean;
|
|
|
|
ExpectedPrice: number;
|
2024-12-22 23:31:30 +01:00
|
|
|
SyndicateTag?: string; // for Source 2
|
|
|
|
UseFreeFavor?: boolean; // for Source 2
|
2025-01-17 14:43:09 +01:00
|
|
|
ExtraPurchaseInfoJson?: string; // for Source 7
|
|
|
|
IsWeekly?: boolean; // for Source 7
|
2023-06-14 02:26:19 +02:00
|
|
|
}
|
|
|
|
|
2024-12-31 01:41:29 +01:00
|
|
|
export type IInventoryChanges = {
|
|
|
|
[_ in SlotNames]?: IBinChanges;
|
2025-02-20 02:58:44 -08:00
|
|
|
} & {
|
|
|
|
[_ in TEquipmentKey]?: IEquipmentClient[];
|
2025-02-26 15:41:07 -08:00
|
|
|
} & {
|
|
|
|
RegularCredits?: number;
|
|
|
|
PremiumCredits?: number;
|
|
|
|
PremiumCreditsFree?: number;
|
|
|
|
InfestedFoundry?: IInfestedFoundryClient;
|
|
|
|
Drones?: IDroneClient[];
|
|
|
|
MiscItems?: IMiscItem[];
|
2025-03-07 00:41:18 -08:00
|
|
|
EmailItems?: ITypeCount[];
|
2025-02-26 15:41:07 -08:00
|
|
|
} & Record<
|
|
|
|
Exclude<
|
|
|
|
string,
|
|
|
|
| SlotNames
|
|
|
|
| TEquipmentKey
|
|
|
|
| "RegularCredits"
|
|
|
|
| "PremiumCredits"
|
|
|
|
| "PremiumCreditsFree"
|
|
|
|
| "InfestedFoundry"
|
|
|
|
| "Drones"
|
|
|
|
| "MiscItems"
|
2025-03-07 00:41:18 -08:00
|
|
|
| "EmailItems"
|
2025-02-26 15:41:07 -08:00
|
|
|
>,
|
|
|
|
number | object[]
|
|
|
|
>;
|
2023-06-14 02:26:19 +02:00
|
|
|
|
2025-01-24 14:18:05 +01:00
|
|
|
export interface IAffiliationMods {
|
|
|
|
Tag: string;
|
|
|
|
Standing?: number;
|
|
|
|
Title?: number;
|
|
|
|
}
|
|
|
|
|
2024-12-22 23:31:30 +01:00
|
|
|
export interface IPurchaseResponse {
|
|
|
|
InventoryChanges: IInventoryChanges;
|
2025-01-24 14:18:05 +01:00
|
|
|
Standing?: IAffiliationMods[];
|
|
|
|
FreeFavorsUsed?: IAffiliationMods[];
|
2024-12-25 23:34:14 +01:00
|
|
|
BoosterPackItems?: string;
|
2024-12-22 23:31:30 +01:00
|
|
|
}
|
|
|
|
|
2023-06-14 02:26:19 +02:00
|
|
|
export type IBinChanges = {
|
2025-02-26 15:41:07 -08:00
|
|
|
count?: number;
|
|
|
|
platinum?: number;
|
2023-06-14 02:26:19 +02:00
|
|
|
Slots: number;
|
2023-12-28 16:24:52 +01:00
|
|
|
Extra?: number;
|
2023-06-14 02:26:19 +02:00
|
|
|
};
|
|
|
|
|
2023-12-28 16:24:52 +01:00
|
|
|
export type SlotPurchaseName =
|
|
|
|
| "SuitSlotItem"
|
|
|
|
| "TwoSentinelSlotItem"
|
|
|
|
| "TwoWeaponSlotItem"
|
|
|
|
| "SpaceSuitSlotItem"
|
|
|
|
| "TwoSpaceWeaponSlotItem"
|
|
|
|
| "MechSlotItem"
|
|
|
|
| "TwoOperatorWeaponSlotItem"
|
|
|
|
| "RandomModSlotItem"
|
|
|
|
| "TwoCrewShipSalvageSlotItem"
|
|
|
|
| "CrewMemberSlotItem";
|
|
|
|
|
2025-02-26 15:41:07 -08:00
|
|
|
export const slotNames = [
|
|
|
|
"SuitBin",
|
|
|
|
"WeaponBin",
|
|
|
|
"MechBin",
|
|
|
|
"PveBonusLoadoutBin",
|
|
|
|
"SentinelBin",
|
|
|
|
"SpaceSuitBin",
|
|
|
|
"SpaceWeaponBin",
|
|
|
|
"OperatorAmpBin",
|
|
|
|
"RandomModBin",
|
|
|
|
"CrewShipSalvageBin",
|
|
|
|
"CrewMemberBin"
|
|
|
|
] as const;
|
|
|
|
|
|
|
|
export type SlotNames = (typeof slotNames)[number];
|
2023-12-28 16:24:52 +01:00
|
|
|
|
|
|
|
export type SlotPurchase = {
|
2025-03-11 10:32:44 -07:00
|
|
|
[P in SlotPurchaseName]: { name: SlotNames; purchaseQuantity: number };
|
2023-12-28 16:24:52 +01:00
|
|
|
};
|