@easyedu/js-lsm-api 1.98.0 → 1.100.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 (110) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +21 -2
  3. package/dist/apis/ContentLibraryQuizApi.d.ts +17 -0
  4. package/dist/apis/ContentLibraryQuizApi.js +45 -0
  5. package/dist/apis/CourseApi.d.ts +60 -0
  6. package/dist/apis/CourseApi.js +167 -0
  7. package/dist/apis/PlayerApi.d.ts +74 -0
  8. package/dist/apis/PlayerApi.js +193 -0
  9. package/dist/esm/apis/ContentLibraryQuizApi.d.ts +17 -0
  10. package/dist/esm/apis/ContentLibraryQuizApi.js +45 -0
  11. package/dist/esm/apis/CourseApi.d.ts +60 -0
  12. package/dist/esm/apis/CourseApi.js +167 -0
  13. package/dist/esm/apis/PlayerApi.d.ts +74 -0
  14. package/dist/esm/apis/PlayerApi.js +193 -0
  15. package/dist/esm/models/GetAttemptAllowance.d.ts +80 -0
  16. package/dist/esm/models/GetAttemptAllowance.js +75 -0
  17. package/dist/esm/models/GetCourseVersionItemSession.d.ts +6 -0
  18. package/dist/esm/models/GetCourseVersionItemSession.js +4 -0
  19. package/dist/esm/models/GetLibraryQuizSession.d.ts +6 -0
  20. package/dist/esm/models/GetLibraryQuizSession.js +4 -0
  21. package/dist/esm/models/GetResourceSession.d.ts +6 -0
  22. package/dist/esm/models/GetResourceSession.js +4 -0
  23. package/dist/esm/models/GetResourceSessionActivity.d.ts +125 -0
  24. package/dist/esm/models/GetResourceSessionActivity.js +97 -0
  25. package/dist/esm/models/GetResourceSessionActivityEvent.d.ts +62 -0
  26. package/dist/esm/models/GetResourceSessionActivityEvent.js +61 -0
  27. package/dist/esm/models/GetResourceSessionActivityEventList.d.ts +33 -0
  28. package/dist/esm/models/GetResourceSessionActivityEventList.js +44 -0
  29. package/dist/esm/models/GetResourceSessionActivityList.d.ts +33 -0
  30. package/dist/esm/models/GetResourceSessionActivityList.js +44 -0
  31. package/dist/esm/models/PostClearSessions.d.ts +32 -0
  32. package/dist/esm/models/PostClearSessions.js +43 -0
  33. package/dist/esm/models/PostClearSessionsResponse.d.ts +44 -0
  34. package/dist/esm/models/PostClearSessionsResponse.js +51 -0
  35. package/dist/esm/models/PostResourceSessionActivityEvent.d.ts +62 -0
  36. package/dist/esm/models/PostResourceSessionActivityEvent.js +66 -0
  37. package/dist/esm/models/PutAttemptAllowance.d.ts +38 -0
  38. package/dist/esm/models/PutAttemptAllowance.js +47 -0
  39. package/dist/esm/models/PutLibraryQuizSessionOverride.d.ts +57 -0
  40. package/dist/esm/models/PutLibraryQuizSessionOverride.js +55 -0
  41. package/dist/esm/models/PutResourceSessionOverride.d.ts +69 -0
  42. package/dist/esm/models/PutResourceSessionOverride.js +66 -0
  43. package/dist/esm/models/index.d.ts +11 -0
  44. package/dist/esm/models/index.js +11 -0
  45. package/dist/models/GetAttemptAllowance.d.ts +80 -0
  46. package/dist/models/GetAttemptAllowance.js +82 -0
  47. package/dist/models/GetCourseVersionItemSession.d.ts +6 -0
  48. package/dist/models/GetCourseVersionItemSession.js +4 -0
  49. package/dist/models/GetLibraryQuizSession.d.ts +6 -0
  50. package/dist/models/GetLibraryQuizSession.js +4 -0
  51. package/dist/models/GetResourceSession.d.ts +6 -0
  52. package/dist/models/GetResourceSession.js +4 -0
  53. package/dist/models/GetResourceSessionActivity.d.ts +125 -0
  54. package/dist/models/GetResourceSessionActivity.js +105 -0
  55. package/dist/models/GetResourceSessionActivityEvent.d.ts +62 -0
  56. package/dist/models/GetResourceSessionActivityEvent.js +68 -0
  57. package/dist/models/GetResourceSessionActivityEventList.d.ts +33 -0
  58. package/dist/models/GetResourceSessionActivityEventList.js +51 -0
  59. package/dist/models/GetResourceSessionActivityList.d.ts +33 -0
  60. package/dist/models/GetResourceSessionActivityList.js +51 -0
  61. package/dist/models/PostClearSessions.d.ts +32 -0
  62. package/dist/models/PostClearSessions.js +50 -0
  63. package/dist/models/PostClearSessionsResponse.d.ts +44 -0
  64. package/dist/models/PostClearSessionsResponse.js +58 -0
  65. package/dist/models/PostResourceSessionActivityEvent.d.ts +62 -0
  66. package/dist/models/PostResourceSessionActivityEvent.js +74 -0
  67. package/dist/models/PutAttemptAllowance.d.ts +38 -0
  68. package/dist/models/PutAttemptAllowance.js +54 -0
  69. package/dist/models/PutLibraryQuizSessionOverride.d.ts +57 -0
  70. package/dist/models/PutLibraryQuizSessionOverride.js +63 -0
  71. package/dist/models/PutResourceSessionOverride.d.ts +69 -0
  72. package/dist/models/PutResourceSessionOverride.js +74 -0
  73. package/dist/models/index.d.ts +11 -0
  74. package/dist/models/index.js +11 -0
  75. package/docs/ContentLibraryQuizApi.md +73 -2
  76. package/docs/CourseApi.md +236 -0
  77. package/docs/GetAttemptAllowance.md +51 -0
  78. package/docs/GetCourseVersionItemSession.md +2 -0
  79. package/docs/GetLibraryQuizSession.md +2 -0
  80. package/docs/GetResourceSession.md +2 -0
  81. package/docs/GetResourceSessionActivity.md +63 -0
  82. package/docs/GetResourceSessionActivityEvent.md +45 -0
  83. package/docs/GetResourceSessionActivityEventList.md +35 -0
  84. package/docs/GetResourceSessionActivityList.md +35 -0
  85. package/docs/PlayerApi.md +302 -6
  86. package/docs/PostClearSessions.md +34 -0
  87. package/docs/PostClearSessionsResponse.md +38 -0
  88. package/docs/PostResourceSessionActivityEvent.md +39 -0
  89. package/docs/PutAttemptAllowance.md +36 -0
  90. package/docs/PutLibraryQuizSessionOverride.md +41 -0
  91. package/docs/PutResourceSessionOverride.md +41 -0
  92. package/package.json +1 -1
  93. package/src/apis/ContentLibraryQuizApi.ts +65 -0
  94. package/src/apis/CourseApi.ts +270 -0
  95. package/src/apis/PlayerApi.ts +282 -0
  96. package/src/models/GetAttemptAllowance.ts +138 -0
  97. package/src/models/GetCourseVersionItemSession.ts +9 -0
  98. package/src/models/GetLibraryQuizSession.ts +9 -0
  99. package/src/models/GetResourceSession.ts +9 -0
  100. package/src/models/GetResourceSessionActivity.ts +199 -0
  101. package/src/models/GetResourceSessionActivityEvent.ts +110 -0
  102. package/src/models/GetResourceSessionActivityEventList.ts +74 -0
  103. package/src/models/GetResourceSessionActivityList.ts +74 -0
  104. package/src/models/PostClearSessions.ts +66 -0
  105. package/src/models/PostClearSessionsResponse.ts +84 -0
  106. package/src/models/PostResourceSessionActivityEvent.ts +104 -0
  107. package/src/models/PutAttemptAllowance.ts +75 -0
  108. package/src/models/PutLibraryQuizSessionOverride.ts +100 -0
  109. package/src/models/PutResourceSessionOverride.ts +113 -0
  110. package/src/models/index.ts +11 -0
