UNPKG

@timesheet/sdk

Version:
22 lines 913 B
export interface SseStatus { connected: boolean; connectionCount: number; userId: string; } export interface EventData<T = unknown> { event: string; item: T; } export interface SseConnectionEvent { connectionId: string; message: string; } export type EventType = 'connected' | 'team.create' | 'team.update' | 'project.create' | 'project.update' | 'todo.create' | 'todo.update' | 'task.create' | 'task.update' | 'tag.create' | 'tag.update' | 'rate.create' | 'rate.update' | 'timer.start' | 'timer.stop' | 'timer.pause' | 'timer.resume'; export type EventHandler<T = unknown> = (data: EventData<T>) => void; export interface SseSubscription { close(): void; readonly isConnected: boolean; on(event: EventType | 'error', handler: (data: unknown) => void): void; off(event: EventType | 'error', handler: (data: unknown) => void): void; } //# sourceMappingURL=Event.d.ts.map