@easyedu/js-lsm-api 1.139.0 → 1.141.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 (253) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/README.md +41 -2
  3. package/dist/apis/ContentLibraryQuizApi.d.ts +86 -0
  4. package/dist/apis/ContentLibraryQuizApi.js +216 -0
  5. package/dist/apis/DispatchApi.d.ts +71 -0
  6. package/dist/apis/DispatchApi.js +178 -0
  7. package/dist/apis/LRSApi.d.ts +152 -0
  8. package/dist/apis/LRSApi.js +369 -0
  9. package/dist/apis/PlayerApi.d.ts +71 -0
  10. package/dist/apis/PlayerApi.js +177 -0
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/ContentLibraryQuizApi.d.ts +86 -0
  14. package/dist/esm/apis/ContentLibraryQuizApi.js +216 -0
  15. package/dist/esm/apis/DispatchApi.d.ts +71 -0
  16. package/dist/esm/apis/DispatchApi.js +178 -0
  17. package/dist/esm/apis/LRSApi.d.ts +152 -0
  18. package/dist/esm/apis/LRSApi.js +365 -0
  19. package/dist/esm/apis/PlayerApi.d.ts +71 -0
  20. package/dist/esm/apis/PlayerApi.js +177 -0
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/Cmi5Launch.d.ts +52 -0
  24. package/dist/esm/models/Cmi5Launch.js +58 -0
  25. package/dist/esm/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
  26. package/dist/esm/models/DeleteLrsUserRecordsResponse.js +47 -0
  27. package/dist/esm/models/GetAttemptAllowance.d.ts +9 -3
  28. package/dist/esm/models/GetAttemptAllowance.js +4 -0
  29. package/dist/esm/models/GetCourseExport.d.ts +2 -1
  30. package/dist/esm/models/GetCourseExport.js +2 -1
  31. package/dist/esm/models/GetCourseVersionItem.d.ts +1 -1
  32. package/dist/esm/models/GetLibraryQuizResult.d.ts +30 -0
  33. package/dist/esm/models/GetLibraryQuizResult.js +20 -0
  34. package/dist/esm/models/GetLibraryQuizSession.d.ts +43 -0
  35. package/dist/esm/models/GetLibraryQuizSession.js +27 -0
  36. package/dist/esm/models/GetLibraryQuizVersion.d.ts +19 -0
  37. package/dist/esm/models/GetLibraryQuizVersion.js +13 -0
  38. package/dist/esm/models/GetLrsCredentials.d.ts +46 -0
  39. package/dist/esm/models/GetLrsCredentials.js +53 -0
  40. package/dist/esm/models/GetLrsStatementList.d.ts +57 -0
  41. package/dist/esm/models/GetLrsStatementList.js +60 -0
  42. package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
  43. package/dist/esm/models/GetQuestionAnswerChoicesInner.js +4 -0
  44. package/dist/esm/models/GetQuizSettings.d.ts +56 -0
  45. package/dist/esm/models/GetQuizSettings.js +57 -0
  46. package/dist/esm/models/GetResourceSessionActivity.d.ts +2 -1
  47. package/dist/esm/models/GetResourceSessionActivity.js +2 -1
  48. package/dist/esm/models/H5pState.d.ts +34 -0
  49. package/dist/esm/models/H5pState.js +43 -0
  50. package/dist/esm/models/H5pStatementResult.d.ts +44 -0
  51. package/dist/esm/models/H5pStatementResult.js +49 -0
  52. package/dist/esm/models/HostedScormAccessPolicy.d.ts +1 -1
  53. package/dist/esm/models/HostedScormOutlineEntry.d.ts +1 -1
  54. package/dist/esm/models/LibraryQuizQuestionFeedback.d.ts +78 -0
  55. package/dist/esm/models/LibraryQuizQuestionFeedback.js +66 -0
  56. package/dist/esm/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
  57. package/dist/esm/models/LibraryQuizSessionAnswerChoice.js +2 -0
  58. package/dist/esm/models/LibraryQuizSessionQuestion.d.ts +19 -0
  59. package/dist/esm/models/LibraryQuizSessionQuestion.js +11 -0
  60. package/dist/esm/models/LrsCredential.d.ts +74 -0
  61. package/dist/esm/models/LrsCredential.js +67 -0
  62. package/dist/esm/models/LrsScope.d.ts +38 -0
  63. package/dist/esm/models/LrsScope.js +47 -0
  64. package/dist/esm/models/LrsStatement.d.ts +112 -0
  65. package/dist/esm/models/LrsStatement.js +81 -0
  66. package/dist/esm/models/PostCourseExport.d.ts +2 -1
  67. package/dist/esm/models/PostCourseExport.js +2 -1
  68. package/dist/esm/models/PostCourseVersionItem.d.ts +1 -1
  69. package/dist/esm/models/PostDispatchCmi5Launch.d.ts +64 -0
  70. package/dist/esm/models/PostDispatchCmi5Launch.js +63 -0
  71. package/dist/esm/models/PostH5pStatement.d.ts +40 -0
  72. package/dist/esm/models/PostH5pStatement.js +47 -0
  73. package/dist/esm/models/PostLibraryQuiz.d.ts +21 -2
  74. package/dist/esm/models/PostLibraryQuiz.js +7 -0
  75. package/dist/esm/models/PostLrsCredential.d.ts +38 -0
  76. package/dist/esm/models/PostLrsCredential.js +47 -0
  77. package/dist/esm/models/PostLrsCredentialResponse.d.ts +45 -0
  78. package/dist/esm/models/PostLrsCredentialResponse.js +52 -0
  79. package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
  80. package/dist/esm/models/PostQuestionAnswerChoicesInner.js +2 -0
  81. package/dist/esm/models/PutCourseVersionItem.d.ts +1 -1
  82. package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
  83. package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.js +43 -0
  84. package/dist/esm/models/PutLibraryQuizVersion.d.ts +19 -0
  85. package/dist/esm/models/PutLibraryQuizVersion.js +7 -0
  86. package/dist/esm/models/PutLrsCredential.d.ts +38 -0
  87. package/dist/esm/models/PutLrsCredential.js +43 -0
  88. package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
  89. package/dist/esm/models/PutQuestionAnswerChoicesInner.js +2 -0
  90. package/dist/esm/models/PutQuizSettings.d.ts +44 -0
  91. package/dist/esm/models/PutQuizSettings.js +51 -0
  92. package/dist/esm/models/QuizFeedbackTiming.d.ts +25 -0
  93. package/dist/esm/models/QuizFeedbackTiming.js +43 -0
  94. package/dist/esm/models/ResourceType.d.ts +2 -0
  95. package/dist/esm/models/ResourceType.js +3 -1
  96. package/dist/esm/models/index.d.ts +19 -0
  97. package/dist/esm/models/index.js +19 -0
  98. package/dist/models/Cmi5Launch.d.ts +52 -0
  99. package/dist/models/Cmi5Launch.js +66 -0
  100. package/dist/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
  101. package/dist/models/DeleteLrsUserRecordsResponse.js +54 -0
  102. package/dist/models/GetAttemptAllowance.d.ts +9 -3
  103. package/dist/models/GetAttemptAllowance.js +4 -0
  104. package/dist/models/GetCourseExport.d.ts +2 -1
  105. package/dist/models/GetCourseExport.js +2 -1
  106. package/dist/models/GetCourseVersionItem.d.ts +1 -1
  107. package/dist/models/GetLibraryQuizResult.d.ts +30 -0
  108. package/dist/models/GetLibraryQuizResult.js +20 -0
  109. package/dist/models/GetLibraryQuizSession.d.ts +43 -0
  110. package/dist/models/GetLibraryQuizSession.js +27 -0
  111. package/dist/models/GetLibraryQuizVersion.d.ts +19 -0
  112. package/dist/models/GetLibraryQuizVersion.js +13 -0
  113. package/dist/models/GetLrsCredentials.d.ts +46 -0
  114. package/dist/models/GetLrsCredentials.js +60 -0
  115. package/dist/models/GetLrsStatementList.d.ts +57 -0
  116. package/dist/models/GetLrsStatementList.js +67 -0
  117. package/dist/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
  118. package/dist/models/GetQuestionAnswerChoicesInner.js +4 -0
  119. package/dist/models/GetQuizSettings.d.ts +56 -0
  120. package/dist/models/GetQuizSettings.js +64 -0
  121. package/dist/models/GetResourceSessionActivity.d.ts +2 -1
  122. package/dist/models/GetResourceSessionActivity.js +2 -1
  123. package/dist/models/H5pState.d.ts +34 -0
  124. package/dist/models/H5pState.js +50 -0
  125. package/dist/models/H5pStatementResult.d.ts +44 -0
  126. package/dist/models/H5pStatementResult.js +56 -0
  127. package/dist/models/HostedScormAccessPolicy.d.ts +1 -1
  128. package/dist/models/HostedScormOutlineEntry.d.ts +1 -1
  129. package/dist/models/LibraryQuizQuestionFeedback.d.ts +78 -0
  130. package/dist/models/LibraryQuizQuestionFeedback.js +74 -0
  131. package/dist/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
  132. package/dist/models/LibraryQuizSessionAnswerChoice.js +2 -0
  133. package/dist/models/LibraryQuizSessionQuestion.d.ts +19 -0
  134. package/dist/models/LibraryQuizSessionQuestion.js +11 -0
  135. package/dist/models/LrsCredential.d.ts +74 -0
  136. package/dist/models/LrsCredential.js +74 -0
  137. package/dist/models/LrsScope.d.ts +38 -0
  138. package/dist/models/LrsScope.js +54 -0
  139. package/dist/models/LrsStatement.d.ts +112 -0
  140. package/dist/models/LrsStatement.js +88 -0
  141. package/dist/models/PostCourseExport.d.ts +2 -1
  142. package/dist/models/PostCourseExport.js +2 -1
  143. package/dist/models/PostCourseVersionItem.d.ts +1 -1
  144. package/dist/models/PostDispatchCmi5Launch.d.ts +64 -0
  145. package/dist/models/PostDispatchCmi5Launch.js +70 -0
  146. package/dist/models/PostH5pStatement.d.ts +40 -0
  147. package/dist/models/PostH5pStatement.js +54 -0
  148. package/dist/models/PostLibraryQuiz.d.ts +21 -2
  149. package/dist/models/PostLibraryQuiz.js +7 -0
  150. package/dist/models/PostLrsCredential.d.ts +38 -0
  151. package/dist/models/PostLrsCredential.js +54 -0
  152. package/dist/models/PostLrsCredentialResponse.d.ts +45 -0
  153. package/dist/models/PostLrsCredentialResponse.js +59 -0
  154. package/dist/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
  155. package/dist/models/PostQuestionAnswerChoicesInner.js +2 -0
  156. package/dist/models/PutCourseVersionItem.d.ts +1 -1
  157. package/dist/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
  158. package/dist/models/PutLibraryQuizSessionQuestionFlag.js +50 -0
  159. package/dist/models/PutLibraryQuizVersion.d.ts +19 -0
  160. package/dist/models/PutLibraryQuizVersion.js +7 -0
  161. package/dist/models/PutLrsCredential.d.ts +38 -0
  162. package/dist/models/PutLrsCredential.js +50 -0
  163. package/dist/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
  164. package/dist/models/PutQuestionAnswerChoicesInner.js +2 -0
  165. package/dist/models/PutQuizSettings.d.ts +44 -0
  166. package/dist/models/PutQuizSettings.js +58 -0
  167. package/dist/models/QuizFeedbackTiming.d.ts +25 -0
  168. package/dist/models/QuizFeedbackTiming.js +51 -0
  169. package/dist/models/ResourceType.d.ts +2 -0
  170. package/dist/models/ResourceType.js +3 -1
  171. package/dist/models/index.d.ts +19 -0
  172. package/dist/models/index.js +19 -0
  173. package/docs/Cmi5Launch.md +39 -0
  174. package/docs/ContentLibraryApi.md +2 -2
  175. package/docs/ContentLibraryQuizApi.md +343 -0
  176. package/docs/DeleteLrsUserRecordsResponse.md +37 -0
  177. package/docs/DispatchApi.md +287 -0
  178. package/docs/GetAttemptAllowance.md +2 -0
  179. package/docs/GetLibraryQuizResult.md +10 -0
  180. package/docs/GetLibraryQuizSession.md +14 -0
  181. package/docs/GetLibraryQuizVersion.md +6 -0
  182. package/docs/GetLrsCredentials.md +38 -0
  183. package/docs/GetLrsStatementList.md +42 -0
  184. package/docs/GetQuestionAnswerChoicesInner.md +2 -0
  185. package/docs/GetQuizSettings.md +43 -0
  186. package/docs/H5pState.md +35 -0
  187. package/docs/H5pStatementResult.md +39 -0
  188. package/docs/LRSApi.md +531 -0
  189. package/docs/LibraryQuizQuestionFeedback.md +47 -0
  190. package/docs/LibraryQuizSessionAnswerChoice.md +2 -0
  191. package/docs/LibraryQuizSessionQuestion.md +6 -0
  192. package/docs/LrsCredential.md +49 -0
  193. package/docs/LrsScope.md +37 -0
  194. package/docs/LrsStatement.md +61 -0
  195. package/docs/PlayerApi.md +286 -1
  196. package/docs/PostDispatchCmi5Launch.md +45 -0
  197. package/docs/PostH5pStatement.md +37 -0
  198. package/docs/PostLibraryQuiz.md +6 -0
  199. package/docs/PostLrsCredential.md +36 -0
  200. package/docs/PostLrsCredentialResponse.md +39 -0
  201. package/docs/PostQuestionAnswerChoicesInner.md +2 -0
  202. package/docs/PutLibraryQuizSessionQuestionFlag.md +34 -0
  203. package/docs/PutLibraryQuizVersion.md +6 -0
  204. package/docs/PutLrsCredential.md +36 -0
  205. package/docs/PutQuestionAnswerChoicesInner.md +2 -0
  206. package/docs/PutQuizSettings.md +38 -0
  207. package/docs/QuizFeedbackTiming.md +33 -0
  208. package/package.json +1 -1
  209. package/src/apis/ContentLibraryQuizApi.ts +287 -0
  210. package/src/apis/DispatchApi.ts +243 -0
  211. package/src/apis/LRSApi.ts +486 -0
  212. package/src/apis/PlayerApi.ts +250 -0
  213. package/src/apis/index.ts +1 -0
  214. package/src/models/Cmi5Launch.ts +95 -0
  215. package/src/models/DeleteLrsUserRecordsResponse.ts +75 -0
  216. package/src/models/GetAttemptAllowance.ts +12 -3
  217. package/src/models/GetCourseExport.ts +3 -2
  218. package/src/models/GetCourseVersionItem.ts +1 -1
  219. package/src/models/GetLibraryQuizResult.ts +45 -0
  220. package/src/models/GetLibraryQuizSession.ts +69 -0
  221. package/src/models/GetLibraryQuizVersion.ts +34 -0
  222. package/src/models/GetLrsCredentials.ts +99 -0
  223. package/src/models/GetLrsStatementList.ts +110 -0
  224. package/src/models/GetQuestionAnswerChoicesInner.ts +9 -0
  225. package/src/models/GetQuizSettings.ts +101 -0
  226. package/src/models/GetResourceSessionActivity.ts +3 -2
  227. package/src/models/H5pState.ts +66 -0
  228. package/src/models/H5pStatementResult.ts +83 -0
  229. package/src/models/HostedScormAccessPolicy.ts +1 -1
  230. package/src/models/HostedScormOutlineEntry.ts +1 -1
  231. package/src/models/LibraryQuizQuestionFeedback.ts +135 -0
  232. package/src/models/LibraryQuizSessionAnswerChoice.ts +8 -0
  233. package/src/models/LibraryQuizSessionQuestion.ts +33 -0
  234. package/src/models/LrsCredential.ts +127 -0
  235. package/src/models/LrsScope.ts +75 -0
  236. package/src/models/LrsStatement.ts +176 -0
  237. package/src/models/PostCourseExport.ts +3 -2
  238. package/src/models/PostCourseVersionItem.ts +1 -1
  239. package/src/models/PostDispatchCmi5Launch.ts +111 -0
  240. package/src/models/PostH5pStatement.ts +75 -0
  241. package/src/models/PostLibraryQuiz.ts +33 -2
  242. package/src/models/PostLrsCredential.ts +75 -0
  243. package/src/models/PostLrsCredentialResponse.ts +92 -0
  244. package/src/models/PostQuestionAnswerChoicesInner.ts +8 -0
  245. package/src/models/PutCourseVersionItem.ts +1 -1
  246. package/src/models/PutLibraryQuizSessionQuestionFlag.ts +66 -0
  247. package/src/models/PutLibraryQuizVersion.ts +31 -0
  248. package/src/models/PutLrsCredential.ts +73 -0
  249. package/src/models/PutQuestionAnswerChoicesInner.ts +8 -0
  250. package/src/models/PutQuizSettings.ts +84 -0
  251. package/src/models/QuizFeedbackTiming.ts +53 -0
  252. package/src/models/ResourceType.ts +3 -1
  253. package/src/models/index.ts +19 -0