@@ -22,10 +22,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  };
23
23
  import * as runtime from '../runtime';
24
24
  import { GetResourceSessionFromJSON, } from '../models/GetResourceSession';
25
+ import { GetResourceSessionActivityFromJSON, } from '../models/GetResourceSessionActivity';
26
+ import { GetResourceSessionActivityEventListFromJSON, } from '../models/GetResourceSessionActivityEventList';
27
+ import { GetResourceSessionActivityListFromJSON, } from '../models/GetResourceSessionActivityList';
25
28
  import { GetResourceSessionDiagnosticsFromJSON, } from '../models/GetResourceSessionDiagnostics';
26
29
  import { GetResourceSessionListFromJSON, } from '../models/GetResourceSessionList';
27
30
  import { GetResourceSessionScormApiLogsFromJSON, } from '../models/GetResourceSessionScormApiLogs';
28
31
  import { GetResourceSessionScormDataFromJSON, } from '../models/GetResourceSessionScormData';
32
+ import { PostResourceSessionActivityEventToJSON, } from '../models/PostResourceSessionActivityEvent';
33
+ import { PutResourceSessionOverrideToJSON, } from '../models/PutResourceSessionOverride';
29
34
  import { ScormGetValueResponseFromJSON, } from '../models/ScormGetValueResponse';
