@easyedu/js-lsm-api 1.140.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 (139) hide show
  1. package/.openapi-generator/FILES +30 -0
  2. package/README.md +28 -2
  3. package/dist/apis/DispatchApi.d.ts +18 -0
  4. package/dist/apis/DispatchApi.js +43 -0
  5. package/dist/apis/LRSApi.d.ts +152 -0
  6. package/dist/apis/LRSApi.js +369 -0
  7. package/dist/apis/PlayerApi.d.ts +71 -0
  8. package/dist/apis/PlayerApi.js +177 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/DispatchApi.d.ts +18 -0
  12. package/dist/esm/apis/DispatchApi.js +43 -0
  13. package/dist/esm/apis/LRSApi.d.ts +152 -0
  14. package/dist/esm/apis/LRSApi.js +365 -0
  15. package/dist/esm/apis/PlayerApi.d.ts +71 -0
  16. package/dist/esm/apis/PlayerApi.js +177 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/Cmi5Launch.d.ts +52 -0
  20. package/dist/esm/models/Cmi5Launch.js +58 -0
  21. package/dist/esm/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
  22. package/dist/esm/models/DeleteLrsUserRecordsResponse.js +47 -0
  23. package/dist/esm/models/GetCourseExport.d.ts +2 -1
  24. package/dist/esm/models/GetCourseExport.js +2 -1
  25. package/dist/esm/models/GetLrsCredentials.d.ts +46 -0
  26. package/dist/esm/models/GetLrsCredentials.js +53 -0
  27. package/dist/esm/models/GetLrsStatementList.d.ts +57 -0
  28. package/dist/esm/models/GetLrsStatementList.js +60 -0
  29. package/dist/esm/models/GetResourceSessionActivity.d.ts +2 -1
  30. package/dist/esm/models/GetResourceSessionActivity.js +2 -1
  31. package/dist/esm/models/H5pState.d.ts +34 -0
  32. package/dist/esm/models/H5pState.js +43 -0
  33. package/dist/esm/models/H5pStatementResult.d.ts +44 -0
  34. package/dist/esm/models/H5pStatementResult.js +49 -0
  35. package/dist/esm/models/HostedScormAccessPolicy.d.ts +1 -1
  36. package/dist/esm/models/LrsCredential.d.ts +74 -0
  37. package/dist/esm/models/LrsCredential.js +67 -0
  38. package/dist/esm/models/LrsScope.d.ts +38 -0
  39. package/dist/esm/models/LrsScope.js +47 -0
  40. package/dist/esm/models/LrsStatement.d.ts +112 -0
  41. package/dist/esm/models/LrsStatement.js +81 -0
  42. package/dist/esm/models/PostCourseExport.d.ts +2 -1
  43. package/dist/esm/models/PostCourseExport.js +2 -1
  44. package/dist/esm/models/PostDispatchCmi5Launch.d.ts +64 -0
  45. package/dist/esm/models/PostDispatchCmi5Launch.js +63 -0
  46. package/dist/esm/models/PostH5pStatement.d.ts +40 -0
  47. package/dist/esm/models/PostH5pStatement.js +47 -0
  48. package/dist/esm/models/PostLrsCredential.d.ts +38 -0
  49. package/dist/esm/models/PostLrsCredential.js +47 -0
  50. package/dist/esm/models/PostLrsCredentialResponse.d.ts +45 -0
  51. package/dist/esm/models/PostLrsCredentialResponse.js +52 -0
  52. package/dist/esm/models/PutLrsCredential.d.ts +38 -0
  53. package/dist/esm/models/PutLrsCredential.js +43 -0
  54. package/dist/esm/models/ResourceType.d.ts +2 -0
  55. package/dist/esm/models/ResourceType.js +3 -1
  56. package/dist/esm/models/index.d.ts +14 -0
  57. package/dist/esm/models/index.js +14 -0
  58. package/dist/models/Cmi5Launch.d.ts +52 -0
  59. package/dist/models/Cmi5Launch.js +66 -0
  60. package/dist/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
  61. package/dist/models/DeleteLrsUserRecordsResponse.js +54 -0
  62. package/dist/models/GetCourseExport.d.ts +2 -1
  63. package/dist/models/GetCourseExport.js +2 -1
  64. package/dist/models/GetLrsCredentials.d.ts +46 -0
  65. package/dist/models/GetLrsCredentials.js +60 -0
  66. package/dist/models/GetLrsStatementList.d.ts +57 -0
  67. package/dist/models/GetLrsStatementList.js +67 -0
  68. package/dist/models/GetResourceSessionActivity.d.ts +2 -1
  69. package/dist/models/GetResourceSessionActivity.js +2 -1
  70. package/dist/models/H5pState.d.ts +34 -0
  71. package/dist/models/H5pState.js +50 -0
  72. package/dist/models/H5pStatementResult.d.ts +44 -0
  73. package/dist/models/H5pStatementResult.js +56 -0
  74. package/dist/models/HostedScormAccessPolicy.d.ts +1 -1
  75. package/dist/models/LrsCredential.d.ts +74 -0
  76. package/dist/models/LrsCredential.js +74 -0
  77. package/dist/models/LrsScope.d.ts +38 -0
  78. package/dist/models/LrsScope.js +54 -0
  79. package/dist/models/LrsStatement.d.ts +112 -0
  80. package/dist/models/LrsStatement.js +88 -0
  81. package/dist/models/PostCourseExport.d.ts +2 -1
  82. package/dist/models/PostCourseExport.js +2 -1
  83. package/dist/models/PostDispatchCmi5Launch.d.ts +64 -0
  84. package/dist/models/PostDispatchCmi5Launch.js +70 -0
  85. package/dist/models/PostH5pStatement.d.ts +40 -0
  86. package/dist/models/PostH5pStatement.js +54 -0
  87. package/dist/models/PostLrsCredential.d.ts +38 -0
  88. package/dist/models/PostLrsCredential.js +54 -0
  89. package/dist/models/PostLrsCredentialResponse.d.ts +45 -0
  90. package/dist/models/PostLrsCredentialResponse.js +59 -0
  91. package/dist/models/PutLrsCredential.d.ts +38 -0
  92. package/dist/models/PutLrsCredential.js +50 -0
  93. package/dist/models/ResourceType.d.ts +2 -0
  94. package/dist/models/ResourceType.js +3 -1
  95. package/dist/models/index.d.ts +14 -0
  96. package/dist/models/index.js +14 -0
  97. package/docs/Cmi5Launch.md +39 -0
  98. package/docs/ContentLibraryApi.md +2 -2
  99. package/docs/DeleteLrsUserRecordsResponse.md +37 -0
  100. package/docs/DispatchApi.md +73 -0
  101. package/docs/GetLrsCredentials.md +38 -0
  102. package/docs/GetLrsStatementList.md +42 -0
  103. package/docs/H5pState.md +35 -0
  104. package/docs/H5pStatementResult.md +39 -0
  105. package/docs/LRSApi.md +531 -0
  106. package/docs/LrsCredential.md +49 -0
  107. package/docs/LrsScope.md +37 -0
  108. package/docs/LrsStatement.md +61 -0
  109. package/docs/PlayerApi.md +286 -1
  110. package/docs/PostDispatchCmi5Launch.md +45 -0
  111. package/docs/PostH5pStatement.md +37 -0
  112. package/docs/PostLrsCredential.md +36 -0
  113. package/docs/PostLrsCredentialResponse.md +39 -0
  114. package/docs/PutLrsCredential.md +36 -0
  115. package/package.json +1 -1
  116. package/src/apis/DispatchApi.ts +58 -0
  117. package/src/apis/LRSApi.ts +486 -0
  118. package/src/apis/PlayerApi.ts +250 -0
  119. package/src/apis/index.ts +1 -0
  120. package/src/models/Cmi5Launch.ts +95 -0
  121. package/src/models/DeleteLrsUserRecordsResponse.ts +75 -0
  122. package/src/models/GetCourseExport.ts +3 -2
  123. package/src/models/GetLrsCredentials.ts +99 -0
  124. package/src/models/GetLrsStatementList.ts +110 -0
  125. package/src/models/GetResourceSessionActivity.ts +3 -2
  126. package/src/models/H5pState.ts +66 -0
  127. package/src/models/H5pStatementResult.ts +83 -0
  128. package/src/models/HostedScormAccessPolicy.ts +1 -1
  129. package/src/models/LrsCredential.ts +127 -0
  130. package/src/models/LrsScope.ts +75 -0
  131. package/src/models/LrsStatement.ts +176 -0
  132. package/src/models/PostCourseExport.ts +3 -2
  133. package/src/models/PostDispatchCmi5Launch.ts +111 -0
  134. package/src/models/PostH5pStatement.ts +75 -0
  135. package/src/models/PostLrsCredential.ts +75 -0
  136. package/src/models/PostLrsCredentialResponse.ts +92 -0
  137. package/src/models/PutLrsCredential.ts +73 -0
  138. package/src/models/ResourceType.ts +3 -1
  139. package/src/models/index.ts +14 -0
