two-slot-extended-mags/types/services/ProfileSnapshotService.d.ts

31 lines
1.0 KiB
TypeScript
Raw Normal View History

2024-08-05 20:33:00 +10:00
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import { ICloner } from "@spt/utils/cloners/ICloner";
2023-06-11 15:10:34 +10:00
export declare class ProfileSnapshotService {
2024-08-05 20:33:00 +10:00
protected cloner: ICloner;
protected storedProfileSnapshots: Record<string, ISptProfile>;
constructor(cloner: ICloner);
2023-06-11 15:10:34 +10:00
/**
* Store a profile into an in-memory object
* @param sessionID session id - acts as the key
* @param profile - profile to save
*/
2024-08-05 20:33:00 +10:00
storeProfileSnapshot(sessionID: string, profile: ISptProfile): void;
2023-06-11 15:10:34 +10:00
/**
* Retreve a stored profile
* @param sessionID key
* @returns A player profile object
*/
2024-08-05 20:33:00 +10:00
getProfileSnapshot(sessionID: string): ISptProfile | undefined;
2023-06-11 15:10:34 +10:00
/**
* 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;
}