@instructure/athena-api-client 2.26.0 → 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +6 -0
  2. package/dist/apis/PracticeQuizzesApi.d.ts +56 -0
  3. package/dist/apis/PracticeQuizzesApi.js +134 -0
  4. package/dist/apis/index.d.ts +1 -0
  5. package/dist/apis/index.js +1 -0
  6. package/dist/esm/apis/PracticeQuizzesApi.d.ts +56 -0
  7. package/dist/esm/apis/PracticeQuizzesApi.js +130 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +1 -0
  10. package/dist/esm/models/CreateChatRequest.d.ts +6 -0
  11. package/dist/esm/models/CreateChatRequest.js +2 -0
  12. package/dist/esm/models/CreatePracticeQuizRequest.d.ts +58 -0
  13. package/dist/esm/models/CreatePracticeQuizRequest.js +60 -0
  14. package/dist/esm/models/PracticeQuiz.d.ts +38 -0
  15. package/dist/esm/models/PracticeQuiz.js +47 -0
  16. package/dist/esm/models/PracticeQuizStatus.d.ts +67 -0
  17. package/dist/esm/models/PracticeQuizStatus.js +70 -0
  18. package/dist/esm/models/PracticeQuizStatusList.d.ts +33 -0
  19. package/dist/esm/models/PracticeQuizStatusList.js +44 -0
  20. package/dist/esm/models/index.d.ts +4 -0
  21. package/dist/esm/models/index.js +4 -0
  22. package/dist/models/CreateChatRequest.d.ts +6 -0
  23. package/dist/models/CreateChatRequest.js +2 -0
  24. package/dist/models/CreatePracticeQuizRequest.d.ts +58 -0
  25. package/dist/models/CreatePracticeQuizRequest.js +68 -0
  26. package/dist/models/PracticeQuiz.d.ts +38 -0
  27. package/dist/models/PracticeQuiz.js +54 -0
  28. package/dist/models/PracticeQuizStatus.d.ts +67 -0
  29. package/dist/models/PracticeQuizStatus.js +78 -0
  30. package/dist/models/PracticeQuizStatusList.d.ts +33 -0
  31. package/dist/models/PracticeQuizStatusList.js +51 -0
  32. package/dist/models/index.d.ts +4 -0
  33. package/dist/models/index.js +4 -0
  34. package/package.json +1 -1
