2024-04-03 20:15:11 +11:00
|
|
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
|
|
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
2023-06-11 15:10:34 +10:00
|
|
|
export declare class ProfileSnapshotService {
|
|
|
|
protected jsonUtil: JsonUtil;
|
|
|
|
protected storedProfileSnapshots: Record<string, IAkiProfile>;
|
|
|
|
constructor(jsonUtil: JsonUtil);
|
|
|
|
/**
|
|
|
|
* 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: IAkiProfile): void;
|
|
|
|
/**
|
|
|
|
* Retreve a stored profile
|
|
|
|
* @param sessionID key
|
|
|
|
* @returns A player profile object
|
|
|
|
*/
|
|
|
|
getProfileSnapshot(sessionID: string): IAkiProfile;
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|