@easyedu/js-lsm-api 1.80.0 → 1.82.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 +12 -2
  3. package/dist/apis/RichTextApi.d.ts +83 -0
  4. package/dist/apis/RichTextApi.js +201 -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 +83 -0
  8. package/dist/esm/apis/RichTextApi.js +197 -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 +285 -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 +260 -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
@@ -0,0 +1,197 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { GetRichTextAssetUploadFromJSON, } from '../models/GetRichTextAssetUpload';
25
+ import { PostRichTextAssetCompleteToJSON, } from '../models/PostRichTextAssetComplete';
26
+ import { PostRichTextAssetUploadToJSON, } from '../models/PostRichTextAssetUpload';
27
+ import { RichTextAssetFromJSON, } from '../models/RichTextAsset';
28
+ /**
29
+ *
30
+ */
31
+ export class RichTextApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for getRichTextAsset without sending the request
34
+ */
35
+ getRichTextAssetRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['assetId'] == null) {
38
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling getRichTextAsset().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ let urlPath = `/rich-text/assets/{assetId}`;
43
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
44
+ return {
45
+ path: urlPath,
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ };
50
+ });
51
+ }
52
+ /**
53
+ * Redirect to a signed rich text asset URL
54
+ */
55
+ getRichTextAssetRaw(requestParameters, initOverrides) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const requestOptions = yield this.getRichTextAssetRequestOpts(requestParameters);
58
+ const response = yield this.request(requestOptions, initOverrides);
59
+ return new runtime.VoidApiResponse(response);
60
+ });
61
+ }
62
+ /**
63
+ * Redirect to a signed rich text asset URL
64
+ */
65
+ getRichTextAsset(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ yield this.getRichTextAssetRaw(requestParameters, initOverrides);
68
+ });
69
+ }
70
+ /**
71
+ * Creates request options for postRichTextAssetComplete without sending the request
72
+ */
73
+ postRichTextAssetCompleteRequestOpts(requestParameters) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ if (requestParameters['assetId'] == null) {
76
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling postRichTextAssetComplete().');
77
+ }
78
+ if (requestParameters['postRichTextAssetComplete'] == null) {
79
+ throw new runtime.RequiredError('postRichTextAssetComplete', 'Required parameter "postRichTextAssetComplete" was null or undefined when calling postRichTextAssetComplete().');
80
+ }
81
+ const queryParameters = {};
82
+ const headerParameters = {};
83
+ headerParameters['Content-Type'] = 'application/json';
84
+ let urlPath = `/rich-text/assets/{assetId}/complete`;
85
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
86
+ return {
87
+ path: urlPath,
88
+ method: 'POST',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ body: PostRichTextAssetCompleteToJSON(requestParameters['postRichTextAssetComplete']),
92
+ };
93
+ });
94
+ }
95
+ /**
96
+ * Complete a pending rich text asset upload
97
+ */
98
+ postRichTextAssetCompleteRaw(requestParameters, initOverrides) {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ const requestOptions = yield this.postRichTextAssetCompleteRequestOpts(requestParameters);
101
+ const response = yield this.request(requestOptions, initOverrides);
102
+ return new runtime.JSONApiResponse(response, (jsonValue) => RichTextAssetFromJSON(jsonValue));
103
+ });
104
+ }
105
+ /**
106
+ * Complete a pending rich text asset upload
107
+ */
108
+ postRichTextAssetComplete(requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ const response = yield this.postRichTextAssetCompleteRaw(requestParameters, initOverrides);
111
+ return yield response.value();
112
+ });
113
+ }
114
+ /**
115
+ * Creates request options for postRichTextAssetUpload without sending the request
116
+ */
117
+ postRichTextAssetUploadRequestOpts(requestParameters) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (requestParameters['postRichTextAssetUpload'] == null) {
120
+ throw new runtime.RequiredError('postRichTextAssetUpload', 'Required parameter "postRichTextAssetUpload" was null or undefined when calling postRichTextAssetUpload().');
121
+ }
122
+ const queryParameters = {};
123
+ const headerParameters = {};
124
+ headerParameters['Content-Type'] = 'application/json';
125
+ let urlPath = `/rich-text/assets/uploads`;
126
+ return {
127
+ path: urlPath,
128
+ method: 'POST',
129
+ headers: headerParameters,
130
+ query: queryParameters,
131
+ body: PostRichTextAssetUploadToJSON(requestParameters['postRichTextAssetUpload']),
132
+ };
133
+ });
134
+ }
135
+ /**
136
+ * Create a pending rich text asset upload
137
+ */
138
+ postRichTextAssetUploadRaw(requestParameters, initOverrides) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const requestOptions = yield this.postRichTextAssetUploadRequestOpts(requestParameters);
141
+ const response = yield this.request(requestOptions, initOverrides);
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetRichTextAssetUploadFromJSON(jsonValue));
143
+ });
144
+ }
145
+ /**
146
+ * Create a pending rich text asset upload
147
+ */
148
+ postRichTextAssetUpload(requestParameters, initOverrides) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const response = yield this.postRichTextAssetUploadRaw(requestParameters, initOverrides);
151
+ return yield response.value();
152
+ });
153
+ }
154
+ /**
155
+ * Creates request options for putRichTextAssetFile without sending the request
156
+ */
157
+ putRichTextAssetFileRequestOpts(requestParameters) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ if (requestParameters['assetId'] == null) {
160
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling putRichTextAssetFile().');
161
+ }
162
+ if (requestParameters['body'] == null) {
163
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling putRichTextAssetFile().');
164
+ }
165
+ const queryParameters = {};
166
+ const headerParameters = {};
167
+ headerParameters['Content-Type'] = 'image/png';
168
+ let urlPath = `/rich-text/assets/{assetId}/file`;
169
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
170
+ return {
171
+ path: urlPath,
172
+ method: 'PUT',
173
+ headers: headerParameters,
174
+ query: queryParameters,
175
+ body: requestParameters['body'],
176
+ };
177
+ });
178
+ }
179
+ /**
180
+ * Upload a pending rich text asset file through the API
181
+ */
182
+ putRichTextAssetFileRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const requestOptions = yield this.putRichTextAssetFileRequestOpts(requestParameters);
185
+ const response = yield this.request(requestOptions, initOverrides);
186
+ return new runtime.VoidApiResponse(response);
187
+ });
188
+ }
189
+ /**
190
+ * Upload a pending rich text asset file through the API
191
+ */
192
+ putRichTextAssetFile(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ yield this.putRichTextAssetFileRaw(requestParameters, initOverrides);
195
+ });
196
+ }
197
+ }
@@ -13,6 +13,7 @@ export * from './PortalSublicenseApi';
13
13
  export * from './QuestionApi';
