@easyedu/js-lsm-api 1.63.0 → 1.65.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/.openapi-generator/FILES +4 -0
- package/README.md +13 -2
- package/dist/apis/ContentApi.d.ts +37 -0
- package/dist/apis/ContentApi.js +98 -0
- package/dist/apis/CourseApi.d.ts +49 -0
- package/dist/apis/CourseApi.js +124 -0
- package/dist/apis/ModuleApi.d.ts +18 -0
- package/dist/apis/ModuleApi.js +44 -0
- package/dist/apis/PortalApi.d.ts +16 -0
- package/dist/apis/PortalApi.js +42 -0
- package/dist/apis/UserApi.d.ts +32 -0
- package/dist/apis/UserApi.js +82 -0
- package/dist/esm/apis/ContentApi.d.ts +37 -0
- package/dist/esm/apis/ContentApi.js +98 -0
- package/dist/esm/apis/CourseApi.d.ts +49 -0
- package/dist/esm/apis/CourseApi.js +124 -0
- package/dist/esm/apis/ModuleApi.d.ts +18 -0
- package/dist/esm/apis/ModuleApi.js +44 -0
- package/dist/esm/apis/PortalApi.d.ts +16 -0
- package/dist/esm/apis/PortalApi.js +42 -0
- package/dist/esm/apis/UserApi.d.ts +32 -0
- package/dist/esm/apis/UserApi.js +82 -0
- package/dist/esm/models/PostSignupRequest.d.ts +68 -0
- package/dist/esm/models/PostSignupRequest.js +67 -0
- package/dist/esm/models/PostSignupRequestResponse.d.ts +32 -0
- package/dist/esm/models/PostSignupRequestResponse.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/PostSignupRequest.d.ts +68 -0
- package/dist/models/PostSignupRequest.js +74 -0
- package/dist/models/PostSignupRequestResponse.d.ts +32 -0
- package/dist/models/PostSignupRequestResponse.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/ContentApi.md +155 -0
- package/docs/CourseApi.md +211 -0
- package/docs/ModuleApi.md +73 -0
- package/docs/PortalApi.md +71 -0
- package/docs/PostSignupRequest.md +46 -0
- package/docs/PostSignupRequestResponse.md +34 -0
- package/docs/UserApi.md +134 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +143 -0
- package/src/apis/CourseApi.ts +164 -0
- package/src/apis/ModuleApi.ts +59 -0
- package/src/apis/PortalApi.ts +57 -0
- package/src/apis/UserApi.ts +112 -0
- package/src/models/PostSignupRequest.ts +120 -0
- package/src/models/PostSignupRequestResponse.ts +66 -0
- package/src/models/index.ts +2 -0
package/dist/models/index.js
CHANGED
|
@@ -228,6 +228,8 @@ __exportStar(require("./PostResetPassword"), exports);
|
|
|
228
228
|
__exportStar(require("./PostRevokeCertificate"), exports);
|
|
229
229
|
__exportStar(require("./PostRole"), exports);
|
|
230
230
|
__exportStar(require("./PostSendResetPassword"), exports);
|
|
231
|
+
__exportStar(require("./PostSignupRequest"), exports);
|
|
232
|
+
__exportStar(require("./PostSignupRequestResponse"), exports);
|
|
231
233
|
__exportStar(require("./PostSupportTicket"), exports);
|
|
232
234
|
__exportStar(require("./PostSupportTicketComment"), exports);
|
|
233
235
|
__exportStar(require("./PostVerifyManifest"), exports);
|
package/docs/ContentApi.md
CHANGED
|
@@ -5,6 +5,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**commitScormSession**](ContentApi.md#commitscormsession) | **POST** /scorm/sessions/{scormSessionId}/commit | Commit SCORM session data |
|
|
8
|
+
| [**deleteContent**](ContentApi.md#deletecontent) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Delete content by id |
|
|
9
|
+
| [**deleteContentVersion**](ContentApi.md#deletecontentversion) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Delete an inactive content version |
|
|
8
10
|
| [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
|
|
9
11
|
| [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
|
|
10
12
|
| [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
|
|
@@ -100,6 +102,159 @@ No authorization required
|
|
|
100
102
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
101
103
|
|
|
102
104
|
|
|
105
|
+
## deleteContent
|
|
106
|
+
|
|
107
|
+
> deleteContent(contentId, moduleId, courseId)
|
|
108
|
+
|
|
109
|
+
Delete content by id
|
|
110
|
+
|
|
111
|
+
Soft-deletes the content item.
|
|
112
|
+
|
|
113
|
+
### Example
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import {
|
|
117
|
+
Configuration,
|
|
118
|
+
ContentApi,
|
|
119
|
+
} from '@easyedu/js-lsm-api';
|
|
120
|
+
import type { DeleteContentRequest } from '@easyedu/js-lsm-api';
|
|
121
|
+
|
|
122
|
+
async function example() {
|
|
123
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
124
|
+
const api = new ContentApi();
|
|
125
|
+
|
|
126
|
+
const body = {
|
|
127
|
+
// string
|
|
128
|
+
contentId: contentId_example,
|
|
129
|
+
// string
|
|
130
|
+
moduleId: moduleId_example,
|
|
131
|
+
// string
|
|
132
|
+
courseId: courseId_example,
|
|
133
|
+
} satisfies DeleteContentRequest;
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
const data = await api.deleteContent(body);
|
|
137
|
+
console.log(data);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.error(error);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Run the test
|
|
144
|
+
example().catch(console.error);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
| Name | Type | Description | Notes |
|
|
151
|
+
|------------- | ------------- | ------------- | -------------|
|
|
152
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
153
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
154
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
155
|
+
|
|
156
|
+
### Return type
|
|
157
|
+
|
|
158
|
+
`void` (Empty response body)
|
|
159
|
+
|
|
160
|
+
### Authorization
|
|
161
|
+
|
|
162
|
+
No authorization required
|
|
163
|
+
|
|
164
|
+
### HTTP request headers
|
|
165
|
+
|
|
166
|
+
- **Content-Type**: Not defined
|
|
167
|
+
- **Accept**: Not defined
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### HTTP response details
|
|
171
|
+
| Status code | Description | Response headers |
|
|
172
|
+
|-------------|-------------|------------------|
|
|
173
|
+
| **204** | Content deleted successfully | - |
|
|
174
|
+
| **403** | Forbidden - parent course is not owned by the selected portal | - |
|
|
175
|
+
| **404** | Content not found | - |
|
|
176
|
+
|
|
177
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## deleteContentVersion
|
|
181
|
+
|
|
182
|
+
> deleteContentVersion(contentId, moduleId, courseId, versionId)
|
|
183
|
+
|
|
184
|
+
Delete an inactive content version
|
|
185
|
+
|
|
186
|
+
### Example
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import {
|
|
190
|
+
Configuration,
|
|
191
|
+
ContentApi,
|
|
192
|
+
} from '@easyedu/js-lsm-api';
|
|
193
|
+
import type { DeleteContentVersionRequest } from '@easyedu/js-lsm-api';
|
|
194
|
+
|
|
195
|
+
async function example() {
|
|
196
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
197
|
+
const api = new ContentApi();
|
|
198
|
+
|
|
199
|
+
const body = {
|
|
200
|
+
// string | The content\'s external_id
|
|
201
|
+
contentId: contentId_example,
|
|
202
|
+
// string
|
|
203
|
+
moduleId: moduleId_example,
|
|
204
|
+
// string
|
|
205
|
+
courseId: courseId_example,
|
|
206
|
+
// string | The version\'s external_id
|
|
207
|
+
versionId: versionId_example,
|
|
208
|
+
} satisfies DeleteContentVersionRequest;
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
const data = await api.deleteContentVersion(body);
|
|
212
|
+
console.log(data);
|
|
213
|
+
} catch (error) {
|
|
214
|
+
console.error(error);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Run the test
|
|
219
|
+
example().catch(console.error);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Parameters
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
| Name | Type | Description | Notes |
|
|
226
|
+
|------------- | ------------- | ------------- | -------------|
|
|
227
|
+
| **contentId** | `string` | The content\'s external_id | [Defaults to `undefined`] |
|
|
228
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
229
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
230
|
+
| **versionId** | `string` | The version\'s external_id | [Defaults to `undefined`] |
|
|
231
|
+
|
|
232
|
+
### Return type
|
|
233
|
+
|
|
234
|
+
`void` (Empty response body)
|
|
235
|
+
|
|
236
|
+
### Authorization
|
|
237
|
+
|
|
238
|
+
No authorization required
|
|
239
|
+
|
|
240
|
+
### HTTP request headers
|
|
241
|
+
|
|
242
|
+
- **Content-Type**: Not defined
|
|
243
|
+
- **Accept**: Not defined
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### HTTP response details
|
|
247
|
+
| Status code | Description | Response headers |
|
|
248
|
+
|-------------|-------------|------------------|
|
|
249
|
+
| **204** | Version deleted successfully | - |
|
|
250
|
+
| **400** | Active versions cannot be deleted | - |
|
|
251
|
+
| **401** | Unauthorized | - |
|
|
252
|
+
| **403** | Forbidden - you do not have permission to delete this content version | - |
|
|
253
|
+
| **404** | Content or version not found | - |
|
|
254
|
+
|
|
255
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
256
|
+
|
|
257
|
+
|
|
103
258
|
## getContent
|
|
104
259
|
|
|
105
260
|
> GetContent getContent(contentId, moduleId, courseId)
|
package/docs/CourseApi.md
CHANGED
|
@@ -4,6 +4,9 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deleteCourse**](CourseApi.md#deletecourse) | **DELETE** /courses/{courseId} | Delete a course by id |
|
|
8
|
+
| [**deleteCourseEnrollment**](CourseApi.md#deletecourseenrollment) | **DELETE** /courses/{courseId}/enrollments/{enrollmentId} | Remove a course enrollment |
|
|
9
|
+
| [**deleteCourseExport**](CourseApi.md#deletecourseexport) | **DELETE** /courses/{courseId}/exports/{exportId} | Delete a course export |
|
|
7
10
|
| [**deleteCourseImage**](CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image |
|
|
8
11
|
| [**getCourse**](CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course |
|
|
9
12
|
| [**getCourseEnrollment**](CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment |
|
|
@@ -22,6 +25,214 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
|
|
28
|
+
## deleteCourse
|
|
29
|
+
|
|
30
|
+
> deleteCourse(courseId)
|
|
31
|
+
|
|
32
|
+
Delete a course by id
|
|
33
|
+
|
|
34
|
+
Soft-deletes the course and its modules/content.
|
|
35
|
+
|
|
36
|
+
### Example
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import {
|
|
40
|
+
Configuration,
|
|
41
|
+
CourseApi,
|
|
42
|
+
} from '@easyedu/js-lsm-api';
|
|
43
|
+
import type { DeleteCourseRequest } from '@easyedu/js-lsm-api';
|
|
44
|
+
|
|
45
|
+
async function example() {
|
|
46
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
47
|
+
const api = new CourseApi();
|
|
48
|
+
|
|
49
|
+
const body = {
|
|
50
|
+
// string
|
|
51
|
+
courseId: courseId_example,
|
|
52
|
+
} satisfies DeleteCourseRequest;
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
const data = await api.deleteCourse(body);
|
|
56
|
+
console.log(data);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(error);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Run the test
|
|
63
|
+
example().catch(console.error);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
| Name | Type | Description | Notes |
|
|
70
|
+
|------------- | ------------- | ------------- | -------------|
|
|
71
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
72
|
+
|
|
73
|
+
### Return type
|
|
74
|
+
|
|
75
|
+
`void` (Empty response body)
|
|
76
|
+
|
|
77
|
+
### Authorization
|
|
78
|
+
|
|
79
|
+
No authorization required
|
|
80
|
+
|
|
81
|
+
### HTTP request headers
|
|
82
|
+
|
|
83
|
+
- **Content-Type**: Not defined
|
|
84
|
+
- **Accept**: Not defined
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### HTTP response details
|
|
88
|
+
| Status code | Description | Response headers |
|
|
89
|
+
|-------------|-------------|------------------|
|
|
90
|
+
| **204** | Course deleted successfully | - |
|
|
91
|
+
| **403** | Forbidden - course is not owned by the selected portal | - |
|
|
92
|
+
| **404** | Course not found | - |
|
|
93
|
+
|
|
94
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## deleteCourseEnrollment
|
|
98
|
+
|
|
99
|
+
> deleteCourseEnrollment(courseId, enrollmentId)
|
|
100
|
+
|
|
101
|
+
Remove a course enrollment
|
|
102
|
+
|
|
103
|
+
### Example
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import {
|
|
107
|
+
Configuration,
|
|
108
|
+
CourseApi,
|
|
109
|
+
} from '@easyedu/js-lsm-api';
|
|
110
|
+
import type { DeleteCourseEnrollmentRequest } from '@easyedu/js-lsm-api';
|
|
111
|
+
|
|
112
|
+
async function example() {
|
|
113
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
114
|
+
const api = new CourseApi();
|
|
115
|
+
|
|
116
|
+
const body = {
|
|
117
|
+
// string
|
|
118
|
+
courseId: courseId_example,
|
|
119
|
+
// string
|
|
120
|
+
enrollmentId: enrollmentId_example,
|
|
121
|
+
} satisfies DeleteCourseEnrollmentRequest;
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const data = await api.deleteCourseEnrollment(body);
|
|
125
|
+
console.log(data);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Run the test
|
|
132
|
+
example().catch(console.error);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
|------------- | ------------- | ------------- | -------------|
|
|
140
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
141
|
+
| **enrollmentId** | `string` | | [Defaults to `undefined`] |
|
|
142
|
+
|
|
143
|
+
### Return type
|
|
144
|
+
|
|
145
|
+
`void` (Empty response body)
|
|
146
|
+
|
|
147
|
+
### Authorization
|
|
148
|
+
|
|
149
|
+
No authorization required
|
|
150
|
+
|
|
151
|
+
### HTTP request headers
|
|
152
|
+
|
|
153
|
+
- **Content-Type**: Not defined
|
|
154
|
+
- **Accept**: Not defined
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### HTTP response details
|
|
158
|
+
| Status code | Description | Response headers |
|
|
159
|
+
|-------------|-------------|------------------|
|
|
160
|
+
| **204** | Enrollment removed successfully | - |
|
|
161
|
+
| **404** | Course or enrollment not found | - |
|
|
162
|
+
|
|
163
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## deleteCourseExport
|
|
167
|
+
|
|
168
|
+
> deleteCourseExport(courseId, exportId)
|
|
169
|
+
|
|
170
|
+
Delete a course export
|
|
171
|
+
|
|
172
|
+
### Example
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
import {
|
|
176
|
+
Configuration,
|
|
177
|
+
CourseApi,
|
|
178
|
+
} from '@easyedu/js-lsm-api';
|
|
179
|
+
import type { DeleteCourseExportRequest } from '@easyedu/js-lsm-api';
|
|
180
|
+
|
|
181
|
+
async function example() {
|
|
182
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
183
|
+
const api = new CourseApi();
|
|
184
|
+
|
|
185
|
+
const body = {
|
|
186
|
+
// string
|
|
187
|
+
courseId: courseId_example,
|
|
188
|
+
// string
|
|
189
|
+
exportId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
190
|
+
} satisfies DeleteCourseExportRequest;
|
|
191
|
+
|
|
192
|
+
try {
|
|
193
|
+
const data = await api.deleteCourseExport(body);
|
|
194
|
+
console.log(data);
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.error(error);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Run the test
|
|
201
|
+
example().catch(console.error);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
| Name | Type | Description | Notes |
|
|
208
|
+
|------------- | ------------- | ------------- | -------------|
|
|
209
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
210
|
+
| **exportId** | `string` | | [Defaults to `undefined`] |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
`void` (Empty response body)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
No authorization required
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: Not defined
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### HTTP response details
|
|
227
|
+
| Status code | Description | Response headers |
|
|
228
|
+
|-------------|-------------|------------------|
|
|
229
|
+
| **204** | Export deleted successfully | - |
|
|
230
|
+
| **401** | Unauthorized | - |
|
|
231
|
+
| **404** | Export or course not found | - |
|
|
232
|
+
|
|
233
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
234
|
+
|
|
235
|
+
|
|
25
236
|
## deleteCourseImage
|
|
26
237
|
|
|
27
238
|
> deleteCourseImage(courseId)
|
package/docs/ModuleApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deleteModule**](ModuleApi.md#deletemodule) | **DELETE** /courses/{courseId}/modules/{moduleId} | Delete a module by id |
|
|
7
8
|
| [**getModule**](ModuleApi.md#getmodule) | **GET** /courses/{courseId}/modules/{moduleId} | get a course module |
|
|
8
9
|
| [**getModuleList**](ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list |
|
|
9
10
|
| [**postModule**](ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module |
|
|
@@ -13,6 +14,78 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
## deleteModule
|
|
18
|
+
|
|
19
|
+
> deleteModule(moduleId, courseId)
|
|
20
|
+
|
|
21
|
+
Delete a module by id
|
|
22
|
+
|
|
23
|
+
Soft-deletes the module and its content.
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
Configuration,
|
|
30
|
+
ModuleApi,
|
|
31
|
+
} from '@easyedu/js-lsm-api';
|
|
32
|
+
import type { DeleteModuleRequest } from '@easyedu/js-lsm-api';
|
|
33
|
+
|
|
34
|
+
async function example() {
|
|
35
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
36
|
+
const api = new ModuleApi();
|
|
37
|
+
|
|
38
|
+
const body = {
|
|
39
|
+
// string
|
|
40
|
+
moduleId: moduleId_example,
|
|
41
|
+
// string
|
|
42
|
+
courseId: courseId_example,
|
|
43
|
+
} satisfies DeleteModuleRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.deleteModule(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
63
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
64
|
+
|
|
65
|
+
### Return type
|
|
66
|
+
|
|
67
|
+
`void` (Empty response body)
|
|
68
|
+
|
|
69
|
+
### Authorization
|
|
70
|
+
|
|
71
|
+
No authorization required
|
|
72
|
+
|
|
73
|
+
### HTTP request headers
|
|
74
|
+
|
|
75
|
+
- **Content-Type**: Not defined
|
|
76
|
+
- **Accept**: Not defined
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### HTTP response details
|
|
80
|
+
| Status code | Description | Response headers |
|
|
81
|
+
|-------------|-------------|------------------|
|
|
82
|
+
| **204** | Module deleted successfully | - |
|
|
83
|
+
| **403** | Forbidden - parent course is not owned by the selected portal | - |
|
|
84
|
+
| **404** | Module not found | - |
|
|
85
|
+
|
|
86
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
|
+
|
|
88
|
+
|
|
16
89
|
## getModule
|
|
17
90
|
|
|
18
91
|
> GetModule getModule(moduleId, courseId)
|
package/docs/PortalApi.md
CHANGED
|
@@ -15,6 +15,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
15
15
|
| [**postPortalFaviconUpload**](PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding |
|
|
16
16
|
| [**postPortalLogoUpload**](PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding |
|
|
17
17
|
| [**putPortalBranding**](PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding (name, background color, text color) |
|
|
18
|
+
| [**removePortalUser**](PortalApi.md#removeportaluser) | **DELETE** /portals/{portalId}/users/{userId} | Remove a user from a portal |
|
|
18
19
|
| [**updateSelectedPortal**](PortalApi.md#updateselectedportal) | **PUT** /portals/{portalId}/selected | Update the users current selected portal. Returns new JWT with updated roles. |
|
|
19
20
|
|
|
20
21
|
|
|
@@ -761,6 +762,76 @@ No authorization required
|
|
|
761
762
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
762
763
|
|
|
763
764
|
|
|
765
|
+
## removePortalUser
|
|
766
|
+
|
|
767
|
+
> removePortalUser(portalId, userId)
|
|
768
|
+
|
|
769
|
+
Remove a user from a portal
|
|
770
|
+
|
|
771
|
+
### Example
|
|
772
|
+
|
|
773
|
+
```ts
|
|
774
|
+
import {
|
|
775
|
+
Configuration,
|
|
776
|
+
PortalApi,
|
|
777
|
+
} from '@easyedu/js-lsm-api';
|
|
778
|
+
import type { RemovePortalUserRequest } from '@easyedu/js-lsm-api';
|
|
779
|
+
|
|
780
|
+
async function example() {
|
|
781
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
782
|
+
const api = new PortalApi();
|
|
783
|
+
|
|
784
|
+
const body = {
|
|
785
|
+
// string
|
|
786
|
+
portalId: portalId_example,
|
|
787
|
+
// string
|
|
788
|
+
userId: userId_example,
|
|
789
|
+
} satisfies RemovePortalUserRequest;
|
|
790
|
+
|
|
791
|
+
try {
|
|
792
|
+
const data = await api.removePortalUser(body);
|
|
793
|
+
console.log(data);
|
|
794
|
+
} catch (error) {
|
|
795
|
+
console.error(error);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// Run the test
|
|
800
|
+
example().catch(console.error);
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
### Parameters
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
| Name | Type | Description | Notes |
|
|
807
|
+
|------------- | ------------- | ------------- | -------------|
|
|
808
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
809
|
+
| **userId** | `string` | | [Defaults to `undefined`] |
|
|
810
|
+
|
|
811
|
+
### Return type
|
|
812
|
+
|
|
813
|
+
`void` (Empty response body)
|
|
814
|
+
|
|
815
|
+
### Authorization
|
|
816
|
+
|
|
817
|
+
No authorization required
|
|
818
|
+
|
|
819
|
+
### HTTP request headers
|
|
820
|
+
|
|
821
|
+
- **Content-Type**: Not defined
|
|
822
|
+
- **Accept**: Not defined
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
### HTTP response details
|
|
826
|
+
| Status code | Description | Response headers |
|
|
827
|
+
|-------------|-------------|------------------|
|
|
828
|
+
| **204** | User removed from portal | - |
|
|
829
|
+
| **400** | Cannot remove the authenticated user from the selected portal | - |
|
|
830
|
+
| **404** | User or portal not found | - |
|
|
831
|
+
|
|
832
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
833
|
+
|
|
834
|
+
|
|
764
835
|
## updateSelectedPortal
|
|
765
836
|
|
|
766
837
|
> UpdateSelectedPortalResponse updateSelectedPortal(portalId)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
# PostSignupRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`firstName` | string
|
|
10
|
+
`lastName` | string
|
|
11
|
+
`email` | string
|
|
12
|
+
`password` | string
|
|
13
|
+
`organization` | string
|
|
14
|
+
`jobRole` | string
|
|
15
|
+
`learnerCount` | number
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { PostSignupRequest } from '@easyedu/js-lsm-api'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"firstName": null,
|
|
25
|
+
"lastName": null,
|
|
26
|
+
"email": null,
|
|
27
|
+
"password": null,
|
|
28
|
+
"organization": null,
|
|
29
|
+
"jobRole": null,
|
|
30
|
+
"learnerCount": null,
|
|
31
|
+
} satisfies PostSignupRequest
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostSignupRequest
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostSignupRequestResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`message` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostSignupRequestResponse } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"message": null,
|
|
19
|
+
} satisfies PostSignupRequestResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostSignupRequestResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|