@easyedu/js-lsm-api 1.66.0 → 1.68.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 (115) hide show
  1. package/.openapi-generator/FILES +10 -2
  2. package/README.md +15 -3
  3. package/dist/apis/ContentApi.d.ts +74 -0
  4. package/dist/apis/ContentApi.js +172 -1
  5. package/dist/apis/CourseApi.d.ts +16 -0
  6. package/dist/apis/CourseApi.js +43 -0
  7. package/dist/apis/PortalApi.d.ts +58 -0
  8. package/dist/apis/PortalApi.js +152 -0
  9. package/dist/apis/SupportTicketApi.d.ts +2 -3
  10. package/dist/apis/SupportTicketApi.js +1 -2
  11. package/dist/esm/apis/ContentApi.d.ts +74 -0
  12. package/dist/esm/apis/ContentApi.js +171 -0
  13. package/dist/esm/apis/CourseApi.d.ts +16 -0
  14. package/dist/esm/apis/CourseApi.js +43 -0
  15. package/dist/esm/apis/PortalApi.d.ts +58 -0
  16. package/dist/esm/apis/PortalApi.js +152 -0
  17. package/dist/esm/apis/SupportTicketApi.d.ts +2 -3
  18. package/dist/esm/apis/SupportTicketApi.js +1 -2
  19. package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
  20. package/dist/esm/models/ContentAttemptItem.js +68 -0
  21. package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
  22. package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
  23. package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
  24. package/dist/esm/models/ContentAttemptScore.js +47 -0
  25. package/dist/esm/models/ContentLaunchMode.d.ts +26 -0
  26. package/dist/esm/models/ContentLaunchMode.js +44 -0
  27. package/dist/esm/models/GetContent.d.ts +7 -0
  28. package/dist/esm/models/GetContent.js +5 -0
  29. package/dist/esm/models/GetContentAttempts.d.ts +90 -0
  30. package/dist/esm/models/GetContentAttempts.js +84 -0
  31. package/dist/esm/models/GetContentSession.d.ts +12 -0
  32. package/dist/esm/models/GetContentSession.js +8 -0
  33. package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
  34. package/dist/esm/models/GetContentSessionDetail.js +8 -0
  35. package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
  36. package/dist/esm/models/GetContentSessionListItem.js +16 -0
  37. package/dist/esm/models/GetPortal.d.ts +2 -2
  38. package/dist/esm/models/GetPortalFaviconUpload.d.ts +1 -1
  39. package/dist/esm/models/GetPortalLogoUpload.d.ts +1 -1
  40. package/dist/esm/models/GetPublicPortalBranding.d.ts +2 -2
  41. package/dist/esm/models/PostContentSession.d.ts +19 -0
  42. package/dist/esm/models/PostContentSession.js +13 -0
  43. package/dist/esm/models/PutContent.d.ts +7 -0
  44. package/dist/esm/models/PutContent.js +3 -0
  45. package/dist/esm/models/index.d.ts +5 -1
  46. package/dist/esm/models/index.js +5 -1
  47. package/dist/models/ContentAttemptItem.d.ts +69 -0
  48. package/dist/models/ContentAttemptItem.js +75 -0
  49. package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
  50. package/dist/models/ContentAttemptRollupScore.js +54 -0
  51. package/dist/models/ContentAttemptScore.d.ts +50 -0
  52. package/dist/models/ContentAttemptScore.js +54 -0
  53. package/dist/models/ContentLaunchMode.d.ts +26 -0
  54. package/dist/models/ContentLaunchMode.js +52 -0
  55. package/dist/models/GetContent.d.ts +7 -0
  56. package/dist/models/GetContent.js +5 -0
  57. package/dist/models/GetContentAttempts.d.ts +90 -0
  58. package/dist/models/GetContentAttempts.js +92 -0
  59. package/dist/models/GetContentSession.d.ts +12 -0
  60. package/dist/models/GetContentSession.js +8 -0
  61. package/dist/models/GetContentSessionDetail.d.ts +12 -0
  62. package/dist/models/GetContentSessionDetail.js +8 -0
  63. package/dist/models/GetContentSessionListItem.d.ts +24 -0
  64. package/dist/models/GetContentSessionListItem.js +16 -0
  65. package/dist/models/GetPortal.d.ts +2 -2
  66. package/dist/models/GetPortalFaviconUpload.d.ts +1 -1
  67. package/dist/models/GetPortalLogoUpload.d.ts +1 -1
  68. package/dist/models/GetPublicPortalBranding.d.ts +2 -2
  69. package/dist/models/PostContentSession.d.ts +19 -0
  70. package/dist/models/PostContentSession.js +13 -0
  71. package/dist/models/PutContent.d.ts +7 -0
  72. package/dist/models/PutContent.js +3 -0
  73. package/dist/models/index.d.ts +5 -1
  74. package/dist/models/index.js +5 -1
  75. package/docs/ContentApi.md +238 -0
  76. package/docs/ContentAttemptItem.md +47 -0
  77. package/docs/ContentAttemptRollupScore.md +37 -0
  78. package/docs/ContentAttemptScore.md +41 -0
  79. package/docs/{DownloadSupportTicketAttachment200Response.md → ContentLaunchMode.md} +5 -6
  80. package/docs/CourseApi.md +72 -0
  81. package/docs/GetContent.md +2 -0
  82. package/docs/GetContentAttempts.md +51 -0
  83. package/docs/GetContentSession.md +4 -0
  84. package/docs/GetContentSessionDetail.md +4 -0
  85. package/docs/GetContentSessionListItem.md +8 -0
  86. package/docs/PortalApi.md +258 -0
  87. package/docs/PostContentSession.md +6 -0
  88. package/docs/PutContent.md +2 -0
  89. package/docs/SupportTicketApi.md +4 -4
  90. package/package.json +1 -1
  91. package/src/apis/ContentApi.ts +249 -0
  92. package/src/apis/CourseApi.ts +58 -0
  93. package/src/apis/PortalApi.ts +176 -0
  94. package/src/apis/SupportTicketApi.ts +3 -8
  95. package/src/models/ContentAttemptItem.ts +128 -0
  96. package/src/models/ContentAttemptRollupScore.ts +75 -0
  97. package/src/models/ContentAttemptScore.ts +89 -0
  98. package/src/models/ContentLaunchMode.ts +54 -0
  99. package/src/models/GetContent.ts +16 -0
  100. package/src/models/GetContentAttempts.ts +164 -0
  101. package/src/models/GetContentSession.ts +18 -0
  102. package/src/models/GetContentSessionDetail.ts +18 -0
  103. package/src/models/GetContentSessionListItem.ts +36 -0
  104. package/src/models/GetPortal.ts +2 -2
  105. package/src/models/GetPortalFaviconUpload.ts +1 -1
  106. package/src/models/GetPortalLogoUpload.ts +1 -1
  107. package/src/models/GetPublicPortalBranding.ts +2 -2
  108. package/src/models/PostContentSession.ts +37 -0
  109. package/src/models/PutContent.ts +18 -0
  110. package/src/models/index.ts +5 -1
  111. package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  112. package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +0 -43
  113. package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  114. package/dist/models/DownloadSupportTicketAttachment200Response.js +0 -50
  115. package/src/models/DownloadSupportTicketAttachment200Response.ts +0 -66
