import { Biometrics, Emotions, Expressions, ResourceId } from '../models' export class JargonEvent { public static type: string public type: string } export type DispatchedJargonEvent = T & { sessionId: ResourceId, eventUserId: ResourceId, } export namespace Events { export class BookmarkEvent implements JargonEvent { public static type: 'bookmark' = 'bookmark' public readonly type = BookmarkEvent.type constructor(public notes: string, public timestamp: number) { } } export class PublicChatEvent implements JargonEvent { public static type: 'public_chat' = 'public_chat' public readonly type = PublicChatEvent.type constructor(public message: string, public timestamp: number) { } } export class SessionStartEvent implements JargonEvent { public static type: 'session_start' = 'session_start' public readonly type = SessionStartEvent.type } export class SessionStopEvent implements JargonEvent { public static type: 'session_stop' = 'session_stop' public readonly type = SessionStopEvent.type } export class PulseDataEvent implements JargonEvent { public static type: 'pulse_data' = 'pulse_data' public readonly type = PulseDataEvent.type constructor(public rgb: [number[], number[], number[]], public fps: number) { } } export class CameraMetricsEvent implements JargonEvent { public static type: 'camera_metrics' = 'camera_metrics' public readonly type = CameraMetricsEvent.type public lean: number public nod: number constructor(public valence: number, public engagement: number, public attention: number, public pulse: number, public timestamp: number) { } } export class FaceDataEvent implements JargonEvent { public static type: 'emotion_save' = 'emotion_save' public readonly type = FaceDataEvent.type constructor(public emotionsBuffer: Array<{ timestamp: number, emotions: Emotions, expressions: Expressions, biometrics: Biometrics }>) { } } export class WindowFocusChangeEvent implements JargonEvent { public static type: 'window_focus_change' = 'window_focus_change' public readonly type = WindowFocusChangeEvent.type public timestamp: number constructor(public focused: boolean) { } } }