@readerseye2/cr_type 1.0.182 → 1.0.184
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.
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Socket 디바이스 플랫폼 (얼굴보기 디바이스 선택용).
|
|
3
|
+
* 자녀 socket에만 채워짐. userAgent에서 파싱.
|
|
4
|
+
*/
|
|
5
|
+
export type DevicePlatform = 'windows' | 'macos' | 'android' | 'ios' | 'linux' | 'unknown';
|
|
1
6
|
/**
|
|
2
7
|
* 연결된 사용자 정보 (Socket 기반)
|
|
3
8
|
*/
|
|
@@ -12,10 +17,12 @@ export interface ConnectedUser {
|
|
|
12
17
|
userName: string;
|
|
13
18
|
/** 부모 idx (child인 경우) */
|
|
14
19
|
parentIdx?: number;
|
|
15
|
-
/** 연결 시간 */
|
|
20
|
+
/** 연결 시간 (ISO) */
|
|
16
21
|
connectedAt: string;
|
|
17
22
|
/** 현재 읽기 세션 ID (읽기 중인 경우) */
|
|
18
23
|
readingSessionId?: string;
|
|
24
|
+
/** 디바이스 플랫폼 — 자녀 socket에만 채워짐 (얼굴보기 디바이스 선택용) */
|
|
25
|
+
platform?: DevicePlatform;
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
28
|
* 가족 그룹 (family:{parentIdx} 기준)
|
|
@@ -26,9 +26,14 @@ export interface ClientToServerEvents {
|
|
|
26
26
|
'reading:watch-children': (childIdxList: number[]) => void;
|
|
27
27
|
/** 자녀 읽기 상태 구독 해제 */
|
|
28
28
|
'reading:unwatch-children': () => void;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* 부모→자녀 offer.
|
|
31
|
+
* targetChildSocketId: 같은 자녀 계정으로 여러 단말 접속 시 부모가 선택한 단말의 socketId.
|
|
32
|
+
* (디바이스 선택 모달 → ConnectedUser.socketId)
|
|
33
|
+
*/
|
|
30
34
|
'webrtc:offer': (payload: {
|
|
31
35
|
targetChildIdx: number;
|
|
36
|
+
targetChildSocketId: string;
|
|
32
37
|
sdp: string;
|
|
33
38
|
}) => void;
|
|
34
39
|
/** 자녀→부모 answer */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** WebRTC 얼굴보기 — 자녀 디바이스 식별용 플랫폼 라벨 */
|
|
2
|
+
export type ChildDevicePlatform = 'windows' | 'macos' | 'android' | 'ios' | 'linux' | 'unknown';
|
|
3
|
+
/**
|
|
4
|
+
* WebRTC 얼굴보기 디바이스 선택 모달용 자녀 디바이스 정보.
|
|
5
|
+
* 같은 자녀 계정으로 여러 단말에 로그인 중일 때, 부모가 어느 단말 영상을 볼지 선택.
|
|
6
|
+
*/
|
|
7
|
+
export interface ChildDeviceInfo {
|
|
8
|
+
socketId: string;
|
|
9
|
+
platform: ChildDevicePlatform;
|
|
10
|
+
userAgent: string | null;
|
|
11
|
+
/** ISO 시각 — 해당 socket이 connect한 시점 */
|
|
12
|
+
connectedAt: string;
|
|
13
|
+
}
|