@easyedu/js-lsm-api 1.81.0 → 1.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +7 -2
  3. package/dist/apis/QuizApi.d.ts +3 -2
  4. package/dist/apis/QuizApi.js +4 -2
  5. package/dist/apis/RichTextApi.d.ts +16 -0
  6. package/dist/apis/RichTextApi.js +43 -0
  7. package/dist/esm/apis/QuizApi.d.ts +3 -2
  8. package/dist/esm/apis/QuizApi.js +4 -2
  9. package/dist/esm/apis/RichTextApi.d.ts +16 -0
  10. package/dist/esm/apis/RichTextApi.js +43 -0
  11. package/dist/esm/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
  12. package/dist/esm/models/GetQuizAttemptQuestionsInner.js +3 -0
  13. package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  14. package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
  15. package/dist/esm/models/GetQuizResultsQuestionsInner.d.ts +13 -0
  16. package/dist/esm/models/GetQuizResultsQuestionsInner.js +5 -0
  17. package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  18. package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
  19. package/dist/esm/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
  20. package/dist/esm/models/PostQuizAttemptQuestionsInner.js +3 -0
  21. package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  22. package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
  23. package/dist/esm/models/PutQuizAnswerResponse.d.ts +77 -0
  24. package/dist/esm/models/PutQuizAnswerResponse.js +64 -0
  25. package/dist/esm/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
  26. package/dist/esm/models/PutQuizAnswerResponseNextQuestion.js +88 -0
  27. package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
  28. package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +54 -0
  29. package/dist/esm/models/PutQuizAnswerResponseProgress.d.ts +50 -0
  30. package/dist/esm/models/PutQuizAnswerResponseProgress.js +55 -0
  31. package/dist/esm/models/index.d.ts +4 -0
  32. package/dist/esm/models/index.js +4 -0
  33. package/dist/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
  34. package/dist/models/GetQuizAttemptQuestionsInner.js +3 -0
  35. package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  36. package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
  37. package/dist/models/GetQuizResultsQuestionsInner.d.ts +13 -0
  38. package/dist/models/GetQuizResultsQuestionsInner.js +5 -0
  39. package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  40. package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
  41. package/dist/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
  42. package/dist/models/PostQuizAttemptQuestionsInner.js +3 -0
  43. package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
  44. package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
  45. package/dist/models/PutQuizAnswerResponse.d.ts +77 -0
  46. package/dist/models/PutQuizAnswerResponse.js +71 -0
  47. package/dist/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
  48. package/dist/models/PutQuizAnswerResponseNextQuestion.js +96 -0
  49. package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
  50. package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +61 -0
  51. package/dist/models/PutQuizAnswerResponseProgress.d.ts +50 -0
  52. package/dist/models/PutQuizAnswerResponseProgress.js +62 -0
  53. package/dist/models/index.d.ts +4 -0
  54. package/dist/models/index.js +4 -0
  55. package/docs/GetQuizAttemptQuestionsInner.md +2 -0
  56. package/docs/GetQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
  57. package/docs/GetQuizResultsQuestionsInner.md +4 -0
  58. package/docs/GetQuizResultsQuestionsInnerAnswerChoicesInner.md +2 -0
  59. package/docs/PostQuizAttemptQuestionsInner.md +2 -0
  60. package/docs/PostQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
  61. package/docs/PutQuizAnswerResponse.md +48 -0
  62. package/docs/PutQuizAnswerResponseNextQuestion.md +52 -0
  63. package/docs/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.md +40 -0
  64. package/docs/PutQuizAnswerResponseProgress.md +40 -0
  65. package/docs/QuizApi.md +3 -3
  66. package/docs/RichTextApi.md +73 -0
  67. package/package.json +1 -1
  68. package/src/apis/QuizApi.ts +10 -4
  69. package/src/apis/RichTextApi.ts +59 -0
  70. package/src/models/GetQuizAttemptQuestionsInner.ts +15 -0
  71. package/src/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
  72. package/src/models/GetQuizResultsQuestionsInner.ts +23 -0
  73. package/src/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.ts +16 -0
  74. package/src/models/PostQuizAttemptQuestionsInner.ts +15 -0
  75. package/src/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
  76. package/src/models/PutQuizAnswerResponse.ts +146 -0
  77. package/src/models/PutQuizAnswerResponseNextQuestion.ts +175 -0
  78. package/src/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.ts +100 -0
  79. package/src/models/PutQuizAnswerResponseProgress.ts +93 -0
  80. package/src/models/index.ts +4 -0
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { GetQuizResultsQuestionsInnerAnswerChoicesInner } from './GetQuizResultsQuestionsInnerAnswerChoicesInner';
13
+ import type { RichTextDocument } from './RichTextDocument';
13
14
  import type { GetQuizResultsQuestionsInnerStudentAnswer } from './GetQuizResultsQuestionsInnerStudentAnswer';
