@easyedu/js-lsm-api 1.64.0 → 1.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +6 -2
  2. package/dist/apis/ContentApi.d.ts +18 -0
  3. package/dist/apis/ContentApi.js +50 -0
  4. package/dist/apis/CourseApi.d.ts +32 -0
  5. package/dist/apis/CourseApi.js +84 -0
  6. package/dist/apis/PortalApi.d.ts +16 -0
  7. package/dist/apis/PortalApi.js +42 -0
  8. package/dist/esm/apis/ContentApi.d.ts +18 -0
  9. package/dist/esm/apis/ContentApi.js +50 -0
  10. package/dist/esm/apis/CourseApi.d.ts +32 -0
  11. package/dist/esm/apis/CourseApi.js +84 -0
  12. package/dist/esm/apis/PortalApi.d.ts +16 -0
  13. package/dist/esm/apis/PortalApi.js +42 -0
  14. package/dist/esm/models/GetCourse.d.ts +27 -0
  15. package/dist/esm/models/GetCourse.js +20 -0
  16. package/dist/esm/models/GetCourseEnrollment.d.ts +29 -1
  17. package/dist/esm/models/GetCourseEnrollment.js +23 -1
  18. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +28 -1
  19. package/dist/esm/models/GetCourseEnrollmentListItem.js +23 -1
  20. package/dist/esm/models/PostCourse.d.ts +29 -0
  21. package/dist/esm/models/PostCourse.js +14 -0
  22. package/dist/esm/models/PostCourseEnrollment.d.ts +18 -1
  23. package/dist/esm/models/PostCourseEnrollment.js +10 -3
  24. package/dist/esm/models/PutCourse.d.ts +27 -0
  25. package/dist/esm/models/PutCourse.js +14 -0
  26. package/dist/esm/models/PutCourseEnrollment.d.ts +8 -1
  27. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  28. package/dist/models/GetCourse.d.ts +27 -0
  29. package/dist/models/GetCourse.js +21 -0
  30. package/dist/models/GetCourseEnrollment.d.ts +29 -1
  31. package/dist/models/GetCourseEnrollment.js +24 -2
  32. package/dist/models/GetCourseEnrollmentListItem.d.ts +28 -1
  33. package/dist/models/GetCourseEnrollmentListItem.js +24 -2
  34. package/dist/models/PostCourse.d.ts +29 -0
  35. package/dist/models/PostCourse.js +15 -0
  36. package/dist/models/PostCourseEnrollment.d.ts +18 -1
  37. package/dist/models/PostCourseEnrollment.js +11 -4
  38. package/dist/models/PutCourse.d.ts +27 -0
  39. package/dist/models/PutCourse.js +15 -0
  40. package/dist/models/PutCourseEnrollment.d.ts +8 -1
  41. package/dist/models/PutCourseEnrollment.js +4 -1
  42. package/docs/ContentApi.md +79 -0
  43. package/docs/CourseApi.md +141 -0
  44. package/docs/GetCourse.md +6 -0
  45. package/docs/GetCourseEnrollment.md +4 -0
  46. package/docs/GetCourseEnrollmentListItem.md +4 -0
  47. package/docs/PortalApi.md +71 -0
  48. package/docs/PostCourse.md +6 -0
  49. package/docs/PostCourseEnrollment.md +2 -0
  50. package/docs/PutCourse.md +6 -0
  51. package/docs/PutCourseEnrollment.md +2 -0
  52. package/package.json +1 -1
  53. package/src/apis/ContentApi.ts +75 -0
  54. package/src/apis/CourseApi.ts +114 -0
  55. package/src/apis/PortalApi.ts +57 -0
  56. package/src/models/GetCourse.ts +39 -0
  57. package/src/models/GetCourseEnrollment.ts +37 -2
  58. package/src/models/GetCourseEnrollmentListItem.ts +36 -2
  59. package/src/models/PostCourse.ts +38 -0
  60. package/src/models/PostCourseEnrollment.ts +22 -3
  61. package/src/models/PutCourse.ts +36 -0
  62. package/src/models/PutCourseEnrollment.ts +11 -2
