@easyedu/js-lsm-api 1.79.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 (133) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +18 -2
  3. package/dist/apis/RichTextApi.d.ts +67 -0
  4. package/dist/apis/RichTextApi.js +158 -0
  5. package/dist/apis/UserApi.d.ts +42 -0
  6. package/dist/apis/UserApi.js +79 -1
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/RichTextApi.d.ts +67 -0
  10. package/dist/esm/apis/RichTextApi.js +154 -0
  11. package/dist/esm/apis/UserApi.d.ts +42 -0
  12. package/dist/esm/apis/UserApi.js +78 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/GetQuestion.d.ts +7 -6
  16. package/dist/esm/models/GetQuestion.js +5 -4
  17. package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  18. package/dist/esm/models/GetQuestionAnswerChoicesInner.js +3 -2
  19. package/dist/esm/models/GetRichTextAssetUpload.d.ts +50 -0
  20. package/dist/esm/models/GetRichTextAssetUpload.js +55 -0
  21. package/dist/esm/models/GetUserCourseList.d.ts +57 -0
  22. package/dist/esm/models/GetUserCourseList.js +60 -0
  23. package/dist/esm/models/GetUserCourseListItem.d.ts +54 -0
  24. package/dist/esm/models/GetUserCourseListItem.js +59 -0
  25. package/dist/esm/models/GetUserCourseListItemCertificate.d.ts +74 -0
  26. package/dist/esm/models/GetUserCourseListItemCertificate.js +75 -0
  27. package/dist/esm/models/GetUserCourseListItemCourse.d.ts +89 -0
  28. package/dist/esm/models/GetUserCourseListItemCourse.js +82 -0
  29. package/dist/esm/models/GetUserCourseListItemEnrollment.d.ts +111 -0
  30. package/dist/esm/models/GetUserCourseListItemEnrollment.js +105 -0
  31. package/dist/esm/models/GetUserCourseListItemProgress.d.ts +44 -0
  32. package/dist/esm/models/GetUserCourseListItemProgress.js +51 -0
  33. package/dist/esm/models/PostQuestion.d.ts +7 -6
  34. package/dist/esm/models/PostQuestion.js +5 -4
  35. package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  36. package/dist/esm/models/PostQuestionAnswerChoicesInner.js +3 -2
  37. package/dist/esm/models/PostRichTextAssetComplete.d.ts +44 -0
  38. package/dist/esm/models/PostRichTextAssetComplete.js +47 -0
  39. package/dist/esm/models/PostRichTextAssetUpload.d.ts +69 -0
  40. package/dist/esm/models/PostRichTextAssetUpload.js +65 -0
  41. package/dist/esm/models/PutQuestion.d.ts +7 -6
  42. package/dist/esm/models/PutQuestion.js +5 -4
  43. package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  44. package/dist/esm/models/PutQuestionAnswerChoicesInner.js +3 -2
  45. package/dist/esm/models/RichTextAsset.d.ts +62 -0
  46. package/dist/esm/models/RichTextAsset.js +59 -0
  47. package/dist/esm/models/RichTextDocument.d.ts +60 -0
  48. package/dist/esm/models/RichTextDocument.js +62 -0
  49. package/dist/esm/models/RichTextInput.d.ts +47 -0
  50. package/dist/esm/models/RichTextInput.js +53 -0
  51. package/dist/esm/models/index.d.ts +12 -0
  52. package/dist/esm/models/index.js +12 -0
  53. package/dist/models/GetQuestion.d.ts +7 -6
  54. package/dist/models/GetQuestion.js +5 -4
  55. package/dist/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  56. package/dist/models/GetQuestionAnswerChoicesInner.js +3 -2
  57. package/dist/models/GetRichTextAssetUpload.d.ts +50 -0
  58. package/dist/models/GetRichTextAssetUpload.js +62 -0
  59. package/dist/models/GetUserCourseList.d.ts +57 -0
  60. package/dist/models/GetUserCourseList.js +67 -0
  61. package/dist/models/GetUserCourseListItem.d.ts +54 -0
  62. package/dist/models/GetUserCourseListItem.js +66 -0
  63. package/dist/models/GetUserCourseListItemCertificate.d.ts +74 -0
  64. package/dist/models/GetUserCourseListItemCertificate.js +83 -0
  65. package/dist/models/GetUserCourseListItemCourse.d.ts +89 -0
  66. package/dist/models/GetUserCourseListItemCourse.js +90 -0
  67. package/dist/models/GetUserCourseListItemEnrollment.d.ts +111 -0
  68. package/dist/models/GetUserCourseListItemEnrollment.js +113 -0
  69. package/dist/models/GetUserCourseListItemProgress.d.ts +44 -0
  70. package/dist/models/GetUserCourseListItemProgress.js +58 -0
  71. package/dist/models/PostQuestion.d.ts +7 -6
  72. package/dist/models/PostQuestion.js +5 -4
  73. package/dist/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  74. package/dist/models/PostQuestionAnswerChoicesInner.js +3 -2
  75. package/dist/models/PostRichTextAssetComplete.d.ts +44 -0
  76. package/dist/models/PostRichTextAssetComplete.js +54 -0
  77. package/dist/models/PostRichTextAssetUpload.d.ts +69 -0
  78. package/dist/models/PostRichTextAssetUpload.js +73 -0
  79. package/dist/models/PutQuestion.d.ts +7 -6
  80. package/dist/models/PutQuestion.js +5 -4
  81. package/dist/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  82. package/dist/models/PutQuestionAnswerChoicesInner.js +3 -2
  83. package/dist/models/RichTextAsset.d.ts +62 -0
  84. package/dist/models/RichTextAsset.js +66 -0
  85. package/dist/models/RichTextDocument.d.ts +60 -0
  86. package/dist/models/RichTextDocument.js +70 -0
  87. package/dist/models/RichTextInput.d.ts +47 -0
  88. package/dist/models/RichTextInput.js +61 -0
  89. package/dist/models/index.d.ts +12 -0
  90. package/dist/models/index.js +12 -0
  91. package/docs/GetQuestion.md +2 -2
  92. package/docs/GetQuestionAnswerChoicesInner.md +1 -1
  93. package/docs/GetRichTextAssetUpload.md +40 -0
  94. package/docs/GetUserCourseList.md +43 -0
  95. package/docs/GetUserCourseListItem.md +41 -0
  96. package/docs/GetUserCourseListItemCertificate.md +43 -0
  97. package/docs/GetUserCourseListItemCourse.md +51 -0
  98. package/docs/GetUserCourseListItemEnrollment.md +49 -0
  99. package/docs/GetUserCourseListItemProgress.md +39 -0
  100. package/docs/PostQuestion.md +2 -2
  101. package/docs/PostQuestionAnswerChoicesInner.md +1 -1
  102. package/docs/PostRichTextAssetComplete.md +38 -0
  103. package/docs/PostRichTextAssetUpload.md +44 -0
  104. package/docs/PutQuestion.md +2 -2
  105. package/docs/PutQuestionAnswerChoicesInner.md +1 -1
  106. package/docs/RichTextApi.md +212 -0
  107. package/docs/RichTextAsset.md +44 -0
  108. package/docs/RichTextDocument.md +40 -0
  109. package/docs/RichTextInput.md +36 -0
  110. package/docs/UserApi.md +90 -0
  111. package/package.json +1 -1
  112. package/src/apis/RichTextApi.ts +201 -0
  113. package/src/apis/UserApi.ts +108 -0
  114. package/src/apis/index.ts +1 -0
  115. package/src/models/GetQuestion.ts +17 -10
  116. package/src/models/GetQuestionAnswerChoicesInner.ts +12 -4
  117. package/src/models/GetRichTextAssetUpload.ts +93 -0
  118. package/src/models/GetUserCourseList.ts +110 -0
  119. package/src/models/GetUserCourseListItem.ts +122 -0
  120. package/src/models/GetUserCourseListItemCertificate.ts +124 -0
  121. package/src/models/GetUserCourseListItemCourse.ts +149 -0
  122. package/src/models/GetUserCourseListItemEnrollment.ts +171 -0
  123. package/src/models/GetUserCourseListItemProgress.ts +84 -0
  124. package/src/models/PostQuestion.ts +17 -10
  125. package/src/models/PostQuestionAnswerChoicesInner.ts +12 -4
  126. package/src/models/PostRichTextAssetComplete.ts +82 -0
  127. package/src/models/PostRichTextAssetUpload.ts +119 -0
  128. package/src/models/PutQuestion.ts +17 -10
  129. package/src/models/PutQuestionAnswerChoicesInner.ts +12 -4
  130. package/src/models/RichTextAsset.ts +109 -0
  131. package/src/models/RichTextDocument.ts +111 -0
  132. package/src/models/RichTextInput.ts +85 -0
  133. package/src/models/index.ts +12 -0
