@easyedu/js-lsm-api 1.65.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 (44) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/models/GetCourse.d.ts +27 -0
  3. package/dist/esm/models/GetCourse.js +20 -0
  4. package/dist/esm/models/GetCourseEnrollment.d.ts +29 -1
  5. package/dist/esm/models/GetCourseEnrollment.js +23 -1
  6. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +28 -1
  7. package/dist/esm/models/GetCourseEnrollmentListItem.js +23 -1
  8. package/dist/esm/models/PostCourse.d.ts +29 -0
  9. package/dist/esm/models/PostCourse.js +14 -0
  10. package/dist/esm/models/PostCourseEnrollment.d.ts +18 -1
  11. package/dist/esm/models/PostCourseEnrollment.js +10 -3
  12. package/dist/esm/models/PutCourse.d.ts +27 -0
  13. package/dist/esm/models/PutCourse.js +14 -0
  14. package/dist/esm/models/PutCourseEnrollment.d.ts +8 -1
  15. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  16. package/dist/models/GetCourse.d.ts +27 -0
  17. package/dist/models/GetCourse.js +21 -0
  18. package/dist/models/GetCourseEnrollment.d.ts +29 -1
  19. package/dist/models/GetCourseEnrollment.js +24 -2
  20. package/dist/models/GetCourseEnrollmentListItem.d.ts +28 -1
  21. package/dist/models/GetCourseEnrollmentListItem.js +24 -2
  22. package/dist/models/PostCourse.d.ts +29 -0
  23. package/dist/models/PostCourse.js +15 -0
  24. package/dist/models/PostCourseEnrollment.d.ts +18 -1
  25. package/dist/models/PostCourseEnrollment.js +11 -4
  26. package/dist/models/PutCourse.d.ts +27 -0
  27. package/dist/models/PutCourse.js +15 -0
  28. package/dist/models/PutCourseEnrollment.d.ts +8 -1
  29. package/dist/models/PutCourseEnrollment.js +4 -1
  30. package/docs/GetCourse.md +6 -0
  31. package/docs/GetCourseEnrollment.md +4 -0
  32. package/docs/GetCourseEnrollmentListItem.md +4 -0
  33. package/docs/PostCourse.md +6 -0
  34. package/docs/PostCourseEnrollment.md +2 -0
  35. package/docs/PutCourse.md +6 -0
  36. package/docs/PutCourseEnrollment.md +2 -0
  37. package/package.json +1 -1
  38. package/src/models/GetCourse.ts +39 -0
  39. package/src/models/GetCourseEnrollment.ts +37 -2
  40. package/src/models/GetCourseEnrollmentListItem.ts +36 -2
  41. package/src/models/PostCourse.ts +38 -0
  42. package/src/models/PostCourseEnrollment.ts +22 -3
  43. package/src/models/PutCourse.ts +36 -0
  44. package/src/models/PutCourseEnrollment.ts +11 -2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.65.0
