@easyedu/js-lsm-api 1.55.0 → 1.56.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.
Files changed (59) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +8 -2
  3. package/dist/apis/ContentApi.d.ts +21 -1
  4. package/dist/apis/ContentApi.js +51 -0
  5. package/dist/apis/CourseApi.d.ts +23 -1
  6. package/dist/apis/CourseApi.js +55 -0
  7. package/dist/apis/ModuleApi.d.ts +20 -1
  8. package/dist/apis/ModuleApi.js +47 -0
  9. package/dist/esm/apis/ContentApi.d.ts +21 -1
  10. package/dist/esm/apis/ContentApi.js +52 -1
  11. package/dist/esm/apis/CourseApi.d.ts +23 -1
  12. package/dist/esm/apis/CourseApi.js +56 -1
  13. package/dist/esm/apis/ModuleApi.d.ts +20 -1
  14. package/dist/esm/apis/ModuleApi.js +48 -1
  15. package/dist/esm/models/GetCourseEnrollment.d.ts +15 -1
  16. package/dist/esm/models/GetCourseEnrollment.js +6 -1
  17. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +5 -0
  18. package/dist/esm/models/GetCourseEnrollmentListItem.js +6 -1
  19. package/dist/esm/models/PostDuplicate.d.ts +32 -0
  20. package/dist/esm/models/PostDuplicate.js +41 -0
  21. package/dist/esm/models/PostDuplicate1.d.ts +32 -0
  22. package/dist/esm/models/PostDuplicate1.js +41 -0
  23. package/dist/esm/models/PostDuplicate2.d.ts +32 -0
  24. package/dist/esm/models/PostDuplicate2.js +41 -0
  25. package/dist/esm/models/PutCourseEnrollment.d.ts +7 -1
  26. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  27. package/dist/esm/models/index.d.ts +3 -0
  28. package/dist/esm/models/index.js +3 -0
  29. package/dist/models/GetCourseEnrollment.d.ts +15 -1
  30. package/dist/models/GetCourseEnrollment.js +6 -1
  31. package/dist/models/GetCourseEnrollmentListItem.d.ts +5 -0
  32. package/dist/models/GetCourseEnrollmentListItem.js +6 -1
  33. package/dist/models/PostDuplicate.d.ts +32 -0
  34. package/dist/models/PostDuplicate.js +48 -0
  35. package/dist/models/PostDuplicate1.d.ts +32 -0
  36. package/dist/models/PostDuplicate1.js +48 -0
  37. package/dist/models/PostDuplicate2.d.ts +32 -0
  38. package/dist/models/PostDuplicate2.js +48 -0
  39. package/dist/models/PutCourseEnrollment.d.ts +7 -1
  40. package/dist/models/PutCourseEnrollment.js +4 -1
  41. package/dist/models/index.d.ts +3 -0
  42. package/dist/models/index.js +3 -0
  43. package/docs/ContentApi.md +78 -0
  44. package/docs/CourseApi.md +86 -2
  45. package/docs/ModuleApi.md +75 -0
  46. package/docs/PostDuplicate.md +35 -0
  47. package/docs/PostDuplicate1.md +35 -0
  48. package/docs/PostDuplicate2.md +35 -0
  49. package/package.json +1 -1
  50. package/src/apis/ContentApi.ts +76 -0
  51. package/src/apis/CourseApi.ts +78 -0
  52. package/src/apis/ModuleApi.ts +67 -0
  53. package/src/models/GetCourseEnrollment.ts +16 -2
  54. package/src/models/GetCourseEnrollmentListItem.ts +6 -1
  55. package/src/models/PostDuplicate.ts +65 -0
  56. package/src/models/PostDuplicate1.ts +65 -0
  57. package/src/models/PostDuplicate2.ts +65 -0
  58. package/src/models/PutCourseEnrollment.ts +8 -2
  59. package/src/models/index.ts +3 -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.instanceOfPostDuplicate = instanceOfPostDuplicate;
17
+ exports.PostDuplicateFromJSON = PostDuplicateFromJSON;
18
+ exports.PostDuplicateFromJSONTyped = PostDuplicateFromJSONTyped;
19
+ exports.PostDuplicateToJSON = PostDuplicateToJSON;
20
+ exports.PostDuplicateToJSONTyped = PostDuplicateToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PostDuplicate interface.
23
+ */
24
+ function instanceOfPostDuplicate(value) {
25
+ return true;
26
+ }
27
+ function PostDuplicateFromJSON(json) {
28
+ return PostDuplicateFromJSONTyped(json, false);
29
+ }
30
+ function PostDuplicateFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'name': json['name'] == null ? undefined : json['name'],
36
+ };
37
+ }
38
+ function PostDuplicateToJSON(json) {
39
+ return PostDuplicateToJSONTyped(json, false);
40
+ }
41
+ function PostDuplicateToJSONTyped(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 module
14
+ * @export
15
+ * @interface PostDuplicate1
16
+ */
17
+ export interface PostDuplicate1 {
18
+ /**
19
+ * Name for the duplicated module. Defaults to "{original name} (Copy)" if omitted.
20
+ * @type {string}
21
+ * @memberof PostDuplicate1
22
+ */
23
+ name?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PostDuplicate1 interface.
27
+ */
28
+ export declare function instanceOfPostDuplicate1(value: object): value is PostDuplicate1;
29
+ export declare function PostDuplicate1FromJSON(json: any): PostDuplicate1;
30
+ export declare function PostDuplicate1FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate1;
31
+ export declare function PostDuplicate1ToJSON(json: any): PostDuplicate1;
32
+ export declare function PostDuplicate1ToJSONTyped(value?: PostDuplicate1 | 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.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
- * Current status of the enrollment
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
- Removed: 'Removed'
28
+ Failed: 'Failed',
29
+ Withdrawn: 'Withdrawn',
30
+ Removed: 'Removed',
31
+ Archived: 'Archived'
29
32
  };
30
33
  /**
31
34
  * @export
@@ -173,6 +173,9 @@ export * from './PostCourse';
173
173
  export * from './PostCourseCatalog';
174
174
  export * from './PostCourseEnrollment';
175
175
  export * from './PostCourseExport';
176
+ export * from './PostDuplicate';
177
+ export * from './PostDuplicate1';
178
+ export * from './PostDuplicate2';
176
179
  export * from './PostLogin';
177
180
  export * from './PostManualQuestionSelection';
178
181
  export * from './PostMessage';
@@ -191,6 +191,9 @@ __exportStar(require("./PostCourse"), exports);
191
191
  __exportStar(require("./PostCourseCatalog"), exports);
192
192
  __exportStar(require("./PostCourseEnrollment"), exports);
193
193
  __exportStar(require("./PostCourseExport"), exports);
194
+ __exportStar(require("./PostDuplicate"), exports);
195
+ __exportStar(require("./PostDuplicate1"), exports);
196
+ __exportStar(require("./PostDuplicate2"), exports);
194
197
  __exportStar(require("./PostLogin"), exports);
195
198
  __exportStar(require("./PostManualQuestionSelection"), exports);
196
199
  __exportStar(require("./PostMessage"), exports);
@@ -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/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)
@@ -0,0 +1,35 @@
1
+
2
+ # PostDuplicate
3
+
4
+ Optional body for duplicating a course
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `name` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PostDuplicate } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ } satisfies PostDuplicate
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as PostDuplicate
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
@@ -0,0 +1,35 @@
1
+
2
+ # PostDuplicate1
3
+
4
+ Optional body for duplicating a module
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `name` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PostDuplicate1 } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ } satisfies PostDuplicate1
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as PostDuplicate1
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+