@easyedu/js-lsm-api 1.62.0 → 1.64.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 +8 -0
- package/README.md +22 -2
- package/dist/apis/ContentApi.d.ts +19 -0
- package/dist/apis/ContentApi.js +48 -0
- package/dist/apis/CourseApi.d.ts +17 -0
- package/dist/apis/CourseApi.js +40 -0
- package/dist/apis/DispatchApi.d.ts +44 -0
- package/dist/apis/DispatchApi.js +104 -0
- package/dist/apis/ModuleApi.d.ts +18 -0
- package/dist/apis/ModuleApi.js +44 -0
- package/dist/apis/PlayerApi.d.ts +183 -0
- package/dist/apis/PlayerApi.js +454 -0
- package/dist/apis/UserApi.d.ts +32 -0
- package/dist/apis/UserApi.js +82 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ContentApi.d.ts +19 -0
- package/dist/esm/apis/ContentApi.js +48 -0
- package/dist/esm/apis/CourseApi.d.ts +17 -0
- package/dist/esm/apis/CourseApi.js +40 -0
- package/dist/esm/apis/DispatchApi.d.ts +44 -0
- package/dist/esm/apis/DispatchApi.js +100 -0
- package/dist/esm/apis/ModuleApi.d.ts +18 -0
- package/dist/esm/apis/ModuleApi.js +44 -0
- package/dist/esm/apis/PlayerApi.d.ts +183 -0
- package/dist/esm/apis/PlayerApi.js +450 -0
- package/dist/esm/apis/UserApi.d.ts +32 -0
- package/dist/esm/apis/UserApi.js +82 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -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 +76 -0
- package/docs/CourseApi.md +70 -0
- package/docs/DispatchApi.md +134 -0
- package/docs/ModuleApi.md +73 -0
- package/docs/PlayerApi.md +760 -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 +68 -0
- package/src/apis/CourseApi.ts +50 -0
- package/src/apis/DispatchApi.ts +106 -0
- package/src/apis/ModuleApi.ts +59 -0
- package/src/apis/PlayerApi.ts +559 -0
- package/src/apis/UserApi.ts +112 -0
- package/src/apis/index.ts +2 -0
- package/src/models/PostSignupRequest.ts +120 -0
- package/src/models/PostSignupRequestResponse.ts +66 -0
- package/src/models/index.ts +2 -0
package/docs/ContentApi.md
CHANGED
|
@@ -5,6 +5,7 @@ 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 |
|
|
8
9
|
| [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
|
|
9
10
|
| [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
|
|
10
11
|
| [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
|
|
@@ -100,6 +101,81 @@ No authorization required
|
|
|
100
101
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
101
102
|
|
|
102
103
|
|
|
104
|
+
## deleteContent
|
|
105
|
+
|
|
106
|
+
> deleteContent(contentId, moduleId, courseId)
|
|
107
|
+
|
|
108
|
+
Delete content by id
|
|
109
|
+
|
|
110
|
+
Soft-deletes the content item.
|
|
111
|
+
|
|
112
|
+
### Example
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import {
|
|
116
|
+
Configuration,
|
|
117
|
+
ContentApi,
|
|
118
|
+
} from '@easyedu/js-lsm-api';
|
|
119
|
+
import type { DeleteContentRequest } from '@easyedu/js-lsm-api';
|
|
120
|
+
|
|
121
|
+
async function example() {
|
|
122
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
123
|
+
const api = new ContentApi();
|
|
124
|
+
|
|
125
|
+
const body = {
|
|
126
|
+
// string
|
|
127
|
+
contentId: contentId_example,
|
|
128
|
+
// string
|
|
129
|
+
moduleId: moduleId_example,
|
|
130
|
+
// string
|
|
131
|
+
courseId: courseId_example,
|
|
132
|
+
} satisfies DeleteContentRequest;
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
const data = await api.deleteContent(body);
|
|
136
|
+
console.log(data);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
console.error(error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Run the test
|
|
143
|
+
example().catch(console.error);
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
| Name | Type | Description | Notes |
|
|
150
|
+
|------------- | ------------- | ------------- | -------------|
|
|
151
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
152
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
153
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
154
|
+
|
|
155
|
+
### Return type
|
|
156
|
+
|
|
157
|
+
`void` (Empty response body)
|
|
158
|
+
|
|
159
|
+
### Authorization
|
|
160
|
+
|
|
161
|
+
No authorization required
|
|
162
|
+
|
|
163
|
+
### HTTP request headers
|
|
164
|
+
|
|
165
|
+
- **Content-Type**: Not defined
|
|
166
|
+
- **Accept**: Not defined
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### HTTP response details
|
|
170
|
+
| Status code | Description | Response headers |
|
|
171
|
+
|-------------|-------------|------------------|
|
|
172
|
+
| **204** | Content deleted successfully | - |
|
|
173
|
+
| **403** | Forbidden - parent course is not owned by the selected portal | - |
|
|
174
|
+
| **404** | Content not found | - |
|
|
175
|
+
|
|
176
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
177
|
+
|
|
178
|
+
|
|
103
179
|
## getContent
|
|
104
180
|
|
|
105
181
|
> GetContent getContent(contentId, moduleId, courseId)
|
package/docs/CourseApi.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
|
+
| [**deleteCourse**](CourseApi.md#deletecourse) | **DELETE** /courses/{courseId} | Delete a course by id |
|
|
7
8
|
| [**deleteCourseImage**](CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image |
|
|
8
9
|
| [**getCourse**](CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course |
|
|
9
10
|
| [**getCourseEnrollment**](CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment |
|
|
@@ -22,6 +23,75 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
26
|
+
## deleteCourse
|
|
27
|
+
|
|
28
|
+
> deleteCourse(courseId)
|
|
29
|
+
|
|
30
|
+
Delete a course by id
|
|
31
|
+
|
|
32
|
+
Soft-deletes the course and its modules/content.
|
|
33
|
+
|
|
34
|
+
### Example
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import {
|
|
38
|
+
Configuration,
|
|
39
|
+
CourseApi,
|
|
40
|
+
} from '@easyedu/js-lsm-api';
|
|
41
|
+
import type { DeleteCourseRequest } from '@easyedu/js-lsm-api';
|
|
42
|
+
|
|
43
|
+
async function example() {
|
|
44
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
45
|
+
const api = new CourseApi();
|
|
46
|
+
|
|
47
|
+
const body = {
|
|
48
|
+
// string
|
|
49
|
+
courseId: courseId_example,
|
|
50
|
+
} satisfies DeleteCourseRequest;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const data = await api.deleteCourse(body);
|
|
54
|
+
console.log(data);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.error(error);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Run the test
|
|
61
|
+
example().catch(console.error);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
|------------- | ------------- | ------------- | -------------|
|
|
69
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
`void` (Empty response body)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
No authorization required
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: Not defined
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### HTTP response details
|
|
86
|
+
| Status code | Description | Response headers |
|
|
87
|
+
|-------------|-------------|------------------|
|
|
88
|
+
| **204** | Course deleted successfully | - |
|
|
89
|
+
| **403** | Forbidden - course is not owned by the selected portal | - |
|
|
90
|
+
| **404** | Course not found | - |
|
|
91
|
+
|
|
92
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
93
|
+
|
|
94
|
+
|
|
25
95
|
## deleteCourseImage
|
|
26
96
|
|
|
27
97
|
> deleteCourseImage(courseId)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# DispatchApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getDispatchRollup**](DispatchApi.md#getdispatchrollup) | **GET** /dispatch/sessions/{dispatchPackageId}/rollup | Get dispatch package rollup data |
|
|
8
|
+
| [**postDispatchLaunch**](DispatchApi.md#postdispatchlaunch) | **POST** /dispatch/launch | Launch a dispatch package |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## getDispatchRollup
|
|
13
|
+
|
|
14
|
+
> getDispatchRollup(dispatchPackageId)
|
|
15
|
+
|
|
16
|
+
Get dispatch package rollup data
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import {
|
|
22
|
+
Configuration,
|
|
23
|
+
DispatchApi,
|
|
24
|
+
} from '@easyedu/js-lsm-api';
|
|
25
|
+
import type { GetDispatchRollupRequest } from '@easyedu/js-lsm-api';
|
|
26
|
+
|
|
27
|
+
async function example() {
|
|
28
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
29
|
+
const api = new DispatchApi();
|
|
30
|
+
|
|
31
|
+
const body = {
|
|
32
|
+
// string
|
|
33
|
+
dispatchPackageId: dispatchPackageId_example,
|
|
34
|
+
} satisfies GetDispatchRollupRequest;
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const data = await api.getDispatchRollup(body);
|
|
38
|
+
console.log(data);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Run the test
|
|
45
|
+
example().catch(console.error);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Parameters
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
| Name | Type | Description | Notes |
|
|
52
|
+
|------------- | ------------- | ------------- | -------------|
|
|
53
|
+
| **dispatchPackageId** | `string` | | [Defaults to `undefined`] |
|
|
54
|
+
|
|
55
|
+
### Return type
|
|
56
|
+
|
|
57
|
+
`void` (Empty response body)
|
|
58
|
+
|
|
59
|
+
### Authorization
|
|
60
|
+
|
|
61
|
+
No authorization required
|
|
62
|
+
|
|
63
|
+
### HTTP request headers
|
|
64
|
+
|
|
65
|
+
- **Content-Type**: Not defined
|
|
66
|
+
- **Accept**: Not defined
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### HTTP response details
|
|
70
|
+
| Status code | Description | Response headers |
|
|
71
|
+
|-------------|-------------|------------------|
|
|
72
|
+
| **200** | Dispatch rollup data | - |
|
|
73
|
+
| **401** | Dispatch token required | - |
|
|
74
|
+
|
|
75
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## postDispatchLaunch
|
|
79
|
+
|
|
80
|
+
> postDispatchLaunch()
|
|
81
|
+
|
|
82
|
+
Launch a dispatch package
|
|
83
|
+
|
|
84
|
+
### Example
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import {
|
|
88
|
+
Configuration,
|
|
89
|
+
DispatchApi,
|
|
90
|
+
} from '@easyedu/js-lsm-api';
|
|
91
|
+
import type { PostDispatchLaunchRequest } from '@easyedu/js-lsm-api';
|
|
92
|
+
|
|
93
|
+
async function example() {
|
|
94
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
95
|
+
const api = new DispatchApi();
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
const data = await api.postDispatchLaunch();
|
|
99
|
+
console.log(data);
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error(error);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Run the test
|
|
106
|
+
example().catch(console.error);
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Parameters
|
|
110
|
+
|
|
111
|
+
This endpoint does not need any parameter.
|
|
112
|
+
|
|
113
|
+
### Return type
|
|
114
|
+
|
|
115
|
+
`void` (Empty response body)
|
|
116
|
+
|
|
117
|
+
### Authorization
|
|
118
|
+
|
|
119
|
+
No authorization required
|
|
120
|
+
|
|
121
|
+
### HTTP request headers
|
|
122
|
+
|
|
123
|
+
- **Content-Type**: Not defined
|
|
124
|
+
- **Accept**: Not defined
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### HTTP response details
|
|
128
|
+
| Status code | Description | Response headers |
|
|
129
|
+
|-------------|-------------|------------------|
|
|
130
|
+
| **200** | Dispatch launch response | - |
|
|
131
|
+
| **400** | Invalid launch request | - |
|
|
132
|
+
|
|
133
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
134
|
+
|
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)
|