@peacockproject/core
Version:
Type definitions for Peacock's core.
658 lines (657 loc) • 27.8 kB
TypeScript
import type { Campaign, ClientToServerEvent, ContractSession, GameVersion, GenSingleMissionFunc, GenSingleVideoFunc, Hit, MissionManifest, PlayNextGetCampaignsHookReturn, RequestWithJwt, S2CEventWithTimestamp } from "./types/types";
import type * as configManagerType from "./configSwizzleManager";
import { AsyncSeriesHook, SyncBailHook, SyncHook } from "./hooksImpl";
import { ChallengeService } from "./candle/challengeService";
import { MasteryService } from "./candle/masteryService";
import { ProgressionService } from "./candle/progressionService";
import { SMFSupport } from "./smfSupport";
/**
* An array of string arrays that contains the IDs of the featured contracts.
* Each of the string arrays is one page.
*/
export declare const featuredContractGroups: string[][];
/**
* Ensure a mission has the bare minimum required to work.
*
* @param m The mission manifest.
* @returns If the mission is valid.
*/
export declare const validateMission: (m: MissionManifest) => boolean;
export declare class Controller {
hooks: {
serverStart: SyncHook<[]>;
challengesLoaded: SyncHook<[]>;
masteryDataLoaded: SyncHook<[]>;
newEvent: SyncHook<[
event: ClientToServerEvent,
details: {
gameVersion: GameVersion;
userId: string;
},
session: ContractSession
]>;
newMetricsEvent: SyncHook<[
event: S2CEventWithTimestamp,
request: RequestWithJwt<never, S2CEventWithTimestamp[]>
]>;
getContractManifest: SyncBailHook<[
contractId: string,
gameVersion: GameVersion,
isGroup: boolean
], MissionManifest | [MissionManifest, boolean] | undefined>;
fixContract: SyncHook<[
contract: MissionManifest,
gameVersion: GameVersion
]>;
getContractIdsForGroupDiscovery: SyncHook<[string[]]>;
contributeCampaigns: SyncHook<[
campaigns: Campaign[],
genSingleMissionFunc: GenSingleMissionFunc,
genSingleVideoFunc: GenSingleVideoFunc,
gameVersion: GameVersion
]>;
getSearchResults: AsyncSeriesHook<[
query: string[],
contractIds: string[]
]>;
getNextCampaignMission: SyncBailHook<[
contractId: string,
gameVersion: GameVersion
], PlayNextGetCampaignsHookReturn | undefined>;
onMissionEnd: SyncHook<[session: ContractSession]>;
onEscalationReset: SyncHook<[groupId: string]>;
onUserLogin: SyncHook<[gameVersion: GameVersion, userId: string]>;
};
configManager: typeof configManagerType;
missionsInLocation: {
h1: {
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: string[];
escalations: {
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: never[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: never[];
};
elusive: {};
sarajevo: {};
pro1: {
LOCATION_PARENT_PARIS: string;
LOCATION_PARENT_COASTALTOWN: string;
LOCATION_PARENT_MARRAKECH: string;
LOCATION_PARENT_BANGKOK: string;
LOCATION_PARENT_COLORADO: string;
LOCATION_PARENT_HOKKAIDO: string;
};
};
h2: {
LOCATION_ICA_FACILITY_ARRIVAL: string[];
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_MIAMI_COTTONMOUTH: string[];
LOCATION_COLOMBIA: string[];
LOCATION_COLOMBIA_ANACONDA: string[];
LOCATION_MUMBAI: string[];
LOCATION_MUMBAI_KINGCOBRA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHAMERICA_GARTERSNAKE: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
escalations: {
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: never[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_MUMBAI: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
};
sniper: {
LOCATION_AUSTRIA: string[];
LOCATION_SALTY_SEAGULL: string[];
LOCATION_CAGED_FALCON: string[];
};
elusive: {};
sarajevo: {};
};
h3: {
LOCATION_ICA_FACILITY_ARRIVAL: string[];
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_PARIS_NOEL: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_MAMUSHI: string[];
LOCATION_HOKKAIDO_FLU: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_MIAMI_COTTONMOUTH: string[];
LOCATION_COLOMBIA: string[];
LOCATION_COLOMBIA_ANACONDA: string[];
LOCATION_MUMBAI: string[];
LOCATION_MUMBAI_KINGCOBRA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHAMERICA_GARTERSNAKE: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
LOCATION_GOLDEN_GECKO: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
LOCATION_TRAPPED_WOLVERINE: string[];
LOCATION_ROCKY_DUGONG: string[];
LOCATION_SNUG: string[];
escalations: {
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_PARIS_NOEL: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_MAMUSHI: never[];
LOCATION_HOKKAIDO_FLU: never[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_MUMBAI: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
LOCATION_GOLDEN_GECKO: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_ANCESTRAL_SMOOTHSNAKE: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
LOCATION_TRAPPED_WOLVERINE: string[];
LOCATION_ROCKY_DUGONG: string[];
};
arcade: {
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_BANGKOK: string[];
LOCATION_COLORADO: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
};
sniper: {
LOCATION_AUSTRIA: string[];
LOCATION_SALTY_SEAGULL: string[];
LOCATION_CAGED_FALCON: string[];
};
elusive: {};
sarajevo: {
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_MARRAKECH: string[];
LOCATION_BANGKOK: string[];
LOCATION_COLORADO: string[];
LOCATION_HOKKAIDO: string[];
};
};
scpc: {
escalations: {};
sniper: {
LOCATION_AUSTRIA: string[];
};
};
};
/**
* @deprecated since v8, use `controller.missionsInLocation` instead
*/
missionsInLocations: {
h1: {
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: string[];
escalations: {
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: never[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: never[];
};
elusive: {};
sarajevo: {};
pro1: {
LOCATION_PARENT_PARIS: string;
LOCATION_PARENT_COASTALTOWN: string;
LOCATION_PARENT_MARRAKECH: string;
LOCATION_PARENT_BANGKOK: string;
LOCATION_PARENT_COLORADO: string;
LOCATION_PARENT_HOKKAIDO: string;
};
};
h2: {
LOCATION_ICA_FACILITY_ARRIVAL: string[];
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_MIAMI_COTTONMOUTH: string[];
LOCATION_COLOMBIA: string[];
LOCATION_COLOMBIA_ANACONDA: string[];
LOCATION_MUMBAI: string[];
LOCATION_MUMBAI_KINGCOBRA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHAMERICA_GARTERSNAKE: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
escalations: {
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_FLU: never[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_MUMBAI: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
};
sniper: {
LOCATION_AUSTRIA: string[];
LOCATION_SALTY_SEAGULL: string[];
LOCATION_CAGED_FALCON: string[];
};
elusive: {};
sarajevo: {};
};
h3: {
LOCATION_ICA_FACILITY_ARRIVAL: string[];
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_PARIS_NOEL: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: string[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_MAMUSHI: string[];
LOCATION_HOKKAIDO_FLU: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_MIAMI_COTTONMOUTH: string[];
LOCATION_COLOMBIA: string[];
LOCATION_COLOMBIA_ANACONDA: string[];
LOCATION_MUMBAI: string[];
LOCATION_MUMBAI_KINGCOBRA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHAMERICA_GARTERSNAKE: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
LOCATION_GOLDEN_GECKO: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
LOCATION_TRAPPED_WOLVERINE: string[];
LOCATION_ROCKY_DUGONG: string[];
LOCATION_SNUG: string[];
escalations: {
LOCATION_ICA_FACILITY_SHIP: string[];
LOCATION_ICA_FACILITY: string[];
LOCATION_PARIS: string[];
LOCATION_PARIS_NOEL: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_COASTALTOWN_MOVIESET: string[];
LOCATION_COASTALTOWN_NIGHT: string[];
LOCATION_COASTALTOWN_EBOLA: string[];
LOCATION_MARRAKECH: string[];
LOCATION_MARRAKECH_NIGHT: string[];
LOCATION_BANGKOK: string[];
LOCATION_BANGKOK_ZIKA: never[];
LOCATION_COLORADO: string[];
LOCATION_COLORADO_RABIES: never[];
LOCATION_HOKKAIDO: string[];
LOCATION_HOKKAIDO_MAMUSHI: never[];
LOCATION_HOKKAIDO_FLU: never[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_MUMBAI: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_GREEDY_RACCOON: string[];
LOCATION_OPULENT_STINGRAY: string[];
LOCATION_GOLDEN_GECKO: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_ANCESTRAL_SMOOTHSNAKE: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
LOCATION_TRAPPED_WOLVERINE: string[];
LOCATION_ROCKY_DUGONG: string[];
};
arcade: {
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_BANGKOK: string[];
LOCATION_COLORADO: string[];
LOCATION_HOKKAIDO: string[];
LOCATION_NEWZEALAND: string[];
LOCATION_MIAMI: string[];
LOCATION_COLOMBIA: string[];
LOCATION_NORTHAMERICA: string[];
LOCATION_NORTHSEA: string[];
LOCATION_ANCESTRAL_BULLDOG: string[];
LOCATION_EDGY_FOX: string[];
LOCATION_WET_RAT: string[];
LOCATION_ELEGANT_LLAMA: string[];
};
sniper: {
LOCATION_AUSTRIA: string[];
LOCATION_SALTY_SEAGULL: string[];
LOCATION_CAGED_FALCON: string[];
};
elusive: {};
sarajevo: {
LOCATION_PARIS: string[];
LOCATION_COASTALTOWN: string[];
LOCATION_MARRAKECH: string[];
LOCATION_BANGKOK: string[];
LOCATION_COLORADO: string[];
LOCATION_HOKKAIDO: string[];
};
};
scpc: {
escalations: {};
sniper: {
LOCATION_AUSTRIA: string[];
};
};
};
/**
* Note: if you are adding a contract, please use {@link addMission}!
*/
contracts: Map<string, MissionManifest>;
/**
* Contracts fetched from official.
*/
fetchedContracts: Map<string, MissionManifest>;
challengeService: ChallengeService;
masteryService: MasteryService;
escalationMappings: Map<string, Record<string, string>>;
progressionService: ProgressionService;
smf: SMFSupport;
private _pubIdToContractId;
/** Internal elusive target contracts - only accessible during bootstrap. */
private _internalElusives;
locationsWithETA: Set<string>;
parentsWithETA: Set<string>;
/**
* The constructor.
*/
constructor();
/**
* You should use {@link smf.modIsInstalled} instead!
*
* Returns whether a mod is UNAVAILABLE.
*
* @param modId The mod's ID.
* @returns If the mod is unavailable. You should probably abort initialization if true is returned. Also returns true if the `overrideFrameworkChecks` flag is set.
* @deprecated since v5.5.0, use `!controller.smf.modIsInstalled`
*/
addClientSideModDependency(modId: string): boolean;
/**
* You should use {@link smf.modIsInstalled} instead!
*
* Returns whether a mod is available and installed.
*
* @param modId The mod's ID.
* @returns If the mod is available (or the `overrideFrameworkChecks` flag is set). You should probably abort initialisation if false is returned.
* @deprecated since v7.0.0, use `controller.smf.modIsInstalled`
*/
modIsInstalled(modId: string): boolean;
/**
* Starts the service and loads in all contracts.
*
* @throws {Error} If all hope is lost. (In theory, this should never happen)
*/
boot(pluginDevHost: boolean): Promise<void>;
private _getETALocations;
/**
* Gets a contract from the registry by its public ID,
* or downloads it from the official servers if possible.
*
* @param pubId The contract's public ID.
* @param currentUserId The current user's ID.
* @param gameVersion The current game version.
* @returns The mission manifest or null if it couldn't be resolved.
*/
contractByPubId(pubId: string, currentUserId: string, gameVersion: GameVersion): Promise<MissionManifest | undefined>;
/**
* Saves a new contract to the contracts folder, and makes it resolve properly,
* without triggering a hot module reload.
*
* @param manifest The contract's data (mission manifest, a.k.a. mission JSON).
* @return The manifest that got passed, in case you want to use chaining.
*/
commitNewContract(manifest: MissionManifest): Promise<MissionManifest>;
private getGroupContract;
/**
* Fixes a contract based on game version.
*
* An example of this is the location for Holiday Hoarders changing in
* HITMAN 3 thus breaking the contract in standalone 2016.
*
* @param contract The contract to fix.
* @param gameVersion The game version.
* @returns The fixed contract.
*/
private fixContract;
/**
* Get a contract by its ID.
*
* Order of precedence:
* 1. Plugins ({@link addMission} or the `getContractManifest` hook).
* 2. Peacock internal contracts storage.
* 3. Files in the `contracts` folder.
*
* @param id The contract's ID.
* @param gameVersion The game version.
* @param getGroup When `id` points one of the levels in a contract group, controls whether to get the group contract instead of the individual mission. Defaulted to false. WARNING: If you set this to true, what is returned is not what is pointed to by the inputted `id`.
* @returns The mission manifest object, or undefined if it wasn't found.
*/
resolveContract(id: string | undefined, gameVersion: GameVersion, getGroup?: boolean): MissionManifest | undefined;
/**
* Adds the specified mission manifest as a mission.
* It will be prioritized over all internal missions, escalations, and contracts.
*
* @param manifest The mission's manifest.
*/
addMission(manifest: MissionManifest): void;
/**
* Adds an escalation to the game.
*
* @param groupContract The escalation group contract, ALL levels must have the Id of this in Metadata.InGroup
* @param locationId The location of the escalation's ID.
* @param gameVersion The game version to add the escalation to.
* @param levels The escalation's levels.
*/
addEscalation(groupContract: MissionManifest, locationId: string, gameVersion: GameVersion, ...levels: MissionManifest[]): void;
/**
* Downloads a contract from the IOI servers.
*
* @param userId The current user's ID.
* @param pubId The public ID (numeric ID) of the contract.
* @param gameVersion The game version (IOI's servers are version-dependent).
*/
downloadContract(userId: string, pubId: string, gameVersion: GameVersion): Promise<MissionManifest | undefined>;
/**
* Get all global challenges and register a simplified version of them.
* @param gameVersion A GameVersion object representing the version of the game.
*/
private registerGlobalChallenges;
private _loadResources;
private _handleResources;
private _handleChallengeResources;
private _handleMasteryResources;
private _loadWorkspacePlugins;
executePlugin(pluginName: string, pluginContents: string, pluginPath: string): Promise<void>;
private _loadInternalContracts;
scanForGroups(): void;
}
/**
* Returns if the specified file is a Peacock plugin file.
*
* @param name The file's name.
* @param extension The target file extension.
* @returns If the specified file is a plugin.
*/
export declare function isPlugin(name: string, extension: string): boolean;
/**
* Translates a contract ID to a "hit" object.
*
* @param contractId The contract's ID.
* @param gameVersion The game's version.
* @param userId The current user's ID.
* @returns The hit object.
*/
export declare function contractIdToHitObject(contractId: string, gameVersion: GameVersion, userId: string): Hit | undefined;
/**
* Sends an array of publicIds to the contract preservation backend.
* @param publicIds The contract publicIds to send.
* @param gameVersion The contracts' game version.
*/
export declare function preserveContracts(publicIds: string[], gameVersion: GameVersion): Promise<void>;
export declare const controller: Controller;