@easyedu/js-lsm-api 1.67.0 → 1.69.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 (86) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +10 -2
  3. package/dist/apis/ContentApi.d.ts +56 -0
  4. package/dist/apis/ContentApi.js +121 -1
  5. package/dist/esm/apis/ContentApi.d.ts +56 -0
  6. package/dist/esm/apis/ContentApi.js +120 -0
  7. package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
  8. package/dist/esm/models/ContentAttemptItem.js +68 -0
  9. package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
  10. package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
  11. package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
  12. package/dist/esm/models/ContentAttemptScore.js +47 -0
  13. package/dist/esm/models/ContentAttemptSettings.d.ts +46 -0
  14. package/dist/esm/models/ContentAttemptSettings.js +54 -0
  15. package/dist/esm/models/GetContent.d.ts +7 -0
  16. package/dist/esm/models/GetContent.js +5 -0
  17. package/dist/esm/models/GetContentAttempts.d.ts +90 -0
  18. package/dist/esm/models/GetContentAttempts.js +84 -0
  19. package/dist/esm/models/GetContentSession.d.ts +12 -0
  20. package/dist/esm/models/GetContentSession.js +8 -0
  21. package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
  22. package/dist/esm/models/GetContentSessionDetail.js +8 -0
  23. package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
  24. package/dist/esm/models/GetContentSessionListItem.js +16 -0
  25. package/dist/esm/models/PostContentSession.d.ts +12 -0
  26. package/dist/esm/models/PostContentSession.js +8 -0
  27. package/dist/esm/models/PutContent.d.ts +7 -0
  28. package/dist/esm/models/PutContent.js +3 -0
  29. package/dist/esm/models/PutContentAttemptSettings.d.ts +46 -0
  30. package/dist/esm/models/PutContentAttemptSettings.js +50 -0
  31. package/dist/esm/models/index.d.ts +6 -0
  32. package/dist/esm/models/index.js +6 -0
  33. package/dist/models/ContentAttemptItem.d.ts +69 -0
  34. package/dist/models/ContentAttemptItem.js +75 -0
  35. package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
  36. package/dist/models/ContentAttemptRollupScore.js +54 -0
  37. package/dist/models/ContentAttemptScore.d.ts +50 -0
  38. package/dist/models/ContentAttemptScore.js +54 -0
  39. package/dist/models/ContentAttemptSettings.d.ts +46 -0
  40. package/dist/models/ContentAttemptSettings.js +62 -0
  41. package/dist/models/GetContent.d.ts +7 -0
  42. package/dist/models/GetContent.js +5 -0
  43. package/dist/models/GetContentAttempts.d.ts +90 -0
  44. package/dist/models/GetContentAttempts.js +92 -0
  45. package/dist/models/GetContentSession.d.ts +12 -0
  46. package/dist/models/GetContentSession.js +8 -0
  47. package/dist/models/GetContentSessionDetail.d.ts +12 -0
  48. package/dist/models/GetContentSessionDetail.js +8 -0
  49. package/dist/models/GetContentSessionListItem.d.ts +24 -0
  50. package/dist/models/GetContentSessionListItem.js +16 -0
  51. package/dist/models/PostContentSession.d.ts +12 -0
  52. package/dist/models/PostContentSession.js +8 -0
  53. package/dist/models/PutContent.d.ts +7 -0
  54. package/dist/models/PutContent.js +3 -0
  55. package/dist/models/PutContentAttemptSettings.d.ts +46 -0
  56. package/dist/models/PutContentAttemptSettings.js +58 -0
  57. package/dist/models/index.d.ts +6 -0
  58. package/dist/models/index.js +6 -0
  59. package/docs/ContentApi.md +159 -0
  60. package/docs/ContentAttemptItem.md +47 -0
  61. package/docs/ContentAttemptRollupScore.md +37 -0
  62. package/docs/ContentAttemptScore.md +41 -0
  63. package/docs/ContentAttemptSettings.md +36 -0
  64. package/docs/GetContent.md +2 -0
  65. package/docs/GetContentAttempts.md +51 -0
  66. package/docs/GetContentSession.md +4 -0
  67. package/docs/GetContentSessionDetail.md +4 -0
  68. package/docs/GetContentSessionListItem.md +8 -0
  69. package/docs/PostContentSession.md +4 -0
  70. package/docs/PutContent.md +2 -0
  71. package/docs/PutContentAttemptSettings.md +36 -0
  72. package/package.json +1 -1
  73. package/src/apis/ContentApi.ts +172 -0
  74. package/src/models/ContentAttemptItem.ts +128 -0
  75. package/src/models/ContentAttemptRollupScore.ts +75 -0
  76. package/src/models/ContentAttemptScore.ts +89 -0
  77. package/src/models/ContentAttemptSettings.ts +86 -0
  78. package/src/models/GetContent.ts +16 -0
  79. package/src/models/GetContentAttempts.ts +164 -0
  80. package/src/models/GetContentSession.ts +18 -0
  81. package/src/models/GetContentSessionDetail.ts +18 -0
  82. package/src/models/GetContentSessionListItem.ts +36 -0
  83. package/src/models/PostContentSession.ts +18 -0
  84. package/src/models/PutContent.ts +15 -0
  85. package/src/models/PutContentAttemptSettings.ts +84 -0
  86. package/src/models/index.ts +6 -0
