revdev 0.220.0 → 0.222.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,4 +1,4 @@
1
- import { ContribGen } from "../../common";
1
+ import { DualContribGen } from "../../common";
2
2
  import { BoUpdateListRequest } from "./request";
3
3
  export interface BoListRecord {
4
4
  id: string;
@@ -8,7 +8,7 @@ export interface BoListRecord {
8
8
  name: string;
9
9
  description: string;
10
10
  isPrivate: boolean;
11
- contrib: ContribGen;
11
+ contrib: DualContribGen;
12
12
  wordTotal: number;
13
13
  userTotal: number;
14
14
  }
@@ -1,4 +1,4 @@
1
- import { ContribGen, EntryStatus, UserReaction } from "../../common";
1
+ import { ContribGen, DualContribGen, EntryStatus, UserReaction } from "../../common";
2
2
  import { WordGen } from "../../shared";
3
3
  export interface BoTranWordRecord {
4
4
  tranId: string;
@@ -16,15 +16,21 @@ export interface BoTranRecord {
16
16
  active: boolean;
17
17
  status: EntryStatus;
18
18
  rate: number;
19
- contrib: ContribGen;
19
+ contrib: DualContribGen;
20
20
  }
21
- export interface BoTranReactionRecord {
21
+ interface TranContainerRecord {
22
22
  id: string;
23
23
  tranId: string;
24
- reaction: UserReaction;
25
24
  speechPartId?: string;
26
25
  sourceWord: WordGen;
27
26
  destWord: WordGen;
28
27
  rate: number;
29
28
  contrib: ContribGen;
30
29
  }
30
+ export interface BoTranReactionRecord extends TranContainerRecord {
31
+ reaction: UserReaction;
32
+ }
33
+ export interface BoTranPinRecord extends TranContainerRecord {
34
+ tranWordId: string;
35
+ }
36
+ export {};
@@ -1,14 +1,11 @@
1
1
  import { EntryStatus } from "../../common";
2
2
  import { FeedRequest } from "../../feed";
3
- export interface BoTranFeedRequest extends FeedRequest {
3
+ export interface BoTranRefFeedRequest extends FeedRequest {
4
4
  sourceLangCode?: string;
5
5
  destLangCode?: string;
6
6
  speechPartId?: string;
7
+ }
8
+ export interface BoTranFeedRequest extends BoTranRefFeedRequest {
7
9
  active?: boolean;
8
10
  status?: EntryStatus;
9
11
  }
10
- export interface BoTranReactionFeedRequest extends FeedRequest {
11
- sourceLangCode?: string;
12
- destLangCode?: string;
13
- speechPartId?: string;
14
- }
@@ -1,4 +1,4 @@
1
- import { ContribGen, EntryStatus } from "../../common";
1
+ import { DualContribGen, EntryStatus } from "../../common";
2
2
  import { WordGen } from "../../shared";
3
3
  export interface BoWordRecord extends WordGen {
4
4
  status?: EntryStatus;
@@ -22,7 +22,7 @@ export interface BoWordImageRecord {
22
22
  imageId: string;
23
23
  fileName: string;
24
24
  thumbnailFileName: string;
25
- contrib: ContribGen;
25
+ contrib: DualContribGen;
26
26
  wordTotal: number;
27
27
  rate: number;
28
28
  }
@@ -29,5 +29,6 @@ export declare enum ExceptionCodes {
29
29
  TableRowInvalidColumnIndex = "TableRowInvalidColumnIndex",
30
30
  ImageMinSize = "ImageMinSize",
31
31
  CsvParsingValidation = "CsvParsingValidation",
32
- EntryStatusCannotBeChangedForAdminEntity = "EntryStatusCannotBeChangedForAdminEntity"
32
+ EntryStatusCannotBeChangedForAdminEntity = "EntryStatusCannotBeChangedForAdminEntity",
33
+ MaxTranWordPinsExceeded = "MaxTranWordPinsExceeded"
33
34
  }
@@ -37,4 +37,5 @@ var ExceptionCodes;
37
37
  ExceptionCodes["CsvParsingValidation"] = "CsvParsingValidation";
38
38
  // entry status
39
39
  ExceptionCodes["EntryStatusCannotBeChangedForAdminEntity"] = "EntryStatusCannotBeChangedForAdminEntity";
40
+ ExceptionCodes["MaxTranWordPinsExceeded"] = "MaxTranWordPinsExceeded";
40
41
  })(ExceptionCodes = exports.ExceptionCodes || (exports.ExceptionCodes = {}));
@@ -3,10 +3,10 @@ export interface AccessGen {
3
3
  owned: boolean;
4
4
  linked: boolean;
5
5
  }
6
- export interface UserContribGen {
6
+ export interface ContribGen {
7
7
  created: string;
8
8
  username: string;
9
9
  }
10
- export interface ContribGen extends UserContribGen {
10
+ export interface DualContribGen extends ContribGen {
11
11
  adminname: string;
12
12
  }
@@ -22,3 +22,6 @@ export interface ReactionRequest {
22
22
  export interface ReactionModifier extends ReactionRequest {
23
23
  rate: number;
24
24
  }
25
+ export interface PinRequest {
26
+ pin: boolean;
27
+ }
@@ -1,4 +1,4 @@
1
- import { ContribGen } from "../../common";
1
+ import { DualContribGen } from "../../common";
2
2
  import { ReactionGen } from "../../shared";
3
3
  export interface FeWordImageRecord {
4
4
  wordId: string;
@@ -6,5 +6,5 @@ export interface FeWordImageRecord {
6
6
  fileName: string;
7
7
  thumbnailFileName: string;
8
8
  reaction?: ReactionGen;
9
- contrib?: ContribGen;
9
+ contrib?: DualContribGen;
10
10
  }
@@ -1,4 +1,4 @@
1
- import { AccessGen, UserContribGen } from "../../common";
1
+ import { AccessGen, ContribGen } from "../../common";
2
2
  export interface FeListRecord {
3
3
  id: string;
4
4
  slug: string;
@@ -7,7 +7,7 @@ export interface FeListRecord {
7
7
  wordTotal: number;
8
8
  knownWordTotal: number;
9
9
  userTotal: number;
10
- contrib: UserContribGen;
10
+ contrib: ContribGen;
11
11
  access: AccessGen;
12
12
  }
13
13
  export interface FeListEntity {
@@ -18,7 +18,7 @@ export interface FeListEntity {
18
18
  description?: string;
19
19
  isSuper: boolean;
20
20
  metaKeywords?: string;
21
- contrib: UserContribGen;
21
+ contrib: ContribGen;
22
22
  access: AccessGen;
23
23
  userTotal: number;
24
24
  wordTotal: number;
@@ -1,4 +1,4 @@
1
- import { AccessGen, UserContribGen } from "../../common";
1
+ import { AccessGen, ContribGen } from "../../common";
2
2
  import { RealWord } from "../../shared";
3
3
  import { WordDataGen } from "../word";
4
4
  export interface BasicCellStruct<TWords> {
@@ -13,7 +13,7 @@ export interface FeTableRecord {
13
13
  userTotal: number;
14
14
  wordTotal: number;
15
15
  knownWordTotal: number;
16
- contrib: UserContribGen;
16
+ contrib: ContribGen;
17
17
  access: AccessGen;
18
18
  }
19
19
  export interface FeCell extends BasicCellStruct<WordDataGen[]> {
@@ -30,7 +30,7 @@ export interface FeTableEntity {
30
30
  description: string;
31
31
  metaKeywords: string;
32
32
  access: AccessGen;
33
- contrib: UserContribGen;
33
+ contrib: ContribGen;
34
34
  rowTotal: number;
35
35
  userTotal: number;
36
36
  wordTotal: number;
@@ -1,4 +1,4 @@
1
- import { UserContribGen } from "../../common";
1
+ import { ContribGen } from "../../common";
2
2
  export interface FeTagRecord {
3
3
  code: string;
4
4
  wordTotal: number;
@@ -7,7 +7,7 @@ export interface FeTagRecord {
7
7
  export interface FeTagEntity {
8
8
  code: string;
9
9
  langCode: string;
10
- contrib: UserContribGen;
10
+ contrib: ContribGen;
11
11
  wordTotal: number;
12
12
  knownWordTotal: number;
13
13
  }
@@ -4,5 +4,7 @@ import { WordDataGen } from "../word";
4
4
  export interface FeTranRecord extends Omit<TranRecord, "dest"> {
5
5
  dest: WordDataGen;
6
6
  reaction?: UserReaction;
7
+ tranWordId: string;
8
+ pinned: boolean;
7
9
  contrib?: ContribGen;
8
10
  }
@@ -1 +1,2 @@
1
1
  export * from "./entity";
2
+ export * from "./request";
@@ -11,3 +11,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./entity"), exports);
14
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,7 @@
1
+ import { PinRequest } from "../../common";
2
+ export interface FeTranWordPinRequest extends PinRequest {
3
+ tranWordId: string;
4
+ }
5
+ export interface FeTranWordPinModifier extends FeTranWordPinRequest {
6
+ tranId: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { Feed } from "../../feed";
2
- import { QuizCode, QuizMode, ContribGen, AccessGen, UserContribGen } from "../../common";
2
+ import { QuizCode, QuizMode, DualContribGen, AccessGen, ContribGen } from "../../common";
3
3
  import { FeWordImageRecord } from "../image";
4
4
  import { FeTranRecord } from "../tran";
5
5
  import { ReactionGen, WordUserGen } from "../../shared";
@@ -14,7 +14,7 @@ export interface FeWordTag {
14
14
  wordId: string;
15
15
  tagCode: string;
16
16
  reaction: ReactionGen;
17
- contrib: UserContribGen;
17
+ contrib: ContribGen;
18
18
  }
19
19
  export interface FeWordAttempt {
20
20
  id: string;
@@ -24,7 +24,7 @@ export interface FeWordAttempt {
24
24
  isCorrect: boolean;
25
25
  tranLangCode: string;
26
26
  isTable: boolean;
27
- contrib: UserContribGen;
27
+ contrib: ContribGen;
28
28
  }
29
29
  export interface FeWordAudio {
30
30
  id: string;
@@ -32,7 +32,7 @@ export interface FeWordAudio {
32
32
  audioId: string;
33
33
  fileName: string;
34
34
  reaction: ReactionGen;
35
- contrib: UserContribGen;
35
+ contrib: ContribGen;
36
36
  }
37
37
  export interface FeWordSpeechPart {
38
38
  speechPartId?: string;
@@ -44,7 +44,7 @@ export interface FeWordTranCode {
44
44
  }
45
45
  export interface FeWordEntity extends WordUserGen {
46
46
  mode?: string;
47
- contrib?: ContribGen;
47
+ contrib?: DualContribGen;
48
48
  access?: AccessGen;
49
49
  attempts?: FeWordAttempt[];
50
50
  speechParts?: FeWordSpeechPart[];
@@ -1,17 +1,29 @@
1
1
  import { Knowing } from "../../common";
2
2
  import { WordFeedExtension, FeedRequest, ShortFeedRequest } from "../../feed";
3
3
  import { CreateWordRequest } from "../../shared";
4
- export interface FeWordEntityRequest {
4
+ interface BaseWordEntityRequest {
5
+ tranLangCode?: string;
6
+ }
7
+ export interface FeWordEntityTextRequest extends BaseWordEntityRequest {
5
8
  langCode: string;
6
9
  text: string;
7
- tranLangCode?: string;
8
10
  }
11
+ export interface FeWordEntityIdRequest extends BaseWordEntityRequest {
12
+ id: string;
13
+ }
14
+ export declare type FeWordEntityRequest = FeWordEntityTextRequest | FeWordEntityIdRequest;
9
15
  export interface FeTranFeedRequest {
10
16
  skip: number;
11
17
  wordId: string;
12
- langCode: string;
18
+ tranId?: string;
19
+ langCode?: string;
20
+ useSpeechPart?: boolean;
13
21
  speechPartId?: string;
14
22
  }
23
+ export interface FeTranRecordRequest {
24
+ wordId: string;
25
+ tranId: string;
26
+ }
15
27
  export interface FeWordAttemptRequest {
16
28
  wordIds: string[];
17
29
  }
@@ -38,3 +50,4 @@ export interface FeWordKnowingRequest {
38
50
  wordIds: string[];
39
51
  knowing: Knowing;
40
52
  }
53
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.220.0",
3
+ "version": "0.222.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",