@easyedu/js-lsm-api 1.80.0 → 1.81.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.
Files changed (91) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +11 -2
  3. package/dist/apis/RichTextApi.d.ts +67 -0
  4. package/dist/apis/RichTextApi.js +158 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/RichTextApi.d.ts +67 -0
  8. package/dist/esm/apis/RichTextApi.js +154 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/GetQuestion.d.ts +7 -6
  12. package/dist/esm/models/GetQuestion.js +5 -4
  13. package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  14. package/dist/esm/models/GetQuestionAnswerChoicesInner.js +3 -2
  15. package/dist/esm/models/GetRichTextAssetUpload.d.ts +50 -0
  16. package/dist/esm/models/GetRichTextAssetUpload.js +55 -0
  17. package/dist/esm/models/PostQuestion.d.ts +7 -6
  18. package/dist/esm/models/PostQuestion.js +5 -4
  19. package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  20. package/dist/esm/models/PostQuestionAnswerChoicesInner.js +3 -2
  21. package/dist/esm/models/PostRichTextAssetComplete.d.ts +44 -0
  22. package/dist/esm/models/PostRichTextAssetComplete.js +47 -0
  23. package/dist/esm/models/PostRichTextAssetUpload.d.ts +69 -0
  24. package/dist/esm/models/PostRichTextAssetUpload.js +65 -0
  25. package/dist/esm/models/PutQuestion.d.ts +7 -6
  26. package/dist/esm/models/PutQuestion.js +5 -4
  27. package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  28. package/dist/esm/models/PutQuestionAnswerChoicesInner.js +3 -2
  29. package/dist/esm/models/RichTextAsset.d.ts +62 -0
  30. package/dist/esm/models/RichTextAsset.js +59 -0
  31. package/dist/esm/models/RichTextDocument.d.ts +60 -0
  32. package/dist/esm/models/RichTextDocument.js +62 -0
  33. package/dist/esm/models/RichTextInput.d.ts +47 -0
  34. package/dist/esm/models/RichTextInput.js +53 -0
  35. package/dist/esm/models/index.d.ts +6 -0
  36. package/dist/esm/models/index.js +6 -0
  37. package/dist/models/GetQuestion.d.ts +7 -6
  38. package/dist/models/GetQuestion.js +5 -4
  39. package/dist/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  40. package/dist/models/GetQuestionAnswerChoicesInner.js +3 -2
  41. package/dist/models/GetRichTextAssetUpload.d.ts +50 -0
  42. package/dist/models/GetRichTextAssetUpload.js +62 -0
  43. package/dist/models/PostQuestion.d.ts +7 -6
  44. package/dist/models/PostQuestion.js +5 -4
  45. package/dist/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  46. package/dist/models/PostQuestionAnswerChoicesInner.js +3 -2
  47. package/dist/models/PostRichTextAssetComplete.d.ts +44 -0
  48. package/dist/models/PostRichTextAssetComplete.js +54 -0
  49. package/dist/models/PostRichTextAssetUpload.d.ts +69 -0
  50. package/dist/models/PostRichTextAssetUpload.js +73 -0
  51. package/dist/models/PutQuestion.d.ts +7 -6
  52. package/dist/models/PutQuestion.js +5 -4
  53. package/dist/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  54. package/dist/models/PutQuestionAnswerChoicesInner.js +3 -2
  55. package/dist/models/RichTextAsset.d.ts +62 -0
  56. package/dist/models/RichTextAsset.js +66 -0
  57. package/dist/models/RichTextDocument.d.ts +60 -0
  58. package/dist/models/RichTextDocument.js +70 -0
  59. package/dist/models/RichTextInput.d.ts +47 -0
  60. package/dist/models/RichTextInput.js +61 -0
  61. package/dist/models/index.d.ts +6 -0
  62. package/dist/models/index.js +6 -0
  63. package/docs/GetQuestion.md +2 -2
  64. package/docs/GetQuestionAnswerChoicesInner.md +1 -1
  65. package/docs/GetRichTextAssetUpload.md +40 -0
  66. package/docs/PostQuestion.md +2 -2
  67. package/docs/PostQuestionAnswerChoicesInner.md +1 -1
  68. package/docs/PostRichTextAssetComplete.md +38 -0
  69. package/docs/PostRichTextAssetUpload.md +44 -0
  70. package/docs/PutQuestion.md +2 -2
  71. package/docs/PutQuestionAnswerChoicesInner.md +1 -1
  72. package/docs/RichTextApi.md +212 -0
  73. package/docs/RichTextAsset.md +44 -0
  74. package/docs/RichTextDocument.md +40 -0
  75. package/docs/RichTextInput.md +36 -0
  76. package/package.json +1 -1
  77. package/src/apis/RichTextApi.ts +201 -0
  78. package/src/apis/index.ts +1 -0
  79. package/src/models/GetQuestion.ts +17 -10
  80. package/src/models/GetQuestionAnswerChoicesInner.ts +12 -4
  81. package/src/models/GetRichTextAssetUpload.ts +93 -0
  82. package/src/models/PostQuestion.ts +17 -10
  83. package/src/models/PostQuestionAnswerChoicesInner.ts +12 -4
  84. package/src/models/PostRichTextAssetComplete.ts +82 -0
  85. package/src/models/PostRichTextAssetUpload.ts +119 -0
  86. package/src/models/PutQuestion.ts +17 -10
  87. package/src/models/PutQuestionAnswerChoicesInner.ts +12 -4
  88. package/src/models/RichTextAsset.ts +109 -0
  89. package/src/models/RichTextDocument.ts +111 -0
  90. package/src/models/RichTextInput.ts +85 -0
  91. package/src/models/index.ts +6 -0