@@ -20,6 +20,13 @@ import {
20
20
  GetContentContentDataToJSON,
21
21
  GetContentContentDataToJSONTyped,
22
22
  } from './GetContentContentData';
23
+ import type { ContentAttemptSettings } from './ContentAttemptSettings';
24
+ import {
25
+ ContentAttemptSettingsFromJSON,
26
+ ContentAttemptSettingsFromJSONTyped,
27
+ ContentAttemptSettingsToJSON,
28
+ ContentAttemptSettingsToJSONTyped,
29
+ } from './ContentAttemptSettings';
23
30
  import type { ContentLaunchMode } from './ContentLaunchMode';
24
31
  import {
25
32
  ContentLaunchModeFromJSON,
@@ -70,6 +77,12 @@ export interface GetContent {
70
77
  * @memberof GetContent
71
78
  */
72
79
  launchMode: ContentLaunchMode;
80
+ /**
81
+ *
82
+ * @type {ContentAttemptSettings}
83
+ * @memberof GetContent
84
+ */
85
+ attemptSettings: ContentAttemptSettings;
73
86
  /**
74
87
  *
75
88
  * @type {GetContentContentData}
@@ -145,6 +158,7 @@ export function instanceOfGetContent(value: object): value is GetContent {
145
158
  if (!('name' in value) || value['name'] === undefined) return false;
146
159
  if (!('contentType' in value) || value['contentType'] === undefined) return false;
147
160
  if (!('launchMode' in value) || value['launchMode'] === undefined) return false;
161
+ if (!('attemptSettings' in value) || value['attemptSettings'] === undefined) return false;
148
162
  if (!('contentData' in value) || value['contentData'] === undefined) return false;
149
163
  if (!('published' in value) || value['published'] === undefined) return false;
150
164
  return true;
@@ -166,6 +180,7 @@ export function GetContentFromJSONTyped(json: any, ignoreDiscriminator: boolean)
166
180
  'description': json['description'] == null ? undefined : json['description'],
167
181
  'contentType': json['content_type'],
168
182
  'launchMode': ContentLaunchModeFromJSON(json['launch_mode']),
183
+ 'attemptSettings': ContentAttemptSettingsFromJSON(json['attempt_settings']),
169
184
  'contentData': GetContentContentDataFromJSON(json['content_data']),
170
185
  'order': json['order'] == null ? undefined : json['order'],
171
186
  'published': json['published'],
@@ -193,6 +208,7 @@ export function GetContentToJSONTyped(value?: Omit<GetContent, 'id'|'created_dat
193
208
  'description': value['description'],
194
209
  'content_type': value['contentType'],
195
210
  'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
211
+ 'attempt_settings': ContentAttemptSettingsToJSON(value['attemptSettings']),
196
212
  'content_data': GetContentContentDataToJSON(value['contentData']),
197
213
  'order': value['order'],
198
214
  'published': value['published'],
@@ -0,0 +1,164 @@
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 { ContentAttemptRollupScore } from './ContentAttemptRollupScore';
17
+ import {
18
+ ContentAttemptRollupScoreFromJSON,
19
+ ContentAttemptRollupScoreFromJSONTyped,
20
+ ContentAttemptRollupScoreToJSON,
21
+ ContentAttemptRollupScoreToJSONTyped,
22
+ } from './ContentAttemptRollupScore';
23
+ import type { ContentAttemptItem } from './ContentAttemptItem';
24
+ import {
25
+ ContentAttemptItemFromJSON,
26
+ ContentAttemptItemFromJSONTyped,
27
+ ContentAttemptItemToJSON,
28
+ ContentAttemptItemToJSONTyped,
29
+ } from './ContentAttemptItem';
30
+
31
+ /**
32
+ * Learner attempt history and rollup for a content item
33
+ * @export
34
+ * @interface GetContentAttempts
35
+ */
36
+ export interface GetContentAttempts {
37
+ /**
38
+ * Content external ID
39
+ * @type {string}
40
+ * @memberof GetContentAttempts
41
+ */
42
+ contentId: string;
43
+ /**
44
+ * User ID these attempts belong to
45
+ * @type {string}
46
+ * @memberof GetContentAttempts
47
+ */
48
+ userId: string;
49
+ /**
50
+ * Maximum content sessions allowed for this learner/content pair
51
+ * @type {number}
52
+ * @memberof GetContentAttempts
53
+ */
54
+ maxAttempts: number;
55
+ /**
56
+ * Number of attempts already created
57
+ * @type {number}
58
+ * @memberof GetContentAttempts
59
+ */
60
+ attemptsUsed: number;
61
+ /**
62
+ * Number of additional attempts that can be created
63
+ * @type {number}
64
+ * @memberof GetContentAttempts
65
+ */
66
+ attemptsRemaining: number;
67
+ /**
68
+ * Whether another attempt may be started under the current policy
69
+ * @type {boolean}
70
+ * @memberof GetContentAttempts
71
+ */
72
+ canStartNewAttempt: boolean;
73
+ /**
74
+ * Strategy used to compute rollup_score from attempts
75
+ * @type {GetContentAttemptsScoreRollupStrategyEnum}
76
+ * @memberof GetContentAttempts
77
+ */
78
+ scoreRollupStrategy: GetContentAttemptsScoreRollupStrategyEnum;
79
+ /**
80
+ *
81
+ * @type {ContentAttemptRollupScore}
82
+ * @memberof GetContentAttempts
83
+ */
84
+ rollupScore: ContentAttemptRollupScore | null;
85
+ /**
86
+ *
87
+ * @type {Array<ContentAttemptItem>}
88
+ * @memberof GetContentAttempts
89
+ */
90
+ attempts: Array<ContentAttemptItem>;
91
+ }
92
+
93
+
94
+ /**
95
+ * @export
96
+ */
97
+ export const GetContentAttemptsScoreRollupStrategyEnum = {
98
+ Latest: 'Latest',
99
+ Best: 'Best'
100
+ } as const;
101
+ export type GetContentAttemptsScoreRollupStrategyEnum = typeof GetContentAttemptsScoreRollupStrategyEnum[keyof typeof GetContentAttemptsScoreRollupStrategyEnum];
102
+
103
+
104
+ /**
105
+ * Check if a given object implements the GetContentAttempts interface.
106
+ */
107
+ export function instanceOfGetContentAttempts(value: object): value is GetContentAttempts {
108
+ if (!('contentId' in value) || value['contentId'] === undefined) return false;
109
+ if (!('userId' in value) || value['userId'] === undefined) return false;
110
+ if (!('maxAttempts' in value) || value['maxAttempts'] === undefined) return false;
111
+ if (!('attemptsUsed' in value) || value['attemptsUsed'] === undefined) return false;
112
+ if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined) return false;
113
+ if (!('canStartNewAttempt' in value) || value['canStartNewAttempt'] === undefined) return false;
114
+ if (!('scoreRollupStrategy' in value) || value['scoreRollupStrategy'] === undefined) return false;
115
+ if (!('rollupScore' in value) || value['rollupScore'] === undefined) return false;
116
+ if (!('attempts' in value) || value['attempts'] === undefined) return false;
117
+ return true;
118
+ }
119
+
120
+ export function GetContentAttemptsFromJSON(json: any): GetContentAttempts {
121
+ return GetContentAttemptsFromJSONTyped(json, false);
122
+ }
123
+
124
+ export function GetContentAttemptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentAttempts {
125
+ if (json == null) {
126
+ return json;
127
+ }
128
+ return {
129
+
130
+ 'contentId': json['content_id'],
131
+ 'userId': json['user_id'],
132
+ 'maxAttempts': json['max_attempts'],
133
+ 'attemptsUsed': json['attempts_used'],
134
+ 'attemptsRemaining': json['attempts_remaining'],
135
+ 'canStartNewAttempt': json['can_start_new_attempt'],
136
+ 'scoreRollupStrategy': json['score_rollup_strategy'],
137
+ 'rollupScore': ContentAttemptRollupScoreFromJSON(json['rollup_score']),
138
+ 'attempts': ((json['attempts'] as Array<any>).map(ContentAttemptItemFromJSON)),
139
+ };
140
+ }
141
+
142
+ export function GetContentAttemptsToJSON(json: any): GetContentAttempts {
143
+ return GetContentAttemptsToJSONTyped(json, false);
144
+ }
145
+
146
+ export function GetContentAttemptsToJSONTyped(value?: GetContentAttempts | null, ignoreDiscriminator: boolean = false): any {
147
+ if (value == null) {
148
+ return value;
149
+ }
150
+
151
+ return {
152
+
153
+ 'content_id': value['contentId'],
154
+ 'user_id': value['userId'],
155
+ 'max_attempts': value['maxAttempts'],
156
+ 'attempts_used': value['attemptsUsed'],
157
+ 'attempts_remaining': value['attemptsRemaining'],
158
+ 'can_start_new_attempt': value['canStartNewAttempt'],
159
+ 'score_rollup_strategy': value['scoreRollupStrategy'],
160
+ 'rollup_score': ContentAttemptRollupScoreToJSON(value['rollupScore']),
161
+ 'attempts': ((value['attempts'] as Array<any>).map(ContentAttemptItemToJSON)),
162
+ };
163
+ }
164
+
@@ -55,6 +55,18 @@ export interface GetContentSession {
55
55
  * @memberof GetContentSession
56
56
  */
57
57
  gradeStatus: string;
58
+ /**
59
+ * The learner attempt number for this content session
60
+ * @type {number}
61
+ * @memberof GetContentSession
62
+ */
63
+ attemptNumber: number;
64
+ /**
65
+ * Whether this is the current attempt used for learner progress display
66
+ * @type {boolean}
67
+ * @memberof GetContentSession
68
+ */
69
+ isCurrent: boolean;
58
70
  }
59
71
 
60
72
  /**
@@ -67,6 +79,8 @@ export function instanceOfGetContentSession(value: object): value is GetContentS
67
79
  if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
68
80
  if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
69
81
  if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
82
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
83
+ if (!('isCurrent' in value) || value['isCurrent'] === undefined) return false;
70
84
  return true;
71
85
  }
72
86
 
@@ -86,6 +100,8 @@ export function GetContentSessionFromJSONTyped(json: any, ignoreDiscriminator: b
86
100
  'updatedAt': json['updated_at'],
87
101
  'completionStatus': json['completion_status'],
88
102
  'gradeStatus': json['grade_status'],
103
+ 'attemptNumber': json['attempt_number'],
104
+ 'isCurrent': json['is_current'],
89
105
  };
90
106
  }
91
107
 
@@ -106,6 +122,8 @@ export function GetContentSessionToJSONTyped(value?: GetContentSession | null, i
106
122
  'updated_at': value['updatedAt'],
107
123
  'completion_status': value['completionStatus'],
108
124
  'grade_status': value['gradeStatus'],
125
+ 'attempt_number': value['attemptNumber'],
126
+ 'is_current': value['isCurrent'],
109
127
  };
110
128
  }
111
129
 
@@ -76,6 +76,18 @@ export interface GetContentSessionDetail {
76
76
  * @memberof GetContentSessionDetail
77
77
  */
78
78
  durationInSeconds: number;
79
+ /**
80
+ * The learner attempt number for this content session
81
+ * @type {number}
82
+ * @memberof GetContentSessionDetail
83
+ */
84
+ attemptNumber: number;
85
+ /**
86
+ * Whether this is the current attempt used for learner progress display
87
+ * @type {boolean}
88
+ * @memberof GetContentSessionDetail
89
+ */
90
+ isCurrent: boolean;
79
91
  /**
80
92
  *
81
93
  * @type {GetContentSessionDetailUserData}
@@ -126,6 +138,8 @@ export function instanceOfGetContentSessionDetail(value: object): value is GetCo
126
138
  if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
127
139
  if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
128
140
  if (!('durationInSeconds' in value) || value['durationInSeconds'] === undefined) return false;
141
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
142
+ if (!('isCurrent' in value) || value['isCurrent'] === undefined) return false;
129
143
  if (!('userData' in value) || value['userData'] === undefined) return false;
130
144
  if (!('scormSessionData' in value) || value['scormSessionData'] === undefined) return false;
131
145
  return true;
@@ -148,6 +162,8 @@ export function GetContentSessionDetailFromJSONTyped(json: any, ignoreDiscrimina
148
162
  'completionStatus': json['completion_status'],
149
163
  'gradeStatus': json['grade_status'],
150
164
  'durationInSeconds': json['duration_in_seconds'],
165
+ 'attemptNumber': json['attempt_number'],
166
+ 'isCurrent': json['is_current'],
151
167
  'userData': GetContentSessionDetailUserDataFromJSON(json['user_data']),
152
168
  'scormSessionData': (json['scorm_session_data'] == null ? null : (json['scorm_session_data'] as Array<any>).map(GetContentSessionDetailScormSessionDataInnerFromJSON)),
153
169
  };
@@ -171,6 +187,8 @@ export function GetContentSessionDetailToJSONTyped(value?: GetContentSessionDeta
171
187
  'completion_status': value['completionStatus'],
172
188
  'grade_status': value['gradeStatus'],
173
189
  'duration_in_seconds': value['durationInSeconds'],
190
+ 'attempt_number': value['attemptNumber'],
191
+ 'is_current': value['isCurrent'],
174
192
  'user_data': GetContentSessionDetailUserDataToJSON(value['userData']),
175
193
  'scorm_session_data': (value['scormSessionData'] == null ? null : (value['scormSessionData'] as Array<any>).map(GetContentSessionDetailScormSessionDataInnerToJSON)),
176
194
  };
@@ -58,6 +58,30 @@ export interface GetContentSessionListItem {
58
58
  * @memberof GetContentSessionListItem
59
59
  */
60
60
  contentId: string;
61
+ /**
62
+ * The completion status of the content session
63
+ * @type {string}
64
+ * @memberof GetContentSessionListItem
65
+ */
66
+ completionStatus: string;
67
+ /**
68
+ * The grade status of the content session
69
+ * @type {string}
70
+ * @memberof GetContentSessionListItem
71
+ */
72
+ gradeStatus: string;
73
+ /**
74
+ * The learner attempt number for this content session
75
+ * @type {number}
76
+ * @memberof GetContentSessionListItem
77
+ */
78
+ attemptNumber: number;
79
+ /**
80
+ * Whether this is the current attempt used for learner progress display
81
+ * @type {boolean}
82
+ * @memberof GetContentSessionListItem
83
+ */
84
+ isCurrent: boolean;
61
85
  /**
62
86
  *
63
87
  * @type {GetContentSessionDetailUserData}
@@ -80,6 +104,10 @@ export function instanceOfGetContentSessionListItem(value: object): value is Get
80
104
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
81
105
  if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
82
106
  if (!('contentId' in value) || value['contentId'] === undefined) return false;
107
+ if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
108
+ if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
109
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
110
+ if (!('isCurrent' in value) || value['isCurrent'] === undefined) return false;
83
111
  if (!('userData' in value) || value['userData'] === undefined) return false;
84
112
  if (!('scormSessionData' in value) || value['scormSessionData'] === undefined) return false;
85
113
  return true;
@@ -99,6 +127,10 @@ export function GetContentSessionListItemFromJSONTyped(json: any, ignoreDiscrimi
99
127
  'createdAt': json['created_at'],
100
128
  'updatedAt': json['updated_at'],
101
129
  'contentId': json['content_id'],
130
+ 'completionStatus': json['completion_status'],
131
+ 'gradeStatus': json['grade_status'],
132
+ 'attemptNumber': json['attempt_number'],
133
+ 'isCurrent': json['is_current'],
102
134
  'userData': GetContentSessionDetailUserDataFromJSON(json['user_data']),
103
135
  'scormSessionData': GetContentSessionListItemScormSessionDataFromJSON(json['scorm_session_data']),
104
136
  };
@@ -119,6 +151,10 @@ export function GetContentSessionListItemToJSONTyped(value?: GetContentSessionLi
119
151
  'created_at': value['createdAt'],
120
152
  'updated_at': value['updatedAt'],
121
153
  'content_id': value['contentId'],
154
+ 'completion_status': value['completionStatus'],
155
+ 'grade_status': value['gradeStatus'],
156
+ 'attempt_number': value['attemptNumber'],
157
+ 'is_current': value['isCurrent'],
122
158
  'user_data': GetContentSessionDetailUserDataToJSON(value['userData']),
123
159
  'scorm_session_data': GetContentSessionListItemScormSessionDataToJSON(value['scormSessionData']),
124
160
  };
@@ -63,6 +63,18 @@ export interface PostContentSession {
63
63
  * @memberof PostContentSession
64
64
  */
65
65
  playerSessionId?: string | null;
66
+ /**
67
+ * The learner attempt number for this content session
68
+ * @type {number}
69
+ * @memberof PostContentSession
70
+ */
71
+ attemptNumber: number;
72
+ /**
73
+ * Whether this is the current attempt used for learner progress display
74
+ * @type {boolean}
75
+ * @memberof PostContentSession
76
+ */
77
+ isCurrent: boolean;
66
78
  }