package/docs/PlayerApi.md CHANGED
@@ -13,6 +13,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
13
13
  | [**getResourceSessionActivityEvents**](PlayerApi.md#getresourcesessionactivityevents) | **GET** /resource/sessions/{sessionId}/activity-events | List recorded learner activity events for a resource session |
14
14
  | [**getResourceSessionAsset**](PlayerApi.md#getresourcesessionasset) | **GET** /resource/sessions/{sessionId}/asset/{assetPath} | Stream an asset pinned to a resource session |
15
15
  | [**getResourceSessionDiagnostics**](PlayerApi.md#getresourcesessiondiagnostics) | **GET** /resource/sessions/{sessionId}/diagnostics | Get administrator diagnostics for a resource session |
16
+ | [**getResourceSessionH5pState**](PlayerApi.md#getresourcesessionh5pstate) | **GET** /resource/sessions/{sessionId}/h5p/state | Read the learner\'s saved H5P state for the session |
16
17
  | [**getResourceSessionList**](PlayerApi.md#getresourcesessionlist) | **GET** /resource/sessions | List resource sessions for the selected portal |
17
18
  | [**getResourceSessionPlayer**](PlayerApi.md#getresourcesessionplayer) | **GET** /resource/sessions/{sessionId}/player | Serve the player for a version-pinned reusable resource session |
18
19
  | [**getResourceSessionScormApiLogs**](PlayerApi.md#getresourcesessionscormapilogs) | **GET** /resource/sessions/{sessionId}/api-logs | Get SCORM runtime logs for a resource session |
@@ -20,7 +21,10 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
20
21
  | [**initializeResourceScormSession**](PlayerApi.md#initializeresourcescormsession) | **POST** /resource/sessions/{sessionId}/initialize | Initialize a reusable SCORM resource session |
21
22
  | [**navigateResourceScormSession**](PlayerApi.md#navigateresourcescormsession) | **POST** /resource/sessions/{sessionId}/navigation | Process a SCORM 2004 sequencing and navigation request |
22
23
  | [**postResourceSessionActivityEvent**](PlayerApi.md#postresourcesessionactivityevent) | **POST** /resource/sessions/{sessionId}/activities/{activityId}/events | Record learner activity and update active time |
24
+ | [**postResourceSessionCmi5Launch**](PlayerApi.md#postresourcesessioncmi5launch) | **POST** /resource/sessions/{sessionId}/cmi5/activities/{activityId}/launch | Launch one Assignable Unit of the session\'s cmi5 course |
23
25
  | [**postResourceSessionComplete**](PlayerApi.md#postresourcesessioncomplete) | **POST** /resource/sessions/{sessionId}/complete | Complete a non-SCORM resource session |
26
+ | [**postResourceSessionH5pStatement**](PlayerApi.md#postresourcesessionh5pstatement) | **POST** /resource/sessions/{sessionId}/h5p/statements | Record an xAPI statement emitted by the session\'s H5P content |
27
+ | [**putResourceSessionH5pState**](PlayerApi.md#putresourcesessionh5pstate) | **PUT** /resource/sessions/{sessionId}/h5p/state | Save the learner\'s in-progress H5P state for the session |
24
28
  | [**putResourceSessionOverride**](PlayerApi.md#putresourcesessionoverride) | **PUT** /resource/sessions/{sessionId}/override | Override a learner\'s live resource-session progress |
25
29
  | [**setResourceScormValue**](PlayerApi.md#setresourcescormvalue) | **POST** /resource/sessions/{sessionId}/set-value | Store a CMI value in a reusable SCORM resource session |
26
30
  | [**terminateResourceScormSession**](PlayerApi.md#terminateresourcescormsession) | **POST** /resource/sessions/{sessionId}/terminate | Terminate a reusable SCORM resource session |
@@ -636,6 +640,73 @@ No authorization required
636
640
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
637
641
 
638
642
 
643
+ ## getResourceSessionH5pState
644
+
645
+ > H5pState getResourceSessionH5pState(sessionId)
646
+
647
+ Read the learner\'s saved H5P state for the session
648
+
649
+ ### Example
650
+
651
+ ```ts
652
+ import {
653
+ Configuration,
654
+ PlayerApi,
655
+ } from '@easyedu/js-lsm-api';
656
+ import type { GetResourceSessionH5pStateRequest } from '@easyedu/js-lsm-api';
657
+
658
+ async function example() {
659
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
660
+ const api = new PlayerApi();
661
+
662
+ const body = {
663
+ // string
664
+ sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
665
+ } satisfies GetResourceSessionH5pStateRequest;
666
+
667
+ try {
668
+ const data = await api.getResourceSessionH5pState(body);
669
+ console.log(data);
670
+ } catch (error) {
671
+ console.error(error);
672
+ }
673
+ }
674
+
675
+ // Run the test
676
+ example().catch(console.error);
677
+ ```
678
+
679
+ ### Parameters
680
+
681
+
682
+ | Name | Type | Description | Notes |
683
+ |------------- | ------------- | ------------- | -------------|
684
+ | **sessionId** | `string` | | [Defaults to `undefined`] |
685
+
686
+ ### Return type
687
+
688
+ [**H5pState**](H5pState.md)
689
+
690
+ ### Authorization
691
+
692
+ No authorization required
693
+
694
+ ### HTTP request headers
695
+
696
+ - **Content-Type**: Not defined
697
+ - **Accept**: `application/json`
698
+
699
+
700
+ ### HTTP response details
701
+ | Status code | Description | Response headers |
702
+ |-------------|-------------|------------------|
703
+ | **200** | Saved state, or null | - |
704
+ | **400** | The session is not H5P | - |
705
+ | **404** | Resource session not found | - |
706
+
707
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
708
+
709
+
639
710
  ## getResourceSessionList
640
711
 
641
712
  > GetResourceSessionList getResourceSessionList(userId, resourceId, versionId, courseId, courseVersionId, itemId, resourceType, environment, completionStatus, gradeStatus, isCurrent, attemptNumber, createdFrom, createdTo, updatedFrom, updatedTo, hasScormErrors, sortBy, sortDirection, page, pageSize)
@@ -723,7 +794,7 @@ example().catch(console.error);
723
794
  | **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
724
795
  | **courseVersionId** | `string` | | [Optional] [Defaults to `undefined`] |
725
796
  | **itemId** | `string` | | [Optional] [Defaults to `undefined`] |
726
- | **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text] |
797
+ | **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text, cmi5, h5p] |
727
798
  | **environment** | `ResourceSessionEnvironment` | | [Optional] [Defaults to `undefined`] [Enum: live, demo] |
728
799
  | **completionStatus** | `not_attempted`, `in_progress`, `completed` | | [Optional] [Defaults to `undefined`] [Enum: not_attempted, in_progress, completed] |
729
800
  | **gradeStatus** | `ungraded`, `passed`, `failed`, `points_earned`, `percentage_earned`, `not_applicable` | | [Optional] [Defaults to `undefined`] [Enum: ungraded, passed, failed, points_earned, percentage_earned, not_applicable] |
@@ -1193,6 +1264,78 @@ No authorization required
1193
1264
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1194
1265
 
1195
1266
 
1267
+ ## postResourceSessionCmi5Launch
1268
+
1269
+ > Cmi5Launch postResourceSessionCmi5Launch(sessionId, activityId)
1270
+
1271
+ Launch one Assignable Unit of the session\'s cmi5 course
1272
+
1273
+ 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.
1274
+
1275
+ ### Example
1276
+
1277
+ ```ts
1278
+ import {
1279
+ Configuration,
1280
+ PlayerApi,
1281
+ } from '@easyedu/js-lsm-api';
1282
+ import type { PostResourceSessionCmi5LaunchRequest } from '@easyedu/js-lsm-api';
1283
+
1284
+ async function example() {
1285
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
1286
+ const api = new PlayerApi();
1287
+
1288
+ const body = {
1289
+ // string
1290
+ sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
1291
+ // string
1292
+ activityId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
1293
+ } satisfies PostResourceSessionCmi5LaunchRequest;
1294
+
1295
+ try {
1296
+ const data = await api.postResourceSessionCmi5Launch(body);
1297
+ console.log(data);
1298
+ } catch (error) {
1299
+ console.error(error);
1300
+ }
1301
+ }
1302
+
1303
+ // Run the test
1304
+ example().catch(console.error);
1305
+ ```
1306
+
1307
+ ### Parameters
1308
+
1309
+
1310
+ | Name | Type | Description | Notes |
1311
+ |------------- | ------------- | ------------- | -------------|
1312
+ | **sessionId** | `string` | | [Defaults to `undefined`] |
1313
+ | **activityId** | `string` | | [Defaults to `undefined`] |
1314
+
1315
+ ### Return type
1316
+
1317
+ [**Cmi5Launch**](Cmi5Launch.md)
1318
+
1319
+ ### Authorization
1320
+
1321
+ No authorization required
1322
+
1323
+ ### HTTP request headers
1324
+
1325
+ - **Content-Type**: Not defined
1326
+ - **Accept**: `application/json`
1327
+
1328
+
1329
+ ### HTTP response details
1330
+ | Status code | Description | Response headers |
1331
+ |-------------|-------------|------------------|
1332
+ | **200** | Launch details | - |
1333
+ | **400** | The session is not cmi5 | - |
1334
+ | **404** | Resource session or activity not found | - |
1335
+
1336
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1337
+
1338
+
1196
1339
  ## postResourceSessionComplete
1197
1340
 
1198
1341
  > GetResourceSession postResourceSessionComplete(sessionId)
@@ -1260,6 +1403,148 @@ No authorization required
1260
1403
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1261
1404
 
1262
1405
 
1406
+ ## postResourceSessionH5pStatement
1407
+
1408
+ > H5pStatementResult postResourceSessionH5pStatement(sessionId, postH5pStatement)
1409
+
1410
+ Record an xAPI statement emitted by the session\'s H5P content
1411
+
1412
+ 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.
1413
+
1414
+ ### Example
1415
+
1416
+ ```ts
1417
+ import {
1418
+ Configuration,
1419
+ PlayerApi,
1420
+ } from '@easyedu/js-lsm-api';
1421
+ import type { PostResourceSessionH5pStatementRequest } from '@easyedu/js-lsm-api';
1422
+
1423
+ async function example() {
1424
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
1425
+ const api = new PlayerApi();
1426
+
1427
+ const body = {
1428
+ // string
1429
+ sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
1430
+ // PostH5pStatement
1431
+ postH5pStatement: ...,
1432
+ } satisfies PostResourceSessionH5pStatementRequest;
1433
+
1434
+ try {
1435
+ const data = await api.postResourceSessionH5pStatement(body);
1436
+ console.log(data);
1437
+ } catch (error) {
1438
+ console.error(error);
1439
+ }
1440
+ }
1441
+
1442
+ // Run the test
1443
+ example().catch(console.error);
1444
+ ```
1445
+
1446
+ ### Parameters
1447
+
1448
+
1449
+ | Name | Type | Description | Notes |
1450
+ |------------- | ------------- | ------------- | -------------|
1451
+ | **sessionId** | `string` | | [Defaults to `undefined`] |
1452
+ | **postH5pStatement** | [PostH5pStatement](PostH5pStatement.md) | | |
1453
+
1454
+ ### Return type
1455
+
1456
+ [**H5pStatementResult**](H5pStatementResult.md)
1457
+
1458
+ ### Authorization
1459
+
1460
+ No authorization required
1461
+
1462
+ ### HTTP request headers
1463
+
1464
+ - **Content-Type**: `application/json`
1465
+ - **Accept**: `application/json`
1466
+
1467
+
1468
+ ### HTTP response details
1469
+ | Status code | Description | Response headers |
1470
+ |-------------|-------------|------------------|
1471
+ | **200** | The statement was recorded | - |
1472
+ | **400** | The session is not H5P, or the statement is not valid xAPI | - |
1473
+ | **404** | Resource session not found | - |
1474
+
1475
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1476
+
1477
+
1478
+ ## putResourceSessionH5pState
1479
+
1480
+ > putResourceSessionH5pState(sessionId, h5pState)
1481
+
1482
+ Save the learner\'s in-progress H5P state for the session
1483
+
1484
+ ### Example
1485
+
1486
+ ```ts
1487
+ import {
1488
+ Configuration,
1489
+ PlayerApi,
1490
+ } from '@easyedu/js-lsm-api';
1491
+ import type { PutResourceSessionH5pStateRequest } from '@easyedu/js-lsm-api';
1492
+
1493
+ async function example() {
1494
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
1495
+ const api = new PlayerApi();
1496
+
1497
+ const body = {
1498
+ // string
1499
+ sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
1500
+ // H5pState
1501
+ h5pState: ...,
1502
+ } satisfies PutResourceSessionH5pStateRequest;
1503
+
1504
+ try {
1505
+ const data = await api.putResourceSessionH5pState(body);
1506
+ console.log(data);
1507
+ } catch (error) {
1508
+ console.error(error);
1509
+ }
1510
+ }
1511
+
1512
+ // Run the test
1513
+ example().catch(console.error);
1514
+ ```
1515
+
1516
+ ### Parameters
1517
+
1518
+
1519
+ | Name | Type | Description | Notes |
1520
+ |------------- | ------------- | ------------- | -------------|
1521
+ | **sessionId** | `string` | | [Defaults to `undefined`] |
1522
+ | **h5pState** | [H5pState](H5pState.md) | | |
1523
+
1524
+ ### Return type
1525
+
1526
+ `void` (Empty response body)
1527
+
1528
+ ### Authorization
1529
+
1530
+ No authorization required
1531
+
1532
+ ### HTTP request headers
1533
+
1534
+ - **Content-Type**: `application/json`
1535
+ - **Accept**: Not defined
1536
+
1537
+
1538
+ ### HTTP response details
1539
+ | Status code | Description | Response headers |
1540
+ |-------------|-------------|------------------|
1541
+ | **204** | State saved | - |
1542
+ | **400** | The session is not H5P, or the state is too large | - |
1543
+ | **404** | Resource session not found | - |
1544
+
1545
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1546
+
1547
+
1263
1548
  ## putResourceSessionOverride
1264
1549
 
1265
1550
  > GetResourceSession putResourceSessionOverride(sessionId, putResourceSessionOverride)
@@ -0,0 +1,45 @@
1
+
2
+ # PostDispatchCmi5Launch
3
+
4
+ The cmi5 launch a client\'s LMS handed to the launcher page of a cmi5 course export, with the LRS credentials the launcher obtained from the client\'s fetch URL.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `dispatchId` | string
11
+ `endpoint` | string
12
+ `authToken` | string
13
+ `actor` | { [key: string]: any; }
14
+ `registration` | string
15
+ `activityId` | string
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { PostDispatchCmi5Launch } from '@easyedu/js-lsm-api'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "dispatchId": null,
25
+ "endpoint": null,
26
+ "authToken": null,
27
+ "actor": null,
28
+ "registration": null,
29
+ "activityId": null,
30
+ } satisfies PostDispatchCmi5Launch
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as PostDispatchCmi5Launch
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
@@ -0,0 +1,37 @@
1
+
2
+ # PostH5pStatement
3
+
4
+ An xAPI statement emitted by H5P content in the learner\'s browser.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `eventId` | string
11
+ `statement` | { [key: string]: any; }
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { PostH5pStatement } from '@easyedu/js-lsm-api'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "eventId": null,
21
+ "statement": null,
22
+ } satisfies PostH5pStatement
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as PostH5pStatement
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,36 @@
1
+
2
+ # PostLrsCredential
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `scopes` | Set<string>
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PostLrsCredential } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ "scopes": null,
21
+ } satisfies PostLrsCredential
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as PostLrsCredential
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,39 @@
1
+
2
+ # PostLrsCredentialResponse
3
+
4
+ A newly created LRS credential. The secret is returned only once.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `credential` | [LrsCredential](LrsCredential.md)
11
+ `secret` | string
12
+ `endpoint` | string
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { PostLrsCredentialResponse } from '@easyedu/js-lsm-api'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "credential": null,
22
+ "secret": null,
23
+ "endpoint": null,
24
+ } satisfies PostLrsCredentialResponse
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as PostLrsCredentialResponse
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -0,0 +1,36 @@
1
+
2
+ # PutLrsCredential
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `scopes` | Set<string>
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PutLrsCredential } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ "scopes": null,
21
+ } satisfies PutLrsCredential
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as PutLrsCredential
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.140.0",
3
+ "version": "1.141.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -38,6 +38,11 @@ import {
38
38
  GetLibraryQuizSessionFromJSON,
39
39
  GetLibraryQuizSessionToJSON,
40
40
  } from '../models/GetLibraryQuizSession';
41
+ import {
42
+ type PostDispatchCmi5Launch,
43
+ PostDispatchCmi5LaunchFromJSON,
44
+ PostDispatchCmi5LaunchToJSON,
45
+ } from '../models/PostDispatchCmi5Launch';
41
46
  import {
42
47
  type PostDispatchItemLaunch,
43
48
  PostDispatchItemLaunchFromJSON,
@@ -86,6 +91,10 @@ export interface GetDispatchRollupRequest {
86
91
  dispatchPackageId: string;
87
92
  }
88
93
 
94
+ export interface PostDispatchCmi5LaunchRequest {
95
+ postDispatchCmi5Launch: PostDispatchCmi5Launch;
96
+ }
97
+
89
98
  export interface PostDispatchItemLaunchRequest {
90
99
  itemId: string;
91
100
  postDispatchItemLaunch?: PostDispatchItemLaunch;
@@ -303,6 +312,55 @@ export class DispatchApi extends runtime.BaseAPI {
303
312
  return await response.value();
304
313
  }
305
314
 
315
+ /**
316
+ * Creates request options for postDispatchCmi5Launch without sending the request
317
+ */
318
+ async postDispatchCmi5LaunchRequestOpts(requestParameters: PostDispatchCmi5LaunchRequest): Promise<runtime.RequestOpts> {
319
+ if (requestParameters['postDispatchCmi5Launch'] == null) {
320
+ throw new runtime.RequiredError(
321
+ 'postDispatchCmi5Launch',
322
+ 'Required parameter "postDispatchCmi5Launch" was null or undefined when calling postDispatchCmi5Launch().'
323
+ );
324
+ }
325
+
326
+ const queryParameters: any = {};
327
+
328
+ const headerParameters: runtime.HTTPHeaders = {};
329
+
330
+ headerParameters['Content-Type'] = 'application/json';
331
+
332
+
333
+ let urlPath = `/dispatch/cmi5/launch`;
334
+
335
+ return {
336
+ path: urlPath,
337
+ method: 'POST',
338
+ headers: headerParameters,
339
+ query: queryParameters,
340
+ body: PostDispatchCmi5LaunchToJSON(requestParameters['postDispatchCmi5Launch']),
341
+ };
342
+ }
343
+
344
+ /**
345
+ * Called by the launcher page of a cmi5 course export after it has exchanged the client LMS\'s fetch URL for LRS credentials. Applies the export\'s access policy to the client LRS origin, confirms the launch with that LRS when the export restricts origins, and returns the hosted player launch for the learner.
346
+ * Start a hosted-course launch from a cmi5 launch
347
+ */
348
+ async postDispatchCmi5LaunchRaw(requestParameters: PostDispatchCmi5LaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDispatchLaunchResponse>> {
349
+ const requestOptions = await this.postDispatchCmi5LaunchRequestOpts(requestParameters);
350
+ const response = await this.request(requestOptions, initOverrides);
351
+
352
+ return new runtime.JSONApiResponse(response, (jsonValue) => PostDispatchLaunchResponseFromJSON(jsonValue));
353
+ }
354
+
355
+ /**
356
+ * Called by the launcher page of a cmi5 course export after it has exchanged the client LMS\'s fetch URL for LRS credentials. Applies the export\'s access policy to the client LRS origin, confirms the launch with that LRS when the export restricts origins, and returns the hosted player launch for the learner.
357
+ * Start a hosted-course launch from a cmi5 launch
358
+ */
359
+ async postDispatchCmi5Launch(requestParameters: PostDispatchCmi5LaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDispatchLaunchResponse> {
360
+ const response = await this.postDispatchCmi5LaunchRaw(requestParameters, initOverrides);
361
+ return await response.value();
362
+ }
363
+
306
364
  /**
307
365
  * Creates request options for postDispatchItemLaunch without sending the request
308
366
  */