30
35
  import { ScormSetValueRequestToJSON, } from '../models/ScormSetValueRequest';
31
36
  import { ScormSetValueResponseFromJSON, } from '../models/ScormSetValueResponse';
@@ -42,6 +47,9 @@ export class PlayerApi extends runtime.BaseAPI {
42
47
  throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling commitResourceScormSession().');
43
48
  }
44
49
  const queryParameters = {};
50
+ if (requestParameters['activityId'] != null) {
51
+ queryParameters['activity_id'] = requestParameters['activityId'];
52
+ }
45
53
  const headerParameters = {};
46
54
  let urlPath = `/resource/sessions/{sessionId}/commit`;
47
55
  urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
@@ -177,6 +185,9 @@ export class PlayerApi extends runtime.BaseAPI {
177
185
  if (requestParameters['key'] != null) {
178
186
  queryParameters['key'] = requestParameters['key'];
179
187
  }
188
+ if (requestParameters['activityId'] != null) {
189
+ queryParameters['activity_id'] = requestParameters['activityId'];
190
+ }
180
191
  const headerParameters = {};
181
192
  let urlPath = `/resource/sessions/{sessionId}/get-value`;
182
193
  urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
@@ -246,6 +257,84 @@ export class PlayerApi extends runtime.BaseAPI {
246
257
  return yield response.value();
247
258
  });
248
259
  }
260
+ /**
261
+ * Creates request options for getResourceSessionActivities without sending the request
262
+ */
263
+ getResourceSessionActivitiesRequestOpts(requestParameters) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ if (requestParameters['sessionId'] == null) {
266
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getResourceSessionActivities().');
267
+ }
268
+ const queryParameters = {};
269
+ const headerParameters = {};
270
+ let urlPath = `/resource/sessions/{sessionId}/activities`;
271
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
272
+ return {
273
+ path: urlPath,
274
+ method: 'GET',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ };
278
+ });
279
+ }
280
+ /**
281
+ * List tracked activities for a resource session
282
+ */
283
+ getResourceSessionActivitiesRaw(requestParameters, initOverrides) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const requestOptions = yield this.getResourceSessionActivitiesRequestOpts(requestParameters);
286
+ const response = yield this.request(requestOptions, initOverrides);
287
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionActivityListFromJSON(jsonValue));
288
+ });
289
+ }
290
+ /**
291
+ * List tracked activities for a resource session
292
+ */
293
+ getResourceSessionActivities(requestParameters, initOverrides) {
294
+ return __awaiter(this, void 0, void 0, function* () {
295
+ const response = yield this.getResourceSessionActivitiesRaw(requestParameters, initOverrides);
296
+ return yield response.value();
297
+ });
298
+ }
299
+ /**
300
+ * Creates request options for getResourceSessionActivityEvents without sending the request
301
+ */
302
+ getResourceSessionActivityEventsRequestOpts(requestParameters) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ if (requestParameters['sessionId'] == null) {
305
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getResourceSessionActivityEvents().');
306
+ }
307
+ const queryParameters = {};
308
+ const headerParameters = {};
309
+ let urlPath = `/resource/sessions/{sessionId}/activity-events`;
310
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
311
+ return {
312
+ path: urlPath,
313
+ method: 'GET',
314
+ headers: headerParameters,
315
+ query: queryParameters,
316
+ };
317
+ });
318
+ }
319
+ /**
320
+ * List recorded learner activity events for a resource session
321
+ */
322
+ getResourceSessionActivityEventsRaw(requestParameters, initOverrides) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ const requestOptions = yield this.getResourceSessionActivityEventsRequestOpts(requestParameters);
325
+ const response = yield this.request(requestOptions, initOverrides);
326
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionActivityEventListFromJSON(jsonValue));
327
+ });
328
+ }
329
+ /**
330
+ * List recorded learner activity events for a resource session
331
+ */
332
+ getResourceSessionActivityEvents(requestParameters, initOverrides) {
333
+ return __awaiter(this, void 0, void 0, function* () {
334
+ const response = yield this.getResourceSessionActivityEventsRaw(requestParameters, initOverrides);
335
+ return yield response.value();
336
+ });
337
+ }
249
338
  /**
250
339
  * Creates request options for getResourceSessionAsset without sending the request
251
340
  */