67
79
 
68
80
 
@@ -76,6 +88,8 @@ export function instanceOfPostContentSession(value: object): value is PostConten
76
88
  if (!('launchUrl' in value) || value['launchUrl'] === undefined) return false;
77
89
  if (!('launchMode' in value) || value['launchMode'] === undefined) return false;
78
90
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
91
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
92
+ if (!('isCurrent' in value) || value['isCurrent'] === undefined) return false;
79
93
  return true;
80
94
  }
81
95
 
@@ -95,6 +109,8 @@ export function PostContentSessionFromJSONTyped(json: any, ignoreDiscriminator:
95
109
  'launchMode': ContentLaunchModeFromJSON(json['launch_mode']),
96
110
  'createdAt': json['created_at'],
97
111
  'playerSessionId': json['player_session_id'] == null ? undefined : json['player_session_id'],
112
+ 'attemptNumber': json['attempt_number'],
113
+ 'isCurrent': json['is_current'],
98
114
  };
99
115
  }
100
116
 
@@ -115,6 +131,8 @@ export function PostContentSessionToJSONTyped(value?: PostContentSession | null,
115
131
  'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
116
132
  'created_at': value['createdAt'],
117
133
  'player_session_id': value['playerSessionId'],
134
+ 'attempt_number': value['attemptNumber'],
135
+ 'is_current': value['isCurrent'],
118
136
  };
