@readerseye2/cr_type 1.0.183 → 1.0.185
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.
- package/dist/book/book-api.type.d.ts +15 -15
- package/dist/book/book-api.type.js +2 -2
- package/dist/book/book-log.type.d.ts +14 -14
- package/dist/book/book-log.type.js +2 -2
- package/dist/book/book.const.d.ts +274 -274
- package/dist/book/book.const.js +119 -119
- package/dist/book/legacy.book.type.d.ts +164 -164
- package/dist/book/legacy.book.type.js +41 -41
- package/dist/socket/connected-user.types.d.ts +8 -1
- package/dist/socket/socket-clientToServerEvents.type.d.ts +22 -7
- package/dist/socket/socket-serverToClientEvents.type.d.ts +21 -4
- package/dist/socket/webrtc.types.d.ts +13 -13
- package/dist/socket/webrtc.types.js +2 -2
- package/package.json +27 -27
|
@@ -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,24 +26,39 @@ 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
|
+
/**
|
|
40
|
+
* 자녀→부모 answer.
|
|
41
|
+
* targetParentSocketId: 부모 계정 단말 단위로 1:1 라우팅하기 위해 사용.
|
|
42
|
+
* 같은 parent_idx의 다른 단말로는 전송되지 않는다.
|
|
43
|
+
*/
|
|
35
44
|
'webrtc:answer': (payload: {
|
|
36
|
-
|
|
45
|
+
targetParentSocketId: string;
|
|
37
46
|
sdp: string;
|
|
38
47
|
}) => void;
|
|
39
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* ICE candidate 교환 (양방향).
|
|
50
|
+
* targetSocketId: 발신자가 부모면 자녀 socket, 자녀면 부모 socket을 지정.
|
|
51
|
+
*/
|
|
40
52
|
'webrtc:ice-candidate': (payload: {
|
|
41
|
-
|
|
53
|
+
targetSocketId: string;
|
|
42
54
|
candidate: string;
|
|
43
55
|
}) => void;
|
|
44
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* 연결 종료 (양방향).
|
|
58
|
+
* targetSocketId: 1:1 hangup 대상 socket.
|
|
59
|
+
*/
|
|
45
60
|
'webrtc:hangup': (payload: {
|
|
46
|
-
|
|
61
|
+
targetSocketId: string;
|
|
47
62
|
}) => void;
|
|
48
63
|
/**
|
|
49
64
|
* WebRTC 진단 정보 (부모→서버, 단방향)
|
|
@@ -62,29 +62,46 @@ export interface ServerToClientEvents {
|
|
|
62
62
|
'reading:child-offline': (payload: {
|
|
63
63
|
testeeIdx: number;
|
|
64
64
|
}) => void;
|
|
65
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* 부모의 offer 수신 (자녀 측) — iceServers 포함.
|
|
67
|
+
* fromParentSocketId: 자녀가 어느 부모 단말이 보낸 offer인지 식별.
|
|
68
|
+
* 같은 parent_idx의 단말 2대가 동시에 같은 자녀에 offer를 보내면 두 PC가 공존해야 한다.
|
|
69
|
+
*/
|
|
66
70
|
'webrtc:offer': (payload: {
|
|
67
71
|
fromParentIdx: number;
|
|
72
|
+
fromParentSocketId: string;
|
|
68
73
|
sdp: string;
|
|
69
74
|
iceServers?: IceServerConfig[];
|
|
70
75
|
}) => void;
|
|
71
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* 자녀의 answer 수신 (부모 측).
|
|
78
|
+
* fromSocketId: 어느 자녀 단말이 보낸 answer인지 식별.
|
|
79
|
+
*/
|
|
72
80
|
'webrtc:answer': (payload: {
|
|
73
81
|
fromChildIdx: number;
|
|
82
|
+
fromSocketId: string;
|
|
74
83
|
sdp: string;
|
|
75
84
|
}) => void;
|
|
76
85
|
/** TURN credential 포함 ICE 서버 설정 (부모 측, offer 직후 수신) */
|
|
77
86
|
'webrtc:ice-servers': (payload: {
|
|
78
87
|
iceServers: IceServerConfig[];
|
|
79
88
|
}) => void;
|
|
80
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* ICE candidate 수신 (양방향).
|
|
91
|
+
* fromSocketId: 발신자 socketId — 수신측이 어느 PC에 매핑할지 결정하는 키.
|
|
92
|
+
*/
|
|
81
93
|
'webrtc:ice-candidate': (payload: {
|
|
82
94
|
fromIdx: number;
|
|
95
|
+
fromSocketId: string;
|
|
83
96
|
candidate: string;
|
|
84
97
|
}) => void;
|
|
85
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* 연결 종료 수신 (양방향).
|
|
100
|
+
* fromSocketId: 발신자 socketId.
|
|
101
|
+
*/
|
|
86
102
|
'webrtc:hangup': (payload: {
|
|
87
103
|
fromIdx: number;
|
|
104
|
+
fromSocketId: string;
|
|
88
105
|
}) => void;
|
|
89
106
|
}
|
|
90
107
|
export interface NoticeToClientEvents {
|
|
@@ -1,13 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@readerseye2/cr_type",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CheckReading shared TypeScript types",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"deploy_npm": "npm version patch && npm publish --access public",
|
|
12
|
-
"build": "tsc --project tsconfig.json",
|
|
13
|
-
"prepare": "npm run build"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/bnri/CR_type.git"
|
|
18
|
-
},
|
|
19
|
-
"author": "guripong",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"typescript": "^5.8.3"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@readerseye2/cr_type",
|
|
3
|
+
"version": "1.0.185",
|
|
4
|
+
"description": "CheckReading shared TypeScript types",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"deploy_npm": "npm version patch && npm publish --access public",
|
|
12
|
+
"build": "tsc --project tsconfig.json",
|
|
13
|
+
"prepare": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/bnri/CR_type.git"
|
|
18
|
+
},
|
|
19
|
+
"author": "guripong",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.8.3"
|
|
26
|
+
}
|
|
27
|
+
}
|