@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.
Files changed (70) hide show
  1. package/README.md +15 -0
  2. package/dist/apis/QuizSessionsApi.d.ts +76 -0
  3. package/dist/apis/QuizSessionsApi.js +207 -0
  4. package/dist/apis/QuizzesApi.d.ts +32 -0
  5. package/dist/apis/QuizzesApi.js +74 -0
  6. package/dist/apis/index.d.ts +2 -0
  7. package/dist/apis/index.js +2 -0
  8. package/dist/esm/apis/QuizSessionsApi.d.ts +76 -0
  9. package/dist/esm/apis/QuizSessionsApi.js +203 -0
  10. package/dist/esm/apis/QuizzesApi.d.ts +32 -0
  11. package/dist/esm/apis/QuizzesApi.js +70 -0
  12. package/dist/esm/apis/index.d.ts +2 -0
  13. package/dist/esm/apis/index.js +2 -0
  14. package/dist/esm/models/Chat.d.ts +7 -7
  15. package/dist/esm/models/Chat.js +21 -7
  16. package/dist/esm/models/ChatRequestAttachmentsInner.d.ts +6 -0
  17. package/dist/esm/models/ChatRequestAttachmentsInner.js +4 -0
  18. package/dist/esm/models/MessageAttachmentsInner.d.ts +6 -0
  19. package/dist/esm/models/MessageAttachmentsInner.js +4 -0
  20. package/dist/esm/models/Quiz.d.ts +76 -0
  21. package/dist/esm/models/Quiz.js +72 -0
  22. package/dist/esm/models/QuizQuestion.d.ts +103 -0
  23. package/dist/esm/models/QuizQuestion.js +85 -0
  24. package/dist/esm/models/QuizResponse.d.ts +76 -0
  25. package/dist/esm/models/QuizResponse.js +70 -0
  26. package/dist/esm/models/QuizSession.d.ts +71 -0
  27. package/dist/esm/models/QuizSession.js +69 -0
  28. package/dist/esm/models/QuizSessionSummary.d.ts +61 -0
  29. package/dist/esm/models/QuizSessionSummary.js +64 -0
  30. package/dist/esm/models/QuizSessionSummaryScore.d.ts +47 -0
  31. package/dist/esm/models/QuizSessionSummaryScore.js +53 -0
  32. package/dist/esm/models/QuizWithQuestions.d.ts +83 -0
  33. package/dist/esm/models/QuizWithQuestions.js +77 -0
  34. package/dist/esm/models/ScoreByTypeValue.d.ts +38 -0
  35. package/dist/esm/models/ScoreByTypeValue.js +47 -0
  36. package/dist/esm/models/SubmitQuizResponseRequest.d.ts +58 -0
  37. package/dist/esm/models/SubmitQuizResponseRequest.js +58 -0
  38. package/dist/esm/models/UpdateQuizSessionRequest.d.ts +40 -0
  39. package/dist/esm/models/UpdateQuizSessionRequest.js +50 -0
  40. package/dist/esm/models/index.d.ts +10 -0
  41. package/dist/esm/models/index.js +10 -0
  42. package/dist/models/Chat.d.ts +7 -7
  43. package/dist/models/Chat.js +21 -7
  44. package/dist/models/ChatRequestAttachmentsInner.d.ts +6 -0
  45. package/dist/models/ChatRequestAttachmentsInner.js +4 -0
  46. package/dist/models/MessageAttachmentsInner.d.ts +6 -0
  47. package/dist/models/MessageAttachmentsInner.js +4 -0
  48. package/dist/models/Quiz.d.ts +76 -0
  49. package/dist/models/Quiz.js +80 -0
  50. package/dist/models/QuizQuestion.d.ts +103 -0
  51. package/dist/models/QuizQuestion.js +93 -0
  52. package/dist/models/QuizResponse.d.ts +76 -0
  53. package/dist/models/QuizResponse.js +78 -0
  54. package/dist/models/QuizSession.d.ts +71 -0
  55. package/dist/models/QuizSession.js +77 -0
  56. package/dist/models/QuizSessionSummary.d.ts +61 -0
  57. package/dist/models/QuizSessionSummary.js +71 -0
  58. package/dist/models/QuizSessionSummaryScore.d.ts +47 -0
  59. package/dist/models/QuizSessionSummaryScore.js +60 -0
  60. package/dist/models/QuizWithQuestions.d.ts +83 -0
  61. package/dist/models/QuizWithQuestions.js +85 -0
  62. package/dist/models/ScoreByTypeValue.d.ts +38 -0
  63. package/dist/models/ScoreByTypeValue.js +54 -0
  64. package/dist/models/SubmitQuizResponseRequest.d.ts +58 -0
  65. package/dist/models/SubmitQuizResponseRequest.js +66 -0
  66. package/dist/models/UpdateQuizSessionRequest.d.ts +40 -0
  67. package/dist/models/UpdateQuizSessionRequest.js +58 -0
  68. package/dist/models/index.d.ts +10 -0
  69. package/dist/models/index.js +10 -0
  70. package/package.json +1 -1