@@ -44,7 +44,7 @@ export interface GetCourseEnrollment {
44
44
  * @type {number}
45
45
  * @memberof GetCourseEnrollment
46
46
  */
47
- enrollmentDateEnd: number;
47
+ enrollmentDateEnd: number | null;
48
48
  /**
49
49
  * Optional notes about the enrollment
50
50
  * @type {string}
@@ -61,11 +61,24 @@ export interface GetCourseEnrollment {
61
61
  * - Withdrawn: learner pulled out before completion
62
62
  * - Removed: admin-removed enrollment
63
63
  * - Archived: historical / read-only (e.g. course share revoked)
64
+ * - Suspended: access temporarily disabled by an admin
64
65
  *
65
66
  * @type {GetCourseEnrollmentStatusEnum}
66
67
  * @memberof GetCourseEnrollment
67
68
  */
68
69
  status: GetCourseEnrollmentStatusEnum;
70
+ /**
71
+ * Derived learner access state for UI indicators and access decisions.
72
+ * @type {GetCourseEnrollmentAccessStateEnum}
73
+ * @memberof GetCourseEnrollment
74
+ */
75
+ accessState: GetCourseEnrollmentAccessStateEnum;
76
+ /**
77
+ * Whole days until access expiry; null for never-expiring or already inactive enrollments.
78
+ * @type {number}
79
+ * @memberof GetCourseEnrollment
80
+ */
81
+ daysUntilExpiry: number | null;
69
82
  /**
70
83
  * The role/type of the user in this enrollment
71
84
  * @type {GetCourseEnrollmentUserTypeEnum}
@@ -91,8 +104,23 @@ export declare const GetCourseEnrollmentStatusEnum: {
91
104
  readonly Withdrawn: "Withdrawn";
92
105
  readonly Removed: "Removed";
93
106
  readonly Archived: "Archived";
107
+ readonly Suspended: "Suspended";
94
108
  };
95
109
  export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
110
+ /**
111
+ * @export
112
+ */
113
+ export declare const GetCourseEnrollmentAccessStateEnum: {
114
+ readonly Active: "active";
115
+ readonly CompletedReview: "completed_review";
116
+ readonly Expired: "expired";
117
+ readonly Suspended: "suspended";
118
+ readonly Failed: "failed";
119
+ readonly Withdrawn: "withdrawn";
120
+ readonly Removed: "removed";
121
+ readonly Archived: "archived";
122
+ };
123
+ export type GetCourseEnrollmentAccessStateEnum = typeof GetCourseEnrollmentAccessStateEnum[keyof typeof GetCourseEnrollmentAccessStateEnum];
96
124
  /**
97
125
  * @export
98
126
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GetCourseEnrollmentUserTypeEnum = exports.GetCourseEnrollmentStatusEnum = void 0;
16
+ exports.GetCourseEnrollmentUserTypeEnum = exports.GetCourseEnrollmentAccessStateEnum = exports.GetCourseEnrollmentStatusEnum = void 0;
17
17
  exports.instanceOfGetCourseEnrollment = instanceOfGetCourseEnrollment;
18
18
  exports.GetCourseEnrollmentFromJSON = GetCourseEnrollmentFromJSON;
19
19
  exports.GetCourseEnrollmentFromJSONTyped = GetCourseEnrollmentFromJSONTyped;
@@ -30,7 +30,21 @@ exports.GetCourseEnrollmentStatusEnum = {
30
30
  Expired: 'Expired',
31
31
  Withdrawn: 'Withdrawn',
32
32
  Removed: 'Removed',
33
- Archived: 'Archived'
33
+ Archived: 'Archived',
34
+ Suspended: 'Suspended'
35
+ };
36
+ /**
37
+ * @export
38
+ */
39
+ exports.GetCourseEnrollmentAccessStateEnum = {
40
+ Active: 'active',
41
+ CompletedReview: 'completed_review',
42
+ Expired: 'expired',
43
+ Suspended: 'suspended',
44
+ Failed: 'failed',
45
+ Withdrawn: 'withdrawn',
46
+ Removed: 'removed',
47
+ Archived: 'archived'
34
48
  };
35
49
  /**
36
50
  * @export
@@ -57,6 +71,10 @@ function instanceOfGetCourseEnrollment(value) {
57
71
  return false;
58
72
  if (!('status' in value) || value['status'] === undefined)
59
73
  return false;
74
+ if (!('accessState' in value) || value['accessState'] === undefined)
75
+ return false;
76
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined)
77
+ return false;
60
78
  if (!('userType' in value) || value['userType'] === undefined)
61
79
  return false;
62
80
  if (!('completionDate' in value) || value['completionDate'] === undefined)
@@ -78,6 +96,8 @@ function GetCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
78
96
  'enrollmentDateEnd': json['enrollment_date_end'],
79
97
  'notes': json['notes'],
80
98
  'status': json['status'],
99
+ 'accessState': json['access_state'],
100
+ 'daysUntilExpiry': json['days_until_expiry'],
81
101
  'userType': json['user_type'],
82
102
  'completionDate': json['completion_date'],
83
103
  };
@@ -97,6 +117,8 @@ function GetCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = false) {
97
117
  'enrollment_date_end': value['enrollmentDateEnd'],
98
118
  'notes': value['notes'],
99
119
  'status': value['status'],
120
+ 'access_state': value['accessState'],
121
+ 'days_until_expiry': value['daysUntilExpiry'],
100
122
  'user_type': value['userType'],
101
123
  'completion_date': value['completionDate'],
102
124
  };
@@ -56,13 +56,25 @@ export interface GetCourseEnrollmentListItem {
56
56
  * @type {number}
57
57
  * @memberof GetCourseEnrollmentListItem
58
58
  */
59
- enrollmentDateEnd: number;
59
+ enrollmentDateEnd: number | null;
60
60
  /**
61
61
  * Current status of the enrollment
62
62
  * @type {GetCourseEnrollmentListItemStatusEnum}
63
63
  * @memberof GetCourseEnrollmentListItem
64
64
  */
65
65
  status: GetCourseEnrollmentListItemStatusEnum;
66
+ /**
67
+ * Derived learner access state for UI indicators and access decisions.
68
+ * @type {GetCourseEnrollmentListItemAccessStateEnum}
69
+ * @memberof GetCourseEnrollmentListItem
70
+ */
71
+ accessState: GetCourseEnrollmentListItemAccessStateEnum;
72
+ /**
73
+ * Whole days until access expiry; null for never-expiring or already inactive enrollments.
74
+ * @type {number}
75
+ * @memberof GetCourseEnrollmentListItem
76
+ */
77
+ daysUntilExpiry: number | null;
66
78
  /**
67
79
  * The role/type of the user in this enrollment
68
80
  * @type {GetCourseEnrollmentListItemUserTypeEnum}
@@ -88,8 +100,23 @@ export declare const GetCourseEnrollmentListItemStatusEnum: {
88
100
  readonly Withdrawn: "Withdrawn";
89
101
  readonly Removed: "Removed";
90
102
  readonly Archived: "Archived";
103
+ readonly Suspended: "Suspended";
91
104
  };
92
105
  export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
106
+ /**
107
+ * @export
108
+ */
109
+ export declare const GetCourseEnrollmentListItemAccessStateEnum: {
110
+ readonly Active: "active";
111
+ readonly CompletedReview: "completed_review";
112
+ readonly Expired: "expired";
113
+ readonly Suspended: "suspended";
114
+ readonly Failed: "failed";
115
+ readonly Withdrawn: "withdrawn";
116
+ readonly Removed: "removed";
117
+ readonly Archived: "archived";
118
+ };
119
+ export type GetCourseEnrollmentListItemAccessStateEnum = typeof GetCourseEnrollmentListItemAccessStateEnum[keyof typeof GetCourseEnrollmentListItemAccessStateEnum];
93
120
  /**
94
121
  * @export
95
122
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GetCourseEnrollmentListItemUserTypeEnum = exports.GetCourseEnrollmentListItemStatusEnum = void 0;
16
+ exports.GetCourseEnrollmentListItemUserTypeEnum = exports.GetCourseEnrollmentListItemAccessStateEnum = exports.GetCourseEnrollmentListItemStatusEnum = void 0;
17
17
  exports.instanceOfGetCourseEnrollmentListItem = instanceOfGetCourseEnrollmentListItem;
18
18
  exports.GetCourseEnrollmentListItemFromJSON = GetCourseEnrollmentListItemFromJSON;
19
19
  exports.GetCourseEnrollmentListItemFromJSONTyped = GetCourseEnrollmentListItemFromJSONTyped;
@@ -30,7 +30,21 @@ exports.GetCourseEnrollmentListItemStatusEnum = {
30
30
  Expired: 'Expired',
31
31
  Withdrawn: 'Withdrawn',
32
32
  Removed: 'Removed',
33
- Archived: 'Archived'
33
+ Archived: 'Archived',
34
+ Suspended: 'Suspended'
35
+ };
36
+ /**
37
+ * @export
38
+ */
39
+ exports.GetCourseEnrollmentListItemAccessStateEnum = {
40
+ Active: 'active',
41
+ CompletedReview: 'completed_review',
42
+ Expired: 'expired',
43
+ Suspended: 'suspended',
44
+ Failed: 'failed',
45
+ Withdrawn: 'withdrawn',
46
+ Removed: 'removed',
47
+ Archived: 'archived'
34
48
  };
35
49
  /**
36
50
  * @export
@@ -59,6 +73,10 @@ function instanceOfGetCourseEnrollmentListItem(value) {
59
73
  return false;
60
74
  if (!('status' in value) || value['status'] === undefined)
61
75
  return false;
76
+ if (!('accessState' in value) || value['accessState'] === undefined)
77
+ return false;
78
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined)
79
+ return false;
62
80
  if (!('userType' in value) || value['userType'] === undefined)
63
81
  return false;
64
82
  if (!('completionDate' in value) || value['completionDate'] === undefined)
@@ -81,6 +99,8 @@ function GetCourseEnrollmentListItemFromJSONTyped(json, ignoreDiscriminator) {
81
99
  'enrollmentDateStart': json['enrollment_date_start'],
82
100
  'enrollmentDateEnd': json['enrollment_date_end'],
83
101
  'status': json['status'],
102
+ 'accessState': json['access_state'],
103
+ 'daysUntilExpiry': json['days_until_expiry'],
84
104
  'userType': json['user_type'],
85
105
  'completionDate': json['completion_date'],
86
106
  };
@@ -101,6 +121,8 @@ function GetCourseEnrollmentListItemToJSONTyped(value, ignoreDiscriminator = fal
101
121
  'enrollment_date_start': value['enrollmentDateStart'],
102
122
  'enrollment_date_end': value['enrollmentDateEnd'],
103
123
  'status': value['status'],
124
+ 'access_state': value['accessState'],
125
+ 'days_until_expiry': value['daysUntilExpiry'],
104
126
  'user_type': value['userType'],
105
127
  'completion_date': value['completionDate'],
106
128
  };
@@ -27,7 +27,36 @@ export interface PostCourse {
27
27
  * @memberof PostCourse
28
28
  */
29
29
  description: string;
30
+ /**
31
+ * Course-level learner access policy. If omitted, new courses default to
32
+ * duration_days with 90 days.
33
+ *
34
+ * @type {PostCourseAccessPolicyTypeEnum}
35
+ * @memberof PostCourse
36
+ */
37
+ accessPolicyType?: PostCourseAccessPolicyTypeEnum;
38
+ /**
39
+ * Number of access days from enrollment start when access_policy_type is duration_days.
40
+ * @type {number}
41
+ * @memberof PostCourse
42
+ */
43
+ accessDurationDays?: number | null;
44
+ /**
45
+ * Fixed Unix timestamp when access expires when access_policy_type is fixed_end_date.
46
+ * @type {number}
47
+ * @memberof PostCourse
48
+ */
49
+ accessFixedEndAt?: number | null;
30
50
  }
