@easyedu/js-lsm-api 1.101.0 → 1.102.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 (100) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +11 -2
  3. package/dist/apis/CourseApi.d.ts +34 -0
  4. package/dist/apis/CourseApi.js +89 -0
  5. package/dist/esm/apis/CourseApi.d.ts +34 -0
  6. package/dist/esm/apis/CourseApi.js +89 -0
  7. package/dist/esm/models/CourseProgressionMode.d.ts +25 -0
  8. package/dist/esm/models/CourseProgressionMode.js +43 -0
  9. package/dist/esm/models/GetCourseVersion.d.ts +7 -0
  10. package/dist/esm/models/GetCourseVersion.js +5 -0
  11. package/dist/esm/models/GetCourseVersionItem.d.ts +6 -0
  12. package/dist/esm/models/GetCourseVersionItem.js +4 -0
  13. package/dist/esm/models/GetCourseVersionItemProgression.d.ts +105 -0
  14. package/dist/esm/models/GetCourseVersionItemProgression.js +92 -0
  15. package/dist/esm/models/GetCourseVersionItemSession.d.ts +37 -1
  16. package/dist/esm/models/GetCourseVersionItemSession.js +24 -0
  17. package/dist/esm/models/GetCourseVersionProgression.d.ts +59 -0
  18. package/dist/esm/models/GetCourseVersionProgression.js +62 -0
  19. package/dist/esm/models/GetCourseVersionSectionProgression.d.ts +75 -0
  20. package/dist/esm/models/GetCourseVersionSectionProgression.js +72 -0
  21. package/dist/esm/models/GetResourceSession.d.ts +36 -0
  22. package/dist/esm/models/GetResourceSession.js +24 -0
  23. package/dist/esm/models/PostCourseVersionItem.d.ts +6 -0
  24. package/dist/esm/models/PostCourseVersionItem.js +2 -0
  25. package/dist/esm/models/ProgressionGateError.d.ts +76 -0
  26. package/dist/esm/models/ProgressionGateError.js +74 -0
  27. package/dist/esm/models/ProgressionLockReason.d.ts +24 -0
  28. package/dist/esm/models/ProgressionLockReason.js +42 -0
  29. package/dist/esm/models/PutCourseVersionDraft.d.ts +33 -0
  30. package/dist/esm/models/PutCourseVersionDraft.js +44 -0
  31. package/dist/esm/models/PutCourseVersionItem.d.ts +6 -0
  32. package/dist/esm/models/PutCourseVersionItem.js +2 -0
  33. package/dist/esm/models/PutResourceSessionOverride.d.ts +6 -0
  34. package/dist/esm/models/PutResourceSessionOverride.js +2 -0
  35. package/dist/esm/models/index.d.ts +7 -0
  36. package/dist/esm/models/index.js +7 -0
  37. package/dist/models/CourseProgressionMode.d.ts +25 -0
  38. package/dist/models/CourseProgressionMode.js +51 -0
  39. package/dist/models/GetCourseVersion.d.ts +7 -0
  40. package/dist/models/GetCourseVersion.js +5 -0
  41. package/dist/models/GetCourseVersionItem.d.ts +6 -0
  42. package/dist/models/GetCourseVersionItem.js +4 -0
  43. package/dist/models/GetCourseVersionItemProgression.d.ts +105 -0
  44. package/dist/models/GetCourseVersionItemProgression.js +99 -0
  45. package/dist/models/GetCourseVersionItemSession.d.ts +37 -1
  46. package/dist/models/GetCourseVersionItemSession.js +24 -0
  47. package/dist/models/GetCourseVersionProgression.d.ts +59 -0
  48. package/dist/models/GetCourseVersionProgression.js +69 -0
  49. package/dist/models/GetCourseVersionSectionProgression.d.ts +75 -0
  50. package/dist/models/GetCourseVersionSectionProgression.js +79 -0
  51. package/dist/models/GetResourceSession.d.ts +36 -0
  52. package/dist/models/GetResourceSession.js +24 -0
  53. package/dist/models/PostCourseVersionItem.d.ts +6 -0
  54. package/dist/models/PostCourseVersionItem.js +2 -0
  55. package/dist/models/ProgressionGateError.d.ts +76 -0
  56. package/dist/models/ProgressionGateError.js +82 -0
  57. package/dist/models/ProgressionLockReason.d.ts +24 -0
  58. package/dist/models/ProgressionLockReason.js +50 -0
  59. package/dist/models/PutCourseVersionDraft.d.ts +33 -0
  60. package/dist/models/PutCourseVersionDraft.js +51 -0
  61. package/dist/models/PutCourseVersionItem.d.ts +6 -0
  62. package/dist/models/PutCourseVersionItem.js +2 -0
  63. package/dist/models/PutResourceSessionOverride.d.ts +6 -0
  64. package/dist/models/PutResourceSessionOverride.js +2 -0
  65. package/dist/models/index.d.ts +7 -0
  66. package/dist/models/index.js +7 -0
  67. package/docs/CourseApi.md +143 -1
  68. package/docs/CourseProgressionMode.md +33 -0
  69. package/docs/GetCourseVersion.md +2 -0
  70. package/docs/GetCourseVersionItem.md +2 -0
  71. package/docs/GetCourseVersionItemProgression.md +58 -0
  72. package/docs/GetCourseVersionItemSession.md +12 -0
  73. package/docs/GetCourseVersionProgression.md +43 -0
  74. package/docs/GetCourseVersionSectionProgression.md +48 -0
  75. package/docs/GetResourceSession.md +12 -0
  76. package/docs/PlayerApi.md +1 -0
  77. package/docs/PostCourseVersionItem.md +2 -0
  78. package/docs/ProgressionGateError.md +47 -0
  79. package/docs/ProgressionLockReason.md +32 -0
  80. package/docs/PutCourseVersionDraft.md +34 -0
  81. package/docs/PutCourseVersionItem.md +2 -0
  82. package/docs/PutResourceSessionOverride.md +2 -0
  83. package/package.json +1 -1
  84. package/src/apis/CourseApi.ts +133 -0
  85. package/src/apis/PlayerApi.ts +5 -0
  86. package/src/models/CourseProgressionMode.ts +53 -0
  87. package/src/models/GetCourseVersion.ts +16 -0
  88. package/src/models/GetCourseVersionItem.ts +9 -0
  89. package/src/models/GetCourseVersionItemProgression.ts +184 -0
  90. package/src/models/GetCourseVersionItemSession.ts +55 -1
  91. package/src/models/GetCourseVersionProgression.ts +126 -0
  92. package/src/models/GetCourseVersionSectionProgression.ts +139 -0
  93. package/src/models/GetResourceSession.ts +54 -0
  94. package/src/models/PostCourseVersionItem.ts +8 -0
  95. package/src/models/ProgressionGateError.ts +131 -0
  96. package/src/models/ProgressionLockReason.ts +52 -0
  97. package/src/models/PutCourseVersionDraft.ts +76 -0
  98. package/src/models/PutCourseVersionItem.ts +8 -0
  99. package/src/models/PutResourceSessionOverride.ts +8 -0
  100. package/src/models/index.ts +7 -0