14
14
  export * from './QuizApi';
15
15
  export * from './ReportingApi';
16
+ export * from './RichTextApi';
16
17
  export * from './RoleApi';
17
18
  export * from './SupportTicketApi';
18
19
  export * from './SystemApi';
@@ -15,6 +15,7 @@ export * from './PortalSublicenseApi';
15
15
  export * from './QuestionApi';
16
16
  export * from './QuizApi';
17
17
  export * from './ReportingApi';
18
+ export * from './RichTextApi';
18
19
  export * from './RoleApi';
19
20
  export * from './SupportTicketApi';
20
21
  export * from './SystemApi';
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { RichTextDocument } from './RichTextDocument';
12
13
  import type { GetQuestionAnswerChoicesInner } from './GetQuestionAnswerChoicesInner';
13
14
  import type { GetQuestionQuizzesInner } from './GetQuestionQuizzesInner';
14
15
  /**
@@ -24,11 +25,11 @@ export interface GetQuestion {
24
25
  */
25
26
  readonly id: string;
26
27
  /**
27
- * The main question text or prompt
28
- * @type {string}
28
+ *
29
+ * @type {RichTextDocument}
29
30
  * @memberof GetQuestion
30
31
  */
31
- questionText: string;
32
+ questionText: RichTextDocument;
32
33
  /**
33
34
  * Type of question
34
35
  * @type {GetQuestionQuestionTypeEnum}
@@ -48,11 +49,11 @@ export interface GetQuestion {
48
49
  */
49
50
  correctAnswer?: string;
50
51
  /**
51
- * Explanation of the correct answer
52
- * @type {string}
52
+ *
53
+ * @type {RichTextDocument}
53
54
  * @memberof GetQuestion
54
55
  */
