Update types

This commit is contained in:
Chomp 2022-12-18 19:01:48 +00:00
parent b6d46dd62a
commit d33a9055ed
12 changed files with 22 additions and 12 deletions

View File

@ -2,14 +2,16 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { LocalisationService } from "../services/LocalisationService";
import { ItemHelper } from "./ItemHelper";
import { QuestHelper } from "./QuestHelper";
export declare class AssortHelper {
protected logger: ILogger;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected localisationService: LocalisationService;
protected questHelper: QuestHelper;
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile

View File

@ -5,6 +5,7 @@ import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequ
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { LocalisationService } from "../services/LocalisationService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { JsonUtil } from "../utils/JsonUtil";
import { InventoryHelper } from "./InventoryHelper";
@ -16,8 +17,9 @@ export declare class InRaidHelper {
protected databaseServer: DatabaseServer;
protected inventoryHelper: InventoryHelper;
protected paymentHelper: PaymentHelper;
protected localisationService: LocalisationService;
protected profileFixerService: ProfileFixerService;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, profileFixerService: ProfileFixerService);
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService);
/**
* Check an array of items and add an upd object to money items with a stack count of 1
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues

View File

@ -8,6 +8,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { FenceService } from "../services/FenceService";
import { LocalisationService } from "../services/LocalisationService";
import { PlayerService } from "../services/PlayerService";
import { TimeUtil } from "../utils/TimeUtil";
import { HandbookHelper } from "./HandbookHelper";
@ -23,11 +24,12 @@ export declare class TraderHelper {
protected itemHelper: ItemHelper;
protected handbookHelper: HandbookHelper;
protected playerService: PlayerService;
protected localisationService: LocalisationService;
protected fenceService: FenceService;
protected timeUtil: TimeUtil;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
getTrader(traderID: string, sessionID: string): ITraderBase;
getTraderAssortsById(traderId: string): ITraderAssort;
/**

View File

@ -156,4 +156,4 @@ export interface Items {
SpecialLoot: string[];
TacticalVest: string[];
}
export declare type Mods = Record<string, Record<string, string[]>>;
export type Mods = Record<string, Record<string, string[]>>;

View File

@ -25,7 +25,7 @@ export interface IPmcDataRepeatableQuest {
endTime: number;
changeRequirement: TChangeRequirementRecord;
}
export declare type TChangeRequirementRecord = Record<string, IChangeRequirement>;
export type TChangeRequirementRecord = Record<string, IChangeRequirement>;
export interface IChangeRequirement {
changeCost: IChangeCost[];
changeStandingCost: number;

View File

@ -1 +1 @@
export declare type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;
export type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;

View File

@ -16,7 +16,7 @@ export interface ToLocation {
export interface Container {
id: string;
container: string;
location: Location | number;
location?: Location | number;
}
export interface Location {
x: number;

View File

@ -7,7 +7,7 @@ export interface IItemEventRouterBase {
warnings: Warning[];
profileChanges: TProfileChanges | "";
}
export declare type TProfileChanges = Record<string, ProfileChange>;
export type TProfileChanges = Record<string, ProfileChange>;
export interface Warning {
index: number;
errmsg: string;

View File

@ -1,2 +1,2 @@
import { ILoginRequestData } from "./ILoginRequestData";
export declare type IRemoveProfileData = ILoginRequestData;
export type IRemoveProfileData = ILoginRequestData;

View File

@ -1,6 +1,6 @@
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from "http";
export declare type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
/**
* Associates handlers, HTTP methods and a base url to a listener using a proxy
* @param basePath The base path

View File

@ -13,6 +13,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
protected databaseServer: DatabaseServer;
@ -23,10 +24,11 @@ export declare class InsuranceService {
protected traderHelper: TraderHelper;
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, configServer: ConfigServer);
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>;

View File

@ -1,15 +1,17 @@
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { LocalisationService } from "./LocalisationService";
/**
* Cache the baseids for each item in the tiems db inside a dictionary
*/
export declare class ItemBaseClassService {
protected logger: ILogger;
protected localisationService: LocalisationService;
protected databaseServer: DatabaseServer;
protected itemBaseClassesCache: Record<string, string[]>;
protected cacheGenerated: boolean;
constructor(logger: ILogger, databaseServer: DatabaseServer);
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/**
* Create cache and store inside ItemBaseClassService
*/