@instructure/athena-api-client 3.20.3 → 3.21.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 (42) hide show
  1. package/README.md +11 -0
  2. package/dist/apis/FeaturesApi.d.ts +14 -1
  3. package/dist/apis/FeaturesApi.js +37 -0
  4. package/dist/apis/StudyPlansApi.d.ts +76 -0
  5. package/dist/apis/StudyPlansApi.js +206 -0
  6. package/dist/apis/index.d.ts +1 -0
  7. package/dist/apis/index.js +1 -0
  8. package/dist/esm/apis/FeaturesApi.d.ts +14 -1
  9. package/dist/esm/apis/FeaturesApi.js +38 -1
  10. package/dist/esm/apis/StudyPlansApi.d.ts +76 -0
  11. package/dist/esm/apis/StudyPlansApi.js +202 -0
  12. package/dist/esm/apis/index.d.ts +1 -0
  13. package/dist/esm/apis/index.js +1 -0
  14. package/dist/esm/models/CreateStudyPlanDto.d.ts +39 -0
  15. package/dist/esm/models/CreateStudyPlanDto.js +46 -0
  16. package/dist/esm/models/CreateStudyPlanDtoActivitiesInner.d.ts +56 -0
  17. package/dist/esm/models/CreateStudyPlanDtoActivitiesInner.js +53 -0
  18. package/dist/esm/models/StudyPlan.d.ts +82 -0
  19. package/dist/esm/models/StudyPlan.js +78 -0
  20. package/dist/esm/models/StudyPlanActivity.d.ts +74 -0
  21. package/dist/esm/models/StudyPlanActivity.js +71 -0
  22. package/dist/esm/models/UpdateActivityCompletionDto.d.ts +32 -0
  23. package/dist/esm/models/UpdateActivityCompletionDto.js +43 -0
  24. package/dist/esm/models/UserFeatures.d.ts +32 -0
  25. package/dist/esm/models/UserFeatures.js +43 -0
  26. package/dist/esm/models/index.d.ts +6 -0
  27. package/dist/esm/models/index.js +6 -0
  28. package/dist/models/CreateStudyPlanDto.d.ts +39 -0
  29. package/dist/models/CreateStudyPlanDto.js +53 -0
  30. package/dist/models/CreateStudyPlanDtoActivitiesInner.d.ts +56 -0
  31. package/dist/models/CreateStudyPlanDtoActivitiesInner.js +60 -0
  32. package/dist/models/StudyPlan.d.ts +82 -0
  33. package/dist/models/StudyPlan.js +86 -0
  34. package/dist/models/StudyPlanActivity.d.ts +74 -0
  35. package/dist/models/StudyPlanActivity.js +78 -0
  36. package/dist/models/UpdateActivityCompletionDto.d.ts +32 -0
  37. package/dist/models/UpdateActivityCompletionDto.js +50 -0
  38. package/dist/models/UserFeatures.d.ts +32 -0
  39. package/dist/models/UserFeatures.js +50 -0
  40. package/dist/models/index.d.ts +6 -0
  41. package/dist/models/index.js +6 -0
  42. package/package.json +1 -1
