revdev 0.353.0 → 0.355.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/common/exception.d.ts +1 -0
- package/lib/common/exception.js +1 -0
- package/lib/front/exercise/entity.d.ts +45 -1
- package/lib/front/exercise/index.d.ts +1 -0
- package/lib/front/exercise/index.js +1 -0
- package/lib/front/exercise/request.d.ts +9 -0
- package/lib/front/exercise/request.js +2 -0
- package/lib/front/rule/entity.d.ts +6 -0
- package/lib/front/rule/request.d.ts +2 -1
- package/lib/shared/general/entity.d.ts +1 -0
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare enum ExceptionCodes {
|
|
|
41
41
|
SimilarRecordAlreadyExists = "SimilarRecordAlreadyExists",
|
|
42
42
|
ErrorText = "ErrorText",
|
|
43
43
|
InconsistentRequest = "InconsistentRequest",
|
|
44
|
+
RecordInvalid = "RecordInvalid",
|
|
44
45
|
SmmChannelIsNotActive = "SmmChannelIsNotActive",
|
|
45
46
|
SmmPostWordWithoutTranslation = "SmmPostWordWithoutTranslation",
|
|
46
47
|
ExerciseTypeNotSupported = "ExerciseTypeNotSupported",
|
package/lib/common/exception.js
CHANGED
|
@@ -50,6 +50,7 @@ var ExceptionCodes;
|
|
|
50
50
|
ExceptionCodes["SimilarRecordAlreadyExists"] = "SimilarRecordAlreadyExists";
|
|
51
51
|
ExceptionCodes["ErrorText"] = "ErrorText";
|
|
52
52
|
ExceptionCodes["InconsistentRequest"] = "InconsistentRequest";
|
|
53
|
+
ExceptionCodes["RecordInvalid"] = "RecordInvalid";
|
|
53
54
|
// smm
|
|
54
55
|
ExceptionCodes["SmmChannelIsNotActive"] = "SmmChannelIsNotActive";
|
|
55
56
|
ExceptionCodes["SmmPostWordWithoutTranslation"] = "SmmPostWordWithoutTranslation";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FeEntityPointer, FePassItemResult, WordUserGen } from "../..";
|
|
2
|
-
import { ExerciseMode, ExerciseType, PassExerciseStatus } from "../../common";
|
|
2
|
+
import { ExerciseKind, ExerciseMode, ExerciseType, PassExerciseStatus, PassStatus } from "../../common";
|
|
3
3
|
export interface FeExerciseNavigator {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
@@ -55,3 +55,47 @@ export interface FePassExerciseResultTable extends FeBasicPassExerciseResult, Fe
|
|
|
55
55
|
type: ExerciseType.Table;
|
|
56
56
|
}
|
|
57
57
|
export type FePassExerciseResult = FePassExerciseResultRegular | FePassExerciseResultList | FePassExerciseResultTable;
|
|
58
|
+
export interface FeExerciseRecord {
|
|
59
|
+
id: string;
|
|
60
|
+
idInRule: number;
|
|
61
|
+
kind: ExerciseKind;
|
|
62
|
+
passTotal: number;
|
|
63
|
+
grade?: number;
|
|
64
|
+
passStatus?: PassStatus;
|
|
65
|
+
}
|
|
66
|
+
export interface FeExerciseEntity {
|
|
67
|
+
id: string;
|
|
68
|
+
kind: ExerciseKind;
|
|
69
|
+
rule: {
|
|
70
|
+
id: string;
|
|
71
|
+
slug: string;
|
|
72
|
+
name: string;
|
|
73
|
+
langCode: string;
|
|
74
|
+
};
|
|
75
|
+
cursor: FeExerciseCursor;
|
|
76
|
+
}
|
|
77
|
+
export interface FeItemCursor {
|
|
78
|
+
id: string;
|
|
79
|
+
content: string;
|
|
80
|
+
answers: string[];
|
|
81
|
+
}
|
|
82
|
+
export interface FePassItemInfo {
|
|
83
|
+
itemId: string;
|
|
84
|
+
content: string;
|
|
85
|
+
answer: string;
|
|
86
|
+
isCorrect: boolean;
|
|
87
|
+
correctAnswer?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface FeExerciseCursor {
|
|
90
|
+
id: string;
|
|
91
|
+
kind: ExerciseKind;
|
|
92
|
+
ruleId: string;
|
|
93
|
+
passId?: string;
|
|
94
|
+
passStatus?: PassStatus;
|
|
95
|
+
grade?: number;
|
|
96
|
+
item?: FeItemCursor;
|
|
97
|
+
itemTotal: number;
|
|
98
|
+
passedItemTotal: number;
|
|
99
|
+
passedItems?: FePassItemInfo[];
|
|
100
|
+
nextExerciseId?: string;
|
|
101
|
+
}
|