@@ -0,0 +1,77 @@
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.QuizSessionStatusEnum = void 0;
17
+ exports.instanceOfQuizSession = instanceOfQuizSession;
18
+ exports.QuizSessionFromJSON = QuizSessionFromJSON;
19
+ exports.QuizSessionFromJSONTyped = QuizSessionFromJSONTyped;
20
+ exports.QuizSessionToJSON = QuizSessionToJSON;
21
+ exports.QuizSessionToJSONTyped = QuizSessionToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.QuizSessionStatusEnum = {
26
+ Active: 'active',
27
+ Completed: 'completed',
28
+ Abandoned: 'abandoned'
29
+ };
30
+ /**
31
+ * Check if a given object implements the QuizSession interface.
32
+ */
33
+ function instanceOfQuizSession(value) {
34
+ if (!('id' in value) || value['id'] === undefined)
35
+ return false;
36
+ if (!('quizId' in value) || value['quizId'] === undefined)
37
+ return false;
38
+ if (!('accountUserId' in value) || value['accountUserId'] === undefined)
39
+ return false;
40
+ if (!('status' in value) || value['status'] === undefined)
41
+ return false;
42
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function QuizSessionFromJSON(json) {
47
+ return QuizSessionFromJSONTyped(json, false);
48
+ }
49
+ function QuizSessionFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'id': json['id'],
55
+ 'quizId': json['quizId'],
56
+ 'accountUserId': json['accountUserId'],
57
+ 'status': json['status'],
58
+ 'startedAt': (new Date(json['startedAt'])),
59
+ 'completedAt': json['completedAt'] == null ? undefined : (new Date(json['completedAt'])),
60
+ };
61
+ }
62
+ function QuizSessionToJSON(json) {
63
+ return QuizSessionToJSONTyped(json, false);
64
+ }
65
+ function QuizSessionToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'id': value['id'],
71
+ 'quizId': value['quizId'],
72
+ 'accountUserId': value['accountUserId'],
73
+ 'status': value['status'],
74
+ 'startedAt': value['startedAt'].toISOString(),
75
+ 'completedAt': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
76
+ };
77
+ }
@@ -0,0 +1,61 @@
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
+ import type { QuizSessionSummaryScore } from './QuizSessionSummaryScore';
13
+ import type { Quiz } from './Quiz';
14
+ import type { QuizSession } from './QuizSession';
15
+ import type { QuizQuestion } from './QuizQuestion';
16
+ import type { QuizResponse } from './QuizResponse';
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface QuizSessionSummary
21
+ */
22
+ export interface QuizSessionSummary {
23
+ /**
24
+ *
25
+ * @type {QuizSession}
26
+ * @memberof QuizSessionSummary
27
+ */
28
+ session: QuizSession;
29
+ /**
30
+ *
31
+ * @type {Quiz}
32
+ * @memberof QuizSessionSummary
33
+ */
34
+ quiz: Quiz;
35
+ /**
36
+ *
37
+ * @type {Array<QuizQuestion>}
38
+ * @memberof QuizSessionSummary
39
+ */
40
+ questions: Array<QuizQuestion>;
41
+ /**
42
+ *
43
+ * @type {Array<QuizResponse>}
44
+ * @memberof QuizSessionSummary
45
+ */
46
+ responses: Array<QuizResponse>;
47
+ /**
48
+ *
49
+ * @type {QuizSessionSummaryScore}
50
+ * @memberof QuizSessionSummary
51
+ */
52
+ score: QuizSessionSummaryScore;
53
+ }
54
+ /**
55
+ * Check if a given object implements the QuizSessionSummary interface.
56
+ */
57
+ export declare function instanceOfQuizSessionSummary(value: object): value is QuizSessionSummary;
58
+ export declare function QuizSessionSummaryFromJSON(json: any): QuizSessionSummary;
59
+ export declare function QuizSessionSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizSessionSummary;
60
+ export declare function QuizSessionSummaryToJSON(json: any): QuizSessionSummary;
61
+ export declare function QuizSessionSummaryToJSONTyped(value?: QuizSessionSummary | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.instanceOfQuizSessionSummary = instanceOfQuizSessionSummary;
17
+ exports.QuizSessionSummaryFromJSON = QuizSessionSummaryFromJSON;
18
+ exports.QuizSessionSummaryFromJSONTyped = QuizSessionSummaryFromJSONTyped;
19
+ exports.QuizSessionSummaryToJSON = QuizSessionSummaryToJSON;
20
+ exports.QuizSessionSummaryToJSONTyped = QuizSessionSummaryToJSONTyped;
21
+ const QuizSessionSummaryScore_1 = require("./QuizSessionSummaryScore");
22
+ const Quiz_1 = require("./Quiz");
23
+ const QuizSession_1 = require("./QuizSession");
24
+ const QuizQuestion_1 = require("./QuizQuestion");
25
+ const QuizResponse_1 = require("./QuizResponse");
26
+ /**
27
+ * Check if a given object implements the QuizSessionSummary interface.
28
+ */
29
+ function instanceOfQuizSessionSummary(value) {
30
+ if (!('session' in value) || value['session'] === undefined)
31
+ return false;
32
+ if (!('quiz' in value) || value['quiz'] === undefined)
33
+ return false;
34
+ if (!('questions' in value) || value['questions'] === undefined)
35
+ return false;
36
+ if (!('responses' in value) || value['responses'] === undefined)
37
+ return false;
38
+ if (!('score' in value) || value['score'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function QuizSessionSummaryFromJSON(json) {
43
+ return QuizSessionSummaryFromJSONTyped(json, false);
44
+ }
45
+ function QuizSessionSummaryFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'session': (0, QuizSession_1.QuizSessionFromJSON)(json['session']),
51
+ 'quiz': (0, Quiz_1.QuizFromJSON)(json['quiz']),
52
+ 'questions': (json['questions'].map(QuizQuestion_1.QuizQuestionFromJSON)),
53
+ 'responses': (json['responses'].map(QuizResponse_1.QuizResponseFromJSON)),
54
+ 'score': (0, QuizSessionSummaryScore_1.QuizSessionSummaryScoreFromJSON)(json['score']),
55
+ };
56
+ }
57
+ function QuizSessionSummaryToJSON(json) {
58
+ return QuizSessionSummaryToJSONTyped(json, false);
59
+ }
60
+ function QuizSessionSummaryToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'session': (0, QuizSession_1.QuizSessionToJSON)(value['session']),
66
+ 'quiz': (0, Quiz_1.QuizToJSON)(value['quiz']),
67
+ 'questions': (value['questions'].map(QuizQuestion_1.QuizQuestionToJSON)),
68
+ 'responses': (value['responses'].map(QuizResponse_1.QuizResponseToJSON)),
69
+ 'score': (0, QuizSessionSummaryScore_1.QuizSessionSummaryScoreToJSON)(value['score']),
70
+ };
71
+ }
@@ -0,0 +1,47 @@
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
+ import type { ScoreByTypeValue } from './ScoreByTypeValue';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface QuizSessionSummaryScore
17
+ */
18
+ export interface QuizSessionSummaryScore {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof QuizSessionSummaryScore
23
+ */
24
+ totalCorrect: number;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof QuizSessionSummaryScore
29
+ */
30
+ totalQuestions: number;
31
+ /**
32
+ *
33
+ * @type {{ [key: string]: ScoreByTypeValue; }}
34
+ * @memberof QuizSessionSummaryScore
35
+ */
36
+ byType: {
37
+ [key: string]: ScoreByTypeValue;
38
+ };
39
+ }
40
+ /**
41
+ * Check if a given object implements the QuizSessionSummaryScore interface.
42
+ */
43
+ export declare function instanceOfQuizSessionSummaryScore(value: object): value is QuizSessionSummaryScore;
44
+ export declare function QuizSessionSummaryScoreFromJSON(json: any): QuizSessionSummaryScore;
45
+ export declare function QuizSessionSummaryScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizSessionSummaryScore;
46
+ export declare function QuizSessionSummaryScoreToJSON(json: any): QuizSessionSummaryScore;
47
+ export declare function QuizSessionSummaryScoreToJSONTyped(value?: QuizSessionSummaryScore | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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.instanceOfQuizSessionSummaryScore = instanceOfQuizSessionSummaryScore;
17
+ exports.QuizSessionSummaryScoreFromJSON = QuizSessionSummaryScoreFromJSON;
18
+ exports.QuizSessionSummaryScoreFromJSONTyped = QuizSessionSummaryScoreFromJSONTyped;
19
+ exports.QuizSessionSummaryScoreToJSON = QuizSessionSummaryScoreToJSON;
20
+ exports.QuizSessionSummaryScoreToJSONTyped = QuizSessionSummaryScoreToJSONTyped;
21
+ const runtime_1 = require("../runtime");
22
+ const ScoreByTypeValue_1 = require("./ScoreByTypeValue");
23
+ /**
24
+ * Check if a given object implements the QuizSessionSummaryScore interface.
25
+ */
26
+ function instanceOfQuizSessionSummaryScore(value) {
27
+ if (!('totalCorrect' in value) || value['totalCorrect'] === undefined)
28
+ return false;
29
+ if (!('totalQuestions' in value) || value['totalQuestions'] === undefined)
30
+ return false;
31
+ if (!('byType' in value) || value['byType'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function QuizSessionSummaryScoreFromJSON(json) {
36
+ return QuizSessionSummaryScoreFromJSONTyped(json, false);
37
+ }
38
+ function QuizSessionSummaryScoreFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'totalCorrect': json['totalCorrect'],
44
+ 'totalQuestions': json['totalQuestions'],
45
+ 'byType': ((0, runtime_1.mapValues)(json['byType'], ScoreByTypeValue_1.ScoreByTypeValueFromJSON)),
46
+ };
47
+ }
48
+ function QuizSessionSummaryScoreToJSON(json) {
49
+ return QuizSessionSummaryScoreToJSONTyped(json, false);
50
+ }
51
+ function QuizSessionSummaryScoreToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'totalCorrect': value['totalCorrect'],
57
+ 'totalQuestions': value['totalQuestions'],
58
+ 'byType': ((0, runtime_1.mapValues)(value['byType'], ScoreByTypeValue_1.ScoreByTypeValueToJSON)),
59
+ };
60
+ }
@@ -0,0 +1,83 @@
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
+ import type { QuizQuestion } from './QuizQuestion';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface QuizWithQuestions
17
+ */
18
+ export interface QuizWithQuestions {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof QuizWithQuestions
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof QuizWithQuestions
29
+ */
30
+ accountUserId: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof QuizWithQuestions
35
+ */
36
+ chatId?: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof QuizWithQuestions
41
+ */
42
+ title: string;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof QuizWithQuestions
47
+ */
48
+ topic: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof QuizWithQuestions
53
+ */
54
+ mode: QuizWithQuestionsModeEnum;
55
+ /**
56
+ *
57
+ * @type {Date}
58
+ * @memberof QuizWithQuestions
59
+ */
60
+ createdAt: Date;
61
+ /**
62
+ *
63
+ * @type {Array<QuizQuestion>}
64
+ * @memberof QuizWithQuestions
65
+ */
66
+ questions: Array<QuizQuestion>;
67
+ }
68
+ /**
69
+ * @export
70
+ */
71
+ export declare const QuizWithQuestionsModeEnum: {
72
+ readonly Quiz: "quiz";
73
+ readonly Flashcards: "flashcards";
74
+ };
75
+ export type QuizWithQuestionsModeEnum = typeof QuizWithQuestionsModeEnum[keyof typeof QuizWithQuestionsModeEnum];
76
+ /**
77
+ * Check if a given object implements the QuizWithQuestions interface.
78
+ */
79
+ export declare function instanceOfQuizWithQuestions(value: object): value is QuizWithQuestions;
80
+ export declare function QuizWithQuestionsFromJSON(json: any): QuizWithQuestions;
81
+ export declare function QuizWithQuestionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizWithQuestions;
82
+ export declare function QuizWithQuestionsToJSON(json: any): QuizWithQuestions;
83
+ export declare function QuizWithQuestionsToJSONTyped(value?: QuizWithQuestions | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,85 @@
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.QuizWithQuestionsModeEnum = void 0;
17
+ exports.instanceOfQuizWithQuestions = instanceOfQuizWithQuestions;
18
+ exports.QuizWithQuestionsFromJSON = QuizWithQuestionsFromJSON;
19
+ exports.QuizWithQuestionsFromJSONTyped = QuizWithQuestionsFromJSONTyped;
20
+ exports.QuizWithQuestionsToJSON = QuizWithQuestionsToJSON;
21
+ exports.QuizWithQuestionsToJSONTyped = QuizWithQuestionsToJSONTyped;
22
+ const QuizQuestion_1 = require("./QuizQuestion");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.QuizWithQuestionsModeEnum = {
27
+ Quiz: 'quiz',
28
+ Flashcards: 'flashcards'
29
+ };
30
+ /**
31
+ * Check if a given object implements the QuizWithQuestions interface.
32
+ */
33
+ function instanceOfQuizWithQuestions(value) {
34
+ if (!('id' in value) || value['id'] === undefined)
35
+ return false;
36
+ if (!('accountUserId' in value) || value['accountUserId'] === undefined)
37
+ return false;
38
+ if (!('title' in value) || value['title'] === undefined)
39
+ return false;
40
+ if (!('topic' in value) || value['topic'] === undefined)
41
+ return false;
42
+ if (!('mode' in value) || value['mode'] === undefined)
43
+ return false;
44
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
45
+ return false;
46
+ if (!('questions' in value) || value['questions'] === undefined)
47
+ return false;
48
+ return true;
49
+ }
50
+ function QuizWithQuestionsFromJSON(json) {
51
+ return QuizWithQuestionsFromJSONTyped(json, false);
52
+ }
53
+ function QuizWithQuestionsFromJSONTyped(json, ignoreDiscriminator) {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+ 'id': json['id'],
59
+ 'accountUserId': json['accountUserId'],
60
+ 'chatId': json['chatId'] == null ? undefined : json['chatId'],
61
+ 'title': json['title'],
62
+ 'topic': json['topic'],
63
+ 'mode': json['mode'],
64
+ 'createdAt': (new Date(json['createdAt'])),
65
+ 'questions': (json['questions'].map(QuizQuestion_1.QuizQuestionFromJSON)),
66
+ };
67
+ }
68
+ function QuizWithQuestionsToJSON(json) {
69
+ return QuizWithQuestionsToJSONTyped(json, false);
70
+ }
71
+ function QuizWithQuestionsToJSONTyped(value, ignoreDiscriminator = false) {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+ return {
76
+ 'id': value['id'],
77
+ 'accountUserId': value['accountUserId'],
78
+ 'chatId': value['chatId'],
79
+ 'title': value['title'],
80
+ 'topic': value['topic'],
81
+ 'mode': value['mode'],
82
+ 'createdAt': value['createdAt'].toISOString(),
83
+ 'questions': (value['questions'].map(QuizQuestion_1.QuizQuestionToJSON)),
84
+ };
85
+ }
@@ -0,0 +1,38 @@
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 ScoreByTypeValue
16
+ */
17
+ export interface ScoreByTypeValue {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ScoreByTypeValue
22
+ */
23
+ correct: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof ScoreByTypeValue
28
+ */
29
+ total: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ScoreByTypeValue interface.
33
+ */
34
+ export declare function instanceOfScoreByTypeValue(value: object): value is ScoreByTypeValue;
35
+ export declare function ScoreByTypeValueFromJSON(json: any): ScoreByTypeValue;
36
+ export declare function ScoreByTypeValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScoreByTypeValue;
37
+ export declare function ScoreByTypeValueToJSON(json: any): ScoreByTypeValue;
38
+ export declare function ScoreByTypeValueToJSONTyped(value?: ScoreByTypeValue | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfScoreByTypeValue = instanceOfScoreByTypeValue;
17
+ exports.ScoreByTypeValueFromJSON = ScoreByTypeValueFromJSON;
18
+ exports.ScoreByTypeValueFromJSONTyped = ScoreByTypeValueFromJSONTyped;
19
+ exports.ScoreByTypeValueToJSON = ScoreByTypeValueToJSON;
20
+ exports.ScoreByTypeValueToJSONTyped = ScoreByTypeValueToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ScoreByTypeValue interface.
23
+ */
24
+ function instanceOfScoreByTypeValue(value) {
25
+ if (!('correct' in value) || value['correct'] === undefined)
26
+ return false;
27
+ if (!('total' in value) || value['total'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function ScoreByTypeValueFromJSON(json) {
32
+ return ScoreByTypeValueFromJSONTyped(json, false);
33
+ }
34
+ function ScoreByTypeValueFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'correct': json['correct'],
40
+ 'total': json['total'],
41
+ };
42
+ }
43
+ function ScoreByTypeValueToJSON(json) {
44
+ return ScoreByTypeValueToJSONTyped(json, false);
45
+ }
46
+ function ScoreByTypeValueToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'correct': value['correct'],
52
+ 'total': value['total'],
53
+ };
54
+ }
@@ -0,0 +1,58 @@
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 SubmitQuizResponseRequest
16
+ */
17
+ export interface SubmitQuizResponseRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SubmitQuizResponseRequest
22
+ */
23
+ questionId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SubmitQuizResponseRequest
28
+ */
29
+ userAnswer: string;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof SubmitQuizResponseRequest
34
+ */
35
+ isCorrect?: boolean | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SubmitQuizResponseRequest
40
+ */
41
+ rating?: SubmitQuizResponseRequestRatingEnum | null;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const SubmitQuizResponseRequestRatingEnum: {
47
+ readonly WasRight: "was-right";
48
+ readonly NeedPractice: "need-practice";
49
+ };
50
+ export type SubmitQuizResponseRequestRatingEnum = typeof SubmitQuizResponseRequestRatingEnum[keyof typeof SubmitQuizResponseRequestRatingEnum];
51
+ /**
52
+ * Check if a given object implements the SubmitQuizResponseRequest interface.
53
+ */
54
+ export declare function instanceOfSubmitQuizResponseRequest(value: object): value is SubmitQuizResponseRequest;
55
+ export declare function SubmitQuizResponseRequestFromJSON(json: any): SubmitQuizResponseRequest;
56
+ export declare function SubmitQuizResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmitQuizResponseRequest;
57
+ export declare function SubmitQuizResponseRequestToJSON(json: any): SubmitQuizResponseRequest;
58
+ export declare function SubmitQuizResponseRequestToJSONTyped(value?: SubmitQuizResponseRequest | null, ignoreDiscriminator?: boolean): any;