@@ -0,0 +1,171 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Selected enrollment fields for an enrolled user's course list item.
18
+ * @export
19
+ * @interface GetUserCourseListItemEnrollment
20
+ */
21
+ export interface GetUserCourseListItemEnrollment {
22
+ /**
23
+ * The external ID of the selected enrollment.
24
+ * @type {string}
25
+ * @memberof GetUserCourseListItemEnrollment
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {GetUserCourseListItemEnrollmentStatusEnum}
31
+ * @memberof GetUserCourseListItemEnrollment
32
+ */
33
+ status: GetUserCourseListItemEnrollmentStatusEnum;
34
+ /**
35
+ *
36
+ * @type {GetUserCourseListItemEnrollmentAccessStateEnum}
37
+ * @memberof GetUserCourseListItemEnrollment
38
+ */
39
+ accessState: GetUserCourseListItemEnrollmentAccessStateEnum;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof GetUserCourseListItemEnrollment
44
+ */
45
+ daysUntilExpiry: number | null;
46
+ /**
47
+ *
48
+ * @type {GetUserCourseListItemEnrollmentUserTypeEnum}
49
+ * @memberof GetUserCourseListItemEnrollment
50
+ */
51
+ userType: GetUserCourseListItemEnrollmentUserTypeEnum;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof GetUserCourseListItemEnrollment
56
+ */
57
+ enrollmentDateStart: number;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof GetUserCourseListItemEnrollment
62
+ */
63
+ enrollmentDateEnd: number | null;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof GetUserCourseListItemEnrollment
68
+ */
69
+ completionDate: number | null;
70
+ }
71
+
72
+
73
+ /**
74
+ * @export
75
+ */
76
+ export const GetUserCourseListItemEnrollmentStatusEnum = {
77
+ Enrolled: 'Enrolled',
78
+ InProgress: 'InProgress',
79
+ Completed: 'Completed',
80
+ Failed: 'Failed',
81
+ Expired: 'Expired',
82
+ Withdrawn: 'Withdrawn',
83
+ Removed: 'Removed',
84
+ Archived: 'Archived',
85
+ Suspended: 'Suspended'
86
+ } as const;
87
+ export type GetUserCourseListItemEnrollmentStatusEnum = typeof GetUserCourseListItemEnrollmentStatusEnum[keyof typeof GetUserCourseListItemEnrollmentStatusEnum];
88
+
89
+ /**
90
+ * @export
91
+ */
92
+ export const GetUserCourseListItemEnrollmentAccessStateEnum = {
93
+ Active: 'active',
94
+ CompletedReview: 'completed_review',
95
+ Expired: 'expired',
96
+ Suspended: 'suspended',
97
+ Failed: 'failed',
98
+ Withdrawn: 'withdrawn',
99
+ Removed: 'removed',
100
+ Archived: 'archived'
101
+ } as const;
102
+ export type GetUserCourseListItemEnrollmentAccessStateEnum = typeof GetUserCourseListItemEnrollmentAccessStateEnum[keyof typeof GetUserCourseListItemEnrollmentAccessStateEnum];
103
+
104
+ /**
105
+ * @export
106
+ */
107
+ export const GetUserCourseListItemEnrollmentUserTypeEnum = {
108
+ Student: 'Student',
109
+ Instructor: 'Instructor'
110
+ } as const;
111
+ export type GetUserCourseListItemEnrollmentUserTypeEnum = typeof GetUserCourseListItemEnrollmentUserTypeEnum[keyof typeof GetUserCourseListItemEnrollmentUserTypeEnum];
112
+
113
+
114
+ /**
115
+ * Check if a given object implements the GetUserCourseListItemEnrollment interface.
116
+ */
117
+ export function instanceOfGetUserCourseListItemEnrollment(value: object): value is GetUserCourseListItemEnrollment {
118
+ if (!('id' in value) || value['id'] === undefined) return false;
119
+ if (!('status' in value) || value['status'] === undefined) return false;
120
+ if (!('accessState' in value) || value['accessState'] === undefined) return false;
121
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined) return false;
122
+ if (!('userType' in value) || value['userType'] === undefined) return false;
123
+ if (!('enrollmentDateStart' in value) || value['enrollmentDateStart'] === undefined) return false;
124
+ if (!('enrollmentDateEnd' in value) || value['enrollmentDateEnd'] === undefined) return false;
125
+ if (!('completionDate' in value) || value['completionDate'] === undefined) return false;
126
+ return true;
127
+ }
128
+
129
+ export function GetUserCourseListItemEnrollmentFromJSON(json: any): GetUserCourseListItemEnrollment {
130
+ return GetUserCourseListItemEnrollmentFromJSONTyped(json, false);
131
+ }
132
+
133
+ export function GetUserCourseListItemEnrollmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseListItemEnrollment {
134
+ if (json == null) {
135
+ return json;
136
+ }
137
+ return {
138
+
139
+ 'id': json['id'],
140
+ 'status': json['status'],
141
+ 'accessState': json['access_state'],
142
+ 'daysUntilExpiry': json['days_until_expiry'],
143
+ 'userType': json['user_type'],
144
+ 'enrollmentDateStart': json['enrollment_date_start'],
145
+ 'enrollmentDateEnd': json['enrollment_date_end'],
146
+ 'completionDate': json['completion_date'],
147
+ };
148
+ }
149
+
150
+ export function GetUserCourseListItemEnrollmentToJSON(json: any): GetUserCourseListItemEnrollment {
151
+ return GetUserCourseListItemEnrollmentToJSONTyped(json, false);
152
+ }
153
+
154
+ export function GetUserCourseListItemEnrollmentToJSONTyped(value?: GetUserCourseListItemEnrollment | null, ignoreDiscriminator: boolean = false): any {
155
+ if (value == null) {
156
+ return value;
157
+ }
158
+
159
+ return {
160
+
161
+ 'id': value['id'],
162
+ 'status': value['status'],
163
+ 'access_state': value['accessState'],
164
+ 'days_until_expiry': value['daysUntilExpiry'],
165
+ 'user_type': value['userType'],
166
+ 'enrollment_date_start': value['enrollmentDateStart'],
167
+ 'enrollment_date_end': value['enrollmentDateEnd'],
168
+ 'completion_date': value['completionDate'],
169
+ };
170
+ }
171
+
@@ -0,0 +1,84 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Learner progress for an enrolled user's course list item.
18
+ * @export
19
+ * @interface GetUserCourseListItemProgress
20
+ */
21
+ export interface GetUserCourseListItemProgress {
22
+ /**
23
+ * Completed visible content divided by total visible content. Null when total content count is zero.
24
+ * @type {number}
25
+ * @memberof GetUserCourseListItemProgress
26
+ */
27
+ completionPercentage: number | null;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof GetUserCourseListItemProgress
32
+ */
33
+ completedContentCount: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof GetUserCourseListItemProgress
38
+ */
39
+ totalContentCount: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the GetUserCourseListItemProgress interface.
44
+ */
45
+ export function instanceOfGetUserCourseListItemProgress(value: object): value is GetUserCourseListItemProgress {
46
+ if (!('completionPercentage' in value) || value['completionPercentage'] === undefined) return false;
47
+ if (!('completedContentCount' in value) || value['completedContentCount'] === undefined) return false;
48
+ if (!('totalContentCount' in value) || value['totalContentCount'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function GetUserCourseListItemProgressFromJSON(json: any): GetUserCourseListItemProgress {
53
+ return GetUserCourseListItemProgressFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetUserCourseListItemProgressFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseListItemProgress {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'completionPercentage': json['completion_percentage'],
63
+ 'completedContentCount': json['completed_content_count'],
64
+ 'totalContentCount': json['total_content_count'],
65
+ };
66
+ }
67
+
68
+ export function GetUserCourseListItemProgressToJSON(json: any): GetUserCourseListItemProgress {
69
+ return GetUserCourseListItemProgressToJSONTyped(json, false);
70
+ }
71
+
72
+ export function GetUserCourseListItemProgressToJSONTyped(value?: GetUserCourseListItemProgress | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'completion_percentage': value['completionPercentage'],
80
+ 'completed_content_count': value['completedContentCount'],
81
+ 'total_content_count': value['totalContentCount'],
82
+ };
83
+ }
84
+
@@ -20,6 +20,13 @@ import {
20
20
  PostQuestionAnswerChoicesInnerToJSON,
21
21
  PostQuestionAnswerChoicesInnerToJSONTyped,
22
22
  } from './PostQuestionAnswerChoicesInner';
23
+ import type { RichTextInput } from './RichTextInput';
24
+ import {
25
+ RichTextInputFromJSON,
26
+ RichTextInputFromJSONTyped,
27
+ RichTextInputToJSON,
28
+ RichTextInputToJSONTyped,
29
+ } from './RichTextInput';
23
30
 
24
31
  /**
25
32
  *
@@ -28,11 +35,11 @@ import {
28
35
  */
29
36
  export interface PostQuestion {
30
37
  /**
31
- * The main question text or prompt
32
- * @type {string}
38
+ *
39
+ * @type {RichTextInput}
33
40
  * @memberof PostQuestion
34
41
  */
35
- questionText: string;
42
+ questionText: RichTextInput;
36
43
  /**
37
44
  * Type of question
38
45
  * @type {PostQuestionQuestionTypeEnum}
@@ -52,11 +59,11 @@ export interface PostQuestion {
52
59
  */
53
60
  correctAnswer?: string;
54
61
  /**
55
- * Explanation of the correct answer
56
- * @type {string}
62
+ *
63
+ * @type {RichTextInput}
57
64
  * @memberof PostQuestion
58
65
  */
59
- explanation?: string;
66
+ explanation?: RichTextInput;
60
67
  /**
61
68
  * Topic category (Fire Alarm, Fire Pump, Fire Sprinkler, etc.)
62
69
  * @type {string}
@@ -129,11 +136,11 @@ export function PostQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolea
129
136
  }
130
137
  return {
131
138
 
132
- 'questionText': json['question_text'],
139
+ 'questionText': RichTextInputFromJSON(json['question_text']),
133
140
  'questionType': json['question_type'],
134
141
  'answerChoices': json['answer_choices'] == null ? undefined : ((json['answer_choices'] as Array<any>).map(PostQuestionAnswerChoicesInnerFromJSON)),
135
142
  'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
136
- 'explanation': json['explanation'] == null ? undefined : json['explanation'],
143
+ 'explanation': json['explanation'] == null ? undefined : RichTextInputFromJSON(json['explanation']),
137
144
  'topic': json['topic'],
138
145
  'difficultyLevel': json['difficulty_level'],
139
146
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -152,11 +159,11 @@ export function PostQuestionToJSONTyped(value?: PostQuestion | null, ignoreDiscr
152
159
 
153
160
  return {
154
161
 
155
- 'question_text': value['questionText'],
162
+ 'question_text': RichTextInputToJSON(value['questionText']),
156
163
  'question_type': value['questionType'],
157
164
  'answer_choices': value['answerChoices'] == null ? undefined : ((value['answerChoices'] as Array<any>).map(PostQuestionAnswerChoicesInnerToJSON)),
158
165
  'correct_answer': value['correctAnswer'],
159
- 'explanation': value['explanation'],
166
+ 'explanation': RichTextInputToJSON(value['explanation']),
160
167
  'topic': value['topic'],
161
168
  'difficulty_level': value['difficultyLevel'],
162
169
  'tags': value['tags'],
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { RichTextInput } from './RichTextInput';
17
+ import {
18
+ RichTextInputFromJSON,
19
+ RichTextInputFromJSONTyped,
20
+ RichTextInputToJSON,
21
+ RichTextInputToJSONTyped,
22
+ } from './RichTextInput';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -21,10 +29,10 @@ import { mapValues } from '../runtime';
21
29
  export interface PostQuestionAnswerChoicesInner {
22
30
  /**
23
31
  *
24
- * @type {string}
32
+ * @type {RichTextInput}
25
33
  * @memberof PostQuestionAnswerChoicesInner
26
34
  */
27
- text: string;
35
+ text: RichTextInput;
28
36
  /**
29
37
  *
30
38
  * @type {boolean}
@@ -52,7 +60,7 @@ export function PostQuestionAnswerChoicesInnerFromJSONTyped(json: any, ignoreDis
52
60
  }
53
61
  return {
54
62
 
55
- 'text': json['text'],
63
+ 'text': RichTextInputFromJSON(json['text']),
56
64
  'isCorrect': json['is_correct'],
57
65
  };
58
66
  }
@@ -68,7 +76,7 @@ export function PostQuestionAnswerChoicesInnerToJSONTyped(value?: PostQuestionAn
68
76
 
69
77
  return {
70
78
 
71
- 'text': value['text'],
79
+ 'text': RichTextInputToJSON(value['text']),
72
80
  'is_correct': value['isCorrect'],
73
81
  };
74
82
  }
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PostRichTextAssetComplete
20
+ */
21
+ export interface PostRichTextAssetComplete {
22
+ /**
23
+ * Uploaded size confirmed by the client
24
+ * @type {number}
25
+ * @memberof PostRichTextAssetComplete
26
+ */
27
+ byteSize: number;
28
+ /**
29
+ * Image width in pixels
30
+ * @type {number}
31
+ * @memberof PostRichTextAssetComplete
32
+ */
33
+ width?: number;
34
+ /**
35
+ * Image height in pixels
36
+ * @type {number}
37
+ * @memberof PostRichTextAssetComplete
38
+ */
39
+ height?: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the PostRichTextAssetComplete interface.
44
+ */
45
+ export function instanceOfPostRichTextAssetComplete(value: object): value is PostRichTextAssetComplete {
46
+ if (!('byteSize' in value) || value['byteSize'] === undefined) return false;
47
+ return true;
48
+ }
49
+
50
+ export function PostRichTextAssetCompleteFromJSON(json: any): PostRichTextAssetComplete {
51
+ return PostRichTextAssetCompleteFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function PostRichTextAssetCompleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostRichTextAssetComplete {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'byteSize': json['byte_size'],
61
+ 'width': json['width'] == null ? undefined : json['width'],
62
+ 'height': json['height'] == null ? undefined : json['height'],
63
+ };
64
+ }
65
+
66
+ export function PostRichTextAssetCompleteToJSON(json: any): PostRichTextAssetComplete {
67
+ return PostRichTextAssetCompleteToJSONTyped(json, false);
68
+ }
69
+
70
+ export function PostRichTextAssetCompleteToJSONTyped(value?: PostRichTextAssetComplete | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'byte_size': value['byteSize'],
78
+ 'width': value['width'],
79
+ 'height': value['height'],
80
+ };
81
+ }
82
+
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PostRichTextAssetUpload
20
+ */
21
+ export interface PostRichTextAssetUpload {
22
+ /**
23
+ * Original file name
24
+ * @type {string}
25
+ * @memberof PostRichTextAssetUpload
26
+ */
27
+ filename: string;
28
+ /**
29
+ * Expected MIME type
30
+ * @type {string}
31
+ * @memberof PostRichTextAssetUpload
32
+ */
33
+ mimeType: string;
34
+ /**
35
+ * Expected upload size in bytes
36
+ * @type {number}
37
+ * @memberof PostRichTextAssetUpload
38
+ */
39
+ byteSize: number;
40
+ /**
41
+ * Image width in pixels
42
+ * @type {number}
43
+ * @memberof PostRichTextAssetUpload
44
+ */
45
+ width?: number;
46
+ /**
47
+ * Image height in pixels
48
+ * @type {number}
49
+ * @memberof PostRichTextAssetUpload
50
+ */
51
+ height?: number;
52
+ /**
53
+ * Asset access policy context
54
+ * @type {PostRichTextAssetUploadUsageContextEnum}
55
+ * @memberof PostRichTextAssetUpload
56
+ */
57
+ usageContext: PostRichTextAssetUploadUsageContextEnum;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const PostRichTextAssetUploadUsageContextEnum = {
65
+ LearningContent: 'learning_content'
66
+ } as const;
67
+ export type PostRichTextAssetUploadUsageContextEnum = typeof PostRichTextAssetUploadUsageContextEnum[keyof typeof PostRichTextAssetUploadUsageContextEnum];
68
+
69
+
70
+ /**
71
+ * Check if a given object implements the PostRichTextAssetUpload interface.
72
+ */
73
+ export function instanceOfPostRichTextAssetUpload(value: object): value is PostRichTextAssetUpload {
74
+ if (!('filename' in value) || value['filename'] === undefined) return false;
75
+ if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
76
+ if (!('byteSize' in value) || value['byteSize'] === undefined) return false;
77
+ if (!('usageContext' in value) || value['usageContext'] === undefined) return false;
78
+ return true;
79
+ }
80
+
81
+ export function PostRichTextAssetUploadFromJSON(json: any): PostRichTextAssetUpload {
82
+ return PostRichTextAssetUploadFromJSONTyped(json, false);
83
+ }
84
+
85
+ export function PostRichTextAssetUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostRichTextAssetUpload {
86
+ if (json == null) {
87
+ return json;
88
+ }
89
+ return {
90
+
91
+ 'filename': json['filename'],
92
+ 'mimeType': json['mime_type'],
93
+ 'byteSize': json['byte_size'],
94
+ 'width': json['width'] == null ? undefined : json['width'],
95
+ 'height': json['height'] == null ? undefined : json['height'],
96
+ 'usageContext': json['usage_context'],
97
+ };
98
+ }
99
+
100
+ export function PostRichTextAssetUploadToJSON(json: any): PostRichTextAssetUpload {
101
+ return PostRichTextAssetUploadToJSONTyped(json, false);
102
+ }
103
+
104
+ export function PostRichTextAssetUploadToJSONTyped(value?: PostRichTextAssetUpload | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'filename': value['filename'],
112
+ 'mime_type': value['mimeType'],
113
+ 'byte_size': value['byteSize'],
114
+ 'width': value['width'],
115
+ 'height': value['height'],
116
+ 'usage_context': value['usageContext'],
117
+ };
118
+ }
119
+
@@ -20,6 +20,13 @@ import {
20
20
  PutQuestionAnswerChoicesInnerToJSON,
21
21
  PutQuestionAnswerChoicesInnerToJSONTyped,
22
22
  } from './PutQuestionAnswerChoicesInner';
23
+ import type { RichTextInput } from './RichTextInput';
24
+ import {
25
+ RichTextInputFromJSON,
26
+ RichTextInputFromJSONTyped,
27
+ RichTextInputToJSON,
28
+ RichTextInputToJSONTyped,
29
+ } from './RichTextInput';
23
30
 
24
31
  /**
25
32
  *
@@ -28,11 +35,11 @@ import {
28
35
  */
29
36
  export interface PutQuestion {
30
37
  /**
31
- * The main question text or prompt
32
- * @type {string}
38
+ *
39
+ * @type {RichTextInput}
33
40
  * @memberof PutQuestion
34
41
  */
35
- questionText?: string;
42
+ questionText?: RichTextInput;
36
43
  /**
37
44
  * Type of question
38
45
  * @type {PutQuestionQuestionTypeEnum}
@@ -52,11 +59,11 @@ export interface PutQuestion {
52
59
  */
53
60
  correctAnswer?: string;
54
61
  /**
55
- * Explanation of the correct answer
56
- * @type {string}
62
+ *
63
+ * @type {RichTextInput}
57
64
  * @memberof PutQuestion
58
65
  */
59
- explanation?: string;
66
+ explanation?: RichTextInput;
60
67
  /**
61
68
  * Topic category (Fire Alarm, Fire Pump, Fire Sprinkler, etc.)
62
69
  * @type {string}
@@ -125,11 +132,11 @@ export function PutQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean
125
132
  }
126
133
  return {
127
134
 
128
- 'questionText': json['question_text'] == null ? undefined : json['question_text'],
135
+ 'questionText': json['question_text'] == null ? undefined : RichTextInputFromJSON(json['question_text']),
129
136
  'questionType': json['question_type'] == null ? undefined : json['question_type'],
130
137
  'answerChoices': json['answer_choices'] == null ? undefined : ((json['answer_choices'] as Array<any>).map(PutQuestionAnswerChoicesInnerFromJSON)),
131
138
  'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
132
- 'explanation': json['explanation'] == null ? undefined : json['explanation'],
139
+ 'explanation': json['explanation'] == null ? undefined : RichTextInputFromJSON(json['explanation']),
133
140
  'topic': json['topic'] == null ? undefined : json['topic'],
134
141
  'difficultyLevel': json['difficulty_level'] == null ? undefined : json['difficulty_level'],
135
142
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -148,11 +155,11 @@ export function PutQuestionToJSONTyped(value?: PutQuestion | null, ignoreDiscrim
148
155
 
149
156
  return {
150
157
 
151
- 'question_text': value['questionText'],
158
+ 'question_text': RichTextInputToJSON(value['questionText']),
152
159
  'question_type': value['questionType'],
153
160
  'answer_choices': value['answerChoices'] == null ? undefined : ((value['answerChoices'] as Array<any>).map(PutQuestionAnswerChoicesInnerToJSON)),
154
161
  'correct_answer': value['correctAnswer'],
155
- 'explanation': value['explanation'],
162
+ 'explanation': RichTextInputToJSON(value['explanation']),
156
163
  'topic': value['topic'],
157
164
  'difficulty_level': value['difficultyLevel'],
158
165
  'tags': value['tags'],
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { RichTextInput } from './RichTextInput';
17
+ import {
18
+ RichTextInputFromJSON,
19
+ RichTextInputFromJSONTyped,
20
+ RichTextInputToJSON,
21
+ RichTextInputToJSONTyped,
22
+ } from './RichTextInput';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -27,10 +35,10 @@ export interface PutQuestionAnswerChoicesInner {
27
35
  id?: string;
28
36
  /**
29
37
  *
30
- * @type {string}
38
+ * @type {RichTextInput}
31
39
  * @memberof PutQuestionAnswerChoicesInner
32
40
  */
33
- text: string;
41
+ text: RichTextInput;
34
42
  /**
35
43
  *
36
44
  * @type {boolean}
@@ -59,7 +67,7 @@ export function PutQuestionAnswerChoicesInnerFromJSONTyped(json: any, ignoreDisc
59
67
  return {
60
68
 
61
69
  'id': json['id'] == null ? undefined : json['id'],
62
- 'text': json['text'],
70
+ 'text': RichTextInputFromJSON(json['text']),
63
71
  'isCorrect': json['is_correct'],
64
72
  };
65
73
  }
@@ -76,7 +84,7 @@ export function PutQuestionAnswerChoicesInnerToJSONTyped(value?: PutQuestionAnsw
76
84
  return {
77
85
 
78
86
  'id': value['id'],
79
- 'text': value['text'],
87
+ 'text': RichTextInputToJSON(value['text']),
80
88
  'is_correct': value['isCorrect'],
81
89
  };
82
90
  }