package/README.md CHANGED
@@ -93,6 +93,7 @@ All URIs are relative to *http://localhost:3000*
93
93
  *FeaturesApi* | [**deleteFeature**](docs/FeaturesApi.md#deletefeature) | **DELETE** /api/v1/features/{id} | Delete a feature
94
94
  *FeaturesApi* | [**getFeature**](docs/FeaturesApi.md#getfeature) | **GET** /api/v1/features/{id} | Get feature by ID
95
95
  *FeaturesApi* | [**listFeatures**](docs/FeaturesApi.md#listfeatures) | **GET** /api/v1/features | List all features
96
+ *FeaturesApi* | [**listMyFeatures**](docs/FeaturesApi.md#listmyfeatures) | **GET** /api/v1/me/features | List the calling user\'s enabled features
96
97
  *FeaturesApi* | [**updateFeature**](docs/FeaturesApi.md#updatefeature) | **PATCH** /api/v1/features/{id} | Update a feature
97
98
  *FilesApi* | [**getFileUploadUrls**](docs/FilesApi.md#getfileuploadurls) | **POST** /api/v1/files/upload-url | Get presigned upload URLs
98
99
  *HealthApi* | [**healthCheck**](docs/HealthApi.md#healthcheck) | **GET** /health | Health check endpoint
@@ -139,6 +140,10 @@ All URIs are relative to *http://localhost:3000*
139
140
  *StudyObjectivesApi* | [**listStudyObjectiveQuizzes**](docs/StudyObjectivesApi.md#liststudyobjectivequizzes) | **GET** /api/v1/study-objectives/{studyObjectiveId}/quizzes | List quizzes and flashcards for a study objective
140
141
  *StudyObjectivesApi* | [**listStudyObjectives**](docs/StudyObjectivesApi.md#liststudyobjectives) | **GET** /api/v1/study-objectives | List study objectives for a course
141
142
  *StudyObjectivesApi* | [**updateStudyObjective**](docs/StudyObjectivesApi.md#updatestudyobjective) | **PATCH** /api/v1/study-objectives/{studyObjectiveId} | Update a study objective
143
+ *StudyPlansApi* | [**deleteStudyPlan**](docs/StudyPlansApi.md#deletestudyplan) | **DELETE** /api/v1/study-plans/{planId} | Delete a study plan
144
+ *StudyPlansApi* | [**getStudyObjectiveStudyPlan**](docs/StudyPlansApi.md#getstudyobjectivestudyplan) | **GET** /api/v1/study-objectives/{studyObjectiveId}/study-plan | Get a study objective\'s plan
145
+ *StudyPlansApi* | [**saveStudyObjectiveStudyPlan**](docs/StudyPlansApi.md#savestudyobjectivestudyplan) | **POST** /api/v1/study-objectives/{studyObjectiveId}/study-plan | Save (or replace) a study objective\'s plan
146
+ *StudyPlansApi* | [**updateStudyPlanActivityCompletion**](docs/StudyPlansApi.md#updatestudyplanactivitycompletion) | **PATCH** /api/v1/study-plan-activities/{activityId} | Mark a plan activity complete or incomplete
142
147
  *StudyPrepApi* | [**assessCanvasKnowledge**](docs/StudyPrepApi.md#assesscanvasknowledge) | **POST** /api/v1/study-prep/knowledge-assessment | Assess user knowledge from Canvas course grades
143
148
  *StudyPrepApi* | [**generateCanvasTaxonomy**](docs/StudyPrepApi.md#generatecanvastaxonomy) | **POST** /api/v1/study-prep/taxonomies | Generate a taxonomy from a Canvas course
144
149
  *StudyPrepApi* | [**syncCanvasUserProfile**](docs/StudyPrepApi.md#synccanvasuserprofile) | **POST** /api/v1/study-prep/user-profile | Sync user profile from Canvas
@@ -226,6 +231,8 @@ All URIs are relative to *http://localhost:3000*
226
231
  - [CreateStudyObjectiveDto](docs/CreateStudyObjectiveDto.md)
227
232
  - [CreateStudyObjectiveDtoCanvasDocumentsInner](docs/CreateStudyObjectiveDtoCanvasDocumentsInner.md)
228
233
  - [CreateStudyObjectiveDtoCanvasObject](docs/CreateStudyObjectiveDtoCanvasObject.md)
234
+ - [CreateStudyPlanDto](docs/CreateStudyPlanDto.md)
235
+ - [CreateStudyPlanDtoActivitiesInner](docs/CreateStudyPlanDtoActivitiesInner.md)
229
236
  - [CreateTokenRequest](docs/CreateTokenRequest.md)
230
237
  - [CreateTokenResponse](docs/CreateTokenResponse.md)
231
238
  - [DailyQuizStatus](docs/DailyQuizStatus.md)
@@ -278,6 +285,8 @@ All URIs are relative to *http://localhost:3000*
278
285
  - [StudyObjectiveConceptAttachmentList](docs/StudyObjectiveConceptAttachmentList.md)
279
286
  - [StudyObjectiveConceptSummary](docs/StudyObjectiveConceptSummary.md)
280
287
  - [StudyObjectiveFileAttachment](docs/StudyObjectiveFileAttachment.md)
288
+ - [StudyPlan](docs/StudyPlan.md)
289
+ - [StudyPlanActivity](docs/StudyPlanActivity.md)
281
290
  - [SubmitQuizResponseRequest](docs/SubmitQuizResponseRequest.md)
282
291
  - [SyllabusAnalysisObjective](docs/SyllabusAnalysisObjective.md)
283
292
  - [SyllabusAnalysisStatus](docs/SyllabusAnalysisStatus.md)
@@ -297,6 +306,7 @@ All URIs are relative to *http://localhost:3000*
297
306
  - [TriggerSyllabusAnalysisRequest](docs/TriggerSyllabusAnalysisRequest.md)
298
307
  - [TriggerSyllabusAnalysisRequestFile](docs/TriggerSyllabusAnalysisRequestFile.md)
299
308
  - [UpdateAccountDto](docs/UpdateAccountDto.md)
309
+ - [UpdateActivityCompletionDto](docs/UpdateActivityCompletionDto.md)
300
310
  - [UpdateChatRequest](docs/UpdateChatRequest.md)
301
311
  - [UpdateFeatureDto](docs/UpdateFeatureDto.md)
302
312
  - [UpdatePlanDto](docs/UpdatePlanDto.md)
@@ -315,6 +325,7 @@ All URIs are relative to *http://localhost:3000*
315
325
  - [UserConcept](docs/UserConcept.md)
316
326
  - [UserConceptConcept](docs/UserConceptConcept.md)
317
327
  - [UserContext](docs/UserContext.md)
328
+ - [UserFeatures](docs/UserFeatures.md)
318
329
  - [UserFile](docs/UserFile.md)
319
330
  - [UserFileAssociation](docs/UserFileAssociation.md)
320
331
  - [UserFileUploadUrlFile](docs/UserFileUploadUrlFile.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 { CreateFeatureDto, FeatureEntity, UpdateFeatureDto } from '../models/index';
13
+ import type { CreateFeatureDto, FeatureEntity, UpdateFeatureDto, UserFeatures } from '../models/index';
14
14
  export interface CreateFeatureRequest {
15
15
  createFeatureDto: CreateFeatureDto;
16
16
  }
@@ -20,6 +20,9 @@ export interface DeleteFeatureRequest {
20
20
  export interface GetFeatureRequest {
21
21
  id: string;
22
22
  }
23
+ export interface ListMyFeaturesRequest {
24
+ xUserId: string;
25
+ }
23
26
  export interface UpdateFeatureRequest {
24
27
  id: string;
25
28
  updateFeatureDto: UpdateFeatureDto;
@@ -60,6 +63,16 @@ export declare class FeaturesApi extends runtime.BaseAPI {
60
63
  * List all features
61
64
  */
62
65
  listFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FeatureEntity>>;
66
+ /**
67
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
68
+ * List the calling user\'s enabled features
69
+ */
70
+ listMyFeaturesRaw(requestParameters: ListMyFeaturesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFeatures>>;
71
+ /**
72
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
73
+ * List the calling user\'s enabled features
74
+ */
75
+ listMyFeatures(requestParameters: ListMyFeaturesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFeatures>;
63
76
  /**
64
77
  * Update a feature
65
78
  */
@@ -157,6 +157,43 @@ class FeaturesApi extends runtime.BaseAPI {
157
157
  return yield response.value();
158
158
  });
159
159
  }
160
+ /**
161
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
162
+ * List the calling user\'s enabled features
163
+ */
164
+ listMyFeaturesRaw(requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ if (requestParameters['xUserId'] == null) {
167
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listMyFeatures().');
168
+ }
169
+ const queryParameters = {};
170
+ const headerParameters = {};
171
+ if (requestParameters['xUserId'] != null) {
172
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
173
+ }
174
+ if (this.configuration && this.configuration.apiKey) {
175
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
176
+ }
177
+ let urlPath = `/api/v1/me/features`;
178
+ const response = yield this.request({
179
+ path: urlPath,
180
+ method: 'GET',
181
+ headers: headerParameters,
182
+ query: queryParameters,
183
+ }, initOverrides);
184
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserFeaturesFromJSON)(jsonValue));
185
+ });
186
+ }
187
+ /**
188
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
189
+ * List the calling user\'s enabled features
190
+ */
191
+ listMyFeatures(requestParameters, initOverrides) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const response = yield this.listMyFeaturesRaw(requestParameters, initOverrides);
194
+ return yield response.value();
195
+ });
196
+ }
160
197
  /**
161
198
  * Update a feature
162
199
  */
@@ -0,0 +1,76 @@
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 { CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
14
+ export interface DeleteStudyPlanRequest {
15
+ xUserId: string;
16
+ planId: string;
17
+ }
18
+ export interface GetStudyObjectiveStudyPlanRequest {
19
+ xUserId: string;
20
+ studyObjectiveId: string;
21
+ }
22
+ export interface SaveStudyObjectiveStudyPlanRequest {
23
+ xUserId: string;
24
+ studyObjectiveId: string;
25
+ createStudyPlanDto: CreateStudyPlanDto;
26
+ }
27
+ export interface UpdateStudyPlanActivityCompletionRequest {
28
+ xUserId: string;
29
+ activityId: string;
30
+ updateActivityCompletionDto: UpdateActivityCompletionDto;
31
+ }
32
+ /**
33
+ *
34
+ */
35
+ export declare class StudyPlansApi extends runtime.BaseAPI {
36
+ /**
37
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
38
+ * Delete a study plan
39
+ */
40
+ deleteStudyPlanRaw(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
41
+ /**
42
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
43
+ * Delete a study plan
44
+ */
45
+ deleteStudyPlan(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
46
+ /**
47
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
48
+ * Get a study objective\'s plan
49
+ */
50
+ getStudyObjectiveStudyPlanRaw(requestParameters: GetStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlan>>;
51
+ /**
52
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
53
+ * Get a study objective\'s plan
54
+ */
55
+ getStudyObjectiveStudyPlan(requestParameters: GetStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlan>;
56
+ /**
57
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
58
+ * Save (or replace) a study objective\'s plan
59
+ */
60
+ saveStudyObjectiveStudyPlanRaw(requestParameters: SaveStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlan>>;
61
+ /**
62
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
63
+ * Save (or replace) a study objective\'s plan
64
+ */
65
+ saveStudyObjectiveStudyPlan(requestParameters: SaveStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlan>;
66
+ /**
67
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
68
+ * Mark a plan activity complete or incomplete
69
+ */
70
+ updateStudyPlanActivityCompletionRaw(requestParameters: UpdateStudyPlanActivityCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlanActivity>>;
71
+ /**
72
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
73
+ * Mark a plan activity complete or incomplete
74
+ */
75
+ updateStudyPlanActivityCompletion(requestParameters: UpdateStudyPlanActivityCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlanActivity>;
76
+ }
@@ -0,0 +1,206 @@
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.StudyPlansApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class StudyPlansApi extends runtime.BaseAPI {
32
+ /**
33
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
34
+ * Delete a study plan
35
+ */
36
+ deleteStudyPlanRaw(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 deleteStudyPlan().');
40
+ }
41
+ if (requestParameters['planId'] == null) {
42
+ throw new runtime.RequiredError('planId', 'Required parameter "planId" was null or undefined when calling deleteStudyPlan().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ if (requestParameters['xUserId'] != null) {
47
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
48
+ }
49
+ if (this.configuration && this.configuration.apiKey) {
50
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
51
+ }
52
+ let urlPath = `/api/v1/study-plans/{planId}`;
53
+ urlPath = urlPath.replace(`{${"planId"}}`, encodeURIComponent(String(requestParameters['planId'])));
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'DELETE',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.VoidApiResponse(response);
61
+ });
62
+ }
63
+ /**
64
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
65
+ * Delete a study plan
66
+ */
67
+ deleteStudyPlan(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ yield this.deleteStudyPlanRaw(requestParameters, initOverrides);
70
+ });
71
+ }
72
+ /**
73
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
74
+ * Get a study objective\'s plan
75
+ */
76
+ getStudyObjectiveStudyPlanRaw(requestParameters, initOverrides) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ if (requestParameters['xUserId'] == null) {
79
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getStudyObjectiveStudyPlan().');
80
+ }
81
+ if (requestParameters['studyObjectiveId'] == null) {
82
+ throw new runtime.RequiredError('studyObjectiveId', 'Required parameter "studyObjectiveId" was null or undefined when calling getStudyObjectiveStudyPlan().');
83
+ }
84
+ const queryParameters = {};
85
+ const headerParameters = {};
86
+ if (requestParameters['xUserId'] != null) {
87
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
88
+ }
89
+ if (this.configuration && this.configuration.apiKey) {
90
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
91
+ }
92
+ let urlPath = `/api/v1/study-objectives/{studyObjectiveId}/study-plan`;
93
+ urlPath = urlPath.replace(`{${"studyObjectiveId"}}`, encodeURIComponent(String(requestParameters['studyObjectiveId'])));
94
+ const response = yield this.request({
95
+ path: urlPath,
96
+ method: 'GET',
97
+ headers: headerParameters,
98
+ query: queryParameters,
99
+ }, initOverrides);
100
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudyPlanFromJSON)(jsonValue));
101
+ });
102
+ }
103
+ /**
104
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
105
+ * Get a study objective\'s plan
106
+ */
107
+ getStudyObjectiveStudyPlan(requestParameters, initOverrides) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const response = yield this.getStudyObjectiveStudyPlanRaw(requestParameters, initOverrides);
110
+ return yield response.value();
111
+ });
112
+ }
113
+ /**
114
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
115
+ * Save (or replace) a study objective\'s plan
116
+ */
117
+ saveStudyObjectiveStudyPlanRaw(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (requestParameters['xUserId'] == null) {
120
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling saveStudyObjectiveStudyPlan().');
121
+ }
122
+ if (requestParameters['studyObjectiveId'] == null) {
123
+ throw new runtime.RequiredError('studyObjectiveId', 'Required parameter "studyObjectiveId" was null or undefined when calling saveStudyObjectiveStudyPlan().');
124
+ }
125
+ if (requestParameters['createStudyPlanDto'] == null) {
126
+ throw new runtime.RequiredError('createStudyPlanDto', 'Required parameter "createStudyPlanDto" was null or undefined when calling saveStudyObjectiveStudyPlan().');
127
+ }
128
+ const queryParameters = {};
129
+ const headerParameters = {};
130
+ headerParameters['Content-Type'] = 'application/json';
131
+ if (requestParameters['xUserId'] != null) {
132
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
133
+ }
134
+ if (this.configuration && this.configuration.apiKey) {
135
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
136
+ }
137
+ let urlPath = `/api/v1/study-objectives/{studyObjectiveId}/study-plan`;
138
+ urlPath = urlPath.replace(`{${"studyObjectiveId"}}`, encodeURIComponent(String(requestParameters['studyObjectiveId'])));
139
+ const response = yield this.request({
140
+ path: urlPath,
141
+ method: 'POST',
142
+ headers: headerParameters,
143
+ query: queryParameters,
144
+ body: (0, index_1.CreateStudyPlanDtoToJSON)(requestParameters['createStudyPlanDto']),
145
+ }, initOverrides);
146
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudyPlanFromJSON)(jsonValue));
147
+ });
148
+ }
149
+ /**
150
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
151
+ * Save (or replace) a study objective\'s plan
152
+ */
153
+ saveStudyObjectiveStudyPlan(requestParameters, initOverrides) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ const response = yield this.saveStudyObjectiveStudyPlanRaw(requestParameters, initOverrides);
156
+ return yield response.value();
157
+ });
158
+ }
159
+ /**
160
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
161
+ * Mark a plan activity complete or incomplete
162
+ */
163
+ updateStudyPlanActivityCompletionRaw(requestParameters, initOverrides) {
164
+ return __awaiter(this, void 0, void 0, function* () {
165
+ if (requestParameters['xUserId'] == null) {
166
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling updateStudyPlanActivityCompletion().');
167
+ }
168
+ if (requestParameters['activityId'] == null) {
169
+ throw new runtime.RequiredError('activityId', 'Required parameter "activityId" was null or undefined when calling updateStudyPlanActivityCompletion().');
170
+ }
171
+ if (requestParameters['updateActivityCompletionDto'] == null) {
172
+ throw new runtime.RequiredError('updateActivityCompletionDto', 'Required parameter "updateActivityCompletionDto" was null or undefined when calling updateStudyPlanActivityCompletion().');
173
+ }
174
+ const queryParameters = {};
175
+ const headerParameters = {};
176
+ headerParameters['Content-Type'] = 'application/json';
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-plan-activities/{activityId}`;
184
+ urlPath = urlPath.replace(`{${"activityId"}}`, encodeURIComponent(String(requestParameters['activityId'])));
185
+ const response = yield this.request({
186
+ path: urlPath,
187
+ method: 'PATCH',
188
+ headers: headerParameters,
189
+ query: queryParameters,
190
+ body: (0, index_1.UpdateActivityCompletionDtoToJSON)(requestParameters['updateActivityCompletionDto']),
191
+ }, initOverrides);
192
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudyPlanActivityFromJSON)(jsonValue));
193
+ });
194
+ }
195
+ /**
196
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
197
+ * Mark a plan activity complete or incomplete
198
+ */
199
+ updateStudyPlanActivityCompletion(requestParameters, initOverrides) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ const response = yield this.updateStudyPlanActivityCompletionRaw(requestParameters, initOverrides);
202
+ return yield response.value();
203
+ });
204
+ }
205
+ }
206
+ exports.StudyPlansApi = StudyPlansApi;
@@ -20,6 +20,7 @@ export * from './QuizzesApi';
20
20
  export * from './ServiceTokensApi';
21
21
  export * from './StudyObjectiveConceptsApi';
22
22
  export * from './StudyObjectivesApi';
23
+ export * from './StudyPlansApi';
23
24
  export * from './StudyPrepApi';
24
25
  export * from './SyllabusAnalysisApi';
25
26
  export * from './TagsApi';
@@ -38,6 +38,7 @@ __exportStar(require("./QuizzesApi"), exports);
38
38
  __exportStar(require("./ServiceTokensApi"), exports);
39
39
  __exportStar(require("./StudyObjectiveConceptsApi"), exports);
40
40
  __exportStar(require("./StudyObjectivesApi"), exports);
41
+ __exportStar(require("./StudyPlansApi"), exports);
41
42
  __exportStar(require("./StudyPrepApi"), exports);
42
43
  __exportStar(require("./SyllabusAnalysisApi"), exports);
43
44
  __exportStar(require("./TagsApi"), exports);
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateFeatureDto, FeatureEntity, UpdateFeatureDto } from '../models/index';
13
+ import type { CreateFeatureDto, FeatureEntity, UpdateFeatureDto, UserFeatures } from '../models/index';
14
14
  export interface CreateFeatureRequest {
15
15
  createFeatureDto: CreateFeatureDto;
16
16
  }
@@ -20,6 +20,9 @@ export interface DeleteFeatureRequest {
20
20
  export interface GetFeatureRequest {
21
21
  id: string;
22
22
  }
23
+ export interface ListMyFeaturesRequest {
24
+ xUserId: string;
25
+ }
23
26
  export interface UpdateFeatureRequest {
24
27
  id: string;
25
28
  updateFeatureDto: UpdateFeatureDto;
@@ -60,6 +63,16 @@ export declare class FeaturesApi extends runtime.BaseAPI {
60
63
  * List all features
61
64
  */
62
65
  listFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FeatureEntity>>;
66
+ /**
67
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
68
+ * List the calling user\'s enabled features
69
+ */
70
+ listMyFeaturesRaw(requestParameters: ListMyFeaturesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFeatures>>;
71
+ /**
72
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
73
+ * List the calling user\'s enabled features
74
+ */
75
+ listMyFeatures(requestParameters: ListMyFeaturesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFeatures>;
63
76
  /**
64
77
  * Update a feature
65
78
  */
@@ -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 { CreateFeatureDtoToJSON, FeatureEntityFromJSON, UpdateFeatureDtoToJSON, } from '../models/index';
24
+ import { CreateFeatureDtoToJSON, FeatureEntityFromJSON, UpdateFeatureDtoToJSON, UserFeaturesFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -154,6 +154,43 @@ export class FeaturesApi extends runtime.BaseAPI {
154
154
  return yield response.value();
155
155
  });
156
156
  }
157
+ /**
158
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
159
+ * List the calling user\'s enabled features
160
+ */
161
+ listMyFeaturesRaw(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (requestParameters['xUserId'] == null) {
164
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listMyFeatures().');
165
+ }
166
+ const queryParameters = {};
167
+ const headerParameters = {};
168
+ if (requestParameters['xUserId'] != null) {
169
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
170
+ }
171
+ if (this.configuration && this.configuration.apiKey) {
172
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
173
+ }
174
+ let urlPath = `/api/v1/me/features`;
175
+ const response = yield this.request({
176
+ path: urlPath,
177
+ method: 'GET',
178
+ headers: headerParameters,
179
+ query: queryParameters,
180
+ }, initOverrides);
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserFeaturesFromJSON(jsonValue));
182
+ });
183
+ }
184
+ /**
185
+ * Returns the names of every feature the authenticated user is entitled to, resolved across all of their accounts via plan rank and per-account overrides.
186
+ * List the calling user\'s enabled features
187
+ */
188
+ listMyFeatures(requestParameters, initOverrides) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ const response = yield this.listMyFeaturesRaw(requestParameters, initOverrides);
191
+ return yield response.value();
192
+ });
193
+ }
157
194
  /**
158
195
  * Update a feature
159
196
  */
@@ -0,0 +1,76 @@
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 { CreateStudyPlanDto, StudyPlan, StudyPlanActivity, UpdateActivityCompletionDto } from '../models/index';
14
+ export interface DeleteStudyPlanRequest {
15
+ xUserId: string;
16
+ planId: string;
17
+ }
18
+ export interface GetStudyObjectiveStudyPlanRequest {
19
+ xUserId: string;
20
+ studyObjectiveId: string;
21
+ }
22
+ export interface SaveStudyObjectiveStudyPlanRequest {
23
+ xUserId: string;
24
+ studyObjectiveId: string;
25
+ createStudyPlanDto: CreateStudyPlanDto;
26
+ }
27
+ export interface UpdateStudyPlanActivityCompletionRequest {
28
+ xUserId: string;
29
+ activityId: string;
30
+ updateActivityCompletionDto: UpdateActivityCompletionDto;
31
+ }
32
+ /**
33
+ *
34
+ */
35
+ export declare class StudyPlansApi extends runtime.BaseAPI {
36
+ /**
37
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
38
+ * Delete a study plan
39
+ */
40
+ deleteStudyPlanRaw(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
41
+ /**
42
+ * Deletes the plan and its activities. The chats those activities started are not deleted.
43
+ * Delete a study plan
44
+ */
45
+ deleteStudyPlan(requestParameters: DeleteStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
46
+ /**
47
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
48
+ * Get a study objective\'s plan
49
+ */
50
+ getStudyObjectiveStudyPlanRaw(requestParameters: GetStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlan>>;
51
+ /**
52
+ * Returns the objective\'s saved plan with its activities ordered by `position`, or 404 when the objective has no plan.
53
+ * Get a study objective\'s plan
54
+ */
55
+ getStudyObjectiveStudyPlan(requestParameters: GetStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlan>;
56
+ /**
57
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
58
+ * Save (or replace) a study objective\'s plan
59
+ */
60
+ saveStudyObjectiveStudyPlanRaw(requestParameters: SaveStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlan>>;
61
+ /**
62
+ * Persists an ordered list of activities as the objective\'s plan. An objective has at most one plan, so this replaces any existing plan — the previous activities and their completion state are deleted in the same transaction. A payload over the 20-activity cap is rejected, never truncated.
63
+ * Save (or replace) a study objective\'s plan
64
+ */
65
+ saveStudyObjectiveStudyPlan(requestParameters: SaveStudyObjectiveStudyPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlan>;
66
+ /**
67
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
68
+ * Mark a plan activity complete or incomplete
69
+ */
70
+ updateStudyPlanActivityCompletionRaw(requestParameters: UpdateStudyPlanActivityCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyPlanActivity>>;
71
+ /**
72
+ * Toggles one activity\'s completion. This is the only write a saved plan accepts — a plan\'s content is immutable, so changing it means saving a new plan over it. Completing an already-complete activity keeps the original timestamp.
73
+ * Mark a plan activity complete or incomplete
74
+ */
75
+ updateStudyPlanActivityCompletion(requestParameters: UpdateStudyPlanActivityCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyPlanActivity>;
76
+ }