revdev 0.276.0 → 0.310.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,3 +1,4 @@
1
+ import { LangFeedRequest } from "../..";
1
2
  import { CreateTableRequest, UpdateTableRequest } from "../../shared";
2
3
  export interface BoCreateTableRequest extends Omit<CreateTableRequest, "isPrivate"> {
3
4
  }
@@ -11,3 +12,5 @@ export interface BoUpdateSuperTableRequest {
11
12
  }
12
13
  export interface BoSuperTableModifier extends BoUpdateSuperTableRequest {
13
14
  }
15
+ export interface BoTableFeedRequest extends LangFeedRequest {
16
+ }
@@ -34,3 +34,20 @@ export declare enum SmmCampaignType {
34
34
  POST = "POST",
35
35
  QUIZ = "QUIZ"
36
36
  }
37
+ export declare enum ExerciseType {
38
+ Regular = "regular",
39
+ List = "list",
40
+ Table = "table"
41
+ }
42
+ export declare enum ItemType {
43
+ Regular = "regular",
44
+ Image = "image"
45
+ }
46
+ export declare enum SetType {
47
+ Default = "default",
48
+ Course = "course"
49
+ }
50
+ export declare enum PostStatus {
51
+ Published = "published",
52
+ Draft = "draft"
53
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SmmCampaignType = exports.SmmCampaignStatus = exports.SocialProvider = exports.EntryStatus = exports.QuizMode = exports.UserReaction = exports.WordMode = exports.Knowing = void 0;
3
+ exports.PostStatus = exports.SetType = exports.ItemType = 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";
@@ -46,3 +46,24 @@ var SmmCampaignType;
46
46
  SmmCampaignType["POST"] = "POST";
47
47
  SmmCampaignType["QUIZ"] = "QUIZ";
48
48
  })(SmmCampaignType || (exports.SmmCampaignType = SmmCampaignType = {}));
49
+ var ExerciseType;
50
+ (function (ExerciseType) {
51
+ ExerciseType["Regular"] = "regular";
52
+ ExerciseType["List"] = "list";
53
+ ExerciseType["Table"] = "table";
54
+ })(ExerciseType || (exports.ExerciseType = ExerciseType = {}));
55
+ var ItemType;
56
+ (function (ItemType) {
57
+ ItemType["Regular"] = "regular";
58
+ ItemType["Image"] = "image";
59
+ })(ItemType || (exports.ItemType = ItemType = {}));
60
+ var SetType;
61
+ (function (SetType) {
62
+ SetType["Default"] = "default";
63
+ SetType["Course"] = "course";
64
+ })(SetType || (exports.SetType = SetType = {}));
65
+ var PostStatus;
66
+ (function (PostStatus) {
67
+ PostStatus["Published"] = "published";
68
+ PostStatus["Draft"] = "draft";
69
+ })(PostStatus || (exports.PostStatus = PostStatus = {}));
@@ -38,5 +38,12 @@ export declare enum ExceptionCodes {
38
38
  SimilarRecordAlreadyExists = "SimilarRecordAlreadyExists",
39
39
  ErrorText = "ErrorText",
40
40
  SmmChannelIsNotActive = "SmmChannelIsNotActive",
41
- SmmPostWordWithoutTranslation = "SmmPostWordWithoutTranslation"
41
+ SmmPostWordWithoutTranslation = "SmmPostWordWithoutTranslation",
42
+ ExerciseTypeNotSupported = "ExerciseTypeNotSupported",
43
+ ItemTypeNotSupported = "ItemTypeNotSupported",
44
+ CourseIsNotDraft = "CourseIsNotDraft",
45
+ CourseEpisodesRangeInvalid = "CourseEpisodesRangeInvalid",
46
+ EpisodeExercisesRangeInvalid = "EpisodeExercisesRangeInvalid",
47
+ ExerciseItemsRangeInvalid = "ExerciseItemsRangeInvalid",
48
+ ItemAnswersRequired = "ItemAnswersRequired"
42
49
  }