@@ -533,6 +622,9 @@ export class PlayerApi extends runtime.BaseAPI {
533
622
  throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getResourceSessionScormData().');
534
623
  }
535
624
  const queryParameters = {};
625
+ if (requestParameters['activityId'] != null) {
626
+ queryParameters['activity_id'] = requestParameters['activityId'];
627
+ }
536
628
  const headerParameters = {};
537
629
  let urlPath = `/resource/sessions/{sessionId}/scorm-data`;
538
630
  urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
@@ -572,6 +664,9 @@ export class PlayerApi extends runtime.BaseAPI {
572
664
  throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling initializeResourceScormSession().');
573
665
  }
574
666
  const queryParameters = {};
667
+ if (requestParameters['activityId'] != null) {
668
+ queryParameters['activity_id'] = requestParameters['activityId'];
669
+ }
575
670
  const headerParameters = {};
576
671
  let urlPath = `/resource/sessions/{sessionId}/initialize`;
577
672
  urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
@@ -601,6 +696,54 @@ export class PlayerApi extends runtime.BaseAPI {
601
696
  yield this.initializeResourceScormSessionRaw(requestParameters, initOverrides);
602
697
  });
603
698
  }
699
+ /**
700
+ * Creates request options for postResourceSessionActivityEvent without sending the request
701
+ */
702
+ postResourceSessionActivityEventRequestOpts(requestParameters) {
703
+ return __awaiter(this, void 0, void 0, function* () {
704
+ if (requestParameters['sessionId'] == null) {
705
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postResourceSessionActivityEvent().');
706
+ }
707
+ if (requestParameters['activityId'] == null) {
708
+ throw new runtime.RequiredError('activityId', 'Required parameter "activityId" was null or undefined when calling postResourceSessionActivityEvent().');
709
+ }
710
+ if (requestParameters['postResourceSessionActivityEvent'] == null) {
711
+ throw new runtime.RequiredError('postResourceSessionActivityEvent', 'Required parameter "postResourceSessionActivityEvent" was null or undefined when calling postResourceSessionActivityEvent().');
712
+ }
713
+ const queryParameters = {};
714
+ const headerParameters = {};
715
+ headerParameters['Content-Type'] = 'application/json';
716
+ let urlPath = `/resource/sessions/{sessionId}/activities/{activityId}/events`;
717
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
718
+ urlPath = urlPath.replace('{activityId}', encodeURIComponent(String(requestParameters['activityId'])));
719
+ return {
720
+ path: urlPath,
721
+ method: 'POST',
722
+ headers: headerParameters,
723
+ query: queryParameters,
724
+ body: PostResourceSessionActivityEventToJSON(requestParameters['postResourceSessionActivityEvent']),
725
+ };
726
+ });
727
+ }
728
+ /**
729
+ * Record learner activity and update active time
730
+ */
731
+ postResourceSessionActivityEventRaw(requestParameters, initOverrides) {
732
+ return __awaiter(this, void 0, void 0, function* () {
733
+ const requestOptions = yield this.postResourceSessionActivityEventRequestOpts(requestParameters);
734
+ const response = yield this.request(requestOptions, initOverrides);
735
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionActivityFromJSON(jsonValue));
736
+ });
737
+ }
738
+ /**
739
+ * Record learner activity and update active time
740
+ */
741
+ postResourceSessionActivityEvent(requestParameters, initOverrides) {
742
+ return __awaiter(this, void 0, void 0, function* () {
743
+ const response = yield this.postResourceSessionActivityEventRaw(requestParameters, initOverrides);
744
+ return yield response.value();
745
+ });
746
+ }
604
747
  /**
605
748
  * Creates request options for postResourceSessionComplete without sending the request
606
749
  */