@@ -20,6 +20,7 @@ exports.PostQuestionFromJSONTyped = PostQuestionFromJSONTyped;
20
20
  exports.PostQuestionToJSON = PostQuestionToJSON;
21
21
  exports.PostQuestionToJSONTyped = PostQuestionToJSONTyped;
22
22
  const PostQuestionAnswerChoicesInner_1 = require("./PostQuestionAnswerChoicesInner");
23
+ const RichTextInput_1 = require("./RichTextInput");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -61,11 +62,11 @@ function PostQuestionFromJSONTyped(json, ignoreDiscriminator) {
61
62
  return json;
62
63
  }
63
64
  return {
64
- 'questionText': json['question_text'],
65
+ 'questionText': (0, RichTextInput_1.RichTextInputFromJSON)(json['question_text']),
65
66
  'questionType': json['question_type'],
66
67
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(PostQuestionAnswerChoicesInner_1.PostQuestionAnswerChoicesInnerFromJSON)),
67
68
  'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
68
- 'explanation': json['explanation'] == null ? undefined : json['explanation'],
69
+ 'explanation': json['explanation'] == null ? undefined : (0, RichTextInput_1.RichTextInputFromJSON)(json['explanation']),
69
70
  'topic': json['topic'],
70
71
  'difficultyLevel': json['difficulty_level'],
71
72
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -80,11 +81,11 @@ function PostQuestionToJSONTyped(value, ignoreDiscriminator = false) {
80
81
  return value;
81
82
  }
82
83
  return {
83
- 'question_text': value['questionText'],
84
+ 'question_text': (0, RichTextInput_1.RichTextInputToJSON)(value['questionText']),
84
85
  'question_type': value['questionType'],
85
86
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(PostQuestionAnswerChoicesInner_1.PostQuestionAnswerChoicesInnerToJSON)),
86
87
  'correct_answer': value['correctAnswer'],
87
- 'explanation': value['explanation'],
88
+ 'explanation': (0, RichTextInput_1.RichTextInputToJSON)(value['explanation']),
88
89
  'topic': value['topic'],
89
90
  'difficulty_level': value['difficultyLevel'],
