@readerseye2/cr_type 1.0.172 → 1.0.173

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.
@@ -12,22 +12,17 @@ export interface ResultSessionData {
12
12
  }
13
13
  /** CR_result → CR_ws */
14
14
  export interface ResultToServerEvents {
15
- /** 세션 구독 (Room 입장) */
16
15
  'session:subscribe': (data: {
17
16
  sessionToken: string;
18
17
  }) => void;
19
- /** 세션 구독 해제 */
20
18
  'session:unsubscribe': () => void;
21
- /** 과거 세션 manifest 조회 */
22
19
  'history:get-manifest': (data: {
23
20
  shareToken: string;
24
21
  }) => void;
25
- /** 과거 세션 segment meta 조회 */
26
22
  'history:get-segment-meta': (data: {
27
23
  shareToken: string;
28
24
  segIdx: number;
29
25
  }) => void;
30
- /** 과거 세션 chunk 조회 */
31
26
  'history:get-chunks': (data: {
32
27
  shareToken: string;
33
28
  segIdx: number;
@@ -37,7 +32,6 @@ export interface ResultToServerEvents {
37
32
  }
38
33
  /** CR_ws → CR_result */
39
34
  export interface ResultServerToClientEvents {
40
- /** 구독 확인 + 초기 상태 */
41
35
  'session:subscribed': (data: {
42
36
  sessionId: string;
43
37
  snapshot: ViewerSnapshot | null;
@@ -48,7 +42,6 @@ export interface ResultServerToClientEvents {
48
42
  chunkRefs: ChunkRef[];
49
43
  readingScan?: ChunkReadingScanSummary;
50
44
  }) => void;
51
- /** 새 chunk 알림 (데이터는 S3에서 직접 fetch) */
52
45
  'chunk:notify': (data: {
53
46
  segmentIndex: number;
54
47
  chunkKey: string;
@@ -56,19 +49,15 @@ export interface ResultServerToClientEvents {
56
49
  endTs: number;
57
50
  readingScan?: ChunkReadingScanSummary;
58
51
  }) => void;
59
- /** 세션 종료 알림 */
60
52
  'session:ended': (data: {
61
53
  durationMs: number;
62
54
  }) => void;
63
- /** 에러 */
64
55
  'session:error': (data: {
65
56
  message: string;
66
57
  }) => void;
67
- /** 과거 세션 응답 */
68
58
  'history:manifest': (data: UnifiedSessionManifest) => void;
69
59
  'history:segment-meta': (data: UnifiedSegmentMeta) => void;
70
60
  'history:chunks': (data: UnifiedChunkFile[]) => void;
71
- /** 시청자 수 */
72
61
  'viewer:count': (data: {
73
62
  count: number;
74
63
  }) => void;
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
+ // ═══════════════════════════════════════════════════════════════════════════
3
+ // /result 네임스페이스 이벤트 타입 (추후 확장용)
4
+ //
5
+ // Phase 5~6에서 CR_result 독립 프로젝트 + CR_ws /result 게이트웨이 구현 시 활성화
6
+ // 관련 plan: CR_docs/plan/cr-result/05-cr-ws-socket-result.md
7
+ // CR_docs/plan/cr-result/06-cr-result-project.md
8
+ // ═══════════════════════════════════════════════════════════════════════════
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,6 +16,14 @@ export interface ClientToServerEvents {
16
16
  'session:event': (payload: SessionEventPayload) => void;
17
17
  /** 시선 데이터 전송 (~1초 간격) */
18
18
  'session:gaze': (payload: GazeDataPayload) => void;
19
+ /** 자녀 세션 live 구독 (부모) */
20
+ 'live:subscribe': (payload: {
21
+ readingSessionId: string;
22
+ }) => void;
23
+ /** 자녀 세션 live 구독 해제 */
24
+ 'live:unsubscribe': (payload: {
25
+ readingSessionId: string;
26
+ }) => void;
19
27
  /** 읽기 진행 보고 (5초 주기 자동저장) */
20
28
  'progress:reading-save': (payload: ReadingProgressReport) => void;
21
29
  /** 자녀 읽기 상태 구독 시작 */
@@ -27,6 +27,19 @@ export interface ServerToClientEvents {
27
27
  'session:error': (payload: {
28
28
  message: string;
29
29
  }) => void;
30
+ /** 새 chunk 저장 알림 (5초마다) — 데이터는 기존 API로 fetch */
31
+ 'live:chunk-notify': (payload: {
32
+ readingSessionId: string;
33
+ segmentIndex: number;
34
+ chunkKey: string;
35
+ startTs: number;
36
+ endTs: number;
37
+ }) => void;
38
+ /** live 구독 중인 세션 종료 */
39
+ 'live:session-ended': (payload: {
40
+ readingSessionId: string;
41
+ durationMs: number;
42
+ }) => void;
30
43
  /** 자녀 읽기 실시간 상태 (5초 주기) */
31
44
  'reading:child-live': (payload: LiveReadingState) => void;
32
45
  /** 자녀 읽기 종료 (세션 종료 또는 TTL 만료) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readerseye2/cr_type",
3
- "version": "1.0.172",
3
+ "version": "1.0.173",
4
4
  "description": "CheckReading shared TypeScript types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",