51
+ /**
52
+ * @export
53
+ */
54
+ export declare const PostCourseAccessPolicyTypeEnum: {
55
+ readonly DurationDays: "duration_days";
56
+ readonly FixedEndDate: "fixed_end_date";
57
+ readonly NeverExpires: "never_expires";
58
+ };
59
+ export type PostCourseAccessPolicyTypeEnum = typeof PostCourseAccessPolicyTypeEnum[keyof typeof PostCourseAccessPolicyTypeEnum];
31
60
  /**
32
61
  * Check if a given object implements the PostCourse interface.
33
62
  */
@@ -13,11 +13,20 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PostCourseAccessPolicyTypeEnum = void 0;
16
17
  exports.instanceOfPostCourse = instanceOfPostCourse;
17
18
  exports.PostCourseFromJSON = PostCourseFromJSON;
18
19
  exports.PostCourseFromJSONTyped = PostCourseFromJSONTyped;
19
20
  exports.PostCourseToJSON = PostCourseToJSON;
20
21
  exports.PostCourseToJSONTyped = PostCourseToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.PostCourseAccessPolicyTypeEnum = {
26
+ DurationDays: 'duration_days',
27
+ FixedEndDate: 'fixed_end_date',
28
+ NeverExpires: 'never_expires'
29
+ };
21
30
  /**
22
31
  * Check if a given object implements the PostCourse interface.
23
32
  */
