@easyedu/js-lsm-api 1.64.0 → 1.66.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 +6 -2
- package/dist/apis/ContentApi.d.ts +18 -0
- package/dist/apis/ContentApi.js +50 -0
- package/dist/apis/CourseApi.d.ts +32 -0
- package/dist/apis/CourseApi.js +84 -0
- package/dist/apis/PortalApi.d.ts +16 -0
- package/dist/apis/PortalApi.js +42 -0
- package/dist/esm/apis/ContentApi.d.ts +18 -0
- package/dist/esm/apis/ContentApi.js +50 -0
- package/dist/esm/apis/CourseApi.d.ts +32 -0
- package/dist/esm/apis/CourseApi.js +84 -0
- package/dist/esm/apis/PortalApi.d.ts +16 -0
- package/dist/esm/apis/PortalApi.js +42 -0
- package/dist/esm/models/GetCourse.d.ts +27 -0
- package/dist/esm/models/GetCourse.js +20 -0
- package/dist/esm/models/GetCourseEnrollment.d.ts +29 -1
- package/dist/esm/models/GetCourseEnrollment.js +23 -1
- package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +28 -1
- package/dist/esm/models/GetCourseEnrollmentListItem.js +23 -1
- package/dist/esm/models/PostCourse.d.ts +29 -0
- package/dist/esm/models/PostCourse.js +14 -0
- package/dist/esm/models/PostCourseEnrollment.d.ts +18 -1
- package/dist/esm/models/PostCourseEnrollment.js +10 -3
- package/dist/esm/models/PutCourse.d.ts +27 -0
- package/dist/esm/models/PutCourse.js +14 -0
- package/dist/esm/models/PutCourseEnrollment.d.ts +8 -1
- package/dist/esm/models/PutCourseEnrollment.js +4 -1
- package/dist/models/GetCourse.d.ts +27 -0
- package/dist/models/GetCourse.js +21 -0
- package/dist/models/GetCourseEnrollment.d.ts +29 -1
- package/dist/models/GetCourseEnrollment.js +24 -2
- package/dist/models/GetCourseEnrollmentListItem.d.ts +28 -1
- package/dist/models/GetCourseEnrollmentListItem.js +24 -2
- package/dist/models/PostCourse.d.ts +29 -0
- package/dist/models/PostCourse.js +15 -0
- package/dist/models/PostCourseEnrollment.d.ts +18 -1
- package/dist/models/PostCourseEnrollment.js +11 -4
- package/dist/models/PutCourse.d.ts +27 -0
- package/dist/models/PutCourse.js +15 -0
- package/dist/models/PutCourseEnrollment.d.ts +8 -1
- package/dist/models/PutCourseEnrollment.js +4 -1
- package/docs/ContentApi.md +79 -0
- package/docs/CourseApi.md +141 -0
- package/docs/GetCourse.md +6 -0
- package/docs/GetCourseEnrollment.md +4 -0
- package/docs/GetCourseEnrollmentListItem.md +4 -0
- package/docs/PortalApi.md +71 -0
- package/docs/PostCourse.md +6 -0
- package/docs/PostCourseEnrollment.md +2 -0
- package/docs/PutCourse.md +6 -0
- package/docs/PutCourseEnrollment.md +2 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +75 -0
- package/src/apis/CourseApi.ts +114 -0
- package/src/apis/PortalApi.ts +57 -0
- package/src/models/GetCourse.ts +39 -0
- package/src/models/GetCourseEnrollment.ts +37 -2
- package/src/models/GetCourseEnrollmentListItem.ts +36 -2
- package/src/models/PostCourse.ts +38 -0
- package/src/models/PostCourseEnrollment.ts +22 -3
- package/src/models/PutCourse.ts +36 -0
- package/src/models/PutCourseEnrollment.ts +11 -2
package/docs/CourseApi.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
|
| [**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 |
|
|
8
10
|
| [**deleteCourseImage**](CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image |
|
|
9
11
|
| [**getCourse**](CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course |
|
|
10
12
|
| [**getCourseEnrollment**](CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment |
|
|
@@ -92,6 +94,145 @@ No authorization required
|
|
|
92
94
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
93
95
|
|
|
94
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
|
+
|
|
95
236
|
## deleteCourseImage
|
|
96
237
|
|
|
97
238
|
> deleteCourseImage(courseId)
|
package/docs/GetCourse.md
CHANGED
|
@@ -12,6 +12,9 @@ Name | Type
|
|
|
12
12
|
`imageUrl` | string
|
|
13
13
|
`published` | boolean
|
|
14
14
|
`createdAt` | number
|
|
15
|
+
`accessPolicyType` | string
|
|
16
|
+
`accessDurationDays` | number
|
|
17
|
+
`accessFixedEndAt` | number
|
|
15
18
|
|
|
16
19
|
## Example
|
|
17
20
|
|
|
@@ -26,6 +29,9 @@ const example = {
|
|
|
26
29
|
"imageUrl": null,
|
|
27
30
|
"published": null,
|
|
28
31
|
"createdAt": null,
|
|
32
|
+
"accessPolicyType": null,
|
|
33
|
+
"accessDurationDays": null,
|
|
34
|
+
"accessFixedEndAt": null,
|
|
29
35
|
} satisfies GetCourse
|
|
30
36
|
|
|
31
37
|
console.log(example)
|
|
@@ -14,6 +14,8 @@ Name | Type
|
|
|
14
14
|
`enrollmentDateEnd` | number
|
|
15
15
|
`notes` | string
|
|
16
16
|
`status` | string
|
|
17
|
+
`accessState` | string
|
|
18
|
+
`daysUntilExpiry` | number
|
|
17
19
|
`userType` | string
|
|
18
20
|
`completionDate` | number
|
|
19
21
|
|
|
@@ -31,6 +33,8 @@ const example = {
|
|
|
31
33
|
"enrollmentDateEnd": null,
|
|
32
34
|
"notes": null,
|
|
33
35
|
"status": null,
|
|
36
|
+
"accessState": null,
|
|
37
|
+
"daysUntilExpiry": null,
|
|
34
38
|
"userType": null,
|
|
35
39
|
"completionDate": null,
|
|
36
40
|
} satisfies GetCourseEnrollment
|
|
@@ -15,6 +15,8 @@ Name | Type
|
|
|
15
15
|
`enrollmentDateStart` | number
|
|
16
16
|
`enrollmentDateEnd` | number
|
|
17
17
|
`status` | string
|
|
18
|
+
`accessState` | string
|
|
19
|
+
`daysUntilExpiry` | number
|
|
18
20
|
`userType` | string
|
|
19
21
|
`completionDate` | number
|
|
20
22
|
|
|
@@ -33,6 +35,8 @@ const example = {
|
|
|
33
35
|
"enrollmentDateStart": null,
|
|
34
36
|
"enrollmentDateEnd": null,
|
|
35
37
|
"status": null,
|
|
38
|
+
"accessState": null,
|
|
39
|
+
"daysUntilExpiry": null,
|
|
36
40
|
"userType": null,
|
|
37
41
|
"completionDate": null,
|
|
38
42
|
} satisfies GetCourseEnrollmentListItem
|
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)
|
package/docs/PostCourse.md
CHANGED
|
@@ -8,6 +8,9 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`name` | string
|
|
10
10
|
`description` | string
|
|
11
|
+
`accessPolicyType` | string
|
|
12
|
+
`accessDurationDays` | number
|
|
13
|
+
`accessFixedEndAt` | number
|
|
11
14
|
|
|
12
15
|
## Example
|
|
13
16
|
|
|
@@ -18,6 +21,9 @@ import type { PostCourse } from '@easyedu/js-lsm-api'
|
|
|
18
21
|
const example = {
|
|
19
22
|
"name": null,
|
|
20
23
|
"description": null,
|
|
24
|
+
"accessPolicyType": null,
|
|
25
|
+
"accessDurationDays": null,
|
|
26
|
+
"accessFixedEndAt": null,
|
|
21
27
|
} satisfies PostCourse
|
|
22
28
|
|
|
23
29
|
console.log(example)
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`enrollmentDateEnd` | number
|
|
12
12
|
`notes` | string
|
|
13
13
|
`userType` | string
|
|
14
|
+
`reEnrollmentMode` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"enrollmentDateEnd": null,
|
|
25
26
|
"notes": null,
|
|
26
27
|
"userType": null,
|
|
28
|
+
"reEnrollmentMode": null,
|
|
27
29
|
} satisfies PostCourseEnrollment
|
|
28
30
|
|
|
29
31
|
console.log(example)
|
package/docs/PutCourse.md
CHANGED
|
@@ -10,6 +10,9 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`description` | string
|
|
12
12
|
`published` | boolean
|
|
13
|
+
`accessPolicyType` | string
|
|
14
|
+
`accessDurationDays` | number
|
|
15
|
+
`accessFixedEndAt` | number
|
|
13
16
|
|
|
14
17
|
## Example
|
|
15
18
|
|
|
@@ -22,6 +25,9 @@ const example = {
|
|
|
22
25
|
"name": null,
|
|
23
26
|
"description": null,
|
|
24
27
|
"published": null,
|
|
28
|
+
"accessPolicyType": null,
|
|
29
|
+
"accessDurationDays": null,
|
|
30
|
+
"accessFixedEndAt": null,
|
|
25
31
|
} satisfies PutCourse
|
|
26
32
|
|
|
27
33
|
console.log(example)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`status` | string
|
|
10
10
|
`userType` | string
|
|
11
11
|
`enrollmentDateEnd` | number
|
|
12
|
+
`extensionDays` | number
|
|
12
13
|
`notes` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"status": null,
|
|
22
23
|
"userType": null,
|
|
23
24
|
"enrollmentDateEnd": null,
|
|
25
|
+
"extensionDays": null,
|
|
24
26
|
"notes": null,
|
|
25
27
|
} satisfies PutCourseEnrollment
|
|
26
28
|
|
package/package.json
CHANGED
package/src/apis/ContentApi.ts
CHANGED
|
@@ -134,6 +134,13 @@ export interface DeleteContentRequest {
|
|
|
134
134
|
courseId: string;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
export interface DeleteContentVersionRequest {
|
|
138
|
+
contentId: string;
|
|
139
|
+
moduleId: string;
|
|
140
|
+
courseId: string;
|
|
141
|
+
versionId: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
137
144
|
export interface GetContentRequest {
|
|
138
145
|
contentId: string;
|
|
139
146
|
moduleId: string;
|
|
@@ -385,6 +392,74 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
385
392
|
await this.deleteContentRaw(requestParameters, initOverrides);
|
|
386
393
|
}
|
|
387
394
|
|
|
395
|
+
/**
|
|
396
|
+
* Creates request options for deleteContentVersion without sending the request
|
|
397
|
+
*/
|
|
398
|
+
async deleteContentVersionRequestOpts(requestParameters: DeleteContentVersionRequest): Promise<runtime.RequestOpts> {
|
|
399
|
+
if (requestParameters['contentId'] == null) {
|
|
400
|
+
throw new runtime.RequiredError(
|
|
401
|
+
'contentId',
|
|
402
|
+
'Required parameter "contentId" was null or undefined when calling deleteContentVersion().'
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (requestParameters['moduleId'] == null) {
|
|
407
|
+
throw new runtime.RequiredError(
|
|
408
|
+
'moduleId',
|
|
409
|
+
'Required parameter "moduleId" was null or undefined when calling deleteContentVersion().'
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (requestParameters['courseId'] == null) {
|
|
414
|
+
throw new runtime.RequiredError(
|
|
415
|
+
'courseId',
|
|
416
|
+
'Required parameter "courseId" was null or undefined when calling deleteContentVersion().'
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
if (requestParameters['versionId'] == null) {
|
|
421
|
+
throw new runtime.RequiredError(
|
|
422
|
+
'versionId',
|
|
423
|
+
'Required parameter "versionId" was null or undefined when calling deleteContentVersion().'
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
const queryParameters: any = {};
|
|
428
|
+
|
|
429
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId}`;
|
|
433
|
+
urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
|
|
434
|
+
urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
|
|
435
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
436
|
+
urlPath = urlPath.replace('{versionId}', encodeURIComponent(String(requestParameters['versionId'])));
|
|
437
|
+
|
|
438
|
+
return {
|
|
439
|
+
path: urlPath,
|
|
440
|
+
method: 'DELETE',
|
|
441
|
+
headers: headerParameters,
|
|
442
|
+
query: queryParameters,
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Delete an inactive content version
|
|
448
|
+
*/
|
|
449
|
+
async deleteContentVersionRaw(requestParameters: DeleteContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
450
|
+
const requestOptions = await this.deleteContentVersionRequestOpts(requestParameters);
|
|
451
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
452
|
+
|
|
453
|
+
return new runtime.VoidApiResponse(response);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Delete an inactive content version
|
|
458
|
+
*/
|
|
459
|
+
async deleteContentVersion(requestParameters: DeleteContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
460
|
+
await this.deleteContentVersionRaw(requestParameters, initOverrides);
|
|
461
|
+
}
|
|
462
|
+
|
|
388
463
|
/**
|
|
389
464
|
* Creates request options for getContent without sending the request
|
|
390
465
|
*/
|
package/src/apis/CourseApi.ts
CHANGED
|
@@ -88,6 +88,16 @@ export interface DeleteCourseRequest {
|
|
|
88
88
|
courseId: string;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
export interface DeleteCourseEnrollmentRequest {
|
|
92
|
+
courseId: string;
|
|
93
|
+
enrollmentId: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface DeleteCourseExportRequest {
|
|
97
|
+
courseId: string;
|
|
98
|
+
exportId: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
export interface DeleteCourseImageRequest {
|
|
92
102
|
courseId: string;
|
|
93
103
|
}
|
|
@@ -217,6 +227,110 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
217
227
|
await this.deleteCourseRaw(requestParameters, initOverrides);
|
|
218
228
|
}
|
|
219
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Creates request options for deleteCourseEnrollment without sending the request
|
|
232
|
+
*/
|
|
233
|
+
async deleteCourseEnrollmentRequestOpts(requestParameters: DeleteCourseEnrollmentRequest): Promise<runtime.RequestOpts> {
|
|
234
|
+
if (requestParameters['courseId'] == null) {
|
|
235
|
+
throw new runtime.RequiredError(
|
|
236
|
+
'courseId',
|
|
237
|
+
'Required parameter "courseId" was null or undefined when calling deleteCourseEnrollment().'
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (requestParameters['enrollmentId'] == null) {
|
|
242
|
+
throw new runtime.RequiredError(
|
|
243
|
+
'enrollmentId',
|
|
244
|
+
'Required parameter "enrollmentId" was null or undefined when calling deleteCourseEnrollment().'
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const queryParameters: any = {};
|
|
249
|
+
|
|
250
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
let urlPath = `/courses/{courseId}/enrollments/{enrollmentId}`;
|
|
254
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
255
|
+
urlPath = urlPath.replace('{enrollmentId}', encodeURIComponent(String(requestParameters['enrollmentId'])));
|
|
256
|
+
|
|
257
|
+
return {
|
|
258
|
+
path: urlPath,
|
|
259
|
+
method: 'DELETE',
|
|
260
|
+
headers: headerParameters,
|
|
261
|
+
query: queryParameters,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Remove a course enrollment
|
|
267
|
+
*/
|
|
268
|
+
async deleteCourseEnrollmentRaw(requestParameters: DeleteCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
269
|
+
const requestOptions = await this.deleteCourseEnrollmentRequestOpts(requestParameters);
|
|
270
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
271
|
+
|
|
272
|
+
return new runtime.VoidApiResponse(response);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Remove a course enrollment
|
|
277
|
+
*/
|
|
278
|
+
async deleteCourseEnrollment(requestParameters: DeleteCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
279
|
+
await this.deleteCourseEnrollmentRaw(requestParameters, initOverrides);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for deleteCourseExport without sending the request
|
|
284
|
+
*/
|
|
285
|
+
async deleteCourseExportRequestOpts(requestParameters: DeleteCourseExportRequest): Promise<runtime.RequestOpts> {
|
|
286
|
+
if (requestParameters['courseId'] == null) {
|
|
287
|
+
throw new runtime.RequiredError(
|
|
288
|
+
'courseId',
|
|
289
|
+
'Required parameter "courseId" was null or undefined when calling deleteCourseExport().'
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (requestParameters['exportId'] == null) {
|
|
294
|
+
throw new runtime.RequiredError(
|
|
295
|
+
'exportId',
|
|
296
|
+
'Required parameter "exportId" was null or undefined when calling deleteCourseExport().'
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const queryParameters: any = {};
|
|
301
|
+
|
|
302
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
let urlPath = `/courses/{courseId}/exports/{exportId}`;
|
|
306
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
307
|
+
urlPath = urlPath.replace('{exportId}', encodeURIComponent(String(requestParameters['exportId'])));
|
|
308
|
+
|
|
309
|
+
return {
|
|
310
|
+
path: urlPath,
|
|
311
|
+
method: 'DELETE',
|
|
312
|
+
headers: headerParameters,
|
|
313
|
+
query: queryParameters,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Delete a course export
|
|
319
|
+
*/
|
|
320
|
+
async deleteCourseExportRaw(requestParameters: DeleteCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
321
|
+
const requestOptions = await this.deleteCourseExportRequestOpts(requestParameters);
|
|
322
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
323
|
+
|
|
324
|
+
return new runtime.VoidApiResponse(response);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Delete a course export
|
|
329
|
+
*/
|
|
330
|
+
async deleteCourseExport(requestParameters: DeleteCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
331
|
+
await this.deleteCourseExportRaw(requestParameters, initOverrides);
|
|
332
|
+
}
|
|
333
|
+
|
|
220
334
|
/**
|
|
221
335
|
* Creates request options for deleteCourseImage without sending the request
|
|
222
336
|
*/
|
package/src/apis/PortalApi.ts
CHANGED
|
@@ -109,6 +109,11 @@ export interface PutPortalBrandingRequest {
|
|
|
109
109
|
putPortalBranding: PutPortalBranding;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
export interface RemovePortalUserRequest {
|
|
113
|
+
portalId: string;
|
|
114
|
+
userId: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
export interface UpdateSelectedPortalRequest {
|
|
113
118
|
portalId: string;
|
|
114
119
|
}
|
|
@@ -694,6 +699,58 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
694
699
|
return await response.value();
|
|
695
700
|
}
|
|
696
701
|
|
|
702
|
+
/**
|
|
703
|
+
* Creates request options for removePortalUser without sending the request
|
|
704
|
+
*/
|
|
705
|
+
async removePortalUserRequestOpts(requestParameters: RemovePortalUserRequest): Promise<runtime.RequestOpts> {
|
|
706
|
+
if (requestParameters['portalId'] == null) {
|
|
707
|
+
throw new runtime.RequiredError(
|
|
708
|
+
'portalId',
|
|
709
|
+
'Required parameter "portalId" was null or undefined when calling removePortalUser().'
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
if (requestParameters['userId'] == null) {
|
|
714
|
+
throw new runtime.RequiredError(
|
|
715
|
+
'userId',
|
|
716
|
+
'Required parameter "userId" was null or undefined when calling removePortalUser().'
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const queryParameters: any = {};
|
|
721
|
+
|
|
722
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
let urlPath = `/portals/{portalId}/users/{userId}`;
|
|
726
|
+
urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
|
|
727
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
728
|
+
|
|
729
|
+
return {
|
|
730
|
+
path: urlPath,
|
|
731
|
+
method: 'DELETE',
|
|
732
|
+
headers: headerParameters,
|
|
733
|
+
query: queryParameters,
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Remove a user from a portal
|
|
739
|
+
*/
|
|
740
|
+
async removePortalUserRaw(requestParameters: RemovePortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
741
|
+
const requestOptions = await this.removePortalUserRequestOpts(requestParameters);
|
|
742
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
743
|
+
|
|
744
|
+
return new runtime.VoidApiResponse(response);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Remove a user from a portal
|
|
749
|
+
*/
|
|
750
|
+
async removePortalUser(requestParameters: RemovePortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
751
|
+
await this.removePortalUserRaw(requestParameters, initOverrides);
|
|
752
|
+
}
|
|
753
|
+
|
|
697
754
|
/**
|
|
698
755
|
* Creates request options for updateSelectedPortal without sending the request
|
|
699
756
|
*/
|