@@ -0,0 +1,128 @@
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 { ContentAttemptScore } from './ContentAttemptScore';
17
+ import {
18
+ ContentAttemptScoreFromJSON,
19
+ ContentAttemptScoreFromJSONTyped,
20
+ ContentAttemptScoreToJSON,
21
+ ContentAttemptScoreToJSONTyped,
22
+ } from './ContentAttemptScore';
23
+
24
+ /**
25
+ * A single learner attempt for a content item
26
+ * @export
27
+ * @interface ContentAttemptItem
28
+ */
29
+ export interface ContentAttemptItem {
30
+ /**
31
+ * Content session UUID for this attempt
32
+ * @type {string}
33
+ * @memberof ContentAttemptItem
34
+ */
35
+ sessionId: string;
36
+ /**
37
+ * Learner attempt number for this content item
38
+ * @type {number}
39
+ * @memberof ContentAttemptItem
40
+ */
41
+ attemptNumber: number;
42
+ /**
43
+ * Completion status for this attempt
44
+ * @type {string}
45
+ * @memberof ContentAttemptItem
46
+ */
47
+ completionStatus: string;
48
+ /**
49
+ * Grade status for this attempt
50
+ * @type {string}
51
+ * @memberof ContentAttemptItem
52
+ */
53
+ gradeStatus: string;
54
+ /**
55
+ *
56
+ * @type {ContentAttemptScore}
57
+ * @memberof ContentAttemptItem
58
+ */
59
+ score: ContentAttemptScore | null;
60
+ /**
61
+ * Attempt creation time as a Unix timestamp in seconds
62
+ * @type {number}
63
+ * @memberof ContentAttemptItem
64
+ */
65
+ createdAt: number;
66
+ /**
67
+ * Attempt update time as a Unix timestamp in seconds
68
+ * @type {number}
69
+ * @memberof ContentAttemptItem
70
+ */
71
+ updatedAt: number;
72
+ }
73
+
74
+ /**
75
+ * Check if a given object implements the ContentAttemptItem interface.
76
+ */
77
+ export function instanceOfContentAttemptItem(value: object): value is ContentAttemptItem {
78
+ if (!('sessionId' in value) || value['sessionId'] === undefined) return false;
79
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
80
+ if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
81
+ if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
82
+ if (!('score' in value) || value['score'] === undefined) return false;
83
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
84
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
85
+ return true;
86
+ }
87
+
88
+ export function ContentAttemptItemFromJSON(json: any): ContentAttemptItem {
89
+ return ContentAttemptItemFromJSONTyped(json, false);
90
+ }
91
+
92
+ export function ContentAttemptItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptItem {
93
+ if (json == null) {
94
+ return json;
95
+ }
96
+ return {
97
+
98
+ 'sessionId': json['session_id'],
99
+ 'attemptNumber': json['attempt_number'],
100
+ 'completionStatus': json['completion_status'],
101
+ 'gradeStatus': json['grade_status'],
102
+ 'score': ContentAttemptScoreFromJSON(json['score']),
103
+ 'createdAt': json['created_at'],
104
+ 'updatedAt': json['updated_at'],
105
+ };
106
+ }
107
+
108
+ export function ContentAttemptItemToJSON(json: any): ContentAttemptItem {
109
+ return ContentAttemptItemToJSONTyped(json, false);
110
+ }
111
+
112
+ export function ContentAttemptItemToJSONTyped(value?: ContentAttemptItem | null, ignoreDiscriminator: boolean = false): any {
113
+ if (value == null) {
114
+ return value;
115
+ }
116
+
117
+ return {
118
+
119
+ 'session_id': value['sessionId'],
120
+ 'attempt_number': value['attemptNumber'],
121
+ 'completion_status': value['completionStatus'],
122
+ 'grade_status': value['gradeStatus'],
123
+ 'score': ContentAttemptScoreToJSON(value['score']),
124
+ 'created_at': value['createdAt'],
125
+ 'updated_at': value['updatedAt'],
126
+ };
127
+ }
128
+
@@ -0,0 +1,75 @@
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
+ * Rolled-up score for a content item
18
+ * @export
19
+ * @interface ContentAttemptRollupScore
20
+ */
21
+ export interface ContentAttemptRollupScore {
22
+ /**
23
+ * Rolled-up score normalized to a 0-100 percentage
24
+ * @type {number}
25
+ * @memberof ContentAttemptRollupScore
26
+ */
27
+ percentage: number;
28
+ /**
29
+ * Attempt number that supplied the rolled-up score
30
+ * @type {number}
31
+ * @memberof ContentAttemptRollupScore
32
+ */
33
+ sourceAttemptNumber: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ContentAttemptRollupScore interface.
38
+ */
39
+ export function instanceOfContentAttemptRollupScore(value: object): value is ContentAttemptRollupScore {
40
+ if (!('percentage' in value) || value['percentage'] === undefined) return false;
41
+ if (!('sourceAttemptNumber' in value) || value['sourceAttemptNumber'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ContentAttemptRollupScoreFromJSON(json: any): ContentAttemptRollupScore {
46
+ return ContentAttemptRollupScoreFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ContentAttemptRollupScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptRollupScore {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'percentage': json['percentage'],
56
+ 'sourceAttemptNumber': json['source_attempt_number'],
57
+ };
58
+ }
59
+
60
+ export function ContentAttemptRollupScoreToJSON(json: any): ContentAttemptRollupScore {
61
+ return ContentAttemptRollupScoreToJSONTyped(json, false);
62
+ }
63
+
64
+ export function ContentAttemptRollupScoreToJSONTyped(value?: ContentAttemptRollupScore | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'percentage': value['percentage'],
72
+ 'source_attempt_number': value['sourceAttemptNumber'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,89 @@
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
+ * Normalized score data for a content attempt
18
+ * @export
19
+ * @interface ContentAttemptScore
20
+ */
21
+ export interface ContentAttemptScore {
22
+ /**
23
+ * Raw score reported by the content, if available
24
+ * @type {number}
25
+ * @memberof ContentAttemptScore
26
+ */
27
+ raw?: number | null;
28
+ /**
29
+ * Minimum possible score, if available
30
+ * @type {number}
31
+ * @memberof ContentAttemptScore
32
+ */
33
+ min?: number | null;
34
+ /**
35
+ * Maximum possible score, if available
36
+ * @type {number}
37
+ * @memberof ContentAttemptScore
38
+ */
39
+ max?: number | null;
40
+ /**
41
+ * Score normalized to a 0-100 percentage, if available
42
+ * @type {number}
43
+ * @memberof ContentAttemptScore
44
+ */
45
+ percentage?: number | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the ContentAttemptScore interface.
50
+ */
51
+ export function instanceOfContentAttemptScore(value: object): value is ContentAttemptScore {
52
+ return true;
53
+ }
54
+
55
+ export function ContentAttemptScoreFromJSON(json: any): ContentAttemptScore {
56
+ return ContentAttemptScoreFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function ContentAttemptScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptScore {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'raw': json['raw'] == null ? undefined : json['raw'],
66
+ 'min': json['min'] == null ? undefined : json['min'],
67
+ 'max': json['max'] == null ? undefined : json['max'],
68
+ 'percentage': json['percentage'] == null ? undefined : json['percentage'],
69
+ };
70
+ }
71
+
72
+ export function ContentAttemptScoreToJSON(json: any): ContentAttemptScore {
73
+ return ContentAttemptScoreToJSONTyped(json, false);
74
+ }
75
+
76
+ export function ContentAttemptScoreToJSONTyped(value?: ContentAttemptScore | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'raw': value['raw'],
84
+ 'min': value['min'],
85
+ 'max': value['max'],
86
+ 'percentage': value['percentage'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,54 @@
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
+ * How the learner player should present the launched content.
18
+ * @export
19
+ */
20
+ export const ContentLaunchMode = {
21
+ Embedded: 'embedded',
22
+ Fullscreen: 'fullscreen',
23
+ NewWindow: 'new_window'
24
+ } as const;
25
+ export type ContentLaunchMode = typeof ContentLaunchMode[keyof typeof ContentLaunchMode];
26
+
27
+
28
+ export function instanceOfContentLaunchMode(value: any): boolean {
29
+ for (const key in ContentLaunchMode) {
30
+ if (Object.prototype.hasOwnProperty.call(ContentLaunchMode, key)) {
31
+ if (ContentLaunchMode[key as keyof typeof ContentLaunchMode] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function ContentLaunchModeFromJSON(json: any): ContentLaunchMode {
40
+ return ContentLaunchModeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function ContentLaunchModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentLaunchMode {
44
+ return json as ContentLaunchMode;
45
+ }
46
+
47
+ export function ContentLaunchModeToJSON(value?: ContentLaunchMode | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function ContentLaunchModeToJSONTyped(value: any, ignoreDiscriminator: boolean): ContentLaunchMode {
52
+ return value as ContentLaunchMode;
53
+ }
54
+
@@ -20,6 +20,13 @@ import {
20
20
  GetContentContentDataToJSON,
21
21
  GetContentContentDataToJSONTyped,
22
22
  } from './GetContentContentData';
23
+ import type { ContentLaunchMode } from './ContentLaunchMode';
24
+ import {
25
+ ContentLaunchModeFromJSON,
26
+ ContentLaunchModeFromJSONTyped,
27
+ ContentLaunchModeToJSON,
28
+ ContentLaunchModeToJSONTyped,
29
+ } from './ContentLaunchMode';
23
30
 
24
31
  /**
25
32
  *
@@ -57,6 +64,12 @@ export interface GetContent {
57
64
  * @memberof GetContent
58
65
  */
59
66
  contentType: GetContentContentTypeEnum;
67
+ /**
68
+ *
69
+ * @type {ContentLaunchMode}
70
+ * @memberof GetContent
71
+ */
72
+ launchMode: ContentLaunchMode;
60
73
  /**
61
74
  *
62
75
  * @type {GetContentContentData}
@@ -131,6 +144,7 @@ export function instanceOfGetContent(value: object): value is GetContent {
131
144
  if (!('moduleId' in value) || value['moduleId'] === undefined) return false;
132
145
  if (!('name' in value) || value['name'] === undefined) return false;
133
146
  if (!('contentType' in value) || value['contentType'] === undefined) return false;
147
+ if (!('launchMode' in value) || value['launchMode'] === undefined) return false;
134
148
  if (!('contentData' in value) || value['contentData'] === undefined) return false;
135
149
  if (!('published' in value) || value['published'] === undefined) return false;
136
150
  return true;
@@ -151,6 +165,7 @@ export function GetContentFromJSONTyped(json: any, ignoreDiscriminator: boolean)
151
165
  'name': json['name'],
152
166
  'description': json['description'] == null ? undefined : json['description'],
153
167
  'contentType': json['content_type'],
168
+ 'launchMode': ContentLaunchModeFromJSON(json['launch_mode']),
154
169
  'contentData': GetContentContentDataFromJSON(json['content_data']),
155
170
  'order': json['order'] == null ? undefined : json['order'],
156
171
  'published': json['published'],
@@ -177,6 +192,7 @@ export function GetContentToJSONTyped(value?: Omit<GetContent, 'id'|'created_dat
177
192
  'name': value['name'],
178
193
  'description': value['description'],
179
194
  'content_type': value['contentType'],
195
+ 'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
180
196
  'content_data': GetContentContentDataToJSON(value['contentData']),
181
197
  'order': value['order'],
182
198
  '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
  };