@instructure/athena-api-client 1.0.6 → 1.0.8
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/README.md +15 -0
- package/dist/apis/QuizSessionsApi.d.ts +76 -0
- package/dist/apis/QuizSessionsApi.js +207 -0
- package/dist/apis/QuizzesApi.d.ts +32 -0
- package/dist/apis/QuizzesApi.js +74 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/QuizSessionsApi.d.ts +76 -0
- package/dist/esm/apis/QuizSessionsApi.js +203 -0
- package/dist/esm/apis/QuizzesApi.d.ts +32 -0
- package/dist/esm/apis/QuizzesApi.js +70 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/Chat.d.ts +7 -7
- package/dist/esm/models/Chat.js +21 -7
- package/dist/esm/models/ChatRequestAttachmentsInner.d.ts +6 -0
- package/dist/esm/models/ChatRequestAttachmentsInner.js +4 -0
- package/dist/esm/models/MessageAttachmentsInner.d.ts +6 -0
- package/dist/esm/models/MessageAttachmentsInner.js +4 -0
- package/dist/esm/models/Quiz.d.ts +76 -0
- package/dist/esm/models/Quiz.js +72 -0
- package/dist/esm/models/QuizQuestion.d.ts +103 -0
- package/dist/esm/models/QuizQuestion.js +85 -0
- package/dist/esm/models/QuizResponse.d.ts +76 -0
- package/dist/esm/models/QuizResponse.js +70 -0
- package/dist/esm/models/QuizSession.d.ts +71 -0
- package/dist/esm/models/QuizSession.js +69 -0
- package/dist/esm/models/QuizSessionSummary.d.ts +61 -0
- package/dist/esm/models/QuizSessionSummary.js +64 -0
- package/dist/esm/models/QuizSessionSummaryScore.d.ts +47 -0
- package/dist/esm/models/QuizSessionSummaryScore.js +53 -0
- package/dist/esm/models/QuizWithQuestions.d.ts +83 -0
- package/dist/esm/models/QuizWithQuestions.js +77 -0
- package/dist/esm/models/ScoreByTypeValue.d.ts +38 -0
- package/dist/esm/models/ScoreByTypeValue.js +47 -0
- package/dist/esm/models/SubmitQuizResponseRequest.d.ts +58 -0
- package/dist/esm/models/SubmitQuizResponseRequest.js +58 -0
- package/dist/esm/models/UpdateQuizSessionRequest.d.ts +40 -0
- package/dist/esm/models/UpdateQuizSessionRequest.js +50 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/Chat.d.ts +7 -7
- package/dist/models/Chat.js +21 -7
- package/dist/models/ChatRequestAttachmentsInner.d.ts +6 -0
- package/dist/models/ChatRequestAttachmentsInner.js +4 -0
- package/dist/models/MessageAttachmentsInner.d.ts +6 -0
- package/dist/models/MessageAttachmentsInner.js +4 -0
- package/dist/models/Quiz.d.ts +76 -0
- package/dist/models/Quiz.js +80 -0
- package/dist/models/QuizQuestion.d.ts +103 -0
- package/dist/models/QuizQuestion.js +93 -0
- package/dist/models/QuizResponse.d.ts +76 -0
- package/dist/models/QuizResponse.js +78 -0
- package/dist/models/QuizSession.d.ts +71 -0
- package/dist/models/QuizSession.js +77 -0
- package/dist/models/QuizSessionSummary.d.ts +61 -0
- package/dist/models/QuizSessionSummary.js +71 -0
- package/dist/models/QuizSessionSummaryScore.d.ts +47 -0
- package/dist/models/QuizSessionSummaryScore.js +60 -0
- package/dist/models/QuizWithQuestions.d.ts +83 -0
- package/dist/models/QuizWithQuestions.js +85 -0
- package/dist/models/ScoreByTypeValue.d.ts +38 -0
- package/dist/models/ScoreByTypeValue.js +54 -0
- package/dist/models/SubmitQuizResponseRequest.d.ts +58 -0
- package/dist/models/SubmitQuizResponseRequest.js +66 -0
- package/dist/models/UpdateQuizSessionRequest.d.ts +40 -0
- package/dist/models/UpdateQuizSessionRequest.js +58 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
|
@@ -37,6 +37,8 @@ function instanceOfChatRequestAttachmentsInner(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
return true;
|
|
41
43
|
}
|
|
42
44
|
function ChatRequestAttachmentsInnerFromJSON(json) {
|
|
@@ -49,6 +51,7 @@ function ChatRequestAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
51
|
return {
|
|
50
52
|
'fileId': json['fileId'],
|
|
51
53
|
'mimeType': json['mimeType'],
|
|
54
|
+
'name': json['name'],
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
57
|
function ChatRequestAttachmentsInnerToJSON(json) {
|
|
@@ -61,5 +64,6 @@ function ChatRequestAttachmentsInnerToJSONTyped(value, ignoreDiscriminator = fal
|
|
|
61
64
|
return {
|
|
62
65
|
'fileId': value['fileId'],
|
|
63
66
|
'mimeType': value['mimeType'],
|
|
67
|
+
'name': value['name'],
|
|
64
68
|
};
|
|
65
69
|
}
|
|
@@ -27,6 +27,12 @@ export interface MessageAttachmentsInner {
|
|
|
27
27
|
* @memberof MessageAttachmentsInner
|
|
28
28
|
*/
|
|
29
29
|
mimeType: MessageAttachmentsInnerMimeTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Original filename of the uploaded file
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof MessageAttachmentsInner
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
30
36
|
/**
|
|
31
37
|
* Fresh signed GET URL (expires in 30 minutes). Absent for legacy attachments without a fileId.
|
|
32
38
|
* @type {string}
|
|
@@ -37,6 +37,8 @@ function instanceOfMessageAttachmentsInner(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
return true;
|
|
41
43
|
}
|
|
42
44
|
function MessageAttachmentsInnerFromJSON(json) {
|
|
@@ -49,6 +51,7 @@ function MessageAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
51
|
return {
|
|
50
52
|
'fileId': json['fileId'],
|
|
51
53
|
'mimeType': json['mimeType'],
|
|
54
|
+
'name': json['name'],
|
|
52
55
|
'url': json['url'] == null ? undefined : json['url'],
|
|
53
56
|
};
|
|
54
57
|
}
|
|
@@ -62,6 +65,7 @@ function MessageAttachmentsInnerToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
62
65
|
return {
|
|
63
66
|
'fileId': value['fileId'],
|
|
64
67
|
'mimeType': value['mimeType'],
|
|
68
|
+
'name': value['name'],
|
|
65
69
|
'url': value['url'],
|
|
66
70
|
};
|
|
67
71
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
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 Quiz
|
|
16
|
+
*/
|
|
17
|
+
export interface Quiz {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Quiz
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Quiz
|
|
28
|
+
*/
|
|
29
|
+
accountUserId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Quiz
|
|
34
|
+
*/
|
|
35
|
+
chatId?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Quiz
|
|
40
|
+
*/
|
|
41
|
+
title: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Quiz
|
|
46
|
+
*/
|
|
47
|
+
topic: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Quiz
|
|
52
|
+
*/
|
|
53
|
+
mode: QuizModeEnum;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof Quiz
|
|
58
|
+
*/
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const QuizModeEnum: {
|
|
65
|
+
readonly Quiz: "quiz";
|
|
66
|
+
readonly Flashcards: "flashcards";
|
|
67
|
+
};
|
|
68
|
+
export type QuizModeEnum = typeof QuizModeEnum[keyof typeof QuizModeEnum];
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the Quiz interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfQuiz(value: object): value is Quiz;
|
|
73
|
+
export declare function QuizFromJSON(json: any): Quiz;
|
|
74
|
+
export declare function QuizFromJSONTyped(json: any, ignoreDiscriminator: boolean): Quiz;
|
|
75
|
+
export declare function QuizToJSON(json: any): Quiz;
|
|
76
|
+
export declare function QuizToJSONTyped(value?: Quiz | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
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.QuizModeEnum = void 0;
|
|
17
|
+
exports.instanceOfQuiz = instanceOfQuiz;
|
|
18
|
+
exports.QuizFromJSON = QuizFromJSON;
|
|
19
|
+
exports.QuizFromJSONTyped = QuizFromJSONTyped;
|
|
20
|
+
exports.QuizToJSON = QuizToJSON;
|
|
21
|
+
exports.QuizToJSONTyped = QuizToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.QuizModeEnum = {
|
|
26
|
+
Quiz: 'quiz',
|
|
27
|
+
Flashcards: 'flashcards'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the Quiz interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfQuiz(value) {
|
|
33
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('accountUserId' in value) || value['accountUserId'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('title' in value) || value['title'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('topic' in value) || value['topic'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('mode' in value) || value['mode'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
function QuizFromJSON(json) {
|
|
48
|
+
return QuizFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function QuizFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'accountUserId': json['accountUserId'],
|
|
57
|
+
'chatId': json['chatId'] == null ? undefined : json['chatId'],
|
|
58
|
+
'title': json['title'],
|
|
59
|
+
'topic': json['topic'],
|
|
60
|
+
'mode': json['mode'],
|
|
61
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function QuizToJSON(json) {
|
|
65
|
+
return QuizToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
function QuizToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': value['id'],
|
|
73
|
+
'accountUserId': value['accountUserId'],
|
|
74
|
+
'chatId': value['chatId'],
|
|
75
|
+
'title': value['title'],
|
|
76
|
+
'topic': value['topic'],
|
|
77
|
+
'mode': value['mode'],
|
|
78
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
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 QuizQuestion
|
|
16
|
+
*/
|
|
17
|
+
export interface QuizQuestion {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof QuizQuestion
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof QuizQuestion
|
|
28
|
+
*/
|
|
29
|
+
quizId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof QuizQuestion
|
|
34
|
+
*/
|
|
35
|
+
conceptId?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof QuizQuestion
|
|
40
|
+
*/
|
|
41
|
+
ordinal: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof QuizQuestion
|
|
46
|
+
*/
|
|
47
|
+
type: QuizQuestionTypeEnum;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof QuizQuestion
|
|
52
|
+
*/
|
|
53
|
+
question: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<string>}
|
|
57
|
+
* @memberof QuizQuestion
|
|
58
|
+
*/
|
|
59
|
+
options?: Array<string> | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof QuizQuestion
|
|
64
|
+
*/
|
|
65
|
+
correctAnswer: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof QuizQuestion
|
|
70
|
+
*/
|
|
71
|
+
explanation?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof QuizQuestion
|
|
76
|
+
*/
|
|
77
|
+
topic?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof QuizQuestion
|
|
82
|
+
*/
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export declare const QuizQuestionTypeEnum: {
|
|
89
|
+
readonly Mcq: "mcq";
|
|
90
|
+
readonly FillBlank: "fill-blank";
|
|
91
|
+
readonly SpotError: "spot-error";
|
|
92
|
+
readonly TeachBack: "teach-back";
|
|
93
|
+
readonly Flashcard: "flashcard";
|
|
94
|
+
};
|
|
95
|
+
export type QuizQuestionTypeEnum = typeof QuizQuestionTypeEnum[keyof typeof QuizQuestionTypeEnum];
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the QuizQuestion interface.
|
|
98
|
+
*/
|
|
99
|
+
export declare function instanceOfQuizQuestion(value: object): value is QuizQuestion;
|
|
100
|
+
export declare function QuizQuestionFromJSON(json: any): QuizQuestion;
|
|
101
|
+
export declare function QuizQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizQuestion;
|
|
102
|
+
export declare function QuizQuestionToJSON(json: any): QuizQuestion;
|
|
103
|
+
export declare function QuizQuestionToJSONTyped(value?: QuizQuestion | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
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.QuizQuestionTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfQuizQuestion = instanceOfQuizQuestion;
|
|
18
|
+
exports.QuizQuestionFromJSON = QuizQuestionFromJSON;
|
|
19
|
+
exports.QuizQuestionFromJSONTyped = QuizQuestionFromJSONTyped;
|
|
20
|
+
exports.QuizQuestionToJSON = QuizQuestionToJSON;
|
|
21
|
+
exports.QuizQuestionToJSONTyped = QuizQuestionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.QuizQuestionTypeEnum = {
|
|
26
|
+
Mcq: 'mcq',
|
|
27
|
+
FillBlank: 'fill-blank',
|
|
28
|
+
SpotError: 'spot-error',
|
|
29
|
+
TeachBack: 'teach-back',
|
|
30
|
+
Flashcard: 'flashcard'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the QuizQuestion interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfQuizQuestion(value) {
|
|
36
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('quizId' in value) || value['quizId'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('ordinal' in value) || value['ordinal'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('question' in value) || value['question'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('correctAnswer' in value) || value['correctAnswer'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function QuizQuestionFromJSON(json) {
|
|
53
|
+
return QuizQuestionFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function QuizQuestionFromJSONTyped(json, ignoreDiscriminator) {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'id': json['id'],
|
|
61
|
+
'quizId': json['quizId'],
|
|
62
|
+
'conceptId': json['conceptId'] == null ? undefined : json['conceptId'],
|
|
63
|
+
'ordinal': json['ordinal'],
|
|
64
|
+
'type': json['type'],
|
|
65
|
+
'question': json['question'],
|
|
66
|
+
'options': json['options'] == null ? undefined : json['options'],
|
|
67
|
+
'correctAnswer': json['correctAnswer'],
|
|
68
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
69
|
+
'topic': json['topic'] == null ? undefined : json['topic'],
|
|
70
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function QuizQuestionToJSON(json) {
|
|
74
|
+
return QuizQuestionToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
function QuizQuestionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'id': value['id'],
|
|
82
|
+
'quizId': value['quizId'],
|
|
83
|
+
'conceptId': value['conceptId'],
|
|
84
|
+
'ordinal': value['ordinal'],
|
|
85
|
+
'type': value['type'],
|
|
86
|
+
'question': value['question'],
|
|
87
|
+
'options': value['options'],
|
|
88
|
+
'correctAnswer': value['correctAnswer'],
|
|
89
|
+
'explanation': value['explanation'],
|
|
90
|
+
'topic': value['topic'],
|
|
91
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
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 QuizResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface QuizResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof QuizResponse
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof QuizResponse
|
|
28
|
+
*/
|
|
29
|
+
sessionId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof QuizResponse
|
|
34
|
+
*/
|
|
35
|
+
questionId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof QuizResponse
|
|
40
|
+
*/
|
|
41
|
+
userAnswer: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof QuizResponse
|
|
46
|
+
*/
|
|
47
|
+
isCorrect?: boolean | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof QuizResponse
|
|
52
|
+
*/
|
|
53
|
+
rating?: QuizResponseRatingEnum | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof QuizResponse
|
|
58
|
+
*/
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const QuizResponseRatingEnum: {
|
|
65
|
+
readonly WasRight: "was-right";
|
|
66
|
+
readonly NeedPractice: "need-practice";
|
|
67
|
+
};
|
|
68
|
+
export type QuizResponseRatingEnum = typeof QuizResponseRatingEnum[keyof typeof QuizResponseRatingEnum];
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the QuizResponse interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfQuizResponse(value: object): value is QuizResponse;
|
|
73
|
+
export declare function QuizResponseFromJSON(json: any): QuizResponse;
|
|
74
|
+
export declare function QuizResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizResponse;
|
|
75
|
+
export declare function QuizResponseToJSON(json: any): QuizResponse;
|
|
76
|
+
export declare function QuizResponseToJSONTyped(value?: QuizResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
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.QuizResponseRatingEnum = void 0;
|
|
17
|
+
exports.instanceOfQuizResponse = instanceOfQuizResponse;
|
|
18
|
+
exports.QuizResponseFromJSON = QuizResponseFromJSON;
|
|
19
|
+
exports.QuizResponseFromJSONTyped = QuizResponseFromJSONTyped;
|
|
20
|
+
exports.QuizResponseToJSON = QuizResponseToJSON;
|
|
21
|
+
exports.QuizResponseToJSONTyped = QuizResponseToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.QuizResponseRatingEnum = {
|
|
26
|
+
WasRight: 'was-right',
|
|
27
|
+
NeedPractice: 'need-practice'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the QuizResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfQuizResponse(value) {
|
|
33
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('sessionId' in value) || value['sessionId'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('questionId' in value) || value['questionId'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('userAnswer' in value) || value['userAnswer'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
function QuizResponseFromJSON(json) {
|
|
46
|
+
return QuizResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function QuizResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'id': json['id'],
|
|
54
|
+
'sessionId': json['sessionId'],
|
|
55
|
+
'questionId': json['questionId'],
|
|
56
|
+
'userAnswer': json['userAnswer'],
|
|
57
|
+
'isCorrect': json['isCorrect'] == null ? undefined : json['isCorrect'],
|
|
58
|
+
'rating': json['rating'] == null ? undefined : json['rating'],
|
|
59
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function QuizResponseToJSON(json) {
|
|
63
|
+
return QuizResponseToJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
function QuizResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
'id': value['id'],
|
|
71
|
+
'sessionId': value['sessionId'],
|
|
72
|
+
'questionId': value['questionId'],
|
|
73
|
+
'userAnswer': value['userAnswer'],
|
|
74
|
+
'isCorrect': value['isCorrect'],
|
|
75
|
+
'rating': value['rating'],
|
|
76
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
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 QuizSession
|
|
16
|
+
*/
|
|
17
|
+
export interface QuizSession {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof QuizSession
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof QuizSession
|
|
28
|
+
*/
|
|
29
|
+
quizId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof QuizSession
|
|
34
|
+
*/
|
|
35
|
+
accountUserId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof QuizSession
|
|
40
|
+
*/
|
|
41
|
+
status: QuizSessionStatusEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof QuizSession
|
|
46
|
+
*/
|
|
47
|
+
startedAt: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof QuizSession
|
|
52
|
+
*/
|
|
53
|
+
completedAt?: Date | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const QuizSessionStatusEnum: {
|
|
59
|
+
readonly Active: "active";
|
|
60
|
+
readonly Completed: "completed";
|
|
61
|
+
readonly Abandoned: "abandoned";
|
|
62
|
+
};
|
|
63
|
+
export type QuizSessionStatusEnum = typeof QuizSessionStatusEnum[keyof typeof QuizSessionStatusEnum];
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the QuizSession interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfQuizSession(value: object): value is QuizSession;
|
|
68
|
+
export declare function QuizSessionFromJSON(json: any): QuizSession;
|
|
69
|
+
export declare function QuizSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizSession;
|
|
70
|
+
export declare function QuizSessionToJSON(json: any): QuizSession;
|
|
71
|
+
export declare function QuizSessionToJSONTyped(value?: QuizSession | null, ignoreDiscriminator?: boolean): any;
|