@readerseye2/cr_type 1.0.79 → 1.0.81
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/socket/index.d.ts
CHANGED
package/dist/socket/index.js
CHANGED
|
@@ -20,5 +20,4 @@ __exportStar(require("./socket-serverToClientEvents.type"), exports);
|
|
|
20
20
|
__exportStar(require("./socket-message.types"), exports);
|
|
21
21
|
__exportStar(require("./reading-section.types"), exports);
|
|
22
22
|
__exportStar(require("./connected-user.types"), exports);
|
|
23
|
-
__exportStar(require("./monitor.types"), exports);
|
|
24
23
|
__exportStar(require("./recording.types"), exports);
|
|
@@ -10,11 +10,14 @@ export type SegmentStatus = 'active' | 'ended';
|
|
|
10
10
|
/**
|
|
11
11
|
* 청크 파일 (S3: segments/{n}/chunks/{startTs}-{endTs}.json)
|
|
12
12
|
* - 10초 단위 이벤트 묶음
|
|
13
|
+
* - snapshot: 청크 시작 시점의 뷰어 상태 (Seek 시 초기화용)
|
|
13
14
|
*/
|
|
14
15
|
export interface ChunkFile {
|
|
15
16
|
startTimestamp: number;
|
|
16
17
|
endTimestamp: number;
|
|
17
18
|
events: SocketViewerEvent[];
|
|
19
|
+
/** 청크 시작 시점의 뷰어 상태 (Seek 시 이 상태로 초기화 후 이벤트 재생) */
|
|
20
|
+
snapshot?: ViewerSnapshot;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* 스냅샷 파일 (S3: segments/{n}/snapshots/{ts}.json)
|
|
@@ -282,6 +285,9 @@ export interface ActiveSegment {
|
|
|
282
285
|
startedAt: number;
|
|
283
286
|
eventBuffer: SocketViewerEvent[];
|
|
284
287
|
chunkStartTimestamp: number;
|
|
288
|
+
/** 현재 청크 시작 시점의 스냅샷 (청크에 포함됨) */
|
|
289
|
+
chunkStartSnapshot: ViewerSnapshot | null;
|
|
290
|
+
/** 가장 최근 스냅샷 (30초 인터벌 저장용) */
|
|
285
291
|
lastSnapshot: ViewerSnapshot | null;
|
|
286
292
|
chunks: ChunkRef[];
|
|
287
293
|
snapshots: SnapshotRef[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChatMessageReadRequest, ChatMessageRefreshRequest, MessageRequest } from "./socket-message.types";
|
|
2
2
|
import { SessionStartPayload, SessionEndPayload, SessionProgressPayload, SessionEventPayload, SessionSubscribePayload } from "./reading-section.types";
|
|
3
|
-
import { MonitorStartPayload, MonitorStopPayload } from "./monitor.types";
|
|
4
3
|
import { RecordingStartPayload, RecordingStopPayload, RecordingListPayload, RecordingGetPayload, SegmentGetPayload, ChunksGetPayload } from "./recording.types";
|
|
5
4
|
export interface ClientToServerEvents {
|
|
6
5
|
'chat-message:send': (msg: MessageRequest) => void;
|
|
@@ -14,17 +13,16 @@ export interface ClientToServerEvents {
|
|
|
14
13
|
export interface NoticeToServerEvents {
|
|
15
14
|
'notice-message:send': (msg: MessageRequest) => void;
|
|
16
15
|
}
|
|
16
|
+
/** 사용자 관리 이벤트 (Admin용 - 연결된 사용자 목록 조회) */
|
|
17
|
+
export interface UserAdminToServerEvents {
|
|
18
|
+
'user:list': () => void;
|
|
19
|
+
}
|
|
17
20
|
/** 읽기 섹션 관리 이벤트 (Admin용 - 활성 세션 목록 조회/구독) */
|
|
18
21
|
export interface ReadingAdminToServerEvents {
|
|
19
22
|
'reading-section:list': () => void;
|
|
20
23
|
'reading-section:subscribe': (payload: SessionSubscribePayload) => void;
|
|
21
24
|
'reading-section:unsubscribe': (payload: SessionSubscribePayload) => void;
|
|
22
25
|
}
|
|
23
|
-
/** 실시간 모니터링 이벤트 (Admin용 - 모니터링 시작/중지) */
|
|
24
|
-
export interface MonitorAdminToServerEvents {
|
|
25
|
-
'monitor:start': (payload: MonitorStartPayload) => void;
|
|
26
|
-
'monitor:stop': (payload: MonitorStopPayload) => void;
|
|
27
|
-
}
|
|
28
26
|
/** 녹화 이벤트 (Admin/Parent → Server) - P2.2 Recording System */
|
|
29
27
|
export interface RecordingAdminToServerEvents {
|
|
30
28
|
'recording:start': (payload: RecordingStartPayload) => void;
|
|
@@ -34,5 +32,5 @@ export interface RecordingAdminToServerEvents {
|
|
|
34
32
|
'recording:get-segment': (payload: SegmentGetPayload) => void;
|
|
35
33
|
'recording:get-chunks': (payload: ChunksGetPayload) => void;
|
|
36
34
|
}
|
|
37
|
-
export interface AdminClientToServerEvents extends ClientToServerEvents, NoticeToServerEvents,
|
|
35
|
+
export interface AdminClientToServerEvents extends ClientToServerEvents, NoticeToServerEvents, UserAdminToServerEvents, ReadingAdminToServerEvents, RecordingAdminToServerEvents {
|
|
38
36
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MessageReadResponse, MessageResponse, NoticeMessageResult } from "./socket-message.types";
|
|
2
2
|
import { ReadingSessionInfo, SocketViewerEvent, ViewerSnapshot } from "./reading-section.types";
|
|
3
3
|
import { ConnectedUser, ConnectedUsersGrouped } from "./connected-user.types";
|
|
4
|
-
import { MonitorStartedPayload, MonitorChunkPayload, MonitorSessionChangedPayload, MonitorStoppedPayload, MonitorErrorPayload } from "./monitor.types";
|
|
5
4
|
import { RecordingStartedPayload, RecordingStoppedPayload, RecordingChunkPayload, SegmentStartedPayload, SegmentEndedPayload, RecordingListResultPayload, RecordingManifestPayload, SegmentMetaPayload, ChunksResultPayload } from "./recording.types";
|
|
6
5
|
export interface ServerToClientEvents {
|
|
7
6
|
connect: () => void;
|
|
@@ -62,14 +61,6 @@ export interface UserServerToClientEvents {
|
|
|
62
61
|
readingSessionId: string | null;
|
|
63
62
|
}) => void;
|
|
64
63
|
}
|
|
65
|
-
/** 실시간 모니터링 이벤트 (Admin에게 전송) */
|
|
66
|
-
export interface MonitorServerToClientEvents {
|
|
67
|
-
'monitor:started': (payload: MonitorStartedPayload) => void;
|
|
68
|
-
'monitor:chunk': (payload: MonitorChunkPayload) => void;
|
|
69
|
-
'monitor:session-changed': (payload: MonitorSessionChangedPayload) => void;
|
|
70
|
-
'monitor:stopped': (payload: MonitorStoppedPayload) => void;
|
|
71
|
-
'monitor:error': (payload: MonitorErrorPayload) => void;
|
|
72
|
-
}
|
|
73
64
|
/** 녹화 이벤트 (Admin/Parent에게 전송) - P2.2 Recording System */
|
|
74
65
|
export interface RecordingServerToClientEvents {
|
|
75
66
|
'recording:started': (payload: RecordingStartedPayload) => void;
|
|
@@ -85,5 +76,5 @@ export interface RecordingServerToClientEvents {
|
|
|
85
76
|
'recording:segment': (payload: SegmentMetaPayload) => void;
|
|
86
77
|
'recording:chunks': (payload: ChunksResultPayload) => void;
|
|
87
78
|
}
|
|
88
|
-
export interface AdminServerToClientEvents extends ServerToClientEvents, NoticeToClientEvents, ReadingServerToClientEvents, UserServerToClientEvents,
|
|
79
|
+
export interface AdminServerToClientEvents extends ServerToClientEvents, NoticeToClientEvents, ReadingServerToClientEvents, UserServerToClientEvents, RecordingServerToClientEvents {
|
|
89
80
|
}
|