@@ -38,6 +47,9 @@ function PostCourseFromJSONTyped(json, ignoreDiscriminator) {
38
47
  return {
39
48
  'name': json['name'],
40
49
  'description': json['description'],
50
+ 'accessPolicyType': json['access_policy_type'] == null ? undefined : json['access_policy_type'],
51
+ 'accessDurationDays': json['access_duration_days'] == null ? undefined : json['access_duration_days'],
52
+ 'accessFixedEndAt': json['access_fixed_end_at'] == null ? undefined : json['access_fixed_end_at'],
41
53
  };
42
54
  }
43
55
  function PostCourseToJSON(json) {
@@ -50,5 +62,8 @@ function PostCourseToJSONTyped(value, ignoreDiscriminator = false) {
50
62
  return {
51
63
  'name': value['name'],
52
64
  'description': value['description'],
65
+ 'access_policy_type': value['accessPolicyType'],
66
+ 'access_duration_days': value['accessDurationDays'],
67
+ 'access_fixed_end_at': value['accessFixedEndAt'],
53
68
  };
54
69
  }
@@ -26,7 +26,7 @@ export interface PostCourseEnrollment {
26
26
  * @type {number}
27
27
  * @memberof PostCourseEnrollment
28
28
  */
29
- enrollmentDateStart: number;
29
+ enrollmentDateStart?: number;
30
30
  /**
31
31
  * End date of the enrollment (Unix timestamp)
32
32
  * @type {number}
@@ -45,6 +45,15 @@ export interface PostCourseEnrollment {
45
45
  * @memberof PostCourseEnrollment
46
46
  */
47
47
  userType?: PostCourseEnrollmentUserTypeEnum | null;
48
+ /**
49
+ * How to handle a learner with a prior terminal enrollment for this course.
50
+ * restart creates a new enrollment period; resume reopens the latest terminal
51
+ * enrollment. Active enrollments always conflict.
52
+ *
53
+ * @type {PostCourseEnrollmentReEnrollmentModeEnum}
54
+ * @memberof PostCourseEnrollment
55
+ */
56
+ reEnrollmentMode?: PostCourseEnrollmentReEnrollmentModeEnum | null;
48
57
  }
49
58
  /**
50
59
  * @export
@@ -54,6 +63,14 @@ export declare const PostCourseEnrollmentUserTypeEnum: {
54
63
  readonly Instructor: "Instructor";
55
64
  };
56
65
  export type PostCourseEnrollmentUserTypeEnum = typeof PostCourseEnrollmentUserTypeEnum[keyof typeof PostCourseEnrollmentUserTypeEnum];
66
+ /**
67
+ * @export
68
+ */
69
+ export declare const PostCourseEnrollmentReEnrollmentModeEnum: {
70
+ readonly Restart: "restart";
71
+ readonly Resume: "resume";
72
+ };
73
+ export type PostCourseEnrollmentReEnrollmentModeEnum = typeof PostCourseEnrollmentReEnrollmentModeEnum[keyof typeof PostCourseEnrollmentReEnrollmentModeEnum];
57
74
  /**
58
75
  * Check if a given object implements the PostCourseEnrollment interface.
59
76
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.PostCourseEnrollmentUserTypeEnum = void 0;
16
+ exports.PostCourseEnrollmentReEnrollmentModeEnum = exports.PostCourseEnrollmentUserTypeEnum = void 0;
17
17
  exports.instanceOfPostCourseEnrollment = instanceOfPostCourseEnrollment;
18
18
  exports.PostCourseEnrollmentFromJSON = PostCourseEnrollmentFromJSON;
19
19
  exports.PostCourseEnrollmentFromJSONTyped = PostCourseEnrollmentFromJSONTyped;
@@ -26,14 +26,19 @@ exports.PostCourseEnrollmentUserTypeEnum = {
26
26
  Student: 'Student',
27
27
  Instructor: 'Instructor'
28
28
  };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.PostCourseEnrollmentReEnrollmentModeEnum = {
33
+ Restart: 'restart',
34
+ Resume: 'resume'
35
+ };
29
36
  /**
30
37
  * Check if a given object implements the PostCourseEnrollment interface.
31
38
  */
32
39
  function instanceOfPostCourseEnrollment(value) {
33
40
  if (!('userId' in value) || value['userId'] === undefined)
34
41
  return false;
35
- if (!('enrollmentDateStart' in value) || value['enrollmentDateStart'] === undefined)
36
- return false;
37
42
  return true;
38
43
  }
39
44
  function PostCourseEnrollmentFromJSON(json) {
@@ -45,10 +50,11 @@ function PostCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
45
50
  }
46
51
  return {
47
52
  'userId': json['user_id'],
48
- 'enrollmentDateStart': json['enrollment_date_start'],
53
+ 'enrollmentDateStart': json['enrollment_date_start'] == null ? undefined : json['enrollment_date_start'],
49
54
  'enrollmentDateEnd': json['enrollment_date_end'] == null ? undefined : json['enrollment_date_end'],
50
55
  'notes': json['notes'] == null ? undefined : json['notes'],
51
56
  'userType': json['user_type'] == null ? undefined : json['user_type'],
57
+ 'reEnrollmentMode': json['re_enrollment_mode'] == null ? undefined : json['re_enrollment_mode'],
52
58
  };
53
59
  }
