@easyedu/js-lsm-api 1.55.0 → 1.57.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 +11 -2
- package/dist/apis/ContentApi.d.ts +21 -1
- package/dist/apis/ContentApi.js +51 -0
- package/dist/apis/CourseApi.d.ts +23 -1
- package/dist/apis/CourseApi.js +55 -0
- package/dist/apis/ModuleApi.d.ts +20 -1
- package/dist/apis/ModuleApi.js +47 -0
- package/dist/apis/PortalApi.d.ts +32 -1
- package/dist/apis/PortalApi.js +99 -0
- package/dist/esm/apis/ContentApi.d.ts +21 -1
- package/dist/esm/apis/ContentApi.js +52 -1
- package/dist/esm/apis/CourseApi.d.ts +23 -1
- package/dist/esm/apis/CourseApi.js +56 -1
- package/dist/esm/apis/ModuleApi.d.ts +20 -1
- package/dist/esm/apis/ModuleApi.js +48 -1
- package/dist/esm/apis/PortalApi.d.ts +32 -1
- package/dist/esm/apis/PortalApi.js +100 -1
- package/dist/esm/models/GetCourseEnrollment.d.ts +15 -1
- package/dist/esm/models/GetCourseEnrollment.js +6 -1
- package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +5 -0
- package/dist/esm/models/GetCourseEnrollmentListItem.js +6 -1
- package/dist/esm/models/GetPortal.d.ts +6 -0
- package/dist/esm/models/GetPortal.js +2 -0
- package/dist/esm/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/esm/models/GetPortalFaviconUpload.js +43 -0
- package/dist/esm/models/PostDuplicate.d.ts +32 -0
- package/dist/esm/models/PostDuplicate.js +41 -0
- package/dist/esm/models/PostDuplicate1.d.ts +32 -0
- package/dist/esm/models/PostDuplicate1.js +41 -0
- package/dist/esm/models/PostDuplicate2.d.ts +32 -0
- package/dist/esm/models/PostDuplicate2.js +41 -0
- package/dist/esm/models/PutCourseEnrollment.d.ts +7 -1
- package/dist/esm/models/PutCourseEnrollment.js +4 -1
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/GetCourseEnrollment.d.ts +15 -1
- package/dist/models/GetCourseEnrollment.js +6 -1
- package/dist/models/GetCourseEnrollmentListItem.d.ts +5 -0
- package/dist/models/GetCourseEnrollmentListItem.js +6 -1
- package/dist/models/GetPortal.d.ts +6 -0
- package/dist/models/GetPortal.js +2 -0
- package/dist/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/models/GetPortalFaviconUpload.js +50 -0
- package/dist/models/PostDuplicate.d.ts +32 -0
- package/dist/models/PostDuplicate.js +48 -0
- package/dist/models/PostDuplicate1.d.ts +32 -0
- package/dist/models/PostDuplicate1.js +48 -0
- package/dist/models/PostDuplicate2.d.ts +32 -0
- package/dist/models/PostDuplicate2.js +48 -0
- package/dist/models/PutCourseEnrollment.d.ts +7 -1
- package/dist/models/PutCourseEnrollment.js +4 -1
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ContentApi.md +78 -0
- package/docs/CourseApi.md +86 -2
- package/docs/GetPortal.md +2 -0
- package/docs/GetPortalFaviconUpload.md +34 -0
- package/docs/ModuleApi.md +75 -0
- package/docs/PortalApi.md +138 -0
- package/docs/PostDuplicate.md +35 -0
- package/docs/PostDuplicate1.md +35 -0
- package/docs/PostDuplicate2.md +35 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +76 -0
- package/src/apis/CourseApi.ts +78 -0
- package/src/apis/ModuleApi.ts +67 -0
- package/src/apis/PortalApi.ts +129 -0
- package/src/models/GetCourseEnrollment.ts +16 -2
- package/src/models/GetCourseEnrollmentListItem.ts +6 -1
- package/src/models/GetPortal.ts +8 -0
- package/src/models/GetPortalFaviconUpload.ts +66 -0
- package/src/models/PostDuplicate.ts +65 -0
- package/src/models/PostDuplicate1.ts +65 -0
- package/src/models/PostDuplicate2.ts +65 -0
- package/src/models/PutCourseEnrollment.ts +8 -2
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
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.instanceOfPostDuplicate1 = instanceOfPostDuplicate1;
|
|
17
|
+
exports.PostDuplicate1FromJSON = PostDuplicate1FromJSON;
|
|
18
|
+
exports.PostDuplicate1FromJSONTyped = PostDuplicate1FromJSONTyped;
|
|
19
|
+
exports.PostDuplicate1ToJSON = PostDuplicate1ToJSON;
|
|
20
|
+
exports.PostDuplicate1ToJSONTyped = PostDuplicate1ToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostDuplicate1 interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostDuplicate1(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function PostDuplicate1FromJSON(json) {
|
|
28
|
+
return PostDuplicate1FromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function PostDuplicate1FromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function PostDuplicate1ToJSON(json) {
|
|
39
|
+
return PostDuplicate1ToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function PostDuplicate1ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'name': value['name'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
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
|
+
* Optional body for duplicating a content item
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PostDuplicate2
|
|
16
|
+
*/
|
|
17
|
+
export interface PostDuplicate2 {
|
|
18
|
+
/**
|
|
19
|
+
* Name for the duplicated content. Defaults to "{original name} (Copy)" if omitted.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PostDuplicate2
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the PostDuplicate2 interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfPostDuplicate2(value: object): value is PostDuplicate2;
|
|
29
|
+
export declare function PostDuplicate2FromJSON(json: any): PostDuplicate2;
|
|
30
|
+
export declare function PostDuplicate2FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate2;
|
|
31
|
+
export declare function PostDuplicate2ToJSON(json: any): PostDuplicate2;
|
|
32
|
+
export declare function PostDuplicate2ToJSONTyped(value?: PostDuplicate2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
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.instanceOfPostDuplicate2 = instanceOfPostDuplicate2;
|
|
17
|
+
exports.PostDuplicate2FromJSON = PostDuplicate2FromJSON;
|
|
18
|
+
exports.PostDuplicate2FromJSONTyped = PostDuplicate2FromJSONTyped;
|
|
19
|
+
exports.PostDuplicate2ToJSON = PostDuplicate2ToJSON;
|
|
20
|
+
exports.PostDuplicate2ToJSONTyped = PostDuplicate2ToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostDuplicate2 interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostDuplicate2(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function PostDuplicate2FromJSON(json) {
|
|
28
|
+
return PostDuplicate2FromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function PostDuplicate2FromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function PostDuplicate2ToJSON(json) {
|
|
39
|
+
return PostDuplicate2ToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function PostDuplicate2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'name': value['name'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface PutCourseEnrollment {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Target status for the enrollment. System-managed statuses (InProgress, Expired)
|
|
20
|
+
* cannot be set via this endpoint. Reopening a terminal enrollment to `Enrolled`
|
|
21
|
+
* requires `enrollment_date_end` to still be in the future.
|
|
22
|
+
*
|
|
20
23
|
* @type {PutCourseEnrollmentStatusEnum}
|
|
21
24
|
* @memberof PutCourseEnrollment
|
|
22
25
|
*/
|
|
@@ -46,7 +49,10 @@ export interface PutCourseEnrollment {
|
|
|
46
49
|
export declare const PutCourseEnrollmentStatusEnum: {
|
|
47
50
|
readonly Enrolled: "Enrolled";
|
|
48
51
|
readonly Completed: "Completed";
|
|
52
|
+
readonly Failed: "Failed";
|
|
53
|
+
readonly Withdrawn: "Withdrawn";
|
|
49
54
|
readonly Removed: "Removed";
|
|
55
|
+
readonly Archived: "Archived";
|
|
50
56
|
};
|
|
51
57
|
export type PutCourseEnrollmentStatusEnum = typeof PutCourseEnrollmentStatusEnum[keyof typeof PutCourseEnrollmentStatusEnum];
|
|
52
58
|
/**
|
|
@@ -25,7 +25,10 @@ exports.PutCourseEnrollmentToJSONTyped = PutCourseEnrollmentToJSONTyped;
|
|
|
25
25
|
exports.PutCourseEnrollmentStatusEnum = {
|
|
26
26
|
Enrolled: 'Enrolled',
|
|
27
27
|
Completed: 'Completed',
|
|
28
|
-
|
|
28
|
+
Failed: 'Failed',
|
|
29
|
+
Withdrawn: 'Withdrawn',
|
|
30
|
+
Removed: 'Removed',
|
|
31
|
+
Archived: 'Archived'
|
|
29
32
|
};
|
|
30
33
|
/**
|
|
31
34
|
* @export
|
package/dist/models/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export * from './GetPortal';
|
|
|
70
70
|
export * from './GetPortalBasicReporting';
|
|
71
71
|
export * from './GetPortalBasicReportingCertificates';
|
|
72
72
|
export * from './GetPortalBasicReportingPortalInfo';
|
|
73
|
+
export * from './GetPortalFaviconUpload';
|
|
73
74
|
export * from './GetPortalList';
|
|
74
75
|
export * from './GetPortalLogoUpload';
|
|
75
76
|
export * from './GetPortalStudentReporting';
|
|
@@ -173,6 +174,9 @@ export * from './PostCourse';
|
|
|
173
174
|
export * from './PostCourseCatalog';
|
|
174
175
|
export * from './PostCourseEnrollment';
|
|
175
176
|
export * from './PostCourseExport';
|
|
177
|
+
export * from './PostDuplicate';
|
|
178
|
+
export * from './PostDuplicate1';
|
|
179
|
+
export * from './PostDuplicate2';
|
|
176
180
|
export * from './PostLogin';
|
|
177
181
|
export * from './PostManualQuestionSelection';
|
|
178
182
|
export * from './PostMessage';
|
package/dist/models/index.js
CHANGED
|
@@ -88,6 +88,7 @@ __exportStar(require("./GetPortal"), exports);
|
|
|
88
88
|
__exportStar(require("./GetPortalBasicReporting"), exports);
|
|
89
89
|
__exportStar(require("./GetPortalBasicReportingCertificates"), exports);
|
|
90
90
|
__exportStar(require("./GetPortalBasicReportingPortalInfo"), exports);
|
|
91
|
+
__exportStar(require("./GetPortalFaviconUpload"), exports);
|
|
91
92
|
__exportStar(require("./GetPortalList"), exports);
|
|
92
93
|
__exportStar(require("./GetPortalLogoUpload"), exports);
|
|
93
94
|
__exportStar(require("./GetPortalStudentReporting"), exports);
|
|
@@ -191,6 +192,9 @@ __exportStar(require("./PostCourse"), exports);
|
|
|
191
192
|
__exportStar(require("./PostCourseCatalog"), exports);
|
|
192
193
|
__exportStar(require("./PostCourseEnrollment"), exports);
|
|
193
194
|
__exportStar(require("./PostCourseExport"), exports);
|
|
195
|
+
__exportStar(require("./PostDuplicate"), exports);
|
|
196
|
+
__exportStar(require("./PostDuplicate1"), exports);
|
|
197
|
+
__exportStar(require("./PostDuplicate2"), exports);
|
|
194
198
|
__exportStar(require("./PostLogin"), exports);
|
|
195
199
|
__exportStar(require("./PostManualQuestionSelection"), exports);
|
|
196
200
|
__exportStar(require("./PostMessage"), exports);
|
package/docs/ContentApi.md
CHANGED
|
@@ -17,6 +17,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
17
17
|
| [**getScormValue**](ContentApi.md#getscormvalue) | **GET** /scorm/sessions/{scormSessionId}/get-value | Get a SCORM CMI data element value |
|
|
18
18
|
| [**initializeScormSession**](ContentApi.md#initializescormsession) | **POST** /scorm/sessions/{scormSessionId}/initialize | Initialize a SCORM session |
|
|
19
19
|
| [**listContentSessions**](ContentApi.md#listcontentsessions) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions | List content sessions (instructor only) |
|
|
20
|
+
| [**postContentDuplicate**](ContentApi.md#postcontentduplicate) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/duplicate | Duplicate a content item |
|
|
20
21
|
| [**postContentProcess**](ContentApi.md#postcontentprocess) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/process | Post a new content process |
|
|
21
22
|
| [**postContentQuiz**](ContentApi.md#postcontentquiz) | **POST** /courses/{courseId}/modules/{moduleId}/contents/quiz | Create a new quiz content |
|
|
22
23
|
| [**postContentSession**](ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session |
|
|
@@ -991,6 +992,83 @@ No authorization required
|
|
|
991
992
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
992
993
|
|
|
993
994
|
|
|
995
|
+
## postContentDuplicate
|
|
996
|
+
|
|
997
|
+
> GetContent postContentDuplicate(courseId, moduleId, contentId, postDuplicate2)
|
|
998
|
+
|
|
999
|
+
Duplicate a content item
|
|
1000
|
+
|
|
1001
|
+
Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
1002
|
+
|
|
1003
|
+
### Example
|
|
1004
|
+
|
|
1005
|
+
```ts
|
|
1006
|
+
import {
|
|
1007
|
+
Configuration,
|
|
1008
|
+
ContentApi,
|
|
1009
|
+
} from '@easyedu/js-lsm-api';
|
|
1010
|
+
import type { PostContentDuplicateRequest } from '@easyedu/js-lsm-api';
|
|
1011
|
+
|
|
1012
|
+
async function example() {
|
|
1013
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1014
|
+
const api = new ContentApi();
|
|
1015
|
+
|
|
1016
|
+
const body = {
|
|
1017
|
+
// string
|
|
1018
|
+
courseId: courseId_example,
|
|
1019
|
+
// string
|
|
1020
|
+
moduleId: moduleId_example,
|
|
1021
|
+
// string
|
|
1022
|
+
contentId: contentId_example,
|
|
1023
|
+
// PostDuplicate2 (optional)
|
|
1024
|
+
postDuplicate2: ...,
|
|
1025
|
+
} satisfies PostContentDuplicateRequest;
|
|
1026
|
+
|
|
1027
|
+
try {
|
|
1028
|
+
const data = await api.postContentDuplicate(body);
|
|
1029
|
+
console.log(data);
|
|
1030
|
+
} catch (error) {
|
|
1031
|
+
console.error(error);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
// Run the test
|
|
1036
|
+
example().catch(console.error);
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
### Parameters
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
| Name | Type | Description | Notes |
|
|
1043
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1044
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1045
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1046
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
1047
|
+
| **postDuplicate2** | [PostDuplicate2](PostDuplicate2.md) | | [Optional] |
|
|
1048
|
+
|
|
1049
|
+
### Return type
|
|
1050
|
+
|
|
1051
|
+
[**GetContent**](GetContent.md)
|
|
1052
|
+
|
|
1053
|
+
### Authorization
|
|
1054
|
+
|
|
1055
|
+
No authorization required
|
|
1056
|
+
|
|
1057
|
+
### HTTP request headers
|
|
1058
|
+
|
|
1059
|
+
- **Content-Type**: `application/json`
|
|
1060
|
+
- **Accept**: `application/json`
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
### HTTP response details
|
|
1064
|
+
| Status code | Description | Response headers |
|
|
1065
|
+
|-------------|-------------|------------------|
|
|
1066
|
+
| **201** | Content duplicated successfully | - |
|
|
1067
|
+
| **404** | Content not found | - |
|
|
1068
|
+
|
|
1069
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1070
|
+
|
|
1071
|
+
|
|
994
1072
|
## postContentProcess
|
|
995
1073
|
|
|
996
1074
|
> GetContent postContentProcess(moduleId, courseId, contentId)
|
package/docs/CourseApi.md
CHANGED
|
@@ -13,6 +13,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
13
13
|
| [**getCourseList**](CourseApi.md#getcourselist) | **GET** /courses | get course list |
|
|
14
14
|
| [**getCourseReportingBasic**](CourseApi.md#getcoursereportingbasic) | **GET** /courses/{courseId}/reporting/basic | Get basic course reporting data |
|
|
15
15
|
| [**postCourse**](CourseApi.md#postcourse) | **POST** /courses | Post a new course |
|
|
16
|
+
| [**postCourseDuplicate**](CourseApi.md#postcourseduplicate) | **POST** /courses/{courseId}/duplicate | Duplicate a course |
|
|
16
17
|
| [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment |
|
|
17
18
|
| [**postCourseExport**](CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course |
|
|
18
19
|
| [**postCourseImageUpload**](CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image |
|
|
@@ -222,7 +223,7 @@ No authorization required
|
|
|
222
223
|
|
|
223
224
|
## getCourseEnrollments
|
|
224
225
|
|
|
225
|
-
> GetCourseEnrollmentList getCourseEnrollments(courseId, type, page, pageSize)
|
|
226
|
+
> GetCourseEnrollmentList getCourseEnrollments(courseId, type, status, page, pageSize)
|
|
226
227
|
|
|
227
228
|
Get course enrollments
|
|
228
229
|
|
|
@@ -244,6 +245,8 @@ async function example() {
|
|
|
244
245
|
courseId: courseId_example,
|
|
245
246
|
// 'student' | 'instructor' | Filter enrollments by user type (optional)
|
|
246
247
|
type: type_example,
|
|
248
|
+
// string | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. (optional)
|
|
249
|
+
status: status_example,
|
|
247
250
|
// number | Page number for pagination (optional)
|
|
248
251
|
page: 56,
|
|
249
252
|
// number | Number of items per page (optional)
|
|
@@ -269,6 +272,7 @@ example().catch(console.error);
|
|
|
269
272
|
|------------- | ------------- | ------------- | -------------|
|
|
270
273
|
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
271
274
|
| **type** | `student`, `instructor` | Filter enrollments by user type | [Optional] [Defaults to `undefined`] [Enum: student, instructor] |
|
|
275
|
+
| **status** | `string` | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. | [Optional] [Defaults to `undefined`] |
|
|
272
276
|
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
273
277
|
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
274
278
|
|
|
@@ -439,7 +443,7 @@ No authorization required
|
|
|
439
443
|
|
|
440
444
|
## getCourseList
|
|
441
445
|
|
|
442
|
-
> GetCourseList getCourseList(enrolled)
|
|
446
|
+
> GetCourseList getCourseList(page, pageSize, enrolled, search)
|
|
443
447
|
|
|
444
448
|
get course list
|
|
445
449
|
|
|
@@ -457,8 +461,14 @@ async function example() {
|
|
|
457
461
|
const api = new CourseApi();
|
|
458
462
|
|
|
459
463
|
const body = {
|
|
464
|
+
// number | Page number (optional)
|
|
465
|
+
page: 56,
|
|
466
|
+
// number | Number of items per page (optional)
|
|
467
|
+
pageSize: 56,
|
|
460
468
|
// boolean | Filter to only courses the authenticated user is enrolled in (optional)
|
|
461
469
|
enrolled: true,
|
|
470
|
+
// string | Case-insensitive substring match against course name or description (optional)
|
|
471
|
+
search: search_example,
|
|
462
472
|
} satisfies GetCourseListRequest;
|
|
463
473
|
|
|
464
474
|
try {
|
|
@@ -478,7 +488,10 @@ example().catch(console.error);
|
|
|
478
488
|
|
|
479
489
|
| Name | Type | Description | Notes |
|
|
480
490
|
|------------- | ------------- | ------------- | -------------|
|
|
491
|
+
| **page** | `number` | Page number | [Optional] [Defaults to `1`] |
|
|
492
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
481
493
|
| **enrolled** | `boolean` | Filter to only courses the authenticated user is enrolled in | [Optional] [Defaults to `undefined`] |
|
|
494
|
+
| **search** | `string` | Case-insensitive substring match against course name or description | [Optional] [Defaults to `undefined`] |
|
|
482
495
|
|
|
483
496
|
### Return type
|
|
484
497
|
|
|
@@ -632,6 +645,77 @@ No authorization required
|
|
|
632
645
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
633
646
|
|
|
634
647
|
|
|
648
|
+
## postCourseDuplicate
|
|
649
|
+
|
|
650
|
+
> GetCourse postCourseDuplicate(courseId, postDuplicate)
|
|
651
|
+
|
|
652
|
+
Duplicate a course
|
|
653
|
+
|
|
654
|
+
Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
655
|
+
|
|
656
|
+
### Example
|
|
657
|
+
|
|
658
|
+
```ts
|
|
659
|
+
import {
|
|
660
|
+
Configuration,
|
|
661
|
+
CourseApi,
|
|
662
|
+
} from '@easyedu/js-lsm-api';
|
|
663
|
+
import type { PostCourseDuplicateRequest } from '@easyedu/js-lsm-api';
|
|
664
|
+
|
|
665
|
+
async function example() {
|
|
666
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
667
|
+
const api = new CourseApi();
|
|
668
|
+
|
|
669
|
+
const body = {
|
|
670
|
+
// string
|
|
671
|
+
courseId: courseId_example,
|
|
672
|
+
// PostDuplicate (optional)
|
|
673
|
+
postDuplicate: ...,
|
|
674
|
+
} satisfies PostCourseDuplicateRequest;
|
|
675
|
+
|
|
676
|
+
try {
|
|
677
|
+
const data = await api.postCourseDuplicate(body);
|
|
678
|
+
console.log(data);
|
|
679
|
+
} catch (error) {
|
|
680
|
+
console.error(error);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// Run the test
|
|
685
|
+
example().catch(console.error);
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
### Parameters
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
| Name | Type | Description | Notes |
|
|
692
|
+
|------------- | ------------- | ------------- | -------------|
|
|
693
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
694
|
+
| **postDuplicate** | [PostDuplicate](PostDuplicate.md) | | [Optional] |
|
|
695
|
+
|
|
696
|
+
### Return type
|
|
697
|
+
|
|
698
|
+
[**GetCourse**](GetCourse.md)
|
|
699
|
+
|
|
700
|
+
### Authorization
|
|
701
|
+
|
|
702
|
+
No authorization required
|
|
703
|
+
|
|
704
|
+
### HTTP request headers
|
|
705
|
+
|
|
706
|
+
- **Content-Type**: `application/json`
|
|
707
|
+
- **Accept**: `application/json`
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
### HTTP response details
|
|
711
|
+
| Status code | Description | Response headers |
|
|
712
|
+
|-------------|-------------|------------------|
|
|
713
|
+
| **201** | Course duplicated successfully | - |
|
|
714
|
+
| **404** | Course not found | - |
|
|
715
|
+
|
|
716
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
717
|
+
|
|
718
|
+
|
|
635
719
|
## postCourseEnrollment
|
|
636
720
|
|
|
637
721
|
> GetCourseEnrollment postCourseEnrollment(courseId, postCourseEnrollment)
|
package/docs/GetPortal.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`parentPortalId` | string
|
|
12
12
|
`logoUrl` | string
|
|
13
|
+
`faviconUrl` | string
|
|
13
14
|
`headerBackgroundColor` | string
|
|
14
15
|
`headerTextColor` | string
|
|
15
16
|
`baseType` | string
|
|
@@ -25,6 +26,7 @@ const example = {
|
|
|
25
26
|
"name": null,
|
|
26
27
|
"parentPortalId": null,
|
|
27
28
|
"logoUrl": null,
|
|
29
|
+
"faviconUrl": null,
|
|
28
30
|
"headerBackgroundColor": null,
|
|
29
31
|
"headerTextColor": null,
|
|
30
32
|
"baseType": null,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# GetPortalFaviconUpload
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`faviconUrl` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { GetPortalFaviconUpload } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"faviconUrl": null,
|
|
19
|
+
} satisfies GetPortalFaviconUpload
|
|
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 GetPortalFaviconUpload
|
|
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
|
+
|
package/docs/ModuleApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
7
7
|
| [**getModule**](ModuleApi.md#getmodule) | **GET** /courses/{courseId}/modules/{moduleId} | get a course module |
|
|
8
8
|
| [**getModuleList**](ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list |
|
|
9
9
|
| [**postModule**](ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module |
|
|
10
|
+
| [**postModuleDuplicate**](ModuleApi.md#postmoduleduplicate) | **POST** /courses/{courseId}/modules/{moduleId}/duplicate | Duplicate a module |
|
|
10
11
|
| [**putModule**](ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id |
|
|
11
12
|
| [**putModuleReorder**](ModuleApi.md#putmodulereorder) | **PUT** /courses/{courseId}/modules/reorder | Reorder modules in a course |
|
|
12
13
|
|
|
@@ -213,6 +214,80 @@ No authorization required
|
|
|
213
214
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
214
215
|
|
|
215
216
|
|
|
217
|
+
## postModuleDuplicate
|
|
218
|
+
|
|
219
|
+
> GetModule postModuleDuplicate(courseId, moduleId, postDuplicate1)
|
|
220
|
+
|
|
221
|
+
Duplicate a module
|
|
222
|
+
|
|
223
|
+
Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
224
|
+
|
|
225
|
+
### Example
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
import {
|
|
229
|
+
Configuration,
|
|
230
|
+
ModuleApi,
|
|
231
|
+
} from '@easyedu/js-lsm-api';
|
|
232
|
+
import type { PostModuleDuplicateRequest } from '@easyedu/js-lsm-api';
|
|
233
|
+
|
|
234
|
+
async function example() {
|
|
235
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
236
|
+
const api = new ModuleApi();
|
|
237
|
+
|
|
238
|
+
const body = {
|
|
239
|
+
// string
|
|
240
|
+
courseId: courseId_example,
|
|
241
|
+
// string
|
|
242
|
+
moduleId: moduleId_example,
|
|
243
|
+
// PostDuplicate1 (optional)
|
|
244
|
+
postDuplicate1: ...,
|
|
245
|
+
} satisfies PostModuleDuplicateRequest;
|
|
246
|
+
|
|
247
|
+
try {
|
|
248
|
+
const data = await api.postModuleDuplicate(body);
|
|
249
|
+
console.log(data);
|
|
250
|
+
} catch (error) {
|
|
251
|
+
console.error(error);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Run the test
|
|
256
|
+
example().catch(console.error);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Parameters
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
| Name | Type | Description | Notes |
|
|
263
|
+
|------------- | ------------- | ------------- | -------------|
|
|
264
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
265
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
266
|
+
| **postDuplicate1** | [PostDuplicate1](PostDuplicate1.md) | | [Optional] |
|
|
267
|
+
|
|
268
|
+
### Return type
|
|
269
|
+
|
|
270
|
+
[**GetModule**](GetModule.md)
|
|
271
|
+
|
|
272
|
+
### Authorization
|
|
273
|
+
|
|
274
|
+
No authorization required
|
|
275
|
+
|
|
276
|
+
### HTTP request headers
|
|
277
|
+
|
|
278
|
+
- **Content-Type**: `application/json`
|
|
279
|
+
- **Accept**: `application/json`
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
### HTTP response details
|
|
283
|
+
| Status code | Description | Response headers |
|
|
284
|
+
|-------------|-------------|------------------|
|
|
285
|
+
| **201** | Module duplicated successfully | - |
|
|
286
|
+
| **404** | Module not found | - |
|
|
287
|
+
|
|
288
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
289
|
+
|
|
290
|
+
|
|
216
291
|
## putModule
|
|
217
292
|
|
|
218
293
|
> GetModule putModule(moduleId, courseId, putModule)
|