package/README.md CHANGED
@@ -106,6 +106,8 @@ All URIs are relative to *http://localhost:3000*
106
106
  *PlansApi* | [**getPlan**](docs/PlansApi.md#getplan) | **GET** /api/v1/plans/{id} | Get plan by ID
107
107
  *PlansApi* | [**listPlans**](docs/PlansApi.md#listplans) | **GET** /api/v1/plans | List all plans
108
108
  *PlansApi* | [**updatePlan**](docs/PlansApi.md#updateplan) | **PATCH** /api/v1/plans/{id} | Update a plan
109
+ *PracticeQuizzesApi* | [**createPracticeQuiz**](docs/PracticeQuizzesApi.md#createpracticequizoperation) | **POST** /api/v1/practice-quizzes | Find or create a practice-quiz slot
110
+ *PracticeQuizzesApi* | [**listPracticeQuizzes**](docs/PracticeQuizzesApi.md#listpracticequizzes) | **GET** /api/v1/practice-quizzes | List practice-quiz slots for a course
109
111
  *QuizSessionsApi* | [**createQuizSession**](docs/QuizSessionsApi.md#createquizsession) | **POST** /api/v1/quizzes/{quizId}/sessions | Create a quiz session
110
112
  *QuizSessionsApi* | [**getQuizSessionSummary**](docs/QuizSessionsApi.md#getquizsessionsummary) | **GET** /api/v1/quiz-sessions/{sessionId}/summary | Get quiz session summary
111
113
  *QuizSessionsApi* | [**listQuizSessions**](docs/QuizSessionsApi.md#listquizsessions) | **GET** /api/v1/quiz-sessions | List user quiz sessions
@@ -178,6 +180,7 @@ All URIs are relative to *http://localhost:3000*
178
180
  - [CreateMessagesRequestMessagesInner](docs/CreateMessagesRequestMessagesInner.md)
179
181
  - [CreateMessagesResponse](docs/CreateMessagesResponse.md)
180
182
  - [CreatePlanDto](docs/CreatePlanDto.md)
183
+ - [CreatePracticeQuizRequest](docs/CreatePracticeQuizRequest.md)
181
184
  - [CreateTokenRequest](docs/CreateTokenRequest.md)
182
185
  - [CreateTokenResponse](docs/CreateTokenResponse.md)
183
186
  - [DailyQuizStatus](docs/DailyQuizStatus.md)
@@ -203,6 +206,9 @@ All URIs are relative to *http://localhost:3000*
203
206
  - [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
204
207
  - [PaginatedUserConcepts](docs/PaginatedUserConcepts.md)
205
208
  - [Plan](docs/Plan.md)
209
+ - [PracticeQuiz](docs/PracticeQuiz.md)
210
+ - [PracticeQuizStatus](docs/PracticeQuizStatus.md)
211
+ - [PracticeQuizStatusList](docs/PracticeQuizStatusList.md)
206
212
  - [Quiz](docs/Quiz.md)
207
213
  - [QuizListItem](docs/QuizListItem.md)
208
214
  - [QuizQuestion](docs/QuizQuestion.md)
@@ -0,0 +1,56 @@
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 * as runtime from '../runtime';
13
+ import type { CreatePracticeQuizRequest, PracticeQuiz, PracticeQuizStatusList } from '../models/index';
14
+ export interface CreatePracticeQuizOperationRequest {
15
+ xUserId: string;
16
+ createPracticeQuizRequest: CreatePracticeQuizRequest;
17
+ }
18
+ export interface ListPracticeQuizzesRequest {
19
+ globalCourseId: string;
20
+ canvasObjectIds: Array<string>;
21
+ xUserId: string;
22
+ modes?: Array<ListPracticeQuizzesModesEnum>;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class PracticeQuizzesApi extends runtime.BaseAPI {
28
+ /**
29
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
30
+ * Find or create a practice-quiz slot
31
+ */
32
+ createPracticeQuizRaw(requestParameters: CreatePracticeQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PracticeQuiz>>;
33
+ /**
34
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
35
+ * Find or create a practice-quiz slot
36
+ */
37
+ createPracticeQuiz(requestParameters: CreatePracticeQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PracticeQuiz>;
38
+ /**
39
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
40
+ * List practice-quiz slots for a course
41
+ */
42
+ listPracticeQuizzesRaw(requestParameters: ListPracticeQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PracticeQuizStatusList>>;
43
+ /**
44
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
45
+ * List practice-quiz slots for a course
46
+ */
47
+ listPracticeQuizzes(requestParameters: ListPracticeQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PracticeQuizStatusList>;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ListPracticeQuizzesModesEnum: {
53
+ readonly Quiz: "quiz";
54
+ readonly Flashcards: "flashcards";
55
+ };
56
+ export type ListPracticeQuizzesModesEnum = typeof ListPracticeQuizzesModesEnum[keyof typeof ListPracticeQuizzesModesEnum];
@@ -0,0 +1,134 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ListPracticeQuizzesModesEnum = exports.PracticeQuizzesApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class PracticeQuizzesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
34
+ * Find or create a practice-quiz slot
35
+ */
36
+ createPracticeQuizRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createPracticeQuiz().');
40
+ }
41
+ if (requestParameters['createPracticeQuizRequest'] == null) {
42
+ throw new runtime.RequiredError('createPracticeQuizRequest', 'Required parameter "createPracticeQuizRequest" was null or undefined when calling createPracticeQuiz().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ headerParameters['Content-Type'] = 'application/json';
47
+ if (requestParameters['xUserId'] != null) {
48
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
49
+ }
50
+ if (this.configuration && this.configuration.apiKey) {
51
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
52
+ }
53
+ let urlPath = `/api/v1/practice-quizzes`;
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ body: (0, index_1.CreatePracticeQuizRequestToJSON)(requestParameters['createPracticeQuizRequest']),
60
+ }, initOverrides);
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PracticeQuizFromJSON)(jsonValue));
62
+ });
63
+ }
64
+ /**
65
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
66
+ * Find or create a practice-quiz slot
67
+ */
68
+ createPracticeQuiz(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const response = yield this.createPracticeQuizRaw(requestParameters, initOverrides);
71
+ return yield response.value();
72
+ });
73
+ }
74
+ /**
75
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
76
+ * List practice-quiz slots for a course
77
+ */
78
+ listPracticeQuizzesRaw(requestParameters, initOverrides) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ if (requestParameters['globalCourseId'] == null) {
81
+ throw new runtime.RequiredError('globalCourseId', 'Required parameter "globalCourseId" was null or undefined when calling listPracticeQuizzes().');
82
+ }
83
+ if (requestParameters['canvasObjectIds'] == null) {
84
+ throw new runtime.RequiredError('canvasObjectIds', 'Required parameter "canvasObjectIds" was null or undefined when calling listPracticeQuizzes().');
85
+ }
86
+ if (requestParameters['xUserId'] == null) {
87
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listPracticeQuizzes().');
88
+ }
89
+ const queryParameters = {};
90
+ if (requestParameters['globalCourseId'] != null) {
91
+ queryParameters['globalCourseId'] = requestParameters['globalCourseId'];
92
+ }
93
+ if (requestParameters['canvasObjectIds'] != null) {
94
+ queryParameters['canvasObjectIds'] = requestParameters['canvasObjectIds'];
95
+ }
96
+ if (requestParameters['modes'] != null) {
97
+ queryParameters['modes'] = requestParameters['modes'];
98
+ }
99
+ const headerParameters = {};
100
+ if (requestParameters['xUserId'] != null) {
101
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
102
+ }
103
+ if (this.configuration && this.configuration.apiKey) {
104
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
105
+ }
106
+ let urlPath = `/api/v1/practice-quizzes`;
107
+ const response = yield this.request({
108
+ path: urlPath,
109
+ method: 'GET',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ }, initOverrides);
113
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PracticeQuizStatusListFromJSON)(jsonValue));
114
+ });
115
+ }
116
+ /**
117
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
118
+ * List practice-quiz slots for a course
119
+ */
120
+ listPracticeQuizzes(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const response = yield this.listPracticeQuizzesRaw(requestParameters, initOverrides);
123
+ return yield response.value();
124
+ });
125
+ }
126
+ }
127
+ exports.PracticeQuizzesApi = PracticeQuizzesApi;
128
+ /**
129
+ * @export
130
+ */
131
+ exports.ListPracticeQuizzesModesEnum = {
132
+ Quiz: 'quiz',
133
+ Flashcards: 'flashcards'
134
+ };
@@ -14,6 +14,7 @@ export * from './LearningSessionEvaluationsApi';
14
14
  export * from './LearningStreakApi';
