@instructure/athena-api-client 3.25.0 → 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 CHANGED
@@ -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)
@@ -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
- * 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.
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
- * 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.
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) {
@@ -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
- * 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.
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
- * 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.
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) {
@@ -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
+ }
@@ -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';
@@ -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';
@@ -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
+ }
@@ -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';
@@ -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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "3.25.0",
4
+ "version": "3.26.0",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {