UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

30 lines 1.23 kB
/** * AmityRoomAnalytics provides analytics capabilities for room watch sessions */ export declare class AmityRoomAnalytics implements Amity.RoomAnalytics { private room; private storage; private client; constructor(room: Amity.Room); /** * Create a new watch session for the current room * @param startedAt The timestamp when watching started * @returns Promise<string> sessionId unique identifier for this watch session * @throws ASCApiError if room is not in watchable state (not LIVE or RECORDED) */ createWatchSession(startedAt: Date): Promise<string>; /** * Update an existing watch session with duration * @param sessionId The unique identifier of the watch session * @param duration The total watch duration in seconds * @param endedAt The timestamp when this update occurred * @returns Promise<void> Completion status */ updateWatchSession(sessionId: string, duration: number, endedAt: Date): Promise<void>; /** * Sync all pending watch sessions to backend * This function uses jitter delay and handles network resilience */ syncPendingWatchSessions(): void; } //# sourceMappingURL=AmityRoomAnalytics.d.ts.map