54
60
  function PostCourseEnrollmentToJSON(json) {
@@ -64,5 +70,6 @@ function PostCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = false) {
64
70
  'enrollment_date_end': value['enrollmentDateEnd'],
65
71
  'notes': value['notes'],
66
72
  'user_type': value['userType'],
73
+ 're_enrollment_mode': value['reEnrollmentMode'],
67
74
  };
68
75
  }
@@ -39,7 +39,34 @@ export interface PutCourse {
39
39
  * @memberof PutCourse
40
40
  */
41
41
  published?: boolean;
42
+ /**
43
+ * Course-level learner access policy.
44
+ * @type {PutCourseAccessPolicyTypeEnum}
45
+ * @memberof PutCourse
46
+ */
47
+ accessPolicyType?: PutCourseAccessPolicyTypeEnum;
48
+ /**
49
+ * Number of access days from enrollment start when access_policy_type is duration_days.
50
+ * @type {number}
51
+ * @memberof PutCourse
52
+ */
53
+ accessDurationDays?: number | null;
54
+ /**
55
+ * Fixed Unix timestamp when access expires when access_policy_type is fixed_end_date.
56
+ * @type {number}
57
+ * @memberof PutCourse
58
+ */
59
+ accessFixedEndAt?: number | null;
42
60
  }
