revdev 0.195.0 → 0.197.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.
@@ -1,6 +1,7 @@
1
+ import { IdCodeOption } from "../../common";
1
2
  export interface BoInitData {
2
3
  langCodes: string[];
3
- speechPartCodes: string[];
4
+ speechPartOptions: IdCodeOption[];
4
5
  quizCodes: string[];
5
6
  localeCodes: string[];
6
7
  localeTexts: [string, string][];
@@ -1,3 +1,4 @@
1
+ import { EntryStatus } from "../../common";
1
2
  import { WordGen } from "../../shared";
2
3
  export interface BoTranWordRecord {
3
4
  tranId: string;
@@ -9,9 +10,11 @@ export interface BoTranWordRecord {
9
10
  }
10
11
  export interface BoTranRecord {
11
12
  id: string;
12
- speechPartCode?: string;
13
+ speechPartId?: string;
13
14
  created: string;
14
15
  userId?: string;
16
+ active: boolean;
17
+ status: EntryStatus;
15
18
  sourceWord: WordGen;
16
19
  destWord: WordGen;
17
20
  }
@@ -1,5 +1,13 @@
1
+ import { EntryStatus } from "../../common";
1
2
  import { FeedRequest } from "../../feed";
2
3
  export interface BoTranFeedRequest extends FeedRequest {
3
4
  langCode?: string;
4
- speechPartCode?: string;
5
+ speechPartId?: string;
6
+ }
7
+ export interface DbTranStatusUpdateRequest {
8
+ id: string;
9
+ status: EntryStatus;
10
+ }
11
+ export interface DbTranStatusUpdateModifier extends DbTranStatusUpdateRequest {
12
+ active: boolean;
5
13
  }
@@ -16,3 +16,8 @@ export declare enum QuizMode {
16
16
  Tran = 1,
17
17
  Image = 2
18
18
  }
19
+ export declare enum EntryStatus {
20
+ Pending = 0,
21
+ Approved = 1,
22
+ Rejected = 2
23
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuizMode = exports.UserReaction = exports.WordMode = exports.Knowing = void 0;
3
+ exports.EntryStatus = exports.QuizMode = exports.UserReaction = exports.WordMode = exports.Knowing = void 0;
4
4
  var Knowing;
5
5
  (function (Knowing) {
6
6
  Knowing[Knowing["Known"] = 1] = "Known";
@@ -24,3 +24,9 @@ var QuizMode;
24
24
  QuizMode[QuizMode["Image"] = 2] = "Image";
25
25
  // Audio = 3,
26
26
  })(QuizMode = exports.QuizMode || (exports.QuizMode = {}));
27
+ var EntryStatus;
28
+ (function (EntryStatus) {
29
+ EntryStatus[EntryStatus["Pending"] = 0] = "Pending";
30
+ EntryStatus[EntryStatus["Approved"] = 1] = "Approved";
31
+ EntryStatus[EntryStatus["Rejected"] = 2] = "Rejected";
32
+ })(EntryStatus = exports.EntryStatus || (exports.EntryStatus = {}));
@@ -14,3 +14,7 @@ export interface Key<T = any> {
14
14
  key: string | number;
15
15
  value: T;
16
16
  }
17
+ export interface IdCodeOption {
18
+ id: string;
19
+ code: string;
20
+ }
@@ -1,10 +1,11 @@
1
+ import { IdCodeOption } from "../../common";
1
2
  import { FeLangRecord } from "../lang";
2
3
  import { FeListRecord } from "../list";
3
4
  import { FeTableRecord } from "../table";
4
5
  import { WordDataGen } from "../word";
5
6
  export interface FeInitData {
6
7
  langCodes: string[];
7
- speechPartCodes: string[];
8
+ speechPartOptions: IdCodeOption[];
8
9
  quizCodes: string[];
9
10
  localeCodes: string[];
10
11
  }
@@ -4,7 +4,7 @@ import { WordDataGen } from "../word";
4
4
  export interface FeTranRecord {
5
5
  id: string;
6
6
  wordId: string;
7
- speechPartCode?: string;
7
+ speechPartId?: string;
8
8
  dest: WordDataGen;
9
9
  reaction?: ReactionGen;
10
10
  contribution?: ContributionGen;
@@ -35,7 +35,7 @@ export interface FeWordAudio {
35
35
  contribution: ContributionGen;
36
36
  }
37
37
  export interface FeWordSpeechPart {
38
- speechPartCode?: string;
38
+ speechPartId?: string;
39
39
  tranFeed: Feed<FeTranRecord>;
40
40
  }
41
41
  export interface FeWordTranCode {
@@ -10,7 +10,7 @@ export interface FeTranFeedRequest {
10
10
  skip: number;
11
11
  wordId: string;
12
12
  langCode: string;
13
- speechPartCode?: string;
13
+ speechPartId?: string;
14
14
  }
15
15
  export interface FeWordAttemptRequest {
16
16
  wordIds: string[];
@@ -2,6 +2,6 @@ import { WordGen } from "../word";
2
2
  export interface TranRecord {
3
3
  id: string;
4
4
  wordId: string;
5
- speechPartCode?: string;
5
+ speechPartId?: string;
6
6
  dest: WordGen;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { EntryWord, RealWord } from "../word";
2
2
  interface BaseCreateTranRequest<TWord> {
3
3
  sourceWordId: string;
4
- speechPartCode?: string;
4
+ speechPartId?: string;
5
5
  destWord: TWord;
6
6
  }
7
7
  export interface CreateTextTranRequest extends BaseCreateTranRequest<EntryWord> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.195.0",
3
+ "version": "0.197.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",