119
137
  }
120
138
 
@@ -20,6 +20,13 @@ import {
20
20
  ContentLaunchModeToJSON,
21
21
  ContentLaunchModeToJSONTyped,
22
22
  } from './ContentLaunchMode';
23
+ import type { PutContentAttemptSettings } from './PutContentAttemptSettings';
24
+ import {
25
+ PutContentAttemptSettingsFromJSON,
26
+ PutContentAttemptSettingsFromJSONTyped,
27
+ PutContentAttemptSettingsToJSON,
28
+ PutContentAttemptSettingsToJSONTyped,
29
+ } from './PutContentAttemptSettings';
23
30
 
24
31
  /**
25
32
  *
@@ -45,6 +52,12 @@ export interface PutContent {
45
52
  * @memberof PutContent
46
53
  */
47
54
  launchMode?: ContentLaunchMode;
55
+ /**
56
+ *
57
+ * @type {PutContentAttemptSettings}
58
+ * @memberof PutContent
59
+ */
60
+ attemptSettings?: PutContentAttemptSettings;
48
61
  }
49
62
 
50
63
 
@@ -69,6 +82,7 @@ export function PutContentFromJSONTyped(json: any, ignoreDiscriminator: boolean)
69
82
  'name': json['name'] == null ? undefined : json['name'],
