@easyedu/js-lsm-api 1.18.0 → 1.19.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/QuizApi.d.ts +4 -2
- package/dist/apis/QuizApi.js +8 -2
- 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/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/dist/models/index.d.ts
CHANGED
|
@@ -79,9 +79,9 @@ export * from './GetQuizListAllOfFilters';
|
|
|
79
79
|
export * from './GetQuizListAllOfQuizzes';
|
|
80
80
|
export * from './GetQuizListAllOfStatistics';
|
|
81
81
|
export * from './GetQuizQuestions';
|
|
82
|
-
export * from './
|
|
83
|
-
export * from './
|
|
84
|
-
export * from './
|
|
82
|
+
export * from './GetQuizQuestionsItemsInner';
|
|
83
|
+
export * from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
84
|
+
export * from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
85
85
|
export * from './GetQuizResults';
|
|
86
86
|
export * from './GetQuizResultsFeedback';
|
|
87
87
|
export * from './GetQuizResultsFeedbackDifficultyPerformanceInner';
|
package/dist/models/index.js
CHANGED
|
@@ -97,9 +97,9 @@ __exportStar(require("./GetQuizListAllOfFilters"), exports);
|
|
|
97
97
|
__exportStar(require("./GetQuizListAllOfQuizzes"), exports);
|
|
98
98
|
__exportStar(require("./GetQuizListAllOfStatistics"), exports);
|
|
99
99
|
__exportStar(require("./GetQuizQuestions"), exports);
|
|
100
|
-
__exportStar(require("./
|
|
101
|
-
__exportStar(require("./
|
|
102
|
-
__exportStar(require("./
|
|
100
|
+
__exportStar(require("./GetQuizQuestionsItemsInner"), exports);
|
|
101
|
+
__exportStar(require("./GetQuizQuestionsItemsInnerQuestionDetails"), exports);
|
|
102
|
+
__exportStar(require("./GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner"), exports);
|
|
103
103
|
__exportStar(require("./GetQuizResults"), exports);
|
|
104
104
|
__exportStar(require("./GetQuizResultsFeedback"), exports);
|
|
105
105
|
__exportStar(require("./GetQuizResultsFeedbackDifficultyPerformanceInner"), exports);
|
package/package.json
CHANGED
package/src/apis/QuizApi.ts
CHANGED
|
@@ -123,6 +123,8 @@ export interface GetQuizListRequest {
|
|
|
123
123
|
|
|
124
124
|
export interface GetQuizQuestionsRequest {
|
|
125
125
|
quizId: string;
|
|
126
|
+
page?: number;
|
|
127
|
+
pageSize?: number;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
export interface GetUserQuizAttemptsRequest {
|
|
@@ -583,7 +585,7 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
583
585
|
}
|
|
584
586
|
|
|
585
587
|
/**
|
|
586
|
-
* Get quiz questions
|
|
588
|
+
* Get quiz questions (paginated)
|
|
587
589
|
*/
|
|
588
590
|
async getQuizQuestionsRaw(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizQuestions>> {
|
|
589
591
|
if (requestParameters['quizId'] == null) {
|
|
@@ -595,6 +597,14 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
595
597
|
|
|
596
598
|
const queryParameters: any = {};
|
|
597
599
|
|
|
600
|
+
if (requestParameters['page'] != null) {
|
|
601
|
+
queryParameters['page'] = requestParameters['page'];
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (requestParameters['pageSize'] != null) {
|
|
605
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
606
|
+
}
|
|
607
|
+
|
|
598
608
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
599
609
|
|
|
600
610
|
const response = await this.request({
|
|
@@ -608,7 +618,7 @@ export class QuizApi extends runtime.BaseAPI {
|
|
|
608
618
|
}
|
|
609
619
|
|
|
610
620
|
/**
|
|
611
|
-
* Get quiz questions
|
|
621
|
+
* Get quiz questions (paginated)
|
|
612
622
|
*/
|
|
613
623
|
async getQuizQuestions(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizQuestions> {
|
|
614
624
|
const response = await this.getQuizQuestionsRaw(requestParameters, initOverrides);
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { GetQuizQuestionsItemsInner } from './GetQuizQuestionsItemsInner';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
GetQuizQuestionsItemsInnerFromJSON,
|
|
19
|
+
GetQuizQuestionsItemsInnerFromJSONTyped,
|
|
20
|
+
GetQuizQuestionsItemsInnerToJSON,
|
|
21
|
+
GetQuizQuestionsItemsInnerToJSONTyped,
|
|
22
|
+
} from './GetQuizQuestionsItemsInner';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
@@ -28,13 +28,31 @@ import {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface GetQuizQuestions {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {
|
|
31
|
+
* The current page number
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GetQuizQuestions
|
|
34
|
+
*/
|
|
35
|
+
page: number;
|
|
36
|
+
/**
|
|
37
|
+
* The number of items per page
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GetQuizQuestions
|
|
40
|
+
*/
|
|
41
|
+
pageSize: number;
|
|
42
|
+
/**
|
|
43
|
+
* The total number of pages
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetQuizQuestions
|
|
46
|
+
*/
|
|
47
|
+
totalPages: number;
|
|
48
|
+
/**
|
|
49
|
+
* The total number of questions in the quiz
|
|
50
|
+
* @type {number}
|
|
33
51
|
* @memberof GetQuizQuestions
|
|
34
52
|
*/
|
|
35
|
-
|
|
53
|
+
totalItems: number;
|
|
36
54
|
/**
|
|
37
|
-
* Total number of questions in quiz
|
|
55
|
+
* Total number of questions in quiz (same as totalItems)
|
|
38
56
|
* @type {number}
|
|
39
57
|
* @memberof GetQuizQuestions
|
|
40
58
|
*/
|
|
@@ -51,6 +69,12 @@ export interface GetQuizQuestions {
|
|
|
51
69
|
* @memberof GetQuizQuestions
|
|
52
70
|
*/
|
|
53
71
|
selectionMethod: GetQuizQuestionsSelectionMethodEnum;
|
|
72
|
+
/**
|
|
73
|
+
* Questions in the quiz (paginated)
|
|
74
|
+
* @type {Array<GetQuizQuestionsItemsInner>}
|
|
75
|
+
* @memberof GetQuizQuestions
|
|
76
|
+
*/
|
|
77
|
+
items: Array<GetQuizQuestionsItemsInner>;
|
|
54
78
|
}
|
|
55
79
|
|
|
56
80
|
|
|
@@ -68,10 +92,14 @@ export type GetQuizQuestionsSelectionMethodEnum = typeof GetQuizQuestionsSelecti
|
|
|
68
92
|
* Check if a given object implements the GetQuizQuestions interface.
|
|
69
93
|
*/
|
|
70
94
|
export function instanceOfGetQuizQuestions(value: object): value is GetQuizQuestions {
|
|
71
|
-
if (!('
|
|
95
|
+
if (!('page' in value) || value['page'] === undefined) return false;
|
|
96
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
|
|
97
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
|
98
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
|
|
72
99
|
if (!('totalQuestions' in value) || value['totalQuestions'] === undefined) return false;
|
|
73
100
|
if (!('totalPoints' in value) || value['totalPoints'] === undefined) return false;
|
|
74
101
|
if (!('selectionMethod' in value) || value['selectionMethod'] === undefined) return false;
|
|
102
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
75
103
|
return true;
|
|
76
104
|
}
|
|
77
105
|
|
|
@@ -85,10 +113,14 @@ export function GetQuizQuestionsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
85
113
|
}
|
|
86
114
|
return {
|
|
87
115
|
|
|
88
|
-
'
|
|
116
|
+
'page': json['page'],
|
|
117
|
+
'pageSize': json['pageSize'],
|
|
118
|
+
'totalPages': json['totalPages'],
|
|
119
|
+
'totalItems': json['totalItems'],
|
|
89
120
|
'totalQuestions': json['total_questions'],
|
|
90
121
|
'totalPoints': json['total_points'],
|
|
91
122
|
'selectionMethod': json['selection_method'],
|
|
123
|
+
'items': ((json['items'] as Array<any>).map(GetQuizQuestionsItemsInnerFromJSON)),
|
|
92
124
|
};
|
|
93
125
|
}
|
|
94
126
|
|
|
@@ -103,10 +135,14 @@ export function GetQuizQuestionsToJSONTyped(value?: GetQuizQuestions | null, ign
|
|
|
103
135
|
|
|
104
136
|
return {
|
|
105
137
|
|
|
106
|
-
'
|
|
138
|
+
'page': value['page'],
|
|
139
|
+
'pageSize': value['pageSize'],
|
|
140
|
+
'totalPages': value['totalPages'],
|
|
141
|
+
'totalItems': value['totalItems'],
|
|
107
142
|
'total_questions': value['totalQuestions'],
|
|
108
143
|
'total_points': value['totalPoints'],
|
|
109
144
|
'selection_method': value['selectionMethod'],
|
|
145
|
+
'items': ((value['items'] as Array<any>).map(GetQuizQuestionsItemsInnerToJSON)),
|
|
110
146
|
};
|
|
111
147
|
}
|
|
112
148
|
|
|
@@ -13,74 +13,74 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { GetQuizQuestionsItemsInnerQuestionDetails } from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
GetQuizQuestionsItemsInnerQuestionDetailsFromJSON,
|
|
19
|
+
GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped,
|
|
20
|
+
GetQuizQuestionsItemsInnerQuestionDetailsToJSON,
|
|
21
|
+
GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped,
|
|
22
|
+
} from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
27
|
-
* @interface
|
|
27
|
+
* @interface GetQuizQuestionsItemsInner
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
29
|
+
export interface GetQuizQuestionsItemsInner {
|
|
30
30
|
/**
|
|
31
31
|
* Quiz-question relationship ID
|
|
32
32
|
* @type {string}
|
|
33
|
-
* @memberof
|
|
33
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
34
34
|
*/
|
|
35
35
|
id: string;
|
|
36
36
|
/**
|
|
37
37
|
* ID of the question
|
|
38
38
|
* @type {string}
|
|
39
|
-
* @memberof
|
|
39
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
40
40
|
*/
|
|
41
41
|
questionId: string;
|
|
42
42
|
/**
|
|
43
43
|
* External ID of the question
|
|
44
44
|
* @type {string}
|
|
45
|
-
* @memberof
|
|
45
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
46
46
|
*/
|
|
47
47
|
questionExternalId: string;
|
|
48
48
|
/**
|
|
49
49
|
* Order of question in quiz
|
|
50
50
|
* @type {number}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
52
52
|
*/
|
|
53
53
|
questionOrder: number;
|
|
54
54
|
/**
|
|
55
55
|
* Points assigned to this question
|
|
56
56
|
* @type {number}
|
|
57
|
-
* @memberof
|
|
57
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
58
58
|
*/
|
|
59
59
|
points: number;
|
|
60
60
|
/**
|
|
61
61
|
* Whether question is locked to specific version
|
|
62
62
|
* @type {boolean}
|
|
63
|
-
* @memberof
|
|
63
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
64
64
|
*/
|
|
65
65
|
versionLocked: boolean;
|
|
66
66
|
/**
|
|
67
67
|
*
|
|
68
|
-
* @type {
|
|
69
|
-
* @memberof
|
|
68
|
+
* @type {GetQuizQuestionsItemsInnerQuestionDetails}
|
|
69
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
70
70
|
*/
|
|
71
|
-
questionDetails:
|
|
71
|
+
questionDetails: GetQuizQuestionsItemsInnerQuestionDetails;
|
|
72
72
|
/**
|
|
73
73
|
* When question was added to quiz
|
|
74
74
|
* @type {Date}
|
|
75
|
-
* @memberof
|
|
75
|
+
* @memberof GetQuizQuestionsItemsInner
|
|
76
76
|
*/
|
|
77
77
|
createdAt: Date;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Check if a given object implements the
|
|
81
|
+
* Check if a given object implements the GetQuizQuestionsItemsInner interface.
|
|
82
82
|
*/
|
|
83
|
-
export function
|
|
83
|
+
export function instanceOfGetQuizQuestionsItemsInner(value: object): value is GetQuizQuestionsItemsInner {
|
|
84
84
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
85
85
|
if (!('questionId' in value) || value['questionId'] === undefined) return false;
|
|
86
86
|
if (!('questionExternalId' in value) || value['questionExternalId'] === undefined) return false;
|
|
@@ -92,11 +92,11 @@ export function instanceOfGetQuizQuestionsQuestionsInner(value: object): value i
|
|
|
92
92
|
return true;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export function
|
|
96
|
-
return
|
|
95
|
+
export function GetQuizQuestionsItemsInnerFromJSON(json: any): GetQuizQuestionsItemsInner {
|
|
96
|
+
return GetQuizQuestionsItemsInnerFromJSONTyped(json, false);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export function
|
|
99
|
+
export function GetQuizQuestionsItemsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInner {
|
|
100
100
|
if (json == null) {
|
|
101
101
|
return json;
|
|
102
102
|
}
|
|
@@ -108,16 +108,16 @@ export function GetQuizQuestionsQuestionsInnerFromJSONTyped(json: any, ignoreDis
|
|
|
108
108
|
'questionOrder': json['question_order'],
|
|
109
109
|
'points': json['points'],
|
|
110
110
|
'versionLocked': json['version_locked'],
|
|
111
|
-
'questionDetails':
|
|
111
|
+
'questionDetails': GetQuizQuestionsItemsInnerQuestionDetailsFromJSON(json['question_details']),
|
|
112
112
|
'createdAt': (new Date(json['created_at'])),
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
export function
|
|
117
|
-
return
|
|
116
|
+
export function GetQuizQuestionsItemsInnerToJSON(json: any): GetQuizQuestionsItemsInner {
|
|
117
|
+
return GetQuizQuestionsItemsInnerToJSONTyped(json, false);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
export function
|
|
120
|
+
export function GetQuizQuestionsItemsInnerToJSONTyped(value?: GetQuizQuestionsItemsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
121
121
|
if (value == null) {
|
|
122
122
|
return value;
|
|
123
123
|
}
|
|
@@ -130,7 +130,7 @@ export function GetQuizQuestionsQuestionsInnerToJSONTyped(value?: GetQuizQuestio
|
|
|
130
130
|
'question_order': value['questionOrder'],
|
|
131
131
|
'points': value['points'],
|
|
132
132
|
'version_locked': value['versionLocked'],
|
|
133
|
-
'question_details':
|
|
133
|
+
'question_details': GetQuizQuestionsItemsInnerQuestionDetailsToJSON(value['questionDetails']),
|
|
134
134
|
'created_at': ((value['createdAt']).toISOString()),
|
|
135
135
|
};
|
|
136
136
|
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner } from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
17
|
+
import {
|
|
18
|
+
GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON,
|
|
19
|
+
GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped,
|
|
20
|
+
GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON,
|
|
21
|
+
GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped,
|
|
22
|
+
} from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Question details including all metadata
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetQuizQuestionsItemsInnerQuestionDetails
|
|
28
|
+
*/
|
|
29
|
+
export interface GetQuizQuestionsItemsInnerQuestionDetails {
|
|
30
|
+
/**
|
|
31
|
+
* The question text
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
34
|
+
*/
|
|
35
|
+
questionText: string;
|
|
36
|
+
/**
|
|
37
|
+
* Type of question
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
40
|
+
*/
|
|
41
|
+
questionType: GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Question topic
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
46
|
+
*/
|
|
47
|
+
topic: string;
|
|
48
|
+
/**
|
|
49
|
+
* Question difficulty
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
52
|
+
*/
|
|
53
|
+
difficultyLevel: GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Course associated with question
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
58
|
+
*/
|
|
59
|
+
course?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Explanation of correct answer
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
64
|
+
*/
|
|
65
|
+
explanation?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Tags associated with question
|
|
68
|
+
* @type {Array<string>}
|
|
69
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
70
|
+
*/
|
|
71
|
+
tags?: Array<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Version number of this question
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
76
|
+
*/
|
|
77
|
+
versionNumber?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Whether this is the latest version
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
82
|
+
*/
|
|
83
|
+
isLatestVersion?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Available answer choices
|
|
86
|
+
* @type {Array<GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner>}
|
|
87
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetails
|
|
88
|
+
*/
|
|
89
|
+
answerChoices?: Array<GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum = {
|
|
97
|
+
SingleAnswer: 'single_answer',
|
|
98
|
+
MultipleAnswer: 'multiple_answer',
|
|
99
|
+
FillInBlank: 'fill_in_blank'
|
|
100
|
+
} as const;
|
|
101
|
+
export type GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum = typeof GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum[keyof typeof GetQuizQuestionsItemsInnerQuestionDetailsQuestionTypeEnum];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @export
|
|
105
|
+
*/
|
|
106
|
+
export const GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum = {
|
|
107
|
+
Beginner: 'beginner',
|
|
108
|
+
Intermediate: 'intermediate',
|
|
109
|
+
Advanced: 'advanced'
|
|
110
|
+
} as const;
|
|
111
|
+
export type GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum = typeof GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum[keyof typeof GetQuizQuestionsItemsInnerQuestionDetailsDifficultyLevelEnum];
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetails interface.
|
|
116
|
+
*/
|
|
117
|
+
export function instanceOfGetQuizQuestionsItemsInnerQuestionDetails(value: object): value is GetQuizQuestionsItemsInnerQuestionDetails {
|
|
118
|
+
if (!('questionText' in value) || value['questionText'] === undefined) return false;
|
|
119
|
+
if (!('questionType' in value) || value['questionType'] === undefined) return false;
|
|
120
|
+
if (!('topic' in value) || value['topic'] === undefined) return false;
|
|
121
|
+
if (!('difficultyLevel' in value) || value['difficultyLevel'] === undefined) return false;
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsFromJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetails {
|
|
126
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped(json, false);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInnerQuestionDetails {
|
|
130
|
+
if (json == null) {
|
|
131
|
+
return json;
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
|
|
135
|
+
'questionText': json['question_text'],
|
|
136
|
+
'questionType': json['question_type'],
|
|
137
|
+
'topic': json['topic'],
|
|
138
|
+
'difficultyLevel': json['difficulty_level'],
|
|
139
|
+
'course': json['course'] == null ? undefined : json['course'],
|
|
140
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
141
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
142
|
+
'versionNumber': json['version_number'] == null ? undefined : json['version_number'],
|
|
143
|
+
'isLatestVersion': json['is_latest_version'] == null ? undefined : json['is_latest_version'],
|
|
144
|
+
'answerChoices': json['answer_choices'] == null ? undefined : ((json['answer_choices'] as Array<any>).map(GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON)),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsToJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetails {
|
|
149
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped(json, false);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsToJSONTyped(value?: GetQuizQuestionsItemsInnerQuestionDetails | null, ignoreDiscriminator: boolean = false): any {
|
|
153
|
+
if (value == null) {
|
|
154
|
+
return value;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
|
|
159
|
+
'question_text': value['questionText'],
|
|
160
|
+
'question_type': value['questionType'],
|
|
161
|
+
'topic': value['topic'],
|
|
162
|
+
'difficulty_level': value['difficultyLevel'],
|
|
163
|
+
'course': value['course'],
|
|
164
|
+
'explanation': value['explanation'],
|
|
165
|
+
'tags': value['tags'],
|
|
166
|
+
'version_number': value['versionNumber'],
|
|
167
|
+
'is_latest_version': value['isLatestVersion'],
|
|
168
|
+
'answer_choices': value['answerChoices'] == null ? undefined : ((value['answerChoices'] as Array<any>).map(GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON)),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
20
|
+
*/
|
|
21
|
+
export interface GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
|
|
22
|
+
/**
|
|
23
|
+
* Answer choice ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* External ID of answer choice
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
32
|
+
*/
|
|
33
|
+
externalId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Answer choice text
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
38
|
+
*/
|
|
39
|
+
text: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether this choice is correct
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
44
|
+
*/
|
|
45
|
+
isCorrect: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Display order of choice
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
|
|
50
|
+
*/
|
|
51
|
+
displayOrder: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfGetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner(value: object): value is GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
|
|
58
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
59
|
+
if (!('externalId' in value) || value['externalId'] === undefined) return false;
|
|
60
|
+
if (!('text' in value) || value['text'] === undefined) return false;
|
|
61
|
+
if (!('isCorrect' in value) || value['isCorrect'] === undefined) return false;
|
|
62
|
+
if (!('displayOrder' in value) || value['displayOrder'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
|
|
67
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'externalId': json['external_id'],
|
|
78
|
+
'text': json['text'],
|
|
79
|
+
'isCorrect': json['is_correct'],
|
|
80
|
+
'displayOrder': json['display_order'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
|
|
85
|
+
return GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped(value?: GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'id': value['id'],
|
|
96
|
+
'external_id': value['externalId'],
|
|
97
|
+
'text': value['text'],
|
|
98
|
+
'is_correct': value['isCorrect'],
|
|
99
|
+
'display_order': value['displayOrder'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -81,9 +81,9 @@ export * from './GetQuizListAllOfFilters';
|
|
|
81
81
|
export * from './GetQuizListAllOfQuizzes';
|
|
82
82
|
export * from './GetQuizListAllOfStatistics';
|
|
83
83
|
export * from './GetQuizQuestions';
|
|
84
|
-
export * from './
|
|
85
|
-
export * from './
|
|
86
|
-
export * from './
|
|
84
|
+
export * from './GetQuizQuestionsItemsInner';
|
|
85
|
+
export * from './GetQuizQuestionsItemsInnerQuestionDetails';
|
|
86
|
+
export * from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
|
|
87
87
|
export * from './GetQuizResults';
|
|
88
88
|
export * from './GetQuizResultsFeedback';
|
|
89
89
|
export * from './GetQuizResultsFeedbackDifficultyPerformanceInner';
|