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.
@@ -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",
@@ -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
+ }
@@ -1 +1,2 @@
1
1
  export * from "./entity";
2
+ export * from "./request";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entity"), exports);
18
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,9 @@
1
+ import { FeedRequest } from "../../feed";
2
+ export interface FeExerciseFeedRequest extends FeedRequest {
3
+ ruleId: string;
4
+ currentExerciseId?: string;
5
+ }
6
+ export interface FeAnswerRequest {
7
+ itemId: string;
8
+ answer: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,3 +10,9 @@ export interface FeRuleEntity extends FeRuleRecord {
10
10
  contentType: ContentType;
11
11
  content: string;
12
12
  }
13
+ export interface FeRuleKnowingResult {
14
+ changed: boolean;
15
+ ruleId: string;
16
+ knowing?: Knowing;
17
+ exerciseId?: string;
18
+ }
@@ -1,5 +1,6 @@
1
1
  import { Knowing } from "../../common";
2
- export interface FeLinkRuleRequest {
2
+ export interface FeRuleKnowingRequest {
3
3
  ruleId: string;
4
4
  knowing: Knowing;
5
+ proved?: boolean;
5
6
  }
@@ -36,4 +36,5 @@ export interface AppSettings {
36
36
  readonly exerciseListWords: [number, number];
37
37
  readonly exerciseTableRows: [number, number];
38
38
  readonly exerciseListPassRate: number;
39
+ readonly knownRuleMinGrade: number;
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.353.0",
3
+ "version": "0.355.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",