@instructure/athena-api-client 2.12.1 → 2.14.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/README.md +5 -0
- package/dist/apis/QuizSessionsApi.d.ts +35 -1
- package/dist/apis/QuizSessionsApi.js +65 -1
- package/dist/esm/apis/QuizSessionsApi.d.ts +35 -1
- package/dist/esm/apis/QuizSessionsApi.js +65 -1
- package/dist/esm/models/ChatRequest.d.ts +22 -0
- package/dist/esm/models/ChatRequest.js +13 -0
- package/dist/esm/models/ChatRequestMessageMetadata.d.ts +44 -0
- package/dist/esm/models/ChatRequestMessageMetadata.js +47 -0
- package/dist/esm/models/CreateChatRequest.d.ts +13 -1
- package/dist/esm/models/CreateChatRequest.js +4 -0
- package/dist/esm/models/PaginatedQuizSessions.d.ts +39 -0
- package/dist/esm/models/PaginatedQuizSessions.js +48 -0
- package/dist/esm/models/QuizSessionListItem.d.ts +85 -0
- package/dist/esm/models/QuizSessionListItem.js +81 -0
- package/dist/esm/models/QuizSessionScore.d.ts +38 -0
- package/dist/esm/models/QuizSessionScore.js +47 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ChatRequest.d.ts +22 -0
- package/dist/models/ChatRequest.js +14 -0
- package/dist/models/ChatRequestMessageMetadata.d.ts +44 -0
- package/dist/models/ChatRequestMessageMetadata.js +54 -0
- package/dist/models/CreateChatRequest.d.ts +13 -1
- package/dist/models/CreateChatRequest.js +4 -0
- package/dist/models/PaginatedQuizSessions.d.ts +39 -0
- package/dist/models/PaginatedQuizSessions.js +55 -0
- package/dist/models/QuizSessionListItem.d.ts +85 -0
- package/dist/models/QuizSessionListItem.js +89 -0
- package/dist/models/QuizSessionScore.d.ts +38 -0
- package/dist/models/QuizSessionScore.js +54 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
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 { Quiz } from './Quiz';
|
|
13
|
+
import type { QuizSessionScore } from './QuizSessionScore';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface QuizSessionListItem
|
|
18
|
+
*/
|
|
19
|
+
export interface QuizSessionListItem {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof QuizSessionListItem
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof QuizSessionListItem
|
|
30
|
+
*/
|
|
31
|
+
quizId: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof QuizSessionListItem
|
|
36
|
+
*/
|
|
37
|
+
accountUserId: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof QuizSessionListItem
|
|
42
|
+
*/
|
|
43
|
+
status: QuizSessionListItemStatusEnum;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {Date}
|
|
47
|
+
* @memberof QuizSessionListItem
|
|
48
|
+
*/
|
|
49
|
+
startedAt: Date;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Date}
|
|
53
|
+
* @memberof QuizSessionListItem
|
|
54
|
+
*/
|
|
55
|
+
completedAt: Date | null;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {Quiz}
|
|
59
|
+
* @memberof QuizSessionListItem
|
|
60
|
+
*/
|
|
61
|
+
quiz: Quiz;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {QuizSessionScore}
|
|
65
|
+
* @memberof QuizSessionListItem
|
|
66
|
+
*/
|
|
67
|
+
score: QuizSessionScore;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export declare const QuizSessionListItemStatusEnum: {
|
|
73
|
+
readonly Active: "active";
|
|
74
|
+
readonly Completed: "completed";
|
|
75
|
+
readonly Abandoned: "abandoned";
|
|
76
|
+
};
|
|
77
|
+
export type QuizSessionListItemStatusEnum = typeof QuizSessionListItemStatusEnum[keyof typeof QuizSessionListItemStatusEnum];
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the QuizSessionListItem interface.
|
|
80
|
+
*/
|
|
81
|
+
export declare function instanceOfQuizSessionListItem(value: object): value is QuizSessionListItem;
|
|
82
|
+
export declare function QuizSessionListItemFromJSON(json: any): QuizSessionListItem;
|
|
83
|
+
export declare function QuizSessionListItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizSessionListItem;
|
|
84
|
+
export declare function QuizSessionListItemToJSON(json: any): QuizSessionListItem;
|
|
85
|
+
export declare function QuizSessionListItemToJSONTyped(value?: QuizSessionListItem | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { QuizFromJSON, QuizToJSON, } from './Quiz';
|
|
15
|
+
import { QuizSessionScoreFromJSON, QuizSessionScoreToJSON, } from './QuizSessionScore';
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const QuizSessionListItemStatusEnum = {
|
|
20
|
+
Active: 'active',
|
|
21
|
+
Completed: 'completed',
|
|
22
|
+
Abandoned: 'abandoned'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the QuizSessionListItem interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfQuizSessionListItem(value) {
|
|
28
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('quizId' in value) || value['quizId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('accountUserId' in value) || value['accountUserId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('startedAt' in value) || value['startedAt'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('completedAt' in value) || value['completedAt'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('quiz' in value) || value['quiz'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('score' in value) || value['score'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
export function QuizSessionListItemFromJSON(json) {
|
|
47
|
+
return QuizSessionListItemFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function QuizSessionListItemFromJSONTyped(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 ? null : new Date(json['completedAt'])),
|
|
60
|
+
'quiz': QuizFromJSON(json['quiz']),
|
|
61
|
+
'score': QuizSessionScoreFromJSON(json['score']),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function QuizSessionListItemToJSON(json) {
|
|
65
|
+
return QuizSessionListItemToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function QuizSessionListItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': value['id'],
|
|
73
|
+
'quizId': value['quizId'],
|
|
74
|
+
'accountUserId': value['accountUserId'],
|
|
75
|
+
'status': value['status'],
|
|
76
|
+
'startedAt': value['startedAt'].toISOString(),
|
|
77
|
+
'completedAt': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
|
|
78
|
+
'quiz': QuizToJSON(value['quiz']),
|
|
79
|
+
'score': QuizSessionScoreToJSON(value['score']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -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 QuizSessionScore
|
|
16
|
+
*/
|
|
17
|
+
export interface QuizSessionScore {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof QuizSessionScore
|
|
22
|
+
*/
|
|
23
|
+
totalCorrect: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof QuizSessionScore
|
|
28
|
+
*/
|
|
29
|
+
totalQuestions: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the QuizSessionScore interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfQuizSessionScore(value: object): value is QuizSessionScore;
|
|
35
|
+
export declare function QuizSessionScoreFromJSON(json: any): QuizSessionScore;
|
|
36
|
+
export declare function QuizSessionScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizSessionScore;
|
|
37
|
+
export declare function QuizSessionScoreToJSON(json: any): QuizSessionScore;
|
|
38
|
+
export declare function QuizSessionScoreToJSONTyped(value?: QuizSessionScore | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the QuizSessionScore interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfQuizSessionScore(value) {
|
|
18
|
+
if (!('totalCorrect' in value) || value['totalCorrect'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('totalQuestions' in value) || value['totalQuestions'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function QuizSessionScoreFromJSON(json) {
|
|
25
|
+
return QuizSessionScoreFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function QuizSessionScoreFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'totalCorrect': json['totalCorrect'],
|
|
33
|
+
'totalQuestions': json['totalQuestions'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function QuizSessionScoreToJSON(json) {
|
|
37
|
+
return QuizSessionScoreToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function QuizSessionScoreToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'totalCorrect': value['totalCorrect'],
|
|
45
|
+
'totalQuestions': value['totalQuestions'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -15,6 +15,7 @@ export * from './ChatAnalysis';
|
|
|
15
15
|
export * from './ChatRequest';
|
|
16
16
|
export * from './ChatRequestAttachmentsInner';
|
|
17
17
|
export * from './ChatRequestExternalFileUrl';
|
|
18
|
+
export * from './ChatRequestMessageMetadata';
|
|
18
19
|
export * from './ChatRequestQuizContext';
|
|
19
20
|
export * from './ChatRequestQuizContextAnswerState';
|
|
20
21
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
@@ -43,6 +44,7 @@ export * from './MessagePartsInner';
|
|
|
43
44
|
export * from './PaginatedChats';
|
|
44
45
|
export * from './PaginatedLearningMoments';
|
|
45
46
|
export * from './PaginatedMessages';
|
|
47
|
+
export * from './PaginatedQuizSessions';
|
|
46
48
|
export * from './PaginatedQuizzes';
|
|
47
49
|
export * from './PaginatedTaxonomies';
|
|
48
50
|
export * from './Plan';
|
|
@@ -51,6 +53,8 @@ export * from './QuizListItem';
|
|
|
51
53
|
export * from './QuizQuestion';
|
|
52
54
|
export * from './QuizResponse';
|
|
53
55
|
export * from './QuizSession';
|
|
56
|
+
export * from './QuizSessionListItem';
|
|
57
|
+
export * from './QuizSessionScore';
|
|
54
58
|
export * from './QuizSessionSummary';
|
|
55
59
|
export * from './QuizWithQuestions';
|
|
56
60
|
export * from './Score';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export * from './ChatAnalysis';
|
|
|
17
17
|
export * from './ChatRequest';
|
|
18
18
|
export * from './ChatRequestAttachmentsInner';
|
|
19
19
|
export * from './ChatRequestExternalFileUrl';
|
|
20
|
+
export * from './ChatRequestMessageMetadata';
|
|
20
21
|
export * from './ChatRequestQuizContext';
|
|
21
22
|
export * from './ChatRequestQuizContextAnswerState';
|
|
22
23
|
export * from './ChatRequestQuizContextCurrentQuestion';
|
|
@@ -45,6 +46,7 @@ export * from './MessagePartsInner';
|
|
|
45
46
|
export * from './PaginatedChats';
|
|
46
47
|
export * from './PaginatedLearningMoments';
|
|
47
48
|
export * from './PaginatedMessages';
|
|
49
|
+
export * from './PaginatedQuizSessions';
|
|
48
50
|
export * from './PaginatedQuizzes';
|
|
49
51
|
export * from './PaginatedTaxonomies';
|
|
50
52
|
export * from './Plan';
|
|
@@ -53,6 +55,8 @@ export * from './QuizListItem';
|
|
|
53
55
|
export * from './QuizQuestion';
|
|
54
56
|
export * from './QuizResponse';
|
|
55
57
|
export * from './QuizSession';
|
|
58
|
+
export * from './QuizSessionListItem';
|
|
59
|
+
export * from './QuizSessionScore';
|
|
56
60
|
export * from './QuizSessionSummary';
|
|
57
61
|
export * from './QuizWithQuestions';
|
|
58
62
|
export * from './Score';
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ChatRequestExternalFileUrl } from './ChatRequestExternalFileUrl';
|
|
13
|
+
import type { ChatRequestMessageMetadata } from './ChatRequestMessageMetadata';
|
|
13
14
|
import type { ChatRequestAttachmentsInner } from './ChatRequestAttachmentsInner';
|
|
14
15
|
import type { ChatRequestQuizContext } from './ChatRequestQuizContext';
|
|
15
16
|
/**
|
|
@@ -60,7 +61,28 @@ export interface ChatRequest {
|
|
|
60
61
|
* @memberof ChatRequest
|
|
61
62
|
*/
|
|
62
63
|
taxonomyId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Session-chat lifecycle trigger. 'level-up-initiate' / 'quick-practice-initiate' are sent with a whitespace user message to kick off the session's first AI turn; 'level-up-resume' is sent when reopening a paused Level Up chat so the AI runs a welcome-back recap turn. Ignored for non-session chats.
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof ChatRequest
|
|
68
|
+
*/
|
|
69
|
+
trigger?: ChatRequestTriggerEnum;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {ChatRequestMessageMetadata}
|
|
73
|
+
* @memberof ChatRequest
|
|
74
|
+
*/
|
|
75
|
+
messageMetadata?: ChatRequestMessageMetadata;
|
|
63
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export declare const ChatRequestTriggerEnum: {
|
|
81
|
+
readonly LevelUpInitiate: "level-up-initiate";
|
|
82
|
+
readonly QuickPracticeInitiate: "quick-practice-initiate";
|
|
83
|
+
readonly LevelUpResume: "level-up-resume";
|
|
84
|
+
};
|
|
85
|
+
export type ChatRequestTriggerEnum = typeof ChatRequestTriggerEnum[keyof typeof ChatRequestTriggerEnum];
|
|
64
86
|
/**
|
|
65
87
|
* Check if a given object implements the ChatRequest interface.
|
|
66
88
|
*/
|
|
@@ -13,14 +13,24 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ChatRequestTriggerEnum = void 0;
|
|
16
17
|
exports.instanceOfChatRequest = instanceOfChatRequest;
|
|
17
18
|
exports.ChatRequestFromJSON = ChatRequestFromJSON;
|
|
18
19
|
exports.ChatRequestFromJSONTyped = ChatRequestFromJSONTyped;
|
|
19
20
|
exports.ChatRequestToJSON = ChatRequestToJSON;
|
|
20
21
|
exports.ChatRequestToJSONTyped = ChatRequestToJSONTyped;
|
|
21
22
|
const ChatRequestExternalFileUrl_1 = require("./ChatRequestExternalFileUrl");
|
|
23
|
+
const ChatRequestMessageMetadata_1 = require("./ChatRequestMessageMetadata");
|
|
22
24
|
const ChatRequestAttachmentsInner_1 = require("./ChatRequestAttachmentsInner");
|
|
23
25
|
const ChatRequestQuizContext_1 = require("./ChatRequestQuizContext");
|
|
26
|
+
/**
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
exports.ChatRequestTriggerEnum = {
|
|
30
|
+
LevelUpInitiate: 'level-up-initiate',
|
|
31
|
+
QuickPracticeInitiate: 'quick-practice-initiate',
|
|
32
|
+
LevelUpResume: 'level-up-resume'
|
|
33
|
+
};
|
|
24
34
|
/**
|
|
25
35
|
* Check if a given object implements the ChatRequest interface.
|
|
26
36
|
*/
|
|
@@ -46,6 +56,8 @@ function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
56
|
'externalFileUrl': json['externalFileUrl'] == null ? undefined : (0, ChatRequestExternalFileUrl_1.ChatRequestExternalFileUrlFromJSON)(json['externalFileUrl']),
|
|
47
57
|
'quizContext': json['quizContext'] == null ? undefined : (0, ChatRequestQuizContext_1.ChatRequestQuizContextFromJSON)(json['quizContext']),
|
|
48
58
|
'taxonomyId': json['taxonomyId'] == null ? undefined : json['taxonomyId'],
|
|
59
|
+
'trigger': json['trigger'] == null ? undefined : json['trigger'],
|
|
60
|
+
'messageMetadata': json['messageMetadata'] == null ? undefined : (0, ChatRequestMessageMetadata_1.ChatRequestMessageMetadataFromJSON)(json['messageMetadata']),
|
|
49
61
|
};
|
|
50
62
|
}
|
|
51
63
|
function ChatRequestToJSON(json) {
|
|
@@ -63,5 +75,7 @@ function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
63
75
|
'externalFileUrl': (0, ChatRequestExternalFileUrl_1.ChatRequestExternalFileUrlToJSON)(value['externalFileUrl']),
|
|
64
76
|
'quizContext': (0, ChatRequestQuizContext_1.ChatRequestQuizContextToJSON)(value['quizContext']),
|
|
65
77
|
'taxonomyId': value['taxonomyId'],
|
|
78
|
+
'trigger': value['trigger'],
|
|
79
|
+
'messageMetadata': (0, ChatRequestMessageMetadata_1.ChatRequestMessageMetadataToJSON)(value['messageMetadata']),
|
|
66
80
|
};
|
|
67
81
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* Optional metadata attached to the user message, used by session chats to bind an answer to its inline question and scoring context.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChatRequestMessageMetadata
|
|
16
|
+
*/
|
|
17
|
+
export interface ChatRequestMessageMetadata {
|
|
18
|
+
/**
|
|
19
|
+
* Identifier of the inline question this user message is answering.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChatRequestMessageMetadata
|
|
22
|
+
*/
|
|
23
|
+
inlineQuestionId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Widget shape the inline question used (free-text, fill-blank, teach-back, spot-error).
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChatRequestMessageMetadata
|
|
28
|
+
*/
|
|
29
|
+
questionType?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Raw typed answer shape from the widget (e.g. string[] of fill-blank answers). Server passes it through to the evaluator.
|
|
32
|
+
* @type {any}
|
|
33
|
+
* @memberof ChatRequestMessageMetadata
|
|
34
|
+
*/
|
|
35
|
+
structuredAnswer?: any | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the ChatRequestMessageMetadata interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfChatRequestMessageMetadata(value: object): value is ChatRequestMessageMetadata;
|
|
41
|
+
export declare function ChatRequestMessageMetadataFromJSON(json: any): ChatRequestMessageMetadata;
|
|
42
|
+
export declare function ChatRequestMessageMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatRequestMessageMetadata;
|
|
43
|
+
export declare function ChatRequestMessageMetadataToJSON(json: any): ChatRequestMessageMetadata;
|
|
44
|
+
export declare function ChatRequestMessageMetadataToJSONTyped(value?: ChatRequestMessageMetadata | 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.instanceOfChatRequestMessageMetadata = instanceOfChatRequestMessageMetadata;
|
|
17
|
+
exports.ChatRequestMessageMetadataFromJSON = ChatRequestMessageMetadataFromJSON;
|
|
18
|
+
exports.ChatRequestMessageMetadataFromJSONTyped = ChatRequestMessageMetadataFromJSONTyped;
|
|
19
|
+
exports.ChatRequestMessageMetadataToJSON = ChatRequestMessageMetadataToJSON;
|
|
20
|
+
exports.ChatRequestMessageMetadataToJSONTyped = ChatRequestMessageMetadataToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ChatRequestMessageMetadata interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfChatRequestMessageMetadata(value) {
|
|
25
|
+
if (!('inlineQuestionId' in value) || value['inlineQuestionId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ChatRequestMessageMetadataFromJSON(json) {
|
|
30
|
+
return ChatRequestMessageMetadataFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ChatRequestMessageMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'inlineQuestionId': json['inlineQuestionId'],
|
|
38
|
+
'questionType': json['questionType'] == null ? undefined : json['questionType'],
|
|
39
|
+
'structuredAnswer': json['structuredAnswer'] == null ? undefined : json['structuredAnswer'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function ChatRequestMessageMetadataToJSON(json) {
|
|
43
|
+
return ChatRequestMessageMetadataToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function ChatRequestMessageMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'inlineQuestionId': value['inlineQuestionId'],
|
|
51
|
+
'questionType': value['questionType'],
|
|
52
|
+
'structuredAnswer': value['structuredAnswer'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -28,7 +28,7 @@ export interface CreateChatRequest {
|
|
|
28
28
|
*/
|
|
29
29
|
title?: string;
|
|
30
30
|
/**
|
|
31
|
-
* Optional chat type. Defaults to a general chat if omitted.
|
|
31
|
+
* Optional chat type. Defaults to a general chat if omitted. Use 'level-up' or 'quick-practice' to create a session chat; both require primaryConceptId + initialStrength.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof CreateChatRequest
|
|
34
34
|
*/
|
|
@@ -39,6 +39,18 @@ export interface CreateChatRequest {
|
|
|
39
39
|
* @memberof CreateChatRequest
|
|
40
40
|
*/
|
|
41
41
|
visibility?: CreateChatRequestVisibilityEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Concept this session chat is bound to. Required when chatType is 'level-up' or 'quick-practice'; ignored for other chat types.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateChatRequest
|
|
46
|
+
*/
|
|
47
|
+
primaryConceptId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Snapshot of the learner's current strength for primaryConceptId (0..1). Required when chatType is 'level-up' or 'quick-practice'. Used by the session-end rollup and the surprise tier-advance check at close.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof CreateChatRequest
|
|
52
|
+
*/
|
|
53
|
+
initialStrength?: number;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
56
|
* @export
|
|
@@ -44,6 +44,8 @@ function CreateChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
44
|
'title': json['title'] == null ? undefined : json['title'],
|
|
45
45
|
'chatType': json['chatType'] == null ? undefined : json['chatType'],
|
|
46
46
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
47
|
+
'primaryConceptId': json['primaryConceptId'] == null ? undefined : json['primaryConceptId'],
|
|
48
|
+
'initialStrength': json['initialStrength'] == null ? undefined : json['initialStrength'],
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
function CreateChatRequestToJSON(json) {
|
|
@@ -58,5 +60,7 @@ function CreateChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
58
60
|
'title': value['title'],
|
|
59
61
|
'chatType': value['chatType'],
|
|
60
62
|
'visibility': value['visibility'],
|
|
63
|
+
'primaryConceptId': value['primaryConceptId'],
|
|
64
|
+
'initialStrength': value['initialStrength'],
|
|
61
65
|
};
|
|
62
66
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { QuizSessionListItem } from './QuizSessionListItem';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedQuizSessions
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedQuizSessions {
|
|
19
|
+
/**
|
|
20
|
+
* Array of quiz session objects
|
|
21
|
+
* @type {Array<QuizSessionListItem>}
|
|
22
|
+
* @memberof PaginatedQuizSessions
|
|
23
|
+
*/
|
|
24
|
+
data: Array<QuizSessionListItem>;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque cursor for fetching the next page. Null when there are no more results.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof PaginatedQuizSessions
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the PaginatedQuizSessions interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfPaginatedQuizSessions(value: object): value is PaginatedQuizSessions;
|
|
36
|
+
export declare function PaginatedQuizSessionsFromJSON(json: any): PaginatedQuizSessions;
|
|
37
|
+
export declare function PaginatedQuizSessionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedQuizSessions;
|
|
38
|
+
export declare function PaginatedQuizSessionsToJSON(json: any): PaginatedQuizSessions;
|
|
39
|
+
export declare function PaginatedQuizSessionsToJSONTyped(value?: PaginatedQuizSessions | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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.instanceOfPaginatedQuizSessions = instanceOfPaginatedQuizSessions;
|
|
17
|
+
exports.PaginatedQuizSessionsFromJSON = PaginatedQuizSessionsFromJSON;
|
|
18
|
+
exports.PaginatedQuizSessionsFromJSONTyped = PaginatedQuizSessionsFromJSONTyped;
|
|
19
|
+
exports.PaginatedQuizSessionsToJSON = PaginatedQuizSessionsToJSON;
|
|
20
|
+
exports.PaginatedQuizSessionsToJSONTyped = PaginatedQuizSessionsToJSONTyped;
|
|
21
|
+
const QuizSessionListItem_1 = require("./QuizSessionListItem");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the PaginatedQuizSessions interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfPaginatedQuizSessions(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('nextCursor' in value) || value['nextCursor'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function PaginatedQuizSessionsFromJSON(json) {
|
|
33
|
+
return PaginatedQuizSessionsFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function PaginatedQuizSessionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': (json['data'].map(QuizSessionListItem_1.QuizSessionListItemFromJSON)),
|
|
41
|
+
'nextCursor': json['nextCursor'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function PaginatedQuizSessionsToJSON(json) {
|
|
45
|
+
return PaginatedQuizSessionsToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function PaginatedQuizSessionsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'data': (value['data'].map(QuizSessionListItem_1.QuizSessionListItemToJSON)),
|
|
53
|
+
'nextCursor': value['nextCursor'],
|
|
54
|
+
};
|
|
55
|
+
}
|