90
91
  'tags': value['tags'],
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { RichTextInput } from './RichTextInput';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -17,10 +18,10 @@
17
18
  export interface PostQuestionAnswerChoicesInner {
18
19
  /**
19
20
  *
20
- * @type {string}
21
+ * @type {RichTextInput}
21
22
  * @memberof PostQuestionAnswerChoicesInner
22
23
  */
23
- text: string;
24
+ text: RichTextInput;
24
25
  /**
25
26
  *
26
27
  * @type {boolean}
@@ -18,6 +18,7 @@ exports.PostQuestionAnswerChoicesInnerFromJSON = PostQuestionAnswerChoicesInnerF
18
18
  exports.PostQuestionAnswerChoicesInnerFromJSONTyped = PostQuestionAnswerChoicesInnerFromJSONTyped;
19
19
  exports.PostQuestionAnswerChoicesInnerToJSON = PostQuestionAnswerChoicesInnerToJSON;
20
20
  exports.PostQuestionAnswerChoicesInnerToJSONTyped = PostQuestionAnswerChoicesInnerToJSONTyped;
21
+ const RichTextInput_1 = require("./RichTextInput");
21
22
  /**
22
23
  * Check if a given object implements the PostQuestionAnswerChoicesInner interface.
23
24
  */
@@ -36,7 +37,7 @@ function PostQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscriminator)
36
37
  return json;
37
38
  }
38
39
  return {
39
- 'text': json['text'],
40
+ 'text': (0, RichTextInput_1.RichTextInputFromJSON)(json['text']),
40
41
  'isCorrect': json['is_correct'],
41
42
  };
42
43
  }
@@ -48,7 +49,7 @@ function PostQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscriminator =
48
49
  return value;
49
50
  }
50
51
  return {
51
- 'text': value['text'],
52
+ 'text': (0, RichTextInput_1.RichTextInputToJSON)(value['text']),
52
53
  'is_correct': value['isCorrect'],
53
54
  };