@@ -21,6 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
+ import { Cmi5LaunchFromJSON, } from '../models/Cmi5Launch';
24
25
  import { GetResourceSessionFromJSON, } from '../models/GetResourceSession';
25
26
  import { GetResourceSessionActivityFromJSON, } from '../models/GetResourceSessionActivity';
26
27
  import { GetResourceSessionActivityEventListFromJSON, } from '../models/GetResourceSessionActivityEventList';
@@ -29,6 +30,9 @@ import { GetResourceSessionDiagnosticsFromJSON, } from '../models/GetResourceSes
29
30
  import { GetResourceSessionListFromJSON, } from '../models/GetResourceSessionList';
30
31
  import { GetResourceSessionScormApiLogsFromJSON, } from '../models/GetResourceSessionScormApiLogs';
31
32
  import { GetResourceSessionScormDataFromJSON, } from '../models/GetResourceSessionScormData';
33
+ import { H5pStateFromJSON, H5pStateToJSON, } from '../models/H5pState';
34
+ import { H5pStatementResultFromJSON, } from '../models/H5pStatementResult';
35
+ import { PostH5pStatementToJSON, } from '../models/PostH5pStatement';
32
36
  import { PostResourceSessionActivityEventToJSON, } from '../models/PostResourceSessionActivityEvent';
