@instructure/athena-api-client 3.36.0 → 3.37.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/dist/esm/models/Quiz.d.ts +21 -0
- package/dist/esm/models/Quiz.js +16 -0
- package/dist/esm/models/QuizListItem.d.ts +21 -0
- package/dist/esm/models/QuizListItem.js +16 -0
- package/dist/esm/models/QuizWithQuestions.d.ts +21 -0
- package/dist/esm/models/QuizWithQuestions.js +16 -0
- package/dist/models/Quiz.d.ts +21 -0
- package/dist/models/Quiz.js +17 -1
- package/dist/models/QuizListItem.d.ts +21 -0
- package/dist/models/QuizListItem.js +17 -1
- package/dist/models/QuizWithQuestions.d.ts +21 -0
- package/dist/models/QuizWithQuestions.js +17 -1
- package/package.json +1 -1
|
@@ -51,6 +51,18 @@ export interface Quiz {
|
|
|
51
51
|
* @memberof Quiz
|
|
52
52
|
*/
|
|
53
53
|
mode: QuizModeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Quiz
|
|
58
|
+
*/
|
|
59
|
+
generationStatus: QuizGenerationStatusEnum;
|
|
60
|
+
/**
|
|
61
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof Quiz
|
|
64
|
+
*/
|
|
65
|
+
expectedQuestionCount: number | null;
|
|
54
66
|
/**
|
|
55
67
|
*
|
|
56
68
|
* @type {Date}
|
|
@@ -66,6 +78,15 @@ export declare const QuizModeEnum: {
|
|
|
66
78
|
readonly Flashcards: "flashcards";
|
|
67
79
|
};
|
|
68
80
|
export type QuizModeEnum = typeof QuizModeEnum[keyof typeof QuizModeEnum];
|
|
81
|
+
/**
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
export declare const QuizGenerationStatusEnum: {
|
|
85
|
+
readonly Generating: "generating";
|
|
86
|
+
readonly Ready: "ready";
|
|
87
|
+
readonly Failed: "failed";
|
|
88
|
+
};
|
|
89
|
+
export type QuizGenerationStatusEnum = typeof QuizGenerationStatusEnum[keyof typeof QuizGenerationStatusEnum];
|
|
69
90
|
/**
|
|
70
91
|
* Check if a given object implements the Quiz interface.
|
|
71
92
|
*/
|
package/dist/esm/models/Quiz.js
CHANGED
|
@@ -18,6 +18,14 @@ export const QuizModeEnum = {
|
|
|
18
18
|
Quiz: 'quiz',
|
|
19
19
|
Flashcards: 'flashcards'
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const QuizGenerationStatusEnum = {
|
|
25
|
+
Generating: 'generating',
|
|
26
|
+
Ready: 'ready',
|
|
27
|
+
Failed: 'failed'
|
|
28
|
+
};
|
|
21
29
|
/**
|
|
22
30
|
* Check if a given object implements the Quiz interface.
|
|
23
31
|
*/
|
|
@@ -34,6 +42,10 @@ export function instanceOfQuiz(value) {
|
|
|
34
42
|
return false;
|
|
35
43
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
36
44
|
return false;
|
|
45
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
48
|
+
return false;
|
|
37
49
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
38
50
|
return false;
|
|
39
51
|
return true;
|
|
@@ -52,6 +64,8 @@ export function QuizFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
64
|
'title': json['title'],
|
|
53
65
|
'topic': json['topic'],
|
|
54
66
|
'mode': json['mode'],
|
|
67
|
+
'generationStatus': json['generationStatus'],
|
|
68
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
55
69
|
'createdAt': (new Date(json['createdAt'])),
|
|
56
70
|
};
|
|
57
71
|
}
|
|
@@ -69,6 +83,8 @@ export function QuizToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
69
83
|
'title': value['title'],
|
|
70
84
|
'topic': value['topic'],
|
|
71
85
|
'mode': value['mode'],
|
|
86
|
+
'generationStatus': value['generationStatus'],
|
|
87
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
72
88
|
'createdAt': value['createdAt'].toISOString(),
|
|
73
89
|
};
|
|
74
90
|
}
|
|
@@ -51,6 +51,18 @@ export interface QuizListItem {
|
|
|
51
51
|
* @memberof QuizListItem
|
|
52
52
|
*/
|
|
53
53
|
mode: QuizListItemModeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof QuizListItem
|
|
58
|
+
*/
|
|
59
|
+
generationStatus: QuizListItemGenerationStatusEnum;
|
|
60
|
+
/**
|
|
61
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof QuizListItem
|
|
64
|
+
*/
|
|
65
|
+
expectedQuestionCount: number | null;
|
|
54
66
|
/**
|
|
55
67
|
*
|
|
56
68
|
* @type {Date}
|
|
@@ -72,6 +84,15 @@ export declare const QuizListItemModeEnum: {
|
|
|
72
84
|
readonly Flashcards: "flashcards";
|
|
73
85
|
};
|
|
74
86
|
export type QuizListItemModeEnum = typeof QuizListItemModeEnum[keyof typeof QuizListItemModeEnum];
|
|
87
|
+
/**
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export declare const QuizListItemGenerationStatusEnum: {
|
|
91
|
+
readonly Generating: "generating";
|
|
92
|
+
readonly Ready: "ready";
|
|
93
|
+
readonly Failed: "failed";
|
|
94
|
+
};
|
|
95
|
+
export type QuizListItemGenerationStatusEnum = typeof QuizListItemGenerationStatusEnum[keyof typeof QuizListItemGenerationStatusEnum];
|
|
75
96
|
/**
|
|
76
97
|
* Check if a given object implements the QuizListItem interface.
|
|
77
98
|
*/
|
|
@@ -18,6 +18,14 @@ export const QuizListItemModeEnum = {
|
|
|
18
18
|
Quiz: 'quiz',
|
|
19
19
|
Flashcards: 'flashcards'
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const QuizListItemGenerationStatusEnum = {
|
|
25
|
+
Generating: 'generating',
|
|
26
|
+
Ready: 'ready',
|
|
27
|
+
Failed: 'failed'
|
|
28
|
+
};
|
|
21
29
|
/**
|
|
22
30
|
* Check if a given object implements the QuizListItem interface.
|
|
23
31
|
*/
|
|
@@ -34,6 +42,10 @@ export function instanceOfQuizListItem(value) {
|
|
|
34
42
|
return false;
|
|
35
43
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
36
44
|
return false;
|
|
45
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
48
|
+
return false;
|
|
37
49
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
38
50
|
return false;
|
|
39
51
|
if (!('questionCount' in value) || value['questionCount'] === undefined)
|
|
@@ -54,6 +66,8 @@ export function QuizListItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
66
|
'title': json['title'],
|
|
55
67
|
'topic': json['topic'],
|
|
56
68
|
'mode': json['mode'],
|
|
69
|
+
'generationStatus': json['generationStatus'],
|
|
70
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
57
71
|
'createdAt': (new Date(json['createdAt'])),
|
|
58
72
|
'questionCount': json['questionCount'],
|
|
59
73
|
};
|
|
@@ -72,6 +86,8 @@ export function QuizListItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
72
86
|
'title': value['title'],
|
|
73
87
|
'topic': value['topic'],
|
|
74
88
|
'mode': value['mode'],
|
|
89
|
+
'generationStatus': value['generationStatus'],
|
|
90
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
75
91
|
'createdAt': value['createdAt'].toISOString(),
|
|
76
92
|
'questionCount': value['questionCount'],
|
|
77
93
|
};
|
|
@@ -52,6 +52,18 @@ export interface QuizWithQuestions {
|
|
|
52
52
|
* @memberof QuizWithQuestions
|
|
53
53
|
*/
|
|
54
54
|
mode: QuizWithQuestionsModeEnum;
|
|
55
|
+
/**
|
|
56
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof QuizWithQuestions
|
|
59
|
+
*/
|
|
60
|
+
generationStatus: QuizWithQuestionsGenerationStatusEnum;
|
|
61
|
+
/**
|
|
62
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof QuizWithQuestions
|
|
65
|
+
*/
|
|
66
|
+
expectedQuestionCount: number | null;
|
|
55
67
|
/**
|
|
56
68
|
*
|
|
57
69
|
* @type {Date}
|
|
@@ -73,6 +85,15 @@ export declare const QuizWithQuestionsModeEnum: {
|
|
|
73
85
|
readonly Flashcards: "flashcards";
|
|
74
86
|
};
|
|
75
87
|
export type QuizWithQuestionsModeEnum = typeof QuizWithQuestionsModeEnum[keyof typeof QuizWithQuestionsModeEnum];
|
|
88
|
+
/**
|
|
89
|
+
* @export
|
|
90
|
+
*/
|
|
91
|
+
export declare const QuizWithQuestionsGenerationStatusEnum: {
|
|
92
|
+
readonly Generating: "generating";
|
|
93
|
+
readonly Ready: "ready";
|
|
94
|
+
readonly Failed: "failed";
|
|
95
|
+
};
|
|
96
|
+
export type QuizWithQuestionsGenerationStatusEnum = typeof QuizWithQuestionsGenerationStatusEnum[keyof typeof QuizWithQuestionsGenerationStatusEnum];
|
|
76
97
|
/**
|
|
77
98
|
* Check if a given object implements the QuizWithQuestions interface.
|
|
78
99
|
*/
|
|
@@ -19,6 +19,14 @@ export const QuizWithQuestionsModeEnum = {
|
|
|
19
19
|
Quiz: 'quiz',
|
|
20
20
|
Flashcards: 'flashcards'
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const QuizWithQuestionsGenerationStatusEnum = {
|
|
26
|
+
Generating: 'generating',
|
|
27
|
+
Ready: 'ready',
|
|
28
|
+
Failed: 'failed'
|
|
29
|
+
};
|
|
22
30
|
/**
|
|
23
31
|
* Check if a given object implements the QuizWithQuestions interface.
|
|
24
32
|
*/
|
|
@@ -35,6 +43,10 @@ export function instanceOfQuizWithQuestions(value) {
|
|
|
35
43
|
return false;
|
|
36
44
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
37
45
|
return false;
|
|
46
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
49
|
+
return false;
|
|
38
50
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
39
51
|
return false;
|
|
40
52
|
if (!('questions' in value) || value['questions'] === undefined)
|
|
@@ -55,6 +67,8 @@ export function QuizWithQuestionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
67
|
'title': json['title'],
|
|
56
68
|
'topic': json['topic'],
|
|
57
69
|
'mode': json['mode'],
|
|
70
|
+
'generationStatus': json['generationStatus'],
|
|
71
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
58
72
|
'createdAt': (new Date(json['createdAt'])),
|
|
59
73
|
'questions': (json['questions'].map(QuizQuestionFromJSON)),
|
|
60
74
|
};
|
|
@@ -73,6 +87,8 @@ export function QuizWithQuestionsToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
73
87
|
'title': value['title'],
|
|
74
88
|
'topic': value['topic'],
|
|
75
89
|
'mode': value['mode'],
|
|
90
|
+
'generationStatus': value['generationStatus'],
|
|
91
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
76
92
|
'createdAt': value['createdAt'].toISOString(),
|
|
77
93
|
'questions': (value['questions'].map(QuizQuestionToJSON)),
|
|
78
94
|
};
|
package/dist/models/Quiz.d.ts
CHANGED
|
@@ -51,6 +51,18 @@ export interface Quiz {
|
|
|
51
51
|
* @memberof Quiz
|
|
52
52
|
*/
|
|
53
53
|
mode: QuizModeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Quiz
|
|
58
|
+
*/
|
|
59
|
+
generationStatus: QuizGenerationStatusEnum;
|
|
60
|
+
/**
|
|
61
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof Quiz
|
|
64
|
+
*/
|
|
65
|
+
expectedQuestionCount: number | null;
|
|
54
66
|
/**
|
|
55
67
|
*
|
|
56
68
|
* @type {Date}
|
|
@@ -66,6 +78,15 @@ export declare const QuizModeEnum: {
|
|
|
66
78
|
readonly Flashcards: "flashcards";
|
|
67
79
|
};
|
|
68
80
|
export type QuizModeEnum = typeof QuizModeEnum[keyof typeof QuizModeEnum];
|
|
81
|
+
/**
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
export declare const QuizGenerationStatusEnum: {
|
|
85
|
+
readonly Generating: "generating";
|
|
86
|
+
readonly Ready: "ready";
|
|
87
|
+
readonly Failed: "failed";
|
|
88
|
+
};
|
|
89
|
+
export type QuizGenerationStatusEnum = typeof QuizGenerationStatusEnum[keyof typeof QuizGenerationStatusEnum];
|
|
69
90
|
/**
|
|
70
91
|
* Check if a given object implements the Quiz interface.
|
|
71
92
|
*/
|
package/dist/models/Quiz.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.QuizModeEnum = void 0;
|
|
16
|
+
exports.QuizGenerationStatusEnum = exports.QuizModeEnum = void 0;
|
|
17
17
|
exports.instanceOfQuiz = instanceOfQuiz;
|
|
18
18
|
exports.QuizFromJSON = QuizFromJSON;
|
|
19
19
|
exports.QuizFromJSONTyped = QuizFromJSONTyped;
|
|
@@ -26,6 +26,14 @@ exports.QuizModeEnum = {
|
|
|
26
26
|
Quiz: 'quiz',
|
|
27
27
|
Flashcards: 'flashcards'
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.QuizGenerationStatusEnum = {
|
|
33
|
+
Generating: 'generating',
|
|
34
|
+
Ready: 'ready',
|
|
35
|
+
Failed: 'failed'
|
|
36
|
+
};
|
|
29
37
|
/**
|
|
30
38
|
* Check if a given object implements the Quiz interface.
|
|
31
39
|
*/
|
|
@@ -42,6 +50,10 @@ function instanceOfQuiz(value) {
|
|
|
42
50
|
return false;
|
|
43
51
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
44
52
|
return false;
|
|
53
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
56
|
+
return false;
|
|
45
57
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
46
58
|
return false;
|
|
47
59
|
return true;
|
|
@@ -60,6 +72,8 @@ function QuizFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
72
|
'title': json['title'],
|
|
61
73
|
'topic': json['topic'],
|
|
62
74
|
'mode': json['mode'],
|
|
75
|
+
'generationStatus': json['generationStatus'],
|
|
76
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
63
77
|
'createdAt': (new Date(json['createdAt'])),
|
|
64
78
|
};
|
|
65
79
|
}
|
|
@@ -77,6 +91,8 @@ function QuizToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
77
91
|
'title': value['title'],
|
|
78
92
|
'topic': value['topic'],
|
|
79
93
|
'mode': value['mode'],
|
|
94
|
+
'generationStatus': value['generationStatus'],
|
|
95
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
80
96
|
'createdAt': value['createdAt'].toISOString(),
|
|
81
97
|
};
|
|
82
98
|
}
|
|
@@ -51,6 +51,18 @@ export interface QuizListItem {
|
|
|
51
51
|
* @memberof QuizListItem
|
|
52
52
|
*/
|
|
53
53
|
mode: QuizListItemModeEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof QuizListItem
|
|
58
|
+
*/
|
|
59
|
+
generationStatus: QuizListItemGenerationStatusEnum;
|
|
60
|
+
/**
|
|
61
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof QuizListItem
|
|
64
|
+
*/
|
|
65
|
+
expectedQuestionCount: number | null;
|
|
54
66
|
/**
|
|
55
67
|
*
|
|
56
68
|
* @type {Date}
|
|
@@ -72,6 +84,15 @@ export declare const QuizListItemModeEnum: {
|
|
|
72
84
|
readonly Flashcards: "flashcards";
|
|
73
85
|
};
|
|
74
86
|
export type QuizListItemModeEnum = typeof QuizListItemModeEnum[keyof typeof QuizListItemModeEnum];
|
|
87
|
+
/**
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export declare const QuizListItemGenerationStatusEnum: {
|
|
91
|
+
readonly Generating: "generating";
|
|
92
|
+
readonly Ready: "ready";
|
|
93
|
+
readonly Failed: "failed";
|
|
94
|
+
};
|
|
95
|
+
export type QuizListItemGenerationStatusEnum = typeof QuizListItemGenerationStatusEnum[keyof typeof QuizListItemGenerationStatusEnum];
|
|
75
96
|
/**
|
|
76
97
|
* Check if a given object implements the QuizListItem interface.
|
|
77
98
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.QuizListItemModeEnum = void 0;
|
|
16
|
+
exports.QuizListItemGenerationStatusEnum = exports.QuizListItemModeEnum = void 0;
|
|
17
17
|
exports.instanceOfQuizListItem = instanceOfQuizListItem;
|
|
18
18
|
exports.QuizListItemFromJSON = QuizListItemFromJSON;
|
|
19
19
|
exports.QuizListItemFromJSONTyped = QuizListItemFromJSONTyped;
|
|
@@ -26,6 +26,14 @@ exports.QuizListItemModeEnum = {
|
|
|
26
26
|
Quiz: 'quiz',
|
|
27
27
|
Flashcards: 'flashcards'
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.QuizListItemGenerationStatusEnum = {
|
|
33
|
+
Generating: 'generating',
|
|
34
|
+
Ready: 'ready',
|
|
35
|
+
Failed: 'failed'
|
|
36
|
+
};
|
|
29
37
|
/**
|
|
30
38
|
* Check if a given object implements the QuizListItem interface.
|
|
31
39
|
*/
|
|
@@ -42,6 +50,10 @@ function instanceOfQuizListItem(value) {
|
|
|
42
50
|
return false;
|
|
43
51
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
44
52
|
return false;
|
|
53
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
56
|
+
return false;
|
|
45
57
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
46
58
|
return false;
|
|
47
59
|
if (!('questionCount' in value) || value['questionCount'] === undefined)
|
|
@@ -62,6 +74,8 @@ function QuizListItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
74
|
'title': json['title'],
|
|
63
75
|
'topic': json['topic'],
|
|
64
76
|
'mode': json['mode'],
|
|
77
|
+
'generationStatus': json['generationStatus'],
|
|
78
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
65
79
|
'createdAt': (new Date(json['createdAt'])),
|
|
66
80
|
'questionCount': json['questionCount'],
|
|
67
81
|
};
|
|
@@ -80,6 +94,8 @@ function QuizListItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
80
94
|
'title': value['title'],
|
|
81
95
|
'topic': value['topic'],
|
|
82
96
|
'mode': value['mode'],
|
|
97
|
+
'generationStatus': value['generationStatus'],
|
|
98
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
83
99
|
'createdAt': value['createdAt'].toISOString(),
|
|
84
100
|
'questionCount': value['questionCount'],
|
|
85
101
|
};
|
|
@@ -52,6 +52,18 @@ export interface QuizWithQuestions {
|
|
|
52
52
|
* @memberof QuizWithQuestions
|
|
53
53
|
*/
|
|
54
54
|
mode: QuizWithQuestionsModeEnum;
|
|
55
|
+
/**
|
|
56
|
+
* Whether more questions may still be appended to this quiz. "generating" means the generator is still writing questions and the client should keep polling; "ready" means no further questions will appear; "failed" means generation ended with nothing usable. Quizzes written in a single transaction are "ready" from the start.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof QuizWithQuestions
|
|
59
|
+
*/
|
|
60
|
+
generationStatus: QuizWithQuestionsGenerationStatusEnum;
|
|
61
|
+
/**
|
|
62
|
+
* How many questions the generation requested. Use it as the total while generationStatus is "generating" and fewer questions have arrived than were asked for. Null for quizzes created before the count was recorded.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof QuizWithQuestions
|
|
65
|
+
*/
|
|
66
|
+
expectedQuestionCount: number | null;
|
|
55
67
|
/**
|
|
56
68
|
*
|
|
57
69
|
* @type {Date}
|
|
@@ -73,6 +85,15 @@ export declare const QuizWithQuestionsModeEnum: {
|
|
|
73
85
|
readonly Flashcards: "flashcards";
|
|
74
86
|
};
|
|
75
87
|
export type QuizWithQuestionsModeEnum = typeof QuizWithQuestionsModeEnum[keyof typeof QuizWithQuestionsModeEnum];
|
|
88
|
+
/**
|
|
89
|
+
* @export
|
|
90
|
+
*/
|
|
91
|
+
export declare const QuizWithQuestionsGenerationStatusEnum: {
|
|
92
|
+
readonly Generating: "generating";
|
|
93
|
+
readonly Ready: "ready";
|
|
94
|
+
readonly Failed: "failed";
|
|
95
|
+
};
|
|
96
|
+
export type QuizWithQuestionsGenerationStatusEnum = typeof QuizWithQuestionsGenerationStatusEnum[keyof typeof QuizWithQuestionsGenerationStatusEnum];
|
|
76
97
|
/**
|
|
77
98
|
* Check if a given object implements the QuizWithQuestions interface.
|
|
78
99
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.QuizWithQuestionsModeEnum = void 0;
|
|
16
|
+
exports.QuizWithQuestionsGenerationStatusEnum = exports.QuizWithQuestionsModeEnum = void 0;
|
|
17
17
|
exports.instanceOfQuizWithQuestions = instanceOfQuizWithQuestions;
|
|
18
18
|
exports.QuizWithQuestionsFromJSON = QuizWithQuestionsFromJSON;
|
|
19
19
|
exports.QuizWithQuestionsFromJSONTyped = QuizWithQuestionsFromJSONTyped;
|
|
@@ -27,6 +27,14 @@ exports.QuizWithQuestionsModeEnum = {
|
|
|
27
27
|
Quiz: 'quiz',
|
|
28
28
|
Flashcards: 'flashcards'
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.QuizWithQuestionsGenerationStatusEnum = {
|
|
34
|
+
Generating: 'generating',
|
|
35
|
+
Ready: 'ready',
|
|
36
|
+
Failed: 'failed'
|
|
37
|
+
};
|
|
30
38
|
/**
|
|
31
39
|
* Check if a given object implements the QuizWithQuestions interface.
|
|
32
40
|
*/
|
|
@@ -43,6 +51,10 @@ function instanceOfQuizWithQuestions(value) {
|
|
|
43
51
|
return false;
|
|
44
52
|
if (!('mode' in value) || value['mode'] === undefined)
|
|
45
53
|
return false;
|
|
54
|
+
if (!('generationStatus' in value) || value['generationStatus'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
|
|
57
|
+
return false;
|
|
46
58
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
47
59
|
return false;
|
|
48
60
|
if (!('questions' in value) || value['questions'] === undefined)
|
|
@@ -63,6 +75,8 @@ function QuizWithQuestionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
63
75
|
'title': json['title'],
|
|
64
76
|
'topic': json['topic'],
|
|
65
77
|
'mode': json['mode'],
|
|
78
|
+
'generationStatus': json['generationStatus'],
|
|
79
|
+
'expectedQuestionCount': json['expectedQuestionCount'],
|
|
66
80
|
'createdAt': (new Date(json['createdAt'])),
|
|
67
81
|
'questions': (json['questions'].map(QuizQuestion_1.QuizQuestionFromJSON)),
|
|
68
82
|
};
|
|
@@ -81,6 +95,8 @@ function QuizWithQuestionsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
81
95
|
'title': value['title'],
|
|
82
96
|
'topic': value['topic'],
|
|
83
97
|
'mode': value['mode'],
|
|
98
|
+
'generationStatus': value['generationStatus'],
|
|
99
|
+
'expectedQuestionCount': value['expectedQuestionCount'],
|
|
84
100
|
'createdAt': value['createdAt'].toISOString(),
|
|
85
101
|
'questions': (value['questions'].map(QuizQuestion_1.QuizQuestionToJSON)),
|
|
86
102
|
};
|