14
15
  /**
15
16
  *
@@ -35,6 +36,12 @@ export interface GetQuizResultsQuestionsInner {
35
36
  * @memberof GetQuizResultsQuestionsInner
36
37
  */
37
38
  questionText: string;
39
+ /**
40
+ *
41
+ * @type {RichTextDocument}
42
+ * @memberof GetQuizResultsQuestionsInner
43
+ */
44
+ questionTextRich?: RichTextDocument;
38
45
  /**
39
46
  * Type of question
40
47
  * @type {GetQuizResultsQuestionsInnerQuestionTypeEnum}
@@ -59,6 +66,12 @@ export interface GetQuizResultsQuestionsInner {
59
66
  * @memberof GetQuizResultsQuestionsInner
60
67
  */
61
68
  explanation?: string;
69
+ /**
70
+ *
71
+ * @type {RichTextDocument}
72
+ * @memberof GetQuizResultsQuestionsInner
73
+ */
74
+ explanationRich?: RichTextDocument;
62
75
  /**
63
76
  * Time spent on this question in seconds
64
77
  * @type {number}
@@ -20,6 +20,7 @@ exports.GetQuizResultsQuestionsInnerFromJSONTyped = GetQuizResultsQuestionsInner
20
20
  exports.GetQuizResultsQuestionsInnerToJSON = GetQuizResultsQuestionsInnerToJSON;
21
21
  exports.GetQuizResultsQuestionsInnerToJSONTyped = GetQuizResultsQuestionsInnerToJSONTyped;
22
22
  const GetQuizResultsQuestionsInnerAnswerChoicesInner_1 = require("./GetQuizResultsQuestionsInnerAnswerChoicesInner");
23
+ const RichTextDocument_1 = require("./RichTextDocument");
23
24
  const GetQuizResultsQuestionsInnerStudentAnswer_1 = require("./GetQuizResultsQuestionsInnerStudentAnswer");
24
25
  /**
25
26
  * @export
@@ -59,10 +60,12 @@ function GetQuizResultsQuestionsInnerFromJSONTyped(json, ignoreDiscriminator) {
59
60
  'questionId': json['question_id'],
60
61
  'questionOrder': json['question_order'],
61
62
  'questionText': json['question_text'],
63
+ 'questionTextRich': json['question_text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['question_text_rich']),
62
64
  'questionType': json['question_type'],
63
65
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(GetQuizResultsQuestionsInnerAnswerChoicesInner_1.GetQuizResultsQuestionsInnerAnswerChoicesInnerFromJSON)),
64
66
  'studentAnswer': (0, GetQuizResultsQuestionsInnerStudentAnswer_1.GetQuizResultsQuestionsInnerStudentAnswerFromJSON)(json['student_answer']),
65
67
  'explanation': json['explanation'] == null ? undefined : json['explanation'],
68
+ 'explanationRich': json['explanation_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['explanation_rich']),
66
69
  'timeSpent': json['time_spent'] == null ? undefined : json['time_spent'],
67
70
  'wasFlagged': json['was_flagged'] == null ? undefined : json['was_flagged'],
68
71
  };
@@ -78,10 +81,12 @@ function GetQuizResultsQuestionsInnerToJSONTyped(value, ignoreDiscriminator = fa
78
81
  'question_id': value['questionId'],
79
82
  'question_order': value['questionOrder'],
80
83
  'question_text': value['questionText'],
84
+ 'question_text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['questionTextRich']),
81
85
  'question_type': value['questionType'],
82
86
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(GetQuizResultsQuestionsInnerAnswerChoicesInner_1.GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSON)),
83
87
  'student_answer': (0, GetQuizResultsQuestionsInnerStudentAnswer_1.GetQuizResultsQuestionsInnerStudentAnswerToJSON)(value['studentAnswer']),
84
88
  'explanation': value['explanation'],
89
+ 'explanation_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['explanationRich']),
85
90
  'time_spent': value['timeSpent'],
86
91
  'was_flagged': value['wasFlagged'],
87
92
  };
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { RichTextDocument } from './RichTextDocument';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -27,6 +28,12 @@ export interface GetQuizResultsQuestionsInnerAnswerChoicesInner {
27
28
  * @memberof GetQuizResultsQuestionsInnerAnswerChoicesInner
28
29
  */