54
55
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface PostRichTextAssetComplete
16
+ */
17
+ export interface PostRichTextAssetComplete {
18
+ /**
19
+ * Uploaded size confirmed by the client
20
+ * @type {number}
21
+ * @memberof PostRichTextAssetComplete
22
+ */
23
+ byteSize: number;
24
+ /**
25
+ * Image width in pixels
26
+ * @type {number}
27
+ * @memberof PostRichTextAssetComplete
28
+ */
29
+ width?: number;
30
+ /**
31
+ * Image height in pixels
32
+ * @type {number}
33
+ * @memberof PostRichTextAssetComplete
34
+ */
35
+ height?: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PostRichTextAssetComplete interface.
39
+ */
40
+ export declare function instanceOfPostRichTextAssetComplete(value: object): value is PostRichTextAssetComplete;
41
+ export declare function PostRichTextAssetCompleteFromJSON(json: any): PostRichTextAssetComplete;
42
+ export declare function PostRichTextAssetCompleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostRichTextAssetComplete;
43
+ export declare function PostRichTextAssetCompleteToJSON(json: any): PostRichTextAssetComplete;
44
+ export declare function PostRichTextAssetCompleteToJSONTyped(value?: PostRichTextAssetComplete | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfPostRichTextAssetComplete = instanceOfPostRichTextAssetComplete;
17
+ exports.PostRichTextAssetCompleteFromJSON = PostRichTextAssetCompleteFromJSON;
18
+ exports.PostRichTextAssetCompleteFromJSONTyped = PostRichTextAssetCompleteFromJSONTyped;
19
+ exports.PostRichTextAssetCompleteToJSON = PostRichTextAssetCompleteToJSON;
20
+ exports.PostRichTextAssetCompleteToJSONTyped = PostRichTextAssetCompleteToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PostRichTextAssetComplete interface.
23
+ */
24
+ function instanceOfPostRichTextAssetComplete(value) {
25
+ if (!('byteSize' in value) || value['byteSize'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function PostRichTextAssetCompleteFromJSON(json) {
30
+ return PostRichTextAssetCompleteFromJSONTyped(json, false);
31
+ }
32
+ function PostRichTextAssetCompleteFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'byteSize': json['byte_size'],
38
+ 'width': json['width'] == null ? undefined : json['width'],
39
+ 'height': json['height'] == null ? undefined : json['height'],
40
+ };
41
+ }
42
+ function PostRichTextAssetCompleteToJSON(json) {
43
+ return PostRichTextAssetCompleteToJSONTyped(json, false);
44
+ }
45
+ function PostRichTextAssetCompleteToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'byte_size': value['byteSize'],
51
+ 'width': value['width'],
52
+ 'height': value['height'],
53
+ };
54
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface PostRichTextAssetUpload
16
+ */
17
+ export interface PostRichTextAssetUpload {
18
+ /**
19
+ * Original file name
20
+ * @type {string}
21
+ * @memberof PostRichTextAssetUpload
22
+ */
23
+ filename: string;
24
+ /**
25
+ * Expected MIME type
26
+ * @type {string}
27
+ * @memberof PostRichTextAssetUpload
28
+ */
29
+ mimeType: string;
30
+ /**
31
+ * Expected upload size in bytes
32
+ * @type {number}
33
+ * @memberof PostRichTextAssetUpload
34
+ */
35
+ byteSize: number;
36
+ /**
37
+ * Image width in pixels
38
+ * @type {number}
39
+ * @memberof PostRichTextAssetUpload
40
+ */
41
+ width?: number;
42
+ /**
43
+ * Image height in pixels
44
+ * @type {number}
45
+ * @memberof PostRichTextAssetUpload
46
+ */
47
+ height?: number;
48
+ /**
49
+ * Asset access policy context
50
+ * @type {PostRichTextAssetUploadUsageContextEnum}
51
+ * @memberof PostRichTextAssetUpload
52
+ */
53
+ usageContext: PostRichTextAssetUploadUsageContextEnum;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const PostRichTextAssetUploadUsageContextEnum: {
59
+ readonly LearningContent: "learning_content";
60
+ };
61
+ export type PostRichTextAssetUploadUsageContextEnum = typeof PostRichTextAssetUploadUsageContextEnum[keyof typeof PostRichTextAssetUploadUsageContextEnum];
62
+ /**
63
+ * Check if a given object implements the PostRichTextAssetUpload interface.
64
+ */
65
+ export declare function instanceOfPostRichTextAssetUpload(value: object): value is PostRichTextAssetUpload;
66
+ export declare function PostRichTextAssetUploadFromJSON(json: any): PostRichTextAssetUpload;
67
+ export declare function PostRichTextAssetUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostRichTextAssetUpload;
68
+ export declare function PostRichTextAssetUploadToJSON(json: any): PostRichTextAssetUpload;
69
+ export declare function PostRichTextAssetUploadToJSONTyped(value?: PostRichTextAssetUpload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PostRichTextAssetUploadUsageContextEnum = void 0;
17
+ exports.instanceOfPostRichTextAssetUpload = instanceOfPostRichTextAssetUpload;
18
+ exports.PostRichTextAssetUploadFromJSON = PostRichTextAssetUploadFromJSON;
19
+ exports.PostRichTextAssetUploadFromJSONTyped = PostRichTextAssetUploadFromJSONTyped;
20
+ exports.PostRichTextAssetUploadToJSON = PostRichTextAssetUploadToJSON;
21
+ exports.PostRichTextAssetUploadToJSONTyped = PostRichTextAssetUploadToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.PostRichTextAssetUploadUsageContextEnum = {
26
+ LearningContent: 'learning_content'
27
+ };
28
+ /**
29
+ * Check if a given object implements the PostRichTextAssetUpload interface.
30
+ */
31
+ function instanceOfPostRichTextAssetUpload(value) {
32
+ if (!('filename' in value) || value['filename'] === undefined)
33
+ return false;
34
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
35
+ return false;
36
+ if (!('byteSize' in value) || value['byteSize'] === undefined)
37
+ return false;
38
+ if (!('usageContext' in value) || value['usageContext'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function PostRichTextAssetUploadFromJSON(json) {
43
+ return PostRichTextAssetUploadFromJSONTyped(json, false);
44
+ }
45
+ function PostRichTextAssetUploadFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'filename': json['filename'],
51
+ 'mimeType': json['mime_type'],
52
+ 'byteSize': json['byte_size'],
53
+ 'width': json['width'] == null ? undefined : json['width'],
54
+ 'height': json['height'] == null ? undefined : json['height'],
55
+ 'usageContext': json['usage_context'],
56
+ };
57
+ }
58
+ function PostRichTextAssetUploadToJSON(json) {
59
+ return PostRichTextAssetUploadToJSONTyped(json, false);
60
+ }
61
+ function PostRichTextAssetUploadToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'filename': value['filename'],
67
+ 'mime_type': value['mimeType'],
68
+ 'byte_size': value['byteSize'],
69
+ 'width': value['width'],
70
+ 'height': value['height'],
71
+ 'usage_context': value['usageContext'],
72
+ };
73
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PutQuestionAnswerChoicesInner } from './PutQuestionAnswerChoicesInner';
13
+ import type { RichTextInput } from './RichTextInput';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -17,11 +18,11 @@ import type { PutQuestionAnswerChoicesInner } from './PutQuestionAnswerChoicesIn
17
18
  */
18
19
  export interface PutQuestion {
19
20
  /**
20
- * The main question text or prompt
21
- * @type {string}
21
+ *
22
+ * @type {RichTextInput}
22
23
  * @memberof PutQuestion
23
24
  */
24
- questionText?: string;
25
+ questionText?: RichTextInput;
25
26
  /**
26
27
  * Type of question
27
28
  * @type {PutQuestionQuestionTypeEnum}
@@ -41,11 +42,11 @@ export interface PutQuestion {
41
42
  */
42
43
  correctAnswer?: string;
43
44
  /**
44
- * Explanation of the correct answer
45
- * @type {string}
45
+ *
46
+ * @type {RichTextInput}
46
47
  * @memberof PutQuestion
47
48
  */
48
- explanation?: string;
49
+ explanation?: RichTextInput;
49
50
  /**
50
51
  * Topic category (Fire Alarm, Fire Pump, Fire Sprinkler, etc.)
51
52
  * @type {string}
@@ -20,6 +20,7 @@ exports.PutQuestionFromJSONTyped = PutQuestionFromJSONTyped;
20
20
  exports.PutQuestionToJSON = PutQuestionToJSON;
21
21
  exports.PutQuestionToJSONTyped = PutQuestionToJSONTyped;
22
22
  const PutQuestionAnswerChoicesInner_1 = require("./PutQuestionAnswerChoicesInner");
23
+ const RichTextInput_1 = require("./RichTextInput");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -53,11 +54,11 @@ function PutQuestionFromJSONTyped(json, ignoreDiscriminator) {
53
54
  return json;
54
55
  }
55
56
  return {
56
- 'questionText': json['question_text'] == null ? undefined : json['question_text'],
57
+ 'questionText': json['question_text'] == null ? undefined : (0, RichTextInput_1.RichTextInputFromJSON)(json['question_text']),
57
58
  'questionType': json['question_type'] == null ? undefined : json['question_type'],
58
59
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(PutQuestionAnswerChoicesInner_1.PutQuestionAnswerChoicesInnerFromJSON)),
59
60
  'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
60
- 'explanation': json['explanation'] == null ? undefined : json['explanation'],
61
+ 'explanation': json['explanation'] == null ? undefined : (0, RichTextInput_1.RichTextInputFromJSON)(json['explanation']),
61
62
  'topic': json['topic'] == null ? undefined : json['topic'],
62
63
  'difficultyLevel': json['difficulty_level'] == null ? undefined : json['difficulty_level'],
63
64
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -72,11 +73,11 @@ function PutQuestionToJSONTyped(value, ignoreDiscriminator = false) {
72
73
  return value;
73
74
  }
74
75
  return {
75
- 'question_text': value['questionText'],
76
+ 'question_text': (0, RichTextInput_1.RichTextInputToJSON)(value['questionText']),
76
77
  'question_type': value['questionType'],
77
78
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(PutQuestionAnswerChoicesInner_1.PutQuestionAnswerChoicesInnerToJSON)),
78
79
  'correct_answer': value['correctAnswer'],
79
- 'explanation': value['explanation'],
80
+ 'explanation': (0, RichTextInput_1.RichTextInputToJSON)(value['explanation']),
80
81
  'topic': value['topic'],
81
82
  'difficulty_level': value['difficultyLevel'],
82
83
  'tags': value['tags'],
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { RichTextInput } from './RichTextInput';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -23,10 +24,10 @@ export interface PutQuestionAnswerChoicesInner {
23
24
  id?: string;
24
25
  /**
25
26
  *
26
- * @type {string}
27
+ * @type {RichTextInput}
27
28
  * @memberof PutQuestionAnswerChoicesInner
28
29
  */
29
- text: string;
30
+ text: RichTextInput;
30
31
  /**
31
32
  *
32
33
  * @type {boolean}
@@ -18,6 +18,7 @@ exports.PutQuestionAnswerChoicesInnerFromJSON = PutQuestionAnswerChoicesInnerFro
18
18
  exports.PutQuestionAnswerChoicesInnerFromJSONTyped = PutQuestionAnswerChoicesInnerFromJSONTyped;
19
19
  exports.PutQuestionAnswerChoicesInnerToJSON = PutQuestionAnswerChoicesInnerToJSON;
20
20
  exports.PutQuestionAnswerChoicesInnerToJSONTyped = PutQuestionAnswerChoicesInnerToJSONTyped;
21
+ const RichTextInput_1 = require("./RichTextInput");
21
22
  /**
22
23
  * Check if a given object implements the PutQuestionAnswerChoicesInner interface.
23
24
  */
@@ -37,7 +38,7 @@ function PutQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscriminator) {
37
38
  }
38
39
  return {
39
40
  'id': json['id'] == null ? undefined : json['id'],
40
- 'text': json['text'],
41
+ 'text': (0, RichTextInput_1.RichTextInputFromJSON)(json['text']),
41
42
  'isCorrect': json['is_correct'],
42
43
  };
43
44
  }
@@ -50,7 +51,7 @@ function PutQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscriminator = f
50
51
  }
51
52
  return {
52
53
  'id': value['id'],
53
- 'text': value['text'],
54
+ 'text': (0, RichTextInput_1.RichTextInputToJSON)(value['text']),
54
55
  'is_correct': value['isCorrect'],
55
56
  };
56
57
  }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface RichTextAsset
