@easyedu/js-lsm-api 1.81.0 → 1.83.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.
- package/.openapi-generator/FILES +8 -0
- package/README.md +7 -2
- package/dist/apis/QuizApi.d.ts +3 -2
- package/dist/apis/QuizApi.js +4 -2
- package/dist/apis/RichTextApi.d.ts +16 -0
- package/dist/apis/RichTextApi.js +43 -0
- package/dist/esm/apis/QuizApi.d.ts +3 -2
- package/dist/esm/apis/QuizApi.js +4 -2
- package/dist/esm/apis/RichTextApi.d.ts +16 -0
- package/dist/esm/apis/RichTextApi.js +43 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInner.js +3 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/GetQuizResultsQuestionsInner.d.ts +13 -0
- package/dist/esm/models/GetQuizResultsQuestionsInner.js +5 -0
- package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInner.js +3 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/PutQuizAnswerResponse.d.ts +77 -0
- package/dist/esm/models/PutQuizAnswerResponse.js +64 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestion.js +88 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +54 -0
- package/dist/esm/models/PutQuizAnswerResponseProgress.d.ts +50 -0
- package/dist/esm/models/PutQuizAnswerResponseProgress.js +55 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/models/GetQuizAttemptQuestionsInner.js +3 -0
- package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/GetQuizResultsQuestionsInner.d.ts +13 -0
- package/dist/models/GetQuizResultsQuestionsInner.js +5 -0
- package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/models/PostQuizAttemptQuestionsInner.js +3 -0
- package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/PutQuizAnswerResponse.d.ts +77 -0
- package/dist/models/PutQuizAnswerResponse.js +71 -0
- package/dist/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
- package/dist/models/PutQuizAnswerResponseNextQuestion.js +96 -0
- package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
- package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +61 -0
- package/dist/models/PutQuizAnswerResponseProgress.d.ts +50 -0
- package/dist/models/PutQuizAnswerResponseProgress.js +62 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/GetQuizAttemptQuestionsInner.md +2 -0
- package/docs/GetQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/GetQuizResultsQuestionsInner.md +4 -0
- package/docs/GetQuizResultsQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/PostQuizAttemptQuestionsInner.md +2 -0
- package/docs/PostQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/PutQuizAnswerResponse.md +48 -0
- package/docs/PutQuizAnswerResponseNextQuestion.md +52 -0
- package/docs/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.md +40 -0
- package/docs/PutQuizAnswerResponseProgress.md +40 -0
- package/docs/QuizApi.md +3 -3
- package/docs/RichTextApi.md +73 -0
- package/package.json +1 -1
- package/src/apis/QuizApi.ts +10 -4
- package/src/apis/RichTextApi.ts +59 -0
- package/src/models/GetQuizAttemptQuestionsInner.ts +15 -0
- package/src/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/GetQuizResultsQuestionsInner.ts +23 -0
- package/src/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/PostQuizAttemptQuestionsInner.ts +15 -0
- package/src/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/PutQuizAnswerResponse.ts +146 -0
- package/src/models/PutQuizAnswerResponseNextQuestion.ts +175 -0
- package/src/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.ts +100 -0
- package/src/models/PutQuizAnswerResponseProgress.ts +93 -0
- package/src/models/index.ts +4 -0
|
@@ -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 PutQuizAnswerResponseProgress
|
|
16
|
+
*/
|
|
17
|
+
export interface PutQuizAnswerResponseProgress {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
22
|
+
*/
|
|
23
|
+
totalQuestions: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
28
|
+
*/
|
|
29
|
+
questionsAnswered: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
34
|
+
*/
|
|
35
|
+
currentQuestionNumber: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
40
|
+
*/
|
|
41
|
+
canSubmit: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the PutQuizAnswerResponseProgress interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfPutQuizAnswerResponseProgress(value: object): value is PutQuizAnswerResponseProgress;
|
|
47
|
+
export declare function PutQuizAnswerResponseProgressFromJSON(json: any): PutQuizAnswerResponseProgress;
|
|
48
|
+
export declare function PutQuizAnswerResponseProgressFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseProgress;
|
|
49
|
+
export declare function PutQuizAnswerResponseProgressToJSON(json: any): PutQuizAnswerResponseProgress;
|
|
50
|
+
export declare function PutQuizAnswerResponseProgressToJSONTyped(value?: PutQuizAnswerResponseProgress | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.instanceOfPutQuizAnswerResponseProgress = instanceOfPutQuizAnswerResponseProgress;
|
|
17
|
+
exports.PutQuizAnswerResponseProgressFromJSON = PutQuizAnswerResponseProgressFromJSON;
|
|
18
|
+
exports.PutQuizAnswerResponseProgressFromJSONTyped = PutQuizAnswerResponseProgressFromJSONTyped;
|
|
19
|
+
exports.PutQuizAnswerResponseProgressToJSON = PutQuizAnswerResponseProgressToJSON;
|
|
20
|
+
exports.PutQuizAnswerResponseProgressToJSONTyped = PutQuizAnswerResponseProgressToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PutQuizAnswerResponseProgress interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPutQuizAnswerResponseProgress(value) {
|
|
25
|
+
if (!('totalQuestions' in value) || value['totalQuestions'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('questionsAnswered' in value) || value['questionsAnswered'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('currentQuestionNumber' in value) || value['currentQuestionNumber'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('canSubmit' in value) || value['canSubmit'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function PutQuizAnswerResponseProgressFromJSON(json) {
|
|
36
|
+
return PutQuizAnswerResponseProgressFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function PutQuizAnswerResponseProgressFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'totalQuestions': json['total_questions'],
|
|
44
|
+
'questionsAnswered': json['questions_answered'],
|
|
45
|
+
'currentQuestionNumber': json['current_question_number'],
|
|
46
|
+
'canSubmit': json['can_submit'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function PutQuizAnswerResponseProgressToJSON(json) {
|
|
50
|
+
return PutQuizAnswerResponseProgressToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function PutQuizAnswerResponseProgressToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'total_questions': value['totalQuestions'],
|
|
58
|
+
'questions_answered': value['questionsAnswered'],
|
|
59
|
+
'current_question_number': value['currentQuestionNumber'],
|
|
60
|
+
'can_submit': value['canSubmit'],
|
|
61
|
+
};
|
|
62
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -265,6 +265,10 @@ export * from './PutQuiz';
|
|
|
265
265
|
export * from './PutQuizAnswer';
|
|
266
266
|
export * from './PutQuizAnswerAnswer';
|
|
267
267
|
export * from './PutQuizAnswerGrade';
|
|
268
|
+
export * from './PutQuizAnswerResponse';
|
|
269
|
+
export * from './PutQuizAnswerResponseNextQuestion';
|
|
270
|
+
export * from './PutQuizAnswerResponseNextQuestionAnswerChoicesInner';
|
|
271
|
+
export * from './PutQuizAnswerResponseProgress';
|
|
268
272
|
export * from './PutQuizSettings';
|
|
269
273
|
export * from './PutRole';
|
|
270
274
|
export * from './PutRolePermissions';
|
package/dist/models/index.js
CHANGED
|
@@ -283,6 +283,10 @@ __exportStar(require("./PutQuiz"), exports);
|
|
|
283
283
|
__exportStar(require("./PutQuizAnswer"), exports);
|
|
284
284
|
__exportStar(require("./PutQuizAnswerAnswer"), exports);
|
|
285
285
|
__exportStar(require("./PutQuizAnswerGrade"), exports);
|
|
286
|
+
__exportStar(require("./PutQuizAnswerResponse"), exports);
|
|
287
|
+
__exportStar(require("./PutQuizAnswerResponseNextQuestion"), exports);
|
|
288
|
+
__exportStar(require("./PutQuizAnswerResponseNextQuestionAnswerChoicesInner"), exports);
|
|
289
|
+
__exportStar(require("./PutQuizAnswerResponseProgress"), exports);
|
|
286
290
|
__exportStar(require("./PutQuizSettings"), exports);
|
|
287
291
|
__exportStar(require("./PutRole"), exports);
|
|
288
292
|
__exportStar(require("./PutRolePermissions"), exports);
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`questionOrder` | number
|
|
12
12
|
`points` | number
|
|
13
13
|
`questionText` | string
|
|
14
|
+
`questionTextRich` | [RichTextDocument](RichTextDocument.md)
|
|
14
15
|
`questionType` | string
|
|
15
16
|
`answerChoices` | [Array<GetQuizAttemptQuestionsInnerAnswerChoicesInner>](GetQuizAttemptQuestionsInnerAnswerChoicesInner.md)
|
|
16
17
|
`isAnswered` | boolean
|
|
@@ -29,6 +30,7 @@ const example = {
|
|
|
29
30
|
"questionOrder": null,
|
|
30
31
|
"points": null,
|
|
31
32
|
"questionText": null,
|
|
33
|
+
"questionTextRich": null,
|
|
32
34
|
"questionType": null,
|
|
33
35
|
"answerChoices": null,
|
|
34
36
|
"isAnswered": null,
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`text` | string
|
|
11
|
+
`textRich` | [RichTextDocument](RichTextDocument.md)
|
|
11
12
|
`displayOrder` | number
|
|
12
13
|
|
|
13
14
|
## Example
|
|
@@ -19,6 +20,7 @@ import type { GetQuizAttemptQuestionsInnerAnswerChoicesInner } from '@easyedu/js
|
|
|
19
20
|
const example = {
|
|
20
21
|
"id": null,
|
|
21
22
|
"text": null,
|
|
23
|
+
"textRich": null,
|
|
22
24
|
"displayOrder": null,
|
|
23
25
|
} satisfies GetQuizAttemptQuestionsInnerAnswerChoicesInner
|
|
24
26
|
|
|
@@ -9,10 +9,12 @@ Name | Type
|
|
|
9
9
|
`questionId` | string
|
|
10
10
|
`questionOrder` | number
|
|
11
11
|
`questionText` | string
|
|
12
|
+
`questionTextRich` | [RichTextDocument](RichTextDocument.md)
|
|
12
13
|
`questionType` | string
|
|
13
14
|
`answerChoices` | [Array<GetQuizResultsQuestionsInnerAnswerChoicesInner>](GetQuizResultsQuestionsInnerAnswerChoicesInner.md)
|
|
14
15
|
`studentAnswer` | [GetQuizResultsQuestionsInnerStudentAnswer](GetQuizResultsQuestionsInnerStudentAnswer.md)
|
|
15
16
|
`explanation` | string
|
|
17
|
+
`explanationRich` | [RichTextDocument](RichTextDocument.md)
|
|
16
18
|
`timeSpent` | number
|
|
17
19
|
`wasFlagged` | boolean
|
|
18
20
|
|
|
@@ -26,10 +28,12 @@ const example = {
|
|
|
26
28
|
"questionId": null,
|
|
27
29
|
"questionOrder": null,
|
|
28
30
|
"questionText": null,
|
|
31
|
+
"questionTextRich": null,
|
|
29
32
|
"questionType": null,
|
|
30
33
|
"answerChoices": null,
|
|
31
34
|
"studentAnswer": null,
|
|
32
35
|
"explanation": null,
|
|
36
|
+
"explanationRich": null,
|
|
33
37
|
"timeSpent": null,
|
|
34
38
|
"wasFlagged": null,
|
|
35
39
|
} satisfies GetQuizResultsQuestionsInner
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`text` | string
|
|
11
|
+
`textRich` | [RichTextDocument](RichTextDocument.md)
|
|
11
12
|
`isCorrect` | boolean
|
|
12
13
|
`wasSelected` | boolean
|
|
13
14
|
|
|
@@ -20,6 +21,7 @@ import type { GetQuizResultsQuestionsInnerAnswerChoicesInner } from '@easyedu/js
|
|
|
20
21
|
const example = {
|
|
21
22
|
"id": null,
|
|
22
23
|
"text": null,
|
|
24
|
+
"textRich": null,
|
|
23
25
|
"isCorrect": null,
|
|
24
26
|
"wasSelected": null,
|
|
25
27
|
} satisfies GetQuizResultsQuestionsInnerAnswerChoicesInner
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`questionOrder` | number
|
|
12
12
|
`points` | number
|
|
13
13
|
`questionText` | string
|
|
14
|
+
`questionTextRich` | [RichTextDocument](RichTextDocument.md)
|
|
14
15
|
`questionType` | string
|
|
15
16
|
`answerChoices` | [Array<PostQuizAttemptQuestionsInnerAnswerChoicesInner>](PostQuizAttemptQuestionsInnerAnswerChoicesInner.md)
|
|
16
17
|
`isAnswered` | boolean
|
|
@@ -27,6 +28,7 @@ const example = {
|
|
|
27
28
|
"questionOrder": null,
|
|
28
29
|
"points": null,
|
|
29
30
|
"questionText": null,
|
|
31
|
+
"questionTextRich": null,
|
|
30
32
|
"questionType": null,
|
|
31
33
|
"answerChoices": null,
|
|
32
34
|
"isAnswered": null,
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`text` | string
|
|
11
|
+
`textRich` | [RichTextDocument](RichTextDocument.md)
|
|
11
12
|
`displayOrder` | number
|
|
12
13
|
|
|
13
14
|
## Example
|
|
@@ -19,6 +20,7 @@ import type { PostQuizAttemptQuestionsInnerAnswerChoicesInner } from '@easyedu/j
|
|
|
19
20
|
const example = {
|
|
20
21
|
"id": null,
|
|
21
22
|
"text": null,
|
|
23
|
+
"textRich": null,
|
|
22
24
|
"displayOrder": null,
|
|
23
25
|
} satisfies PostQuizAttemptQuestionsInnerAnswerChoicesInner
|
|
24
26
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# PutQuizAnswerResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`questionId` | number
|
|
11
|
+
`isCorrect` | boolean
|
|
12
|
+
`pointsEarned` | number
|
|
13
|
+
`explanation` | string
|
|
14
|
+
`explanationRich` | [RichTextDocument](RichTextDocument.md)
|
|
15
|
+
`nextQuestion` | [PutQuizAnswerResponseNextQuestion](PutQuizAnswerResponseNextQuestion.md)
|
|
16
|
+
`progress` | [PutQuizAnswerResponseProgress](PutQuizAnswerResponseProgress.md)
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { PutQuizAnswerResponse } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"success": null,
|
|
26
|
+
"questionId": null,
|
|
27
|
+
"isCorrect": null,
|
|
28
|
+
"pointsEarned": null,
|
|
29
|
+
"explanation": null,
|
|
30
|
+
"explanationRich": null,
|
|
31
|
+
"nextQuestion": null,
|
|
32
|
+
"progress": null,
|
|
33
|
+
} satisfies PutQuizAnswerResponse
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutQuizAnswerResponse
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
# PutQuizAnswerResponseNextQuestion
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`questionId` | number
|
|
11
|
+
`questionOrder` | number
|
|
12
|
+
`points` | number
|
|
13
|
+
`questionText` | string
|
|
14
|
+
`questionTextRich` | [RichTextDocument](RichTextDocument.md)
|
|
15
|
+
`questionType` | string
|
|
16
|
+
`answerChoices` | [Array<PutQuizAnswerResponseNextQuestionAnswerChoicesInner>](PutQuizAnswerResponseNextQuestionAnswerChoicesInner.md)
|
|
17
|
+
`isAnswered` | boolean
|
|
18
|
+
`userAnswer` | { [key: string]: any; }
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { PutQuizAnswerResponseNextQuestion } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"questionId": null,
|
|
29
|
+
"questionOrder": null,
|
|
30
|
+
"points": null,
|
|
31
|
+
"questionText": null,
|
|
32
|
+
"questionTextRich": null,
|
|
33
|
+
"questionType": null,
|
|
34
|
+
"answerChoices": null,
|
|
35
|
+
"isAnswered": null,
|
|
36
|
+
"userAnswer": null,
|
|
37
|
+
} satisfies PutQuizAnswerResponseNextQuestion
|
|
38
|
+
|
|
39
|
+
console.log(example)
|
|
40
|
+
|
|
41
|
+
// Convert the instance to a JSON string
|
|
42
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
43
|
+
console.log(exampleJSON)
|
|
44
|
+
|
|
45
|
+
// Parse the JSON string back to an object
|
|
46
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutQuizAnswerResponseNextQuestion
|
|
47
|
+
console.log(exampleParsed)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`text` | string
|
|
11
|
+
`textRich` | [RichTextDocument](RichTextDocument.md)
|
|
12
|
+
`displayOrder` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PutQuizAnswerResponseNextQuestionAnswerChoicesInner } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"text": null,
|
|
23
|
+
"textRich": null,
|
|
24
|
+
"displayOrder": null,
|
|
25
|
+
} satisfies PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# PutQuizAnswerResponseProgress
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`totalQuestions` | number
|
|
10
|
+
`questionsAnswered` | number
|
|
11
|
+
`currentQuestionNumber` | number
|
|
12
|
+
`canSubmit` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PutQuizAnswerResponseProgress } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"totalQuestions": null,
|
|
22
|
+
"questionsAnswered": null,
|
|
23
|
+
"currentQuestionNumber": null,
|
|
24
|
+
"canSubmit": null,
|
|
25
|
+
} satisfies PutQuizAnswerResponseProgress
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutQuizAnswerResponseProgress
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/QuizApi.md
CHANGED
|
@@ -1517,7 +1517,7 @@ No authorization required
|
|
|
1517
1517
|
|
|
1518
1518
|
## saveQuizAnswer
|
|
1519
1519
|
|
|
1520
|
-
> saveQuizAnswer(attemptId, questionId, putQuizAnswer)
|
|
1520
|
+
> PutQuizAnswerResponse saveQuizAnswer(attemptId, questionId, putQuizAnswer)
|
|
1521
1521
|
|
|
1522
1522
|
Save answer for a specific question
|
|
1523
1523
|
|
|
@@ -1566,7 +1566,7 @@ example().catch(console.error);
|
|
|
1566
1566
|
|
|
1567
1567
|
### Return type
|
|
1568
1568
|
|
|
1569
|
-
|
|
1569
|
+
[**PutQuizAnswerResponse**](PutQuizAnswerResponse.md)
|
|
1570
1570
|
|
|
1571
1571
|
### Authorization
|
|
1572
1572
|
|
|
@@ -1575,7 +1575,7 @@ No authorization required
|
|
|
1575
1575
|
### HTTP request headers
|
|
1576
1576
|
|
|
1577
1577
|
- **Content-Type**: `application/json`
|
|
1578
|
-
- **Accept**:
|
|
1578
|
+
- **Accept**: `application/json`
|
|
1579
1579
|
|
|
1580
1580
|
|
|
1581
1581
|
### HTTP response details
|
package/docs/RichTextApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
7
7
|
| [**getRichTextAsset**](RichTextApi.md#getrichtextasset) | **GET** /rich-text/assets/{assetId} | Redirect to a signed rich text asset URL |
|
|
8
8
|
| [**postRichTextAssetComplete**](RichTextApi.md#postrichtextassetcomplete) | **POST** /rich-text/assets/{assetId}/complete | Complete a pending rich text asset upload |
|
|
9
9
|
| [**postRichTextAssetUpload**](RichTextApi.md#postrichtextassetupload) | **POST** /rich-text/assets/uploads | Create a pending rich text asset upload |
|
|
10
|
+
| [**putRichTextAssetFile**](RichTextApi.md#putrichtextassetfile) | **PUT** /rich-text/assets/{assetId}/file | Upload a pending rich text asset file through the API |
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
@@ -210,3 +211,75 @@ No authorization required
|
|
|
210
211
|
|
|
211
212
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
212
213
|
|
|
214
|
+
|
|
215
|
+
## putRichTextAssetFile
|
|
216
|
+
|
|
217
|
+
> putRichTextAssetFile(assetId, body)
|
|
218
|
+
|
|
219
|
+
Upload a pending rich text asset file through the API
|
|
220
|
+
|
|
221
|
+
### Example
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import {
|
|
225
|
+
Configuration,
|
|
226
|
+
RichTextApi,
|
|
227
|
+
} from '@easyedu/js-lsm-api';
|
|
228
|
+
import type { PutRichTextAssetFileRequest } from '@easyedu/js-lsm-api';
|
|
229
|
+
|
|
230
|
+
async function example() {
|
|
231
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
232
|
+
const api = new RichTextApi();
|
|
233
|
+
|
|
234
|
+
const body = {
|
|
235
|
+
// string
|
|
236
|
+
assetId: assetId_example,
|
|
237
|
+
// Blob
|
|
238
|
+
body: BINARY_DATA_HERE,
|
|
239
|
+
} satisfies PutRichTextAssetFileRequest;
|
|
240
|
+
|
|
241
|
+
try {
|
|
242
|
+
const data = await api.putRichTextAssetFile(body);
|
|
243
|
+
console.log(data);
|
|
244
|
+
} catch (error) {
|
|
245
|
+
console.error(error);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Run the test
|
|
250
|
+
example().catch(console.error);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Parameters
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
| Name | Type | Description | Notes |
|
|
257
|
+
|------------- | ------------- | ------------- | -------------|
|
|
258
|
+
| **assetId** | `string` | | [Defaults to `undefined`] |
|
|
259
|
+
| **body** | `Blob` | | |
|
|
260
|
+
|
|
261
|
+
### Return type
|
|
262
|
+
|
|
263
|
+
`void` (Empty response body)
|
|
264
|
+
|
|
265
|
+
### Authorization
|
|
266
|
+
|
|
267
|
+
No authorization required
|
|
268
|
+
|
|
269
|
+
### HTTP request headers
|
|
270
|
+
|
|
271
|
+
- **Content-Type**: `image/png`, `image/jpeg`, `image/webp`, `image/gif`, `application/octet-stream`
|
|
272
|
+
- **Accept**: Not defined
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
### HTTP response details
|
|
276
|
+
| Status code | Description | Response headers |
|
|
277
|
+
|-------------|-------------|------------------|
|
|
278
|
+
| **204** | rich text asset file uploaded | - |
|
|
279
|
+
| **400** | invalid upload | - |
|
|
280
|
+
| **403** | forbidden | - |
|
|
281
|
+
| **404** | rich text asset not found | - |
|
|
282
|
+
| **413** | file too large | - |
|
|
283
|
+
|
|
284
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
285
|
+
|
package/package.json
CHANGED
package/src/apis/QuizApi.ts
CHANGED
|
@@ -123,6 +123,11 @@ import {
|
|
|
123
123
|
PutQuizAnswerGradeFromJSON,
|
|
124
124
|
PutQuizAnswerGradeToJSON,
|
|
125
125
|
} from '../models/PutQuizAnswerGrade';
|
|
126
|
+
import {
|
|
127
|
+
type PutQuizAnswerResponse,
|
|
128
|
+
PutQuizAnswerResponseFromJSON,
|
|
129
|
+
PutQuizAnswerResponseToJSON,
|
|
130
|
+
} from '../models/PutQuizAnswerResponse';
|
|
126
131
|
|
|
127
132
|
export interface AddQuizCriteriaQuestionSelectionRequest {
|
|
128
133
|
quizId: string;
|
|
@@ -1414,18 +1419,19 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
1414
1419
|
/**
|
|
1415
1420
|
* Save answer for a specific question
|
|
1416
1421
|
*/
|
|
1417
|
-
async saveQuizAnswerRaw(requestParameters: SaveQuizAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
1422
|
+
async saveQuizAnswerRaw(requestParameters: SaveQuizAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PutQuizAnswerResponse>> {
|
|
1418
1423
|
const requestOptions = await this.saveQuizAnswerRequestOpts(requestParameters);
|
|
1419
1424
|
const response = await this.request(requestOptions, initOverrides);
|
|
1420
1425
|
|
|
1421
|
-
return new runtime.
|
|
1426
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PutQuizAnswerResponseFromJSON(jsonValue));
|
|
1422
1427
|
}
|
|
1423
1428
|
|
|
1424
1429
|
/**
|
|
1425
1430
|
* Save answer for a specific question
|
|
1426
1431
|
*/
|
|
1427
|
-
async saveQuizAnswer(requestParameters: SaveQuizAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
1428
|
-
await this.saveQuizAnswerRaw(requestParameters, initOverrides);
|
|
1432
|
+
async saveQuizAnswer(requestParameters: SaveQuizAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PutQuizAnswerResponse> {
|
|
1433
|
+
const response = await this.saveQuizAnswerRaw(requestParameters, initOverrides);
|
|
1434
|
+
return await response.value();
|
|
1429
1435
|
}
|
|
1430
1436
|
|
|
1431
1437
|
/**
|
package/src/apis/RichTextApi.ts
CHANGED
|
@@ -47,6 +47,11 @@ export interface PostRichTextAssetUploadRequest {
|
|
|
47
47
|
postRichTextAssetUpload: PostRichTextAssetUpload;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
export interface PutRichTextAssetFileRequest {
|
|
51
|
+
assetId: string;
|
|
52
|
+
body: Blob;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
56
|
*
|
|
52
57
|
*/
|
|
@@ -198,4 +203,58 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
198
203
|
return await response.value();
|
|
199
204
|
}
|
|
200
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Creates request options for putRichTextAssetFile without sending the request
|
|
208
|
+
*/
|
|
209
|
+
async putRichTextAssetFileRequestOpts(requestParameters: PutRichTextAssetFileRequest): Promise<runtime.RequestOpts> {
|
|
210
|
+
if (requestParameters['assetId'] == null) {
|
|
211
|
+
throw new runtime.RequiredError(
|
|
212
|
+
'assetId',
|
|
213
|
+
'Required parameter "assetId" was null or undefined when calling putRichTextAssetFile().'
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (requestParameters['body'] == null) {
|
|
218
|
+
throw new runtime.RequiredError(
|
|
219
|
+
'body',
|
|
220
|
+
'Required parameter "body" was null or undefined when calling putRichTextAssetFile().'
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const queryParameters: any = {};
|
|
225
|
+
|
|
226
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
227
|
+
|
|
228
|
+
headerParameters['Content-Type'] = 'image/png';
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
let urlPath = `/rich-text/assets/{assetId}/file`;
|
|
232
|
+
urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
path: urlPath,
|
|
236
|
+
method: 'PUT',
|
|
237
|
+
headers: headerParameters,
|
|
238
|
+
query: queryParameters,
|
|
239
|
+
body: requestParameters['body'] as any,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Upload a pending rich text asset file through the API
|
|
245
|
+
*/
|
|
246
|
+
async putRichTextAssetFileRaw(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
247
|
+
const requestOptions = await this.putRichTextAssetFileRequestOpts(requestParameters);
|
|
248
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
249
|
+
|
|
250
|
+
return new runtime.VoidApiResponse(response);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Upload a pending rich text asset file through the API
|
|
255
|
+
*/
|
|
256
|
+
async putRichTextAssetFile(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
257
|
+
await this.putRichTextAssetFileRaw(requestParameters, initOverrides);
|
|
258
|
+
}
|
|
259
|
+
|
|
201
260
|
}
|