@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
package/README.md
CHANGED
|
@@ -104,6 +104,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
104
104
|
*PlansApi* | [**updatePlan**](docs/PlansApi.md#updateplan) | **PATCH** /api/v1/plans/{id} | Update a plan
|
|
105
105
|
*QuizSessionsApi* | [**createQuizSession**](docs/QuizSessionsApi.md#createquizsession) | **POST** /api/v1/quizzes/{quizId}/sessions | Create a quiz session
|
|
106
106
|
*QuizSessionsApi* | [**getQuizSessionSummary**](docs/QuizSessionsApi.md#getquizsessionsummary) | **GET** /api/v1/quiz-sessions/{sessionId}/summary | Get quiz session summary
|
|
107
|
+
*QuizSessionsApi* | [**listQuizSessions**](docs/QuizSessionsApi.md#listquizsessions) | **GET** /api/v1/quiz-sessions | List user quiz sessions
|
|
107
108
|
*QuizSessionsApi* | [**submitQuizResponse**](docs/QuizSessionsApi.md#submitquizresponseoperation) | **POST** /api/v1/quiz-sessions/{sessionId}/responses | Submit a quiz response
|
|
108
109
|
*QuizSessionsApi* | [**updateQuizSession**](docs/QuizSessionsApi.md#updatequizsessionoperation) | **PATCH** /api/v1/quiz-sessions/{sessionId} | Update quiz session status
|
|
109
110
|
*QuizzesApi* | [**getQuiz**](docs/QuizzesApi.md#getquiz) | **GET** /api/v1/quizzes/{quizId} | Get quiz with questions
|
|
@@ -146,6 +147,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
146
147
|
- [ChatRequest](docs/ChatRequest.md)
|
|
147
148
|
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
148
149
|
- [ChatRequestExternalFileUrl](docs/ChatRequestExternalFileUrl.md)
|
|
150
|
+
- [ChatRequestMessageMetadata](docs/ChatRequestMessageMetadata.md)
|
|
149
151
|
- [ChatRequestQuizContext](docs/ChatRequestQuizContext.md)
|
|
150
152
|
- [ChatRequestQuizContextAnswerState](docs/ChatRequestQuizContextAnswerState.md)
|
|
151
153
|
- [ChatRequestQuizContextCurrentQuestion](docs/ChatRequestQuizContextCurrentQuestion.md)
|
|
@@ -174,6 +176,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
174
176
|
- [PaginatedChats](docs/PaginatedChats.md)
|
|
175
177
|
- [PaginatedLearningMoments](docs/PaginatedLearningMoments.md)
|
|
176
178
|
- [PaginatedMessages](docs/PaginatedMessages.md)
|
|
179
|
+
- [PaginatedQuizSessions](docs/PaginatedQuizSessions.md)
|
|
177
180
|
- [PaginatedQuizzes](docs/PaginatedQuizzes.md)
|
|
178
181
|
- [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
|
|
179
182
|
- [Plan](docs/Plan.md)
|
|
@@ -182,6 +185,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
182
185
|
- [QuizQuestion](docs/QuizQuestion.md)
|
|
183
186
|
- [QuizResponse](docs/QuizResponse.md)
|
|
184
187
|
- [QuizSession](docs/QuizSession.md)
|
|
188
|
+
- [QuizSessionListItem](docs/QuizSessionListItem.md)
|
|
189
|
+
- [QuizSessionScore](docs/QuizSessionScore.md)
|
|
185
190
|
- [QuizSessionSummary](docs/QuizSessionSummary.md)
|
|
186
191
|
- [QuizWithQuestions](docs/QuizWithQuestions.md)
|
|
187
192
|
- [Score](docs/Score.md)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { QuizResponse, QuizSession, QuizSessionSummary, SubmitQuizResponseRequest, UpdateQuizSessionRequest } from '../models/index';
|
|
13
|
+
import type { PaginatedQuizSessions, QuizResponse, QuizSession, QuizSessionSummary, SubmitQuizResponseRequest, UpdateQuizSessionRequest } from '../models/index';
|
|
14
14
|
export interface CreateQuizSessionRequest {
|
|
15
15
|
quizId: string;
|
|
16
16
|
xUserId: string;
|
|
@@ -19,6 +19,13 @@ export interface GetQuizSessionSummaryRequest {
|
|
|
19
19
|
sessionId: string;
|
|
20
20
|
xUserId: string;
|
|
21
21
|
}
|
|
22
|
+
export interface ListQuizSessionsRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
limit?: number;
|
|
25
|
+
cursor?: string;
|
|
26
|
+
mode?: ListQuizSessionsModeEnum;
|
|
27
|
+
status?: ListQuizSessionsStatusEnum;
|
|
28
|
+
}
|
|
22
29
|
export interface SubmitQuizResponseOperationRequest {
|
|
23
30
|
sessionId: string;
|
|
24
31
|
xUserId: string;
|
|
@@ -53,6 +60,16 @@ export declare class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
53
60
|
* Get quiz session summary
|
|
54
61
|
*/
|
|
55
62
|
getQuizSessionSummary(requestParameters: GetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSessionSummary>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
65
|
+
* List user quiz sessions
|
|
66
|
+
*/
|
|
67
|
+
listQuizSessionsRaw(requestParameters: ListQuizSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedQuizSessions>>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
70
|
+
* List user quiz sessions
|
|
71
|
+
*/
|
|
72
|
+
listQuizSessions(requestParameters: ListQuizSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizSessions>;
|
|
56
73
|
/**
|
|
57
74
|
* Submits an answer for a question within a quiz session.
|
|
58
75
|
* Submit a quiz response
|
|
@@ -74,3 +91,20 @@ export declare class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
74
91
|
*/
|
|
75
92
|
updateQuizSession(requestParameters: UpdateQuizSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSession>;
|
|
76
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* @export
|
|
96
|
+
*/
|
|
97
|
+
export declare const ListQuizSessionsModeEnum: {
|
|
98
|
+
readonly Quiz: "quiz";
|
|
99
|
+
readonly Flashcards: "flashcards";
|
|
100
|
+
};
|
|
101
|
+
export type ListQuizSessionsModeEnum = typeof ListQuizSessionsModeEnum[keyof typeof ListQuizSessionsModeEnum];
|
|
102
|
+
/**
|
|
103
|
+
* @export
|
|
104
|
+
*/
|
|
105
|
+
export declare const ListQuizSessionsStatusEnum: {
|
|
106
|
+
readonly Active: "active";
|
|
107
|
+
readonly Completed: "completed";
|
|
108
|
+
readonly Abandoned: "abandoned";
|
|
109
|
+
};
|
|
110
|
+
export type ListQuizSessionsStatusEnum = typeof ListQuizSessionsStatusEnum[keyof typeof ListQuizSessionsStatusEnum];
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.QuizSessionsApi = void 0;
|
|
25
|
+
exports.ListQuizSessionsStatusEnum = exports.ListQuizSessionsModeEnum = exports.QuizSessionsApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -111,6 +111,55 @@ class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
111
111
|
return yield response.value();
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
116
|
+
* List user quiz sessions
|
|
117
|
+
*/
|
|
118
|
+
listQuizSessionsRaw(requestParameters, initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
if (requestParameters['xUserId'] == null) {
|
|
121
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listQuizSessions().');
|
|
122
|
+
}
|
|
123
|
+
const queryParameters = {};
|
|
124
|
+
if (requestParameters['limit'] != null) {
|
|
125
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
126
|
+
}
|
|
127
|
+
if (requestParameters['cursor'] != null) {
|
|
128
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
129
|
+
}
|
|
130
|
+
if (requestParameters['mode'] != null) {
|
|
131
|
+
queryParameters['mode'] = requestParameters['mode'];
|
|
132
|
+
}
|
|
133
|
+
if (requestParameters['status'] != null) {
|
|
134
|
+
queryParameters['status'] = requestParameters['status'];
|
|
135
|
+
}
|
|
136
|
+
const headerParameters = {};
|
|
137
|
+
if (requestParameters['xUserId'] != null) {
|
|
138
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
139
|
+
}
|
|
140
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
141
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
142
|
+
}
|
|
143
|
+
let urlPath = `/api/v1/quiz-sessions`;
|
|
144
|
+
const response = yield this.request({
|
|
145
|
+
path: urlPath,
|
|
146
|
+
method: 'GET',
|
|
147
|
+
headers: headerParameters,
|
|
148
|
+
query: queryParameters,
|
|
149
|
+
}, initOverrides);
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedQuizSessionsFromJSON)(jsonValue));
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
155
|
+
* List user quiz sessions
|
|
156
|
+
*/
|
|
157
|
+
listQuizSessions(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const response = yield this.listQuizSessionsRaw(requestParameters, initOverrides);
|
|
160
|
+
return yield response.value();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
114
163
|
/**
|
|
115
164
|
* Submits an answer for a question within a quiz session.
|
|
116
165
|
* Submit a quiz response
|
|
@@ -205,3 +254,18 @@ class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
205
254
|
}
|
|
206
255
|
}
|
|
207
256
|
exports.QuizSessionsApi = QuizSessionsApi;
|
|
257
|
+
/**
|
|
258
|
+
* @export
|
|
259
|
+
*/
|
|
260
|
+
exports.ListQuizSessionsModeEnum = {
|
|
261
|
+
Quiz: 'quiz',
|
|
262
|
+
Flashcards: 'flashcards'
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* @export
|
|
266
|
+
*/
|
|
267
|
+
exports.ListQuizSessionsStatusEnum = {
|
|
268
|
+
Active: 'active',
|
|
269
|
+
Completed: 'completed',
|
|
270
|
+
Abandoned: 'abandoned'
|
|
271
|
+
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { QuizResponse, QuizSession, QuizSessionSummary, SubmitQuizResponseRequest, UpdateQuizSessionRequest } from '../models/index';
|
|
13
|
+
import type { PaginatedQuizSessions, QuizResponse, QuizSession, QuizSessionSummary, SubmitQuizResponseRequest, UpdateQuizSessionRequest } from '../models/index';
|
|
14
14
|
export interface CreateQuizSessionRequest {
|
|
15
15
|
quizId: string;
|
|
16
16
|
xUserId: string;
|
|
@@ -19,6 +19,13 @@ export interface GetQuizSessionSummaryRequest {
|
|
|
19
19
|
sessionId: string;
|
|
20
20
|
xUserId: string;
|
|
21
21
|
}
|
|
22
|
+
export interface ListQuizSessionsRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
limit?: number;
|
|
25
|
+
cursor?: string;
|
|
26
|
+
mode?: ListQuizSessionsModeEnum;
|
|
27
|
+
status?: ListQuizSessionsStatusEnum;
|
|
28
|
+
}
|
|
22
29
|
export interface SubmitQuizResponseOperationRequest {
|
|
23
30
|
sessionId: string;
|
|
24
31
|
xUserId: string;
|
|
@@ -53,6 +60,16 @@ export declare class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
53
60
|
* Get quiz session summary
|
|
54
61
|
*/
|
|
55
62
|
getQuizSessionSummary(requestParameters: GetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSessionSummary>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
65
|
+
* List user quiz sessions
|
|
66
|
+
*/
|
|
67
|
+
listQuizSessionsRaw(requestParameters: ListQuizSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedQuizSessions>>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
70
|
+
* List user quiz sessions
|
|
71
|
+
*/
|
|
72
|
+
listQuizSessions(requestParameters: ListQuizSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizSessions>;
|
|
56
73
|
/**
|
|
57
74
|
* Submits an answer for a question within a quiz session.
|
|
58
75
|
* Submit a quiz response
|
|
@@ -74,3 +91,20 @@ export declare class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
74
91
|
*/
|
|
75
92
|
updateQuizSession(requestParameters: UpdateQuizSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSession>;
|
|
76
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* @export
|
|
96
|
+
*/
|
|
97
|
+
export declare const ListQuizSessionsModeEnum: {
|
|
98
|
+
readonly Quiz: "quiz";
|
|
99
|
+
readonly Flashcards: "flashcards";
|
|
100
|
+
};
|
|
101
|
+
export type ListQuizSessionsModeEnum = typeof ListQuizSessionsModeEnum[keyof typeof ListQuizSessionsModeEnum];
|
|
102
|
+
/**
|
|
103
|
+
* @export
|
|
104
|
+
*/
|
|
105
|
+
export declare const ListQuizSessionsStatusEnum: {
|
|
106
|
+
readonly Active: "active";
|
|
107
|
+
readonly Completed: "completed";
|
|
108
|
+
readonly Abandoned: "abandoned";
|
|
109
|
+
};
|
|
110
|
+
export type ListQuizSessionsStatusEnum = typeof ListQuizSessionsStatusEnum[keyof typeof ListQuizSessionsStatusEnum];
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { QuizResponseFromJSON, QuizSessionFromJSON, QuizSessionSummaryFromJSON, SubmitQuizResponseRequestToJSON, UpdateQuizSessionRequestToJSON, } from '../models/index';
|
|
24
|
+
import { PaginatedQuizSessionsFromJSON, QuizResponseFromJSON, QuizSessionFromJSON, QuizSessionSummaryFromJSON, SubmitQuizResponseRequestToJSON, UpdateQuizSessionRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -108,6 +108,55 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
108
108
|
return yield response.value();
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
113
|
+
* List user quiz sessions
|
|
114
|
+
*/
|
|
115
|
+
listQuizSessionsRaw(requestParameters, initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
if (requestParameters['xUserId'] == null) {
|
|
118
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listQuizSessions().');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
if (requestParameters['limit'] != null) {
|
|
122
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
123
|
+
}
|
|
124
|
+
if (requestParameters['cursor'] != null) {
|
|
125
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
126
|
+
}
|
|
127
|
+
if (requestParameters['mode'] != null) {
|
|
128
|
+
queryParameters['mode'] = requestParameters['mode'];
|
|
129
|
+
}
|
|
130
|
+
if (requestParameters['status'] != null) {
|
|
131
|
+
queryParameters['status'] = requestParameters['status'];
|
|
132
|
+
}
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
if (requestParameters['xUserId'] != null) {
|
|
135
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
136
|
+
}
|
|
137
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
138
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
139
|
+
}
|
|
140
|
+
let urlPath = `/api/v1/quiz-sessions`;
|
|
141
|
+
const response = yield this.request({
|
|
142
|
+
path: urlPath,
|
|
143
|
+
method: 'GET',
|
|
144
|
+
headers: headerParameters,
|
|
145
|
+
query: queryParameters,
|
|
146
|
+
}, initOverrides);
|
|
147
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedQuizSessionsFromJSON(jsonValue));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Returns a paginated list of quiz sessions owned by the authenticated user, ordered by start date (newest first), with embedded quiz info and score summary.
|
|
152
|
+
* List user quiz sessions
|
|
153
|
+
*/
|
|
154
|
+
listQuizSessions(requestParameters, initOverrides) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
const response = yield this.listQuizSessionsRaw(requestParameters, initOverrides);
|
|
157
|
+
return yield response.value();
|
|
158
|
+
});
|
|
159
|
+
}
|
|
111
160
|
/**
|
|
112
161
|
* Submits an answer for a question within a quiz session.
|
|
113
162
|
* Submit a quiz response
|
|
@@ -201,3 +250,18 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
201
250
|
});
|
|
202
251
|
}
|
|
203
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* @export
|
|
255
|
+
*/
|
|
256
|
+
export const ListQuizSessionsModeEnum = {
|
|
257
|
+
Quiz: 'quiz',
|
|
258
|
+
Flashcards: 'flashcards'
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* @export
|
|
262
|
+
*/
|
|
263
|
+
export const ListQuizSessionsStatusEnum = {
|
|
264
|
+
Active: 'active',
|
|
265
|
+
Completed: 'completed',
|
|
266
|
+
Abandoned: 'abandoned'
|
|
267
|
+
};
|
|
@@ -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
|
}
|
|
@@ -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,48 @@
|
|
|
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 { QuizSessionListItemFromJSON, QuizSessionListItemToJSON, } from './QuizSessionListItem';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedQuizSessions interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedQuizSessions(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('nextCursor' in value) || value['nextCursor'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function PaginatedQuizSessionsFromJSON(json) {
|
|
26
|
+
return PaginatedQuizSessionsFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function PaginatedQuizSessionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(QuizSessionListItemFromJSON)),
|
|
34
|
+
'nextCursor': json['nextCursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function PaginatedQuizSessionsToJSON(json) {
|
|
38
|
+
return PaginatedQuizSessionsToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function PaginatedQuizSessionsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(QuizSessionListItemToJSON)),
|
|
46
|
+
'nextCursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|