29
30
  text: string;
31
+ /**
32
+ *
33
+ * @type {RichTextDocument}
34
+ * @memberof GetQuizResultsQuestionsInnerAnswerChoicesInner
35
+ */
36
+ textRich?: RichTextDocument;
30
37
  /**
31
38
  *
32
39
  * @type {boolean}
@@ -18,6 +18,7 @@ exports.GetQuizResultsQuestionsInnerAnswerChoicesInnerFromJSON = GetQuizResultsQ
18
18
  exports.GetQuizResultsQuestionsInnerAnswerChoicesInnerFromJSONTyped = GetQuizResultsQuestionsInnerAnswerChoicesInnerFromJSONTyped;
19
19
  exports.GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSON = GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSON;
20
20
  exports.GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSONTyped = GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSONTyped;
21
+ const RichTextDocument_1 = require("./RichTextDocument");
21
22
  /**
22
23
  * Check if a given object implements the GetQuizResultsQuestionsInnerAnswerChoicesInner interface.
23
24
  */
@@ -42,6 +43,7 @@ function GetQuizResultsQuestionsInnerAnswerChoicesInnerFromJSONTyped(json, ignor
42
43
  return {
43
44
  'id': json['id'],
44
45
  'text': json['text'],
46
+ 'textRich': json['text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['text_rich']),
45
47
  'isCorrect': json['is_correct'],
46
48
  'wasSelected': json['was_selected'],
47
49
  };
@@ -56,6 +58,7 @@ function GetQuizResultsQuestionsInnerAnswerChoicesInnerToJSONTyped(value, ignore
56
58
  return {
57
59
  'id': value['id'],
58
60
  'text': value['text'],
61
+ 'text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['textRich']),
59
62
  'is_correct': value['isCorrect'],
60
63
  'was_selected': value['wasSelected'],
61
64
  };
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PostQuizAttemptQuestionsInnerAnswerChoicesInner } from './PostQuizAttemptQuestionsInnerAnswerChoicesInner';
13
+ import type { RichTextDocument } from './RichTextDocument';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -46,6 +47,12 @@ export interface PostQuizAttemptQuestionsInner {
46
47
  * @memberof PostQuizAttemptQuestionsInner
47
48
  */
48
49
  questionText: string;
50
+ /**
51
+ *
52
+ * @type {RichTextDocument}
53
+ * @memberof PostQuizAttemptQuestionsInner
54
+ */
55
+ questionTextRich?: RichTextDocument;
49
56
  /**
50
57
  * Question type
51
58
  * @type {PostQuizAttemptQuestionsInnerQuestionTypeEnum}
@@ -20,6 +20,7 @@ exports.PostQuizAttemptQuestionsInnerFromJSONTyped = PostQuizAttemptQuestionsInn
20
20
  exports.PostQuizAttemptQuestionsInnerToJSON = PostQuizAttemptQuestionsInnerToJSON;
21
21
  exports.PostQuizAttemptQuestionsInnerToJSONTyped = PostQuizAttemptQuestionsInnerToJSONTyped;
22
22
  const PostQuizAttemptQuestionsInnerAnswerChoicesInner_1 = require("./PostQuizAttemptQuestionsInnerAnswerChoicesInner");
23
+ const RichTextDocument_1 = require("./RichTextDocument");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -64,6 +65,7 @@ function PostQuizAttemptQuestionsInnerFromJSONTyped(json, ignoreDiscriminator) {
64
65
  'questionOrder': json['question_order'],
65
66
  'points': json['points'],
66
67
  'questionText': json['question_text'],
68
+ 'questionTextRich': json['question_text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['question_text_rich']),
67
69
  'questionType': json['question_type'],
68
70
  'answerChoices': json['answer_choices'] == null ? undefined : (json['answer_choices'].map(PostQuizAttemptQuestionsInnerAnswerChoicesInner_1.PostQuizAttemptQuestionsInnerAnswerChoicesInnerFromJSON)),
69
71
  'isAnswered': json['is_answered'],
@@ -82,6 +84,7 @@ function PostQuizAttemptQuestionsInnerToJSONTyped(value, ignoreDiscriminator = f
82
84
  'question_order': value['questionOrder'],
83
85
  'points': value['points'],
84
86
  'question_text': value['questionText'],
87
+ 'question_text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['questionTextRich']),
85
88
  'question_type': value['questionType'],
86
89
  'answer_choices': value['answerChoices'] == null ? undefined : (value['answerChoices'].map(PostQuizAttemptQuestionsInnerAnswerChoicesInner_1.PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSON)),
87
90
  'is_answered': value['isAnswered'],
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { RichTextDocument } from './RichTextDocument';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -27,6 +28,12 @@ export interface PostQuizAttemptQuestionsInnerAnswerChoicesInner {
27
28
  * @memberof PostQuizAttemptQuestionsInnerAnswerChoicesInner
28
29
  */
29
30
  text: string;
31
+ /**
32
+ *
33
+ * @type {RichTextDocument}
34
+ * @memberof PostQuizAttemptQuestionsInnerAnswerChoicesInner
35
+ */
36
+ textRich?: RichTextDocument;
30
37
  /**
31
38
  * Display order (may be randomized)
32
39
  * @type {number}
@@ -18,6 +18,7 @@ exports.PostQuizAttemptQuestionsInnerAnswerChoicesInnerFromJSON = PostQuizAttemp
18
18
  exports.PostQuizAttemptQuestionsInnerAnswerChoicesInnerFromJSONTyped = PostQuizAttemptQuestionsInnerAnswerChoicesInnerFromJSONTyped;
19
19
  exports.PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSON = PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSON;
20
20
  exports.PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSONTyped = PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSONTyped;
21
+ const RichTextDocument_1 = require("./RichTextDocument");
21
22
  /**
22
23
  * Check if a given object implements the PostQuizAttemptQuestionsInnerAnswerChoicesInner interface.
23
24
  */
@@ -40,6 +41,7 @@ function PostQuizAttemptQuestionsInnerAnswerChoicesInnerFromJSONTyped(json, igno
40
41
  return {
41
42
  'id': json['id'],
42
43
  'text': json['text'],
44
+ 'textRich': json['text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['text_rich']),
43
45
  'displayOrder': json['display_order'],
44
46
  };
45
47
  }
@@ -53,6 +55,7 @@ function PostQuizAttemptQuestionsInnerAnswerChoicesInnerToJSONTyped(value, ignor
53
55
  return {
54
56
  'id': value['id'],
55
57
  'text': value['text'],
58
+ 'text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['textRich']),
56
59
  'display_order': value['displayOrder'],
57
60
  };
58
61
  }
@@ -0,0 +1,77 @@
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 { PutQuizAnswerResponseProgress } from './PutQuizAnswerResponseProgress';
13
+ import type { RichTextDocument } from './RichTextDocument';
14
+ import type { PutQuizAnswerResponseNextQuestion } from './PutQuizAnswerResponseNextQuestion';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface PutQuizAnswerResponse
19
+ */
20
+ export interface PutQuizAnswerResponse {
21
+ /**
22
+ * Whether the answer was saved
23
+ * @type {boolean}
24
+ * @memberof PutQuizAnswerResponse
25
+ */
26
+ success: boolean;
27
+ /**
28
+ * Question ID that was answered
29
+ * @type {number}
30
+ * @memberof PutQuizAnswerResponse
31
+ */
32
+ questionId: number;
33
+ /**
34
+ * Immediate correctness feedback when review is disabled
35
+ * @type {boolean}
36
+ * @memberof PutQuizAnswerResponse
37
+ */
38
+ isCorrect?: boolean;
39
+ /**
40
+ * Immediate points earned when review is disabled
41
+ * @type {number}
42
+ * @memberof PutQuizAnswerResponse
43
+ */
44
+ pointsEarned?: number;
45
+ /**
46
+ * Plain-text explanation when immediate feedback is enabled
47
+ * @type {string}
48
+ * @memberof PutQuizAnswerResponse
49
+ */
50
+ explanation?: string;
51
+ /**
52
+ *
53
+ * @type {RichTextDocument}
54
+ * @memberof PutQuizAnswerResponse
55
+ */
56
+ explanationRich?: RichTextDocument;
57
+ /**
58
+ *
59
+ * @type {PutQuizAnswerResponseNextQuestion}
60
+ * @memberof PutQuizAnswerResponse
61
+ */
62
+ nextQuestion?: PutQuizAnswerResponseNextQuestion;
63
+ /**
64
+ *
65
+ * @type {PutQuizAnswerResponseProgress}
66
+ * @memberof PutQuizAnswerResponse
67
+ */
68
+ progress: PutQuizAnswerResponseProgress;
69
+ }
70
+ /**
71
+ * Check if a given object implements the PutQuizAnswerResponse interface.
72
+ */
73
+ export declare function instanceOfPutQuizAnswerResponse(value: object): value is PutQuizAnswerResponse;
74
+ export declare function PutQuizAnswerResponseFromJSON(json: any): PutQuizAnswerResponse;
75
+ export declare function PutQuizAnswerResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponse;
76
+ export declare function PutQuizAnswerResponseToJSON(json: any): PutQuizAnswerResponse;
77
+ export declare function PutQuizAnswerResponseToJSONTyped(value?: PutQuizAnswerResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
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.instanceOfPutQuizAnswerResponse = instanceOfPutQuizAnswerResponse;
17
+ exports.PutQuizAnswerResponseFromJSON = PutQuizAnswerResponseFromJSON;
18
+ exports.PutQuizAnswerResponseFromJSONTyped = PutQuizAnswerResponseFromJSONTyped;
19
+ exports.PutQuizAnswerResponseToJSON = PutQuizAnswerResponseToJSON;
20
+ exports.PutQuizAnswerResponseToJSONTyped = PutQuizAnswerResponseToJSONTyped;
21
+ const PutQuizAnswerResponseProgress_1 = require("./PutQuizAnswerResponseProgress");
22
+ const RichTextDocument_1 = require("./RichTextDocument");
23
+ const PutQuizAnswerResponseNextQuestion_1 = require("./PutQuizAnswerResponseNextQuestion");
24
+ /**
25
+ * Check if a given object implements the PutQuizAnswerResponse interface.
26
+ */
27
+ function instanceOfPutQuizAnswerResponse(value) {
28
+ if (!('success' in value) || value['success'] === undefined)
29
+ return false;
30
+ if (!('questionId' in value) || value['questionId'] === undefined)
31
+ return false;
32
+ if (!('progress' in value) || value['progress'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function PutQuizAnswerResponseFromJSON(json) {
37
+ return PutQuizAnswerResponseFromJSONTyped(json, false);
38
+ }
39
+ function PutQuizAnswerResponseFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'success': json['success'],
45
+ 'questionId': json['question_id'],
46
+ 'isCorrect': json['is_correct'] == null ? undefined : json['is_correct'],
47
+ 'pointsEarned': json['points_earned'] == null ? undefined : json['points_earned'],
48
+ 'explanation': json['explanation'] == null ? undefined : json['explanation'],
49
+ 'explanationRich': json['explanation_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['explanation_rich']),
50
+ 'nextQuestion': json['next_question'] == null ? undefined : (0, PutQuizAnswerResponseNextQuestion_1.PutQuizAnswerResponseNextQuestionFromJSON)(json['next_question']),
51
+ 'progress': (0, PutQuizAnswerResponseProgress_1.PutQuizAnswerResponseProgressFromJSON)(json['progress']),
52
+ };
53
+ }
54
+ function PutQuizAnswerResponseToJSON(json) {
55
+ return PutQuizAnswerResponseToJSONTyped(json, false);
56
+ }
57
+ function PutQuizAnswerResponseToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'success': value['success'],
63
+ 'question_id': value['questionId'],
64
+ 'is_correct': value['isCorrect'],
65
+ 'points_earned': value['pointsEarned'],
66
+ 'explanation': value['explanation'],
67
+ 'explanation_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['explanationRich']),
68
+ 'next_question': (0, PutQuizAnswerResponseNextQuestion_1.PutQuizAnswerResponseNextQuestionToJSON)(value['nextQuestion']),
69
+ 'progress': (0, PutQuizAnswerResponseProgress_1.PutQuizAnswerResponseProgressToJSON)(value['progress']),
70
+ };
71
+ }
@@ -0,0 +1,102 @@
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 { RichTextDocument } from './RichTextDocument';
13
+ import type { PutQuizAnswerResponseNextQuestionAnswerChoicesInner } from './PutQuizAnswerResponseNextQuestionAnswerChoicesInner';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface PutQuizAnswerResponseNextQuestion
18
+ */
19
+ export interface PutQuizAnswerResponseNextQuestion {
20
+ /**
21
+ * Attempt question ID
22
+ * @type {number}
23
+ * @memberof PutQuizAnswerResponseNextQuestion
24
+ */
25
+ id: number;
26
+ /**
27
+ * Original question ID
28
+ * @type {number}
29
+ * @memberof PutQuizAnswerResponseNextQuestion
30
+ */
31
+ questionId: number;
32
+ /**
33
+ * Order of question in this attempt
34
+ * @type {number}
35
+ * @memberof PutQuizAnswerResponseNextQuestion
36
+ */
37
+ questionOrder: number;
38
+ /**
39
+ * Points assigned to this question
40
+ * @type {number}
41
+ * @memberof PutQuizAnswerResponseNextQuestion
42
+ */
43
+ points: number;
44
+ /**
45
+ * Question text
46
+ * @type {string}
47
+ * @memberof PutQuizAnswerResponseNextQuestion
48
+ */
49
+ questionText: string;
50
+ /**
51
+ *
52
+ * @type {RichTextDocument}
53
+ * @memberof PutQuizAnswerResponseNextQuestion
54
+ */
55
+ questionTextRich?: RichTextDocument;
56
+ /**
57
+ *
58
+ * @type {PutQuizAnswerResponseNextQuestionQuestionTypeEnum}
59
+ * @memberof PutQuizAnswerResponseNextQuestion
60
+ */
61
+ questionType: PutQuizAnswerResponseNextQuestionQuestionTypeEnum;
62
+ /**
63
+ *
64
+ * @type {Array<PutQuizAnswerResponseNextQuestionAnswerChoicesInner>}
65
+ * @memberof PutQuizAnswerResponseNextQuestion
66
+ */
67
+ answerChoices: Array<PutQuizAnswerResponseNextQuestionAnswerChoicesInner>;
68
+ /**
69
+ *
70
+ * @type {boolean}
71
+ * @memberof PutQuizAnswerResponseNextQuestion
72
+ */
73
+ isAnswered: boolean;
74
+ /**
75
+ *
76
+ * @type {{ [key: string]: any; }}
77
+ * @memberof PutQuizAnswerResponseNextQuestion
78
+ */
79
+ userAnswer?: {
80
+ [key: string]: any;
81
+ };
82
+ }
83
+ /**
84
+ * @export
85
+ */
86
+ export declare const PutQuizAnswerResponseNextQuestionQuestionTypeEnum: {
87
+ readonly SingleAnswer: "single_answer";
88
+ readonly MultipleAnswer: "multiple_answer";
89
+ readonly FillInBlank: "fill_in_blank";
90
+ readonly ShortAnswer: "short_answer";
91
+ readonly Matching: "matching";
92
+ readonly Essay: "essay";
93
+ };
94
+ export type PutQuizAnswerResponseNextQuestionQuestionTypeEnum = typeof PutQuizAnswerResponseNextQuestionQuestionTypeEnum[keyof typeof PutQuizAnswerResponseNextQuestionQuestionTypeEnum];
95
+ /**
96
+ * Check if a given object implements the PutQuizAnswerResponseNextQuestion interface.
97
+ */
98
+ export declare function instanceOfPutQuizAnswerResponseNextQuestion(value: object): value is PutQuizAnswerResponseNextQuestion;
99
+ export declare function PutQuizAnswerResponseNextQuestionFromJSON(json: any): PutQuizAnswerResponseNextQuestion;
100
+ export declare function PutQuizAnswerResponseNextQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseNextQuestion;
101
+ export declare function PutQuizAnswerResponseNextQuestionToJSON(json: any): PutQuizAnswerResponseNextQuestion;
102
+ export declare function PutQuizAnswerResponseNextQuestionToJSONTyped(value?: PutQuizAnswerResponseNextQuestion | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
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.PutQuizAnswerResponseNextQuestionQuestionTypeEnum = void 0;
17
+ exports.instanceOfPutQuizAnswerResponseNextQuestion = instanceOfPutQuizAnswerResponseNextQuestion;
18
+ exports.PutQuizAnswerResponseNextQuestionFromJSON = PutQuizAnswerResponseNextQuestionFromJSON;
19
+ exports.PutQuizAnswerResponseNextQuestionFromJSONTyped = PutQuizAnswerResponseNextQuestionFromJSONTyped;
20
+ exports.PutQuizAnswerResponseNextQuestionToJSON = PutQuizAnswerResponseNextQuestionToJSON;
21
+ exports.PutQuizAnswerResponseNextQuestionToJSONTyped = PutQuizAnswerResponseNextQuestionToJSONTyped;
22
+ const RichTextDocument_1 = require("./RichTextDocument");
23
+ const PutQuizAnswerResponseNextQuestionAnswerChoicesInner_1 = require("./PutQuizAnswerResponseNextQuestionAnswerChoicesInner");
24
+ /**
25
+ * @export
26
+ */
27
+ exports.PutQuizAnswerResponseNextQuestionQuestionTypeEnum = {
28
+ SingleAnswer: 'single_answer',
29
+ MultipleAnswer: 'multiple_answer',
30
+ FillInBlank: 'fill_in_blank',
31
+ ShortAnswer: 'short_answer',
32
+ Matching: 'matching',
33
+ Essay: 'essay'
34
+ };
35
+ /**
36
+ * Check if a given object implements the PutQuizAnswerResponseNextQuestion interface.
37
+ */
38
+ function instanceOfPutQuizAnswerResponseNextQuestion(value) {
39
+ if (!('id' in value) || value['id'] === undefined)
40
+ return false;
41
+ if (!('questionId' in value) || value['questionId'] === undefined)
42
+ return false;
43
+ if (!('questionOrder' in value) || value['questionOrder'] === undefined)
44
+ return false;
45
+ if (!('points' in value) || value['points'] === undefined)
46
+ return false;
47
+ if (!('questionText' in value) || value['questionText'] === undefined)
48
+ return false;
49
+ if (!('questionType' in value) || value['questionType'] === undefined)
50
+ return false;
51
+ if (!('answerChoices' in value) || value['answerChoices'] === undefined)
52
+ return false;
53
+ if (!('isAnswered' in value) || value['isAnswered'] === undefined)
54
+ return false;
55
+ return true;
56
+ }
57
+ function PutQuizAnswerResponseNextQuestionFromJSON(json) {
58
+ return PutQuizAnswerResponseNextQuestionFromJSONTyped(json, false);
59
+ }
60
+ function PutQuizAnswerResponseNextQuestionFromJSONTyped(json, ignoreDiscriminator) {
61
+ if (json == null) {
62
+ return json;
63
+ }
64
+ return {
65
+ 'id': json['id'],
66
+ 'questionId': json['question_id'],
67
+ 'questionOrder': json['question_order'],
68
+ 'points': json['points'],
69
+ 'questionText': json['question_text'],
70
+ 'questionTextRich': json['question_text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['question_text_rich']),
71
+ 'questionType': json['question_type'],
72
+ 'answerChoices': (json['answer_choices'].map(PutQuizAnswerResponseNextQuestionAnswerChoicesInner_1.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON)),
73
+ 'isAnswered': json['is_answered'],
74
+ 'userAnswer': json['user_answer'] == null ? undefined : json['user_answer'],
75
+ };
76
+ }
77
+ function PutQuizAnswerResponseNextQuestionToJSON(json) {
78
+ return PutQuizAnswerResponseNextQuestionToJSONTyped(json, false);
79
+ }
80
+ function PutQuizAnswerResponseNextQuestionToJSONTyped(value, ignoreDiscriminator = false) {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+ return {
85
+ 'id': value['id'],
86
+ 'question_id': value['questionId'],
87
+ 'question_order': value['questionOrder'],
88
+ 'points': value['points'],
89
+ 'question_text': value['questionText'],
90
+ 'question_text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['questionTextRich']),
91
+ 'question_type': value['questionType'],
92
+ 'answer_choices': (value['answerChoices'].map(PutQuizAnswerResponseNextQuestionAnswerChoicesInner_1.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON)),
93
+ 'is_answered': value['isAnswered'],
94
+ 'user_answer': value['userAnswer'],
95
+ };
96
+ }
@@ -0,0 +1,51 @@
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 { RichTextDocument } from './RichTextDocument';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PutQuizAnswerResponseNextQuestionAnswerChoicesInner
17
+ */
18
+ export interface PutQuizAnswerResponseNextQuestionAnswerChoicesInner {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
23
+ */
24
+ id: number;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
29
+ */
30
+ text: string;
31
+ /**
32
+ *
33
+ * @type {RichTextDocument}
34
+ * @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
35
+ */
36
+ textRich?: RichTextDocument;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof PutQuizAnswerResponseNextQuestionAnswerChoicesInner
41
+ */
42
+ displayOrder: number;
43
+ }
44
+ /**
45
+ * Check if a given object implements the PutQuizAnswerResponseNextQuestionAnswerChoicesInner interface.
46
+ */
47
+ export declare function instanceOfPutQuizAnswerResponseNextQuestionAnswerChoicesInner(value: object): value is PutQuizAnswerResponseNextQuestionAnswerChoicesInner;
48
+ export declare function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON(json: any): PutQuizAnswerResponseNextQuestionAnswerChoicesInner;
49
+ export declare function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizAnswerResponseNextQuestionAnswerChoicesInner;
50
+ export declare function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON(json: any): PutQuizAnswerResponseNextQuestionAnswerChoicesInner;
51
+ export declare function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped(value?: PutQuizAnswerResponseNextQuestionAnswerChoicesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
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.instanceOfPutQuizAnswerResponseNextQuestionAnswerChoicesInner = instanceOfPutQuizAnswerResponseNextQuestionAnswerChoicesInner;
17
+ exports.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON = PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON;
18
+ exports.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped = PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped;
19
+ exports.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON = PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON;
20
+ exports.PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped = PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped;
21
+ const RichTextDocument_1 = require("./RichTextDocument");
22
+ /**
23
+ * Check if a given object implements the PutQuizAnswerResponseNextQuestionAnswerChoicesInner interface.
24
+ */
25
+ function instanceOfPutQuizAnswerResponseNextQuestionAnswerChoicesInner(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('text' in value) || value['text'] === undefined)
29
+ return false;
30
+ if (!('displayOrder' in value) || value['displayOrder'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSON(json) {
35
+ return PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped(json, false);
36
+ }
37
+ function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'id': json['id'],
43
+ 'text': json['text'],
44
+ 'textRich': json['text_rich'] == null ? undefined : (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['text_rich']),
45
+ 'displayOrder': json['display_order'],
46
+ };
47
+ }
48
+ function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSON(json) {
49
+ return PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped(json, false);
50
+ }
51
+ function PutQuizAnswerResponseNextQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'id': value['id'],
57
+ 'text': value['text'],
58
+ 'text_rich': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['textRich']),
59
+ 'display_order': value['displayOrder'],
60
+ };
61
+ }