revdev 0.318.0 → 0.320.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.
@@ -6,3 +6,7 @@ export interface BoEntryStatusUpdateRequest {
6
6
  export interface BoEntryStatusUpdateModifier extends BoEntryStatusUpdateRequest {
7
7
  active: boolean;
8
8
  }
9
+ export interface BoEntryInitRateRequest {
10
+ id: string;
11
+ initRate: number;
12
+ }
@@ -1,6 +1,7 @@
1
1
  import { EntryStatus } from "../../common";
2
- import { WordAudioRecord, WordGen } from "../../shared";
3
- export interface BoWordRecord extends WordGen {
2
+ import { WordDataGen } from "../../front";
3
+ import { WordGen } from "../../shared";
4
+ export interface BoWordRecord extends WordDataGen {
4
5
  status?: EntryStatus;
5
6
  created: string;
6
7
  mode?: string;
@@ -9,8 +10,8 @@ export interface BoWordRecord extends WordGen {
9
10
  listTotal: number;
10
11
  tableTotal: number;
11
12
  imageTotal: number;
13
+ audioTotal: number;
12
14
  tagTotal: number;
13
- audios?: WordAudioRecord[];
14
15
  }
15
16
  export interface BoWordEntity extends WordGen {
16
17
  created: string;
@@ -1,16 +1,8 @@
1
1
  import { EntryStatus } from "../../common";
2
2
  import { FeedRequest, WordFeedExtension } from "../../feed";
3
- import { CreateWordRequest } from "../../shared";
4
- export interface BoWordUpdateRequest {
5
- mode?: string;
6
- rate?: number;
7
- }
8
- export interface BoCreateWordRequest extends CreateWordRequest {
9
- }
10
- export interface BoUpdateWordRequest extends BoCreateWordRequest {
11
- id: string;
12
- }
13
- export interface BoWordModifier extends BoUpdateWordRequest {
3
+ import { UpdateWordRequest } from "../../shared";
4
+ export interface BoWordModifier extends UpdateWordRequest {
5
+ audioTotal: number;
14
6
  }
15
7
  export interface BoUpdateWordTagRequest {
16
8
  wordId: string | string[];
@@ -95,3 +95,7 @@ export declare enum ImageKind {
95
95
  Item = "imageItem"
96
96
  }
97
97
  export type StoreFileKind = AudioKind | ImageKind;
98
+ export declare enum AudioSex {
99
+ Male = "male",
100
+ Female = "female"
101
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageKind = exports.AudioKind = exports.PointerMode = exports.ContentType = exports.PositionDirection = exports.PassExerciseStatus = exports.PassEpisodeStatus = exports.PassStatus = exports.PostStatus = exports.SetType = exports.ItemType = exports.ExerciseMode = exports.ExerciseType = exports.SmmCampaignType = exports.SmmCampaignStatus = exports.SocialProvider = exports.EntryStatus = exports.QuizMode = exports.UserReaction = exports.WordMode = exports.Knowing = void 0;
3
+ exports.AudioSex = exports.ImageKind = exports.AudioKind = exports.PointerMode = exports.ContentType = exports.PositionDirection = exports.PassExerciseStatus = exports.PassEpisodeStatus = exports.PassStatus = exports.PostStatus = exports.SetType = exports.ItemType = exports.ExerciseMode = exports.ExerciseType = exports.SmmCampaignType = exports.SmmCampaignStatus = exports.SocialProvider = 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";
@@ -123,3 +123,8 @@ var ImageKind;
123
123
  ImageKind["Course"] = "imageCourse";
124
124
  ImageKind["Item"] = "imageItem";
125
125
  })(ImageKind || (exports.ImageKind = ImageKind = {}));
126
+ var AudioSex;
127
+ (function (AudioSex) {
128
+ AudioSex["Male"] = "male";
129
+ AudioSex["Female"] = "female";
130
+ })(AudioSex || (exports.AudioSex = AudioSex = {}));
@@ -19,6 +19,7 @@ export declare enum ExceptionCodes {
19
19
  CodeAlreadyExists = "CodeAlreadyExists",
20
20
  CodeRequired = "CodeRequired",
21
21
  TagWordInvalidUserId = "TagWordInvalidUserId",
22
+ WordAlreadyExists = "WordAlreadyExists",
22
23
  LinkToOwn = "LinkToOwn",
23
24
  LinkToPrivate = "LinkToPrivate",
24
25
  LinkResourceNotFound = "LinkResourceNotFound",
@@ -20,6 +20,8 @@ var ExceptionCodes;
20
20
  ExceptionCodes["CodeAlreadyExists"] = "CodeAlreadyExists";
21
21
  ExceptionCodes["CodeRequired"] = "CodeRequired";
22
22
  ExceptionCodes["TagWordInvalidUserId"] = "TagWordInvalidUserId";
23
+ // word
24
+ ExceptionCodes["WordAlreadyExists"] = "WordAlreadyExists";
23
25
  // link
24
26
  ExceptionCodes["LinkToOwn"] = "LinkToOwn";
25
27
  ExceptionCodes["LinkToPrivate"] = "LinkToPrivate";
@@ -28,6 +28,8 @@ export interface WordFeedExtension {
28
28
  mode?: string;
29
29
  hasImage?: boolean;
30
30
  hasTran?: boolean;
31
+ hasAudio?: boolean;
32
+ hasTag?: boolean;
31
33
  tranLangCode?: string;
32
34
  }
33
35
  export interface WordRelationFeedRequest extends Pick<Feed, "skip"> {
@@ -1,4 +1,4 @@
1
- import { ContribGen, Knowing, QuizCode, QuizMode } from "../../common";
1
+ import { AudioSex, ContribGen, Knowing, QuizCode, QuizMode } from "../../common";
2
2
  export interface WordGen {
3
3
  id: string;
4
4
  text: string;
@@ -29,4 +29,5 @@ export interface WordAttemptRecord {
29
29
  export interface WordAudioRecord {
30
30
  id: string;
31
31
  url: string;
32
+ sex?: AudioSex;
32
33
  }
@@ -5,6 +5,9 @@ export interface CreateWordRequest {
5
5
  mode?: string;
6
6
  rate?: number;
7
7
  }
8
+ export interface UpdateWordRequest extends CreateWordRequest {
9
+ id: string;
10
+ }
8
11
  export interface InitWordRequest {
9
12
  langCode: string;
10
13
  word: LiteralWord;
@@ -2,4 +2,5 @@ export declare class StringUtil {
2
2
  static isEqual(obj1: any, obj2: any): boolean;
3
3
  static isSame<TLiteral extends string = string>(str1: TLiteral, str2: string): boolean;
4
4
  static isNumeric(text: string | undefined): boolean;
5
+ static capitalize(text: string | undefined): string;
5
6
  }
@@ -13,6 +13,12 @@ var StringUtil = /** @class */ (function () {
13
13
  StringUtil.isNumeric = function (text) {
14
14
  return (text || "").match(/^\d+$/gi) !== null;
15
15
  };
16
+ StringUtil.capitalize = function (text) {
17
+ if (text) {
18
+ return text.charAt(0).toUpperCase() + text.slice(1);
19
+ }
20
+ return text || "";
21
+ };
16
22
  return StringUtil;
17
23
  }());
18
24
  exports.StringUtil = StringUtil;
@@ -7,4 +7,10 @@ describe("StringUtil", function () {
7
7
  expect(string_1.StringUtil.isNumeric("10")).toBeTruthy();
8
8
  expect(string_1.StringUtil.isNumeric("a1")).toBeFalsy();
9
9
  });
10
+ test("capitalize", function () {
11
+ expect(string_1.StringUtil.capitalize("word")).toBe("Word");
12
+ expect(string_1.StringUtil.capitalize("Word")).toBe("Word");
13
+ expect(string_1.StringUtil.capitalize("")).toBe("");
14
+ expect(string_1.StringUtil.capitalize(undefined)).toBe("");
15
+ });
10
16
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.318.0",
3
+ "version": "0.320.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",