@readerseye2/cr_type 1.0.106 → 1.0.108

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.
@@ -96,3 +96,47 @@ export interface SessionSubscribedResponse {
96
96
  sessionId: string;
97
97
  snapshot: ViewerSnapshot;
98
98
  }
99
+ /** S3에 저장된 읽기 세션 기록 */
100
+ export interface ReadingSessionRecord {
101
+ sessionId: string;
102
+ userId: number;
103
+ userType: 'parent' | 'child';
104
+ userName: string;
105
+ familyId: number;
106
+ bookIdx: number;
107
+ bookTitle: string;
108
+ sectionId: string;
109
+ sectionTitle: string;
110
+ startedAt: string;
111
+ endedAt: string;
112
+ durationMs: number;
113
+ initialSnapshot?: ViewerSnapshot;
114
+ finalSnapshot?: ViewerSnapshot;
115
+ stats?: SessionStats;
116
+ /** 세션 동안의 모든 이벤트 (재생용, get 시에만 포함) */
117
+ events?: ViewerEvent[];
118
+ }
119
+ /** 읽기 세션 기록 목록 조회 요청 (Admin → Server) */
120
+ export interface ReadingSessionsListPayload {
121
+ familyId?: number;
122
+ userId?: number;
123
+ date?: string;
124
+ limit?: number;
125
+ offset?: number;
126
+ }
127
+ /** 읽기 세션 기록 목록 조회 결과 (Server → Admin) */
128
+ export interface ReadingSessionsListResultPayload {
129
+ sessions: ReadingSessionRecord[];
130
+ total: number;
131
+ hasMore: boolean;
132
+ }
133
+ /** 읽기 세션 기록 상세 조회 요청 (Admin → Server) */
134
+ export interface ReadingSessionGetPayload {
135
+ sessionId: string;
136
+ /** S3 key (목록 조회 시 제공됨) */
137
+ s3Key?: string;
138
+ }
139
+ /** 읽기 세션 기록 상세 조회 결과 (Server → Admin) */
140
+ export interface ReadingSessionGetResultPayload {
141
+ session: ReadingSessionRecord;
142
+ }
@@ -1,5 +1,5 @@
1
1
  import { ChatMessageReadRequest, ChatMessageRefreshRequest, MessageRequest } from "./socket-message.types";
2
- import { SessionStartPayload, SessionEndPayload, SessionProgressPayload, SessionEventPayload, SessionSubscribePayload } from "./reading-section.types";
2
+ import { SessionStartPayload, SessionEndPayload, SessionProgressPayload, SessionEventPayload, SessionSubscribePayload, ReadingSessionsListPayload, ReadingSessionGetPayload } from "./reading-section.types";
3
3
  import { RecordingStartPayload, RecordingStopPayload, RecordingListPayload, RecordingGetPayload, SegmentGetPayload, ChunksGetPayload } from "./recording.types";
4
4
  export interface ClientToServerEvents {
5
5
  'chat-message:send': (msg: MessageRequest) => void;
@@ -22,6 +22,10 @@ export interface ReadingAdminToServerEvents {
22
22
  'reading-section:list': () => void;
23
23
  'reading-section:subscribe': (payload: SessionSubscribePayload) => void;
24
24
  'reading-section:unsubscribe': (payload: SessionSubscribePayload) => void;
25
+ /** S3 읽기 세션 기록 목록 조회 */
26
+ 'reading-sessions:list': (payload: ReadingSessionsListPayload) => void;
27
+ /** S3 읽기 세션 기록 상세 조회 (이벤트 포함) */
28
+ 'reading-sessions:get': (payload: ReadingSessionGetPayload) => void;
25
29
  }
26
30
  /** 녹화 이벤트 (Admin/Parent → Server) - P2.2 Recording System */
27
31
  export interface RecordingAdminToServerEvents {
@@ -1,5 +1,5 @@
1
1
  import { MessageReadResponse, MessageResponse, NoticeMessageResult } from "./socket-message.types";
2
- import { ReadingSessionInfo, ViewerSnapshot } from "./reading-section.types";
2
+ import { ReadingSessionInfo, ViewerSnapshot, ReadingSessionsListResultPayload, ReadingSessionGetResultPayload } from "./reading-section.types";
3
3
  import { ViewerEvent } from "./viewer-events.types";
4
4
  import { ConnectedUser, ConnectedUsersGrouped } from "./connected-user.types";
5
5
  import { RecordingStartedPayload, RecordingStoppedPayload, RecordingChunkPayload, RecordingLiveEventsPayload, SegmentStartedPayload, SegmentEndedPayload, RecordingListResultPayload, RecordingManifestPayload, SegmentMetaPayload, ChunksResultPayload } from "./recording.types";
@@ -34,6 +34,10 @@ export interface ReadingServerToClientEvents {
34
34
  sessionId: string;
35
35
  snapshot: ViewerSnapshot | null;
36
36
  }) => void;
37
+ 'reading-section:progress': (payload: {
38
+ sessionId: string;
39
+ snapshot: ViewerSnapshot;
40
+ }) => void;
37
41
  'reading-section:events': (payload: {
38
42
  sessionId: string;
39
43
  events: ViewerEvent[];
@@ -41,6 +45,10 @@ export interface ReadingServerToClientEvents {
41
45
  'reading-section:error': (payload: {
42
46
  message: string;
43
47
  }) => void;
48
+ /** S3 읽기 세션 기록 목록 */
49
+ 'reading-sessions:list-result': (payload: ReadingSessionsListResultPayload) => void;
50
+ /** S3 읽기 세션 기록 상세 (이벤트 포함) */
51
+ 'reading-sessions:get-result': (payload: ReadingSessionGetResultPayload) => void;
44
52
  }
45
53
  /** 연결된 사용자 모니터링 이벤트 (Admin에게 전송) */
46
54
  export interface UserServerToClientEvents {
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "@readerseye2/cr_type",
3
- "version": "1.0.106",
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.108",
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
+ }