@peacockproject/core
Version:
Type definitions for Peacock's core.
38 lines (37 loc) • 1.61 kB
TypeScript
import type { EscalationInfo, GameVersion, MissionManifest, MissionType, UserProfile } from "../../types/types";
/**
* An array of contract types to determine whether the escalation service
* should be used.
*/
export declare const escalationTypes: MissionType[];
/**
* Gets a user's progress on the specified escalation's group ID.
*
* @param userData The user's profile object.
* @param groupContractId The escalation's group contract ID.
* @returns The level of the escalation the user is on.
*/
export declare function getUserEscalationProgress(userData: UserProfile, groupContractId: string): number;
/**
* Resets a user's progress on the specified escalation.
*
* @param userData The user's profile object.
* @param groupContractId The escalation's group contract ID.
*/
export declare function resetUserEscalationProgress(userData: UserProfile, groupContractId: string): void;
/**
* Get the number of levels in the specified group.
*
* @param groupContract The escalation group's contract.
* @returns The number of levels. If the group contract is undefined, always 0.
*/
export declare function getLevelCount(groupContract: MissionManifest | undefined): number;
/**
* Get the "play" escalation info.
*
* @param userId The current user's ID.
* @param groupContractId The escalation's group contract ID.
* @param gameVersion The game's version.
* @returns The escalation play details, or an empty object if not applicable.
*/
export declare function getPlayEscalationInfo(userId: string, groupContractId: string | undefined | null, gameVersion: GameVersion): EscalationInfo;