UNPKG

@peacockproject/core

Version:

Type definitions for Peacock's core.

108 lines (107 loc) 3.54 kB
import { InventoryItem } from "../inventory"; import type { GameVersion, JwtData, MissionManifest, SafehouseCategory, UserCentricContract } from "../types/types"; import { SafehouseCategoryQuery, StashpointQuery, StashpointQueryH2016, StashpointSlotName } from "../types/gameSchemas"; /** * Algorithm to get the stashpoint items data for H2 and H3. * * @param inventory The user's inventory. * @param query The input query for the stashpoint. * @param gameVersion * @param contractData The optional contract data. */ export declare function getModernStashItemsData(inventory: InventoryItem[], query: StashpointQuery, gameVersion: GameVersion, contractData: MissionManifest | undefined): { Item: InventoryItem; ItemDetails: { Capabilities: never[]; StatList: { Name: string; Ratio: number; }[]; PropertyTexts: never[]; }; SlotId: string | number | undefined; SlotName: null; }[]; export type ModernStashData = { SlotId: string | number; LoadoutItemsData: unknown; UserCentric?: UserCentricContract; ShowSlotName: string | number; }; /** * Algorithm to get the stashpoint data for H2 and H3. * * @param query The stashpoint query. * @param userId * @param gameVersion * @returns undefined if the query is invalid, or the stash data. */ export declare function getModernStashData(query: StashpointQuery, userId: string, gameVersion: GameVersion): ModernStashData; /** * Algorithm to get the stashpoint items data for H2016. * * @param inventory The user's inventory. * @param slotname The slot name. * @param query * @param slotid The slot id. */ export declare function getLegacyStashItems(inventory: InventoryItem[], slotname: StashpointSlotName, query: StashpointQueryH2016, slotid: number): { Item: InventoryItem; ItemDetails: { Capabilities: never[]; StatList: { Name: string; Ratio: number; }[]; PropertyTexts: never[]; }; SlotId: string; SlotName: string; }[]; /** * Algorithm to get the stashpoint data for H2016. * * @param query The stashpoint query. * @param userId * @param gameVersion */ export declare function getLegacyStashData(query: StashpointQueryH2016, userId: string, gameVersion: GameVersion): { ContractId: string; LoadoutData: { SlotName: string; SlotId: string; Items: { Item: InventoryItem; ItemDetails: { Capabilities: never[]; StatList: { Name: string; Ratio: number; }[]; PropertyTexts: never[]; }; SlotId: string; SlotName: string; }[]; Page: number; Recommended: { item: import("../types/types").Unlockable | undefined; type: string; owned: boolean; } | null; HasMore: boolean; HasMoreLeft: boolean; HasMoreRight: boolean; OptionalData: { stashpoint: string | undefined; AllowLargeItems: boolean | "true" | "false"; } | { stashpoint?: undefined; AllowLargeItems?: undefined; }; }[]; Contract: MissionManifest | undefined; ShowSlotName: string; UserCentric: UserCentricContract | undefined; } | undefined; export declare function getSafehouseCategory(query: SafehouseCategoryQuery, gameVersion: GameVersion, jwt: JwtData): SafehouseCategory;