61
+ /**
62
+ * @export
63
+ */
64
+ export declare const PutCourseAccessPolicyTypeEnum: {
65
+ readonly DurationDays: "duration_days";
66
+ readonly FixedEndDate: "fixed_end_date";
67
+ readonly NeverExpires: "never_expires";
68
+ };
69
+ export type PutCourseAccessPolicyTypeEnum = typeof PutCourseAccessPolicyTypeEnum[keyof typeof PutCourseAccessPolicyTypeEnum];
43
70
  /**
44
71
  * Check if a given object implements the PutCourse interface.
45
72
  */
@@ -13,11 +13,20 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PutCourseAccessPolicyTypeEnum = void 0;
16
17
  exports.instanceOfPutCourse = instanceOfPutCourse;
17
18
  exports.PutCourseFromJSON = PutCourseFromJSON;
18
19
  exports.PutCourseFromJSONTyped = PutCourseFromJSONTyped;
19
20
  exports.PutCourseToJSON = PutCourseToJSON;
20
21
  exports.PutCourseToJSONTyped = PutCourseToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.PutCourseAccessPolicyTypeEnum = {
26
+ DurationDays: 'duration_days',
27
+ FixedEndDate: 'fixed_end_date',
28
+ NeverExpires: 'never_expires'
29
+ };
21
30
  /**
22
31
  * Check if a given object implements the PutCourse interface.
23
32
  */