55
- explanation?: string;
56
+ explanation?: RichTextDocument;
56
57
  /**
57
58
  * Topic category (Fire Alarm, Fire Pump, Fire Sprinkler, etc.)
58
59
  * @type {string}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { RichTextDocumentFromJSON, RichTextDocumentToJSON, } from './RichTextDocument';
14
15
  import { GetQuestionAnswerChoicesInnerFromJSON, GetQuestionAnswerChoicesInnerToJSON, } from './GetQuestionAnswerChoicesInner';
15
16
  import { GetQuestionQuizzesInnerFromJSON, } from './GetQuestionQuizzesInner';
16
17
  /**
@@ -61,11 +62,11 @@ export function GetQuestionFromJSONTyped(json, ignoreDiscriminator) {
61
62
  }
62
63
  return {
63
64
  'id': json['id'],
64
- 'questionText': json['question_text'],
65
+ 'questionText': RichTextDocumentFromJSON(json['question_text']),
65
66
  'questionType': json['question_type'],
66
67
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(GetQuestionAnswerChoicesInnerFromJSON)),
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 : RichTextDocumentFromJSON(json['explanation']),
69
70
  'topic': json['topic'],
70
71
  'difficultyLevel': json['difficulty_level'],
71
72
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -85,11 +86,11 @@ export function GetQuestionToJSONTyped(value, ignoreDiscriminator = false) {
85
86
  return value;
86
87
  }
87
88
  return {
88
- 'question_text': value['questionText'],
89
+ 'question_text': RichTextDocumentToJSON(value['questionText']),
89
90
  'question_type': value['questionType'],
90
91
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(GetQuestionAnswerChoicesInnerToJSON)),
91
92
  'correct_answer': value['correctAnswer'],
92
- 'explanation': value['explanation'],
93
+ 'explanation': RichTextDocumentToJSON(value['explanation']),
93
94
  'topic': value['topic'],
94
95
  'difficulty_level': value['difficultyLevel'],
95
96
  '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 { RichTextDocument } from './RichTextDocument';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -23,10 +24,10 @@ export interface GetQuestionAnswerChoicesInner {
23
24
  id: string;
24
25
  /**
25
26
  *
26
- * @type {string}
27
+ * @type {RichTextDocument}
27
28
  * @memberof GetQuestionAnswerChoicesInner
28
29
  */
29
- text: string;
30
+ text: RichTextDocument;
30
31
  /**
31
32
  *
32
33
  * @type {boolean}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { RichTextDocumentFromJSON, RichTextDocumentToJSON, } from './RichTextDocument';
14
15
  /**
15
16
  * Check if a given object implements the GetQuestionAnswerChoicesInner interface.
16
17
  */
@@ -32,7 +33,7 @@ export function GetQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscrimin
32
33
  }
33
34
  return {
34
35
  'id': json['id'],
35
- 'text': json['text'],
36
+ 'text': RichTextDocumentFromJSON(json['text']),
36
37
  'isCorrect': json['is_correct'],
37
38
  };
38
39
  }
@@ -45,7 +46,7 @@ export function GetQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscrimina
45
46
  }
46
47
  return {
47
48
  'id': value['id'],
48
- 'text': value['text'],
49
+ 'text': RichTextDocumentToJSON(value['text']),
49
50
  'is_correct': value['isCorrect'],
50
51
  };
51
52
  }