15
15
  export * from './MessagesApi';
16
16
  export * from './PlansApi';
17
+ export * from './PracticeQuizzesApi';
17
18
  export * from './QuizSessionsApi';
18
19
  export * from './QuizzesApi';
19
20
  export * from './ServiceTokensApi';
@@ -32,6 +32,7 @@ __exportStar(require("./LearningSessionEvaluationsApi"), exports);
32
32
  __exportStar(require("./LearningStreakApi"), exports);
33
33
  __exportStar(require("./MessagesApi"), exports);
34
34
  __exportStar(require("./PlansApi"), exports);
35
+ __exportStar(require("./PracticeQuizzesApi"), exports);
35
36
  __exportStar(require("./QuizSessionsApi"), exports);
36
37
  __exportStar(require("./QuizzesApi"), exports);
37
38
  __exportStar(require("./ServiceTokensApi"), exports);
@@ -0,0 +1,56 @@
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 * as runtime from '../runtime';
13
+ import type { CreatePracticeQuizRequest, PracticeQuiz, PracticeQuizStatusList } from '../models/index';
14
+ export interface CreatePracticeQuizOperationRequest {
15
+ xUserId: string;
16
+ createPracticeQuizRequest: CreatePracticeQuizRequest;
17
+ }
18
+ export interface ListPracticeQuizzesRequest {
19
+ globalCourseId: string;
20
+ canvasObjectIds: Array<string>;
21
+ xUserId: string;
22
+ modes?: Array<ListPracticeQuizzesModesEnum>;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class PracticeQuizzesApi extends runtime.BaseAPI {
28
+ /**
29
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
30
+ * Find or create a practice-quiz slot
31
+ */
32
+ createPracticeQuizRaw(requestParameters: CreatePracticeQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PracticeQuiz>>;
33
+ /**
34
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
35
+ * Find or create a practice-quiz slot
36
+ */
37
+ createPracticeQuiz(requestParameters: CreatePracticeQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PracticeQuiz>;
38
+ /**
39
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
40
+ * List practice-quiz slots for a course
41
+ */
42
+ listPracticeQuizzesRaw(requestParameters: ListPracticeQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PracticeQuizStatusList>>;
43
+ /**
44
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
45
+ * List practice-quiz slots for a course
46
+ */
47
+ listPracticeQuizzes(requestParameters: ListPracticeQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PracticeQuizStatusList>;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ListPracticeQuizzesModesEnum: {
53
+ readonly Quiz: "quiz";
54
+ readonly Flashcards: "flashcards";
55
+ };
56
+ export type ListPracticeQuizzesModesEnum = typeof ListPracticeQuizzesModesEnum[keyof typeof ListPracticeQuizzesModesEnum];
@@ -0,0 +1,130 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CreatePracticeQuizRequestToJSON, PracticeQuizFromJSON, PracticeQuizStatusListFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class PracticeQuizzesApi extends runtime.BaseAPI {
29
+ /**
30
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
31
+ * Find or create a practice-quiz slot
32
+ */
33
+ createPracticeQuizRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['xUserId'] == null) {
36
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createPracticeQuiz().');
37
+ }
38
+ if (requestParameters['createPracticeQuizRequest'] == null) {
39
+ throw new runtime.RequiredError('createPracticeQuizRequest', 'Required parameter "createPracticeQuizRequest" was null or undefined when calling createPracticeQuiz().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ if (requestParameters['xUserId'] != null) {
45
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
46
+ }
47
+ if (this.configuration && this.configuration.apiKey) {
48
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
49
+ }
50
+ let urlPath = `/api/v1/practice-quizzes`;
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: CreatePracticeQuizRequestToJSON(requestParameters['createPracticeQuizRequest']),
57
+ }, initOverrides);
58
+ return new runtime.JSONApiResponse(response, (jsonValue) => PracticeQuizFromJSON(jsonValue));
59
+ });
60
+ }
61
+ /**
62
+ * Atomically finds the existing chat for (globalCourseId, canvasObjectId, mode) or creates a new one with chatType=\'practice-quiz\'. When forceNew=true, abandons the existing association and creates a fresh chat; the old chat remains in the learner\'s history.
63
+ * Find or create a practice-quiz slot
64
+ */
65
+ createPracticeQuiz(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const response = yield this.createPracticeQuizRaw(requestParameters, initOverrides);
68
+ return yield response.value();
69
+ });
70
+ }
71
+ /**
72
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
73
+ * List practice-quiz slots for a course
74
+ */
75
+ listPracticeQuizzesRaw(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ if (requestParameters['globalCourseId'] == null) {
78
+ throw new runtime.RequiredError('globalCourseId', 'Required parameter "globalCourseId" was null or undefined when calling listPracticeQuizzes().');
79
+ }
80
+ if (requestParameters['canvasObjectIds'] == null) {
81
+ throw new runtime.RequiredError('canvasObjectIds', 'Required parameter "canvasObjectIds" was null or undefined when calling listPracticeQuizzes().');
82
+ }
83
+ if (requestParameters['xUserId'] == null) {
84
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listPracticeQuizzes().');
85
+ }
86
+ const queryParameters = {};
87
+ if (requestParameters['globalCourseId'] != null) {
88
+ queryParameters['globalCourseId'] = requestParameters['globalCourseId'];
89
+ }
90
+ if (requestParameters['canvasObjectIds'] != null) {
91
+ queryParameters['canvasObjectIds'] = requestParameters['canvasObjectIds'];
92
+ }
93
+ if (requestParameters['modes'] != null) {
94
+ queryParameters['modes'] = requestParameters['modes'];
95
+ }
96
+ const headerParameters = {};
97
+ if (requestParameters['xUserId'] != null) {
98
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
99
+ }
100
+ if (this.configuration && this.configuration.apiKey) {
101
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
102
+ }
103
+ let urlPath = `/api/v1/practice-quizzes`;
104
+ const response = yield this.request({
105
+ path: urlPath,
106
+ method: 'GET',
107
+ headers: headerParameters,
108
+ query: queryParameters,
109
+ }, initOverrides);
110
+ return new runtime.JSONApiResponse(response, (jsonValue) => PracticeQuizStatusListFromJSON(jsonValue));
111
+ });
112
+ }
113
+ /**
114
+ * Batch lookup of practice-quiz associations within a single Canvas course. Returns one entry per requested (canvasObjectId, mode) pair, including null entries when no row exists yet.
115
+ * List practice-quiz slots for a course
116
+ */
117
+ listPracticeQuizzes(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const response = yield this.listPracticeQuizzesRaw(requestParameters, initOverrides);
120
+ return yield response.value();
121
+ });
122
+ }
123
+ }
124
+ /**
125
+ * @export
126
+ */
127
+ export const ListPracticeQuizzesModesEnum = {
128
+ Quiz: 'quiz',
129
+ Flashcards: 'flashcards'
130
+ };
@@ -14,6 +14,7 @@ export * from './LearningSessionEvaluationsApi';
14
14
  export * from './LearningStreakApi';
