@instructure/athena-api-client 3.40.0 → 3.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/apis/StudyObjectivesApi.d.ts +2 -2
- package/dist/apis/StudyObjectivesApi.js +2 -2
- package/dist/apis/StudySpaceTemplatesApi.d.ts +61 -0
- package/dist/apis/StudySpaceTemplatesApi.js +162 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/StudyObjectivesApi.d.ts +2 -2
- package/dist/esm/apis/StudyObjectivesApi.js +2 -2
- package/dist/esm/apis/StudySpaceTemplatesApi.d.ts +61 -0
- package/dist/esm/apis/StudySpaceTemplatesApi.js +158 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminStudyObjectiveListItem.d.ts +2 -1
- package/dist/esm/models/AdminStudyObjectiveListItem.js +2 -1
- package/dist/esm/models/CreateStudySpaceFromTemplateDto.d.ts +38 -0
- package/dist/esm/models/CreateStudySpaceFromTemplateDto.js +45 -0
- package/dist/esm/models/ScheduleStudySpaceTemplateDto.d.ts +32 -0
- package/dist/esm/models/ScheduleStudySpaceTemplateDto.js +43 -0
- package/dist/esm/models/StudyObjective.d.ts +8 -1
- package/dist/esm/models/StudyObjective.js +6 -1
- package/dist/esm/models/StudySpace.d.ts +12 -0
- package/dist/esm/models/StudySpace.js +8 -0
- package/dist/esm/models/StudySpaceFromTemplate.d.ts +40 -0
- package/dist/esm/models/StudySpaceFromTemplate.js +49 -0
- package/dist/esm/models/StudySpaceTemplate.d.ts +117 -0
- package/dist/esm/models/StudySpaceTemplate.js +102 -0
- package/dist/esm/models/StudySpaceTemplateAnchor.d.ts +44 -0
- package/dist/esm/models/StudySpaceTemplateAnchor.js +51 -0
- package/dist/esm/models/StudySpaceTemplateConfirm.d.ts +33 -0
- package/dist/esm/models/StudySpaceTemplateConfirm.js +44 -0
- package/dist/esm/models/StudySpaceTemplateLegal.d.ts +32 -0
- package/dist/esm/models/StudySpaceTemplateLegal.js +43 -0
- package/dist/esm/models/StudySpaceTemplateLink.d.ts +38 -0
- package/dist/esm/models/StudySpaceTemplateLink.js +47 -0
- package/dist/esm/models/StudySpaceTemplateNotice.d.ts +38 -0
- package/dist/esm/models/StudySpaceTemplateNotice.js +47 -0
- package/dist/esm/models/StudySpaceTemplateObjective.d.ts +52 -0
- package/dist/esm/models/StudySpaceTemplateObjective.js +58 -0
- package/dist/esm/models/StudySpaceTemplateProvenance.d.ts +32 -0
- package/dist/esm/models/StudySpaceTemplateProvenance.js +43 -0
- package/dist/esm/models/StudySpaceTemplateSchedule.d.ts +51 -0
- package/dist/esm/models/StudySpaceTemplateSchedule.js +57 -0
- package/dist/esm/models/StudySpaceTemplateScheduleItem.d.ts +50 -0
- package/dist/esm/models/StudySpaceTemplateScheduleItem.js +55 -0
- package/dist/esm/models/SyllabusAnalysisObjective.d.ts +1 -0
- package/dist/esm/models/SyllabusAnalysisObjective.js +2 -1
- package/dist/esm/models/TriggerStudyObjectiveConceptExtractionItemStatus.d.ts +2 -1
- package/dist/esm/models/TriggerStudyObjectiveConceptExtractionItemStatus.js +1 -0
- package/dist/esm/models/UpcomingStudyObjective.d.ts +8 -1
- package/dist/esm/models/UpcomingStudyObjective.js +6 -1
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +13 -0
- package/dist/models/AdminStudyObjectiveListItem.d.ts +2 -1
- package/dist/models/AdminStudyObjectiveListItem.js +2 -1
- package/dist/models/CreateStudySpaceFromTemplateDto.d.ts +38 -0
- package/dist/models/CreateStudySpaceFromTemplateDto.js +52 -0
- package/dist/models/ScheduleStudySpaceTemplateDto.d.ts +32 -0
- package/dist/models/ScheduleStudySpaceTemplateDto.js +50 -0
- package/dist/models/StudyObjective.d.ts +8 -1
- package/dist/models/StudyObjective.js +6 -1
- package/dist/models/StudySpace.d.ts +12 -0
- package/dist/models/StudySpace.js +8 -0
- package/dist/models/StudySpaceFromTemplate.d.ts +40 -0
- package/dist/models/StudySpaceFromTemplate.js +56 -0
- package/dist/models/StudySpaceTemplate.d.ts +117 -0
- package/dist/models/StudySpaceTemplate.js +109 -0
- package/dist/models/StudySpaceTemplateAnchor.d.ts +44 -0
- package/dist/models/StudySpaceTemplateAnchor.js +58 -0
- package/dist/models/StudySpaceTemplateConfirm.d.ts +33 -0
- package/dist/models/StudySpaceTemplateConfirm.js +51 -0
- package/dist/models/StudySpaceTemplateLegal.d.ts +32 -0
- package/dist/models/StudySpaceTemplateLegal.js +50 -0
- package/dist/models/StudySpaceTemplateLink.d.ts +38 -0
- package/dist/models/StudySpaceTemplateLink.js +54 -0
- package/dist/models/StudySpaceTemplateNotice.d.ts +38 -0
- package/dist/models/StudySpaceTemplateNotice.js +54 -0
- package/dist/models/StudySpaceTemplateObjective.d.ts +52 -0
- package/dist/models/StudySpaceTemplateObjective.js +66 -0
- package/dist/models/StudySpaceTemplateProvenance.d.ts +32 -0
- package/dist/models/StudySpaceTemplateProvenance.js +50 -0
- package/dist/models/StudySpaceTemplateSchedule.d.ts +51 -0
- package/dist/models/StudySpaceTemplateSchedule.js +65 -0
- package/dist/models/StudySpaceTemplateScheduleItem.d.ts +50 -0
- package/dist/models/StudySpaceTemplateScheduleItem.js +62 -0
- package/dist/models/SyllabusAnalysisObjective.d.ts +1 -0
- package/dist/models/SyllabusAnalysisObjective.js +2 -1
- package/dist/models/TriggerStudyObjectiveConceptExtractionItemStatus.d.ts +2 -1
- package/dist/models/TriggerStudyObjectiveConceptExtractionItemStatus.js +1 -0
- package/dist/models/UpcomingStudyObjective.d.ts +8 -1
- package/dist/models/UpcomingStudyObjective.js +6 -1
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,9 @@ All URIs are relative to *http://localhost:3000*
|
|
|
160
160
|
*StudyPrepApi* | [**assessCanvasKnowledge**](docs/StudyPrepApi.md#assesscanvasknowledge) | **POST** /api/v1/study-prep/knowledge-assessment | Assess user knowledge from Canvas course grades
|
|
161
161
|
*StudyPrepApi* | [**generateCanvasTaxonomy**](docs/StudyPrepApi.md#generatecanvastaxonomy) | **POST** /api/v1/study-prep/taxonomies | Generate a taxonomy from a Canvas course
|
|
162
162
|
*StudyPrepApi* | [**syncCanvasUserProfile**](docs/StudyPrepApi.md#synccanvasuserprofile) | **POST** /api/v1/study-prep/user-profile | Sync user profile from Canvas
|
|
163
|
+
*StudySpaceTemplatesApi* | [**createStudySpaceFromTemplate**](docs/StudySpaceTemplatesApi.md#createstudyspacefromtemplate) | **POST** /api/v1/study-space-templates/{slug}/spaces | Create a study space from a template
|
|
164
|
+
*StudySpaceTemplatesApi* | [**listStudySpaceTemplates**](docs/StudySpaceTemplatesApi.md#liststudyspacetemplates) | **GET** /api/v1/study-space-templates | List the study space templates a learner can start from
|
|
165
|
+
*StudySpaceTemplatesApi* | [**previewStudySpaceTemplateSchedule**](docs/StudySpaceTemplatesApi.md#previewstudyspacetemplateschedule) | **POST** /api/v1/study-space-templates/{slug}/schedule-preview | Preview the objectives a template would create
|
|
163
166
|
*StudySpacesApi* | [**createStudySpace**](docs/StudySpacesApi.md#createstudyspace) | **POST** /api/v1/study-spaces | Create a study space the learner names
|
|
164
167
|
*StudySpacesApi* | [**deleteStudySpace**](docs/StudySpacesApi.md#deletestudyspace) | **DELETE** /api/v1/study-spaces/{studySpaceId} | Delete a study space the learner created
|
|
165
168
|
*StudySpacesApi* | [**listStudySpaces**](docs/StudySpacesApi.md#liststudyspaces) | **GET** /api/v1/study-spaces | List the authenticated user\'s study spaces
|
|
@@ -283,6 +286,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
283
286
|
- [CreateStudyPlanDto](docs/CreateStudyPlanDto.md)
|
|
284
287
|
- [CreateStudyPlanDtoActivitiesInner](docs/CreateStudyPlanDtoActivitiesInner.md)
|
|
285
288
|
- [CreateStudySpaceDto](docs/CreateStudySpaceDto.md)
|
|
289
|
+
- [CreateStudySpaceFromTemplateDto](docs/CreateStudySpaceFromTemplateDto.md)
|
|
286
290
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
287
291
|
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
288
292
|
- [DailyQuizStatus](docs/DailyQuizStatus.md)
|
|
@@ -335,6 +339,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
335
339
|
- [ResourceSharing](docs/ResourceSharing.md)
|
|
336
340
|
- [ResourceStudyObjective](docs/ResourceStudyObjective.md)
|
|
337
341
|
- [ResourceStudySpace](docs/ResourceStudySpace.md)
|
|
342
|
+
- [ScheduleStudySpaceTemplateDto](docs/ScheduleStudySpaceTemplateDto.md)
|
|
338
343
|
- [Score](docs/Score.md)
|
|
339
344
|
- [ScoreByTypeValue](docs/ScoreByTypeValue.md)
|
|
340
345
|
- [ServiceToken](docs/ServiceToken.md)
|
|
@@ -348,6 +353,17 @@ All URIs are relative to *http://localhost:3000*
|
|
|
348
353
|
- [StudyPlan](docs/StudyPlan.md)
|
|
349
354
|
- [StudyPlanActivity](docs/StudyPlanActivity.md)
|
|
350
355
|
- [StudySpace](docs/StudySpace.md)
|
|
356
|
+
- [StudySpaceFromTemplate](docs/StudySpaceFromTemplate.md)
|
|
357
|
+
- [StudySpaceTemplate](docs/StudySpaceTemplate.md)
|
|
358
|
+
- [StudySpaceTemplateAnchor](docs/StudySpaceTemplateAnchor.md)
|
|
359
|
+
- [StudySpaceTemplateConfirm](docs/StudySpaceTemplateConfirm.md)
|
|
360
|
+
- [StudySpaceTemplateLegal](docs/StudySpaceTemplateLegal.md)
|
|
361
|
+
- [StudySpaceTemplateLink](docs/StudySpaceTemplateLink.md)
|
|
362
|
+
- [StudySpaceTemplateNotice](docs/StudySpaceTemplateNotice.md)
|
|
363
|
+
- [StudySpaceTemplateObjective](docs/StudySpaceTemplateObjective.md)
|
|
364
|
+
- [StudySpaceTemplateProvenance](docs/StudySpaceTemplateProvenance.md)
|
|
365
|
+
- [StudySpaceTemplateSchedule](docs/StudySpaceTemplateSchedule.md)
|
|
366
|
+
- [StudySpaceTemplateScheduleItem](docs/StudySpaceTemplateScheduleItem.md)
|
|
351
367
|
- [SubmitQuizResponseRequest](docs/SubmitQuizResponseRequest.md)
|
|
352
368
|
- [SubmittedQuizResponse](docs/SubmittedQuizResponse.md)
|
|
353
369
|
- [SyllabusAnalysisObjective](docs/SyllabusAnalysisObjective.md)
|
|
@@ -144,12 +144,12 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
144
144
|
*/
|
|
145
145
|
listStudyObjectives(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyObjectives>;
|
|
146
146
|
/**
|
|
147
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
147
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
148
148
|
* List the learner\'s study objectives falling due soon
|
|
149
149
|
*/
|
|
150
150
|
listUpcomingStudyObjectivesRaw(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpcomingStudyObjectives>>;
|
|
151
151
|
/**
|
|
152
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
152
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
153
153
|
* List the learner\'s study objectives falling due soon
|
|
154
154
|
*/
|
|
155
155
|
listUpcomingStudyObjectives(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpcomingStudyObjectives>;
|
|
@@ -389,7 +389,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
/**
|
|
392
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
392
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
393
393
|
* List the learner\'s study objectives falling due soon
|
|
394
394
|
*/
|
|
395
395
|
listUpcomingStudyObjectivesRaw(requestParameters, initOverrides) {
|
|
@@ -422,7 +422,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
425
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
426
426
|
* List the learner\'s study objectives falling due soon
|
|
427
427
|
*/
|
|
428
428
|
listUpcomingStudyObjectives(requestParameters, initOverrides) {
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { CreateStudySpaceFromTemplateDto, ScheduleStudySpaceTemplateDto, StudySpaceFromTemplate, StudySpaceTemplate, StudySpaceTemplateScheduleItem } from '../models/index';
|
|
14
|
+
export interface CreateStudySpaceFromTemplateRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
createStudySpaceFromTemplateDto: CreateStudySpaceFromTemplateDto;
|
|
18
|
+
}
|
|
19
|
+
export interface ListStudySpaceTemplatesRequest {
|
|
20
|
+
xUserId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PreviewStudySpaceTemplateScheduleRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
scheduleStudySpaceTemplateDto: ScheduleStudySpaceTemplateDto;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class StudySpaceTemplatesApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
33
|
+
* Create a study space from a template
|
|
34
|
+
*/
|
|
35
|
+
createStudySpaceFromTemplateRaw(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudySpaceFromTemplate>>;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
38
|
+
* Create a study space from a template
|
|
39
|
+
*/
|
|
40
|
+
createStudySpaceFromTemplate(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudySpaceFromTemplate>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
43
|
+
* List the study space templates a learner can start from
|
|
44
|
+
*/
|
|
45
|
+
listStudySpaceTemplatesRaw(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplate>>>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
48
|
+
* List the study space templates a learner can start from
|
|
49
|
+
*/
|
|
50
|
+
listStudySpaceTemplates(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplate>>;
|
|
51
|
+
/**
|
|
52
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
53
|
+
* Preview the objectives a template would create
|
|
54
|
+
*/
|
|
55
|
+
previewStudySpaceTemplateScheduleRaw(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplateScheduleItem>>>;
|
|
56
|
+
/**
|
|
57
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
58
|
+
* Preview the objectives a template would create
|
|
59
|
+
*/
|
|
60
|
+
previewStudySpaceTemplateSchedule(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplateScheduleItem>>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
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.StudySpaceTemplatesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class StudySpaceTemplatesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
34
|
+
* Create a study space from a template
|
|
35
|
+
*/
|
|
36
|
+
createStudySpaceFromTemplateRaw(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 createStudySpaceFromTemplate().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['slug'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling createStudySpaceFromTemplate().');
|
|
43
|
+
}
|
|
44
|
+
if (requestParameters['createStudySpaceFromTemplateDto'] == null) {
|
|
45
|
+
throw new runtime.RequiredError('createStudySpaceFromTemplateDto', 'Required parameter "createStudySpaceFromTemplateDto" was null or undefined when calling createStudySpaceFromTemplate().');
|
|
46
|
+
}
|
|
47
|
+
const queryParameters = {};
|
|
48
|
+
const headerParameters = {};
|
|
49
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
50
|
+
if (requestParameters['xUserId'] != null) {
|
|
51
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
52
|
+
}
|
|
53
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
54
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
55
|
+
}
|
|
56
|
+
let urlPath = `/api/v1/study-space-templates/{slug}/spaces`;
|
|
57
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
58
|
+
const response = yield this.request({
|
|
59
|
+
path: urlPath,
|
|
60
|
+
method: 'POST',
|
|
61
|
+
headers: headerParameters,
|
|
62
|
+
query: queryParameters,
|
|
63
|
+
body: (0, index_1.CreateStudySpaceFromTemplateDtoToJSON)(requestParameters['createStudySpaceFromTemplateDto']),
|
|
64
|
+
}, initOverrides);
|
|
65
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudySpaceFromTemplateFromJSON)(jsonValue));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
70
|
+
* Create a study space from a template
|
|
71
|
+
*/
|
|
72
|
+
createStudySpaceFromTemplate(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const response = yield this.createStudySpaceFromTemplateRaw(requestParameters, initOverrides);
|
|
75
|
+
return yield response.value();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
80
|
+
* List the study space templates a learner can start from
|
|
81
|
+
*/
|
|
82
|
+
listStudySpaceTemplatesRaw(requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
if (requestParameters['xUserId'] == null) {
|
|
85
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudySpaceTemplates().');
|
|
86
|
+
}
|
|
87
|
+
const queryParameters = {};
|
|
88
|
+
const headerParameters = {};
|
|
89
|
+
if (requestParameters['xUserId'] != null) {
|
|
90
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
91
|
+
}
|
|
92
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
93
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
94
|
+
}
|
|
95
|
+
let urlPath = `/api/v1/study-space-templates`;
|
|
96
|
+
const response = yield this.request({
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'GET',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
}, initOverrides);
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.StudySpaceTemplateFromJSON));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
107
|
+
* List the study space templates a learner can start from
|
|
108
|
+
*/
|
|
109
|
+
listStudySpaceTemplates(requestParameters, initOverrides) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
const response = yield this.listStudySpaceTemplatesRaw(requestParameters, initOverrides);
|
|
112
|
+
return yield response.value();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
117
|
+
* Preview the objectives a template would create
|
|
118
|
+
*/
|
|
119
|
+
previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
if (requestParameters['xUserId'] == null) {
|
|
122
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
123
|
+
}
|
|
124
|
+
if (requestParameters['slug'] == null) {
|
|
125
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
126
|
+
}
|
|
127
|
+
if (requestParameters['scheduleStudySpaceTemplateDto'] == null) {
|
|
128
|
+
throw new runtime.RequiredError('scheduleStudySpaceTemplateDto', 'Required parameter "scheduleStudySpaceTemplateDto" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
129
|
+
}
|
|
130
|
+
const queryParameters = {};
|
|
131
|
+
const headerParameters = {};
|
|
132
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
133
|
+
if (requestParameters['xUserId'] != null) {
|
|
134
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
135
|
+
}
|
|
136
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
137
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
138
|
+
}
|
|
139
|
+
let urlPath = `/api/v1/study-space-templates/{slug}/schedule-preview`;
|
|
140
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
141
|
+
const response = yield this.request({
|
|
142
|
+
path: urlPath,
|
|
143
|
+
method: 'POST',
|
|
144
|
+
headers: headerParameters,
|
|
145
|
+
query: queryParameters,
|
|
146
|
+
body: (0, index_1.ScheduleStudySpaceTemplateDtoToJSON)(requestParameters['scheduleStudySpaceTemplateDto']),
|
|
147
|
+
}, initOverrides);
|
|
148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.StudySpaceTemplateScheduleItemFromJSON));
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
153
|
+
* Preview the objectives a template would create
|
|
154
|
+
*/
|
|
155
|
+
previewStudySpaceTemplateSchedule(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const response = yield this.previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides);
|
|
158
|
+
return yield response.value();
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
exports.StudySpaceTemplatesApi = StudySpaceTemplatesApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './StudyObjectiveConceptsApi';
|
|
|
25
25
|
export * from './StudyObjectivesApi';
|
|
26
26
|
export * from './StudyPlansApi';
|
|
27
27
|
export * from './StudyPrepApi';
|
|
28
|
+
export * from './StudySpaceTemplatesApi';
|
|
28
29
|
export * from './StudySpacesApi';
|
|
29
30
|
export * from './SyllabusAnalysisApi';
|
|
30
31
|
export * from './TagsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __exportStar(require("./StudyObjectiveConceptsApi"), exports);
|
|
|
43
43
|
__exportStar(require("./StudyObjectivesApi"), exports);
|
|
44
44
|
__exportStar(require("./StudyPlansApi"), exports);
|
|
45
45
|
__exportStar(require("./StudyPrepApi"), exports);
|
|
46
|
+
__exportStar(require("./StudySpaceTemplatesApi"), exports);
|
|
46
47
|
__exportStar(require("./StudySpacesApi"), exports);
|
|
47
48
|
__exportStar(require("./SyllabusAnalysisApi"), exports);
|
|
48
49
|
__exportStar(require("./TagsApi"), exports);
|
|
@@ -144,12 +144,12 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
144
144
|
*/
|
|
145
145
|
listStudyObjectives(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyObjectives>;
|
|
146
146
|
/**
|
|
147
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
147
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
148
148
|
* List the learner\'s study objectives falling due soon
|
|
149
149
|
*/
|
|
150
150
|
listUpcomingStudyObjectivesRaw(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpcomingStudyObjectives>>;
|
|
151
151
|
/**
|
|
152
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
152
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
153
153
|
* List the learner\'s study objectives falling due soon
|
|
154
154
|
*/
|
|
155
155
|
listUpcomingStudyObjectives(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpcomingStudyObjectives>;
|
|
@@ -386,7 +386,7 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
/**
|
|
389
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
389
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
390
390
|
* List the learner\'s study objectives falling due soon
|
|
391
391
|
*/
|
|
392
392
|
listUpcomingStudyObjectivesRaw(requestParameters, initOverrides) {
|
|
@@ -419,7 +419,7 @@ export class StudyObjectivesApi extends runtime.BaseAPI {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
/**
|
|
422
|
-
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived.
|
|
422
|
+
* Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
|
|
423
423
|
* List the learner\'s study objectives falling due soon
|
|
424
424
|
*/
|
|
425
425
|
listUpcomingStudyObjectives(requestParameters, initOverrides) {
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { CreateStudySpaceFromTemplateDto, ScheduleStudySpaceTemplateDto, StudySpaceFromTemplate, StudySpaceTemplate, StudySpaceTemplateScheduleItem } from '../models/index';
|
|
14
|
+
export interface CreateStudySpaceFromTemplateRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
createStudySpaceFromTemplateDto: CreateStudySpaceFromTemplateDto;
|
|
18
|
+
}
|
|
19
|
+
export interface ListStudySpaceTemplatesRequest {
|
|
20
|
+
xUserId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PreviewStudySpaceTemplateScheduleRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
scheduleStudySpaceTemplateDto: ScheduleStudySpaceTemplateDto;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class StudySpaceTemplatesApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
33
|
+
* Create a study space from a template
|
|
34
|
+
*/
|
|
35
|
+
createStudySpaceFromTemplateRaw(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudySpaceFromTemplate>>;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
38
|
+
* Create a study space from a template
|
|
39
|
+
*/
|
|
40
|
+
createStudySpaceFromTemplate(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudySpaceFromTemplate>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
43
|
+
* List the study space templates a learner can start from
|
|
44
|
+
*/
|
|
45
|
+
listStudySpaceTemplatesRaw(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplate>>>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
48
|
+
* List the study space templates a learner can start from
|
|
49
|
+
*/
|
|
50
|
+
listStudySpaceTemplates(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplate>>;
|
|
51
|
+
/**
|
|
52
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
53
|
+
* Preview the objectives a template would create
|
|
54
|
+
*/
|
|
55
|
+
previewStudySpaceTemplateScheduleRaw(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplateScheduleItem>>>;
|
|
56
|
+
/**
|
|
57
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
58
|
+
* Preview the objectives a template would create
|
|
59
|
+
*/
|
|
60
|
+
previewStudySpaceTemplateSchedule(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplateScheduleItem>>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { CreateStudySpaceFromTemplateDtoToJSON, ScheduleStudySpaceTemplateDtoToJSON, StudySpaceFromTemplateFromJSON, StudySpaceTemplateFromJSON, StudySpaceTemplateScheduleItemFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class StudySpaceTemplatesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
31
|
+
* Create a study space from a template
|
|
32
|
+
*/
|
|
33
|
+
createStudySpaceFromTemplateRaw(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 createStudySpaceFromTemplate().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['slug'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling createStudySpaceFromTemplate().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['createStudySpaceFromTemplateDto'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('createStudySpaceFromTemplateDto', 'Required parameter "createStudySpaceFromTemplateDto" was null or undefined when calling createStudySpaceFromTemplate().');
|
|
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-space-templates/{slug}/spaces`;
|
|
54
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
55
|
+
const response = yield this.request({
|
|
56
|
+
path: urlPath,
|
|
57
|
+
method: 'POST',
|
|
58
|
+
headers: headerParameters,
|
|
59
|
+
query: queryParameters,
|
|
60
|
+
body: CreateStudySpaceFromTemplateDtoToJSON(requestParameters['createStudySpaceFromTemplateDto']),
|
|
61
|
+
}, initOverrides);
|
|
62
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudySpaceFromTemplateFromJSON(jsonValue));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
|
|
67
|
+
* Create a study space from a template
|
|
68
|
+
*/
|
|
69
|
+
createStudySpaceFromTemplate(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const response = yield this.createStudySpaceFromTemplateRaw(requestParameters, initOverrides);
|
|
72
|
+
return yield response.value();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
77
|
+
* List the study space templates a learner can start from
|
|
78
|
+
*/
|
|
79
|
+
listStudySpaceTemplatesRaw(requestParameters, initOverrides) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
if (requestParameters['xUserId'] == null) {
|
|
82
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudySpaceTemplates().');
|
|
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-space-templates`;
|
|
93
|
+
const response = yield this.request({
|
|
94
|
+
path: urlPath,
|
|
95
|
+
method: 'GET',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(StudySpaceTemplateFromJSON));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
|
|
104
|
+
* List the study space templates a learner can start from
|
|
105
|
+
*/
|
|
106
|
+
listStudySpaceTemplates(requestParameters, initOverrides) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const response = yield this.listStudySpaceTemplatesRaw(requestParameters, initOverrides);
|
|
109
|
+
return yield response.value();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
114
|
+
* Preview the objectives a template would create
|
|
115
|
+
*/
|
|
116
|
+
previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
if (requestParameters['xUserId'] == null) {
|
|
119
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
120
|
+
}
|
|
121
|
+
if (requestParameters['slug'] == null) {
|
|
122
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
123
|
+
}
|
|
124
|
+
if (requestParameters['scheduleStudySpaceTemplateDto'] == null) {
|
|
125
|
+
throw new runtime.RequiredError('scheduleStudySpaceTemplateDto', 'Required parameter "scheduleStudySpaceTemplateDto" was null or undefined when calling previewStudySpaceTemplateSchedule().');
|
|
126
|
+
}
|
|
127
|
+
const queryParameters = {};
|
|
128
|
+
const headerParameters = {};
|
|
129
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
130
|
+
if (requestParameters['xUserId'] != null) {
|
|
131
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
132
|
+
}
|
|
133
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
134
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
135
|
+
}
|
|
136
|
+
let urlPath = `/api/v1/study-space-templates/{slug}/schedule-preview`;
|
|
137
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
138
|
+
const response = yield this.request({
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'POST',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
body: ScheduleStudySpaceTemplateDtoToJSON(requestParameters['scheduleStudySpaceTemplateDto']),
|
|
144
|
+
}, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(StudySpaceTemplateScheduleItemFromJSON));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
|
|
150
|
+
* Preview the objectives a template would create
|
|
151
|
+
*/
|
|
152
|
+
previewStudySpaceTemplateSchedule(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const response = yield this.previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides);
|
|
155
|
+
return yield response.value();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|