@instructure/athena-api-client 2.13.0 → 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 +1 -0
- 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/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -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/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
147
147
|
- [ChatRequest](docs/ChatRequest.md)
|
|
148
148
|
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
149
149
|
- [ChatRequestExternalFileUrl](docs/ChatRequestExternalFileUrl.md)
|
|
150
|
+
- [ChatRequestMessageMetadata](docs/ChatRequestMessageMetadata.md)
|
|
150
151
|
- [ChatRequestQuizContext](docs/ChatRequestQuizContext.md)
|
|
151
152
|
- [ChatRequestQuizContextAnswerState](docs/ChatRequestQuizContextAnswerState.md)
|
|
152
153
|
- [ChatRequestQuizContextCurrentQuestion](docs/ChatRequestQuizContextCurrentQuestion.md)
|
|
@@ -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
|
*/
|
|
@@ -12,8 +12,17 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ChatRequestExternalFileUrlFromJSON, ChatRequestExternalFileUrlToJSON, } from './ChatRequestExternalFileUrl';
|
|
15
|
+
import { ChatRequestMessageMetadataFromJSON, ChatRequestMessageMetadataToJSON, } from './ChatRequestMessageMetadata';
|
|
15
16
|
import { ChatRequestAttachmentsInnerFromJSON, ChatRequestAttachmentsInnerToJSON, } from './ChatRequestAttachmentsInner';
|
|
16
17
|
import { ChatRequestQuizContextFromJSON, ChatRequestQuizContextToJSON, } from './ChatRequestQuizContext';
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
export const ChatRequestTriggerEnum = {
|
|
22
|
+
LevelUpInitiate: 'level-up-initiate',
|
|
23
|
+
QuickPracticeInitiate: 'quick-practice-initiate',
|
|
24
|
+
LevelUpResume: 'level-up-resume'
|
|
25
|
+
};
|
|
17
26
|
/**
|
|
18
27
|
* Check if a given object implements the ChatRequest interface.
|
|
19
28
|
*/
|
|
@@ -39,6 +48,8 @@ export function ChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
48
|
'externalFileUrl': json['externalFileUrl'] == null ? undefined : ChatRequestExternalFileUrlFromJSON(json['externalFileUrl']),
|
|
40
49
|
'quizContext': json['quizContext'] == null ? undefined : ChatRequestQuizContextFromJSON(json['quizContext']),
|
|
41
50
|
'taxonomyId': json['taxonomyId'] == null ? undefined : json['taxonomyId'],
|
|
51
|
+
'trigger': json['trigger'] == null ? undefined : json['trigger'],
|
|
52
|
+
'messageMetadata': json['messageMetadata'] == null ? undefined : ChatRequestMessageMetadataFromJSON(json['messageMetadata']),
|
|
42
53
|
};
|
|
43
54
|
}
|
|
44
55
|
export function ChatRequestToJSON(json) {
|
|
@@ -56,5 +67,7 @@ export function ChatRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
56
67
|
'externalFileUrl': ChatRequestExternalFileUrlToJSON(value['externalFileUrl']),
|
|
57
68
|
'quizContext': ChatRequestQuizContextToJSON(value['quizContext']),
|
|
58
69
|
'taxonomyId': value['taxonomyId'],
|
|
70
|
+
'trigger': value['trigger'],
|
|
71
|
+
'messageMetadata': ChatRequestMessageMetadataToJSON(value['messageMetadata']),
|
|
59
72
|
};
|
|
60
73
|
}
|
|
@@ -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,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 ChatRequestMessageMetadata interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfChatRequestMessageMetadata(value) {
|
|
18
|
+
if (!('inlineQuestionId' in value) || value['inlineQuestionId'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function ChatRequestMessageMetadataFromJSON(json) {
|
|
23
|
+
return ChatRequestMessageMetadataFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ChatRequestMessageMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'inlineQuestionId': json['inlineQuestionId'],
|
|
31
|
+
'questionType': json['questionType'] == null ? undefined : json['questionType'],
|
|
32
|
+
'structuredAnswer': json['structuredAnswer'] == null ? undefined : json['structuredAnswer'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function ChatRequestMessageMetadataToJSON(json) {
|
|
36
|
+
return ChatRequestMessageMetadataToJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function ChatRequestMessageMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'inlineQuestionId': value['inlineQuestionId'],
|
|
44
|
+
'questionType': value['questionType'],
|
|
45
|
+
'structuredAnswer': value['structuredAnswer'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -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
|
|
@@ -36,6 +36,8 @@ export function CreateChatRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'title': json['title'] == null ? undefined : json['title'],
|
|
37
37
|
'chatType': json['chatType'] == null ? undefined : json['chatType'],
|
|
38
38
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
39
|
+
'primaryConceptId': json['primaryConceptId'] == null ? undefined : json['primaryConceptId'],
|
|
40
|
+
'initialStrength': json['initialStrength'] == null ? undefined : json['initialStrength'],
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
export function CreateChatRequestToJSON(json) {
|
|
@@ -50,5 +52,7 @@ export function CreateChatRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
50
52
|
'title': value['title'],
|
|
51
53
|
'chatType': value['chatType'],
|
|
52
54
|
'visibility': value['visibility'],
|
|
55
|
+
'primaryConceptId': value['primaryConceptId'],
|
|
56
|
+
'initialStrength': value['initialStrength'],
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -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';
|
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';
|
|
@@ -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
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./ChatAnalysis"), exports);
|
|
|
33
33
|
__exportStar(require("./ChatRequest"), exports);
|
|
34
34
|
__exportStar(require("./ChatRequestAttachmentsInner"), exports);
|
|
35
35
|
__exportStar(require("./ChatRequestExternalFileUrl"), exports);
|
|
36
|
+
__exportStar(require("./ChatRequestMessageMetadata"), exports);
|
|
36
37
|
__exportStar(require("./ChatRequestQuizContext"), exports);
|
|
37
38
|
__exportStar(require("./ChatRequestQuizContextAnswerState"), exports);
|
|
38
39
|
__exportStar(require("./ChatRequestQuizContextCurrentQuestion"), exports);
|