revdev 0.371.0 → 0.372.0
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/lib/back/item/request.d.ts +3 -15
- package/lib/back/rule/entity.d.ts +2 -1
- package/lib/back/ruleCategory/entity.d.ts +1 -0
- package/lib/back/ruleCategory/request.d.ts +1 -0
- package/lib/common/enums.d.ts +1 -0
- package/lib/common/enums.js +2 -0
- package/lib/common/options.d.ts +4 -0
- package/lib/front/exercise/entity.d.ts +36 -9
- package/lib/front/exercise/request.d.ts +8 -0
- package/lib/shared/item/request.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1,26 +1,14 @@
|
|
|
1
|
+
import { ExerciseKind } from "../../common";
|
|
1
2
|
import { FeedRequest } from "../../feed";
|
|
2
3
|
export interface BoItemFeedRequest extends FeedRequest {
|
|
3
4
|
exerciseId?: string;
|
|
4
5
|
}
|
|
5
|
-
export interface BoGenerateItemChoiceRequest {
|
|
6
|
-
count: number;
|
|
7
|
-
exerciseId: string;
|
|
8
|
-
altRuleIds: string[];
|
|
9
|
-
answerTotal?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface BoCreateItemChoiceSetRequest {
|
|
12
|
-
exerciseId: string;
|
|
13
|
-
items: {
|
|
14
|
-
content: string;
|
|
15
|
-
answers: string[];
|
|
16
|
-
correctAnswerIndex: number;
|
|
17
|
-
ruleId?: string;
|
|
18
|
-
}[];
|
|
19
|
-
}
|
|
20
6
|
export interface BoUpdateItemRegularRequest {
|
|
21
7
|
id: string;
|
|
22
8
|
content: string;
|
|
9
|
+
tip: string;
|
|
23
10
|
}
|
|
24
11
|
export interface BoItemRegularModifier extends BoUpdateItemRegularRequest {
|
|
25
12
|
answerTotal: number;
|
|
13
|
+
exerciseKind: ExerciseKind;
|
|
26
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntryStatus, LevelGen, NameGen, SelectOption } from "../../common";
|
|
1
|
+
import { EntryStatus, ExerciseKind, LevelGen, NameGen, SelectOption } from "../../common";
|
|
2
2
|
export interface BoRuleRecord {
|
|
3
3
|
id: string;
|
|
4
4
|
langCode: string;
|
|
@@ -20,4 +20,5 @@ export interface BoRuleExerciseGenerator {
|
|
|
20
20
|
category?: NameGen;
|
|
21
21
|
ignoreRuleIds: string[];
|
|
22
22
|
altRuleOptions: SelectOption[];
|
|
23
|
+
allowedKinds: ExerciseKind[];
|
|
23
24
|
}
|
package/lib/common/enums.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ export declare enum AiPromptName {
|
|
|
123
123
|
WordTranscription = "wordTranscription",
|
|
124
124
|
ExerciseItemChoice = "exerciseItemChoice",
|
|
125
125
|
RuleItemChoice = "ruleItemChoice",
|
|
126
|
+
RuleItemMatch = "ruleItemMatch",
|
|
126
127
|
WordLevel = "wordLevel",
|
|
127
128
|
RuleLevel = "ruleLevel"
|
|
128
129
|
}
|
package/lib/common/enums.js
CHANGED
|
@@ -155,6 +155,7 @@ var AiPromptName;
|
|
|
155
155
|
AiPromptName["WordTranscription"] = "wordTranscription";
|
|
156
156
|
AiPromptName["ExerciseItemChoice"] = "exerciseItemChoice";
|
|
157
157
|
AiPromptName["RuleItemChoice"] = "ruleItemChoice";
|
|
158
|
+
AiPromptName["RuleItemMatch"] = "ruleItemMatch";
|
|
158
159
|
AiPromptName["WordLevel"] = "wordLevel";
|
|
159
160
|
AiPromptName["RuleLevel"] = "ruleLevel";
|
|
160
161
|
})(AiPromptName || (exports.AiPromptName = AiPromptName = {}));
|
|
@@ -175,6 +176,7 @@ var TopicCategory;
|
|
|
175
176
|
var ExerciseKind;
|
|
176
177
|
(function (ExerciseKind) {
|
|
177
178
|
ExerciseKind["Choice"] = "choice";
|
|
179
|
+
// Answer transformation
|
|
178
180
|
ExerciseKind["Match"] = "match";
|
|
179
181
|
ExerciseKind["Correct"] = "correct";
|
|
180
182
|
})(ExerciseKind || (exports.ExerciseKind = ExerciseKind = {}));
|
package/lib/common/options.d.ts
CHANGED
|
@@ -79,6 +79,10 @@ export interface FeItemCursor {
|
|
|
79
79
|
content: string;
|
|
80
80
|
answers: string[];
|
|
81
81
|
}
|
|
82
|
+
export interface FeMatchItemCursor {
|
|
83
|
+
id: string;
|
|
84
|
+
content: string;
|
|
85
|
+
}
|
|
82
86
|
export interface FePassItemInfo {
|
|
83
87
|
itemId: string;
|
|
84
88
|
content: string;
|
|
@@ -87,16 +91,39 @@ export interface FePassItemInfo {
|
|
|
87
91
|
correctAnswer?: string;
|
|
88
92
|
rule?: RuleGen;
|
|
89
93
|
}
|
|
90
|
-
export interface
|
|
91
|
-
|
|
92
|
-
kind: ExerciseKind;
|
|
94
|
+
export interface FeExerciseBaseCursor {
|
|
95
|
+
exerciseId: string;
|
|
93
96
|
ruleId: string;
|
|
94
|
-
|
|
95
|
-
passStatus
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
kind: ExerciseKind;
|
|
98
|
+
passStatus: PassStatus;
|
|
99
|
+
}
|
|
100
|
+
export interface FeExerciseChoiceCursor extends FeExerciseBaseCursor {
|
|
101
|
+
kind: ExerciseKind.Choice;
|
|
102
|
+
passStatus: PassStatus.Progress;
|
|
103
|
+
item: FeItemCursor;
|
|
104
|
+
itemTotal: number;
|
|
105
|
+
passedItemTotal: number;
|
|
106
|
+
}
|
|
107
|
+
export interface FeExerciseMatchCursor extends FeExerciseBaseCursor {
|
|
108
|
+
kind: ExerciseKind.Match;
|
|
109
|
+
passStatus: PassStatus.Progress;
|
|
110
|
+
matchItems: FeMatchItemCursor[];
|
|
111
|
+
matchAnswers: {
|
|
112
|
+
answers: string[];
|
|
113
|
+
tips: string[];
|
|
114
|
+
}[];
|
|
115
|
+
}
|
|
116
|
+
export interface FeExerciseResultCursor extends FeExerciseBaseCursor {
|
|
117
|
+
passId: string;
|
|
118
|
+
passStatus: PassStatus.Completed;
|
|
119
|
+
grade: number;
|
|
120
|
+
passedItems: FePassItemInfo[];
|
|
121
|
+
nextExerciseId: string;
|
|
122
|
+
}
|
|
123
|
+
export type FeExerciseCursor = FeExerciseChoiceCursor | FeExerciseMatchCursor | FeExerciseResultCursor;
|
|
124
|
+
export interface FeExerciseInfoForCursor extends FeExerciseBaseCursor {
|
|
125
|
+
passId: string;
|
|
126
|
+
grade: number;
|
|
98
127
|
itemTotal: number;
|
|
99
128
|
passedItemTotal: number;
|
|
100
|
-
passedItems?: FePassItemInfo[];
|
|
101
|
-
nextExerciseId?: string;
|
|
102
129
|
}
|
|
@@ -30,3 +30,19 @@ export interface ItemImageModifier extends BaseItemModifier {
|
|
|
30
30
|
imagePrompt?: string;
|
|
31
31
|
}
|
|
32
32
|
export type ItemModifier = ItemRegularModifier | ItemImageModifier;
|
|
33
|
+
export interface CreateItemSetRequest {
|
|
34
|
+
exerciseId: string;
|
|
35
|
+
items: {
|
|
36
|
+
content: string;
|
|
37
|
+
answers: string[];
|
|
38
|
+
correctAnswerIndex: number;
|
|
39
|
+
tip?: string;
|
|
40
|
+
ruleId?: string;
|
|
41
|
+
}[];
|
|
42
|
+
}
|
|
43
|
+
export interface GenerateItemRequest {
|
|
44
|
+
count: number;
|
|
45
|
+
exerciseId: string;
|
|
46
|
+
altRuleIds: string[];
|
|
47
|
+
answerTotal?: number;
|
|
48
|
+
}
|