@instructure/athena-api-client 4.0.1 → 4.0.2
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 +16 -0
- package/dist/apis/StudyGuidesApi.d.ts +112 -0
- package/dist/apis/StudyGuidesApi.js +312 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/StudyGuidesApi.d.ts +112 -0
- package/dist/esm/apis/StudyGuidesApi.js +308 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AssociateUserFileRequest.d.ts +1 -0
- package/dist/esm/models/AssociateUserFileRequest.js +2 -1
- package/dist/esm/models/CreateStudyGuideQuizRequest.d.ts +46 -0
- package/dist/esm/models/CreateStudyGuideQuizRequest.js +50 -0
- package/dist/esm/models/CreateStudyGuideRequest.d.ts +74 -0
- package/dist/esm/models/CreateStudyGuideRequest.js +55 -0
- package/dist/esm/models/PaginatedStudyGuides.d.ts +39 -0
- package/dist/esm/models/PaginatedStudyGuides.js +48 -0
- package/dist/esm/models/RegenerateStudyGuideRequest.d.ts +38 -0
- package/dist/esm/models/RegenerateStudyGuideRequest.js +43 -0
- package/dist/esm/models/StudyGuide.d.ts +153 -0
- package/dist/esm/models/StudyGuide.js +127 -0
- package/dist/esm/models/StudyGuideConcept.d.ts +68 -0
- package/dist/esm/models/StudyGuideConcept.js +67 -0
- package/dist/esm/models/StudyGuideFile.d.ts +56 -0
- package/dist/esm/models/StudyGuideFile.js +59 -0
- package/dist/esm/models/StudyGuideListItem.d.ts +102 -0
- package/dist/esm/models/StudyGuideListItem.js +92 -0
- package/dist/esm/models/StudyGuideQuiz.d.ts +58 -0
- package/dist/esm/models/StudyGuideQuiz.js +62 -0
- package/dist/esm/models/StudyGuideSourceSummary.d.ts +56 -0
- package/dist/esm/models/StudyGuideSourceSummary.js +59 -0
- package/dist/esm/models/UserFileAssociation.d.ts +1 -0
- package/dist/esm/models/UserFileAssociation.js +2 -1
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/AssociateUserFileRequest.d.ts +1 -0
- package/dist/models/AssociateUserFileRequest.js +2 -1
- package/dist/models/CreateStudyGuideQuizRequest.d.ts +46 -0
- package/dist/models/CreateStudyGuideQuizRequest.js +58 -0
- package/dist/models/CreateStudyGuideRequest.d.ts +74 -0
- package/dist/models/CreateStudyGuideRequest.js +62 -0
- package/dist/models/PaginatedStudyGuides.d.ts +39 -0
- package/dist/models/PaginatedStudyGuides.js +55 -0
- package/dist/models/RegenerateStudyGuideRequest.d.ts +38 -0
- package/dist/models/RegenerateStudyGuideRequest.js +50 -0
- package/dist/models/StudyGuide.d.ts +153 -0
- package/dist/models/StudyGuide.js +135 -0
- package/dist/models/StudyGuideConcept.d.ts +68 -0
- package/dist/models/StudyGuideConcept.js +74 -0
- package/dist/models/StudyGuideFile.d.ts +56 -0
- package/dist/models/StudyGuideFile.js +66 -0
- package/dist/models/StudyGuideListItem.d.ts +102 -0
- package/dist/models/StudyGuideListItem.js +100 -0
- package/dist/models/StudyGuideQuiz.d.ts +58 -0
- package/dist/models/StudyGuideQuiz.js +70 -0
- package/dist/models/StudyGuideSourceSummary.d.ts +56 -0
- package/dist/models/StudyGuideSourceSummary.js +66 -0
- package/dist/models/UserFileAssociation.d.ts +1 -0
- package/dist/models/UserFileAssociation.js +2 -1
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,308 @@
|
|
|
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 { CreateStudyGuideQuizRequestToJSON, CreateStudyGuideRequestToJSON, PaginatedStudyGuidesFromJSON, RegenerateStudyGuideRequestToJSON, StudyGuideFromJSON, StudyGuideQuizFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class StudyGuidesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
31
|
+
* Create a study guide and start generating it
|
|
32
|
+
*/
|
|
33
|
+
createStudyGuideRaw(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 createStudyGuide().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['createStudyGuideRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createStudyGuideRequest', 'Required parameter "createStudyGuideRequest" was null or undefined when calling createStudyGuide().');
|
|
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 (requestParameters['xCanvasDomain'] != null) {
|
|
48
|
+
headerParameters['X-Canvas-Domain'] = String(requestParameters['xCanvasDomain']);
|
|
49
|
+
}
|
|
50
|
+
if (requestParameters['xCanvasToken'] != null) {
|
|
51
|
+
headerParameters['X-Canvas-Token'] = String(requestParameters['xCanvasToken']);
|
|
52
|
+
}
|
|
53
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
54
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
55
|
+
}
|
|
56
|
+
let urlPath = `/api/v1/study-guides`;
|
|
57
|
+
const response = yield this.request({
|
|
58
|
+
path: urlPath,
|
|
59
|
+
method: 'POST',
|
|
60
|
+
headers: headerParameters,
|
|
61
|
+
query: queryParameters,
|
|
62
|
+
body: CreateStudyGuideRequestToJSON(requestParameters['createStudyGuideRequest']),
|
|
63
|
+
}, initOverrides);
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
69
|
+
* Create a study guide and start generating it
|
|
70
|
+
*/
|
|
71
|
+
createStudyGuide(requestParameters, initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const response = yield this.createStudyGuideRaw(requestParameters, initOverrides);
|
|
74
|
+
return yield response.value();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
79
|
+
* Build a quiz or flashcard deck from a study guide
|
|
80
|
+
*/
|
|
81
|
+
createStudyGuideQuizRaw(requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters['xUserId'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createStudyGuideQuiz().');
|
|
85
|
+
}
|
|
86
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling createStudyGuideQuiz().');
|
|
88
|
+
}
|
|
89
|
+
if (requestParameters['createStudyGuideQuizRequest'] == null) {
|
|
90
|
+
throw new runtime.RequiredError('createStudyGuideQuizRequest', 'Required parameter "createStudyGuideQuizRequest" was null or undefined when calling createStudyGuideQuiz().');
|
|
91
|
+
}
|
|
92
|
+
const queryParameters = {};
|
|
93
|
+
const headerParameters = {};
|
|
94
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
95
|
+
if (requestParameters['xUserId'] != null) {
|
|
96
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
97
|
+
}
|
|
98
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
99
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
100
|
+
}
|
|
101
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}/quizzes`;
|
|
102
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
103
|
+
const response = yield this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'POST',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
body: CreateStudyGuideQuizRequestToJSON(requestParameters['createStudyGuideQuizRequest']),
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideQuizFromJSON(jsonValue));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
115
|
+
* Build a quiz or flashcard deck from a study guide
|
|
116
|
+
*/
|
|
117
|
+
createStudyGuideQuiz(requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const response = yield this.createStudyGuideQuizRaw(requestParameters, initOverrides);
|
|
120
|
+
return yield response.value();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
125
|
+
* Delete a study guide
|
|
126
|
+
*/
|
|
127
|
+
deleteStudyGuideRaw(requestParameters, initOverrides) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
if (requestParameters['xUserId'] == null) {
|
|
130
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling deleteStudyGuide().');
|
|
131
|
+
}
|
|
132
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
133
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling deleteStudyGuide().');
|
|
134
|
+
}
|
|
135
|
+
const queryParameters = {};
|
|
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/study-guides/{studyGuideId}`;
|
|
144
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
145
|
+
const response = yield this.request({
|
|
146
|
+
path: urlPath,
|
|
147
|
+
method: 'DELETE',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
}, initOverrides);
|
|
151
|
+
return new runtime.VoidApiResponse(response);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
156
|
+
* Delete a study guide
|
|
157
|
+
*/
|
|
158
|
+
deleteStudyGuide(requestParameters, initOverrides) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
yield this.deleteStudyGuideRaw(requestParameters, initOverrides);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
165
|
+
* Get a study guide with its concepts
|
|
166
|
+
*/
|
|
167
|
+
getStudyGuideRaw(requestParameters, initOverrides) {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
if (requestParameters['xUserId'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getStudyGuide().');
|
|
171
|
+
}
|
|
172
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
173
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling getStudyGuide().');
|
|
174
|
+
}
|
|
175
|
+
const queryParameters = {};
|
|
176
|
+
const headerParameters = {};
|
|
177
|
+
if (requestParameters['xUserId'] != null) {
|
|
178
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
179
|
+
}
|
|
180
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
181
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
182
|
+
}
|
|
183
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}`;
|
|
184
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
185
|
+
const response = yield this.request({
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'GET',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
}, initOverrides);
|
|
191
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
196
|
+
* Get a study guide with its concepts
|
|
197
|
+
*/
|
|
198
|
+
getStudyGuide(requestParameters, initOverrides) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
const response = yield this.getStudyGuideRaw(requestParameters, initOverrides);
|
|
201
|
+
return yield response.value();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
206
|
+
* List the learner\'s study guides
|
|
207
|
+
*/
|
|
208
|
+
listStudyGuidesRaw(requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
if (requestParameters['xUserId'] == null) {
|
|
211
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudyGuides().');
|
|
212
|
+
}
|
|
213
|
+
const queryParameters = {};
|
|
214
|
+
if (requestParameters['limit'] != null) {
|
|
215
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
216
|
+
}
|
|
217
|
+
if (requestParameters['cursor'] != null) {
|
|
218
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
219
|
+
}
|
|
220
|
+
if (requestParameters['studySpaceId'] != null) {
|
|
221
|
+
queryParameters['studySpaceId'] = requestParameters['studySpaceId'];
|
|
222
|
+
}
|
|
223
|
+
if (requestParameters['studyObjectiveId'] != null) {
|
|
224
|
+
queryParameters['studyObjectiveId'] = requestParameters['studyObjectiveId'];
|
|
225
|
+
}
|
|
226
|
+
if (requestParameters['courseId'] != null) {
|
|
227
|
+
queryParameters['courseId'] = requestParameters['courseId'];
|
|
228
|
+
}
|
|
229
|
+
const headerParameters = {};
|
|
230
|
+
if (requestParameters['xUserId'] != null) {
|
|
231
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
232
|
+
}
|
|
233
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
234
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
235
|
+
}
|
|
236
|
+
let urlPath = `/api/v1/study-guides`;
|
|
237
|
+
const response = yield this.request({
|
|
238
|
+
path: urlPath,
|
|
239
|
+
method: 'GET',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStudyGuidesFromJSON(jsonValue));
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
248
|
+
* List the learner\'s study guides
|
|
249
|
+
*/
|
|
250
|
+
listStudyGuides(requestParameters, initOverrides) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
const response = yield this.listStudyGuidesRaw(requestParameters, initOverrides);
|
|
253
|
+
return yield response.value();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
258
|
+
* Regenerate a study guide with more context
|
|
259
|
+
*/
|
|
260
|
+
regenerateStudyGuideRaw(requestParameters, initOverrides) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
if (requestParameters['xUserId'] == null) {
|
|
263
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling regenerateStudyGuide().');
|
|
264
|
+
}
|
|
265
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
266
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling regenerateStudyGuide().');
|
|
267
|
+
}
|
|
268
|
+
if (requestParameters['regenerateStudyGuideRequest'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('regenerateStudyGuideRequest', 'Required parameter "regenerateStudyGuideRequest" was null or undefined when calling regenerateStudyGuide().');
|
|
270
|
+
}
|
|
271
|
+
const queryParameters = {};
|
|
272
|
+
const headerParameters = {};
|
|
273
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
274
|
+
if (requestParameters['xUserId'] != null) {
|
|
275
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
276
|
+
}
|
|
277
|
+
if (requestParameters['xCanvasDomain'] != null) {
|
|
278
|
+
headerParameters['X-Canvas-Domain'] = String(requestParameters['xCanvasDomain']);
|
|
279
|
+
}
|
|
280
|
+
if (requestParameters['xCanvasToken'] != null) {
|
|
281
|
+
headerParameters['X-Canvas-Token'] = String(requestParameters['xCanvasToken']);
|
|
282
|
+
}
|
|
283
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
284
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
285
|
+
}
|
|
286
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}/regenerate`;
|
|
287
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
288
|
+
const response = yield this.request({
|
|
289
|
+
path: urlPath,
|
|
290
|
+
method: 'POST',
|
|
291
|
+
headers: headerParameters,
|
|
292
|
+
query: queryParameters,
|
|
293
|
+
body: RegenerateStudyGuideRequestToJSON(requestParameters['regenerateStudyGuideRequest']),
|
|
294
|
+
}, initOverrides);
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
300
|
+
* Regenerate a study guide with more context
|
|
301
|
+
*/
|
|
302
|
+
regenerateStudyGuide(requestParameters, initOverrides) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
const response = yield this.regenerateStudyGuideRaw(requestParameters, initOverrides);
|
|
305
|
+
return yield response.value();
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './QuizzesApi';
|
|
|
23
23
|
export * from './ResourcesApi';
|
|
24
24
|
export * from './ServiceTokensApi';
|
|
25
25
|
export * from './SharedQuizzesApi';
|
|
26
|
+
export * from './StudyGuidesApi';
|
|
26
27
|
export * from './StudyObjectiveConceptsApi';
|
|
27
28
|
export * from './StudyObjectivesApi';
|
|
28
29
|
export * from './StudyPlansApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './QuizzesApi';
|
|
|
25
25
|
export * from './ResourcesApi';
|
|
26
26
|
export * from './ServiceTokensApi';
|
|
27
27
|
export * from './SharedQuizzesApi';
|
|
28
|
+
export * from './StudyGuidesApi';
|
|
28
29
|
export * from './StudyObjectiveConceptsApi';
|
|
29
30
|
export * from './StudyObjectivesApi';
|
|
30
31
|
export * from './StudyPlansApi';
|
|
@@ -36,6 +36,7 @@ export declare const AssociateUserFileRequestKindEnum: {
|
|
|
36
36
|
readonly Message: "message";
|
|
37
37
|
readonly StudyObjective: "study_objective";
|
|
38
38
|
readonly ObjectiveResource: "objective_resource";
|
|
39
|
+
readonly StudyGuide: "study_guide";
|
|
39
40
|
};
|
|
40
41
|
export type AssociateUserFileRequestKindEnum = typeof AssociateUserFileRequestKindEnum[keyof typeof AssociateUserFileRequestKindEnum];
|
|
41
42
|
/**
|
|
@@ -18,7 +18,8 @@ export const AssociateUserFileRequestKindEnum = {
|
|
|
18
18
|
Chat: 'chat',
|
|
19
19
|
Message: 'message',
|
|
20
20
|
StudyObjective: 'study_objective',
|
|
21
|
-
ObjectiveResource: 'objective_resource'
|
|
21
|
+
ObjectiveResource: 'objective_resource',
|
|
22
|
+
StudyGuide: 'study_guide'
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the AssociateUserFileRequest interface.
|
|
@@ -0,0 +1,46 @@
|
|
|
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 CreateStudyGuideQuizRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateStudyGuideQuizRequest {
|
|
18
|
+
/**
|
|
19
|
+
* 'quiz' for a graded practice quiz, 'flashcards' for a deck.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateStudyGuideQuizRequest
|
|
22
|
+
*/
|
|
23
|
+
mode?: CreateStudyGuideQuizRequestModeEnum;
|
|
24
|
+
/**
|
|
25
|
+
* Concepts on the guide to build from. Omit for the whole guide (the 'Take Practice Quiz' button). Ids not on the guide are ignored.
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof CreateStudyGuideQuizRequest
|
|
28
|
+
*/
|
|
29
|
+
conceptIds?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const CreateStudyGuideQuizRequestModeEnum: {
|
|
35
|
+
readonly Quiz: "quiz";
|
|
36
|
+
readonly Flashcards: "flashcards";
|
|
37
|
+
};
|
|
38
|
+
export type CreateStudyGuideQuizRequestModeEnum = typeof CreateStudyGuideQuizRequestModeEnum[keyof typeof CreateStudyGuideQuizRequestModeEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the CreateStudyGuideQuizRequest interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfCreateStudyGuideQuizRequest(value: object): value is CreateStudyGuideQuizRequest;
|
|
43
|
+
export declare function CreateStudyGuideQuizRequestFromJSON(json: any): CreateStudyGuideQuizRequest;
|
|
44
|
+
export declare function CreateStudyGuideQuizRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateStudyGuideQuizRequest;
|
|
45
|
+
export declare function CreateStudyGuideQuizRequestToJSON(json: any): CreateStudyGuideQuizRequest;
|
|
46
|
+
export declare function CreateStudyGuideQuizRequestToJSONTyped(value?: CreateStudyGuideQuizRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 CreateStudyGuideQuizRequestModeEnum = {
|
|
18
|
+
Quiz: 'quiz',
|
|
19
|
+
Flashcards: 'flashcards'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateStudyGuideQuizRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfCreateStudyGuideQuizRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function CreateStudyGuideQuizRequestFromJSON(json) {
|
|
28
|
+
return CreateStudyGuideQuizRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function CreateStudyGuideQuizRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'mode': json['mode'] == null ? undefined : json['mode'],
|
|
36
|
+
'conceptIds': json['conceptIds'] == null ? undefined : json['conceptIds'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function CreateStudyGuideQuizRequestToJSON(json) {
|
|
40
|
+
return CreateStudyGuideQuizRequestToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function CreateStudyGuideQuizRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'mode': value['mode'],
|
|
48
|
+
'conceptIds': value['conceptIds'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 CreateStudyGuideRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateStudyGuideRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Study objective the guide is for. Its course, study space, Canvas link, due date, notes, attachments and extracted concepts all feed generation. When set, courseId/studySpaceId/canvasObjectRef are taken from it.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateStudyGuideRequest
|
|
22
|
+
*/
|
|
23
|
+
studyObjectiveId?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateStudyGuideRequest
|
|
28
|
+
*/
|
|
29
|
+
studySpaceId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Canvas course id, when the guide is for a Canvas course.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateStudyGuideRequest
|
|
34
|
+
*/
|
|
35
|
+
courseId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The Canvas assessment formatted '{type}:{local_id}' (e.g. 'quiz:123'). Read live (title, description, points, due date) when Canvas credentials are sent.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateStudyGuideRequest
|
|
40
|
+
*/
|
|
41
|
+
canvasObjectRef?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The chat the guide was requested from, if any.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateStudyGuideRequest
|
|
46
|
+
*/
|
|
47
|
+
chatId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The assessment's name as the learner gave it, used when there is no Canvas item or objective to read it from.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CreateStudyGuideRequest
|
|
52
|
+
*/
|
|
53
|
+
assessmentTitle?: string;
|
|
54
|
+
/**
|
|
55
|
+
* What the learner says is on the assessment, in their own words (chapters, topics, 'everything since the midterm'). The generator treats it as evidence of scope.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CreateStudyGuideRequest
|
|
58
|
+
*/
|
|
59
|
+
learnerContext?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Uploaded user files (from POST /api/v1/user-files/upload-url) to attach to the guide and read during generation. Each is associated with the guide as kind 'study_guide'.
|
|
62
|
+
* @type {Array<string>}
|
|
63
|
+
* @memberof CreateStudyGuideRequest
|
|
64
|
+
*/
|
|
65
|
+
userFileIds?: Array<string>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the CreateStudyGuideRequest interface.
|
|
69
|
+
*/
|
|
70
|
+
export declare function instanceOfCreateStudyGuideRequest(value: object): value is CreateStudyGuideRequest;
|
|
71
|
+
export declare function CreateStudyGuideRequestFromJSON(json: any): CreateStudyGuideRequest;
|
|
72
|
+
export declare function CreateStudyGuideRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateStudyGuideRequest;
|
|
73
|
+
export declare function CreateStudyGuideRequestToJSON(json: any): CreateStudyGuideRequest;
|
|
74
|
+
export declare function CreateStudyGuideRequestToJSONTyped(value?: CreateStudyGuideRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 CreateStudyGuideRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCreateStudyGuideRequest(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function CreateStudyGuideRequestFromJSON(json) {
|
|
21
|
+
return CreateStudyGuideRequestFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CreateStudyGuideRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'studyObjectiveId': json['studyObjectiveId'] == null ? undefined : json['studyObjectiveId'],
|
|
29
|
+
'studySpaceId': json['studySpaceId'] == null ? undefined : json['studySpaceId'],
|
|
30
|
+
'courseId': json['courseId'] == null ? undefined : json['courseId'],
|
|
31
|
+
'canvasObjectRef': json['canvasObjectRef'] == null ? undefined : json['canvasObjectRef'],
|
|
32
|
+
'chatId': json['chatId'] == null ? undefined : json['chatId'],
|
|
33
|
+
'assessmentTitle': json['assessmentTitle'] == null ? undefined : json['assessmentTitle'],
|
|
34
|
+
'learnerContext': json['learnerContext'] == null ? undefined : json['learnerContext'],
|
|
35
|
+
'userFileIds': json['userFileIds'] == null ? undefined : json['userFileIds'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function CreateStudyGuideRequestToJSON(json) {
|
|
39
|
+
return CreateStudyGuideRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function CreateStudyGuideRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'studyObjectiveId': value['studyObjectiveId'],
|
|
47
|
+
'studySpaceId': value['studySpaceId'],
|
|
48
|
+
'courseId': value['courseId'],
|
|
49
|
+
'canvasObjectRef': value['canvasObjectRef'],
|
|
50
|
+
'chatId': value['chatId'],
|
|
51
|
+
'assessmentTitle': value['assessmentTitle'],
|
|
52
|
+
'learnerContext': value['learnerContext'],
|
|
53
|
+
'userFileIds': value['userFileIds'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -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 { StudyGuideListItem } from './StudyGuideListItem';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedStudyGuides
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedStudyGuides {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<StudyGuideListItem>}
|
|
22
|
+
* @memberof PaginatedStudyGuides
|
|
23
|
+
*/
|
|
24
|
+
data: Array<StudyGuideListItem>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof PaginatedStudyGuides
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the PaginatedStudyGuides interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfPaginatedStudyGuides(value: object): value is PaginatedStudyGuides;
|
|
36
|
+
export declare function PaginatedStudyGuidesFromJSON(json: any): PaginatedStudyGuides;
|
|
37
|
+
export declare function PaginatedStudyGuidesFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStudyGuides;
|
|
38
|
+
export declare function PaginatedStudyGuidesToJSON(json: any): PaginatedStudyGuides;
|
|
39
|
+
export declare function PaginatedStudyGuidesToJSONTyped(value?: PaginatedStudyGuides | 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 { StudyGuideListItemFromJSON, StudyGuideListItemToJSON, } from './StudyGuideListItem';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedStudyGuides interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedStudyGuides(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 PaginatedStudyGuidesFromJSON(json) {
|
|
26
|
+
return PaginatedStudyGuidesFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function PaginatedStudyGuidesFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(StudyGuideListItemFromJSON)),
|
|
34
|
+
'nextCursor': json['nextCursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function PaginatedStudyGuidesToJSON(json) {
|
|
38
|
+
return PaginatedStudyGuidesToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function PaginatedStudyGuidesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(StudyGuideListItemToJSON)),
|
|
46
|
+
'nextCursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|