33
37
  import { PutResourceSessionOverrideToJSON, } from '../models/PutResourceSessionOverride';
34
38
  import { ScormGetValueResponseFromJSON, } from '../models/ScormGetValueResponse';
@@ -422,6 +426,45 @@ export class PlayerApi extends runtime.BaseAPI {
422
426
  return yield response.value();
423
427
  });
424
428
  }
429
+ /**
430
+ * Creates request options for getResourceSessionH5pState without sending the request
431
+ */
432
+ getResourceSessionH5pStateRequestOpts(requestParameters) {
433
+ return __awaiter(this, void 0, void 0, function* () {
434
+ if (requestParameters['sessionId'] == null) {
435
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getResourceSessionH5pState().');
436
+ }
437
+ const queryParameters = {};
438
+ const headerParameters = {};
439
+ let urlPath = `/resource/sessions/{sessionId}/h5p/state`;
440
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
441
+ return {
442
+ path: urlPath,
443
+ method: 'GET',
444
+ headers: headerParameters,
445
+ query: queryParameters,
446
+ };
447
+ });
448
+ }
449
+ /**
450
+ * Read the learner\'s saved H5P state for the session
451
+ */
452
+ getResourceSessionH5pStateRaw(requestParameters, initOverrides) {
453
+ return __awaiter(this, void 0, void 0, function* () {
454
+ const requestOptions = yield this.getResourceSessionH5pStateRequestOpts(requestParameters);
455
+ const response = yield this.request(requestOptions, initOverrides);
456
+ return new runtime.JSONApiResponse(response, (jsonValue) => H5pStateFromJSON(jsonValue));
457
+ });
458
+ }
459
+ /**
460
+ * Read the learner\'s saved H5P state for the session
461
+ */
462
+ getResourceSessionH5pState(requestParameters, initOverrides) {
463
+ return __awaiter(this, void 0, void 0, function* () {
464
+ const response = yield this.getResourceSessionH5pStateRaw(requestParameters, initOverrides);
465
+ return yield response.value();
466
+ });
467
+ }
425
468
  /**
426
469
  * Creates request options for getResourceSessionList without sending the request
427
470
  */