1
+ # @easyedu/js-lsm-api@1.66.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -513,7 +513,7 @@ and is automatically generated by the
513
513
  [OpenAPI Generator](https://openapi-generator.tech) project:
514
514
 
515
515
  - API version: `1.0.0`
516
- - Package version: `1.65.0`
516
+ - Package version: `1.66.0`
517
517
  - Generator version: `7.22.0`
518
518
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
519
519
 
@@ -51,7 +51,34 @@ export interface GetCourse {
51
51
  * @memberof GetCourse
52
52
  */
53
53
  createdAt: number;
54
+ /**
55
+ * Course-level learner access policy.
56
+ * @type {GetCourseAccessPolicyTypeEnum}
57
+ * @memberof GetCourse
58
+ */
59
+ accessPolicyType: GetCourseAccessPolicyTypeEnum;
60
+ /**
61
+ * Number of access days from enrollment start when access_policy_type is duration_days.
62
+ * @type {number}
63
+ * @memberof GetCourse
64
+ */
65
+ accessDurationDays: number | null;
66
+ /**
67
+ * Fixed Unix timestamp when access expires when access_policy_type is fixed_end_date.
68
+ * @type {number}
69
+ * @memberof GetCourse
70
+ */
71
+ accessFixedEndAt: number | null;
54
72
  }
73
+ /**
74
+ * @export
75
+ */
76
+ export declare const GetCourseAccessPolicyTypeEnum: {
77
+ readonly DurationDays: "duration_days";
78
+ readonly FixedEndDate: "fixed_end_date";
79
+ readonly NeverExpires: "never_expires";
80
+ };
81
+ export type GetCourseAccessPolicyTypeEnum = typeof GetCourseAccessPolicyTypeEnum[keyof typeof GetCourseAccessPolicyTypeEnum];
55
82
  /**
56
83
  * Check if a given object implements the GetCourse interface.
57
84
  */
@@ -11,6 +11,14 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ /**
15
+ * @export
16
+ */
17
+ export const GetCourseAccessPolicyTypeEnum = {
18
+ DurationDays: 'duration_days',
19
+ FixedEndDate: 'fixed_end_date',
20
+ NeverExpires: 'never_expires'
21
+ };
14
22
  /**
15
23
  * Check if a given object implements the GetCourse interface.
16
24
  */
@@ -27,6 +35,12 @@ export function instanceOfGetCourse(value) {
27
35
  return false;
28
36
  if (!('createdAt' in value) || value['createdAt'] === undefined)
29
37
  return false;
38
+ if (!('accessPolicyType' in value) || value['accessPolicyType'] === undefined)
39
+ return false;
40
+ if (!('accessDurationDays' in value) || value['accessDurationDays'] === undefined)
41
+ return false;
42
+ if (!('accessFixedEndAt' in value) || value['accessFixedEndAt'] === undefined)
43
+ return false;
30
44
  return true;
31
45
  }
32
46
  export function GetCourseFromJSON(json) {
@@ -43,6 +57,9 @@ export function GetCourseFromJSONTyped(json, ignoreDiscriminator) {
43
57
  'imageUrl': json['image_url'],
44
58
  'published': json['published'],
45
59
  'createdAt': json['created_at'],
60
+ 'accessPolicyType': json['access_policy_type'],
61
+ 'accessDurationDays': json['access_duration_days'],
62
+ 'accessFixedEndAt': json['access_fixed_end_at'],
46
63
  };
47
64
  }
48
65
  export function GetCourseToJSON(json) {
@@ -58,5 +75,8 @@ export function GetCourseToJSONTyped(value, ignoreDiscriminator = false) {
58
75
  'image_url': value['imageUrl'],
59
76
  'published': value['published'],
60
77
  'created_at': value['createdAt'],
78
+ 'access_policy_type': value['accessPolicyType'],
79
+ 'access_duration_days': value['accessDurationDays'],
80
+ 'access_fixed_end_at': value['accessFixedEndAt'],
61
81
  };
62
82
  }
@@ -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
  */
@@ -22,7 +22,21 @@ export const GetCourseEnrollmentStatusEnum = {
22
22
  Expired: 'Expired',
23
23
  Withdrawn: 'Withdrawn',
24
24
  Removed: 'Removed',
25
- Archived: 'Archived'
25
+ Archived: 'Archived',
26
+ Suspended: 'Suspended'
27
+ };
28
+ /**
29
+ * @export
30
+ */
31
+ export const GetCourseEnrollmentAccessStateEnum = {
32
+ Active: 'active',
33
+ CompletedReview: 'completed_review',
34
+ Expired: 'expired',
35
+ Suspended: 'suspended',
36
+ Failed: 'failed',
37
+ Withdrawn: 'withdrawn',
38
+ Removed: 'removed',
39
+ Archived: 'archived'
26
40
  };
27
41
  /**
28
42
  * @export
@@ -49,6 +63,10 @@ export function instanceOfGetCourseEnrollment(value) {
49
63
  return false;
50
64
  if (!('status' in value) || value['status'] === undefined)
51
65
  return false;
66
+ if (!('accessState' in value) || value['accessState'] === undefined)
67
+ return false;
68
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined)
69
+ return false;
52
70
  if (!('userType' in value) || value['userType'] === undefined)
53
71
  return false;
54
72
  if (!('completionDate' in value) || value['completionDate'] === undefined)
@@ -70,6 +88,8 @@ export function GetCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
70
88
  'enrollmentDateEnd': json['enrollment_date_end'],
71
89
  'notes': json['notes'],
72
90
  'status': json['status'],
91
+ 'accessState': json['access_state'],
92
+ 'daysUntilExpiry': json['days_until_expiry'],
73
93
  'userType': json['user_type'],
74
94
  'completionDate': json['completion_date'],
75
95
  };
@@ -89,6 +109,8 @@ export function GetCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = fals
89
109
  'enrollment_date_end': value['enrollmentDateEnd'],
90
110
  'notes': value['notes'],
91
111
  'status': value['status'],
112
+ 'access_state': value['accessState'],
113
+ 'days_until_expiry': value['daysUntilExpiry'],
92
114
  'user_type': value['userType'],
93
115
  'completion_date': value['completionDate'],
94
116
  };
@@ -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
  */
@@ -22,7 +22,21 @@ export const GetCourseEnrollmentListItemStatusEnum = {
22
22
  Expired: 'Expired',
23
23
  Withdrawn: 'Withdrawn',
24
24
  Removed: 'Removed',
25
- Archived: 'Archived'
25
+ Archived: 'Archived',
26
+ Suspended: 'Suspended'
27
+ };
28
+ /**
29
+ * @export
30
+ */
31
+ export const GetCourseEnrollmentListItemAccessStateEnum = {
32
+ Active: 'active',
33
+ CompletedReview: 'completed_review',
34
+ Expired: 'expired',
35
+ Suspended: 'suspended',
36
+ Failed: 'failed',
37
+ Withdrawn: 'withdrawn',
38
+ Removed: 'removed',
39
+ Archived: 'archived'
26
40
  };
27
41
  /**
28
42
  * @export
@@ -51,6 +65,10 @@ export function instanceOfGetCourseEnrollmentListItem(value) {
51
65
  return false;
52
66
  if (!('status' in value) || value['status'] === undefined)
53
67
  return false;
68
+ if (!('accessState' in value) || value['accessState'] === undefined)
69
+ return false;
70
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined)
71
+ return false;
54
72
  if (!('userType' in value) || value['userType'] === undefined)
55
73
  return false;
56
74
  if (!('completionDate' in value) || value['completionDate'] === undefined)
@@ -73,6 +91,8 @@ export function GetCourseEnrollmentListItemFromJSONTyped(json, ignoreDiscriminat
73
91
  'enrollmentDateStart': json['enrollment_date_start'],
74
92
  'enrollmentDateEnd': json['enrollment_date_end'],
75
93
  'status': json['status'],
94
+ 'accessState': json['access_state'],
95
+ 'daysUntilExpiry': json['days_until_expiry'],
76
96
  'userType': json['user_type'],
77
97
  'completionDate': json['completion_date'],
78
98
  };
@@ -93,6 +113,8 @@ export function GetCourseEnrollmentListItemToJSONTyped(value, ignoreDiscriminato
93
113
  'enrollment_date_start': value['enrollmentDateStart'],
94
114
  'enrollment_date_end': value['enrollmentDateEnd'],
95
115
  'status': value['status'],
116
+ 'access_state': value['accessState'],
117
+ 'days_until_expiry': value['daysUntilExpiry'],
96
118
  'user_type': value['userType'],
97
119
  'completion_date': value['completionDate'],
98
120
  };
@@ -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
  */
@@ -11,6 +11,14 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ /**
15
+ * @export
16
+ */
17
+ export const PostCourseAccessPolicyTypeEnum = {
18
+ DurationDays: 'duration_days',
19
+ FixedEndDate: 'fixed_end_date',
20
+ NeverExpires: 'never_expires'
21
+ };
14
22
  /**
15
23
  * Check if a given object implements the PostCourse interface.
16
24
  */
@@ -31,6 +39,9 @@ export function PostCourseFromJSONTyped(json, ignoreDiscriminator) {
31
39
  return {
32
40
  'name': json['name'],
33
41
  'description': json['description'],
42
+ 'accessPolicyType': json['access_policy_type'] == null ? undefined : json['access_policy_type'],
43
+ 'accessDurationDays': json['access_duration_days'] == null ? undefined : json['access_duration_days'],
44
+ 'accessFixedEndAt': json['access_fixed_end_at'] == null ? undefined : json['access_fixed_end_at'],
34
45
  };
35
46
  }
36
47
  export function PostCourseToJSON(json) {
@@ -43,5 +54,8 @@ export function PostCourseToJSONTyped(value, ignoreDiscriminator = false) {
43
54
  return {
44
55
  'name': value['name'],
45
56
  'description': value['description'],
57
+ 'access_policy_type': value['accessPolicyType'],
58
+ 'access_duration_days': value['accessDurationDays'],
59
+ 'access_fixed_end_at': value['accessFixedEndAt'],
46
60
  };
47
61
  }
@@ -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
  */
@@ -18,14 +18,19 @@ export const PostCourseEnrollmentUserTypeEnum = {
18
18
  Student: 'Student',
19
19
  Instructor: 'Instructor'
20
20
  };
21
+ /**
22
+ * @export
23
+ */
24
+ export const PostCourseEnrollmentReEnrollmentModeEnum = {
25
+ Restart: 'restart',
26
+ Resume: 'resume'
27
+ };
21
28
  /**
22
29
  * Check if a given object implements the PostCourseEnrollment interface.
23
30
  */
24
31
  export function instanceOfPostCourseEnrollment(value) {
25
32
  if (!('userId' in value) || value['userId'] === undefined)
26
33
  return false;
27
- if (!('enrollmentDateStart' in value) || value['enrollmentDateStart'] === undefined)
28
- return false;
29
34
  return true;
30
35
  }
31
36
  export function PostCourseEnrollmentFromJSON(json) {
@@ -37,10 +42,11 @@ export function PostCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
37
42
  }
38
43
  return {
39
44
  'userId': json['user_id'],
40
- 'enrollmentDateStart': json['enrollment_date_start'],
45
+ 'enrollmentDateStart': json['enrollment_date_start'] == null ? undefined : json['enrollment_date_start'],
41
46
  'enrollmentDateEnd': json['enrollment_date_end'] == null ? undefined : json['enrollment_date_end'],
42
47
  'notes': json['notes'] == null ? undefined : json['notes'],
43
48
  'userType': json['user_type'] == null ? undefined : json['user_type'],
49
+ 'reEnrollmentMode': json['re_enrollment_mode'] == null ? undefined : json['re_enrollment_mode'],
44
50
  };
45
51
  }
46
52
  export function PostCourseEnrollmentToJSON(json) {
@@ -56,5 +62,6 @@ export function PostCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = fal
56
62
  'enrollment_date_end': value['enrollmentDateEnd'],
57
63
  'notes': value['notes'],
58
64
  'user_type': value['userType'],
65
+ 're_enrollment_mode': value['reEnrollmentMode'],
59
66
  };
60
67
  }