15
15
  export * from './MessagesApi';
16
16
  export * from './PlansApi';
17
+ export * from './PracticeQuizzesApi';
17
18
  export * from './QuizSessionsApi';
18
19
  export * from './QuizzesApi';
19
20
  export * from './ServiceTokensApi';
@@ -16,6 +16,7 @@ export * from './LearningSessionEvaluationsApi';
16
16
  export * from './LearningStreakApi';
17
17
  export * from './MessagesApi';
18
18
  export * from './PlansApi';
19
+ export * from './PracticeQuizzesApi';
19
20
  export * from './QuizSessionsApi';
20
21
  export * from './QuizzesApi';
21
22
  export * from './ServiceTokensApi';
@@ -51,6 +51,12 @@ export interface CreateChatRequest {
51
51
  * @memberof CreateChatRequest
52
52
  */
53
53
  initialStrength?: number;
54
+ /**
55
+ * Optional study guide (taxonomy) this chat is scoped to. Persists on `chats.taxonomyId` for any chatType — the existing AI tooling (`getTaxonomy` + `getUserTaxonomyProgress` tool registration, study-guide-scoped system prompt) keys off the row regardless of chatType. The level-up prompt additionally injects the study guide name + description as anchoring context in the prompt body. Caller must be actively enrolled in the supplied taxonomy or the request is rejected with 403, matching the message-stream path's enrollment check.
56
+ * @type {string}
57
+ * @memberof CreateChatRequest
58
+ */
59
+ taxonomyId?: string;
54
60
  }