@@ -48,4 +48,13 @@ var ExceptionCodes;
48
48
  // smm
49
49
  ExceptionCodes["SmmChannelIsNotActive"] = "SmmChannelIsNotActive";
50
50
  ExceptionCodes["SmmPostWordWithoutTranslation"] = "SmmPostWordWithoutTranslation";
51
+ // course
52
+ ExceptionCodes["ExerciseTypeNotSupported"] = "ExerciseTypeNotSupported";
53
+ ExceptionCodes["ItemTypeNotSupported"] = "ItemTypeNotSupported";
54
+ ExceptionCodes["CourseIsNotDraft"] = "CourseIsNotDraft";
55
+ ExceptionCodes["CourseEpisodesRangeInvalid"] = "CourseEpisodesRangeInvalid";
56
+ ExceptionCodes["EpisodeExercisesRangeInvalid"] = "EpisodeExercisesRangeInvalid";
57
+ ExceptionCodes["ExerciseItemsRangeInvalid"] = "ExerciseItemsRangeInvalid";
58
+ ExceptionCodes["ItemAnswersRequired"] = "ItemAnswersRequired";
59
+ //
51
60
  })(ExceptionCodes || (exports.ExceptionCodes = ExceptionCodes = {}));
@@ -33,4 +33,9 @@ interface BasicLinkWordRequest {
33
33
  export interface LinkListWordRequest extends BasicLinkWordRequest {
34
34
  listId: string;
35
35
  }
36
+ export interface LinkListWordIdRequest {
37
+ listId: string;
38
+ wordId: string | string[];
39
+ link: boolean;
40
+ }
36
41
  export {};
@@ -1,4 +1,4 @@
1
- import { UserReaction } from "./enums";
1
+ import { PostStatus, UserReaction } from "./enums";
2
2
  export interface SlugRequest {
3
3
  slug: string;
4
4
  }
@@ -34,3 +34,7 @@ export interface OptionRequest {
34
34
  export interface LangOptionRequest extends OptionRequest {
35
35
  langCode: string;
36
36
  }
37
+ export interface ChangePostStatusRequest {
38
+ id: string;
39
+ status: PostStatus;
40
+ }
@@ -0,0 +1 @@
1
+ export * from "./request";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,12 @@
1
+ import { PostStatus } from "../../common";
2
+ export interface CreateCourseRequest {
3
+ name: string;
4
+ description?: string;
5
+ langCode: string;
6
+ }
7
+ export interface UpdateCourseRequest extends CreateCourseRequest {
8
+ id: string;
9
+ }
10
+ export interface CourseModifier extends UpdateCourseRequest {
11
+ status: PostStatus;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./request";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,12 @@
1
+ export interface CreateEpisodeRequest {
2
+ title: string;
3
+ content: string;
4
+ courseId: string;
5
+ }
6
+ export interface UpdateEpisodeRequest extends Pick<CreateEpisodeRequest, "title" | "content"> {
7
+ id: string;
8
+ }
9
+ export interface EpisodeModifier extends CreateEpisodeRequest {
10
+ valid: boolean;
11
+ id: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from "./request";
2
+ export * from "./list";
3
+ export * from "./table";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
18
+ __exportStar(require("./list"), exports);
19
+ __exportStar(require("./table"), exports);
@@ -0,0 +1,10 @@
1
+ import { CreateBaseExerciseRequest, ExerciseModifier, UpdateExerciseRequest } from "./request";
2
+ export interface CreateExerciseListRequest extends CreateBaseExerciseRequest {
3
+ wordIds: string[];
4
+ }
5
+ export interface UpdateExerciseListRequest extends UpdateExerciseRequest {
6
+ wordIds: string[];
7
+ }
8
+ export interface ExerciseListModifier extends ExerciseModifier {
9
+ wordIds: string[];
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { ExerciseType } from "../../common";
2
+ export interface CreateBaseExerciseRequest {
3
+ title: string;
4
+ episodeId: string;
5
+ }
6
+ export interface CreateExerciseRegularRequest extends CreateBaseExerciseRequest {
7
+ randomTips?: boolean;
8
+ }
9
+ export interface UpdateExerciseRequest extends Pick<CreateBaseExerciseRequest, "title"> {
10
+ id: string;
11
+ }
12
+ export interface UpdateExerciseRegularRequest extends UpdateExerciseRequest {
13
+ id: string;
14
+ randomTips?: boolean;
15
+ }
16
+ export interface ExerciseModifier extends CreateBaseExerciseRequest {
17
+ id: string;
18
+ valid: boolean;
19
+ type: ExerciseType;
20
+ }
21
+ export interface ExerciseRegularModifier extends ExerciseModifier {
22
+ randomTips: boolean;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ import { CreateBaseExerciseRequest, ExerciseModifier, UpdateExerciseRequest } from "./request";
2
+ export interface ExerciseTableCell {
3
+ wordIds: string[];
4
+ columnIndex: number;
5
+ }
6
+ export interface ExerciseTableRow {
7
+ cells: ExerciseTableCell[];
8
+ rowId?: string;
9
+ }
10
+ export interface CreateExerciseTableRequest extends CreateBaseExerciseRequest {
11
+ columns: string[];
12
+ rows: ExerciseTableRow[];
13
+ }
14
+ export interface ExerciseTableModifier extends ExerciseModifier {
15
+ tableId: string;
16
+ columns: string[];
17
+ rows: ExerciseTableRow[];
18
+ }
19
+ export interface UpdateExerciseTableRequest extends UpdateExerciseRequest {
20
+ columns: string[];
21
+ rows: ExerciseTableRow[];
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -30,4 +30,7 @@ export interface AppSettings {
30
30
  readonly optionCount: number;
31
31
  readonly proveImages: number;
32
32
  readonly proveTrans: number;
33
+ readonly courseEpisodes: [number, number];
34
+ readonly episodeExercises: [number, number];
35
+ readonly exerciseItems: [number, number];
33
36
  }
@@ -8,3 +8,7 @@ export * from "./general";
8
8
  export * from "./wordImage";
9
9
  export * from "./auth";
10
10
  export * from "./ai";
11
+ export * from "./course";
12
+ export * from "./episode";
13
+ export * from "./exercise";
14
+ export * from "./item";
@@ -24,3 +24,7 @@ __exportStar(require("./general"), exports);
24
24
  __exportStar(require("./wordImage"), exports);
25
25
  __exportStar(require("./auth"), exports);
26
26
  __exportStar(require("./ai"), exports);
27
+ __exportStar(require("./course"), exports);
28
+ __exportStar(require("./episode"), exports);
29
+ __exportStar(require("./exercise"), exports);
30
+ __exportStar(require("./item"), exports);
@@ -0,0 +1 @@
1
+ export * from "./request";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
@@ -0,0 +1,30 @@
1
+ import { ItemType } from "../..";
2
+ export interface BaseItemRequest {
3
+ exerciseId: string;
4
+ showAnswer?: boolean;
5
+ answers: string[][];
6
+ tips: string[];
7
+ }
8
+ export interface CreateItemRegularRequest extends BaseItemRequest {
9
+ content: string;
10
+ }
11
+ export interface CreateItemImageRequest extends BaseItemRequest {
12
+ imageFileName: string;
13
+ }
14
+ export interface UpdateItemRegularRequest extends CreateItemRegularRequest {
15
+ id: string;
16
+ }
17
+ export interface UpdateItemImageRequest extends CreateItemImageRequest {
18
+ id: string;
19
+ }
20
+ export interface ItemModifier extends BaseItemRequest {
21
+ id: string;
22
+ type: ItemType;
23
+ tips: string[];
24
+ }
25
+ export interface ItemRegularModifier extends ItemModifier {
26
+ content: string;
27
+ }
28
+ export interface ItemImageModifier extends ItemModifier {
29
+ imageFileName: string;
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev",
3
- "version": "0.276.0",
3
+ "version": "0.310.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",