@@ -797,6 +840,51 @@ export class PlayerApi extends runtime.BaseAPI {
797
840
  return yield response.value();
798
841
  });
799
842
  }
843
+ /**
844
+ * Creates request options for postResourceSessionCmi5Launch without sending the request
845
+ */
846
+ postResourceSessionCmi5LaunchRequestOpts(requestParameters) {
847
+ return __awaiter(this, void 0, void 0, function* () {
848
+ if (requestParameters['sessionId'] == null) {
849
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postResourceSessionCmi5Launch().');
850
+ }
851
+ if (requestParameters['activityId'] == null) {
852
+ throw new runtime.RequiredError('activityId', 'Required parameter "activityId" was null or undefined when calling postResourceSessionCmi5Launch().');
853
+ }
854
+ const queryParameters = {};
855
+ const headerParameters = {};
856
+ let urlPath = `/resource/sessions/{sessionId}/cmi5/activities/{activityId}/launch`;
857
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
858
+ urlPath = urlPath.replace('{activityId}', encodeURIComponent(String(requestParameters['activityId'])));
859
+ return {
860
+ path: urlPath,
861
+ method: 'POST',
862
+ headers: headerParameters,
863
+ query: queryParameters,
864
+ };
865
+ });
866
+ }
867
+ /**
868
+ * Writes the cmi5 launch data and the Launched statement to the Learning Record Store and returns the Assignable Unit\'s URL with the cmi5 launch parameters. A launch left open by an earlier visit is recorded as Abandoned.
869
+ * Launch one Assignable Unit of the session\'s cmi5 course
870
+ */
871
+ postResourceSessionCmi5LaunchRaw(requestParameters, initOverrides) {
872
+ return __awaiter(this, void 0, void 0, function* () {
873
+ const requestOptions = yield this.postResourceSessionCmi5LaunchRequestOpts(requestParameters);
874
+ const response = yield this.request(requestOptions, initOverrides);
875
+ return new runtime.JSONApiResponse(response, (jsonValue) => Cmi5LaunchFromJSON(jsonValue));
876
+ });
877
+ }
878
+ /**
879
+ * Writes the cmi5 launch data and the Launched statement to the Learning Record Store and returns the Assignable Unit\'s URL with the cmi5 launch parameters. A launch left open by an earlier visit is recorded as Abandoned.
880
+ * Launch one Assignable Unit of the session\'s cmi5 course
881
+ */
882
+ postResourceSessionCmi5Launch(requestParameters, initOverrides) {
883
+ return __awaiter(this, void 0, void 0, function* () {
884
+ const response = yield this.postResourceSessionCmi5LaunchRaw(requestParameters, initOverrides);
885
+ return yield response.value();
886
+ });
887
+ }
800
888
  /**
801
889
  * Creates request options for postResourceSessionComplete without sending the request
802
890
  */
