@easyedu/js-lsm-api 1.82.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 +6 -2
- package/dist/apis/QuizApi.d.ts +3 -2
- package/dist/apis/QuizApi.js +4 -2
- package/dist/esm/apis/QuizApi.d.ts +3 -2
- package/dist/esm/apis/QuizApi.js +4 -2
- 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/package.json +1 -1
- package/src/apis/QuizApi.ts +10 -4
- 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,146 @@
|
|
|
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
|
+
import type { PutQuizAnswerResponseProgress } from './PutQuizAnswerResponseProgress';
|
|
17
|
+
import {
|
|
18
|
+
PutQuizAnswerResponseProgressFromJSON,
|
|
19
|
+
PutQuizAnswerResponseProgressFromJSONTyped,
|
|
20
|
+
PutQuizAnswerResponseProgressToJSON,
|
|
21
|
+
PutQuizAnswerResponseProgressToJSONTyped,
|
|
22
|
+
} from './PutQuizAnswerResponseProgress';
|
|
23
|
+
import type { RichTextDocument } from './RichTextDocument';
|
|
24
|
+
import {
|
|
25
|
+
RichTextDocumentFromJSON,
|
|
26
|
+
RichTextDocumentFromJSONTyped,
|
|
27
|
+
RichTextDocumentToJSON,
|
|
28
|
+
RichTextDocumentToJSONTyped,
|
|
29
|
+
} from './RichTextDocument';
|
|
30
|
+
import type { PutQuizAnswerResponseNextQuestion } from './PutQuizAnswerResponseNextQuestion';
|
|
31
|
+
import {
|
|
32
|
+
PutQuizAnswerResponseNextQuestionFromJSON,
|
|
33
|
+
PutQuizAnswerResponseNextQuestionFromJSONTyped,
|
|
34
|
+
PutQuizAnswerResponseNextQuestionToJSON,
|
|
35
|
+
PutQuizAnswerResponseNextQuestionToJSONTyped,
|
|
36
|
+
} from './PutQuizAnswerResponseNextQuestion';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface PutQuizAnswerResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface PutQuizAnswerResponse {
|
|
44
|
+
/**
|
|
45
|
+
* Whether the answer was saved
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof PutQuizAnswerResponse
|
|
48
|
+
*/
|
|
49
|
+
success: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Question ID that was answered
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof PutQuizAnswerResponse
|
|
54
|
+
*/
|
|
55
|
+
questionId: number;
|
|
56
|
+
/**
|
|
57
|
+
* Immediate correctness feedback when review is disabled
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
* @memberof PutQuizAnswerResponse
|
|
60
|
+
*/
|
|
61
|
+
isCorrect?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Immediate points earned when review is disabled
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof PutQuizAnswerResponse
|
|
66
|
+
*/
|
|
67
|
+
pointsEarned?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Plain-text explanation when immediate feedback is enabled
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof PutQuizAnswerResponse
|
|
72
|
+
*/
|
|
73
|
+
explanation?: string;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {RichTextDocument}
|
|
77
|
+
* @memberof PutQuizAnswerResponse
|
|
78
|
+
*/
|
|
79
|
+
explanationRich?: RichTextDocument;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {PutQuizAnswerResponseNextQuestion}
|
|
83
|
+
* @memberof PutQuizAnswerResponse
|
|
84
|
+
*/
|
|
85
|
+
nextQuestion?: PutQuizAnswerResponseNextQuestion;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {PutQuizAnswerResponseProgress}
|
|
89
|
+
* @memberof PutQuizAnswerResponse
|
|
90
|
+
*/
|
|
91
|
+
progress: PutQuizAnswerResponseProgress;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if a given object implements the PutQuizAnswerResponse interface.
|
|
96
|
+
*/
|
|
97
|
+
export function instanceOfPutQuizAnswerResponse(value: object): value is PutQuizAnswerResponse {
|
|
98
|
+
if (!('success' in value) || value['success'] === undefined) return false;
|
|
99
|
+
if (!('questionId' in value) || value['questionId'] === undefined) return false;
|
|
100
|
+
if (!('progress' in value) || value['progress'] === undefined) return false;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function PutQuizAnswerResponseFromJSON(json: any): PutQuizAnswerResponse {
|
|
105
|
+
return PutQuizAnswerResponseFromJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function PutQuizAnswerResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponse {
|
|
109
|
+
if (json == null) {
|
|
110
|
+
return json;
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
|
|
114
|
+
'success': json['success'],
|
|
115
|
+
'questionId': json['question_id'],
|
|
116
|
+
'isCorrect': json['is_correct'] == null ? undefined : json['is_correct'],
|
|
117
|
+
'pointsEarned': json['points_earned'] == null ? undefined : json['points_earned'],
|
|
118
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
119
|
+
'explanationRich': json['explanation_rich'] == null ? undefined : RichTextDocumentFromJSON(json['explanation_rich']),
|
|
120
|
+
'nextQuestion': json['next_question'] == null ? undefined : PutQuizAnswerResponseNextQuestionFromJSON(json['next_question']),
|
|
121
|
+
'progress': PutQuizAnswerResponseProgressFromJSON(json['progress']),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function PutQuizAnswerResponseToJSON(json: any): PutQuizAnswerResponse {
|
|
126
|
+
return PutQuizAnswerResponseToJSONTyped(json, false);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function PutQuizAnswerResponseToJSONTyped(value?: PutQuizAnswerResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
130
|
+
if (value == null) {
|
|
131
|
+
return value;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
|
|
136
|
+
'success': value['success'],
|
|
137
|
+
'question_id': value['questionId'],
|
|
138
|
+
'is_correct': value['isCorrect'],
|
|
139
|
+
'points_earned': value['pointsEarned'],
|
|
140
|
+
'explanation': value['explanation'],
|
|
141
|
+
'explanation_rich': RichTextDocumentToJSON(value['explanationRich']),
|
|
142
|
+
'next_question': PutQuizAnswerResponseNextQuestionToJSON(value['nextQuestion']),
|
|
143
|
+
'progress': PutQuizAnswerResponseProgressToJSON(value['progress']),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
import type { RichTextDocument } from './RichTextDocument';
|
|
17
|
+
import {
|
|
18
|
+
RichTextDocumentFromJSON,
|
|
19
|
+
RichTextDocumentFromJSONTyped,
|
|
20
|
+
RichTextDocumentToJSON,
|
|
21
|
+
RichTextDocumentToJSONTyped,
|
|
22
|
+
} from './RichTextDocument';
|
|
23
|
+
import type { PutQuizAnswerResponseNextQuestionAnswerChoicesInner } from './PutQuizAnswerResponseNextQuestionAnswerChoicesInner';
|
|
24
|
+
import {
|
|
25
|
+
PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON,
|
|
26
|
+
PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped,
|
|
27
|
+
PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON,
|
|
28
|
+
PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped,
|
|
29
|
+
} from './PutQuizAnswerResponseNextQuestionAnswerChoicesInner';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PutQuizAnswerResponseNextQuestion
|
|
35
|
+
*/
|
|
36
|
+
export interface PutQuizAnswerResponseNextQuestion {
|
|
37
|
+
/**
|
|
38
|
+
* Attempt question ID
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
41
|
+
*/
|
|
42
|
+
id: number;
|
|
43
|
+
/**
|
|
44
|
+
* Original question ID
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
47
|
+
*/
|
|
48
|
+
questionId: number;
|
|
49
|
+
/**
|
|
50
|
+
* Order of question in this attempt
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
53
|
+
*/
|
|
54
|
+
questionOrder: number;
|
|
55
|
+
/**
|
|
56
|
+
* Points assigned to this question
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
59
|
+
*/
|
|
60
|
+
points: number;
|
|
61
|
+
/**
|
|
62
|
+
* Question text
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
65
|
+
*/
|
|
66
|
+
questionText: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {RichTextDocument}
|
|
70
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
71
|
+
*/
|
|
72
|
+
questionTextRich?: RichTextDocument;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {PutQuizAnswerResponseNextQuestionQuestionTypeEnum}
|
|
76
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
77
|
+
*/
|
|
78
|
+
questionType: PutQuizAnswerResponseNextQuestionQuestionTypeEnum;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Array<PutQuizAnswerResponseNextQuestionAnswerChoicesInner>}
|
|
82
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
83
|
+
*/
|
|
84
|
+
answerChoices: Array<PutQuizAnswerResponseNextQuestionAnswerChoicesInner>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
89
|
+
*/
|
|
90
|
+
isAnswered: boolean;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {{ [key: string]: any; }}
|
|
94
|
+
* @memberof PutQuizAnswerResponseNextQuestion
|
|
95
|
+
*/
|
|
96
|
+
userAnswer?: { [key: string]: any; };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @export
|
|
102
|
+
*/
|
|
103
|
+
export const PutQuizAnswerResponseNextQuestionQuestionTypeEnum = {
|
|
104
|
+
SingleAnswer: 'single_answer',
|
|
105
|
+
MultipleAnswer: 'multiple_answer',
|
|
106
|
+
FillInBlank: 'fill_in_blank',
|
|
107
|
+
ShortAnswer: 'short_answer',
|
|
108
|
+
Matching: 'matching',
|
|
109
|
+
Essay: 'essay'
|
|
110
|
+
} as const;
|
|
111
|
+
export type PutQuizAnswerResponseNextQuestionQuestionTypeEnum = typeof PutQuizAnswerResponseNextQuestionQuestionTypeEnum[keyof typeof PutQuizAnswerResponseNextQuestionQuestionTypeEnum];
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Check if a given object implements the PutQuizAnswerResponseNextQuestion interface.
|
|
116
|
+
*/
|
|
117
|
+
export function instanceOfPutQuizAnswerResponseNextQuestion(value: object): value is PutQuizAnswerResponseNextQuestion {
|
|
118
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
119
|
+
if (!('questionId' in value) || value['questionId'] === undefined) return false;
|
|
120
|
+
if (!('questionOrder' in value) || value['questionOrder'] === undefined) return false;
|
|
121
|
+
if (!('points' in value) || value['points'] === undefined) return false;
|
|
122
|
+
if (!('questionText' in value) || value['questionText'] === undefined) return false;
|
|
123
|
+
if (!('questionType' in value) || value['questionType'] === undefined) return false;
|
|
124
|
+
if (!('answerChoices' in value) || value['answerChoices'] === undefined) return false;
|
|
125
|
+
if (!('isAnswered' in value) || value['isAnswered'] === undefined) return false;
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function PutQuizAnswerResponseNextQuestionFromJSON(json: any): PutQuizAnswerResponseNextQuestion {
|
|
130
|
+
return PutQuizAnswerResponseNextQuestionFromJSONTyped(json, false);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function PutQuizAnswerResponseNextQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseNextQuestion {
|
|
134
|
+
if (json == null) {
|
|
135
|
+
return json;
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
|
|
139
|
+
'id': json['id'],
|
|
140
|
+
'questionId': json['question_id'],
|
|
141
|
+
'questionOrder': json['question_order'],
|
|
142
|
+
'points': json['points'],
|
|
143
|
+
'questionText': json['question_text'],
|
|
144
|
+
'questionTextRich': json['question_text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['question_text_rich']),
|
|
145
|
+
'questionType': json['question_type'],
|
|
146
|
+
'answerChoices': ((json['answer_choices'] as Array<any>).map(PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON)),
|
|
147
|
+
'isAnswered': json['is_answered'],
|
|
148
|
+
'userAnswer': json['user_answer'] == null ? undefined : json['user_answer'],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function PutQuizAnswerResponseNextQuestionToJSON(json: any): PutQuizAnswerResponseNextQuestion {
|
|
153
|
+
return PutQuizAnswerResponseNextQuestionToJSONTyped(json, false);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function PutQuizAnswerResponseNextQuestionToJSONTyped(value?: PutQuizAnswerResponseNextQuestion | null, ignoreDiscriminator: boolean = false): any {
|
|
157
|
+
if (value == null) {
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
|
|
163
|
+
'id': value['id'],
|
|
164
|
+
'question_id': value['questionId'],
|
|
165
|
+
'question_order': value['questionOrder'],
|
|
166
|
+
'points': value['points'],
|
|
167
|
+
'question_text': value['questionText'],
|
|
168
|
+
'question_text_rich': RichTextDocumentToJSON(value['questionTextRich']),
|
|
169
|
+
'question_type': value['questionType'],
|
|
170
|
+
'answer_choices': ((value['answerChoices'] as Array<any>).map(PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON)),
|
|
171
|
+
'is_answered': value['isAnswered'],
|
|
172
|
+
'user_answer': value['userAnswer'],
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import type { RichTextDocument } from './RichTextDocument';
|
|
17
|
+
import {
|
|
18
|
+
RichTextDocumentFromJSON,
|
|
19
|
+
RichTextDocumentFromJSONTyped,
|
|
20
|
+
RichTextDocumentToJSON,
|
|
21
|
+
RichTextDocumentToJSONTyped,
|
|
22
|
+
} from './RichTextDocument';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
28
|
+
*/
|
|
29
|
+
export interface PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
34
|
+
*/
|
|
35
|
+
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
40
|
+
*/
|
|
41
|
+
text: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {RichTextDocument}
|
|
45
|
+
* @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
46
|
+
*/
|
|
47
|
+
textRich?: RichTextDocument;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
|
|
52
|
+
*/
|
|
53
|
+
displayOrder: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PutQuizAnswerResponseNextQuestionAnswerChoicesInner interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPutQuizAnswerResponseNextQuestionAnswerChoicesInner(value: object): value is PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
|
|
60
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
61
|
+
if (!('text' in value) || value['text'] === undefined) return false;
|
|
62
|
+
if (!('displayOrder' in value) || value['displayOrder'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON(json: any): PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
|
|
67
|
+
return PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'text': json['text'],
|
|
78
|
+
'textRich': json['text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['text_rich']),
|
|
79
|
+
'displayOrder': json['display_order'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON(json: any): PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
|
|
84
|
+
return PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped(value?: PutQuizAnswerResponseNextQuestionAnswerChoicesInner | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'id': value['id'],
|
|
95
|
+
'text': value['text'],
|
|
96
|
+
'text_rich': RichTextDocumentToJSON(value['textRich']),
|
|
97
|
+
'display_order': value['displayOrder'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
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 PutQuizAnswerResponseProgress
|
|
20
|
+
*/
|
|
21
|
+
export interface PutQuizAnswerResponseProgress {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
26
|
+
*/
|
|
27
|
+
totalQuestions: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
32
|
+
*/
|
|
33
|
+
questionsAnswered: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
38
|
+
*/
|
|
39
|
+
currentQuestionNumber: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof PutQuizAnswerResponseProgress
|
|
44
|
+
*/
|
|
45
|
+
canSubmit: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the PutQuizAnswerResponseProgress interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfPutQuizAnswerResponseProgress(value: object): value is PutQuizAnswerResponseProgress {
|
|
52
|
+
if (!('totalQuestions' in value) || value['totalQuestions'] === undefined) return false;
|
|
53
|
+
if (!('questionsAnswered' in value) || value['questionsAnswered'] === undefined) return false;
|
|
54
|
+
if (!('currentQuestionNumber' in value) || value['currentQuestionNumber'] === undefined) return false;
|
|
55
|
+
if (!('canSubmit' in value) || value['canSubmit'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PutQuizAnswerResponseProgressFromJSON(json: any): PutQuizAnswerResponseProgress {
|
|
60
|
+
return PutQuizAnswerResponseProgressFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function PutQuizAnswerResponseProgressFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseProgress {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'totalQuestions': json['total_questions'],
|
|
70
|
+
'questionsAnswered': json['questions_answered'],
|
|
71
|
+
'currentQuestionNumber': json['current_question_number'],
|
|
72
|
+
'canSubmit': json['can_submit'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function PutQuizAnswerResponseProgressToJSON(json: any): PutQuizAnswerResponseProgress {
|
|
77
|
+
return PutQuizAnswerResponseProgressToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function PutQuizAnswerResponseProgressToJSONTyped(value?: PutQuizAnswerResponseProgress | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'total_questions': value['totalQuestions'],
|
|
88
|
+
'questions_answered': value['questionsAnswered'],
|
|
89
|
+
'current_question_number': value['currentQuestionNumber'],
|
|
90
|
+
'can_submit': value['canSubmit'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -267,6 +267,10 @@ export * from './PutQuiz';
|
|
|
267
267
|
export * from './PutQuizAnswer';
|
|
268
268
|
export * from './PutQuizAnswerAnswer';
|
|
269
269
|
export * from './PutQuizAnswerGrade';
|
|
270
|
+
export * from './PutQuizAnswerResponse';
|
|
271
|
+
export * from './PutQuizAnswerResponseNextQuestion';
|
|
272
|
+
export * from './PutQuizAnswerResponseNextQuestionAnswerChoicesInner';
|
|
273
|
+
export * from './PutQuizAnswerResponseProgress';
|
|
270
274
|
export * from './PutQuizSettings';
|
|
271
275
|
export * from './PutRole';
|
|
272
276
|
export * from './PutRolePermissions';
|