@@ -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
  */
@@ -11,6 +11,14 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ /**
15
+ * @export
16
+ */
17
+ export const PutCourseAccessPolicyTypeEnum = {
18
+ DurationDays: 'duration_days',
19
+ FixedEndDate: 'fixed_end_date',
20
+ NeverExpires: 'never_expires'
21
+ };
14
22
  /**
15
23
  * Check if a given object implements the PutCourse interface.
16
24
  */
@@ -29,6 +37,9 @@ export function PutCourseFromJSONTyped(json, ignoreDiscriminator) {
29
37
  'name': json['name'] == null ? undefined : json['name'],
30
38
  'description': json['description'] == null ? undefined : json['description'],
31
39
  'published': json['published'] == null ? undefined : json['published'],
40
+ 'accessPolicyType': json['access_policy_type'] == null ? undefined : json['access_policy_type'],
41
+ 'accessDurationDays': json['access_duration_days'] == null ? undefined : json['access_duration_days'],
42
+ 'accessFixedEndAt': json['access_fixed_end_at'] == null ? undefined : json['access_fixed_end_at'],
32
43
  };
33
44
  }
34
45
  export function PutCourseToJSON(json) {
@@ -42,5 +53,8 @@ export function PutCourseToJSONTyped(value, ignoreDiscriminator = false) {
42
53
  'name': value['name'],
43
54
  'description': value['description'],
44
55
  'published': value['published'],
56
+ 'access_policy_type': value['accessPolicyType'],
57
+ 'access_duration_days': value['accessDurationDays'],
58
+ 'access_fixed_end_at': value['accessFixedEndAt'],
45
59
  };
46
60
  }
