@easyedu/js-lsm-api 1.18.0 → 1.20.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 +3 -3
- package/README.md +2 -2
- package/dist/apis/ContentApi.d.ts +2 -0
- package/dist/apis/ContentApi.js +2 -0
- package/dist/apis/QuizApi.d.ts +4 -2
- package/dist/apis/QuizApi.js +8 -2
- package/dist/esm/apis/ContentApi.d.ts +2 -0
- package/dist/esm/apis/ContentApi.js +2 -0
- package/dist/esm/apis/QuizApi.d.ts +4 -2
- package/dist/esm/apis/QuizApi.js +8 -2
- package/dist/esm/models/GetQuizQuestions.d.ts +29 -5
- package/dist/esm/models/GetQuizQuestions.js +20 -4
- package/dist/esm/models/GetQuizQuestionsItemsInner.d.ts +75 -0
- package/dist/esm/models/{GetQuizQuestionsQuestionsInner.js → GetQuizQuestionsItemsInner.js} +11 -11
- package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +105 -0
- package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetails.js +84 -0
- package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.d.ts +56 -0
- package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.js +59 -0
- package/dist/esm/models/index.d.ts +3 -3
- package/dist/esm/models/index.js +3 -3
- package/dist/models/GetQuizQuestions.d.ts +29 -5
- package/dist/models/GetQuizQuestions.js +20 -4
- package/dist/models/GetQuizQuestionsItemsInner.d.ts +75 -0
- package/dist/models/{GetQuizQuestionsQuestionsInner.js → GetQuizQuestionsItemsInner.js} +16 -16
- package/dist/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +105 -0
- package/dist/models/GetQuizQuestionsItemsInnerQuestionDetails.js +92 -0
- package/dist/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.d.ts +56 -0
- package/dist/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.js +66 -0
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +3 -3
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +2 -0
- package/src/apis/QuizApi.ts +12 -2
- package/src/models/GetQuizQuestions.ts +49 -13
- package/src/models/{GetQuizQuestionsQuestionsInner.ts → GetQuizQuestionsItemsInner.ts} +28 -28
- package/src/models/GetQuizQuestionsItemsInnerQuestionDetails.ts +171 -0
- package/src/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.ts +102 -0
- package/src/models/index.ts +3 -3
- package/dist/esm/models/GetQuizQuestionsQuestionsInner.d.ts +0 -75
- package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetails.d.ts +0 -81
- package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetails.js +0 -76
- package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.d.ts +0 -50
- package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.js +0 -53
- package/dist/models/GetQuizQuestionsQuestionsInner.d.ts +0 -75
- package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetails.d.ts +0 -81
- package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetails.js +0 -84
- package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.d.ts +0 -50
- package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.js +0 -60
- package/src/models/GetQuizQuestionsQuestionsInnerQuestionDetails.ts +0 -139
- package/src/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.ts +0 -92
package/.openapi-generator/FILES
CHANGED
|
@@ -95,9 +95,9 @@ src/models/GetQuizListAllOfFilters.ts
|
|
|
95
95
|
src/models/GetQuizListAllOfQuizzes.ts
|
|
96
96
|
src/models/GetQuizListAllOfStatistics.ts
|
|
97
97
|
src/models/GetQuizQuestions.ts
|
|
98
|
-
src/models/
|
|
99
|
-
src/models/
|
|
100
|
-
src/models/
|
|
98
|
+
src/models/GetQuizQuestionsItemsInner.ts
|
|
99
|
+
src/models/GetQuizQuestionsItemsInnerQuestionDetails.ts
|
|
100
|
+
src/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.ts
|
|
101
101
|
src/models/GetQuizResults.ts
|
|
102
102
|
src/models/GetQuizResultsFeedback.ts
|
|
103
103
|
src/models/GetQuizResultsFeedbackDifficultyPerformanceInner.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @easyedu/js-lsm-api@1.
|
|
1
|
+
## @easyedu/js-lsm-api@1.20.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @easyedu/js-lsm-api@1.
|
|
39
|
+
npm install @easyedu/js-lsm-api@1.20.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -89,10 +89,12 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
89
89
|
postContentProcess(requestParameters: PostContentProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
90
90
|
/**
|
|
91
91
|
* Create a new quiz content
|
|
92
|
+
* @deprecated
|
|
92
93
|
*/
|
|
93
94
|
postContentQuizRaw(requestParameters: PostContentQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContent>>;
|
|
94
95
|
/**
|
|
95
96
|
* Create a new quiz content
|
|
97
|
+
* @deprecated
|
|
96
98
|
*/
|
|
97
99
|
postContentQuiz(requestParameters: PostContentQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
98
100
|
/**
|
package/dist/apis/ContentApi.js
CHANGED
|
@@ -164,6 +164,7 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Create a new quiz content
|
|
167
|
+
* @deprecated
|
|
167
168
|
*/
|
|
168
169
|
postContentQuizRaw(requestParameters, initOverrides) {
|
|
169
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -191,6 +192,7 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
191
192
|
}
|
|
192
193
|
/**
|
|
193
194
|
* Create a new quiz content
|
|
195
|
+
* @deprecated
|
|
194
196
|
*/
|
|
195
197
|
postContentQuiz(requestParameters, initOverrides) {
|
|
196
198
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/apis/QuizApi.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ export interface GetQuizListRequest {
|
|
|
56
56
|
}
|
|
57
57
|
export interface GetQuizQuestionsRequest {
|
|
58
58
|
quizId: string;
|
|
59
|
+
page?: number;
|
|
60
|
+
pageSize?: number;
|
|
59
61
|
}
|
|
60
62
|
export interface GetUserQuizAttemptsRequest {
|
|
61
63
|
userId: string;
|
|
@@ -181,11 +183,11 @@ export declare class QuizApi extends runtime.BaseAPI {
|
|
|
181
183
|
*/
|
|
182
184
|
getQuizList(requestParameters?: GetQuizListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizList>;
|
|
183
185
|
/**
|
|
184
|
-
* Get quiz questions
|
|
186
|
+
* Get quiz questions (paginated)
|
|
185
187
|
*/
|
|
186
188
|
getQuizQuestionsRaw(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizQuestions>>;
|
|
187
189
|
/**
|
|
188
|
-
* Get quiz questions
|
|
190
|
+
* Get quiz questions (paginated)
|
|
189
191
|
*/
|
|
190
192
|
getQuizQuestions(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizQuestions>;
|
|
191
193
|
/**
|
package/dist/apis/QuizApi.js
CHANGED
|
@@ -373,7 +373,7 @@ class QuizApi extends runtime.BaseAPI {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
|
-
* Get quiz questions
|
|
376
|
+
* Get quiz questions (paginated)
|
|
377
377
|
*/
|
|
378
378
|
getQuizQuestionsRaw(requestParameters, initOverrides) {
|
|
379
379
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -381,6 +381,12 @@ class QuizApi extends runtime.BaseAPI {
|
|
|
381
381
|
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuizQuestions().');
|
|
382
382
|
}
|
|
383
383
|
const queryParameters = {};
|
|
384
|
+
if (requestParameters['page'] != null) {
|
|
385
|
+
queryParameters['page'] = requestParameters['page'];
|
|
386
|
+
}
|
|
387
|
+
if (requestParameters['pageSize'] != null) {
|
|
388
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
389
|
+
}
|
|
384
390
|
const headerParameters = {};
|
|
385
391
|
const response = yield this.request({
|
|
386
392
|
path: `/quizzes/{quizId}/questions`.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId']))),
|
|
@@ -392,7 +398,7 @@ class QuizApi extends runtime.BaseAPI {
|
|
|
392
398
|
});
|
|
393
399
|
}
|
|
394
400
|
/**
|
|
395
|
-
* Get quiz questions
|
|
401
|
+
* Get quiz questions (paginated)
|
|
396
402
|
*/
|
|
397
403
|
getQuizQuestions(requestParameters, initOverrides) {
|
|
398
404
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -89,10 +89,12 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
89
89
|
postContentProcess(requestParameters: PostContentProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
90
90
|
/**
|
|
91
91
|
* Create a new quiz content
|
|
92
|
+
* @deprecated
|
|
92
93
|
*/
|
|
93
94
|
postContentQuizRaw(requestParameters: PostContentQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContent>>;
|
|
94
95
|
/**
|
|
95
96
|
* Create a new quiz content
|
|
97
|
+
* @deprecated
|
|
96
98
|
*/
|
|
97
99
|
postContentQuiz(requestParameters: PostContentQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
98
100
|
/**
|
|
@@ -161,6 +161,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
163
|
* Create a new quiz content
|
|
164
|
+
* @deprecated
|
|
164
165
|
*/
|
|
165
166
|
postContentQuizRaw(requestParameters, initOverrides) {
|
|
166
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -188,6 +189,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
188
189
|
}
|
|
189
190
|
/**
|
|
190
191
|
* Create a new quiz content
|
|
192
|
+
* @deprecated
|
|
191
193
|
*/
|
|
192
194
|
postContentQuiz(requestParameters, initOverrides) {
|
|
193
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -56,6 +56,8 @@ export interface GetQuizListRequest {
|
|
|
56
56
|
}
|
|
57
57
|
export interface GetQuizQuestionsRequest {
|
|
58
58
|
quizId: string;
|
|
59
|
+
page?: number;
|
|
60
|
+
pageSize?: number;
|
|
59
61
|
}
|
|
60
62
|
export interface GetUserQuizAttemptsRequest {
|
|
61
63
|
userId: string;
|
|
@@ -181,11 +183,11 @@ export declare class QuizApi extends runtime.BaseAPI {
|
|
|
181
183
|
*/
|
|
182
184
|
getQuizList(requestParameters?: GetQuizListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizList>;
|
|
183
185
|
/**
|
|
184
|
-
* Get quiz questions
|
|
186
|
+
* Get quiz questions (paginated)
|
|
185
187
|
*/
|
|
186
188
|
getQuizQuestionsRaw(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizQuestions>>;
|
|
187
189
|
/**
|
|
188
|
-
* Get quiz questions
|
|
190
|
+
* Get quiz questions (paginated)
|
|
189
191
|
*/
|
|
190
192
|
getQuizQuestions(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizQuestions>;
|
|
191
193
|
/**
|
package/dist/esm/apis/QuizApi.js
CHANGED
|
@@ -370,7 +370,7 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
|
-
* Get quiz questions
|
|
373
|
+
* Get quiz questions (paginated)
|
|
374
374
|
*/
|
|
375
375
|
getQuizQuestionsRaw(requestParameters, initOverrides) {
|
|
376
376
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -378,6 +378,12 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
378
378
|
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuizQuestions().');
|
|
379
379
|
}
|
|
380
380
|
const queryParameters = {};
|
|
381
|
+
if (requestParameters['page'] != null) {
|
|
382
|
+
queryParameters['page'] = requestParameters['page'];
|
|
383
|
+
}
|
|
384
|
+
if (requestParameters['pageSize'] != null) {
|
|
385
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
386
|
+
}
|
|
381
387
|
const headerParameters = {};
|
|
382
388
|
const response = yield this.request({
|
|
383
389
|
path: `/quizzes/{quizId}/questions`.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId']))),
|
|
@@ -389,7 +395,7 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
389
395
|
});
|
|
390
396
|
}
|
|
391
397
|
/**
|
|
392
|
-
* Get quiz questions
|
|
398
|
+
* Get quiz questions (paginated)
|
|
393
399
|
*/
|
|
394
400
|
getQuizQuestions(requestParameters, initOverrides) {
|
|
395
401
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { GetQuizQuestionsItemsInner } from './GetQuizQuestionsItemsInner';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -17,13 +17,31 @@ import type { GetQuizQuestionsQuestionsInner } from './GetQuizQuestionsQuestions
|
|
|
17
17
|
*/
|
|
18
18
|
export interface GetQuizQuestions {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {
|
|
20
|
+
* The current page number
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GetQuizQuestions
|
|
23
|
+
*/
|
|
24
|
+
page: number;
|
|
25
|
+
/**
|
|
26
|
+
* The number of items per page
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GetQuizQuestions
|
|
29
|
+
*/
|
|
30
|
+
pageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* The total number of pages
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GetQuizQuestions
|
|
35
|
+
*/
|
|
36
|
+
totalPages: number;
|
|
37
|
+
/**
|
|
38
|
+
* The total number of questions in the quiz
|
|
39
|
+
* @type {number}
|
|
22
40
|
* @memberof GetQuizQuestions
|
|
23
41
|
*/
|
|
24
|
-
|
|
42
|
+
totalItems: number;
|
|
25
43
|
/**
|
|
26
|
-
* Total number of questions in quiz
|
|
44
|
+
* Total number of questions in quiz (same as totalItems)
|
|
27
45
|
* @type {number}
|
|
28
46
|
* @memberof GetQuizQuestions
|
|
29
47
|
*/
|
|
@@ -40,6 +58,12 @@ export interface GetQuizQuestions {
|
|
|
40
58
|
* @memberof GetQuizQuestions
|
|
41
59
|
*/
|
|
42
60
|
selectionMethod: GetQuizQuestionsSelectionMethodEnum;
|
|
61
|
+
/**
|
|
62
|
+
* Questions in the quiz (paginated)
|
|
63
|
+
* @type {Array<GetQuizQuestionsItemsInner>}
|
|
64
|
+
* @memberof GetQuizQuestions
|
|
65
|
+
*/
|
|
66
|
+
items: Array<GetQuizQuestionsItemsInner>;
|
|
43
67
|
}
|
|
44
68
|
/**
|
|
45
69
|
* @export
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { GetQuizQuestionsItemsInnerFromJSON, GetQuizQuestionsItemsInnerToJSON, } from './GetQuizQuestionsItemsInner';
|
|
15
15
|
/**
|
|
16
16
|
* @export
|
|
17
17
|
*/
|
|
@@ -23,7 +23,13 @@ export const GetQuizQuestionsSelectionMethodEnum = {
|
|
|
23
23
|
* Check if a given object implements the GetQuizQuestions interface.
|
|
24
24
|
*/
|
|
25
25
|
export function instanceOfGetQuizQuestions(value) {
|
|
26
|
-
if (!('
|
|
26
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
27
33
|
return false;
|
|
28
34
|
if (!('totalQuestions' in value) || value['totalQuestions'] === undefined)
|
|
29
35
|
return false;
|
|
@@ -31,6 +37,8 @@ export function instanceOfGetQuizQuestions(value) {
|
|
|
31
37
|
return false;
|
|
32
38
|
if (!('selectionMethod' in value) || value['selectionMethod'] === undefined)
|
|
33
39
|
return false;
|
|
40
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
41
|
+
return false;
|
|
34
42
|
return true;
|
|
35
43
|
}
|
|
36
44
|
export function GetQuizQuestionsFromJSON(json) {
|
|
@@ -41,10 +49,14 @@ export function GetQuizQuestionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
49
|
return json;
|
|
42
50
|
}
|
|
43
51
|
return {
|
|
44
|
-
'
|
|
52
|
+
'page': json['page'],
|
|
53
|
+
'pageSize': json['pageSize'],
|
|
54
|
+
'totalPages': json['totalPages'],
|
|
55
|
+
'totalItems': json['totalItems'],
|
|
45
56
|
'totalQuestions': json['total_questions'],
|
|
46
57
|
'totalPoints': json['total_points'],
|
|
47
58
|
'selectionMethod': json['selection_method'],
|
|
59
|
+
'items': (json['items'].map(GetQuizQuestionsItemsInnerFromJSON)),
|
|
48
60
|
};
|
|
49
61
|
}
|
|
50
62
|
export function GetQuizQuestionsToJSON(json) {
|
|
@@ -55,9 +67,13 @@ export function GetQuizQuestionsToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
55
67
|
return value;
|
|
56
68
|
}
|
|
57
69
|
return {
|
|
58
|
-
'
|
|
70
|
+
'page': value['page'],
|
|
71
|
+
'pageSize': value['pageSize'],
|
|
72
|
+
'totalPages': value['totalPages'],
|
|
73
|
+
'totalItems': value['totalItems'],
|
|
59
74
|
'total_questions': value['totalQuestions'],
|
|
60
75
|
'total_points': value['totalPoints'],
|
|
61
76
|
'selection_method': value['selectionMethod'],
|
|
77
|
+
'items': (value['items'].map(GetQuizQuestionsItemsInnerToJSON)),
|
|
62
78
|
};
|
|
63
79
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GetQuizQuestionsItemsInnerQuestionDetails } from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetQuizQuestionsItemsInner
|
|
17
|
+
*/
|
|
18
|
+
export interface GetQuizQuestionsItemsInner {
|
|
19
|
+
/**
|
|
20
|
+
* Quiz-question relationship ID
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* ID of the question
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
29
|
+
*/
|
|
30
|
+
questionId: string;
|
|
31
|
+
/**
|
|
32
|
+
* External ID of the question
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
35
|
+
*/
|
|
36
|
+
questionExternalId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Order of question in quiz
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
41
|
+
*/
|
|
42
|
+
questionOrder: number;
|
|
43
|
+
/**
|
|
44
|
+
* Points assigned to this question
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
47
|
+
*/
|
|
48
|
+
points: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether question is locked to specific version
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
53
|
+
*/
|
|
54
|
+
versionLocked: boolean;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {GetQuizQuestionsItemsInnerQuestionDetails}
|
|
58
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
59
|
+
*/
|
|
60
|
+
questionDetails: GetQuizQuestionsItemsInnerQuestionDetails;
|
|
61
|
+
/**
|
|
62
|
+
* When question was added to quiz
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
65
|
+
*/
|
|
66
|
+
createdAt: Date;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the GetQuizQuestionsItemsInner interface.
|
|
70
|
+
*/
|
|
71
|
+
export declare function instanceOfGetQuizQuestionsItemsInner(value: object): value is GetQuizQuestionsItemsInner;
|
|
72
|
+
export declare function GetQuizQuestionsItemsInnerFromJSON(json: any): GetQuizQuestionsItemsInner;
|
|
73
|
+
export declare function GetQuizQuestionsItemsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInner;
|
|
74
|
+
export declare function GetQuizQuestionsItemsInnerToJSON(json: any): GetQuizQuestionsItemsInner;
|
|
75
|
+
export declare function GetQuizQuestionsItemsInnerToJSONTyped(value?: GetQuizQuestionsItemsInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { GetQuizQuestionsItemsInnerQuestionDetailsFromJSON, GetQuizQuestionsItemsInnerQuestionDetailsToJSON, } from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
15
15
|
/**
|
|
16
|
-
* Check if a given object implements the
|
|
16
|
+
* Check if a given object implements the GetQuizQuestionsItemsInner interface.
|
|
17
17
|
*/
|
|
18
|
-
export function
|
|
18
|
+
export function instanceOfGetQuizQuestionsItemsInner(value) {
|
|
19
19
|
if (!('id' in value) || value['id'] === undefined)
|
|
20
20
|
return false;
|
|
21
21
|
if (!('questionId' in value) || value['questionId'] === undefined)
|
|
@@ -34,10 +34,10 @@ export function instanceOfGetQuizQuestionsQuestionsInner(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
|
-
export function
|
|
38
|
-
return
|
|
37
|
+
export function GetQuizQuestionsItemsInnerFromJSON(json) {
|
|
38
|
+
return GetQuizQuestionsItemsInnerFromJSONTyped(json, false);
|
|
39
39
|
}
|
|
40
|
-
export function
|
|
40
|
+
export function GetQuizQuestionsItemsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
41
|
if (json == null) {
|
|
42
42
|
return json;
|
|
43
43
|
}
|
|
@@ -48,14 +48,14 @@ export function GetQuizQuestionsQuestionsInnerFromJSONTyped(json, ignoreDiscrimi
|
|
|
48
48
|
'questionOrder': json['question_order'],
|
|
49
49
|
'points': json['points'],
|
|
50
50
|
'versionLocked': json['version_locked'],
|
|
51
|
-
'questionDetails':
|
|
51
|
+
'questionDetails': GetQuizQuestionsItemsInnerQuestionDetailsFromJSON(json['question_details']),
|
|
52
52
|
'createdAt': (new Date(json['created_at'])),
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
55
|
+
export function GetQuizQuestionsItemsInnerToJSON(json) {
|
|
56
|
+
return GetQuizQuestionsItemsInnerToJSONTyped(json, false);
|
|
57
57
|
}
|
|
58
|
-
export function
|
|
58
|
+
export function GetQuizQuestionsItemsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
59
|
if (value == null) {
|
|
60
60
|
return value;
|
|
61
61
|
}
|
|
@@ -66,7 +66,7 @@ export function GetQuizQuestionsQuestionsInnerToJSONTyped(value, ignoreDiscrimin
|
|
|
66
66
|
'question_order': value['questionOrder'],
|
|
67
67
|
'points': value['points'],
|
|
68
68
|
'version_locked': value['versionLocked'],
|
|
69
|
-
'question_details':
|
|
69
|
+
'question_details': GetQuizQuestionsItemsInnerQuestionDetailsToJSON(value['questionDetails']),
|
|
70
70
|
'created_at': ((value['createdAt']).toISOString()),
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner } from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
13
|
+
/**
|
|
14
|
+
* Question details including all metadata
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetQuizQuestionsItemsInnerQuestionDetails
|
|
17
|
+
*/
|
|
18
|
+
export interface GetQuizQuestionsItemsInnerQuestionDetails {
|
|
19
|
+
/**
|
|
20
|
+
* The question text
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
23
|
+
*/
|
|
24
|
+
questionText: string;
|
|
25
|
+
/**
|
|
26
|
+
* Type of question
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
29
|
+
*/
|
|
30
|
+
questionType: GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Question topic
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
35
|
+
*/
|
|
36
|
+
topic: string;
|
|
37
|
+
/**
|
|
38
|
+
* Question difficulty
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
41
|
+
*/
|
|
42
|
+
difficultyLevel: GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum;
|
|
43
|
+
/**
|
|
44
|
+
* Course associated with question
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
47
|
+
*/
|
|
48
|
+
course?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Explanation of correct answer
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
53
|
+
*/
|
|
54
|
+
explanation?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Tags associated with question
|
|
57
|
+
* @type {Array<string>}
|
|
58
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
59
|
+
*/
|
|
60
|
+
tags?: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Version number of this question
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
65
|
+
*/
|
|
66
|
+
versionNumber?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Whether this is the latest version
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
71
|
+
*/
|
|
72
|
+
isLatestVersion?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Available answer choices
|
|
75
|
+
* @type {Array<GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner>}
|
|
76
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
77
|
+
*/
|
|
78
|
+
answerChoices?: Array<GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @export
|
|
82
|
+
*/
|
|
83
|
+
export declare const GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum: {
|
|
84
|
+
readonly SingleAnswer: "single_answer";
|
|
85
|
+
readonly MultipleAnswer: "multiple_answer";
|
|
86
|
+
readonly FillInBlank: "fill_in_blank";
|
|
87
|
+
};
|
|
88
|
+
export type GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum = typeof GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum[keyof typeof GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum];
|
|
89
|
+
/**
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
export declare const GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum: {
|
|
93
|
+
readonly Beginner: "beginner";
|
|
94
|
+
readonly Intermediate: "intermediate";
|
|
95
|
+
readonly Advanced: "advanced";
|
|
96
|
+
};
|
|
97
|
+
export type GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum = typeof GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum[keyof typeof GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum];
|
|
98
|
+
/**
|
|
99
|
+
* Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetails interface.
|
|
100
|
+
*/
|
|
101
|
+
export declare function instanceOfGetQuizQuestionsItemsInnerQuestionDetails(value: object): value is GetQuizQuestionsItemsInnerQuestionDetails;
|
|
102
|
+
export declare function GetQuizQuestionsItemsInnerQuestionDetailsFromJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetails;
|
|
103
|
+
export declare function GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInnerQuestionDetails;
|
|
104
|
+
export declare function GetQuizQuestionsItemsInnerQuestionDetailsToJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetails;
|
|
105
|
+
export declare function GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped(value?: GetQuizQuestionsItemsInnerQuestionDetails | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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
|
+
import { GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON, GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON, } from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum = {
|
|
19
|
+
SingleAnswer: 'single_answer',
|
|
20
|
+
MultipleAnswer: 'multiple_answer',
|
|
21
|
+
FillInBlank: 'fill_in_blank'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum = {
|
|
27
|
+
Beginner: 'beginner',
|
|
28
|
+
Intermediate: 'intermediate',
|
|
29
|
+
Advanced: 'advanced'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetails interface.
|
|
33
|
+
*/
|
|
34
|
+
export function instanceOfGetQuizQuestionsItemsInnerQuestionDetails(value) {
|
|
35
|
+
if (!('questionText' in value) || value['questionText'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('questionType' in value) || value['questionType'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('topic' in value) || value['topic'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('difficultyLevel' in value) || value['difficultyLevel'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsFromJSON(json) {
|
|
46
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped(json, ignoreDiscriminator) {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'questionText': json['question_text'],
|
|
54
|
+
'questionType': json['question_type'],
|
|
55
|
+
'topic': json['topic'],
|
|
56
|
+
'difficultyLevel': json['difficulty_level'],
|
|
57
|
+
'course': json['course'] == null ? undefined : json['course'],
|
|
58
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
59
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
60
|
+
'versionNumber': json['version_number'] == null ? undefined : json['version_number'],
|
|
61
|
+
'isLatestVersion': json['is_latest_version'] == null ? undefined : json['is_latest_version'],
|
|
62
|
+
'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON)),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsToJSON(json) {
|
|
66
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'question_text': value['questionText'],
|
|
74
|
+
'question_type': value['questionType'],
|
|
75
|
+
'topic': value['topic'],
|
|
76
|
+
'difficulty_level': value['difficultyLevel'],
|
|
77
|
+
'course': value['course'],
|
|
78
|
+
'explanation': value['explanation'],
|
|
79
|
+
'tags': value['tags'],
|
|
80
|
+
'version_number': value['versionNumber'],
|
|
81
|
+
'is_latest_version': value['isLatestVersion'],
|
|
82
|
+
'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|