@@ -0,0 +1,126 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GetCourseVersionItemProgression } from './GetCourseVersionItemProgression';
17
+ import {
18
+ GetCourseVersionItemProgressionFromJSON,
19
+ GetCourseVersionItemProgressionFromJSONTyped,
20
+ GetCourseVersionItemProgressionToJSON,
21
+ GetCourseVersionItemProgressionToJSONTyped,
22
+ } from './GetCourseVersionItemProgression';
23
+ import type { CourseProgressionMode } from './CourseProgressionMode';
24
+ import {
25
+ CourseProgressionModeFromJSON,
26
+ CourseProgressionModeFromJSONTyped,
27
+ CourseProgressionModeToJSON,
28
+ CourseProgressionModeToJSONTyped,
29
+ } from './CourseProgressionMode';
30
+ import type { GetCourseVersionSectionProgression } from './GetCourseVersionSectionProgression';
31
+ import {
32
+ GetCourseVersionSectionProgressionFromJSON,
33
+ GetCourseVersionSectionProgressionFromJSONTyped,
34
+ GetCourseVersionSectionProgressionToJSON,
35
+ GetCourseVersionSectionProgressionToJSONTyped,
36
+ } from './GetCourseVersionSectionProgression';
37
+
38
+ /**
39
+ * Learner-specific completion and lock state for an enrollment-pinned course version.
40
+ * @export
41
+ * @interface GetCourseVersionProgression
42
+ */
43
+ export interface GetCourseVersionProgression {
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof GetCourseVersionProgression
48
+ */
49
+ courseId: string;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof GetCourseVersionProgression
54
+ */
55
+ courseVersionId: string;
56
+ /**
57
+ *
58
+ * @type {CourseProgressionMode}
59
+ * @memberof GetCourseVersionProgression
60
+ */
61
+ progressionMode: CourseProgressionMode;
62
+ /**
63
+ *
64
+ * @type {Array<GetCourseVersionSectionProgression>}
65
+ * @memberof GetCourseVersionProgression
66
+ */
67
+ sections: Array<GetCourseVersionSectionProgression>;
68
+ /**
69
+ *
70
+ * @type {Array<GetCourseVersionItemProgression>}
71
+ * @memberof GetCourseVersionProgression
72
+ */
73
+ items: Array<GetCourseVersionItemProgression>;
74
+ }
75
+
76
+
77
+
78
+ /**
79
+ * Check if a given object implements the GetCourseVersionProgression interface.
80
+ */
81
+ export function instanceOfGetCourseVersionProgression(value: object): value is GetCourseVersionProgression {
82
+ if (!('courseId' in value) || value['courseId'] === undefined) return false;
83
+ if (!('courseVersionId' in value) || value['courseVersionId'] === undefined) return false;
84
+ if (!('progressionMode' in value) || value['progressionMode'] === undefined) return false;
85
+ if (!('sections' in value) || value['sections'] === undefined) return false;
86
+ if (!('items' in value) || value['items'] === undefined) return false;
87
+ return true;
88
+ }
89
+
90
+ export function GetCourseVersionProgressionFromJSON(json: any): GetCourseVersionProgression {
91
+ return GetCourseVersionProgressionFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function GetCourseVersionProgressionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseVersionProgression {
95
+ if (json == null) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'courseId': json['course_id'],
101
+ 'courseVersionId': json['course_version_id'],
102
+ 'progressionMode': CourseProgressionModeFromJSON(json['progression_mode']),
103
+ 'sections': ((json['sections'] as Array<any>).map(GetCourseVersionSectionProgressionFromJSON)),
104
+ 'items': ((json['items'] as Array<any>).map(GetCourseVersionItemProgressionFromJSON)),
105
+ };
106
+ }
107
+
108
+ export function GetCourseVersionProgressionToJSON(json: any): GetCourseVersionProgression {
109
+ return GetCourseVersionProgressionToJSONTyped(json, false);
110
+ }
111
+
112
+ export function GetCourseVersionProgressionToJSONTyped(value?: GetCourseVersionProgression | null, ignoreDiscriminator: boolean = false): any {
113
+ if (value == null) {
114
+ return value;
115
+ }
116
+
117
+ return {
118
+
119
+ 'course_id': value['courseId'],
120
+ 'course_version_id': value['courseVersionId'],
121
+ 'progression_mode': CourseProgressionModeToJSON(value['progressionMode']),
122
+ 'sections': ((value['sections'] as Array<any>).map(GetCourseVersionSectionProgressionToJSON)),
123
+ 'items': ((value['items'] as Array<any>).map(GetCourseVersionItemProgressionToJSON)),
124
+ };
125
+ }
126
+
@@ -0,0 +1,139 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ProgressionLockReason } from './ProgressionLockReason';
17
+ import {
18
+ ProgressionLockReasonFromJSON,
19
+ ProgressionLockReasonFromJSONTyped,
20
+ ProgressionLockReasonToJSON,
21
+ ProgressionLockReasonToJSONTyped,
22
+ } from './ProgressionLockReason';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetCourseVersionSectionProgression
28
+ */
29
+ export interface GetCourseVersionSectionProgression {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof GetCourseVersionSectionProgression
34
+ */
35
+ sectionId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof GetCourseVersionSectionProgression
40
+ */
41
+ rootSectionId: string;
42
+ /**
43
+ *
44
+ * @type {boolean}
45
+ * @memberof GetCourseVersionSectionProgression
46
+ */
47
+ isRootSection: boolean;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof GetCourseVersionSectionProgression
52
+ */
53
+ isComplete: boolean;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof GetCourseVersionSectionProgression
58
+ */
59
+ isLocked: boolean;
60
+ /**
61
+ *
62
+ * @type {ProgressionLockReason}
63
+ * @memberof GetCourseVersionSectionProgression
64
+ */
65
+ lockReason: ProgressionLockReason | null;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof GetCourseVersionSectionProgression
70
+ */
71
+ blockingSectionId: string | null;
72
+ /**
73
+ *
74
+ * @type {Array<string>}
75
+ * @memberof GetCourseVersionSectionProgression
76
+ */
77
+ blockingItemIds: Array<string>;
78
+ }
79
+
80
+
81
+
82
+ /**
83
+ * Check if a given object implements the GetCourseVersionSectionProgression interface.
84
+ */
85
+ export function instanceOfGetCourseVersionSectionProgression(value: object): value is GetCourseVersionSectionProgression {
86
+ if (!('sectionId' in value) || value['sectionId'] === undefined) return false;
87
+ if (!('rootSectionId' in value) || value['rootSectionId'] === undefined) return false;
88
+ if (!('isRootSection' in value) || value['isRootSection'] === undefined) return false;
89
+ if (!('isComplete' in value) || value['isComplete'] === undefined) return false;
90
+ if (!('isLocked' in value) || value['isLocked'] === undefined) return false;
91
+ if (!('lockReason' in value) || value['lockReason'] === undefined) return false;
92
+ if (!('blockingSectionId' in value) || value['blockingSectionId'] === undefined) return false;
93
+ if (!('blockingItemIds' in value) || value['blockingItemIds'] === undefined) return false;
94
+ return true;
95
+ }
96
+
97
+ export function GetCourseVersionSectionProgressionFromJSON(json: any): GetCourseVersionSectionProgression {
98
+ return GetCourseVersionSectionProgressionFromJSONTyped(json, false);
99
+ }
100
+
101
+ export function GetCourseVersionSectionProgressionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseVersionSectionProgression {
102
+ if (json == null) {
103
+ return json;
104
+ }
105
+ return {
106
+
107
+ 'sectionId': json['section_id'],
108
+ 'rootSectionId': json['root_section_id'],
109
+ 'isRootSection': json['is_root_section'],
110
+ 'isComplete': json['is_complete'],
111
+ 'isLocked': json['is_locked'],
112
+ 'lockReason': ProgressionLockReasonFromJSON(json['lock_reason']),
113
+ 'blockingSectionId': json['blocking_section_id'],
114
+ 'blockingItemIds': json['blocking_item_ids'],
115
+ };
116
+ }
117
+
118
+ export function GetCourseVersionSectionProgressionToJSON(json: any): GetCourseVersionSectionProgression {
119
+ return GetCourseVersionSectionProgressionToJSONTyped(json, false);
120
+ }
121
+
122
+ export function GetCourseVersionSectionProgressionToJSONTyped(value?: GetCourseVersionSectionProgression | null, ignoreDiscriminator: boolean = false): any {
123
+ if (value == null) {
124
+ return value;
125
+ }
126
+
127
+ return {
128
+
129
+ 'section_id': value['sectionId'],
130
+ 'root_section_id': value['rootSectionId'],
131
+ 'is_root_section': value['isRootSection'],
132
+ 'is_complete': value['isComplete'],
133
+ 'is_locked': value['isLocked'],
134
+ 'lock_reason': ProgressionLockReasonToJSON(value['lockReason']),
135
+ 'blocking_section_id': value['blockingSectionId'],
136
+ 'blocking_item_ids': value['blockingItemIds'],
137
+ };
138
+ }
139
+
@@ -179,6 +179,42 @@ export interface GetResourceSession {
179
179
  * @memberof GetResourceSession
180
180
  */
181
181
  durationSeconds: number;
182
+ /**
183
+ *
184
+ * @type {number}
185
+ * @memberof GetResourceSession
186
+ */
187
+ minimumActiveSeconds: number | null;
188
+ /**
189
+ * Active time accumulated across all live attempts for this course placement.
190
+ * @type {number}
191
+ * @memberof GetResourceSession
192
+ */
193
+ accumulatedActiveSeconds: number;
194
+ /**
195
+ *
196
+ * @type {number}
197
+ * @memberof GetResourceSession
198
+ */
199
+ remainingActiveSeconds: number;
200
+ /**
201
+ *
202
+ * @type {boolean}
203
+ * @memberof GetResourceSession
204
+ */
205
+ timeRequirementMet: boolean;
206
+ /**
207
+ *
208
+ * @type {boolean}
209
+ * @memberof GetResourceSession
210
+ */
211
+ timeRequirementWaived: boolean;
212
+ /**
213
+ *
214
+ * @type {boolean}
215
+ * @memberof GetResourceSession
216
+ */
217
+ effectiveCompletionMet: boolean;
182
218
  /**
183
219
  *
184
220
  * @type {number}
@@ -232,6 +268,12 @@ export function instanceOfGetResourceSession(value: object): value is GetResourc
232
268
  if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
233
269
  if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
234
270
  if (!('durationSeconds' in value) || value['durationSeconds'] === undefined) return false;
271
+ if (!('minimumActiveSeconds' in value) || value['minimumActiveSeconds'] === undefined) return false;
272
+ if (!('accumulatedActiveSeconds' in value) || value['accumulatedActiveSeconds'] === undefined) return false;
273
+ if (!('remainingActiveSeconds' in value) || value['remainingActiveSeconds'] === undefined) return false;
274
+ if (!('timeRequirementMet' in value) || value['timeRequirementMet'] === undefined) return false;
275
+ if (!('timeRequirementWaived' in value) || value['timeRequirementWaived'] === undefined) return false;
276
+ if (!('effectiveCompletionMet' in value) || value['effectiveCompletionMet'] === undefined) return false;
235
277
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
236
278
  if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
237
279
  return true;
@@ -270,6 +312,12 @@ export function GetResourceSessionFromJSONTyped(json: any, ignoreDiscriminator:
270
312
  'gradeStatus': json['grade_status'],
271
313
  'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
272
314
  'durationSeconds': json['duration_seconds'],
315
+ 'minimumActiveSeconds': json['minimum_active_seconds'],
316
+ 'accumulatedActiveSeconds': json['accumulated_active_seconds'],
317
+ 'remainingActiveSeconds': json['remaining_active_seconds'],
318
+ 'timeRequirementMet': json['time_requirement_met'],
319
+ 'timeRequirementWaived': json['time_requirement_waived'],
320
+ 'effectiveCompletionMet': json['effective_completion_met'],
273
321
  'initializedAt': json['initialized_at'] == null ? undefined : json['initialized_at'],
274
322
  'terminatedAt': json['terminated_at'] == null ? undefined : json['terminated_at'],
275
323
  'createdAt': json['created_at'],
@@ -312,6 +360,12 @@ export function GetResourceSessionToJSONTyped(value?: GetResourceSession | null,
312
360
  'grade_status': value['gradeStatus'],
313
361
  'score_raw': value['scoreRaw'],
314
362
  'duration_seconds': value['durationSeconds'],
363
+ 'minimum_active_seconds': value['minimumActiveSeconds'],
364
+ 'accumulated_active_seconds': value['accumulatedActiveSeconds'],
365
+ 'remaining_active_seconds': value['remainingActiveSeconds'],
366
+ 'time_requirement_met': value['timeRequirementMet'],
367
+ 'time_requirement_waived': value['timeRequirementWaived'],
368
+ 'effective_completion_met': value['effectiveCompletionMet'],
315
369
  'initialized_at': value['initializedAt'],
316
370
  'terminated_at': value['terminatedAt'],
317
371
  'created_at': value['createdAt'],
@@ -63,6 +63,12 @@ export interface PostCourseVersionItem {
63
63
  * @memberof PostCourseVersionItem
64
64
  */
65
65
  isRequired?: boolean;
66
+ /**
67
+ * Resource placements only. Omit or set null to disable the timer.
68
+ * @type {number}
69
+ * @memberof PostCourseVersionItem
70
+ */
71
+ minimumActiveSeconds?: number | null;
66
72
  /**
67
73
  *
68
74
  * @type {ContentLaunchMode}
@@ -124,6 +130,7 @@ export function PostCourseVersionItemFromJSONTyped(json: any, ignoreDiscriminato
124
130
  'position': json['position'] == null ? undefined : json['position'],
125
131
  'isVisible': json['is_visible'] == null ? undefined : json['is_visible'],
126
132
  'isRequired': json['is_required'] == null ? undefined : json['is_required'],
133
+ 'minimumActiveSeconds': json['minimum_active_seconds'] == null ? undefined : json['minimum_active_seconds'],
127
134
  'launchMode': json['launch_mode'] == null ? undefined : ContentLaunchModeFromJSON(json['launch_mode']),
128
135
  'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
129
136
  'scoreRollupStrategy': json['score_rollup_strategy'] == null ? undefined : json['score_rollup_strategy'],
@@ -148,6 +155,7 @@ export function PostCourseVersionItemToJSONTyped(value?: PostCourseVersionItem |
148
155
  'position': value['position'],
149
156
  'is_visible': value['isVisible'],
150
157
  'is_required': value['isRequired'],
158
+ 'minimum_active_seconds': value['minimumActiveSeconds'],
151
159
  'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
152
160
  'max_attempts': value['maxAttempts'],
153
161
  'score_rollup_strategy': value['scoreRollupStrategy'],
@@ -0,0 +1,131 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Structured detail explaining why learner progression is currently blocked.
18
+ * @export
19
+ * @interface ProgressionGateError
20
+ */
21
+ export interface ProgressionGateError {
22
+ /**
23
+ *
24
+ * @type {ProgressionGateErrorCodeEnum}
25
+ * @memberof ProgressionGateError
26
+ */
27
+ code: ProgressionGateErrorCodeEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ProgressionGateError
32
+ */
33
+ message: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ProgressionGateError
38
+ */
39
+ blockingSectionId: string | null;
40
+ /**
41
+ *
42
+ * @type {Array<string>}
43
+ * @memberof ProgressionGateError
44
+ */
45
+ blockingItemIds: Array<string>;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof ProgressionGateError
50
+ */
51
+ minimumActiveSeconds: number | null;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof ProgressionGateError
56
+ */
57
+ activeSeconds: number | null;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof ProgressionGateError
62
+ */
63
+ remainingActiveSeconds: number | null;
64
+ }
65
+
66
+
67
+ /**
68
+ * @export
69
+ */
70
+ export const ProgressionGateErrorCodeEnum = {
71
+ ProgressionLocked: 'progression_locked',
72
+ MinimumActiveTimeNotMet: 'minimum_active_time_not_met'
73
+ } as const;
74
+ export type ProgressionGateErrorCodeEnum = typeof ProgressionGateErrorCodeEnum[keyof typeof ProgressionGateErrorCodeEnum];
75
+
76
+
77
+ /**
78
+ * Check if a given object implements the ProgressionGateError interface.
79
+ */
80
+ export function instanceOfProgressionGateError(value: object): value is ProgressionGateError {
81
+ if (!('code' in value) || value['code'] === undefined) return false;
82
+ if (!('message' in value) || value['message'] === undefined) return false;
83
+ if (!('blockingSectionId' in value) || value['blockingSectionId'] === undefined) return false;
84
+ if (!('blockingItemIds' in value) || value['blockingItemIds'] === undefined) return false;
85
+ if (!('minimumActiveSeconds' in value) || value['minimumActiveSeconds'] === undefined) return false;
86
+ if (!('activeSeconds' in value) || value['activeSeconds'] === undefined) return false;
87
+ if (!('remainingActiveSeconds' in value) || value['remainingActiveSeconds'] === undefined) return false;
88
+ return true;
89
+ }
90
+
91
+ export function ProgressionGateErrorFromJSON(json: any): ProgressionGateError {
92
+ return ProgressionGateErrorFromJSONTyped(json, false);
93
+ }
94
+
95
+ export function ProgressionGateErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProgressionGateError {
96
+ if (json == null) {
97
+ return json;
98
+ }
99
+ return {
100
+
101
+ 'code': json['code'],
102
+ 'message': json['message'],
103
+ 'blockingSectionId': json['blocking_section_id'],
104
+ 'blockingItemIds': json['blocking_item_ids'],
105
+ 'minimumActiveSeconds': json['minimum_active_seconds'],
106
+ 'activeSeconds': json['active_seconds'],
107
+ 'remainingActiveSeconds': json['remaining_active_seconds'],
108
+ };
109
+ }
110
+
111
+ export function ProgressionGateErrorToJSON(json: any): ProgressionGateError {
112
+ return ProgressionGateErrorToJSONTyped(json, false);
113
+ }
114
+
115
+ export function ProgressionGateErrorToJSONTyped(value?: ProgressionGateError | null, ignoreDiscriminator: boolean = false): any {
116
+ if (value == null) {
117
+ return value;
118
+ }
119
+
120
+ return {
121
+
122
+ 'code': value['code'],
123
+ 'message': value['message'],
124
+ 'blocking_section_id': value['blockingSectionId'],
125
+ 'blocking_item_ids': value['blockingItemIds'],
126
+ 'minimum_active_seconds': value['minimumActiveSeconds'],
127
+ 'active_seconds': value['activeSeconds'],
128
+ 'remaining_active_seconds': value['remainingActiveSeconds'],
129
+ };
130
+ }
131
+
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const ProgressionLockReason = {
21
+ PreviousSectionIncomplete: 'previous_section_incomplete'
22
+ } as const;
23
+ export type ProgressionLockReason = typeof ProgressionLockReason[keyof typeof ProgressionLockReason];
24
+
25
+
26
+ export function instanceOfProgressionLockReason(value: any): boolean {
27
+ for (const key in ProgressionLockReason) {
28
+ if (Object.prototype.hasOwnProperty.call(ProgressionLockReason, key)) {
29
+ if (ProgressionLockReason[key as keyof typeof ProgressionLockReason] === value) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+
37
+ export function ProgressionLockReasonFromJSON(json: any): ProgressionLockReason {
38
+ return ProgressionLockReasonFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function ProgressionLockReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProgressionLockReason {
42
+ return json as ProgressionLockReason;
43
+ }
44
+
45
+ export function ProgressionLockReasonToJSON(value?: ProgressionLockReason | null): any {
46
+ return value as any;
47
+ }
48
+
49
+ export function ProgressionLockReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): ProgressionLockReason {
50
+ return value as ProgressionLockReason;
51
+ }
52
+
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CourseProgressionMode } from './CourseProgressionMode';
17
+ import {
18
+ CourseProgressionModeFromJSON,
19
+ CourseProgressionModeFromJSONTyped,
20
+ CourseProgressionModeToJSON,
21
+ CourseProgressionModeToJSONTyped,
22
+ } from './CourseProgressionMode';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PutCourseVersionDraft
28
+ */
29
+ export interface PutCourseVersionDraft {
30
+ /**
31
+ *
32
+ * @type {CourseProgressionMode}
33
+ * @memberof PutCourseVersionDraft
34
+ */
35
+ progressionMode: CourseProgressionMode;
36
+ }
37
+
38
+
39
+
40
+ /**
41
+ * Check if a given object implements the PutCourseVersionDraft interface.
42
+ */
43
+ export function instanceOfPutCourseVersionDraft(value: object): value is PutCourseVersionDraft {
44
+ if (!('progressionMode' in value) || value['progressionMode'] === undefined) return false;
45
+ return true;
46
+ }
47
+
48
+ export function PutCourseVersionDraftFromJSON(json: any): PutCourseVersionDraft {
49
+ return PutCourseVersionDraftFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function PutCourseVersionDraftFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutCourseVersionDraft {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+
58
+ 'progressionMode': CourseProgressionModeFromJSON(json['progression_mode']),
59
+ };
60
+ }
61
+
62
+ export function PutCourseVersionDraftToJSON(json: any): PutCourseVersionDraft {
63
+ return PutCourseVersionDraftToJSONTyped(json, false);
64
+ }
65
+
66
+ export function PutCourseVersionDraftToJSONTyped(value?: PutCourseVersionDraft | null, ignoreDiscriminator: boolean = false): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+
71
+ return {
72
+
73
+ 'progression_mode': CourseProgressionModeToJSON(value['progressionMode']),
74
+ };
75
+ }
76
+
@@ -63,6 +63,12 @@ export interface PutCourseVersionItem {
63
63
  * @memberof PutCourseVersionItem
64
64
  */
65
65
  isRequired?: boolean;
66
+ /**
67
+ * Resource placements only. Set null to disable the timer.
68
+ * @type {number}
69
+ * @memberof PutCourseVersionItem
70
+ */
71
+ minimumActiveSeconds?: number | null;
66
72
  /**
67
73
  *
68
74
  * @type {ContentLaunchMode}
@@ -123,6 +129,7 @@ export function PutCourseVersionItemFromJSONTyped(json: any, ignoreDiscriminator
123
129
  'position': json['position'] == null ? undefined : json['position'],
124
130
  'isVisible': json['is_visible'] == null ? undefined : json['is_visible'],
125
131
  'isRequired': json['is_required'] == null ? undefined : json['is_required'],
132
+ 'minimumActiveSeconds': json['minimum_active_seconds'] == null ? undefined : json['minimum_active_seconds'],
126
133
  'launchMode': json['launch_mode'] == null ? undefined : ContentLaunchModeFromJSON(json['launch_mode']),
127
134
  'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
128
135
  'scoreRollupStrategy': json['score_rollup_strategy'] == null ? undefined : json['score_rollup_strategy'],
@@ -147,6 +154,7 @@ export function PutCourseVersionItemToJSONTyped(value?: PutCourseVersionItem | n
147
154
  'position': value['position'],
148
155
  'is_visible': value['isVisible'],
149
156
  'is_required': value['isRequired'],
157
+ 'minimum_active_seconds': value['minimumActiveSeconds'],
150
158
  'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
151
159
  'max_attempts': value['maxAttempts'],
152
160
  'score_rollup_strategy': value['scoreRollupStrategy'],