@@ -36,6 +45,9 @@ function PutCourseFromJSONTyped(json, ignoreDiscriminator) {
36
45
  'name': json['name'] == null ? undefined : json['name'],
37
46
  'description': json['description'] == null ? undefined : json['description'],
38
47
  'published': json['published'] == null ? undefined : json['published'],
48
+ 'accessPolicyType': json['access_policy_type'] == null ? undefined : json['access_policy_type'],
49
+ 'accessDurationDays': json['access_duration_days'] == null ? undefined : json['access_duration_days'],
50
+ 'accessFixedEndAt': json['access_fixed_end_at'] == null ? undefined : json['access_fixed_end_at'],
39
51
  };
40
52
  }
41
53
  function PutCourseToJSON(json) {
@@ -49,5 +61,8 @@ function PutCourseToJSONTyped(value, ignoreDiscriminator = false) {
49
61
  'name': value['name'],
50
62
  'description': value['description'],
51
63
  'published': value['published'],
64
+ 'access_policy_type': value['accessPolicyType'],
65
+ 'access_duration_days': value['accessDurationDays'],
66
+ 'access_fixed_end_at': value['accessFixedEndAt'],
52
67
  };
53
68
  }
@@ -35,7 +35,13 @@ export interface PutCourseEnrollment {
35
35
  * @type {number}
36
36
  * @memberof PutCourseEnrollment
37
37
  */
38
- enrollmentDateEnd?: number;
38
+ enrollmentDateEnd?: number | null;
39
+ /**
40
+ * Add this many days to the current end date, or to now if the enrollment is already expired.
41
+ * @type {number}
42
+ * @memberof PutCourseEnrollment
43
+ */
44
+ extensionDays?: number;
39
45
  /**
40
46
  * Optional notes about the enrollment
41
47
  * @type {string}
@@ -53,6 +59,7 @@ export declare const PutCourseEnrollmentStatusEnum: {
53
59
  readonly Withdrawn: "Withdrawn";
54
60
  readonly Removed: "Removed";
55
61
  readonly Archived: "Archived";
62
+ readonly Suspended: "Suspended";
56
63
  };
57
64
  export type PutCourseEnrollmentStatusEnum = typeof PutCourseEnrollmentStatusEnum[keyof typeof PutCourseEnrollmentStatusEnum];
58
65
  /**
@@ -28,7 +28,8 @@ exports.PutCourseEnrollmentStatusEnum = {
28
28
  Failed: 'Failed',
29
29
  Withdrawn: 'Withdrawn',
30
30
  Removed: 'Removed',
31
- Archived: 'Archived'
31
+ Archived: 'Archived',
32
+ Suspended: 'Suspended'
32
33
  };
33
34
  /**
34
35
  * @export
@@ -54,6 +55,7 @@ function PutCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
54
55
  'status': json['status'] == null ? undefined : json['status'],
55
56
  'userType': json['user_type'] == null ? undefined : json['user_type'],
56
57
  'enrollmentDateEnd': json['enrollment_date_end'] == null ? undefined : json['enrollment_date_end'],
58
+ 'extensionDays': json['extension_days'] == null ? undefined : json['extension_days'],
57
59
  'notes': json['notes'] == null ? undefined : json['notes'],
58
60
  };
59
61
  }
@@ -68,6 +70,7 @@ function PutCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = false) {
68
70
  'status': value['status'],
69
71
  'user_type': value['userType'],
70
72
  'enrollment_date_end': value['enrollmentDateEnd'],
73
+ 'extension_days': value['extensionDays'],
71
74
  'notes': value['notes'],
72
75
  };
73
76
  }
@@ -6,6 +6,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
6
6
  |------------- | ------------- | -------------|
7
7
  | [**commitScormSession**](ContentApi.md#commitscormsession) | **POST** /scorm/sessions/{scormSessionId}/commit | Commit SCORM session data |
8
8
  | [**deleteContent**](ContentApi.md#deletecontent) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Delete content by id |
9
+ | [**deleteContentVersion**](ContentApi.md#deletecontentversion) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Delete an inactive content version |
9
10
  | [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
10
11
  | [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
11
12
  | [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
@@ -176,6 +177,84 @@ No authorization required
176
177
  [[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
 
178
179
 
180
+ ## deleteContentVersion
181
+
182
+ > deleteContentVersion(contentId, moduleId, courseId, versionId)
183
+
184
+ Delete an inactive content version
185
+
186
+ ### Example
187
+
188
+ ```ts
189
+ import {
190
+ Configuration,
191
+ ContentApi,
192
+ } from '@easyedu/js-lsm-api';
193
+ import type { DeleteContentVersionRequest } from '@easyedu/js-lsm-api';
194
+
195
+ async function example() {
196
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
197
+ const api = new ContentApi();
198
+
199
+ const body = {
200
+ // string | The content\'s external_id
201
+ contentId: contentId_example,
202
+ // string
203
+ moduleId: moduleId_example,
204
+ // string
205
+ courseId: courseId_example,
206
+ // string | The version\'s external_id
207
+ versionId: versionId_example,
208
+ } satisfies DeleteContentVersionRequest;
209
+
210
+ try {
211
+ const data = await api.deleteContentVersion(body);
212
+ console.log(data);
213
+ } catch (error) {
214
+ console.error(error);
215
+ }
216
+ }
217
+
218
+ // Run the test
219
+ example().catch(console.error);
220
+ ```
221
+
222
+ ### Parameters
223
+
224
+
225
+ | Name | Type | Description | Notes |
226
+ |------------- | ------------- | ------------- | -------------|
227
+ | **contentId** | `string` | The content\'s external_id | [Defaults to `undefined`] |
228
+ | **moduleId** | `string` | | [Defaults to `undefined`] |
229
+ | **courseId** | `string` | | [Defaults to `undefined`] |
230
+ | **versionId** | `string` | The version\'s external_id | [Defaults to `undefined`] |
231
+
232
+ ### Return type
233
+
234
+ `void` (Empty response body)
235
+
236
+ ### Authorization
237
+
238
+ No authorization required
239
+
240
+ ### HTTP request headers
241
+
242
+ - **Content-Type**: Not defined
243
+ - **Accept**: Not defined
244
+
245
+
246
+ ### HTTP response details
247
+ | Status code | Description | Response headers |
248
+ |-------------|-------------|------------------|
249
+ | **204** | Version deleted successfully | - |
250
+ | **400** | Active versions cannot be deleted | - |
251
+ | **401** | Unauthorized | - |
252
+ | **403** | Forbidden - you do not have permission to delete this content version | - |
253
+ | **404** | Content or version not found | - |
254
+
255
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
256
+
257
+
179
258
  ## getContent
180
259
 
181
260
  > GetContent getContent(contentId, moduleId, courseId)