revdev 0.242.0 → 0.245.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,3 @@
1
- export interface BoAuthResponse {
2
- token: string;
3
- }
4
1
  export interface BoLoginRequest {
5
2
  username: string;
6
3
  password: string;
@@ -1,7 +1,11 @@
1
1
  import { SocialProvider } from "../../common";
2
+ import { AuthResponse } from "../../shared";
2
3
  export interface FeSocialAuthData {
3
4
  token: string;
4
5
  email: string;
5
6
  name: string;
6
7
  provider: SocialProvider;
7
8
  }
9
+ export interface FeAuthResponse extends AuthResponse {
10
+ locale: string;
11
+ }
@@ -0,0 +1,24 @@
1
+ import { ImageGen, Knowing } from "../../common";
2
+ import { WordUserGen } from "../../shared";
3
+ export interface FeWordImageProveRecord {
4
+ wordId: string;
5
+ image: ImageGen;
6
+ rate: number;
7
+ listTotal: string;
8
+ }
9
+ export interface FeWordTranProveRecord {
10
+ wordId: string;
11
+ tran: WordUserGen;
12
+ rate: number;
13
+ listTotal: string;
14
+ }
15
+ export interface FeProveWordMatch {
16
+ listTotal: string;
17
+ }
18
+ export interface FeWordKnowingResult {
19
+ changed: boolean;
20
+ wordId: string;
21
+ knowing?: Knowing;
22
+ images?: [string, ImageGen, FeProveWordMatch][];
23
+ trans?: [string, WordUserGen, FeProveWordMatch][];
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./entity";
2
+ export * from "./request";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./entity"), exports);
14
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,17 @@
1
+ import { Knowing } from "../../common";
2
+ export interface FeWordProveRequest {
3
+ wordId: string;
4
+ }
5
+ export interface FeWordTranProveRequest extends FeWordProveRequest {
6
+ tranLangCode: string;
7
+ }
8
+ export interface FeWordKnowingRequest {
9
+ wordId: string;
10
+ knowing: Knowing;
11
+ proved?: boolean;
12
+ tranLangCode?: string;
13
+ }
14
+ export interface FeWordKnowingManyRequest {
15
+ wordIds: string[] | string;
16
+ knowing: Knowing;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,3 +13,4 @@ export * from "./user";
13
13
  export * from "./quiz";
14
14
  export * from "./progress";
15
15
  export * from "./wordImage";
16
+ export * from "./explorer";
@@ -25,3 +25,4 @@ __exportStar(require("./user"), exports);
25
25
  __exportStar(require("./quiz"), exports);
26
26
  __exportStar(require("./progress"), exports);
27
27
  __exportStar(require("./wordImage"), exports);
28
+ __exportStar(require("./explorer"), exports);
@@ -5,4 +5,5 @@ export interface FeProfileEntity {
5
5
  native?: string;
6
6
  learn?: string;
7
7
  tran?: string;
8
+ locale?: string;
8
9
  }
@@ -1,4 +1,4 @@
1
- import { IdRequest, Knowing } from "../../common";
1
+ import { IdRequest } from "../../common";
2
2
  import { WordFeedExtension, FeedRequest, ShortFeedRequest } from "../../feed";
3
3
  import { CreateWordRequest } from "../../shared";
4
4
  interface BaseWordEntityRequest {
@@ -39,10 +39,6 @@ export interface FeWordOptionRequest {
39
39
  }
40
40
  export interface FeCreateWordRequest extends CreateWordRequest {
41
41
  }
42
- export interface FeWordKnowingRequest {
43
- wordIds: string[];
44
- knowing: Knowing;
45
- }
46
42
  export interface FeWordTranRecordRequest extends IdRequest {
47
43
  tranLangCode: string;
48
44
  }
@@ -0,0 +1,3 @@
1
+ export interface AuthResponse {
2
+ token: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./entity";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./entity"), exports);
@@ -28,4 +28,6 @@ export interface AppSettings {
28
28
  readonly maxTranWordPins: number;
29
29
  readonly maxWordImagePins: number;
30
30
  readonly optionCount: number;
31
+ readonly proveImages: number;
32
+ readonly proveTrans: number;
31
33
  }
@@ -5,3 +5,4 @@ export * from "./tag";
5
5
  export * from "./tran";
6
6
  export * from "./general";
7
7
  export * from "./wordImage";
8
+ export * from "./auth";
@@ -17,3 +17,4 @@ __exportStar(require("./tag"), exports);
17
17
  __exportStar(require("./tran"), exports);
18
18
  __exportStar(require("./general"), exports);
19
19
  __exportStar(require("./wordImage"), exports);
20
+ __exportStar(require("./auth"), exports);
@@ -1,3 +1,4 @@
1
1
  export declare class ArrayUtil {
2
2
  static toArray<T>(item: T | T[]): T[];
3
+ static shuffle<T>(array: T[]): void;
3
4
  }
@@ -7,6 +7,18 @@ var ArrayUtil = /** @class */ (function () {
7
7
  ArrayUtil.toArray = function (item) {
8
8
  return Array.isArray(item) ? item : [item];
9
9
  };
10
+ ArrayUtil.shuffle = function (array) {
11
+ var _a;
12
+ var currentIndex = array.length;
13
+ // While there remain elements to shuffle...
14
+ while (currentIndex != 0) {
15
+ // Pick a remaining element...
16
+ var randomIndex = Math.floor(Math.random() * currentIndex);
17
+ currentIndex--;
18
+ // And swap it with the current element.
19
+ _a = [array[randomIndex], array[currentIndex]], array[currentIndex] = _a[0], array[randomIndex] = _a[1];
20
+ }
21
+ };
10
22
  return ArrayUtil;
11
23
  }());
12
24
  exports.ArrayUtil = ArrayUtil;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.242.0",
3
+ "version": "0.245.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",