@@ -836,6 +924,95 @@ export class PlayerApi extends runtime.BaseAPI {
836
924
  return yield response.value();
837
925
  });
838
926
  }
927
+ /**
928
+ * Creates request options for postResourceSessionH5pStatement without sending the request
929
+ */
930
+ postResourceSessionH5pStatementRequestOpts(requestParameters) {
931
+ return __awaiter(this, void 0, void 0, function* () {
932
+ if (requestParameters['sessionId'] == null) {
933
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postResourceSessionH5pStatement().');
934
+ }
935
+ if (requestParameters['postH5pStatement'] == null) {
936
+ throw new runtime.RequiredError('postH5pStatement', 'Required parameter "postH5pStatement" was null or undefined when calling postResourceSessionH5pStatement().');
937
+ }
938
+ const queryParameters = {};
939
+ const headerParameters = {};
940
+ headerParameters['Content-Type'] = 'application/json';
941
+ let urlPath = `/resource/sessions/{sessionId}/h5p/statements`;
942
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
943
+ return {
944
+ path: urlPath,
945
+ method: 'POST',
946
+ headers: headerParameters,
947
+ query: queryParameters,
948
+ body: PostH5pStatementToJSON(requestParameters['postH5pStatement']),
949
+ };
950
+ });
951
+ }
952
+ /**
953
+ * Stores the statement in the portal\'s Learning Record Store on behalf of the session\'s learner and updates the session\'s completion, grade, and score from it.
954
+ * Record an xAPI statement emitted by the session\'s H5P content
955
+ */
956
+ postResourceSessionH5pStatementRaw(requestParameters, initOverrides) {
957
+ return __awaiter(this, void 0, void 0, function* () {
958
+ const requestOptions = yield this.postResourceSessionH5pStatementRequestOpts(requestParameters);
959
+ const response = yield this.request(requestOptions, initOverrides);
960
+ return new runtime.JSONApiResponse(response, (jsonValue) => H5pStatementResultFromJSON(jsonValue));
961
+ });
962
+ }
963
+ /**
964
+ * Stores the statement in the portal\'s Learning Record Store on behalf of the session\'s learner and updates the session\'s completion, grade, and score from it.
965
+ * Record an xAPI statement emitted by the session\'s H5P content
966
+ */
967
+ postResourceSessionH5pStatement(requestParameters, initOverrides) {
968
+ return __awaiter(this, void 0, void 0, function* () {
969
+ const response = yield this.postResourceSessionH5pStatementRaw(requestParameters, initOverrides);
970
+ return yield response.value();
971
+ });
972
+ }
973
+ /**
974
+ * Creates request options for putResourceSessionH5pState without sending the request
975
+ */
976
+ putResourceSessionH5pStateRequestOpts(requestParameters) {
977
+ return __awaiter(this, void 0, void 0, function* () {
978
+ if (requestParameters['sessionId'] == null) {
979
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling putResourceSessionH5pState().');
980
+ }
981
+ if (requestParameters['h5pState'] == null) {
982
+ throw new runtime.RequiredError('h5pState', 'Required parameter "h5pState" was null or undefined when calling putResourceSessionH5pState().');
983
+ }
984
+ const queryParameters = {};
985
+ const headerParameters = {};
986
+ headerParameters['Content-Type'] = 'application/json';
987
+ let urlPath = `/resource/sessions/{sessionId}/h5p/state`;
988
+ urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
989
+ return {
990
+ path: urlPath,
991
+ method: 'PUT',
992
+ headers: headerParameters,
993
+ query: queryParameters,
994
+ body: H5pStateToJSON(requestParameters['h5pState']),
995
+ };
996
+ });
997
+ }
998
+ /**
999
+ * Save the learner\'s in-progress H5P state for the session
1000
+ */
1001
+ putResourceSessionH5pStateRaw(requestParameters, initOverrides) {
1002
+ return __awaiter(this, void 0, void 0, function* () {
1003
+ const requestOptions = yield this.putResourceSessionH5pStateRequestOpts(requestParameters);
1004
+ const response = yield this.request(requestOptions, initOverrides);
1005
+ return new runtime.VoidApiResponse(response);
1006
+ });
1007
+ }
1008
+ /**
1009
+ * Save the learner\'s in-progress H5P state for the session
1010
+ */
1011
+ putResourceSessionH5pState(requestParameters, initOverrides) {
1012
+ return __awaiter(this, void 0, void 0, function* () {
1013
+ yield this.putResourceSessionH5pStateRaw(requestParameters, initOverrides);
1014
+ });
1015
+ }
839
1016
  /**
840
1017
  * Creates request options for putResourceSessionOverride without sending the request
841
1018
  */
