two-slot-extended-mags/types/services/ProfileSnapshotService.d.ts
2024-08-05 20:33:00 +10:00

31 lines
1.0 KiB
TypeScript

import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class ProfileSnapshotService {
protected cloner: ICloner;
protected storedProfileSnapshots: Record<string, ISptProfile>;
constructor(cloner: ICloner);
/**
* Store a profile into an in-memory object
* @param sessionID session id - acts as the key
* @param profile - profile to save
*/
storeProfileSnapshot(sessionID: string, profile: ISptProfile): void;
/**
* Retreve a stored profile
* @param sessionID key
* @returns A player profile object
*/
getProfileSnapshot(sessionID: string): ISptProfile | undefined;
/**
* Does a profile exists against the provided key
* @param sessionID key
* @returns true if exists
*/
hasProfileSnapshot(sessionID: string): boolean;
/**
* Remove a stored profile by key
* @param sessionID key
*/
clearProfileSnapshot(sessionID: string): void;
}