@readerseye2/cr_type 1.0.177 → 1.0.179

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,25 @@ export interface ClientToServerEvents {
26
26
  'reading:watch-children': (childIdxList: number[]) => void;
27
27
  /** 자녀 읽기 상태 구독 해제 */
28
28
  'reading:unwatch-children': () => void;
29
+ /** 부모→자녀 offer */
30
+ 'webrtc:offer': (payload: {
31
+ targetChildIdx: number;
32
+ sdp: string;
33
+ }) => void;
34
+ /** 자녀→부모 answer */
35
+ 'webrtc:answer': (payload: {
36
+ targetParentIdx: number;
37
+ sdp: string;
38
+ }) => void;
39
+ /** ICE candidate 교환 (양방향) */
40
+ 'webrtc:ice-candidate': (payload: {
41
+ targetIdx: number;
42
+ candidate: string;
43
+ }) => void;
44
+ /** 연결 종료 (양방향) */
45
+ 'webrtc:hangup': (payload: {
46
+ targetIdx: number;
47
+ }) => void;
29
48
  }
30
49
  export interface NoticeToServerEvents {
31
50
  'notice-message:send': (msg: MessageRequest) => void;
@@ -40,12 +40,41 @@ export interface ServerToClientEvents {
40
40
  readingSessionId: string;
41
41
  durationMs: number;
42
42
  }) => void;
43
+ /** 자녀(같은 family room)가 소켓에 연결됨 */
44
+ 'user:connected': (payload: {
45
+ user: ConnectedUser;
46
+ }) => void;
47
+ /** 자녀(같은 family room)가 소켓에서 연결 해제됨 */
48
+ 'user:disconnected': (payload: {
49
+ socketId: string;
50
+ userId: number;
51
+ userType: 'parent' | 'child';
52
+ }) => void;
43
53
  /** 자녀 읽기 실시간 상태 (5초 주기) */
44
54
  'reading:child-live': (payload: LiveReadingState) => void;
45
55
  /** 자녀 읽기 종료 (세션 종료 또는 TTL 만료) */
46
56
  'reading:child-offline': (payload: {
47
57
  testeeIdx: number;
48
58
  }) => void;
59
+ /** 부모의 offer 수신 (자녀 측) */
60
+ 'webrtc:offer': (payload: {
61
+ fromParentIdx: number;
62
+ sdp: string;
63
+ }) => void;
64
+ /** 자녀의 answer 수신 (부모 측) */
65
+ 'webrtc:answer': (payload: {
66
+ fromChildIdx: number;
67
+ sdp: string;
68
+ }) => void;
69
+ /** ICE candidate 수신 (양방향) */
70
+ 'webrtc:ice-candidate': (payload: {
71
+ fromIdx: number;
72
+ candidate: string;
73
+ }) => void;
74
+ /** 연결 종료 수신 (양방향) */
75
+ 'webrtc:hangup': (payload: {
76
+ fromIdx: number;
77
+ }) => void;
49
78
  }
50
79
  export interface NoticeToClientEvents {
51
80
  'notice-message:result': (payload: NoticeMessageResult) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readerseye2/cr_type",
3
- "version": "1.0.177",
3
+ "version": "1.0.179",
4
4
  "description": "CheckReading shared TypeScript types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",