@@ -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
  /**
@@ -20,7 +20,8 @@ export const PutCourseEnrollmentStatusEnum = {
20
20
  Failed: 'Failed',
21
21
  Withdrawn: 'Withdrawn',
22
22
  Removed: 'Removed',
23
- Archived: 'Archived'
23
+ Archived: 'Archived',
24
+ Suspended: 'Suspended'
24
25
  };
25
26
  /**
26
27
  * @export
@@ -46,6 +47,7 @@ export function PutCourseEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
46
47
  'status': json['status'] == null ? undefined : json['status'],
47
48
  'userType': json['user_type'] == null ? undefined : json['user_type'],
48
49
  'enrollmentDateEnd': json['enrollment_date_end'] == null ? undefined : json['enrollment_date_end'],
50
+ 'extensionDays': json['extension_days'] == null ? undefined : json['extension_days'],
49
51
  'notes': json['notes'] == null ? undefined : json['notes'],
50
52
  };
51
53
  }
@@ -60,6 +62,7 @@ export function PutCourseEnrollmentToJSONTyped(value, ignoreDiscriminator = fals
60
62
  'status': value['status'],
61
63
  'user_type': value['userType'],
62
64
  'enrollment_date_end': value['enrollmentDateEnd'],
65
+ 'extension_days': value['extensionDays'],
63
66
  'notes': value['notes'],
64
67
  };
65
68
  }
@@ -51,7 +51,34 @@ export interface GetCourse {
51
51
  * @memberof GetCourse
52
52
  */