@@ -640,6 +783,50 @@ export class PlayerApi extends runtime.BaseAPI {
640
783
  return yield response.value();
641
784
  });
642
785
  }
786
+ /**
787
+ * Creates request options for putResourceSessionOverride without sending the request
788
+ */
789
+ putResourceSessionOverrideRequestOpts(requestParameters) {
790
+ return __awaiter(this, void 0, void 0, function* () {
791
+ if (requestParameters['sessionId'] == null) {
792
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling putResourceSessionOverride().');
793
+ }
794
+ if (requestParameters['putResourceSessionOverride'] == null) {
795
+ throw new runtime.RequiredError('putResourceSessionOverride', 'Required parameter "putResourceSessionOverride" was null or undefined when calling putResourceSessionOverride().');
796
+ }
797
+ const queryParameters = {};
798
+ const headerParameters = {};
799
+ headerParameters['Content-Type'] = 'application/json';
800
+ let urlPath = `/resource/sessions/{sessionId}/override`;
801
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
802
+ return {
803
+ path: urlPath,
804
+ method: 'PUT',
805
+ headers: headerParameters,
806
+ query: queryParameters,
807
+ body: PutResourceSessionOverrideToJSON(requestParameters['putResourceSessionOverride']),
808
+ };
809
+ });
810
+ }
811
+ /**
812
+ * Override a learner\'s live resource-session progress
813
+ */
814
+ putResourceSessionOverrideRaw(requestParameters, initOverrides) {
815
+ return __awaiter(this, void 0, void 0, function* () {
816
+ const requestOptions = yield this.putResourceSessionOverrideRequestOpts(requestParameters);
817
+ const response = yield this.request(requestOptions, initOverrides);
818
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionFromJSON(jsonValue));
819
+ });
820
+ }
821
+ /**
822
+ * Override a learner\'s live resource-session progress
823
+ */
824
+ putResourceSessionOverride(requestParameters, initOverrides) {
825
+ return __awaiter(this, void 0, void 0, function* () {
826
+ const response = yield this.putResourceSessionOverrideRaw(requestParameters, initOverrides);
827
+ return yield response.value();
828
+ });
829
+ }
643
830
  /**
644
831
  * Creates request options for setResourceScormValue without sending the request
645
832
  */
@@ -652,6 +839,9 @@ export class PlayerApi extends runtime.BaseAPI {
652
839
  throw new runtime.RequiredError('scormSetValueRequest', 'Required parameter "scormSetValueRequest" was null or undefined when calling setResourceScormValue().');
653
840
  }
654
841
  const queryParameters = {};
842
+ if (requestParameters['activityId'] != null) {
843
+ queryParameters['activity_id'] = requestParameters['activityId'];
844
+ }
655
845
  const headerParameters = {};
656
846
  headerParameters['Content-Type'] = 'application/json';
657
847
  let urlPath = `/resource/sessions/{sessionId}/set-value`;
@@ -693,6 +883,9 @@ export class PlayerApi extends runtime.BaseAPI {
693
883
  throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling terminateResourceScormSession().');
694
884
  }
695
885
  const queryParameters = {};
886
+ if (requestParameters['activityId'] != null) {
887
+ queryParameters['activity_id'] = requestParameters['activityId'];
888
+ }
696
889
  const headerParameters = {};
697
890
  let urlPath = `/resource/sessions/{sessionId}/terminate`;
698
891
  urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
