@readerseye2/cr_type 1.0.186 → 1.0.189
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/socket-clientToServerEvents.type.d.ts +28 -0
- package/dist/socket/socket-serverToClientEvents.type.d.ts +10 -0
- package/dist/socket/webrtc.types.d.ts +13 -13
- package/dist/socket/webrtc.types.js +2 -2
- package/package.json +27 -27
|
@@ -2,6 +2,8 @@ import { ChatMessageReadRequest, ChatMessageRefreshRequest, MessageRequest } fro
|
|
|
2
2
|
import { SessionDataPayload } from "./reading-section.types";
|
|
3
3
|
import { ViewerOpenPayload, ViewerClosePayload, SessionHistoryListPayload, SessionHistoryGetPayload, SessionHistoryDeletePayload, UnifiedChunksGetPayload, UnifiedSegmentGetPayload, LiveBatchPayload } from "./unified-session.types";
|
|
4
4
|
import { ReadingProgressReport } from "../book/child-reading-progress.type";
|
|
5
|
+
import { IceServerConfig } from "./socket-serverToClientEvents.type";
|
|
6
|
+
import { ConnectedUser } from "./connected-user.types";
|
|
5
7
|
export interface ClientToServerEvents {
|
|
6
8
|
'chat-message:send': (msg: MessageRequest) => void;
|
|
7
9
|
'chat-message:refresh': (msg: ChatMessageRefreshRequest) => void;
|
|
@@ -66,6 +68,16 @@ export interface ClientToServerEvents {
|
|
|
66
68
|
'webrtc:hangup': (payload: {
|
|
67
69
|
targetSocketId: string;
|
|
68
70
|
}) => void;
|
|
71
|
+
/**
|
|
72
|
+
* 자녀→부모 peer 오류 통지.
|
|
73
|
+
* 자녀 단말에 카메라가 없거나, answer 생성 실패 등으로 offer를 처리할 수 없을 때 발신.
|
|
74
|
+
* 부모는 watchdog timeout 대신 즉시 명확한 에러 메시지를 받는다.
|
|
75
|
+
*/
|
|
76
|
+
'webrtc:peer-error': (payload: {
|
|
77
|
+
targetParentSocketId: string;
|
|
78
|
+
reason: 'camera-unavailable' | 'no-video-track' | 'offer-failed';
|
|
79
|
+
message?: string;
|
|
80
|
+
}) => void;
|
|
69
81
|
/**
|
|
70
82
|
* WebRTC 진단 정보 (부모→서버, 단방향)
|
|
71
83
|
* - iceCandidateType: 부모 측 selected candidate pair의 local candidate type
|
|
@@ -76,6 +88,22 @@ export interface ClientToServerEvents {
|
|
|
76
88
|
iceCandidateType: 'host' | 'srflx' | 'relay' | null;
|
|
77
89
|
endReason?: 'ice-failed' | 'connection-failed';
|
|
78
90
|
}) => void;
|
|
91
|
+
/**
|
|
92
|
+
* 부모→서버: PC 생성 전에 TURN credential을 ack로 받아온다.
|
|
93
|
+
* 자녀는 offer payload에 iceServers가 동봉되지만, 부모는 PC를 직접 만들기 때문에
|
|
94
|
+
* 이 ack로 동일한 시점 보장(= PC 생성 전에 TURN URL 확보).
|
|
95
|
+
*/
|
|
96
|
+
'webrtc:request-ice-servers': (ack: (response: {
|
|
97
|
+
iceServers: IceServerConfig[];
|
|
98
|
+
}) => void) => void;
|
|
99
|
+
/**
|
|
100
|
+
* 부모→서버: 현재 family room 의 자녀 ConnectedUser 목록을 ack 로 받아온다.
|
|
101
|
+
* connect 시점 catch-up + incremental events 만으론 좀비 socket / 이벤트 누락 케이스에서
|
|
102
|
+
* frontend cache 가 stale 될 수 있어서, 디바이스 picker 같은 critical UI 에서 fresh fetch 용도.
|
|
103
|
+
*/
|
|
104
|
+
'presence:list-family': (ack: (response: {
|
|
105
|
+
children: ConnectedUser[];
|
|
106
|
+
}) => void) => void;
|
|
79
107
|
}
|
|
80
108
|
export interface NoticeToServerEvents {
|
|
81
109
|
'notice-message:send': (msg: MessageRequest) => void;
|
|
@@ -113,6 +113,16 @@ export interface ServerToClientEvents {
|
|
|
113
113
|
fromIdx: number;
|
|
114
114
|
fromSocketId: string;
|
|
115
115
|
}) => void;
|
|
116
|
+
/**
|
|
117
|
+
* 자녀 측 peer 오류 수신 (부모 측).
|
|
118
|
+
* 자녀 단말에 카메라가 없거나 offer 처리 실패 시 즉시 통지된다.
|
|
119
|
+
*/
|
|
120
|
+
'webrtc:peer-error': (payload: {
|
|
121
|
+
fromChildIdx: number;
|
|
122
|
+
fromSocketId: string;
|
|
123
|
+
reason: 'camera-unavailable' | 'no-video-track' | 'offer-failed';
|
|
124
|
+
message?: string;
|
|
125
|
+
}) => void;
|
|
116
126
|
}
|
|
117
127
|
export interface NoticeToClientEvents {
|
|
118
128
|
'notice-message:result': (payload: NoticeMessageResult) => void;
|
|
@@ -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.189",
|
|
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
|
+
}
|