@easyedu/js-lsm-api 1.54.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.
- package/.openapi-generator/FILES +6 -0
- package/README.md +8 -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/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/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/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/PostOfferCatalogResponse.d.ts +25 -1
- package/dist/esm/models/PostOfferCatalogResponse.js +12 -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 +3 -0
- package/dist/esm/models/index.js +3 -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/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/PostOfferCatalogResponse.d.ts +25 -1
- package/dist/models/PostOfferCatalogResponse.js +12 -0
- package/dist/models/PutCourseEnrollment.d.ts +7 -1
- package/dist/models/PutCourseEnrollment.js +4 -1
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/ContentApi.md +78 -0
- package/docs/CourseApi.md +86 -2
- package/docs/ModuleApi.md +75 -0
- package/docs/PostDuplicate.md +35 -0
- package/docs/PostDuplicate1.md +35 -0
- package/docs/PostDuplicate2.md +35 -0
- package/docs/PostOfferCatalogResponse.md +7 -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/models/GetCourseEnrollment.ts +16 -2
- package/src/models/GetCourseEnrollmentListItem.ts +6 -1
- package/src/models/PostDuplicate.ts +65 -0
- package/src/models/PostDuplicate1.ts +65 -0
- package/src/models/PostDuplicate2.ts +65 -0
- package/src/models/PostOfferCatalogResponse.ts +34 -1
- package/src/models/PutCourseEnrollment.ts +8 -2
- package/src/models/index.ts +3 -0
|
@@ -24,8 +24,13 @@ exports.GetCourseEnrollmentToJSONTyped = GetCourseEnrollmentToJSONTyped;
|
|
|
24
24
|
*/
|
|
25
25
|
exports.GetCourseEnrollmentStatusEnum = {
|
|
26
26
|
Enrolled: 'Enrolled',
|
|
27
|
+
InProgress: 'InProgress',
|
|
27
28
|
Completed: 'Completed',
|
|
28
|
-
|
|
29
|
+
Failed: 'Failed',
|
|
30
|
+
Expired: 'Expired',
|
|
31
|
+
Withdrawn: 'Withdrawn',
|
|
32
|
+
Removed: 'Removed',
|
|
33
|
+
Archived: 'Archived'
|
|
29
34
|
};
|
|
30
35
|
/**
|
|
31
36
|
* @export
|
|
@@ -81,8 +81,13 @@ export interface GetCourseEnrollmentListItem {
|
|
|
81
81
|
*/
|
|
82
82
|
export declare const GetCourseEnrollmentListItemStatusEnum: {
|
|
83
83
|
readonly Enrolled: "Enrolled";
|
|
84
|
+
readonly InProgress: "InProgress";
|
|
84
85
|
readonly Completed: "Completed";
|
|
86
|
+
readonly Failed: "Failed";
|
|
87
|
+
readonly Expired: "Expired";
|
|
88
|
+
readonly Withdrawn: "Withdrawn";
|
|
85
89
|
readonly Removed: "Removed";
|
|
90
|
+
readonly Archived: "Archived";
|
|
86
91
|
};
|
|
87
92
|
export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
|
|
88
93
|
/**
|
|
@@ -24,8 +24,13 @@ exports.GetCourseEnrollmentListItemToJSONTyped = GetCourseEnrollmentListItemToJS
|
|
|
24
24
|
*/
|
|
25
25
|
exports.GetCourseEnrollmentListItemStatusEnum = {
|
|
26
26
|
Enrolled: 'Enrolled',
|
|
27
|
+
InProgress: 'InProgress',
|
|
27
28
|
Completed: 'Completed',
|
|
28
|
-
|
|
29
|
+
Failed: 'Failed',
|
|
30
|
+
Expired: 'Expired',
|
|
31
|
+
Withdrawn: 'Withdrawn',
|
|
32
|
+
Removed: 'Removed',
|
|
33
|
+
Archived: 'Archived'
|
|
29
34
|
};
|
|
30
35
|
/**
|
|
31
36
|
* @export
|
|
@@ -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 course
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PostDuplicate
|
|
16
|
+
*/
|
|
17
|
+
export interface PostDuplicate {
|
|
18
|
+
/**
|
|
19
|
+
* Name for the duplicated course. Defaults to "{original name} (Copy)" if omitted.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PostDuplicate
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the PostDuplicate interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfPostDuplicate(value: object): value is PostDuplicate;
|
|
29
|
+
export declare function PostDuplicateFromJSON(json: any): PostDuplicate;
|
|
30
|
+
export declare function PostDuplicateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate;
|
|
31
|
+
export declare function PostDuplicateToJSON(json: any): PostDuplicate;
|
|
32
|
+
export declare function PostDuplicateToJSONTyped(value?: PostDuplicate | 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.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
|
+
}
|
|
@@ -10,17 +10,41 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
+
* Result of fanning a catalog out into per-course offers. Outcomes are bucketed
|
|
14
|
+
* so operators can distinguish brand-new shares from reactivations of
|
|
15
|
+
* previously-revoked shares, idempotent no-ops on already-active shares, and
|
|
16
|
+
* real failures.
|
|
13
17
|
*
|
|
14
18
|
* @export
|
|
15
19
|
* @interface PostOfferCatalogResponse
|
|
16
20
|
*/
|
|
17
21
|
export interface PostOfferCatalogResponse {
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Brand-new `course_share` rows inserted from this catalog offer
|
|
20
24
|
* @type {number}
|
|
21
25
|
* @memberof PostOfferCatalogResponse
|
|
22
26
|
*/
|
|
23
27
|
createdShareCount: number;
|
|
28
|
+
/**
|
|
29
|
+
* Existing Revoked or Declined shares that were flipped back to Offered
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PostOfferCatalogResponse
|
|
32
|
+
*/
|
|
33
|
+
reactivatedShareCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* Already-active shares (Offered / AcceptedMirror / AcceptedClone). Terms
|
|
36
|
+
* may have been updated in place without disturbing the target's state.
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PostOfferCatalogResponse
|
|
40
|
+
*/
|
|
41
|
+
unchangedShareCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* Shares that could not be created due to a database or validation error
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PostOfferCatalogResponse
|
|
46
|
+
*/
|
|
47
|
+
failedShareCount: number;
|
|
24
48
|
}
|
|
25
49
|
/**
|
|
26
50
|
* Check if a given object implements the PostOfferCatalogResponse interface.
|
|
@@ -24,6 +24,12 @@ exports.PostOfferCatalogResponseToJSONTyped = PostOfferCatalogResponseToJSONType
|
|
|
24
24
|
function instanceOfPostOfferCatalogResponse(value) {
|
|
25
25
|
if (!('createdShareCount' in value) || value['createdShareCount'] === undefined)
|
|
26
26
|
return false;
|
|
27
|
+
if (!('reactivatedShareCount' in value) || value['reactivatedShareCount'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('unchangedShareCount' in value) || value['unchangedShareCount'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('failedShareCount' in value) || value['failedShareCount'] === undefined)
|
|
32
|
+
return false;
|
|
27
33
|
return true;
|
|
28
34
|
}
|
|
29
35
|
function PostOfferCatalogResponseFromJSON(json) {
|
|
@@ -35,6 +41,9 @@ function PostOfferCatalogResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
41
|
}
|
|
36
42
|
return {
|
|
37
43
|
'createdShareCount': json['created_share_count'],
|
|
44
|
+
'reactivatedShareCount': json['reactivated_share_count'],
|
|
45
|
+
'unchangedShareCount': json['unchanged_share_count'],
|
|
46
|
+
'failedShareCount': json['failed_share_count'],
|
|
38
47
|
};
|
|
39
48
|
}
|
|
40
49
|
function PostOfferCatalogResponseToJSON(json) {
|
|
@@ -46,5 +55,8 @@ function PostOfferCatalogResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
46
55
|
}
|
|
47
56
|
return {
|
|
48
57
|
'created_share_count': value['createdShareCount'],
|
|
58
|
+
'reactivated_share_count': value['reactivatedShareCount'],
|
|
59
|
+
'unchanged_share_count': value['unchangedShareCount'],
|
|
60
|
+
'failed_share_count': value['failedShareCount'],
|
|
49
61
|
};
|
|
50
62
|
}
|
|
@@ -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
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -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);
|
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)
|