@@ -0,0 +1,80 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The effective attempt limit for one learner and course-version item.
14
+ * @export
15
+ * @interface GetAttemptAllowance
16
+ */
17
+ export interface GetAttemptAllowance {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof GetAttemptAllowance
22
+ */
23
+ courseId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof GetAttemptAllowance
28
+ */
29
+ courseVersionId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof GetAttemptAllowance
34
+ */
35
+ itemId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof GetAttemptAllowance
40
+ */
41
+ userId: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof GetAttemptAllowance
46
+ */
47
+ baseMaxAttempts: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof GetAttemptAllowance
52
+ */
53
+ additionalAttempts: number;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof GetAttemptAllowance
58
+ */
59
+ effectiveMaxAttempts: number;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof GetAttemptAllowance
64
+ */
65
+ attemptsUsed: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof GetAttemptAllowance
70
+ */
71
+ attemptsRemaining: number;
72
+ }
73
+ /**
74
+ * Check if a given object implements the GetAttemptAllowance interface.
75
+ */
76
+ export declare function instanceOfGetAttemptAllowance(value: object): value is GetAttemptAllowance;
77
+ export declare function GetAttemptAllowanceFromJSON(json: any): GetAttemptAllowance;
78
+ export declare function GetAttemptAllowanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAttemptAllowance;
79
+ export declare function GetAttemptAllowanceToJSON(json: any): GetAttemptAllowance;
80
+ export declare function GetAttemptAllowanceToJSONTyped(value?: GetAttemptAllowance | null, ignoreDiscriminator?: boolean): any;
@@ -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
+ * Check if a given object implements the GetAttemptAllowance interface.
16
+ */
17
+ export function instanceOfGetAttemptAllowance(value) {
18
+ if (!('courseId' in value) || value['courseId'] === undefined)
19
+ return false;
20
+ if (!('courseVersionId' in value) || value['courseVersionId'] === undefined)
21
+ return false;
22
+ if (!('itemId' in value) || value['itemId'] === undefined)
23
+ return false;
24
+ if (!('userId' in value) || value['userId'] === undefined)
25
+ return false;
26
+ if (!('baseMaxAttempts' in value) || value['baseMaxAttempts'] === undefined)
27
+ return false;
28
+ if (!('additionalAttempts' in value) || value['additionalAttempts'] === undefined)
29
+ return false;
30
+ if (!('effectiveMaxAttempts' in value) || value['effectiveMaxAttempts'] === undefined)
31
+ return false;
32
+ if (!('attemptsUsed' in value) || value['attemptsUsed'] === undefined)
33
+ return false;
34
+ if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ export function GetAttemptAllowanceFromJSON(json) {
39
+ return GetAttemptAllowanceFromJSONTyped(json, false);
40
+ }
41
+ export function GetAttemptAllowanceFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'courseId': json['course_id'],
47
+ 'courseVersionId': json['course_version_id'],
48
+ 'itemId': json['item_id'],
49
+ 'userId': json['user_id'],
50
+ 'baseMaxAttempts': json['base_max_attempts'],
51
+ 'additionalAttempts': json['additional_attempts'],
52
+ 'effectiveMaxAttempts': json['effective_max_attempts'],
53
+ 'attemptsUsed': json['attempts_used'],
54
+ 'attemptsRemaining': json['attempts_remaining'],
55
+ };
56
+ }
57
+ export function GetAttemptAllowanceToJSON(json) {
58
+ return GetAttemptAllowanceToJSONTyped(json, false);
59
+ }
60
+ export function GetAttemptAllowanceToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'course_id': value['courseId'],
66
+ 'course_version_id': value['courseVersionId'],
67
+ 'item_id': value['itemId'],
68
+ 'user_id': value['userId'],
69
+ 'base_max_attempts': value['baseMaxAttempts'],
70
+ 'additional_attempts': value['additionalAttempts'],
71
+ 'effective_max_attempts': value['effectiveMaxAttempts'],
72
+ 'attempts_used': value['attemptsUsed'],
73
+ 'attempts_remaining': value['attemptsRemaining'],
74
+ };
75
+ }
@@ -102,6 +102,12 @@ export interface GetCourseVersionItemSession {
102
102
  * @memberof GetCourseVersionItemSession
103
103
  */
104
104
  scoreRaw?: number | null;
105
+ /**
106
+ * Accumulated active learner time across this session's activities.
107
+ * @type {number}
108
+ * @memberof GetCourseVersionItemSession
109
+ */
110
+ durationSeconds: number;
105
111
  /**
106
112
  *
107
113
  * @type {number}
@@ -44,6 +44,8 @@ export function instanceOfGetCourseVersionItemSession(value) {
44
44
  return false;
45
45
  if (!('gradeStatus' in value) || value['gradeStatus'] === undefined)
46
46
  return false;
47
+ if (!('durationSeconds' in value) || value['durationSeconds'] === undefined)
48
+ return false;
47
49
  if (!('createdAt' in value) || value['createdAt'] === undefined)
48
50
  return false;
49
51
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -72,6 +74,7 @@ export function GetCourseVersionItemSessionFromJSONTyped(json, ignoreDiscriminat
72
74
  'completionStatus': json['completion_status'],
73
75
  'gradeStatus': json['grade_status'],
74
76
  'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
77
+ 'durationSeconds': json['duration_seconds'],
75
78
  'createdAt': json['created_at'],
76
79
  'updatedAt': json['updated_at'],
77
80
  'completedAt': json['completed_at'] == null ? undefined : json['completed_at'],
@@ -99,6 +102,7 @@ export function GetCourseVersionItemSessionToJSONTyped(value, ignoreDiscriminato
99
102
  'completion_status': value['completionStatus'],
100
103
  'grade_status': value['gradeStatus'],
101
104
  'score_raw': value['scoreRaw'],
105
+ 'duration_seconds': value['durationSeconds'],
102
106
  'created_at': value['createdAt'],
103
107
  'updated_at': value['updatedAt'],
104
108
  'completed_at': value['completedAt'],
@@ -155,6 +155,12 @@ export interface GetLibraryQuizSession {
155
155
  * @memberof GetLibraryQuizSession
156
156
  */
157
157
  completedAt?: number | null;
158
+ /**
159
+ * Elapsed attempt time from start through completion, submission, or the latest saved activity.
160
+ * @type {number}
161
+ * @memberof GetLibraryQuizSession
162
+ */
163
+ durationSeconds: number;
158
164
  }