55
61
  /**
56
62
  * @export
@@ -38,6 +38,7 @@ export function CreateChatRequestFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'visibility': json['visibility'] == null ? undefined : json['visibility'],
39
39
  'primaryConceptId': json['primaryConceptId'] == null ? undefined : json['primaryConceptId'],
40
40
  'initialStrength': json['initialStrength'] == null ? undefined : json['initialStrength'],
41
+ 'taxonomyId': json['taxonomyId'] == null ? undefined : json['taxonomyId'],
41
42
  };
42
43
  }
43
44
  export function CreateChatRequestToJSON(json) {
@@ -54,5 +55,6 @@ export function CreateChatRequestToJSONTyped(value, ignoreDiscriminator = false)
54
55
  'visibility': value['visibility'],
55
56
  'primaryConceptId': value['primaryConceptId'],
56
57
  'initialStrength': value['initialStrength'],
58
+ 'taxonomyId': value['taxonomyId'],
57
59
  };
58
60
  }
@@ -0,0 +1,58 @@
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 CreatePracticeQuizRequest
16
+ */
17
+ export interface CreatePracticeQuizRequest {
18
+ /**
19
+ * Canvas global course id. Together with canvasObjectId + mode it identifies the per-exam slot for this learner.
20
+ * @type {string}
21
+ * @memberof CreatePracticeQuizRequest
22
+ */
23
+ globalCourseId: string;
24
+ /**
25
+ * Canvas object identifier formatted '{type}:{local_id}' — e.g. 'assignment:67890' or 'quiz:99999'. The type prefix is required because Canvas namespaces local ids by type.
26
+ * @type {string}
27
+ * @memberof CreatePracticeQuizRequest
28
+ */
29
+ canvasObjectId: string;
30
+ /**
31
+ * Quiz mode: 'quiz' for a graded practice quiz, 'flashcards' for a flashcard set.
32
+ * @type {string}
33
+ * @memberof CreatePracticeQuizRequest
34
+ */
35
+ mode: CreatePracticeQuizRequestModeEnum;
36
+ /**
37
+ * When true, abandon the existing association (if any) and create a new chat. The old chat remains in the learner's history.
38
+ * @type {boolean}
39
+ * @memberof CreatePracticeQuizRequest
40
+ */
41
+ forceNew?: boolean;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const CreatePracticeQuizRequestModeEnum: {
47
+ readonly Quiz: "quiz";
48
+ readonly Flashcards: "flashcards";
49
+ };
50
+ export type CreatePracticeQuizRequestModeEnum = typeof CreatePracticeQuizRequestModeEnum[keyof typeof CreatePracticeQuizRequestModeEnum];
51
+ /**
52
+ * Check if a given object implements the CreatePracticeQuizRequest interface.
53
+ */
54
+ export declare function instanceOfCreatePracticeQuizRequest(value: object): value is CreatePracticeQuizRequest;
55
+ export declare function CreatePracticeQuizRequestFromJSON(json: any): CreatePracticeQuizRequest;
56
+ export declare function CreatePracticeQuizRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePracticeQuizRequest;
57
+ export declare function CreatePracticeQuizRequestToJSON(json: any): CreatePracticeQuizRequest;
58
+ export declare function CreatePracticeQuizRequestToJSONTyped(value?: CreatePracticeQuizRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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
+ * @export
16
+ */
17
+ export const CreatePracticeQuizRequestModeEnum = {
18
+ Quiz: 'quiz',
19
+ Flashcards: 'flashcards'
20
+ };
21
+ /**
22
+ * Check if a given object implements the CreatePracticeQuizRequest interface.
23
+ */
24
+ export function instanceOfCreatePracticeQuizRequest(value) {
25
+ if (!('globalCourseId' in value) || value['globalCourseId'] === undefined)
26
+ return false;
27
+ if (!('canvasObjectId' in value) || value['canvasObjectId'] === undefined)
28
+ return false;
29
+ if (!('mode' in value) || value['mode'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function CreatePracticeQuizRequestFromJSON(json) {
34
+ return CreatePracticeQuizRequestFromJSONTyped(json, false);
35
+ }
36
+ export function CreatePracticeQuizRequestFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'globalCourseId': json['globalCourseId'],
42
+ 'canvasObjectId': json['canvasObjectId'],
43
+ 'mode': json['mode'],
44
+ 'forceNew': json['forceNew'] == null ? undefined : json['forceNew'],
45
+ };
46
+ }
47
+ export function CreatePracticeQuizRequestToJSON(json) {
48
+ return CreatePracticeQuizRequestToJSONTyped(json, false);
49
+ }
50
+ export function CreatePracticeQuizRequestToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'globalCourseId': value['globalCourseId'],
56
+ 'canvasObjectId': value['canvasObjectId'],
57
+ 'mode': value['mode'],
58
+ 'forceNew': value['forceNew'],
59
+ };
60
+ }
@@ -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 PracticeQuiz
16
+ */
17
+ export interface PracticeQuiz {
18
+ /**
19
+ * Chat id associated with the practice-quiz slot.
20
+ * @type {string}
21
+ * @memberof PracticeQuiz
22
+ */
23
+ chatId: string;
24
+ /**
25
+ * True when this call created a new chat for the slot. False when an existing chat was returned (find-or-create idempotent path).
26
+ * @type {boolean}
27
+ * @memberof PracticeQuiz
28
+ */
29
+ isNew: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the PracticeQuiz interface.
33
+ */
34
+ export declare function instanceOfPracticeQuiz(value: object): value is PracticeQuiz;
35
+ export declare function PracticeQuizFromJSON(json: any): PracticeQuiz;
36
+ export declare function PracticeQuizFromJSONTyped(json: any, ignoreDiscriminator: boolean): PracticeQuiz;
37
+ export declare function PracticeQuizToJSON(json: any): PracticeQuiz;
38
+ export declare function PracticeQuizToJSONTyped(value?: PracticeQuiz | null, ignoreDiscriminator?: boolean): any;