16
+ */
17
+ export interface RichTextAsset {
18
+ /**
19
+ * Rich text asset external identifier
20
+ * @type {string}
21
+ * @memberof RichTextAsset
22
+ */
23
+ id: string;
24
+ /**
25
+ * Asset MIME type
26
+ * @type {string}
27
+ * @memberof RichTextAsset
28
+ */
29
+ mimeType: string;
30
+ /**
31
+ * Uploaded asset size in bytes
32
+ * @type {number}
33
+ * @memberof RichTextAsset
34
+ */
35
+ byteSize: number;
36
+ /**
37
+ * Image width in pixels
38
+ * @type {number}
39
+ * @memberof RichTextAsset
40
+ */
41
+ width?: number;
42
+ /**
43
+ * Image height in pixels
44
+ * @type {number}
45
+ * @memberof RichTextAsset
46
+ */
47
+ height?: number;
48
+ /**
49
+ * Authenticated API URL that redirects to a signed asset URL
50
+ * @type {string}
51
+ * @memberof RichTextAsset
52
+ */
53
+ renderUrl: string;
54
+ }
55
+ /**
56
+ * Check if a given object implements the RichTextAsset interface.
57
+ */
58
+ export declare function instanceOfRichTextAsset(value: object): value is RichTextAsset;
59
+ export declare function RichTextAssetFromJSON(json: any): RichTextAsset;
60
+ export declare function RichTextAssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): RichTextAsset;
61
+ export declare function RichTextAssetToJSON(json: any): RichTextAsset;
62
+ export declare function RichTextAssetToJSONTyped(value?: RichTextAsset | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfRichTextAsset = instanceOfRichTextAsset;
17
+ exports.RichTextAssetFromJSON = RichTextAssetFromJSON;
18
+ exports.RichTextAssetFromJSONTyped = RichTextAssetFromJSONTyped;
19
+ exports.RichTextAssetToJSON = RichTextAssetToJSON;
20
+ exports.RichTextAssetToJSONTyped = RichTextAssetToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the RichTextAsset interface.
23
+ */
24
+ function instanceOfRichTextAsset(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
28
+ return false;
29
+ if (!('byteSize' in value) || value['byteSize'] === undefined)
30
+ return false;
31
+ if (!('renderUrl' in value) || value['renderUrl'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function RichTextAssetFromJSON(json) {
36
+ return RichTextAssetFromJSONTyped(json, false);
37
+ }
38
+ function RichTextAssetFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'id': json['id'],
44
+ 'mimeType': json['mime_type'],
45
+ 'byteSize': json['byte_size'],
46
+ 'width': json['width'] == null ? undefined : json['width'],
47
+ 'height': json['height'] == null ? undefined : json['height'],
48
+ 'renderUrl': json['render_url'],
49
+ };
50
+ }
51
+ function RichTextAssetToJSON(json) {
52
+ return RichTextAssetToJSONTyped(json, false);
53
+ }
54
+ function RichTextAssetToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'id': value['id'],
60
+ 'mime_type': value['mimeType'],
61
+ 'byte_size': value['byteSize'],
62
+ 'width': value['width'],
63
+ 'height': value['height'],
64
+ 'render_url': value['renderUrl'],
65
+ };
66
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { RichTextAsset } from './RichTextAsset';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RichTextDocument
17
+ */
18
+ export interface RichTextDocument {
19
+ /**
20
+ * Rich text document format
21
+ * @type {RichTextDocumentFormatEnum}
22
+ * @memberof RichTextDocument
23
+ */
24
+ format: RichTextDocumentFormatEnum;
25
+ /**
26
+ * TipTap/ProseMirror JSON document
27
+ * @type {{ [key: string]: any; }}
28
+ * @memberof RichTextDocument
29
+ */
30
+ document: {
31
+ [key: string]: any;
32
+ };
33
+ /**
34
+ * Server-derived plain text for search and previews
35
+ * @type {string}
36
+ * @memberof RichTextDocument
37
+ */
38
+ plainText: string;
39
+ /**
40
+ * Assets referenced by the document
41
+ * @type {Array<RichTextAsset>}
42
+ * @memberof RichTextDocument
43
+ */
44
+ assets: Array<RichTextAsset>;
45
+ }
46
+ /**
47
+ * @export
48
+ */
49
+ export declare const RichTextDocumentFormatEnum: {
50
+ readonly TiptapV2: "tiptap-v2";
51
+ };
52
+ export type RichTextDocumentFormatEnum = typeof RichTextDocumentFormatEnum[keyof typeof RichTextDocumentFormatEnum];
53
+ /**
54
+ * Check if a given object implements the RichTextDocument interface.
55
+ */
56
+ export declare function instanceOfRichTextDocument(value: object): value is RichTextDocument;
57
+ export declare function RichTextDocumentFromJSON(json: any): RichTextDocument;
58
+ export declare function RichTextDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): RichTextDocument;
59
+ export declare function RichTextDocumentToJSON(json: any): RichTextDocument;
60
+ export declare function RichTextDocumentToJSONTyped(value?: RichTextDocument | null, ignoreDiscriminator?: boolean): any;