159
165
  /**
160
166
  * @export
@@ -59,6 +59,8 @@ export function instanceOfGetLibraryQuizSession(value) {
59
59
  return false;
60
60
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
61
61
  return false;
62
+ if (!('durationSeconds' in value) || value['durationSeconds'] === undefined)
63
+ return false;
62
64
  return true;
63
65
  }
64
66
  export function GetLibraryQuizSessionFromJSON(json) {
@@ -92,6 +94,7 @@ export function GetLibraryQuizSessionFromJSONTyped(json, ignoreDiscriminator) {
92
94
  'createdAt': json['created_at'],
93
95
  'updatedAt': json['updated_at'],
94
96
  'completedAt': json['completed_at'] == null ? undefined : json['completed_at'],
97
+ 'durationSeconds': json['duration_seconds'],
95
98
  };
96
99
  }
97
100
  export function GetLibraryQuizSessionToJSON(json) {
@@ -125,5 +128,6 @@ export function GetLibraryQuizSessionToJSONTyped(value, ignoreDiscriminator = fa
125
128
  'created_at': value['createdAt'],
126
129
  'updated_at': value['updatedAt'],
127
130
  'completed_at': value['completedAt'],
131
+ 'duration_seconds': value['durationSeconds'],
128
132
  };
129
133
  }
@@ -150,6 +150,12 @@ export interface GetResourceSession {
150
150
  * @memberof GetResourceSession
151
151
  */
152
152
  scoreRaw?: number | null;