53
53
  createdAt: number;
54
+ /**
55
+ * Course-level learner access policy.
56
+ * @type {GetCourseAccessPolicyTypeEnum}
57
+ * @memberof GetCourse
58
+ */
59
+ accessPolicyType: GetCourseAccessPolicyTypeEnum;
60
+ /**
61
+ * Number of access days from enrollment start when access_policy_type is duration_days.
62
+ * @type {number}
63
+ * @memberof GetCourse
64
+ */
65
+ accessDurationDays: number | null;
66
+ /**
67
+ * Fixed Unix timestamp when access expires when access_policy_type is fixed_end_date.
68
+ * @type {number}
69
+ * @memberof GetCourse
70
+ */
71
+ accessFixedEndAt: number | null;
54
72
  }
73
+ /**
74
+ * @export
75
+ */
76
+ export declare const GetCourseAccessPolicyTypeEnum: {
77
+ readonly DurationDays: "duration_days";
78
+ readonly FixedEndDate: "fixed_end_date";
79
+ readonly NeverExpires: "never_expires";
80
+ };
81
+ export type GetCourseAccessPolicyTypeEnum = typeof GetCourseAccessPolicyTypeEnum[keyof typeof GetCourseAccessPolicyTypeEnum];
55
82
  /**
56
83
  * Check if a given object implements the GetCourse interface.
57
84
  */
@@ -13,11 +13,20 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GetCourseAccessPolicyTypeEnum = void 0;
16
17
  exports.instanceOfGetCourse = instanceOfGetCourse;
17
18
  exports.GetCourseFromJSON = GetCourseFromJSON;
18
19
  exports.GetCourseFromJSONTyped = GetCourseFromJSONTyped;
19
20
  exports.GetCourseToJSON = GetCourseToJSON;
20
21
  exports.GetCourseToJSONTyped = GetCourseToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.GetCourseAccessPolicyTypeEnum = {
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 GetCourse interface.
23
32
  */
@@ -34,6 +43,12 @@ function instanceOfGetCourse(value) {
34
43
  return false;
35
44
  if (!('createdAt' in value) || value['createdAt'] === undefined)
36
45
  return false;
46
+ if (!('accessPolicyType' in value) || value['accessPolicyType'] === undefined)
47
+ return false;
48
+ if (!('accessDurationDays' in value) || value['accessDurationDays'] === undefined)
49
+ return false;
50
+ if (!('accessFixedEndAt' in value) || value['accessFixedEndAt'] === undefined)
51
+ return false;
37
52
  return true;
38
53
  }
39
54
  function GetCourseFromJSON(json) {
@@ -50,6 +65,9 @@ function GetCourseFromJSONTyped(json, ignoreDiscriminator) {
50
65
  'imageUrl': json['image_url'],
51
66
  'published': json['published'],
52
67
  'createdAt': json['created_at'],
68
+ 'accessPolicyType': json['access_policy_type'],
69
+ 'accessDurationDays': json['access_duration_days'],
70
+ 'accessFixedEndAt': json['access_fixed_end_at'],
53
71
  };
54
72
  }
55
73
  function GetCourseToJSON(json) {
@@ -65,5 +83,8 @@ function GetCourseToJSONTyped(value, ignoreDiscriminator = false) {
65
83
  'image_url': value['imageUrl'],
66
84
  'published': value['published'],
67
85
  'created_at': value['createdAt'],
86
+ 'access_policy_type': value['accessPolicyType'],
87
+ 'access_duration_days': value['accessDurationDays'],
88
+ 'access_fixed_end_at': value['accessFixedEndAt'],
68
89
  };
69
90
  }