@@ -0,0 +1,50 @@
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 GetRichTextAssetUpload
16
+ */
17
+ export interface GetRichTextAssetUpload {
18
+ /**
19
+ * Created pending asset ID
20
+ * @type {string}
21
+ * @memberof GetRichTextAssetUpload
22
+ */
23
+ assetId: string;
24
+ /**
25
+ * Presigned URL for direct upload
26
+ * @type {string}
27
+ * @memberof GetRichTextAssetUpload
28
+ */
29
+ uploadUrl: string;
30
+ /**
31
+ * Authenticated API URL that redirects to a signed asset URL once completed
32
+ * @type {string}
33
+ * @memberof GetRichTextAssetUpload
34
+ */
35
+ renderUrl: string;
36
+ /**
37
+ * Upload URL lifetime
38
+ * @type {number}
39
+ * @memberof GetRichTextAssetUpload
40
+ */
41
+ expiresInSeconds: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the GetRichTextAssetUpload interface.
45
+ */
46
+ export declare function instanceOfGetRichTextAssetUpload(value: object): value is GetRichTextAssetUpload;
47
+ export declare function GetRichTextAssetUploadFromJSON(json: any): GetRichTextAssetUpload;
48
+ export declare function GetRichTextAssetUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetRichTextAssetUpload;
49
+ export declare function GetRichTextAssetUploadToJSON(json: any): GetRichTextAssetUpload;
50
+ export declare function GetRichTextAssetUploadToJSONTyped(value?: GetRichTextAssetUpload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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
+ * Check if a given object implements the GetRichTextAssetUpload interface.
16
+ */
17
+ export function instanceOfGetRichTextAssetUpload(value) {
18
+ if (!('assetId' in value) || value['assetId'] === undefined)
19
+ return false;
20
+ if (!('uploadUrl' in value) || value['uploadUrl'] === undefined)
21
+ return false;
22
+ if (!('renderUrl' in value) || value['renderUrl'] === undefined)
23
+ return false;
24
+ if (!('expiresInSeconds' in value) || value['expiresInSeconds'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function GetRichTextAssetUploadFromJSON(json) {
29
+ return GetRichTextAssetUploadFromJSONTyped(json, false);
30
+ }
31
+ export function GetRichTextAssetUploadFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'assetId': json['asset_id'],
37
+ 'uploadUrl': json['upload_url'],
38
+ 'renderUrl': json['render_url'],
39
+ 'expiresInSeconds': json['expires_in_seconds'],
40
+ };
41
+ }
42
+ export function GetRichTextAssetUploadToJSON(json) {
43
+ return GetRichTextAssetUploadToJSONTyped(json, false);
44
+ }
45
+ export function GetRichTextAssetUploadToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'asset_id': value['assetId'],
51
+ 'upload_url': value['uploadUrl'],
52
+ 'render_url': value['renderUrl'],
53
+ 'expires_in_seconds': value['expiresInSeconds'],
54
+ };
55
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PostQuestionAnswerChoicesInner } from './PostQuestionAnswerChoicesInner';
13
+ import type { RichTextInput } from './RichTextInput';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -17,11 +18,11 @@ import type { PostQuestionAnswerChoicesInner } from './PostQuestionAnswerChoices
17
18
  */
18
19
  export interface PostQuestion {
19
20
  /**
20
- * The main question text or prompt
21
- * @type {string}
21
+ *
22
+ * @type {RichTextInput}
22
23
  * @memberof PostQuestion
23
24
  */
24
- questionText: string;
25
+ questionText: RichTextInput;
25
26
  /**
26
27
  * Type of question
27
28
  * @type {PostQuestionQuestionTypeEnum}
@@ -41,11 +42,11 @@ export interface PostQuestion {
41
42
  */
42
43
  correctAnswer?: string;
43
44
  /**
44
- * Explanation of the correct answer
45
- * @type {string}
45
+ *
46
+ * @type {RichTextInput}
46
47
  * @memberof PostQuestion
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}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PostQuestionAnswerChoicesInnerFromJSON, PostQuestionAnswerChoicesInnerToJSON, } from './PostQuestionAnswerChoicesInner';
15
+ import { RichTextInputFromJSON, RichTextInputToJSON, } from './RichTextInput';
15
16
  /**
16
17
  * @export
17
18
  */
@@ -53,11 +54,11 @@ export function PostQuestionFromJSONTyped(json, ignoreDiscriminator) {
53
54
  return json;
54
55
  }
55
56
  return {
56
- 'questionText': json['question_text'],
57
+ 'questionText': RichTextInputFromJSON(json['question_text']),
57
58
  'questionType': json['question_type'],
58
59
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(PostQuestionAnswerChoicesInnerFromJSON)),
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 : RichTextInputFromJSON(json['explanation']),
61
62
  'topic': json['topic'],
62
63
  'difficultyLevel': json['difficulty_level'],
63
64
  'tags': json['tags'] == null ? undefined : json['tags'],
@@ -72,11 +73,11 @@ export function PostQuestionToJSONTyped(value, ignoreDiscriminator = false) {
72
73
  return value;
73
74
  }
74
75
  return {
75
- 'question_text': value['questionText'],
76
+ 'question_text': RichTextInputToJSON(value['questionText']),
76
77
  'question_type': value['questionType'],
77
78
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(PostQuestionAnswerChoicesInnerToJSON)),
78
79
  'correct_answer': value['correctAnswer'],
79
- 'explanation': value['explanation'],
80
+ 'explanation': 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
@@ -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}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { RichTextInputFromJSON, RichTextInputToJSON, } from './RichTextInput';
14
15
  /**
15
16
  * Check if a given object implements the PostQuestionAnswerChoicesInner interface.
16
17
  */
@@ -29,7 +30,7 @@ export function PostQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscrimi
29
30
  return json;
30
31
  }
31
32
  return {
32
- 'text': json['text'],
33
+ 'text': RichTextInputFromJSON(json['text']),
33
34
  'isCorrect': json['is_correct'],
34
35
  };
35
36
  }
@@ -41,7 +42,7 @@ export function PostQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscrimin
41
42
  return value;
42
43
  }
43
44
  return {
44
- 'text': value['text'],
45
+ 'text': RichTextInputToJSON(value['text']),
45
46
  'is_correct': value['isCorrect'],
46
47
  };
47
48
  }
@@ -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,47 @@
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
+ * Check if a given object implements the PostRichTextAssetComplete interface.
16
+ */
17
+ export function instanceOfPostRichTextAssetComplete(value) {
18
+ if (!('byteSize' in value) || value['byteSize'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function PostRichTextAssetCompleteFromJSON(json) {
23
+ return PostRichTextAssetCompleteFromJSONTyped(json, false);
24
+ }
25
+ export function PostRichTextAssetCompleteFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'byteSize': json['byte_size'],
31
+ 'width': json['width'] == null ? undefined : json['width'],
32
+ 'height': json['height'] == null ? undefined : json['height'],
33
+ };
34
+ }
35
+ export function PostRichTextAssetCompleteToJSON(json) {
36
+ return PostRichTextAssetCompleteToJSONTyped(json, false);
37
+ }
38
+ export function PostRichTextAssetCompleteToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'byte_size': value['byteSize'],
44
+ 'width': value['width'],
45
+ 'height': value['height'],
46
+ };
47
+ }