153
+ /**
154
+ * Accumulated active learner time across this session's activities.
155
+ * @type {number}
156
+ * @memberof GetResourceSession
157
+ */
158
+ durationSeconds: number;
153
159
  /**
154
160
  *
155
161
  * @type {number}
@@ -46,6 +46,8 @@ export function instanceOfGetResourceSession(value) {
46
46
  return false;
47
47
  if (!('gradeStatus' in value) || value['gradeStatus'] === undefined)
48
48
  return false;
49
+ if (!('durationSeconds' in value) || value['durationSeconds'] === undefined)
50
+ return false;
49
51
  if (!('createdAt' in value) || value['createdAt'] === undefined)
50
52
  return false;
51
53
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -82,6 +84,7 @@ export function GetResourceSessionFromJSONTyped(json, ignoreDiscriminator) {
82
84
  'completionStatus': json['completion_status'],
83
85
  'gradeStatus': json['grade_status'],
84
86
  'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
87
+ 'durationSeconds': json['duration_seconds'],
85
88
  'initializedAt': json['initialized_at'] == null ? undefined : json['initialized_at'],
86
89
  'terminatedAt': json['terminated_at'] == null ? undefined : json['terminated_at'],
87
90
  'createdAt': json['created_at'],
@@ -119,6 +122,7 @@ export function GetResourceSessionToJSONTyped(value, ignoreDiscriminator = false
119
122
  'completion_status': value['completionStatus'],
120
123
  'grade_status': value['gradeStatus'],
121
124
  'score_raw': value['scoreRaw'],
125
+ 'duration_seconds': value['durationSeconds'],
122
126
  'initialized_at': value['initializedAt'],
123
127
  'terminated_at': value['terminatedAt'],
124
128
  'created_at': value['createdAt'],
@@ -0,0 +1,125 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Per-activity learner state within a resource-session attempt.
14
+ * @export
15
+ * @interface GetResourceSessionActivity
16
+ */
17
+ export interface GetResourceSessionActivity {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof GetResourceSessionActivity
22
+ */
23
+ id: string;
24
+ /**
25
+ * Stable source identifier, such as a SCORM activity identifier or resource.
26
+ * @type {string}
27
+ * @memberof GetResourceSessionActivity
28
+ */
29
+ identifier: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof GetResourceSessionActivity
34
+ */
35
+ title: string;
36
+ /**
37
+ *
38
+ * @type {GetResourceSessionActivityActivityTypeEnum}
39
+ * @memberof GetResourceSessionActivity
40
+ */
41
+ activityType: GetResourceSessionActivityActivityTypeEnum;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof GetResourceSessionActivity
46
+ */
47
+ completionStatus: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof GetResourceSessionActivity
52
+ */
53
+ gradeStatus: string;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof GetResourceSessionActivity
58
+ */
59
+ scoreRaw?: number | null;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof GetResourceSessionActivity
64
+ */
65
+ durationSeconds: number;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof GetResourceSessionActivity
70
+ */
71
+ isActive: boolean;
72
+ /**
73
+ *
74
+ * @type {number}
75
+ * @memberof GetResourceSessionActivity
76
+ */
77
+ initializedAt?: number | null;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof GetResourceSessionActivity
82
+ */
83
+ terminatedAt?: number | null;
84
+ /**
85
+ *
86
+ * @type {number}
87
+ * @memberof GetResourceSessionActivity
88
+ */
89
+ completedAt?: number | null;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof GetResourceSessionActivity
94
+ */
95
+ lastSeenAt?: number | null;
96
+ /**
97
+ *
98
+ * @type {number}
99
+ * @memberof GetResourceSessionActivity
100
+ */
101
+ createdAt: number;
102
+ /**
103
+ *
104
+ * @type {number}
105
+ * @memberof GetResourceSessionActivity
106
+ */
107
+ updatedAt: number;
108
+ }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const GetResourceSessionActivityActivityTypeEnum: {
113
+ readonly Resource: "resource";
114
+ readonly Sco: "sco";
115
+ readonly Asset: "asset";
116
+ };
117
+ export type GetResourceSessionActivityActivityTypeEnum = typeof GetResourceSessionActivityActivityTypeEnum[keyof typeof GetResourceSessionActivityActivityTypeEnum];
118
+ /**
119
+ * Check if a given object implements the GetResourceSessionActivity interface.
120
+ */
121
+ export declare function instanceOfGetResourceSessionActivity(value: object): value is GetResourceSessionActivity;
122
+ export declare function GetResourceSessionActivityFromJSON(json: any): GetResourceSessionActivity;
123
+ export declare function GetResourceSessionActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSessionActivity;
124
+ export declare function GetResourceSessionActivityToJSON(json: any): GetResourceSessionActivity;
125
+ export declare function GetResourceSessionActivityToJSONTyped(value?: GetResourceSessionActivity | null, ignoreDiscriminator?: boolean): any;