70
83
  'published': json['published'] == null ? undefined : json['published'],
71
84
  'launchMode': json['launch_mode'] == null ? undefined : ContentLaunchModeFromJSON(json['launch_mode']),
85
+ 'attemptSettings': json['attempt_settings'] == null ? undefined : PutContentAttemptSettingsFromJSON(json['attempt_settings']),
72
86
  };
73
87
  }
74
88
 
@@ -86,6 +100,7 @@ export function PutContentToJSONTyped(value?: PutContent | null, ignoreDiscrimin
86
100
  'name': value['name'],
87
101
  'published': value['published'],
88
102
  'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
103
+ 'attempt_settings': PutContentAttemptSettingsToJSON(value['attemptSettings']),
89
104
  };
90
105
  }
91
106
 
@@ -0,0 +1,84 @@
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
+ *
18
+ * @export
19
+ * @interface PutContentAttemptSettings
20
+ */
21
+ export interface PutContentAttemptSettings {
22
+ /**
23
+ * Maximum allowed attempts for this content
24
+ * @type {number}
25
+ * @memberof PutContentAttemptSettings
26
+ */
27
+ maxAttempts?: number;
28
+ /**
29
+ * Strategy used to calculate the content rollup score
30
+ * @type {PutContentAttemptSettingsScoreRollupStrategyEnum}
31
+ * @memberof PutContentAttemptSettings
32
+ */
33
+ scoreRollupStrategy?: PutContentAttemptSettingsScoreRollupStrategyEnum;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const PutContentAttemptSettingsScoreRollupStrategyEnum = {
41
+ Latest: 'Latest',
42
+ Best: 'Best'
43
+ } as const;
44
+ export type PutContentAttemptSettingsScoreRollupStrategyEnum = typeof PutContentAttemptSettingsScoreRollupStrategyEnum[keyof typeof PutContentAttemptSettingsScoreRollupStrategyEnum];
45
+
46
+
47
+ /**
48
+ * Check if a given object implements the PutContentAttemptSettings interface.
49
+ */
50
+ export function instanceOfPutContentAttemptSettings(value: object): value is PutContentAttemptSettings {
51
+ return true;
52
+ }
53
+
54
+ export function PutContentAttemptSettingsFromJSON(json: any): PutContentAttemptSettings {
55
+ return PutContentAttemptSettingsFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function PutContentAttemptSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutContentAttemptSettings {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
65
+ 'scoreRollupStrategy': json['score_rollup_strategy'] == null ? undefined : json['score_rollup_strategy'],
66
+ };
67
+ }
68
+
69
+ export function PutContentAttemptSettingsToJSON(json: any): PutContentAttemptSettings {
70
+ return PutContentAttemptSettingsToJSONTyped(json, false);
71
+ }
72
+
73
+ export function PutContentAttemptSettingsToJSONTyped(value?: PutContentAttemptSettings | null, ignoreDiscriminator: boolean = false): any {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+
78
+ return {
79
+
80
+ 'max_attempts': value['maxAttempts'],
81
+ 'score_rollup_strategy': value['scoreRollupStrategy'],
82
+ };
83
+ }
84
+
@@ -3,6 +3,10 @@
3
3
  export * from './Certificate';
4
4
  export * from './CertificateConfig';
5
5
  export * from './CertificatePublic';
6
+ export * from './ContentAttemptItem';
7
+ export * from './ContentAttemptRollupScore';
8
+ export * from './ContentAttemptScore';
9
+ export * from './ContentAttemptSettings';
6
10
  export * from './ContentLaunchMode';
7
11
  export * from './CourseCatalog';
8
12
  export * from './CourseShare';
@@ -18,6 +22,7 @@ export * from './GetCertificateConfigList';
18
22
  export * from './GetCertificateList';
19
23
  export * from './GetChatMessage';
20
24
  export * from './GetContent';
25
+ export * from './GetContentAttempts';
21
26
  export * from './GetContentContentData';
22
27
  export * from './GetContentGradeDetail';
23
28
  export * from './GetContentGrades';
@@ -221,6 +226,7 @@ export * from './PostVerifyManifestItemsInner';
221
226
  export * from './PostVerifyManifestResourcesInner';
222
227
  export * from './PutCertificateConfig';
223
228
  export * from './PutContent';
229
+ export * from './PutContentAttemptSettings';
224
230
  export * from './PutContentReorder';
225
231
  export * from './PutContentVersion';
226
232
  export * from './PutCourse';