revdev 0.242.0 → 0.246.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;
@@ -12,3 +12,4 @@ export * from "./auth";
12
12
  export * from "./image";
13
13
  export * from "./lang";
14
14
  export * from "./wordImage";
15
+ export * from "./smm";
package/lib/back/index.js CHANGED
@@ -24,3 +24,4 @@ __exportStar(require("./auth"), exports);
24
24
  __exportStar(require("./image"), exports);
25
25
  __exportStar(require("./lang"), exports);
26
26
  __exportStar(require("./wordImage"), exports);
27
+ __exportStar(require("./smm"), exports);
@@ -0,0 +1,36 @@
1
+ import { SocialProvider } from "../../common";
2
+ import { WordGen } from "../../shared";
3
+ import { BoListRecord } from "../list";
4
+ import { SmmCampaignStatus } from "./enum";
5
+ export interface BoSmmChannelRecord {
6
+ id: string;
7
+ provider: SocialProvider;
8
+ providerId: string;
9
+ langCode: string;
10
+ tranLangCode: string;
11
+ wordPostTemplate: string;
12
+ active: boolean;
13
+ url: string;
14
+ }
15
+ export interface BoSmmCampaignRecord {
16
+ id: string;
17
+ name: string;
18
+ active: boolean;
19
+ listId: string;
20
+ created: string;
21
+ status: SmmCampaignStatus;
22
+ channel: BoSmmChannelRecord;
23
+ list: Partial<BoListRecord>;
24
+ }
25
+ export interface BoSmmPostRecord {
26
+ id: string;
27
+ wordId?: string;
28
+ word: WordGen;
29
+ campaignId?: string;
30
+ campaign: BoSmmCampaignRecord;
31
+ created: string;
32
+ channelId: string;
33
+ channel: BoSmmChannelRecord;
34
+ messageId: string;
35
+ link: string;
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare enum SmmCampaignStatus {
2
+ IN_PROGRESS = "IN_PROGRESS",
3
+ COMPLETED = "COMPLETED"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmmCampaignStatus = void 0;
4
+ var SmmCampaignStatus;
5
+ (function (SmmCampaignStatus) {
6
+ SmmCampaignStatus["IN_PROGRESS"] = "IN_PROGRESS";
7
+ SmmCampaignStatus["COMPLETED"] = "COMPLETED";
8
+ })(SmmCampaignStatus = exports.SmmCampaignStatus || (exports.SmmCampaignStatus = {}));
@@ -0,0 +1,3 @@
1
+ export * from "./entity";
2
+ export * from "./request";
3
+ export * from "./enum";
@@ -0,0 +1,15 @@
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);
15
+ __exportStar(require("./enum"), exports);
@@ -0,0 +1,18 @@
1
+ import { FeedRequest } from "../../feed";
2
+ export interface SmmCampaignFeedRequest extends FeedRequest {
3
+ channelId?: string;
4
+ active?: boolean;
5
+ listId?: string;
6
+ }
7
+ export interface CreateSmmCampaignRequest {
8
+ name: string;
9
+ channelId: string;
10
+ active: boolean;
11
+ listId: string;
12
+ }
13
+ export interface SmmChannelFeedRequest extends FeedRequest {
14
+ active?: boolean;
15
+ }
16
+ export interface SmmPostFeedRequest extends FeedRequest {
17
+ channelId?: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,5 +23,6 @@ export declare enum EntryStatus {
23
23
  Pending = 3
24
24
  }
25
25
  export declare enum SocialProvider {
26
- Google = "google"
26
+ Google = "google",
27
+ Telegram = "telegram"
27
28
  }
@@ -34,4 +34,5 @@ var EntryStatus;
34
34
  var SocialProvider;
35
35
  (function (SocialProvider) {
36
36
  SocialProvider["Google"] = "google";
37
+ SocialProvider["Telegram"] = "telegram";
37
38
  })(SocialProvider = exports.SocialProvider || (exports.SocialProvider = {}));
@@ -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.246.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",