@instructure/athena-api-client 3.24.3 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/apis/StudyObjectivesApi.d.ts +8 -7
- package/dist/apis/StudyObjectivesApi.js +9 -9
- package/dist/apis/StudySpacesApi.d.ts +31 -3
- package/dist/apis/StudySpacesApi.js +84 -2
- package/dist/esm/apis/StudyObjectivesApi.d.ts +8 -7
- package/dist/esm/apis/StudyObjectivesApi.js +9 -9
- package/dist/esm/apis/StudySpacesApi.d.ts +31 -3
- package/dist/esm/apis/StudySpacesApi.js +85 -3
- package/dist/esm/models/AdminStudyObjectiveListItem.d.ts +2 -2
- package/dist/esm/models/CreateStudyObjectiveDto.d.ts +9 -3
- package/dist/esm/models/CreateStudyObjectiveDto.js +3 -3
- package/dist/esm/models/CreateStudySpaceDto.d.ts +32 -0
- package/dist/esm/models/CreateStudySpaceDto.js +43 -0
- package/dist/esm/models/StudyObjective.d.ts +8 -2
- package/dist/esm/models/StudyObjective.js +4 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/AdminStudyObjectiveListItem.d.ts +2 -2
- package/dist/models/CreateStudyObjectiveDto.d.ts +9 -3
- package/dist/models/CreateStudyObjectiveDto.js +3 -3
- package/dist/models/CreateStudySpaceDto.d.ts +32 -0
- package/dist/models/CreateStudySpaceDto.js +50 -0
- package/dist/models/StudyObjective.d.ts +8 -2
- package/dist/models/StudyObjective.js +4 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
138
138
|
*StudyObjectivesApi* | [**getStudyObjective**](docs/StudyObjectivesApi.md#getstudyobjective) | **GET** /api/v1/study-objectives/{studyObjectiveId} | Get a study objective by ID
|
|
139
139
|
*StudyObjectivesApi* | [**listObjectiveResources**](docs/StudyObjectivesApi.md#listobjectiveresources) | **GET** /api/v1/study-objectives/{studyObjectiveId}/resources | List resources attached to a study objective
|
|
140
140
|
*StudyObjectivesApi* | [**listStudyObjectiveQuizzes**](docs/StudyObjectivesApi.md#liststudyobjectivequizzes) | **GET** /api/v1/study-objectives/{studyObjectiveId}/quizzes | List quizzes and flashcards for a study objective
|
|
141
|
-
*StudyObjectivesApi* | [**listStudyObjectives**](docs/StudyObjectivesApi.md#liststudyobjectives) | **GET** /api/v1/study-objectives | List study objectives for a course
|
|
141
|
+
*StudyObjectivesApi* | [**listStudyObjectives**](docs/StudyObjectivesApi.md#liststudyobjectives) | **GET** /api/v1/study-objectives | List study objectives for a course or study space
|
|
142
142
|
*StudyObjectivesApi* | [**updateStudyObjective**](docs/StudyObjectivesApi.md#updatestudyobjective) | **PATCH** /api/v1/study-objectives/{studyObjectiveId} | Update a study objective
|
|
143
143
|
*StudyPlansApi* | [**deleteStudyPlan**](docs/StudyPlansApi.md#deletestudyplan) | **DELETE** /api/v1/study-plans/{planId} | Delete a study plan
|
|
144
144
|
*StudyPlansApi* | [**getStudyObjectiveStudyPlan**](docs/StudyPlansApi.md#getstudyobjectivestudyplan) | **GET** /api/v1/study-objectives/{studyObjectiveId}/study-plan | Get a study objective\'s plan
|
|
@@ -147,6 +147,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
147
147
|
*StudyPrepApi* | [**assessCanvasKnowledge**](docs/StudyPrepApi.md#assesscanvasknowledge) | **POST** /api/v1/study-prep/knowledge-assessment | Assess user knowledge from Canvas course grades
|
|
148
148
|
*StudyPrepApi* | [**generateCanvasTaxonomy**](docs/StudyPrepApi.md#generatecanvastaxonomy) | **POST** /api/v1/study-prep/taxonomies | Generate a taxonomy from a Canvas course
|
|
149
149
|
*StudyPrepApi* | [**syncCanvasUserProfile**](docs/StudyPrepApi.md#synccanvasuserprofile) | **POST** /api/v1/study-prep/user-profile | Sync user profile from Canvas
|
|
150
|
+
*StudySpacesApi* | [**createStudySpace**](docs/StudySpacesApi.md#createstudyspace) | **POST** /api/v1/study-spaces | Create a study space the learner names
|
|
151
|
+
*StudySpacesApi* | [**deleteStudySpace**](docs/StudySpacesApi.md#deletestudyspace) | **DELETE** /api/v1/study-spaces/{studySpaceId} | Delete a study space the learner created
|
|
150
152
|
*StudySpacesApi* | [**listStudySpaces**](docs/StudySpacesApi.md#liststudyspaces) | **GET** /api/v1/study-spaces | List the authenticated user\'s study spaces
|
|
151
153
|
*StudySpacesApi* | [**updateStudySpace**](docs/StudySpacesApi.md#updatestudyspace) | **PATCH** /api/v1/study-spaces/{studySpaceId} | Update a study space title
|
|
152
154
|
*SyllabusAnalysisApi* | [**getSyllabusAnalysisStatus**](docs/SyllabusAnalysisApi.md#getsyllabusanalysisstatus) | **GET** /api/v1/syllabus-analysis | Get syllabus analysis status
|
|
@@ -235,6 +237,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
235
237
|
- [CreateStudyObjectiveDtoCanvasObject](docs/CreateStudyObjectiveDtoCanvasObject.md)
|
|
236
238
|
- [CreateStudyPlanDto](docs/CreateStudyPlanDto.md)
|
|
237
239
|
- [CreateStudyPlanDtoActivitiesInner](docs/CreateStudyPlanDtoActivitiesInner.md)
|
|
240
|
+
- [CreateStudySpaceDto](docs/CreateStudySpaceDto.md)
|
|
238
241
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
239
242
|
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
240
243
|
- [DailyQuizStatus](docs/DailyQuizStatus.md)
|
|
@@ -49,9 +49,10 @@ export interface ListStudyObjectiveQuizzesRequest {
|
|
|
49
49
|
}
|
|
50
50
|
export interface ListStudyObjectivesRequest {
|
|
51
51
|
xUserId: string;
|
|
52
|
-
courseId: string;
|
|
53
52
|
limit?: number;
|
|
54
53
|
cursor?: string;
|
|
54
|
+
courseId?: string;
|
|
55
|
+
studySpaceId?: string;
|
|
55
56
|
status?: ListStudyObjectivesStatusEnum;
|
|
56
57
|
}
|
|
57
58
|
export interface UpdateStudyObjectiveRequest {
|
|
@@ -74,12 +75,12 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
74
75
|
*/
|
|
75
76
|
createObjectiveResource(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectiveResource>;
|
|
76
77
|
/**
|
|
77
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
78
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
78
79
|
* Create or upsert a study objective
|
|
79
80
|
*/
|
|
80
81
|
createStudyObjectiveRaw(requestParameters: CreateStudyObjectiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyObjective>>;
|
|
81
82
|
/**
|
|
82
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
83
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
83
84
|
* Create or upsert a study objective
|
|
84
85
|
*/
|
|
85
86
|
createStudyObjective(requestParameters: CreateStudyObjectiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyObjective>;
|
|
@@ -128,13 +129,13 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
128
129
|
*/
|
|
129
130
|
listStudyObjectiveQuizzes(requestParameters: ListStudyObjectiveQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizzes>;
|
|
130
131
|
/**
|
|
131
|
-
* Returns study objectives for the authenticated user
|
|
132
|
-
* List study objectives for a course
|
|
132
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
133
|
+
* List study objectives for a course or study space
|
|
133
134
|
*/
|
|
134
135
|
listStudyObjectivesRaw(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStudyObjectives>>;
|
|
135
136
|
/**
|
|
136
|
-
* Returns study objectives for the authenticated user
|
|
137
|
-
* List study objectives for a course
|
|
137
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
138
|
+
* List study objectives for a course or study space
|
|
138
139
|
*/
|
|
139
140
|
listStudyObjectives(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyObjectives>;
|
|
140
141
|
/**
|
|
@@ -76,7 +76,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
79
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
80
80
|
* Create or upsert a study objective
|
|
81
81
|
*/
|
|
82
82
|
createStudyObjectiveRaw(requestParameters, initOverrides) {
|
|
@@ -111,7 +111,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
114
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
115
115
|
* Create or upsert a study objective
|
|
116
116
|
*/
|
|
117
117
|
createStudyObjective(requestParameters, initOverrides) {
|
|
@@ -337,17 +337,14 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
340
|
-
* Returns study objectives for the authenticated user
|
|
341
|
-
* List study objectives for a course
|
|
340
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
341
|
+
* List study objectives for a course or study space
|
|
342
342
|
*/
|
|
343
343
|
listStudyObjectivesRaw(requestParameters, initOverrides) {
|
|
344
344
|
return __awaiter(this, void 0, void 0, function* () {
|
|
345
345
|
if (requestParameters['xUserId'] == null) {
|
|
346
346
|
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudyObjectives().');
|
|
347
347
|
}
|
|
348
|
-
if (requestParameters['courseId'] == null) {
|
|
349
|
-
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling listStudyObjectives().');
|
|
350
|
-
}
|
|
351
348
|
const queryParameters = {};
|
|
352
349
|
if (requestParameters['limit'] != null) {
|
|
353
350
|
queryParameters['limit'] = requestParameters['limit'];
|
|
@@ -358,6 +355,9 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
358
355
|
if (requestParameters['courseId'] != null) {
|
|
359
356
|
queryParameters['courseId'] = requestParameters['courseId'];
|
|
360
357
|
}
|
|
358
|
+
if (requestParameters['studySpaceId'] != null) {
|
|
359
|
+
queryParameters['studySpaceId'] = requestParameters['studySpaceId'];
|
|
360
|
+
}
|
|
361
361
|
if (requestParameters['status'] != null) {
|
|
362
362
|
queryParameters['status'] = requestParameters['status'];
|
|
363
363
|
}
|
|
@@ -379,8 +379,8 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
/**
|
|
382
|
-
* Returns study objectives for the authenticated user
|
|
383
|
-
* List study objectives for a course
|
|
382
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
383
|
+
* List study objectives for a course or study space
|
|
384
384
|
*/
|
|
385
385
|
listStudyObjectives(requestParameters, initOverrides) {
|
|
386
386
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { StudySpace, UpdateStudySpaceDto } from '../models/index';
|
|
13
|
+
import type { CreateStudySpaceDto, StudySpace, UpdateStudySpaceDto } from '../models/index';
|
|
14
|
+
export interface CreateStudySpaceRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
createStudySpaceDto: CreateStudySpaceDto;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteStudySpaceRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
studySpaceId: string;
|
|
21
|
+
}
|
|
14
22
|
export interface ListStudySpacesRequest {
|
|
15
23
|
xUserId: string;
|
|
16
24
|
}
|
|
@@ -24,12 +32,32 @@ export interface UpdateStudySpaceRequest {
|
|
|
24
32
|
*/
|
|
25
33
|
export declare class StudySpacesApi extends runtime.BaseAPI {
|
|
26
34
|
/**
|
|
27
|
-
*
|
|
35
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
36
|
+
* Create a study space the learner names
|
|
37
|
+
*/
|
|
38
|
+
createStudySpaceRaw(requestParameters: CreateStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudySpace>>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
41
|
+
* Create a study space the learner names
|
|
42
|
+
*/
|
|
43
|
+
createStudySpace(requestParameters: CreateStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudySpace>;
|
|
44
|
+
/**
|
|
45
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
46
|
+
* Delete a study space the learner created
|
|
47
|
+
*/
|
|
48
|
+
deleteStudySpaceRaw(requestParameters: DeleteStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
49
|
+
/**
|
|
50
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
51
|
+
* Delete a study space the learner created
|
|
52
|
+
*/
|
|
53
|
+
deleteStudySpace(requestParameters: DeleteStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
28
56
|
* List the authenticated user\'s study spaces
|
|
29
57
|
*/
|
|
30
58
|
listStudySpacesRaw(requestParameters: ListStudySpacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpace>>>;
|
|
31
59
|
/**
|
|
32
|
-
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per course, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
60
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
33
61
|
* List the authenticated user\'s study spaces
|
|
34
62
|
*/
|
|
35
63
|
listStudySpaces(requestParameters: ListStudySpacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpace>>;
|
|
@@ -30,7 +30,89 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class StudySpacesApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
34
|
+
* Create a study space the learner names
|
|
35
|
+
*/
|
|
36
|
+
createStudySpaceRaw(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 createStudySpace().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['createStudySpaceDto'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('createStudySpaceDto', 'Required parameter "createStudySpaceDto" was null or undefined when calling createStudySpace().');
|
|
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/study-spaces`;
|
|
54
|
+
const response = yield this.request({
|
|
55
|
+
path: urlPath,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: headerParameters,
|
|
58
|
+
query: queryParameters,
|
|
59
|
+
body: (0, index_1.CreateStudySpaceDtoToJSON)(requestParameters['createStudySpaceDto']),
|
|
60
|
+
}, initOverrides);
|
|
61
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudySpaceFromJSON)(jsonValue));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
66
|
+
* Create a study space the learner names
|
|
67
|
+
*/
|
|
68
|
+
createStudySpace(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield this.createStudySpaceRaw(requestParameters, initOverrides);
|
|
71
|
+
return yield response.value();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
76
|
+
* Delete a study space the learner created
|
|
77
|
+
*/
|
|
78
|
+
deleteStudySpaceRaw(requestParameters, initOverrides) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
if (requestParameters['xUserId'] == null) {
|
|
81
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling deleteStudySpace().');
|
|
82
|
+
}
|
|
83
|
+
if (requestParameters['studySpaceId'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('studySpaceId', 'Required parameter "studySpaceId" was null or undefined when calling deleteStudySpace().');
|
|
85
|
+
}
|
|
86
|
+
const queryParameters = {};
|
|
87
|
+
const headerParameters = {};
|
|
88
|
+
if (requestParameters['xUserId'] != null) {
|
|
89
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
90
|
+
}
|
|
91
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
92
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/api/v1/study-spaces/{studySpaceId}`;
|
|
95
|
+
urlPath = urlPath.replace(`{${"studySpaceId"}}`, encodeURIComponent(String(requestParameters['studySpaceId'])));
|
|
96
|
+
const response = yield this.request({
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'DELETE',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
}, initOverrides);
|
|
102
|
+
return new runtime.VoidApiResponse(response);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
107
|
+
* Delete a study space the learner created
|
|
108
|
+
*/
|
|
109
|
+
deleteStudySpace(requestParameters, initOverrides) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
yield this.deleteStudySpaceRaw(requestParameters, initOverrides);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
34
116
|
* List the authenticated user\'s study spaces
|
|
35
117
|
*/
|
|
36
118
|
listStudySpacesRaw(requestParameters, initOverrides) {
|
|
@@ -57,7 +139,7 @@ class StudySpacesApi extends runtime.BaseAPI {
|
|
|
57
139
|
});
|
|
58
140
|
}
|
|
59
141
|
/**
|
|
60
|
-
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per course, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
142
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
61
143
|
* List the authenticated user\'s study spaces
|
|
62
144
|
*/
|
|
63
145
|
listStudySpaces(requestParameters, initOverrides) {
|
|
@@ -49,9 +49,10 @@ export interface ListStudyObjectiveQuizzesRequest {
|
|
|
49
49
|
}
|
|
50
50
|
export interface ListStudyObjectivesRequest {
|
|
51
51
|
xUserId: string;
|
|
52
|
-
courseId: string;
|
|
53
52
|
limit?: number;
|
|
54
53
|
cursor?: string;
|
|
54
|
+
courseId?: string;
|
|
55
|
+
studySpaceId?: string;
|
|
55
56
|
status?: ListStudyObjectivesStatusEnum;
|
|
56
57
|
}
|
|
57
58
|
export interface UpdateStudyObjectiveRequest {
|
|
@@ -74,12 +75,12 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
74
75
|
*/
|
|
75
76
|
createObjectiveResource(requestParameters: CreateObjectiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectiveResource>;
|
|
76
77
|
/**
|
|
77
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
78
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
78
79
|
* Create or upsert a study objective
|
|
79
80
|
*/
|
|
80
81
|
createStudyObjectiveRaw(requestParameters: CreateStudyObjectiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyObjective>>;
|
|
81
82
|
/**
|
|
82
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
83
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
83
84
|
* Create or upsert a study objective
|
|
84
85
|
*/
|
|
85
86
|
createStudyObjective(requestParameters: CreateStudyObjectiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyObjective>;
|
|
@@ -128,13 +129,13 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
128
129
|
*/
|
|
129
130
|
listStudyObjectiveQuizzes(requestParameters: ListStudyObjectiveQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizzes>;
|
|
130
131
|
/**
|
|
131
|
-
* Returns study objectives for the authenticated user
|
|
132
|
-
* List study objectives for a course
|
|
132
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
133
|
+
* List study objectives for a course or study space
|
|
133
134
|
*/
|
|
134
135
|
listStudyObjectivesRaw(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStudyObjectives>>;
|
|
135
136
|
/**
|
|
136
|
-
* Returns study objectives for the authenticated user
|
|
137
|
-
* List study objectives for a course
|
|
137
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
138
|
+
* List study objectives for a course or study space
|
|
138
139
|
*/
|
|
139
140
|
listStudyObjectives(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyObjectives>;
|
|
140
141
|
/**
|
|
@@ -73,7 +73,7 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
76
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
77
77
|
* Create or upsert a study objective
|
|
78
78
|
*/
|
|
79
79
|
createStudyObjectiveRaw(requestParameters, initOverrides) {
|
|
@@ -108,7 +108,7 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
* Creates a study objective. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate.
|
|
111
|
+
* Creates a study objective in one of the learner\'s study spaces, addressed either by `courseId` (the space for that Canvas course, created on first use) or by `studySpaceId` (an existing space, which is how an objective reaches a space that has no Canvas course). Exactly one of the two is required. An objective filed by `studySpaceId` inherits the space\'s course, so a space with no Canvas course produces an objective with no course id, reachable only through `GET ?studySpaceId=`. When the body includes `canvasObject` metadata, the Canvas object is mirrored into the source-of-truth table (upserted on its Canvas identity) and the objective is upserted on (user, Canvas object): re-syncing the same Canvas item updates the user\'s existing objective rather than inserting a duplicate. `canvasObject` requires `courseId` and the X-Canvas-Domain header. Without `canvasObject`, this always inserts a new custom objective.
|
|
112
112
|
* Create or upsert a study objective
|
|
113
113
|
*/
|
|
114
114
|
createStudyObjective(requestParameters, initOverrides) {
|
|
@@ -334,17 +334,14 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
|
-
* Returns study objectives for the authenticated user
|
|
338
|
-
* List study objectives for a course
|
|
337
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
338
|
+
* List study objectives for a course or study space
|
|
339
339
|
*/
|
|
340
340
|
listStudyObjectivesRaw(requestParameters, initOverrides) {
|
|
341
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
342
|
if (requestParameters['xUserId'] == null) {
|
|
343
343
|
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudyObjectives().');
|
|
344
344
|
}
|
|
345
|
-
if (requestParameters['courseId'] == null) {
|
|
346
|
-
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling listStudyObjectives().');
|
|
347
|
-
}
|
|
348
345
|
const queryParameters = {};
|
|
349
346
|
if (requestParameters['limit'] != null) {
|
|
350
347
|
queryParameters['limit'] = requestParameters['limit'];
|
|
@@ -355,6 +352,9 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
355
352
|
if (requestParameters['courseId'] != null) {
|
|
356
353
|
queryParameters['courseId'] = requestParameters['courseId'];
|
|
357
354
|
}
|
|
355
|
+
if (requestParameters['studySpaceId'] != null) {
|
|
356
|
+
queryParameters['studySpaceId'] = requestParameters['studySpaceId'];
|
|
357
|
+
}
|
|
358
358
|
if (requestParameters['status'] != null) {
|
|
359
359
|
queryParameters['status'] = requestParameters['status'];
|
|
360
360
|
}
|
|
@@ -376,8 +376,8 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
/**
|
|
379
|
-
* Returns study objectives for the authenticated user
|
|
380
|
-
* List study objectives for a course
|
|
379
|
+
* Returns study objectives for the authenticated user within one scope, ordered by creation date (newest first). Scope is either `courseId` (every objective the learner has for that Canvas course) or `studySpaceId` (every objective filed in that space, which is the only way to reach a space that has no Canvas course). Exactly one of the two is required.
|
|
380
|
+
* List study objectives for a course or study space
|
|
381
381
|
*/
|
|
382
382
|
listStudyObjectives(requestParameters, initOverrides) {
|
|
383
383
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { StudySpace, UpdateStudySpaceDto } from '../models/index';
|
|
13
|
+
import type { CreateStudySpaceDto, StudySpace, UpdateStudySpaceDto } from '../models/index';
|
|
14
|
+
export interface CreateStudySpaceRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
createStudySpaceDto: CreateStudySpaceDto;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteStudySpaceRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
studySpaceId: string;
|
|
21
|
+
}
|
|
14
22
|
export interface ListStudySpacesRequest {
|
|
15
23
|
xUserId: string;
|
|
16
24
|
}
|
|
@@ -24,12 +32,32 @@ export interface UpdateStudySpaceRequest {
|
|
|
24
32
|
*/
|
|
25
33
|
export declare class StudySpacesApi extends runtime.BaseAPI {
|
|
26
34
|
/**
|
|
27
|
-
*
|
|
35
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
36
|
+
* Create a study space the learner names
|
|
37
|
+
*/
|
|
38
|
+
createStudySpaceRaw(requestParameters: CreateStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudySpace>>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
41
|
+
* Create a study space the learner names
|
|
42
|
+
*/
|
|
43
|
+
createStudySpace(requestParameters: CreateStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudySpace>;
|
|
44
|
+
/**
|
|
45
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
46
|
+
* Delete a study space the learner created
|
|
47
|
+
*/
|
|
48
|
+
deleteStudySpaceRaw(requestParameters: DeleteStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
49
|
+
/**
|
|
50
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
51
|
+
* Delete a study space the learner created
|
|
52
|
+
*/
|
|
53
|
+
deleteStudySpace(requestParameters: DeleteStudySpaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
28
56
|
* List the authenticated user\'s study spaces
|
|
29
57
|
*/
|
|
30
58
|
listStudySpacesRaw(requestParameters: ListStudySpacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpace>>>;
|
|
31
59
|
/**
|
|
32
|
-
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per course, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
60
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
33
61
|
* List the authenticated user\'s study spaces
|
|
34
62
|
*/
|
|
35
63
|
listStudySpaces(requestParameters: ListStudySpacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpace>>;
|
|
@@ -21,13 +21,95 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { StudySpaceFromJSON, UpdateStudySpaceDtoToJSON, } from '../models/index';
|
|
24
|
+
import { CreateStudySpaceDtoToJSON, StudySpaceFromJSON, UpdateStudySpaceDtoToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class StudySpacesApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
31
|
+
* Create a study space the learner names
|
|
32
|
+
*/
|
|
33
|
+
createStudySpaceRaw(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 createStudySpace().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['createStudySpaceDto'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createStudySpaceDto', 'Required parameter "createStudySpaceDto" was null or undefined when calling createStudySpace().');
|
|
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/study-spaces`;
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: CreateStudySpaceDtoToJSON(requestParameters['createStudySpaceDto']),
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudySpaceFromJSON(jsonValue));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Creates an empty study space for the authenticated user with no Canvas course behind it, so a learner can organize study work that isn\'t tied to a course. Titles are trimmed and must be non-empty; several spaces may share a title, since a learner\'s own labels are not required to be unique. `courseId` is not accepted and is rejected if sent: a Canvas-backed space is resolved (and created on first use) from the course when an objective is filed into it, so it is never created directly.
|
|
63
|
+
* Create a study space the learner names
|
|
64
|
+
*/
|
|
65
|
+
createStudySpace(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.createStudySpaceRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
73
|
+
* Delete a study space the learner created
|
|
74
|
+
*/
|
|
75
|
+
deleteStudySpaceRaw(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (requestParameters['xUserId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling deleteStudySpace().');
|
|
79
|
+
}
|
|
80
|
+
if (requestParameters['studySpaceId'] == null) {
|
|
81
|
+
throw new runtime.RequiredError('studySpaceId', 'Required parameter "studySpaceId" was null or undefined when calling deleteStudySpace().');
|
|
82
|
+
}
|
|
83
|
+
const queryParameters = {};
|
|
84
|
+
const headerParameters = {};
|
|
85
|
+
if (requestParameters['xUserId'] != null) {
|
|
86
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
87
|
+
}
|
|
88
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
89
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
90
|
+
}
|
|
91
|
+
let urlPath = `/api/v1/study-spaces/{studySpaceId}`;
|
|
92
|
+
urlPath = urlPath.replace(`{${"studySpaceId"}}`, encodeURIComponent(String(requestParameters['studySpaceId'])));
|
|
93
|
+
const response = yield this.request({
|
|
94
|
+
path: urlPath,
|
|
95
|
+
method: 'DELETE',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.VoidApiResponse(response);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Deletes one of the authenticated user\'s study spaces along with every study objective in it, including archived ones. Restricted to a space with no Canvas course: a Canvas-backed space is recreated the next time an objective is filed into its course, so deleting one is rejected rather than silently undone. This destroys study work — `activeObjectiveCount` on the space says how much, so a client can confirm with the learner before calling.
|
|
104
|
+
* Delete a study space the learner created
|
|
105
|
+
*/
|
|
106
|
+
deleteStudySpace(requestParameters, initOverrides) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
yield this.deleteStudySpaceRaw(requestParameters, initOverrides);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
31
113
|
* List the authenticated user\'s study spaces
|
|
32
114
|
*/
|
|
33
115
|
listStudySpacesRaw(requestParameters, initOverrides) {
|
|
@@ -54,7 +136,7 @@ export class StudySpacesApi extends runtime.BaseAPI {
|
|
|
54
136
|
});
|
|
55
137
|
}
|
|
56
138
|
/**
|
|
57
|
-
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per course, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
139
|
+
* Returns the persisted study spaces of the authenticated user, oldest first, each with its count of non-archived objectives. Spaces with no objectives are included. Unpaginated: a learner holds at most one space per Canvas course, plus however many they have created themselves — a set they organize by hand either way, so the list is returned in full. A client that also renders live Canvas enrollments can merge these in, so a learner still sees the courses they have study history for when their Canvas connection is unavailable.
|
|
58
140
|
* List the authenticated user\'s study spaces
|
|
59
141
|
*/
|
|
60
142
|
listStudySpaces(requestParameters, initOverrides) {
|
|
@@ -46,11 +46,11 @@ export interface AdminStudyObjectiveListItem {
|
|
|
46
46
|
*/
|
|
47
47
|
source: AdminStudyObjectiveListItemSourceEnum;
|
|
48
48
|
/**
|
|
49
|
-
* External course identifier
|
|
49
|
+
* External course identifier, or null for an objective in a study space with no Canvas course
|
|
50
50
|
* @type {string}
|
|
51
51
|
* @memberof AdminStudyObjectiveListItem
|
|
52
52
|
*/
|
|
53
|
-
courseId: string;
|
|
53
|
+
courseId: string | null;
|
|
54
54
|
/**
|
|
55
55
|
*
|
|
56
56
|
* @type {string}
|
|
@@ -42,13 +42,19 @@ export interface CreateStudyObjectiveDto {
|
|
|
42
42
|
*/
|
|
43
43
|
dueAt?: Date | null;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Canvas course the objective belongs to. The learner's study space for this course is resolved (created on first use) and the objective is linked to it. Mutually exclusive with `studySpaceId`; exactly one of the two is required.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof CreateStudyObjectiveDto
|
|
48
|
+
*/
|
|
49
|
+
courseId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Existing study space to file the objective in, addressed directly rather than through a Canvas course. Use this for a space with no Canvas course; the objective is created with no course id. Mutually exclusive with `courseId`; exactly one of the two is required.
|
|
46
52
|
* @type {string}
|
|
47
53
|
* @memberof CreateStudyObjectiveDto
|
|
48
54
|
*/
|
|
49
|
-
|
|
55
|
+
studySpaceId?: string;
|
|
50
56
|
/**
|
|
51
|
-
* Display name of the Canvas course. Used to name the learner's study space for this course when it has no name yet; an existing name is never overwritten.
|
|
57
|
+
* Display name of the Canvas course. Used to name the learner's study space for this course when it has no name yet; an existing name is never overwritten. Only meaningful alongside `courseId` — a space addressed by `studySpaceId` already exists and is renamed through the study-spaces endpoint.
|
|
52
58
|
* @type {string}
|
|
53
59
|
* @memberof CreateStudyObjectiveDto
|
|
54
60
|
*/
|
|
@@ -19,8 +19,6 @@ import { CreateStudyObjectiveDtoCanvasObjectFromJSON, CreateStudyObjectiveDtoCan
|
|
|
19
19
|
export function instanceOfCreateStudyObjectiveDto(value) {
|
|
20
20
|
if (!('title' in value) || value['title'] === undefined)
|
|
21
21
|
return false;
|
|
22
|
-
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
23
|
-
return false;
|
|
24
22
|
return true;
|
|
25
23
|
}
|
|
26
24
|
export function CreateStudyObjectiveDtoFromJSON(json) {
|
|
@@ -35,7 +33,8 @@ export function CreateStudyObjectiveDtoFromJSONTyped(json, ignoreDiscriminator)
|
|
|
35
33
|
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
36
34
|
'canvasDocuments': json['canvasDocuments'] == null ? undefined : (json['canvasDocuments'].map(CreateStudyObjectiveDtoCanvasDocumentsInnerFromJSON)),
|
|
37
35
|
'dueAt': json['dueAt'] == null ? undefined : (new Date(json['dueAt'])),
|
|
38
|
-
'courseId': json['courseId'],
|
|
36
|
+
'courseId': json['courseId'] == null ? undefined : json['courseId'],
|
|
37
|
+
'studySpaceId': json['studySpaceId'] == null ? undefined : json['studySpaceId'],
|
|
39
38
|
'courseName': json['courseName'] == null ? undefined : json['courseName'],
|
|
40
39
|
'canvasObject': json['canvasObject'] == null ? undefined : CreateStudyObjectiveDtoCanvasObjectFromJSON(json['canvasObject']),
|
|
41
40
|
};
|
|
@@ -53,6 +52,7 @@ export function CreateStudyObjectiveDtoToJSONTyped(value, ignoreDiscriminator =
|
|
|
53
52
|
'canvasDocuments': value['canvasDocuments'] == null ? undefined : (value['canvasDocuments'].map(CreateStudyObjectiveDtoCanvasDocumentsInnerToJSON)),
|
|
54
53
|
'dueAt': value['dueAt'] == null ? value['dueAt'] : value['dueAt'].toISOString(),
|
|
55
54
|
'courseId': value['courseId'],
|
|
55
|
+
'studySpaceId': value['studySpaceId'],
|
|
56
56
|
'courseName': value['courseName'],
|
|
57
57
|
'canvasObject': CreateStudyObjectiveDtoCanvasObjectToJSON(value['canvasObject']),
|
|
58
58
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 CreateStudySpaceDto
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateStudySpaceDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateStudySpaceDto
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CreateStudySpaceDto interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfCreateStudySpaceDto(value: object): value is CreateStudySpaceDto;
|
|
29
|
+
export declare function CreateStudySpaceDtoFromJSON(json: any): CreateStudySpaceDto;
|
|
30
|
+
export declare function CreateStudySpaceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateStudySpaceDto;
|
|
31
|
+
export declare function CreateStudySpaceDtoToJSON(json: any): CreateStudySpaceDto;
|
|
32
|
+
export declare function CreateStudySpaceDtoToJSONTyped(value?: CreateStudySpaceDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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 CreateStudySpaceDto interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCreateStudySpaceDto(value) {
|
|
18
|
+
if (!('title' in value) || value['title'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function CreateStudySpaceDtoFromJSON(json) {
|
|
23
|
+
return CreateStudySpaceDtoFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function CreateStudySpaceDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'title': json['title'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function CreateStudySpaceDtoToJSON(json) {
|
|
34
|
+
return CreateStudySpaceDtoToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function CreateStudySpaceDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'title': value['title'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -30,11 +30,17 @@ export interface StudyObjective {
|
|
|
30
30
|
*/
|
|
31
31
|
accountUserId: string;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Canvas course this objective belongs to, or null when it was filed into a study space that has no Canvas course. A null course id means no Canvas surface applies to the objective, and it is discoverable only through the space-scoped list (a single-item GET by id still works).
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof StudyObjective
|
|
36
|
+
*/
|
|
37
|
+
courseId: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* study_spaces.id of the space this objective is filed in. The only route from an objective back to its space, which is what a client needs when `courseId` is null and no course can stand in for it. Null only on rows predating the study-space rollout.
|
|
34
40
|
* @type {string}
|
|
35
41
|
* @memberof StudyObjective
|
|
36
42
|
*/
|
|
37
|
-
|
|
43
|
+
studySpaceId: string | null;
|
|
38
44
|
/**
|
|
39
45
|
* canvas_objects.id of the mirrored Canvas object this objective derives from, or null for user-created objectives.
|
|
40
46
|
* @type {string}
|
|
@@ -30,6 +30,8 @@ export function instanceOfStudyObjective(value) {
|
|
|
30
30
|
return false;
|
|
31
31
|
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
32
32
|
return false;
|
|
33
|
+
if (!('studySpaceId' in value) || value['studySpaceId'] === undefined)
|
|
34
|
+
return false;
|
|
33
35
|
if (!('canvasObjectId' in value) || value['canvasObjectId'] === undefined)
|
|
34
36
|
return false;
|
|
35
37
|
if (!('canvasObjectRef' in value) || value['canvasObjectRef'] === undefined)
|
|
@@ -65,6 +67,7 @@ export function StudyObjectiveFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
67
|
'id': json['id'],
|
|
66
68
|
'accountUserId': json['accountUserId'],
|
|
67
69
|
'courseId': json['courseId'],
|
|
70
|
+
'studySpaceId': json['studySpaceId'],
|
|
68
71
|
'canvasObjectId': json['canvasObjectId'],
|
|
69
72
|
'canvasObjectRef': json['canvasObjectRef'],
|
|
70
73
|
'source': json['source'],
|
|
@@ -89,6 +92,7 @@ export function StudyObjectiveToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
89
92
|
'id': value['id'],
|
|
90
93
|
'accountUserId': value['accountUserId'],
|
|
91
94
|
'courseId': value['courseId'],
|
|
95
|
+
'studySpaceId': value['studySpaceId'],
|
|
92
96
|
'canvasObjectId': value['canvasObjectId'],
|
|
93
97
|
'canvasObjectRef': value['canvasObjectRef'],
|
|
94
98
|
'source': value['source'],
|
|
@@ -55,6 +55,7 @@ export * from './CreateStudyObjectiveDtoCanvasDocumentsInner';
|
|
|
55
55
|
export * from './CreateStudyObjectiveDtoCanvasObject';
|
|
56
56
|
export * from './CreateStudyPlanDto';
|
|
57
57
|
export * from './CreateStudyPlanDtoActivitiesInner';
|
|
58
|
+
export * from './CreateStudySpaceDto';
|
|
58
59
|
export * from './CreateTokenRequest';
|
|
59
60
|
export * from './CreateTokenResponse';
|
|
60
61
|
export * from './DailyQuizStatus';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -57,6 +57,7 @@ export * from './CreateStudyObjectiveDtoCanvasDocumentsInner';
|
|
|
57
57
|
export * from './CreateStudyObjectiveDtoCanvasObject';
|
|
58
58
|
export * from './CreateStudyPlanDto';
|
|
59
59
|
export * from './CreateStudyPlanDtoActivitiesInner';
|
|
60
|
+
export * from './CreateStudySpaceDto';
|
|
60
61
|
export * from './CreateTokenRequest';
|
|
61
62
|
export * from './CreateTokenResponse';
|
|
62
63
|
export * from './DailyQuizStatus';
|
|
@@ -46,11 +46,11 @@ export interface AdminStudyObjectiveListItem {
|
|
|
46
46
|
*/
|
|
47
47
|
source: AdminStudyObjectiveListItemSourceEnum;
|
|
48
48
|
/**
|
|
49
|
-
* External course identifier
|
|
49
|
+
* External course identifier, or null for an objective in a study space with no Canvas course
|
|
50
50
|
* @type {string}
|
|
51
51
|
* @memberof AdminStudyObjectiveListItem
|
|
52
52
|
*/
|
|
53
|
-
courseId: string;
|
|
53
|
+
courseId: string | null;
|
|
54
54
|
/**
|
|
55
55
|
*
|
|
56
56
|
* @type {string}
|
|
@@ -42,13 +42,19 @@ export interface CreateStudyObjectiveDto {
|
|
|
42
42
|
*/
|
|
43
43
|
dueAt?: Date | null;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Canvas course the objective belongs to. The learner's study space for this course is resolved (created on first use) and the objective is linked to it. Mutually exclusive with `studySpaceId`; exactly one of the two is required.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof CreateStudyObjectiveDto
|
|
48
|
+
*/
|
|
49
|
+
courseId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Existing study space to file the objective in, addressed directly rather than through a Canvas course. Use this for a space with no Canvas course; the objective is created with no course id. Mutually exclusive with `courseId`; exactly one of the two is required.
|
|
46
52
|
* @type {string}
|
|
47
53
|
* @memberof CreateStudyObjectiveDto
|
|
48
54
|
*/
|
|
49
|
-
|
|
55
|
+
studySpaceId?: string;
|
|
50
56
|
/**
|
|
51
|
-
* Display name of the Canvas course. Used to name the learner's study space for this course when it has no name yet; an existing name is never overwritten.
|
|
57
|
+
* Display name of the Canvas course. Used to name the learner's study space for this course when it has no name yet; an existing name is never overwritten. Only meaningful alongside `courseId` — a space addressed by `studySpaceId` already exists and is renamed through the study-spaces endpoint.
|
|
52
58
|
* @type {string}
|
|
53
59
|
* @memberof CreateStudyObjectiveDto
|
|
54
60
|
*/
|
|
@@ -26,8 +26,6 @@ const CreateStudyObjectiveDtoCanvasObject_1 = require("./CreateStudyObjectiveDto
|
|
|
26
26
|
function instanceOfCreateStudyObjectiveDto(value) {
|
|
27
27
|
if (!('title' in value) || value['title'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
30
|
-
return false;
|
|
31
29
|
return true;
|
|
32
30
|
}
|
|
33
31
|
function CreateStudyObjectiveDtoFromJSON(json) {
|
|
@@ -42,7 +40,8 @@ function CreateStudyObjectiveDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
40
|
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
43
41
|
'canvasDocuments': json['canvasDocuments'] == null ? undefined : (json['canvasDocuments'].map(CreateStudyObjectiveDtoCanvasDocumentsInner_1.CreateStudyObjectiveDtoCanvasDocumentsInnerFromJSON)),
|
|
44
42
|
'dueAt': json['dueAt'] == null ? undefined : (new Date(json['dueAt'])),
|
|
45
|
-
'courseId': json['courseId'],
|
|
43
|
+
'courseId': json['courseId'] == null ? undefined : json['courseId'],
|
|
44
|
+
'studySpaceId': json['studySpaceId'] == null ? undefined : json['studySpaceId'],
|
|
46
45
|
'courseName': json['courseName'] == null ? undefined : json['courseName'],
|
|
47
46
|
'canvasObject': json['canvasObject'] == null ? undefined : (0, CreateStudyObjectiveDtoCanvasObject_1.CreateStudyObjectiveDtoCanvasObjectFromJSON)(json['canvasObject']),
|
|
48
47
|
};
|
|
@@ -60,6 +59,7 @@ function CreateStudyObjectiveDtoToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
60
59
|
'canvasDocuments': value['canvasDocuments'] == null ? undefined : (value['canvasDocuments'].map(CreateStudyObjectiveDtoCanvasDocumentsInner_1.CreateStudyObjectiveDtoCanvasDocumentsInnerToJSON)),
|
|
61
60
|
'dueAt': value['dueAt'] == null ? value['dueAt'] : value['dueAt'].toISOString(),
|
|
62
61
|
'courseId': value['courseId'],
|
|
62
|
+
'studySpaceId': value['studySpaceId'],
|
|
63
63
|
'courseName': value['courseName'],
|
|
64
64
|
'canvasObject': (0, CreateStudyObjectiveDtoCanvasObject_1.CreateStudyObjectiveDtoCanvasObjectToJSON)(value['canvasObject']),
|
|
65
65
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 CreateStudySpaceDto
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateStudySpaceDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateStudySpaceDto
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CreateStudySpaceDto interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfCreateStudySpaceDto(value: object): value is CreateStudySpaceDto;
|
|
29
|
+
export declare function CreateStudySpaceDtoFromJSON(json: any): CreateStudySpaceDto;
|
|
30
|
+
export declare function CreateStudySpaceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateStudySpaceDto;
|
|
31
|
+
export declare function CreateStudySpaceDtoToJSON(json: any): CreateStudySpaceDto;
|
|
32
|
+
export declare function CreateStudySpaceDtoToJSONTyped(value?: CreateStudySpaceDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCreateStudySpaceDto = instanceOfCreateStudySpaceDto;
|
|
17
|
+
exports.CreateStudySpaceDtoFromJSON = CreateStudySpaceDtoFromJSON;
|
|
18
|
+
exports.CreateStudySpaceDtoFromJSONTyped = CreateStudySpaceDtoFromJSONTyped;
|
|
19
|
+
exports.CreateStudySpaceDtoToJSON = CreateStudySpaceDtoToJSON;
|
|
20
|
+
exports.CreateStudySpaceDtoToJSONTyped = CreateStudySpaceDtoToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateStudySpaceDto interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCreateStudySpaceDto(value) {
|
|
25
|
+
if (!('title' in value) || value['title'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function CreateStudySpaceDtoFromJSON(json) {
|
|
30
|
+
return CreateStudySpaceDtoFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function CreateStudySpaceDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'title': json['title'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function CreateStudySpaceDtoToJSON(json) {
|
|
41
|
+
return CreateStudySpaceDtoToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function CreateStudySpaceDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'title': value['title'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -30,11 +30,17 @@ export interface StudyObjective {
|
|
|
30
30
|
*/
|
|
31
31
|
accountUserId: string;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Canvas course this objective belongs to, or null when it was filed into a study space that has no Canvas course. A null course id means no Canvas surface applies to the objective, and it is discoverable only through the space-scoped list (a single-item GET by id still works).
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof StudyObjective
|
|
36
|
+
*/
|
|
37
|
+
courseId: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* study_spaces.id of the space this objective is filed in. The only route from an objective back to its space, which is what a client needs when `courseId` is null and no course can stand in for it. Null only on rows predating the study-space rollout.
|
|
34
40
|
* @type {string}
|
|
35
41
|
* @memberof StudyObjective
|
|
36
42
|
*/
|
|
37
|
-
|
|
43
|
+
studySpaceId: string | null;
|
|
38
44
|
/**
|
|
39
45
|
* canvas_objects.id of the mirrored Canvas object this objective derives from, or null for user-created objectives.
|
|
40
46
|
* @type {string}
|
|
@@ -38,6 +38,8 @@ function instanceOfStudyObjective(value) {
|
|
|
38
38
|
return false;
|
|
39
39
|
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
40
40
|
return false;
|
|
41
|
+
if (!('studySpaceId' in value) || value['studySpaceId'] === undefined)
|
|
42
|
+
return false;
|
|
41
43
|
if (!('canvasObjectId' in value) || value['canvasObjectId'] === undefined)
|
|
42
44
|
return false;
|
|
43
45
|
if (!('canvasObjectRef' in value) || value['canvasObjectRef'] === undefined)
|
|
@@ -73,6 +75,7 @@ function StudyObjectiveFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
75
|
'id': json['id'],
|
|
74
76
|
'accountUserId': json['accountUserId'],
|
|
75
77
|
'courseId': json['courseId'],
|
|
78
|
+
'studySpaceId': json['studySpaceId'],
|
|
76
79
|
'canvasObjectId': json['canvasObjectId'],
|
|
77
80
|
'canvasObjectRef': json['canvasObjectRef'],
|
|
78
81
|
'source': json['source'],
|
|
@@ -97,6 +100,7 @@ function StudyObjectiveToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
97
100
|
'id': value['id'],
|
|
98
101
|
'accountUserId': value['accountUserId'],
|
|
99
102
|
'courseId': value['courseId'],
|
|
103
|
+
'studySpaceId': value['studySpaceId'],
|
|
100
104
|
'canvasObjectId': value['canvasObjectId'],
|
|
101
105
|
'canvasObjectRef': value['canvasObjectRef'],
|
|
102
106
|
'source': value['source'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export * from './CreateStudyObjectiveDtoCanvasDocumentsInner';
|
|
|
55
55
|
export * from './CreateStudyObjectiveDtoCanvasObject';
|
|
56
56
|
export * from './CreateStudyPlanDto';
|
|
57
57
|
export * from './CreateStudyPlanDtoActivitiesInner';
|
|
58
|
+
export * from './CreateStudySpaceDto';
|
|
58
59
|
export * from './CreateTokenRequest';
|
|
59
60
|
export * from './CreateTokenResponse';
|
|
60
61
|
export * from './DailyQuizStatus';
|
package/dist/models/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __exportStar(require("./CreateStudyObjectiveDtoCanvasDocumentsInner"), exports);
|
|
|
73
73
|
__exportStar(require("./CreateStudyObjectiveDtoCanvasObject"), exports);
|
|
74
74
|
__exportStar(require("./CreateStudyPlanDto"), exports);
|
|
75
75
|
__exportStar(require("./CreateStudyPlanDtoActivitiesInner"), exports);
|
|
76
|
+
__exportStar(require("./CreateStudySpaceDto"), exports);
|
|
76
77
|
__exportStar(require("./CreateTokenRequest"), exports);
|
|
77
78
|
__exportStar(require("./CreateTokenResponse"), exports);
|
|
78
79
|
__exportStar(require("./DailyQuizStatus"), exports);
|