@@ -10,6 +10,7 @@ export * from './CourseShareApi';
10
10
  export * from './DispatchApi';
11
11
  export * from './EmailTemplateApi';
12
12
  export * from './IntegrationApi';
13
+ export * from './LRSApi';
13
14
  export * from './LearnerExperienceApi';
14
15
  export * from './MarketingApi';
15
16
  export * from './OtherApi';
@@ -12,6 +12,7 @@ export * from './CourseShareApi';
12
12
  export * from './DispatchApi';
13
13
  export * from './EmailTemplateApi';
14
14
  export * from './IntegrationApi';
15
+ export * from './LRSApi';
15
16
  export * from './LearnerExperienceApi';
16
17
  export * from './MarketingApi';
17
18
  export * from './OtherApi';
@@ -0,0 +1,52 @@
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
+ * A launch of one cmi5 Assignable Unit within a resource session.
14
+ * @export
15
+ * @interface Cmi5Launch
16
+ */
17
+ export interface Cmi5Launch {
18
+ /**
19
+ * The cmi5 session id of this launch.
20
+ * @type {string}
21
+ * @memberof Cmi5Launch
22
+ */
23
+ sessionId: string;
24
+ /**
25
+ * The Assignable Unit's URL with the cmi5 launch parameters appended.
26
+ * @type {string}
27
+ * @memberof Cmi5Launch
28
+ */
29
+ launchUrl: string;
30
+ /**
31
+ * OwnWindow content must be opened in a new window rather than a frame.
32
+ * @type {Cmi5LaunchLaunchMethodEnum}
33
+ * @memberof Cmi5Launch
34
+ */
35
+ launchMethod: Cmi5LaunchLaunchMethodEnum;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const Cmi5LaunchLaunchMethodEnum: {
41
+ readonly AnyWindow: "AnyWindow";
42
+ readonly OwnWindow: "OwnWindow";
43
+ };
44
+ export type Cmi5LaunchLaunchMethodEnum = typeof Cmi5LaunchLaunchMethodEnum[keyof typeof Cmi5LaunchLaunchMethodEnum];
45
+ /**
46
+ * Check if a given object implements the Cmi5Launch interface.
47
+ */
48
+ export declare function instanceOfCmi5Launch(value: object): value is Cmi5Launch;
49
+ export declare function Cmi5LaunchFromJSON(json: any): Cmi5Launch;
50
+ export declare function Cmi5LaunchFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cmi5Launch;
51
+ export declare function Cmi5LaunchToJSON(json: any): Cmi5Launch;
52
+ export declare function Cmi5LaunchToJSONTyped(value?: Cmi5Launch | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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
+ * @export
16
+ */
17
+ export const Cmi5LaunchLaunchMethodEnum = {
18
+ AnyWindow: 'AnyWindow',
19
+ OwnWindow: 'OwnWindow'
20
+ };
21
+ /**
22
+ * Check if a given object implements the Cmi5Launch interface.
23
+ */
24
+ export function instanceOfCmi5Launch(value) {
25
+ if (!('sessionId' in value) || value['sessionId'] === undefined)
26
+ return false;
27
+ if (!('launchUrl' in value) || value['launchUrl'] === undefined)
28
+ return false;
29
+ if (!('launchMethod' in value) || value['launchMethod'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function Cmi5LaunchFromJSON(json) {
34
+ return Cmi5LaunchFromJSONTyped(json, false);
35
+ }
36
+ export function Cmi5LaunchFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'sessionId': json['session_id'],
42
+ 'launchUrl': json['launch_url'],
43
+ 'launchMethod': json['launch_method'],
44
+ };
45
+ }
46
+ export function Cmi5LaunchToJSON(json) {
47
+ return Cmi5LaunchToJSONTyped(json, false);
48
+ }
49
+ export function Cmi5LaunchToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'session_id': value['sessionId'],
55
+ 'launch_url': value['launchUrl'],
56
+ 'launch_method': value['launchMethod'],
57
+ };
58
+ }
@@ -0,0 +1,38 @@
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
+ * What was permanently removed for one learner.
14
+ * @export
15
+ * @interface DeleteLrsUserRecordsResponse
16
+ */
17
+ export interface DeleteLrsUserRecordsResponse {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof DeleteLrsUserRecordsResponse
22
+ */
23
+ statementsDeleted: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof DeleteLrsUserRecordsResponse
28
+ */
29
+ documentsDeleted: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the DeleteLrsUserRecordsResponse interface.
33
+ */
34
+ export declare function instanceOfDeleteLrsUserRecordsResponse(value: object): value is DeleteLrsUserRecordsResponse;
35
+ export declare function DeleteLrsUserRecordsResponseFromJSON(json: any): DeleteLrsUserRecordsResponse;
36
+ export declare function DeleteLrsUserRecordsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteLrsUserRecordsResponse;
37
+ export declare function DeleteLrsUserRecordsResponseToJSON(json: any): DeleteLrsUserRecordsResponse;
38
+ export declare function DeleteLrsUserRecordsResponseToJSONTyped(value?: DeleteLrsUserRecordsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
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 DeleteLrsUserRecordsResponse interface.
16
+ */
17
+ export function instanceOfDeleteLrsUserRecordsResponse(value) {
18
+ if (!('statementsDeleted' in value) || value['statementsDeleted'] === undefined)
19
+ return false;
20
+ if (!('documentsDeleted' in value) || value['documentsDeleted'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function DeleteLrsUserRecordsResponseFromJSON(json) {
25
+ return DeleteLrsUserRecordsResponseFromJSONTyped(json, false);
26
+ }
27
+ export function DeleteLrsUserRecordsResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'statementsDeleted': json['statements_deleted'],
33
+ 'documentsDeleted': json['documents_deleted'],
34
+ };
35
+ }
36
+ export function DeleteLrsUserRecordsResponseToJSON(json) {
37
+ return DeleteLrsUserRecordsResponseToJSONTyped(json, false);
38
+ }
39
+ export function DeleteLrsUserRecordsResponseToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'statements_deleted': value['statementsDeleted'],
45
+ 'documents_deleted': value['documentsDeleted'],
46
+ };
47
+ }
@@ -40,7 +40,7 @@ export interface GetAttemptAllowance {
40
40
  */
41
41
  userId: string;
42
42
  /**
43
- *
43
+ * The placement's attempt limit. Zero means unlimited.
44
44
  * @type {number}
45
45
  * @memberof GetAttemptAllowance
46
46
  */
@@ -52,7 +52,7 @@ export interface GetAttemptAllowance {
52
52
  */
53
53
  additionalAttempts: number;
54
54
  /**
55
- *
55
+ * The limit including extra attempts. Zero means unlimited.
56
56
  * @type {number}
57
57
  * @memberof GetAttemptAllowance
58
58
  */
@@ -64,11 +64,17 @@ export interface GetAttemptAllowance {
64
64
  */
65
65
  attemptsUsed: number;
66
66
  /**
67
- *
67
+ * Zero when attempts are unlimited; check `unlimited` first.
68
68
  * @type {number}
69
69
  * @memberof GetAttemptAllowance
70
70
  */
71
71
  attemptsRemaining: number;
72
+ /**
73
+ * The placement allows unlimited attempts.
74
+ * @type {boolean}
75
+ * @memberof GetAttemptAllowance
76
+ */
77
+ unlimited: boolean;
72
78
  }
73
79
  /**
74
80
  * Check if a given object implements the GetAttemptAllowance interface.
@@ -33,6 +33,8 @@ export function instanceOfGetAttemptAllowance(value) {
33
33
  return false;
34
34
  if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined)
35
35
  return false;
36
+ if (!('unlimited' in value) || value['unlimited'] === undefined)
37
+ return false;
36
38
  return true;
37
39
  }
38
40
  export function GetAttemptAllowanceFromJSON(json) {
@@ -52,6 +54,7 @@ export function GetAttemptAllowanceFromJSONTyped(json, ignoreDiscriminator) {
52
54
  'effectiveMaxAttempts': json['effective_max_attempts'],
53
55
  'attemptsUsed': json['attempts_used'],
54
56
  'attemptsRemaining': json['attempts_remaining'],
57
+ 'unlimited': json['unlimited'],
55
58
  };
56
59
  }
57
60
  export function GetAttemptAllowanceToJSON(json) {
@@ -71,5 +74,6 @@ export function GetAttemptAllowanceToJSONTyped(value, ignoreDiscriminator = fals
71
74
  'effective_max_attempts': value['effectiveMaxAttempts'],
72
75
  'attempts_used': value['attemptsUsed'],
73
76
  'attempts_remaining': value['attemptsRemaining'],
77
+ 'unlimited': value['unlimited'],
74
78
  };
75
79
  }
@@ -42,7 +42,7 @@ export interface GetCourseExport {
42
42
  */
43
43
  courseVersionId?: string | null;
44
44
  /**
45
- * The export format type
45
+ * The export format type. CMI5 produces a cmi5 course structure that launches the hosted course and always uses hosted delivery.
46
46
  * @type {GetCourseExportExportTypeEnum}
47
47
  * @memberof GetCourseExport
48
48
  */
@@ -139,6 +139,7 @@ export declare const GetCourseExportExportTypeEnum: {
139
139
  readonly Scorm12: "SCORM_1_2";
140
140
  readonly Scorm20043RdEdition: "SCORM_2004_3RD_EDITION";
141
141
  readonly Scorm20044ThEdition: "SCORM_2004_4TH_EDITION";
142
+ readonly Cmi5: "CMI5";
142
143
  };
143
144
  export type GetCourseExportExportTypeEnum = typeof GetCourseExportExportTypeEnum[keyof typeof GetCourseExportExportTypeEnum];
144
145
  /**
@@ -19,7 +19,8 @@ import { HostedScormAccessPolicyFromJSON, HostedScormAccessPolicyToJSON, } from
19
19
  export const GetCourseExportExportTypeEnum = {
20
20
  Scorm12: 'SCORM_1_2',
21
21
  Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
22
- Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
22
+ Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION',
23
+ Cmi5: 'CMI5'
23
24
  };
24
25
  /**
25
26
  * @export
@@ -101,7 +101,7 @@ export interface GetCourseVersionItem {
101
101
  */
102
102
  launchMode: ContentLaunchMode;
103
103
  /**
104
- *
104
+ * Zero means unlimited (quiz placements only).
105
105
  * @type {number}
106
106
  * @memberof GetCourseVersionItem
107
107
  */
@@ -75,8 +75,38 @@ export interface GetLibraryQuizResult {
75
75
  * @memberof GetLibraryQuizResult
76
76
  */
77
77
  pendingManualGrading: boolean;
78
+ /**
79
+ * The attempt was submitted automatically when its time limit ran out.
80
+ * @type {boolean}
81
+ * @memberof GetLibraryQuizResult
82
+ */
83
+ timedOut: boolean;
78
84
  /**
79
85
  *
86
+ * @type {number}
87
+ * @memberof GetLibraryQuizResult
88
+ */
89
+ passingScore: number;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof GetLibraryQuizResult
94
+ */
95
+ attemptNumber: number;
96
+ /**
97
+ * Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
98
+ * @type {number}
99
+ * @memberof GetLibraryQuizResult
100
+ */
101
+ maxAttempts: number;
102
+ /**
103
+ * The learner has at least one attempt left.
104
+ * @type {boolean}
105
+ * @memberof GetLibraryQuizResult
106
+ */
107
+ canRetake: boolean;
108
+ /**
109
+ * Per-question review, present when the quiz allows review. Each entry has the learner's answer and whether it was correct. `correct_choice_ids`, `correct_answer`, and `answer_choices` are added when the quiz shows correct answers; `explanation` and `explanation_rich` are added when the quiz shows explanations.
80
110
  * @type {Array<{ [key: string]: any; }>}
81
111
  * @memberof GetLibraryQuizResult
82
112
  */
@@ -31,6 +31,16 @@ export function instanceOfGetLibraryQuizResult(value) {
31
31
  return false;
32
32
  if (!('pendingManualGrading' in value) || value['pendingManualGrading'] === undefined)
33
33
  return false;
34
+ if (!('timedOut' in value) || value['timedOut'] === undefined)
35
+ return false;
36
+ if (!('passingScore' in value) || value['passingScore'] === undefined)
37
+ return false;
38
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
39
+ return false;
40
+ if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
41
+ return false;
42
+ if (!('canRetake' in value) || value['canRetake'] === undefined)
43
+ return false;
34
44
  if (!('questions' in value) || value['questions'] === undefined)
35
45
  return false;
36
46
  return true;
@@ -53,6 +63,11 @@ export function GetLibraryQuizResultFromJSONTyped(json, ignoreDiscriminator) {
53
63
  'scorePercentage': json['score_percentage'] == null ? undefined : json['score_percentage'],
54
64
  'passed': json['passed'] == null ? undefined : json['passed'],
55
65
  'pendingManualGrading': json['pending_manual_grading'],
66
+ 'timedOut': json['timed_out'],
67
+ 'passingScore': json['passing_score'],
68
+ 'attemptNumber': json['attempt_number'],
69
+ 'maxAttempts': json['max_attempts'],
70
+ 'canRetake': json['can_retake'],
56
71
  'questions': json['questions'],
57
72
  };
58
73
  }
@@ -74,6 +89,11 @@ export function GetLibraryQuizResultToJSONTyped(value, ignoreDiscriminator = fal
74
89
  'score_percentage': value['scorePercentage'],
75
90
  'passed': value['passed'],
76
91
  'pending_manual_grading': value['pendingManualGrading'],
92
+ 'timed_out': value['timedOut'],
93
+ 'passing_score': value['passingScore'],
94
+ 'attempt_number': value['attemptNumber'],
95
+ 'max_attempts': value['maxAttempts'],
96
+ 'can_retake': value['canRetake'],
77
97
  'questions': value['questions'],
78
98
  };
79
99
  }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { ResourceSessionEnvironment } from './ResourceSessionEnvironment';
13
13
  import type { LibraryQuizSessionQuestion } from './LibraryQuizSessionQuestion';
14
+ import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -77,6 +78,48 @@ export interface GetLibraryQuizSession {
77
78
  * @memberof GetLibraryQuizSession
78
79
  */
79
80
  quizName: string;
81
+ /**
82
+ * The quiz description, shown as instructions on the introduction page.
83
+ * @type {string}
84
+ * @memberof GetLibraryQuizSession
85
+ */
86
+ description: string;
87
+ /**
88
+ * False until the learner leaves the introduction page. The time limit starts counting when the attempt starts.
89
+ * @type {boolean}
90
+ * @memberof GetLibraryQuizSession
91
+ */
92
+ hasStarted: boolean;
93
+ /**
94
+ *
95
+ * @type {number}
96
+ * @memberof GetLibraryQuizSession
97
+ */
98
+ passingScore: number;
99
+ /**
100
+ *
101
+ * @type {number}
102
+ * @memberof GetLibraryQuizSession
103
+ */
104
+ timeLimitMinutes?: number | null;
105
+ /**
106
+ * Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
107
+ * @type {number}
108
+ * @memberof GetLibraryQuizSession
109
+ */
110
+ maxAttempts: number;
111
+ /**
112
+ *
113
+ * @type {QuizFeedbackTiming}
114
+ * @memberof GetLibraryQuizSession
115
+ */
116
+ feedbackTiming: QuizFeedbackTiming;
117
+ /**
118
+ *
119
+ * @type {boolean}
120
+ * @memberof GetLibraryQuizSession
121
+ */
122
+ requireAllQuestions: boolean;
80
123
  /**
81
124
  *
82
125
  * @type {number}