@readerseye2/cr_type 1.0.111 → 1.0.112
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/index.d.ts +1 -1
- package/dist/socket/index.js +1 -1
- package/dist/socket/reading-section.types.d.ts +1 -127
- package/dist/socket/reading-section.types.js +1 -1
- package/dist/socket/socket-clientToServerEvents.type.d.ts +35 -27
- package/dist/socket/socket-serverToClientEvents.type.d.ts +70 -40
- package/dist/socket/socket-serverToClientEvents.type.js +0 -1
- package/dist/socket/unified-session.types.d.ts +300 -0
- package/dist/socket/unified-session.types.js +22 -0
- package/package.json +27 -27
package/dist/book/book.const.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// ========== 리터럴 유니온 타입 ==========
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getAgeOptions = exports.getAgeRatingOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.PublishAgeRatingLabel = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
5
|
-
// ========== 라벨 (UI 표시용) ==========
|
|
6
|
-
exports.BookLanguageLabel = {
|
|
7
|
-
ko: '한국어',
|
|
8
|
-
en: 'English',
|
|
9
|
-
};
|
|
10
|
-
exports.BookLengthLabel = {
|
|
11
|
-
short: '단편',
|
|
12
|
-
medium: '중편',
|
|
13
|
-
long: '장편',
|
|
14
|
-
};
|
|
15
|
-
exports.BookGenreLabel = {
|
|
16
|
-
fiction: '문학',
|
|
17
|
-
'non-fiction': '비문학',
|
|
18
|
-
other: '기타',
|
|
19
|
-
};
|
|
20
|
-
exports.BookEnLevelLabel = {
|
|
21
|
-
story: '스토리',
|
|
22
|
-
readers: '리더스',
|
|
23
|
-
'early-chapter': '얼리챕터',
|
|
24
|
-
'middle-chapter': '미들챕터',
|
|
25
|
-
chapter: '챕터',
|
|
26
|
-
novel: '노블',
|
|
27
|
-
};
|
|
28
|
-
exports.PublishAgeRatingLabel = {
|
|
29
|
-
all: '전체이용가',
|
|
30
|
-
'12': '12세 이용가',
|
|
31
|
-
'15': '15세 이용가',
|
|
32
|
-
'19': '19세 이용가',
|
|
33
|
-
};
|
|
34
|
-
// ========== 상수 ==========
|
|
35
|
-
/** 권장 연령 범위 (5~19세) */
|
|
36
|
-
exports.BOOK_AGE_MIN = 5;
|
|
37
|
-
exports.BOOK_AGE_MAX = 19;
|
|
38
|
-
/** 새 책 생성 시 기본값 */
|
|
39
|
-
exports.DEFAULT_BOOK_META = {
|
|
40
|
-
title: '나의 책',
|
|
41
|
-
language: 'en',
|
|
42
|
-
age: 5,
|
|
43
|
-
length: 'short',
|
|
44
|
-
genre: 'fiction',
|
|
45
|
-
quiz_retry_allowed: true,
|
|
46
|
-
ar_index: 3.0,
|
|
47
|
-
lexile_index: 600,
|
|
48
|
-
};
|
|
49
|
-
// ========== AR / Lexile 지수 ==========
|
|
50
|
-
/** AR 지수 범위별 설명 (소수점 1자리 기준) */
|
|
51
|
-
exports.AR_INDEX_RANGES = [
|
|
52
|
-
{ min: 0.0, max: 1.9, level: '유아 ~ 초1', description: '그림책, 아주 짧은 문장' },
|
|
53
|
-
{ min: 2.0, max: 2.9, level: '초2', description: '기초 리더북' },
|
|
54
|
-
{ min: 3.0, max: 3.9, level: '초3', description: '챕터북 시작' },
|
|
55
|
-
{ min: 4.0, max: 4.9, level: '초4', description: '본격적인 이야기 구조' },
|
|
56
|
-
{ min: 5.0, max: 5.9, level: '초5', description: '어휘·문장 길이 증가' },
|
|
57
|
-
{ min: 6.0, max: 6.9, level: '초6', description: '논픽션 비중 증가' },
|
|
58
|
-
{ min: 7.0, max: 8.9, level: '중학생', description: '복합 문장, 추론 필요' },
|
|
59
|
-
{ min: 9.0, max: 10.9, level: '고등학생', description: '문학 작품, 추상 개념' },
|
|
60
|
-
{ min: 11.0, max: 12.0, level: '고급', description: '성인 소설·고전' },
|
|
61
|
-
];
|
|
62
|
-
/** Lexile 지수 범위별 설명 */
|
|
63
|
-
exports.LEXILE_INDEX_RANGES = [
|
|
64
|
-
{ min: 0, max: 200, level: '유아', description: '알파벳·기초 단어' },
|
|
65
|
-
{ min: 200, max: 400, level: '초1', description: '아주 쉬운 문장' },
|
|
66
|
-
{ min: 400, max: 600, level: '초2', description: '간단한 스토리' },
|
|
67
|
-
{ min: 600, max: 800, level: '초3', description: '챕터북' },
|
|
68
|
-
{ min: 800, max: 1000, level: '초4', description: '정보량 증가' },
|
|
69
|
-
{ min: 1000, max: 1200, level: '초5~6', description: '교과서 수준' },
|
|
70
|
-
{ min: 1200, max: 1400, level: '중학생', description: '추론·비판적 읽기' },
|
|
71
|
-
{ min: 1400, max: 1600, level: '고등학생', description: '문학·비문학 혼합' },
|
|
72
|
-
{ min: 1600, max: 2000, level: '성인', description: '학술·고전 문학' },
|
|
73
|
-
];
|
|
74
|
-
/** AR 지수로 해당 범위 설명 조회 */
|
|
75
|
-
const getARDescription = (ar) => exports.AR_INDEX_RANGES.find(r => ar >= r.min && ar <= r.max);
|
|
76
|
-
exports.getARDescription = getARDescription;
|
|
77
|
-
/** Lexile 지수로 해당 범위 설명 조회 */
|
|
78
|
-
const getLexileDescription = (lexile) => exports.LEXILE_INDEX_RANGES.find(r => lexile >= r.min && lexile <= r.max);
|
|
79
|
-
exports.getLexileDescription = getLexileDescription;
|
|
80
|
-
// ========== 헬퍼 함수 ==========
|
|
81
|
-
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
82
|
-
const calcSoundMinutes = (wordCount) => Math.ceil(wordCount / 200);
|
|
83
|
-
exports.calcSoundMinutes = calcSoundMinutes;
|
|
84
|
-
/** 언어 옵션 (UI Select용) */
|
|
85
|
-
const getLanguageOptions = () => Object.entries(exports.BookLanguageLabel).map(([value, label]) => ({
|
|
86
|
-
value: value,
|
|
87
|
-
label,
|
|
88
|
-
}));
|
|
89
|
-
exports.getLanguageOptions = getLanguageOptions;
|
|
90
|
-
/** 길이 옵션 (UI Select용) */
|
|
91
|
-
const getLengthOptions = () => Object.entries(exports.BookLengthLabel).map(([value, label]) => ({
|
|
92
|
-
value: value,
|
|
93
|
-
label,
|
|
94
|
-
}));
|
|
95
|
-
exports.getLengthOptions = getLengthOptions;
|
|
96
|
-
/** 장르 옵션 (UI Select용) */
|
|
97
|
-
const getGenreOptions = () => Object.entries(exports.BookGenreLabel).map(([value, label]) => ({
|
|
98
|
-
value: value,
|
|
99
|
-
label,
|
|
100
|
-
}));
|
|
101
|
-
exports.getGenreOptions = getGenreOptions;
|
|
102
|
-
/** 영어레벨 옵션 (UI Select용) */
|
|
103
|
-
const getEnLevelOptions = () => Object.entries(exports.BookEnLevelLabel).map(([value, label]) => ({
|
|
104
|
-
value: value,
|
|
105
|
-
label,
|
|
106
|
-
}));
|
|
107
|
-
exports.getEnLevelOptions = getEnLevelOptions;
|
|
108
|
-
/** 출판 연령등급 옵션 (UI Select용) */
|
|
109
|
-
const getAgeRatingOptions = () => Object.entries(exports.PublishAgeRatingLabel).map(([value, label]) => ({
|
|
110
|
-
value: value,
|
|
111
|
-
label,
|
|
112
|
-
}));
|
|
113
|
-
exports.getAgeRatingOptions = getAgeRatingOptions;
|
|
114
|
-
/** 권장 연령 옵션 (5~19세) */
|
|
115
|
-
const getAgeOptions = () => Array.from({ length: exports.BOOK_AGE_MAX - exports.BOOK_AGE_MIN + 1 }, (_, i) => ({
|
|
116
|
-
value: exports.BOOK_AGE_MIN + i,
|
|
117
|
-
label: `만 ${exports.BOOK_AGE_MIN + i}세`,
|
|
118
|
-
}));
|
|
119
|
-
exports.getAgeOptions = getAgeOptions;
|
|
1
|
+
"use strict";
|
|
2
|
+
// ========== 리터럴 유니온 타입 ==========
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getAgeOptions = exports.getAgeRatingOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.PublishAgeRatingLabel = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
5
|
+
// ========== 라벨 (UI 표시용) ==========
|
|
6
|
+
exports.BookLanguageLabel = {
|
|
7
|
+
ko: '한국어',
|
|
8
|
+
en: 'English',
|
|
9
|
+
};
|
|
10
|
+
exports.BookLengthLabel = {
|
|
11
|
+
short: '단편',
|
|
12
|
+
medium: '중편',
|
|
13
|
+
long: '장편',
|
|
14
|
+
};
|
|
15
|
+
exports.BookGenreLabel = {
|
|
16
|
+
fiction: '문학',
|
|
17
|
+
'non-fiction': '비문학',
|
|
18
|
+
other: '기타',
|
|
19
|
+
};
|
|
20
|
+
exports.BookEnLevelLabel = {
|
|
21
|
+
story: '스토리',
|
|
22
|
+
readers: '리더스',
|
|
23
|
+
'early-chapter': '얼리챕터',
|
|
24
|
+
'middle-chapter': '미들챕터',
|
|
25
|
+
chapter: '챕터',
|
|
26
|
+
novel: '노블',
|
|
27
|
+
};
|
|
28
|
+
exports.PublishAgeRatingLabel = {
|
|
29
|
+
all: '전체이용가',
|
|
30
|
+
'12': '12세 이용가',
|
|
31
|
+
'15': '15세 이용가',
|
|
32
|
+
'19': '19세 이용가',
|
|
33
|
+
};
|
|
34
|
+
// ========== 상수 ==========
|
|
35
|
+
/** 권장 연령 범위 (5~19세) */
|
|
36
|
+
exports.BOOK_AGE_MIN = 5;
|
|
37
|
+
exports.BOOK_AGE_MAX = 19;
|
|
38
|
+
/** 새 책 생성 시 기본값 */
|
|
39
|
+
exports.DEFAULT_BOOK_META = {
|
|
40
|
+
title: '나의 책',
|
|
41
|
+
language: 'en',
|
|
42
|
+
age: 5,
|
|
43
|
+
length: 'short',
|
|
44
|
+
genre: 'fiction',
|
|
45
|
+
quiz_retry_allowed: true,
|
|
46
|
+
ar_index: 3.0,
|
|
47
|
+
lexile_index: 600,
|
|
48
|
+
};
|
|
49
|
+
// ========== AR / Lexile 지수 ==========
|
|
50
|
+
/** AR 지수 범위별 설명 (소수점 1자리 기준) */
|
|
51
|
+
exports.AR_INDEX_RANGES = [
|
|
52
|
+
{ min: 0.0, max: 1.9, level: '유아 ~ 초1', description: '그림책, 아주 짧은 문장' },
|
|
53
|
+
{ min: 2.0, max: 2.9, level: '초2', description: '기초 리더북' },
|
|
54
|
+
{ min: 3.0, max: 3.9, level: '초3', description: '챕터북 시작' },
|
|
55
|
+
{ min: 4.0, max: 4.9, level: '초4', description: '본격적인 이야기 구조' },
|
|
56
|
+
{ min: 5.0, max: 5.9, level: '초5', description: '어휘·문장 길이 증가' },
|
|
57
|
+
{ min: 6.0, max: 6.9, level: '초6', description: '논픽션 비중 증가' },
|
|
58
|
+
{ min: 7.0, max: 8.9, level: '중학생', description: '복합 문장, 추론 필요' },
|
|
59
|
+
{ min: 9.0, max: 10.9, level: '고등학생', description: '문학 작품, 추상 개념' },
|
|
60
|
+
{ min: 11.0, max: 12.0, level: '고급', description: '성인 소설·고전' },
|
|
61
|
+
];
|
|
62
|
+
/** Lexile 지수 범위별 설명 */
|
|
63
|
+
exports.LEXILE_INDEX_RANGES = [
|
|
64
|
+
{ min: 0, max: 200, level: '유아', description: '알파벳·기초 단어' },
|
|
65
|
+
{ min: 200, max: 400, level: '초1', description: '아주 쉬운 문장' },
|
|
66
|
+
{ min: 400, max: 600, level: '초2', description: '간단한 스토리' },
|
|
67
|
+
{ min: 600, max: 800, level: '초3', description: '챕터북' },
|
|
68
|
+
{ min: 800, max: 1000, level: '초4', description: '정보량 증가' },
|
|
69
|
+
{ min: 1000, max: 1200, level: '초5~6', description: '교과서 수준' },
|
|
70
|
+
{ min: 1200, max: 1400, level: '중학생', description: '추론·비판적 읽기' },
|
|
71
|
+
{ min: 1400, max: 1600, level: '고등학생', description: '문학·비문학 혼합' },
|
|
72
|
+
{ min: 1600, max: 2000, level: '성인', description: '학술·고전 문학' },
|
|
73
|
+
];
|
|
74
|
+
/** AR 지수로 해당 범위 설명 조회 */
|
|
75
|
+
const getARDescription = (ar) => exports.AR_INDEX_RANGES.find(r => ar >= r.min && ar <= r.max);
|
|
76
|
+
exports.getARDescription = getARDescription;
|
|
77
|
+
/** Lexile 지수로 해당 범위 설명 조회 */
|
|
78
|
+
const getLexileDescription = (lexile) => exports.LEXILE_INDEX_RANGES.find(r => lexile >= r.min && lexile <= r.max);
|
|
79
|
+
exports.getLexileDescription = getLexileDescription;
|
|
80
|
+
// ========== 헬퍼 함수 ==========
|
|
81
|
+
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
82
|
+
const calcSoundMinutes = (wordCount) => Math.ceil(wordCount / 200);
|
|
83
|
+
exports.calcSoundMinutes = calcSoundMinutes;
|
|
84
|
+
/** 언어 옵션 (UI Select용) */
|
|
85
|
+
const getLanguageOptions = () => Object.entries(exports.BookLanguageLabel).map(([value, label]) => ({
|
|
86
|
+
value: value,
|
|
87
|
+
label,
|
|
88
|
+
}));
|
|
89
|
+
exports.getLanguageOptions = getLanguageOptions;
|
|
90
|
+
/** 길이 옵션 (UI Select용) */
|
|
91
|
+
const getLengthOptions = () => Object.entries(exports.BookLengthLabel).map(([value, label]) => ({
|
|
92
|
+
value: value,
|
|
93
|
+
label,
|
|
94
|
+
}));
|
|
95
|
+
exports.getLengthOptions = getLengthOptions;
|
|
96
|
+
/** 장르 옵션 (UI Select용) */
|
|
97
|
+
const getGenreOptions = () => Object.entries(exports.BookGenreLabel).map(([value, label]) => ({
|
|
98
|
+
value: value,
|
|
99
|
+
label,
|
|
100
|
+
}));
|
|
101
|
+
exports.getGenreOptions = getGenreOptions;
|
|
102
|
+
/** 영어레벨 옵션 (UI Select용) */
|
|
103
|
+
const getEnLevelOptions = () => Object.entries(exports.BookEnLevelLabel).map(([value, label]) => ({
|
|
104
|
+
value: value,
|
|
105
|
+
label,
|
|
106
|
+
}));
|
|
107
|
+
exports.getEnLevelOptions = getEnLevelOptions;
|
|
108
|
+
/** 출판 연령등급 옵션 (UI Select용) */
|
|
109
|
+
const getAgeRatingOptions = () => Object.entries(exports.PublishAgeRatingLabel).map(([value, label]) => ({
|
|
110
|
+
value: value,
|
|
111
|
+
label,
|
|
112
|
+
}));
|
|
113
|
+
exports.getAgeRatingOptions = getAgeRatingOptions;
|
|
114
|
+
/** 권장 연령 옵션 (5~19세) */
|
|
115
|
+
const getAgeOptions = () => Array.from({ length: exports.BOOK_AGE_MAX - exports.BOOK_AGE_MIN + 1 }, (_, i) => ({
|
|
116
|
+
value: exports.BOOK_AGE_MIN + i,
|
|
117
|
+
label: `만 ${exports.BOOK_AGE_MIN + i}세`,
|
|
118
|
+
}));
|
|
119
|
+
exports.getAgeOptions = getAgeOptions;
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Legacy 타입 — 신규 코드에서 사용 금지
|
|
3
|
-
* Book 통합 리팩토링 전 타입 백업 (2026-02-02)
|
|
4
|
-
* 신규: Book (book.type.ts), BookDTO (book-api.type.ts), MakeBookState (store.types.ts)
|
|
5
|
-
*/
|
|
6
|
-
import type { BookLanguage, BookLength, BookGenre, BookEnLevel, PublishAgeRating, SectionSummary, SectionSummaryResponse } from './book.type';
|
|
7
|
-
import type { SectionData, SectionId } from '../ast/ast.types';
|
|
8
|
-
/** @deprecated BookLanguage 사용 권장 */
|
|
9
|
-
export declare enum BookLanguageCode {
|
|
10
|
-
KO = "ko",
|
|
11
|
-
EN = "en"
|
|
12
|
-
}
|
|
13
|
-
/** @deprecated BookGenre type 사용 권장 */
|
|
14
|
-
export declare enum BookGenreEnum {
|
|
15
|
-
FICTION = "fiction",
|
|
16
|
-
NON_FICTION = "non-fiction",
|
|
17
|
-
FAIRY_TALE = "fairy-tale",
|
|
18
|
-
EDUCATIONAL = "educational",
|
|
19
|
-
SCIENCE = "science",
|
|
20
|
-
HISTORY = "history",
|
|
21
|
-
BIOGRAPHY = "biography",
|
|
22
|
-
POETRY = "poetry",
|
|
23
|
-
OTHER = "other"
|
|
24
|
-
}
|
|
25
|
-
/** @deprecated PublishAgeRating 사용 권장 */
|
|
26
|
-
export declare enum BookAgeGrade {
|
|
27
|
-
ALL = "all",
|
|
28
|
-
AGE_7 = "7+",
|
|
29
|
-
AGE_12 = "12+",
|
|
30
|
-
AGE_15 = "15+",
|
|
31
|
-
AGE_19 = "19+"
|
|
32
|
-
}
|
|
33
|
-
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
34
|
-
export declare const BOOK_LEVEL_MIN = 5;
|
|
35
|
-
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
36
|
-
export declare const BOOK_LEVEL_MAX = 19;
|
|
37
|
-
/** @deprecated Book 인터페이스 사용 권장 */
|
|
38
|
-
export interface DraftBookMeta {
|
|
39
|
-
draft_book_idx: number;
|
|
40
|
-
title: string;
|
|
41
|
-
language: BookLanguage;
|
|
42
|
-
age: number;
|
|
43
|
-
length: BookLength;
|
|
44
|
-
genre?: BookGenre;
|
|
45
|
-
quiz_retry_allowed?: boolean;
|
|
46
|
-
ar_index?: number;
|
|
47
|
-
lexile_index?: number;
|
|
48
|
-
series?: string;
|
|
49
|
-
cover_url?: string;
|
|
50
|
-
en_level?: BookEnLevel;
|
|
51
|
-
tags?: string[];
|
|
52
|
-
description?: string;
|
|
53
|
-
original_author?: string;
|
|
54
|
-
original_publish_date?: string;
|
|
55
|
-
original_publisher?: string;
|
|
56
|
-
isbn?: string;
|
|
57
|
-
updated_at: string;
|
|
58
|
-
}
|
|
59
|
-
/** @deprecated Book 인터페이스 사용 권장 */
|
|
60
|
-
export interface BookMeta extends DraftBookMeta {
|
|
61
|
-
book_idx: number;
|
|
62
|
-
source_draft_book_idx: number;
|
|
63
|
-
creator_idx: number;
|
|
64
|
-
creator_name?: string;
|
|
65
|
-
price_point: number;
|
|
66
|
-
age_rating: PublishAgeRating;
|
|
67
|
-
free_section_arr?: number[];
|
|
68
|
-
word_count?: number;
|
|
69
|
-
sound_minutes?: number;
|
|
70
|
-
section_count?: number;
|
|
71
|
-
published_at: string;
|
|
72
|
-
}
|
|
73
|
-
/** @deprecated BookListItem 사용 권장 */
|
|
74
|
-
export interface BookShort {
|
|
75
|
-
id: string;
|
|
76
|
-
title: string;
|
|
77
|
-
author: string;
|
|
78
|
-
coverUrl: string;
|
|
79
|
-
language: BookLanguageCode;
|
|
80
|
-
level: number;
|
|
81
|
-
genre: string;
|
|
82
|
-
wordCount?: number;
|
|
83
|
-
soundMinutes?: number;
|
|
84
|
-
rating?: number;
|
|
85
|
-
}
|
|
86
|
-
/** @deprecated BookDTO 사용 권장 */
|
|
87
|
-
export interface BookDetail extends BookShort {
|
|
88
|
-
description?: string;
|
|
89
|
-
tags?: string[];
|
|
90
|
-
ageGrade?: BookAgeGrade;
|
|
91
|
-
isbn?: string;
|
|
92
|
-
originalPublisher?: string;
|
|
93
|
-
originalPublishDate?: string;
|
|
94
|
-
edition?: string;
|
|
95
|
-
quizRetryAllowed?: boolean;
|
|
96
|
-
toc?: string[];
|
|
97
|
-
rating?: number;
|
|
98
|
-
publishedAtText?: string;
|
|
99
|
-
priceText?: string;
|
|
100
|
-
sections?: SectionSummary[];
|
|
101
|
-
sectionOrder?: string[];
|
|
102
|
-
}
|
|
103
|
-
/** @deprecated Book 인터페이스 사용 권장 (draft_book_ prefix 제거됨) */
|
|
104
|
-
export interface DraftBookResponse {
|
|
105
|
-
draft_book_idx: number;
|
|
106
|
-
draft_book_title: string;
|
|
107
|
-
draft_book_language: BookLanguageCode;
|
|
108
|
-
draft_book_level: number;
|
|
109
|
-
draft_book_cover_url: string | null;
|
|
110
|
-
draft_book_create_date?: string;
|
|
111
|
-
draft_book_update_date: string;
|
|
112
|
-
draft_book_author?: string | null;
|
|
113
|
-
draft_book_age_grade?: BookAgeGrade | null;
|
|
114
|
-
draft_book_genre?: string | null;
|
|
115
|
-
draft_book_tags?: string[] | null;
|
|
116
|
-
draft_book_description?: string | null;
|
|
117
|
-
draft_book_original_publish_date?: string | null;
|
|
118
|
-
draft_book_original_publisher?: string | null;
|
|
119
|
-
draft_book_edition?: string | null;
|
|
120
|
-
draft_book_isbn?: string | null;
|
|
121
|
-
draft_book_word_count?: number | null;
|
|
122
|
-
draft_book_sound_minutes?: number | null;
|
|
123
|
-
draft_book_quiz_retry_allowed?: boolean;
|
|
124
|
-
draft_book_ar_index?: number | null;
|
|
125
|
-
draft_book_lexile_index?: number | null;
|
|
126
|
-
draft_book_sections?: SectionSummaryResponse[];
|
|
127
|
-
draft_book_section_order?: string[];
|
|
128
|
-
}
|
|
129
|
-
/** @deprecated Book 인터페이스 사용 권장 */
|
|
130
|
-
export interface DraftMeta {
|
|
131
|
-
draft_book_idx: number;
|
|
132
|
-
draft_book_title: string;
|
|
133
|
-
draft_book_language: 'ko' | 'en';
|
|
134
|
-
draft_book_level: number;
|
|
135
|
-
draft_book_cover_url: string | null;
|
|
136
|
-
draft_book_length: string | null;
|
|
137
|
-
draft_book_genre: string | null;
|
|
138
|
-
draft_book_en_level: string | null;
|
|
139
|
-
draft_book_series: string | null;
|
|
140
|
-
draft_book_author: string | null;
|
|
141
|
-
draft_book_tags: string[] | null;
|
|
142
|
-
draft_book_description: string | null;
|
|
143
|
-
draft_book_original_publish_date: string | null;
|
|
144
|
-
draft_book_original_publisher: string | null;
|
|
145
|
-
draft_book_isbn: string | null;
|
|
146
|
-
draft_book_word_count: number | null;
|
|
147
|
-
draft_book_ar_index: number | null;
|
|
148
|
-
draft_book_lexile_index: number | null;
|
|
149
|
-
draft_book_quiz_retry_allowed: boolean;
|
|
150
|
-
draft_book_create_date: string;
|
|
151
|
-
draft_book_update_date: string;
|
|
152
|
-
draft_book_publish_status?: 'draft' | 'pending' | 'rejected';
|
|
153
|
-
}
|
|
154
|
-
/** @deprecated BookDTO 사용 권장 */
|
|
155
|
-
export type DraftSummary = {
|
|
156
|
-
sectionOrder: SectionId[];
|
|
157
|
-
sections?: SectionSummary[];
|
|
158
|
-
};
|
|
159
|
-
/** @deprecated BookDTO 사용 권장 */
|
|
160
|
-
export type BookDraftDTO = {
|
|
161
|
-
meta: DraftMeta;
|
|
162
|
-
summary: DraftSummary;
|
|
163
|
-
content: SectionData[];
|
|
164
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Legacy 타입 — 신규 코드에서 사용 금지
|
|
3
|
+
* Book 통합 리팩토링 전 타입 백업 (2026-02-02)
|
|
4
|
+
* 신규: Book (book.type.ts), BookDTO (book-api.type.ts), MakeBookState (store.types.ts)
|
|
5
|
+
*/
|
|
6
|
+
import type { BookLanguage, BookLength, BookGenre, BookEnLevel, PublishAgeRating, SectionSummary, SectionSummaryResponse } from './book.type';
|
|
7
|
+
import type { SectionData, SectionId } from '../ast/ast.types';
|
|
8
|
+
/** @deprecated BookLanguage 사용 권장 */
|
|
9
|
+
export declare enum BookLanguageCode {
|
|
10
|
+
KO = "ko",
|
|
11
|
+
EN = "en"
|
|
12
|
+
}
|
|
13
|
+
/** @deprecated BookGenre type 사용 권장 */
|
|
14
|
+
export declare enum BookGenreEnum {
|
|
15
|
+
FICTION = "fiction",
|
|
16
|
+
NON_FICTION = "non-fiction",
|
|
17
|
+
FAIRY_TALE = "fairy-tale",
|
|
18
|
+
EDUCATIONAL = "educational",
|
|
19
|
+
SCIENCE = "science",
|
|
20
|
+
HISTORY = "history",
|
|
21
|
+
BIOGRAPHY = "biography",
|
|
22
|
+
POETRY = "poetry",
|
|
23
|
+
OTHER = "other"
|
|
24
|
+
}
|
|
25
|
+
/** @deprecated PublishAgeRating 사용 권장 */
|
|
26
|
+
export declare enum BookAgeGrade {
|
|
27
|
+
ALL = "all",
|
|
28
|
+
AGE_7 = "7+",
|
|
29
|
+
AGE_12 = "12+",
|
|
30
|
+
AGE_15 = "15+",
|
|
31
|
+
AGE_19 = "19+"
|
|
32
|
+
}
|
|
33
|
+
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
34
|
+
export declare const BOOK_LEVEL_MIN = 5;
|
|
35
|
+
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
36
|
+
export declare const BOOK_LEVEL_MAX = 19;
|
|
37
|
+
/** @deprecated Book 인터페이스 사용 권장 */
|
|
38
|
+
export interface DraftBookMeta {
|
|
39
|
+
draft_book_idx: number;
|
|
40
|
+
title: string;
|
|
41
|
+
language: BookLanguage;
|
|
42
|
+
age: number;
|
|
43
|
+
length: BookLength;
|
|
44
|
+
genre?: BookGenre;
|
|
45
|
+
quiz_retry_allowed?: boolean;
|
|
46
|
+
ar_index?: number;
|
|
47
|
+
lexile_index?: number;
|
|
48
|
+
series?: string;
|
|
49
|
+
cover_url?: string;
|
|
50
|
+
en_level?: BookEnLevel;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
description?: string;
|
|
53
|
+
original_author?: string;
|
|
54
|
+
original_publish_date?: string;
|
|
55
|
+
original_publisher?: string;
|
|
56
|
+
isbn?: string;
|
|
57
|
+
updated_at: string;
|
|
58
|
+
}
|
|
59
|
+
/** @deprecated Book 인터페이스 사용 권장 */
|
|
60
|
+
export interface BookMeta extends DraftBookMeta {
|
|
61
|
+
book_idx: number;
|
|
62
|
+
source_draft_book_idx: number;
|
|
63
|
+
creator_idx: number;
|
|
64
|
+
creator_name?: string;
|
|
65
|
+
price_point: number;
|
|
66
|
+
age_rating: PublishAgeRating;
|
|
67
|
+
free_section_arr?: number[];
|
|
68
|
+
word_count?: number;
|
|
69
|
+
sound_minutes?: number;
|
|
70
|
+
section_count?: number;
|
|
71
|
+
published_at: string;
|
|
72
|
+
}
|
|
73
|
+
/** @deprecated BookListItem 사용 권장 */
|
|
74
|
+
export interface BookShort {
|
|
75
|
+
id: string;
|
|
76
|
+
title: string;
|
|
77
|
+
author: string;
|
|
78
|
+
coverUrl: string;
|
|
79
|
+
language: BookLanguageCode;
|
|
80
|
+
level: number;
|
|
81
|
+
genre: string;
|
|
82
|
+
wordCount?: number;
|
|
83
|
+
soundMinutes?: number;
|
|
84
|
+
rating?: number;
|
|
85
|
+
}
|
|
86
|
+
/** @deprecated BookDTO 사용 권장 */
|
|
87
|
+
export interface BookDetail extends BookShort {
|
|
88
|
+
description?: string;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
ageGrade?: BookAgeGrade;
|
|
91
|
+
isbn?: string;
|
|
92
|
+
originalPublisher?: string;
|
|
93
|
+
originalPublishDate?: string;
|
|
94
|
+
edition?: string;
|
|
95
|
+
quizRetryAllowed?: boolean;
|
|
96
|
+
toc?: string[];
|
|
97
|
+
rating?: number;
|
|
98
|
+
publishedAtText?: string;
|
|
99
|
+
priceText?: string;
|
|
100
|
+
sections?: SectionSummary[];
|
|
101
|
+
sectionOrder?: string[];
|
|
102
|
+
}
|
|
103
|
+
/** @deprecated Book 인터페이스 사용 권장 (draft_book_ prefix 제거됨) */
|
|
104
|
+
export interface DraftBookResponse {
|
|
105
|
+
draft_book_idx: number;
|
|
106
|
+
draft_book_title: string;
|
|
107
|
+
draft_book_language: BookLanguageCode;
|
|
108
|
+
draft_book_level: number;
|
|
109
|
+
draft_book_cover_url: string | null;
|
|
110
|
+
draft_book_create_date?: string;
|
|
111
|
+
draft_book_update_date: string;
|
|
112
|
+
draft_book_author?: string | null;
|
|
113
|
+
draft_book_age_grade?: BookAgeGrade | null;
|
|
114
|
+
draft_book_genre?: string | null;
|
|
115
|
+
draft_book_tags?: string[] | null;
|
|
116
|
+
draft_book_description?: string | null;
|
|
117
|
+
draft_book_original_publish_date?: string | null;
|
|
118
|
+
draft_book_original_publisher?: string | null;
|
|
119
|
+
draft_book_edition?: string | null;
|
|
120
|
+
draft_book_isbn?: string | null;
|
|
121
|
+
draft_book_word_count?: number | null;
|
|
122
|
+
draft_book_sound_minutes?: number | null;
|
|
123
|
+
draft_book_quiz_retry_allowed?: boolean;
|
|
124
|
+
draft_book_ar_index?: number | null;
|
|
125
|
+
draft_book_lexile_index?: number | null;
|
|
126
|
+
draft_book_sections?: SectionSummaryResponse[];
|
|
127
|
+
draft_book_section_order?: string[];
|
|
128
|
+
}
|
|
129
|
+
/** @deprecated Book 인터페이스 사용 권장 */
|
|
130
|
+
export interface DraftMeta {
|
|
131
|
+
draft_book_idx: number;
|
|
132
|
+
draft_book_title: string;
|
|
133
|
+
draft_book_language: 'ko' | 'en';
|
|
134
|
+
draft_book_level: number;
|
|
135
|
+
draft_book_cover_url: string | null;
|
|
136
|
+
draft_book_length: string | null;
|
|
137
|
+
draft_book_genre: string | null;
|
|
138
|
+
draft_book_en_level: string | null;
|
|
139
|
+
draft_book_series: string | null;
|
|
140
|
+
draft_book_author: string | null;
|
|
141
|
+
draft_book_tags: string[] | null;
|
|
142
|
+
draft_book_description: string | null;
|
|
143
|
+
draft_book_original_publish_date: string | null;
|
|
144
|
+
draft_book_original_publisher: string | null;
|
|
145
|
+
draft_book_isbn: string | null;
|
|
146
|
+
draft_book_word_count: number | null;
|
|
147
|
+
draft_book_ar_index: number | null;
|
|
148
|
+
draft_book_lexile_index: number | null;
|
|
149
|
+
draft_book_quiz_retry_allowed: boolean;
|
|
150
|
+
draft_book_create_date: string;
|
|
151
|
+
draft_book_update_date: string;
|
|
152
|
+
draft_book_publish_status?: 'draft' | 'pending' | 'rejected';
|
|
153
|
+
}
|
|
154
|
+
/** @deprecated BookDTO 사용 권장 */
|
|
155
|
+
export type DraftSummary = {
|
|
156
|
+
sectionOrder: SectionId[];
|
|
157
|
+
sections?: SectionSummary[];
|
|
158
|
+
};
|
|
159
|
+
/** @deprecated BookDTO 사용 권장 */
|
|
160
|
+
export type BookDraftDTO = {
|
|
161
|
+
meta: DraftMeta;
|
|
162
|
+
summary: DraftSummary;
|
|
163
|
+
content: SectionData[];
|
|
164
|
+
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Legacy 타입 — 신규 코드에서 사용 금지
|
|
4
|
-
* Book 통합 리팩토링 전 타입 백업 (2026-02-02)
|
|
5
|
-
* 신규: Book (book.type.ts), BookDTO (book-api.type.ts), MakeBookState (store.types.ts)
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.BOOK_LEVEL_MAX = exports.BOOK_LEVEL_MIN = exports.BookAgeGrade = exports.BookGenreEnum = exports.BookLanguageCode = void 0;
|
|
9
|
-
// ========== deprecated enums ==========
|
|
10
|
-
/** @deprecated BookLanguage 사용 권장 */
|
|
11
|
-
var BookLanguageCode;
|
|
12
|
-
(function (BookLanguageCode) {
|
|
13
|
-
BookLanguageCode["KO"] = "ko";
|
|
14
|
-
BookLanguageCode["EN"] = "en";
|
|
15
|
-
})(BookLanguageCode || (exports.BookLanguageCode = BookLanguageCode = {}));
|
|
16
|
-
/** @deprecated BookGenre type 사용 권장 */
|
|
17
|
-
var BookGenreEnum;
|
|
18
|
-
(function (BookGenreEnum) {
|
|
19
|
-
BookGenreEnum["FICTION"] = "fiction";
|
|
20
|
-
BookGenreEnum["NON_FICTION"] = "non-fiction";
|
|
21
|
-
BookGenreEnum["FAIRY_TALE"] = "fairy-tale";
|
|
22
|
-
BookGenreEnum["EDUCATIONAL"] = "educational";
|
|
23
|
-
BookGenreEnum["SCIENCE"] = "science";
|
|
24
|
-
BookGenreEnum["HISTORY"] = "history";
|
|
25
|
-
BookGenreEnum["BIOGRAPHY"] = "biography";
|
|
26
|
-
BookGenreEnum["POETRY"] = "poetry";
|
|
27
|
-
BookGenreEnum["OTHER"] = "other";
|
|
28
|
-
})(BookGenreEnum || (exports.BookGenreEnum = BookGenreEnum = {}));
|
|
29
|
-
/** @deprecated PublishAgeRating 사용 권장 */
|
|
30
|
-
var BookAgeGrade;
|
|
31
|
-
(function (BookAgeGrade) {
|
|
32
|
-
BookAgeGrade["ALL"] = "all";
|
|
33
|
-
BookAgeGrade["AGE_7"] = "7+";
|
|
34
|
-
BookAgeGrade["AGE_12"] = "12+";
|
|
35
|
-
BookAgeGrade["AGE_15"] = "15+";
|
|
36
|
-
BookAgeGrade["AGE_19"] = "19+";
|
|
37
|
-
})(BookAgeGrade || (exports.BookAgeGrade = BookAgeGrade = {}));
|
|
38
|
-
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
39
|
-
exports.BOOK_LEVEL_MIN = 5;
|
|
40
|
-
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
41
|
-
exports.BOOK_LEVEL_MAX = 19;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Legacy 타입 — 신규 코드에서 사용 금지
|
|
4
|
+
* Book 통합 리팩토링 전 타입 백업 (2026-02-02)
|
|
5
|
+
* 신규: Book (book.type.ts), BookDTO (book-api.type.ts), MakeBookState (store.types.ts)
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.BOOK_LEVEL_MAX = exports.BOOK_LEVEL_MIN = exports.BookAgeGrade = exports.BookGenreEnum = exports.BookLanguageCode = void 0;
|
|
9
|
+
// ========== deprecated enums ==========
|
|
10
|
+
/** @deprecated BookLanguage 사용 권장 */
|
|
11
|
+
var BookLanguageCode;
|
|
12
|
+
(function (BookLanguageCode) {
|
|
13
|
+
BookLanguageCode["KO"] = "ko";
|
|
14
|
+
BookLanguageCode["EN"] = "en";
|
|
15
|
+
})(BookLanguageCode || (exports.BookLanguageCode = BookLanguageCode = {}));
|
|
16
|
+
/** @deprecated BookGenre type 사용 권장 */
|
|
17
|
+
var BookGenreEnum;
|
|
18
|
+
(function (BookGenreEnum) {
|
|
19
|
+
BookGenreEnum["FICTION"] = "fiction";
|
|
20
|
+
BookGenreEnum["NON_FICTION"] = "non-fiction";
|
|
21
|
+
BookGenreEnum["FAIRY_TALE"] = "fairy-tale";
|
|
22
|
+
BookGenreEnum["EDUCATIONAL"] = "educational";
|
|
23
|
+
BookGenreEnum["SCIENCE"] = "science";
|
|
24
|
+
BookGenreEnum["HISTORY"] = "history";
|
|
25
|
+
BookGenreEnum["BIOGRAPHY"] = "biography";
|
|
26
|
+
BookGenreEnum["POETRY"] = "poetry";
|
|
27
|
+
BookGenreEnum["OTHER"] = "other";
|
|
28
|
+
})(BookGenreEnum || (exports.BookGenreEnum = BookGenreEnum = {}));
|
|
29
|
+
/** @deprecated PublishAgeRating 사용 권장 */
|
|
30
|
+
var BookAgeGrade;
|
|
31
|
+
(function (BookAgeGrade) {
|
|
32
|
+
BookAgeGrade["ALL"] = "all";
|
|
33
|
+
BookAgeGrade["AGE_7"] = "7+";
|
|
34
|
+
BookAgeGrade["AGE_12"] = "12+";
|
|
35
|
+
BookAgeGrade["AGE_15"] = "15+";
|
|
36
|
+
BookAgeGrade["AGE_19"] = "19+";
|
|
37
|
+
})(BookAgeGrade || (exports.BookAgeGrade = BookAgeGrade = {}));
|
|
38
|
+
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
39
|
+
exports.BOOK_LEVEL_MIN = 5;
|
|
40
|
+
/** @deprecated BOOK_AGE_MIN/MAX 사용 권장 */
|
|
41
|
+
exports.BOOK_LEVEL_MAX = 19;
|
package/dist/socket/index.d.ts
CHANGED