revdev 0.241.0 → 0.242.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.
@@ -13,6 +13,8 @@ export interface IdMultiRequest {
13
13
  }
14
14
  export interface WordIdsRequest {
15
15
  wordIds: string[];
16
+ }
17
+ export interface WordSetFeedRequest extends WordIdsRequest {
16
18
  skip: number;
17
19
  }
18
20
  export interface ReactionRequest {
@@ -1,16 +1,14 @@
1
1
  import { QuizMode } from "../../common";
2
- import { WordGen } from "../../shared";
3
- import { FeTranRecord } from "../tran";
2
+ import { TranRecord, WordGen, WordImageRecord } from "../../shared";
4
3
  import { WordDataGen } from "../word";
5
- import { FeWordImageRecord } from "../wordImage";
6
4
  export interface FeQuizEntity {
7
5
  mode: QuizMode;
8
6
  pairs: FeQuizPair[];
9
7
  }
10
8
  export interface FeQuizPair {
11
9
  word: WordGen;
12
- trans?: FeTranRecord[];
13
- images?: FeWordImageRecord[];
10
+ trans?: TranRecord[];
11
+ images?: WordImageRecord[];
14
12
  cellWords?: WordGen[];
15
13
  }
16
14
  export interface FeQuizRack {
@@ -1,13 +1,4 @@
1
- import { ContribGen, PinModifier, UserReaction } from "../../common";
2
- import { TranRecord } from "../../shared";
3
- import { WordDataGen } from "../word";
4
- export interface FeTranRecord extends Omit<TranRecord, "dest"> {
5
- dest: WordDataGen;
6
- reaction?: UserReaction;
7
- tranWordId: string;
8
- pinned: boolean;
9
- contrib?: ContribGen;
10
- }
1
+ import { PinModifier } from "../../common";
11
2
  export interface FeTranWordPinModifier extends PinModifier {
12
3
  tranId: string;
13
4
  }
@@ -1,14 +1,12 @@
1
1
  import { Feed } from "../../feed";
2
- import { QuizCode, QuizMode, DualContribGen, AccessGen, ContribGen } from "../../common";
3
- import { FeTranRecord } from "../tran";
4
- import { WordUserGen } from "../../shared";
5
- import { FeWordImageRecord } from "../wordImage";
2
+ import { DualContribGen, AccessGen, ContribGen } from "../../common";
3
+ import { TranRecord, WordAttemptRecord, WordImageRecord, WordUserGen } from "../../shared";
6
4
  export interface WordDataGen extends WordUserGen {
7
- attempts?: FeWordAttempt[];
8
- images?: FeWordImageRecord[];
5
+ attempts?: WordAttemptRecord[];
6
+ images?: WordImageRecord[];
9
7
  audios?: FeWordAudio[];
10
8
  tags?: FeWordTag[];
11
- trans?: FeTranRecord[];
9
+ trans?: TranRecord[];
12
10
  tranLangCode?: string;
13
11
  }
14
12
  export interface FeWordTag {
@@ -16,15 +14,6 @@ export interface FeWordTag {
16
14
  tagCode: string;
17
15
  contrib: ContribGen;
18
16
  }
19
- export interface FeWordAttempt {
20
- id: string;
21
- wordId: string;
22
- quizCode: QuizCode;
23
- quizMode: QuizMode;
24
- isCorrect: boolean;
25
- tranLangCode: string;
26
- contrib: ContribGen;
27
- }
28
17
  export interface FeWordAudio {
29
18
  id: string;
30
19
  wordId: string;
@@ -34,7 +23,7 @@ export interface FeWordAudio {
34
23
  }
35
24
  export interface FeWordSpeechPart {
36
25
  speechPartId?: string;
37
- tranFeed: Feed<FeTranRecord>;
26
+ tranFeed: Feed<TranRecord>;
38
27
  }
39
28
  export interface FeWordTranCode {
40
29
  langCode: string;
@@ -44,9 +33,9 @@ export interface FeWordEntity extends WordUserGen {
44
33
  mode?: string;
45
34
  contrib?: DualContribGen;
46
35
  access?: AccessGen;
47
- attempts?: FeWordAttempt[];
36
+ attempts?: WordAttemptRecord[];
48
37
  speechParts?: FeWordSpeechPart[];
49
- imageFeed?: Feed<FeWordImageRecord>;
38
+ imageFeed?: Feed<WordImageRecord>;
50
39
  audioFeed?: Feed<FeWordAudio>;
51
40
  tagFeed?: Feed<FeWordTag>;
52
41
  tranLangCode: string;
@@ -39,9 +39,6 @@ export interface FeWordOptionRequest {
39
39
  }
40
40
  export interface FeCreateWordRequest extends CreateWordRequest {
41
41
  }
42
- export interface FeWordsRequest {
43
- wordIds: string[];
44
- }
45
42
  export interface FeWordKnowingRequest {
46
43
  wordIds: string[];
47
44
  knowing: Knowing;
@@ -1,2 +1 @@
1
1
  export * from "./request";
2
- export * from "./entity";
@@ -11,4 +11,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./request"), exports);
14
- __exportStar(require("./entity"), exports);
@@ -1,8 +1,21 @@
1
+ import { ContribGen, UserReaction } from "../../common";
2
+ import { WordDataGen } from "../../front";
1
3
  import { WordGen } from "../word";
2
- export interface TranRecord {
4
+ export interface TranModifier {
3
5
  id: string;
4
6
  wordId: string;
5
7
  dest: WordGen;
6
8
  speechPartId?: string;
7
9
  rate: number;
8
10
  }
11
+ export interface TranRecord {
12
+ id: string;
13
+ wordId: string;
14
+ dest: WordDataGen;
15
+ speechPartId?: string;
16
+ tranWordId: string;
17
+ rate: number;
18
+ reaction?: UserReaction;
19
+ pinned?: boolean;
20
+ contrib: ContribGen;
21
+ }
@@ -1,4 +1,4 @@
1
- import { Knowing } from "../../common";
1
+ import { ContribGen, Knowing, QuizCode, QuizMode } from "../../common";
2
2
  export interface WordGen {
3
3
  id: string;
4
4
  text: string;
@@ -17,3 +17,12 @@ export interface PotentialWord {
17
17
  text: string;
18
18
  }
19
19
  export declare type LiteralWord = string | string[] | PotentialWord | PotentialWord[];
20
+ export interface WordAttemptRecord {
21
+ id: string;
22
+ wordId: string;
23
+ quizCode: QuizCode;
24
+ quizMode: QuizMode;
25
+ isCorrect: boolean;
26
+ tranLangCode: string;
27
+ contrib: ContribGen;
28
+ }
@@ -1,4 +1,4 @@
1
- import { EntryStatus } from "../../common";
1
+ import { ContribGen, EntryStatus, ImageGen, UserReaction } from "../../common";
2
2
  export interface WordImageModifier {
3
3
  id: string;
4
4
  wordId: string;
@@ -9,3 +9,13 @@ export interface WordImageModifier {
9
9
  status?: EntryStatus;
10
10
  rate: number;
11
11
  }
12
+ export interface WordImageRecord {
13
+ id: string;
14
+ wordId: string;
15
+ image: ImageGen;
16
+ active: boolean;
17
+ rate: number;
18
+ reaction?: UserReaction;
19
+ pinned?: boolean;
20
+ contrib: ContribGen;
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.241.0",
3
+ "version": "0.242.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,11 +0,0 @@
1
- import { ContribGen, ImageGen, UserReaction } from "../../common";
2
- export interface FeWordImageRecord {
3
- id: string;
4
- wordId: string;
5
- image: ImageGen;
6
- active: boolean;
7
- rate: number;
8
- reaction: UserReaction;
9
- pinned: boolean;
10
- contrib: ContribGen;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });