@amityco/ts-sdk
Version:
Amity Social Cloud Typescript SDK
38 lines • 1.14 kB
TypeScript
/**
* WatchSessionStorage manages watch session data in memory
* Similar to UsageCollector for stream watch minutes
*/
export declare class WatchSessionStorage {
private sessions;
constructor();
/**
* Add a new watch session
*/
addSession(session: Amity.WatchSessionEntity): void;
/**
* Get a watch session by sessionId
*/
getSession(sessionId: string): Amity.WatchSessionEntity | undefined;
/**
* Update a watch session
*/
updateSession(sessionId: string, updates: Partial<Amity.WatchSessionEntity>): void;
/**
* Get all sessions with a specific sync state
*/
getSessionsByState(state: Amity.WatchSessionSyncState): Amity.WatchSessionEntity[];
/**
* Delete a session
*/
deleteSession(sessionId: string): void;
/**
* Get all pending sessions
*/
getPendingSessions(): Amity.WatchSessionEntity[];
/**
* Get all syncing sessions
*/
getSyncingSessions(): Amity.WatchSessionEntity[];
}
export declare const getWatchSessionStorage: () => WatchSessionStorage;
//# sourceMappingURL=WatchSessionStorage.d.ts.map