@easyedu/js-lsm-api 1.145.0 → 1.147.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.
- package/.openapi-generator/FILES +2 -10
- package/README.md +5 -11
- package/dist/apis/ContentLibraryApi.d.ts +0 -15
- package/dist/apis/ContentLibraryApi.js +0 -38
- package/dist/apis/LRSApi.d.ts +28 -0
- package/dist/apis/LRSApi.js +76 -0
- package/dist/apis/PlayerApi.d.ts +0 -52
- package/dist/apis/PlayerApi.js +0 -131
- package/dist/esm/apis/ContentLibraryApi.d.ts +0 -15
- package/dist/esm/apis/ContentLibraryApi.js +0 -38
- package/dist/esm/apis/LRSApi.d.ts +28 -0
- package/dist/esm/apis/LRSApi.js +76 -0
- package/dist/esm/apis/PlayerApi.d.ts +0 -52
- package/dist/esm/apis/PlayerApi.js +0 -131
- package/dist/esm/models/LrsRecordingSettings.d.ts +50 -0
- package/dist/esm/models/LrsRecordingSettings.js +55 -0
- package/dist/esm/models/ResourceType.d.ts +0 -1
- package/dist/esm/models/ResourceType.js +1 -2
- package/dist/esm/models/index.d.ts +1 -5
- package/dist/esm/models/index.js +1 -5
- package/dist/models/LrsRecordingSettings.d.ts +50 -0
- package/dist/models/LrsRecordingSettings.js +62 -0
- package/dist/models/ResourceType.d.ts +0 -1
- package/dist/models/ResourceType.js +1 -2
- package/dist/models/index.d.ts +1 -5
- package/dist/models/index.js +1 -5
- package/docs/ContentLibraryApi.md +3 -64
- package/docs/LRSApi.md +130 -4
- package/docs/LrsRecordingSettings.md +41 -0
- package/docs/PlayerApi.md +1 -213
- package/package.json +1 -1
- package/publish.log +2 -2
- package/src/apis/ContentLibraryApi.ts +0 -44
- package/src/apis/LRSApi.ts +93 -0
- package/src/apis/PlayerApi.ts +0 -185
- package/src/models/LrsRecordingSettings.ts +93 -0
- package/src/models/ResourceType.ts +1 -2
- package/src/models/index.ts +1 -5
- package/dist/esm/models/GetResourceTypeList.d.ts +0 -33
- package/dist/esm/models/GetResourceTypeList.js +0 -44
- package/dist/esm/models/H5pState.d.ts +0 -32
- package/dist/esm/models/H5pState.js +0 -43
- package/dist/esm/models/H5pStatementResult.d.ts +0 -44
- package/dist/esm/models/H5pStatementResult.js +0 -49
- package/dist/esm/models/PostH5pStatement.d.ts +0 -40
- package/dist/esm/models/PostH5pStatement.js +0 -47
- package/dist/esm/models/ResourceTypeAvailability.d.ts +0 -39
- package/dist/esm/models/ResourceTypeAvailability.js +0 -48
- package/dist/models/GetResourceTypeList.d.ts +0 -33
- package/dist/models/GetResourceTypeList.js +0 -51
- package/dist/models/H5pState.d.ts +0 -32
- package/dist/models/H5pState.js +0 -50
- package/dist/models/H5pStatementResult.d.ts +0 -44
- package/dist/models/H5pStatementResult.js +0 -56
- package/dist/models/PostH5pStatement.d.ts +0 -40
- package/dist/models/PostH5pStatement.js +0 -54
- package/dist/models/ResourceTypeAvailability.d.ts +0 -39
- package/dist/models/ResourceTypeAvailability.js +0 -55
- package/docs/GetResourceTypeList.md +0 -35
- package/docs/H5pState.md +0 -35
- package/docs/H5pStatementResult.md +0 -39
- package/docs/PostH5pStatement.md +0 -37
- package/docs/ResourceTypeAvailability.md +0 -37
- package/src/models/GetResourceTypeList.ts +0 -74
- package/src/models/H5pState.ts +0 -66
- package/src/models/H5pStatementResult.ts +0 -83
- package/src/models/PostH5pStatement.ts +0 -75
- package/src/models/ResourceTypeAvailability.ts +0 -85
package/docs/PlayerApi.md
CHANGED
|
@@ -13,7 +13,6 @@ 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 |
|
|
17
16
|
| [**getResourceSessionList**](PlayerApi.md#getresourcesessionlist) | **GET** /resource/sessions | List resource sessions for the selected portal |
|
|
18
17
|
| [**getResourceSessionPlayer**](PlayerApi.md#getresourcesessionplayer) | **GET** /resource/sessions/{sessionId}/player | Serve the player for a version-pinned reusable resource session |
|
|
19
18
|
| [**getResourceSessionScormApiLogs**](PlayerApi.md#getresourcesessionscormapilogs) | **GET** /resource/sessions/{sessionId}/api-logs | Get SCORM runtime logs for a resource session |
|
|
@@ -23,8 +22,6 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
23
22
|
| [**postResourceSessionActivityEvent**](PlayerApi.md#postresourcesessionactivityevent) | **POST** /resource/sessions/{sessionId}/activities/{activityId}/events | Record learner activity and update active time |
|
|
24
23
|
| [**postResourceSessionCmi5Launch**](PlayerApi.md#postresourcesessioncmi5launch) | **POST** /resource/sessions/{sessionId}/cmi5/activities/{activityId}/launch | Launch one Assignable Unit of the session\'s cmi5 course |
|
|
25
24
|
| [**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 |
|
|
28
25
|
| [**putResourceSessionOverride**](PlayerApi.md#putresourcesessionoverride) | **PUT** /resource/sessions/{sessionId}/override | Override a learner\'s live resource-session progress |
|
|
29
26
|
| [**setResourceScormValue**](PlayerApi.md#setresourcescormvalue) | **POST** /resource/sessions/{sessionId}/set-value | Store a CMI value in a reusable SCORM resource session |
|
|
30
27
|
| [**terminateResourceScormSession**](PlayerApi.md#terminateresourcescormsession) | **POST** /resource/sessions/{sessionId}/terminate | Terminate a reusable SCORM resource session |
|
|
@@ -640,73 +637,6 @@ No authorization required
|
|
|
640
637
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
641
638
|
|
|
642
639
|
|
|
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
|
-
|
|
710
640
|
## getResourceSessionList
|
|
711
641
|
|
|
712
642
|
> GetResourceSessionList getResourceSessionList(userId, resourceId, versionId, courseId, courseVersionId, itemId, resourceType, environment, completionStatus, gradeStatus, isCurrent, attemptNumber, createdFrom, createdTo, updatedFrom, updatedTo, hasScormErrors, sortBy, sortDirection, page, pageSize)
|
|
@@ -794,7 +724,7 @@ example().catch(console.error);
|
|
|
794
724
|
| **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
795
725
|
| **courseVersionId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
796
726
|
| **itemId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
797
|
-
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text, cmi5
|
|
727
|
+
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text, cmi5] |
|
|
798
728
|
| **environment** | `ResourceSessionEnvironment` | | [Optional] [Defaults to `undefined`] [Enum: live, demo] |
|
|
799
729
|
| **completionStatus** | `not_attempted`, `in_progress`, `completed` | | [Optional] [Defaults to `undefined`] [Enum: not_attempted, in_progress, completed] |
|
|
800
730
|
| **gradeStatus** | `ungraded`, `passed`, `failed`, `points_earned`, `percentage_earned`, `not_applicable` | | [Optional] [Defaults to `undefined`] [Enum: ungraded, passed, failed, points_earned, percentage_earned, not_applicable] |
|
|
@@ -1403,148 +1333,6 @@ No authorization required
|
|
|
1403
1333
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1404
1334
|
|
|
1405
1335
|
|
|
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
|
-
|
|
1548
1336
|
## putResourceSessionOverride
|
|
1549
1337
|
|
|
1550
1338
|
> GetResourceSession putResourceSessionOverride(sessionId, putResourceSessionOverride)
|
package/package.json
CHANGED
package/publish.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
2
2
|
|
|
3
|
-
> @easyedu/js-lsm-api@1.
|
|
3
|
+
> @easyedu/js-lsm-api@1.147.0 prepare
|
|
4
4
|
> npm run build
|
|
5
5
|
|
|
6
6
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
7
7
|
|
|
8
|
-
> @easyedu/js-lsm-api@1.
|
|
8
|
+
> @easyedu/js-lsm-api@1.147.0 build
|
|
9
9
|
> tsc && tsc -p tsconfig.esm.json
|
|
10
10
|
|
|
@@ -48,11 +48,6 @@ import {
|
|
|
48
48
|
GetResourceSessionFromJSON,
|
|
49
49
|
GetResourceSessionToJSON,
|
|
50
50
|
} from '../models/GetResourceSession';
|
|
51
|
-
import {
|
|
52
|
-
type GetResourceTypeList,
|
|
53
|
-
GetResourceTypeListFromJSON,
|
|
54
|
-
GetResourceTypeListToJSON,
|
|
55
|
-
} from '../models/GetResourceTypeList';
|
|
56
51
|
import {
|
|
57
52
|
type GetResourceUsage,
|
|
58
53
|
GetResourceUsageFromJSON,
|
|
@@ -695,45 +690,6 @@ export class ContentLibraryApi extends runtime.BaseAPI {
|
|
|
695
690
|
return await response.value();
|
|
696
691
|
}
|
|
697
692
|
|
|
698
|
-
/**
|
|
699
|
-
* Creates request options for getResourceTypeList without sending the request
|
|
700
|
-
*/
|
|
701
|
-
async getResourceTypeListRequestOpts(): Promise<runtime.RequestOpts> {
|
|
702
|
-
const queryParameters: any = {};
|
|
703
|
-
|
|
704
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
let urlPath = `/content-library/resource-types`;
|
|
708
|
-
|
|
709
|
-
return {
|
|
710
|
-
path: urlPath,
|
|
711
|
-
method: 'GET',
|
|
712
|
-
headers: headerParameters,
|
|
713
|
-
query: queryParameters,
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Clients use this to decide which types to offer when creating or filtering resources. A type can be switched off for the whole platform (H5P is, until it is enabled), in which case creating or uploading it is refused with 403.
|
|
719
|
-
* List the resource types and whether each is available on this platform
|
|
720
|
-
*/
|
|
721
|
-
async getResourceTypeListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetResourceTypeList>> {
|
|
722
|
-
const requestOptions = await this.getResourceTypeListRequestOpts();
|
|
723
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
724
|
-
|
|
725
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceTypeListFromJSON(jsonValue));
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Clients use this to decide which types to offer when creating or filtering resources. A type can be switched off for the whole platform (H5P is, until it is enabled), in which case creating or uploading it is refused with 403.
|
|
730
|
-
* List the resource types and whether each is available on this platform
|
|
731
|
-
*/
|
|
732
|
-
async getResourceTypeList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetResourceTypeList> {
|
|
733
|
-
const response = await this.getResourceTypeListRaw(initOverrides);
|
|
734
|
-
return await response.value();
|
|
735
|
-
}
|
|
736
|
-
|
|
737
693
|
/**
|
|
738
694
|
* Creates request options for getResourceUsage without sending the request
|
|
739
695
|
*/
|
package/src/apis/LRSApi.ts
CHANGED
|
@@ -33,6 +33,11 @@ import {
|
|
|
33
33
|
LrsCredentialFromJSON,
|
|
34
34
|
LrsCredentialToJSON,
|
|
35
35
|
} from '../models/LrsCredential';
|
|
36
|
+
import {
|
|
37
|
+
type LrsRecordingSettings,
|
|
38
|
+
LrsRecordingSettingsFromJSON,
|
|
39
|
+
LrsRecordingSettingsToJSON,
|
|
40
|
+
} from '../models/LrsRecordingSettings';
|
|
36
41
|
import {
|
|
37
42
|
type PostLrsCredential,
|
|
38
43
|
PostLrsCredentialFromJSON,
|
|
@@ -91,6 +96,10 @@ export interface PutLrsCredentialRequest {
|
|
|
91
96
|
putLrsCredential: PutLrsCredential;
|
|
92
97
|
}
|
|
93
98
|
|
|
99
|
+
export interface PutLrsRecordingSettingsRequest {
|
|
100
|
+
lrsRecordingSettings: LrsRecordingSettings;
|
|
101
|
+
}
|
|
102
|
+
|
|
94
103
|
/**
|
|
95
104
|
*
|
|
96
105
|
*/
|
|
@@ -222,6 +231,43 @@ export class LRSApi extends runtime.BaseAPI {
|
|
|
222
231
|
return await response.value();
|
|
223
232
|
}
|
|
224
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Creates request options for getLrsRecordingSettings without sending the request
|
|
236
|
+
*/
|
|
237
|
+
async getLrsRecordingSettingsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
238
|
+
const queryParameters: any = {};
|
|
239
|
+
|
|
240
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
let urlPath = `/lrs/recording-settings`;
|
|
244
|
+
|
|
245
|
+
return {
|
|
246
|
+
path: urlPath,
|
|
247
|
+
method: 'GET',
|
|
248
|
+
headers: headerParameters,
|
|
249
|
+
query: queryParameters,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Read recording preferences for future Edaxu outcomes in the selected portal
|
|
255
|
+
*/
|
|
256
|
+
async getLrsRecordingSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LrsRecordingSettings>> {
|
|
257
|
+
const requestOptions = await this.getLrsRecordingSettingsRequestOpts();
|
|
258
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
259
|
+
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LrsRecordingSettingsFromJSON(jsonValue));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Read recording preferences for future Edaxu outcomes in the selected portal
|
|
265
|
+
*/
|
|
266
|
+
async getLrsRecordingSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LrsRecordingSettings> {
|
|
267
|
+
const response = await this.getLrsRecordingSettingsRaw(initOverrides);
|
|
268
|
+
return await response.value();
|
|
269
|
+
}
|
|
270
|
+
|
|
225
271
|
/**
|
|
226
272
|
* Creates request options for getLrsStatements without sending the request
|
|
227
273
|
*/
|
|
@@ -474,6 +520,53 @@ export class LRSApi extends runtime.BaseAPI {
|
|
|
474
520
|
return await response.value();
|
|
475
521
|
}
|
|
476
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Creates request options for putLrsRecordingSettings without sending the request
|
|
525
|
+
*/
|
|
526
|
+
async putLrsRecordingSettingsRequestOpts(requestParameters: PutLrsRecordingSettingsRequest): Promise<runtime.RequestOpts> {
|
|
527
|
+
if (requestParameters['lrsRecordingSettings'] == null) {
|
|
528
|
+
throw new runtime.RequiredError(
|
|
529
|
+
'lrsRecordingSettings',
|
|
530
|
+
'Required parameter "lrsRecordingSettings" was null or undefined when calling putLrsRecordingSettings().'
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const queryParameters: any = {};
|
|
535
|
+
|
|
536
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
537
|
+
|
|
538
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
let urlPath = `/lrs/recording-settings`;
|
|
542
|
+
|
|
543
|
+
return {
|
|
544
|
+
path: urlPath,
|
|
545
|
+
method: 'PUT',
|
|
546
|
+
headers: headerParameters,
|
|
547
|
+
query: queryParameters,
|
|
548
|
+
body: LrsRecordingSettingsToJSON(requestParameters['lrsRecordingSettings']),
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Replace recording preferences for future Edaxu outcomes in the selected portal
|
|
554
|
+
*/
|
|
555
|
+
async putLrsRecordingSettingsRaw(requestParameters: PutLrsRecordingSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LrsRecordingSettings>> {
|
|
556
|
+
const requestOptions = await this.putLrsRecordingSettingsRequestOpts(requestParameters);
|
|
557
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
558
|
+
|
|
559
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LrsRecordingSettingsFromJSON(jsonValue));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Replace recording preferences for future Edaxu outcomes in the selected portal
|
|
564
|
+
*/
|
|
565
|
+
async putLrsRecordingSettings(requestParameters: PutLrsRecordingSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LrsRecordingSettings> {
|
|
566
|
+
const response = await this.putLrsRecordingSettingsRaw(requestParameters, initOverrides);
|
|
567
|
+
return await response.value();
|
|
568
|
+
}
|
|
569
|
+
|
|
477
570
|
}
|
|
478
571
|
|
|
479
572
|
/**
|
package/src/apis/PlayerApi.ts
CHANGED
|
@@ -58,21 +58,6 @@ import {
|
|
|
58
58
|
GetResourceSessionScormDataFromJSON,
|
|
59
59
|
GetResourceSessionScormDataToJSON,
|
|
60
60
|
} from '../models/GetResourceSessionScormData';
|
|
61
|
-
import {
|
|
62
|
-
type H5pState,
|
|
63
|
-
H5pStateFromJSON,
|
|
64
|
-
H5pStateToJSON,
|
|
65
|
-
} from '../models/H5pState';
|
|
66
|
-
import {
|
|
67
|
-
type H5pStatementResult,
|
|
68
|
-
H5pStatementResultFromJSON,
|
|
69
|
-
H5pStatementResultToJSON,
|
|
70
|
-
} from '../models/H5pStatementResult';
|
|
71
|
-
import {
|
|
72
|
-
type PostH5pStatement,
|
|
73
|
-
PostH5pStatementFromJSON,
|
|
74
|
-
PostH5pStatementToJSON,
|
|
75
|
-
} from '../models/PostH5pStatement';
|
|
76
61
|
import {
|
|
77
62
|
type PostResourceSessionActivityEvent,
|
|
78
63
|
PostResourceSessionActivityEventFromJSON,
|
|
@@ -176,10 +161,6 @@ export interface GetResourceSessionDiagnosticsRequest {
|
|
|
176
161
|
sessionId: string;
|
|
177
162
|
}
|
|
178
163
|
|
|
179
|
-
export interface GetResourceSessionH5pStateRequest {
|
|
180
|
-
sessionId: string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
164
|
export interface GetResourceSessionListRequest {
|
|
184
165
|
userId?: string;
|
|
185
166
|
resourceId?: string;
|
|
@@ -248,16 +229,6 @@ export interface PostResourceSessionCompleteRequest {
|
|
|
248
229
|
sessionId: string;
|
|
249
230
|
}
|
|
250
231
|
|
|
251
|
-
export interface PostResourceSessionH5pStatementRequest {
|
|
252
|
-
sessionId: string;
|
|
253
|
-
postH5pStatement: PostH5pStatement;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export interface PutResourceSessionH5pStateRequest {
|
|
257
|
-
sessionId: string;
|
|
258
|
-
h5pState: H5pState;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
232
|
export interface PutResourceSessionOverrideRequest {
|
|
262
233
|
sessionId: string;
|
|
263
234
|
putResourceSessionOverride: PutResourceSessionOverride;
|
|
@@ -731,51 +702,6 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
731
702
|
return await response.value();
|
|
732
703
|
}
|
|
733
704
|
|
|
734
|
-
/**
|
|
735
|
-
* Creates request options for getResourceSessionH5pState without sending the request
|
|
736
|
-
*/
|
|
737
|
-
async getResourceSessionH5pStateRequestOpts(requestParameters: GetResourceSessionH5pStateRequest): Promise<runtime.RequestOpts> {
|
|
738
|
-
if (requestParameters['sessionId'] == null) {
|
|
739
|
-
throw new runtime.RequiredError(
|
|
740
|
-
'sessionId',
|
|
741
|
-
'Required parameter "sessionId" was null or undefined when calling getResourceSessionH5pState().'
|
|
742
|
-
);
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
const queryParameters: any = {};
|
|
746
|
-
|
|
747
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
let urlPath = `/resource/sessions/{sessionId}/h5p/state`;
|
|
751
|
-
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
752
|
-
|
|
753
|
-
return {
|
|
754
|
-
path: urlPath,
|
|
755
|
-
method: 'GET',
|
|
756
|
-
headers: headerParameters,
|
|
757
|
-
query: queryParameters,
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Read the learner\'s saved H5P state for the session
|
|
763
|
-
*/
|
|
764
|
-
async getResourceSessionH5pStateRaw(requestParameters: GetResourceSessionH5pStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<H5pState>> {
|
|
765
|
-
const requestOptions = await this.getResourceSessionH5pStateRequestOpts(requestParameters);
|
|
766
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
767
|
-
|
|
768
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => H5pStateFromJSON(jsonValue));
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Read the learner\'s saved H5P state for the session
|
|
773
|
-
*/
|
|
774
|
-
async getResourceSessionH5pState(requestParameters: GetResourceSessionH5pStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<H5pState> {
|
|
775
|
-
const response = await this.getResourceSessionH5pStateRaw(requestParameters, initOverrides);
|
|
776
|
-
return await response.value();
|
|
777
|
-
}
|
|
778
|
-
|
|
779
705
|
/**
|
|
780
706
|
* Creates request options for getResourceSessionList without sending the request
|
|
781
707
|
*/
|
|
@@ -1331,117 +1257,6 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
1331
1257
|
return await response.value();
|
|
1332
1258
|
}
|
|
1333
1259
|
|
|
1334
|
-
/**
|
|
1335
|
-
* Creates request options for postResourceSessionH5pStatement without sending the request
|
|
1336
|
-
*/
|
|
1337
|
-
async postResourceSessionH5pStatementRequestOpts(requestParameters: PostResourceSessionH5pStatementRequest): Promise<runtime.RequestOpts> {
|
|
1338
|
-
if (requestParameters['sessionId'] == null) {
|
|
1339
|
-
throw new runtime.RequiredError(
|
|
1340
|
-
'sessionId',
|
|
1341
|
-
'Required parameter "sessionId" was null or undefined when calling postResourceSessionH5pStatement().'
|
|
1342
|
-
);
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
if (requestParameters['postH5pStatement'] == null) {
|
|
1346
|
-
throw new runtime.RequiredError(
|
|
1347
|
-
'postH5pStatement',
|
|
1348
|
-
'Required parameter "postH5pStatement" was null or undefined when calling postResourceSessionH5pStatement().'
|
|
1349
|
-
);
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
const queryParameters: any = {};
|
|
1353
|
-
|
|
1354
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1355
|
-
|
|
1356
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
let urlPath = `/resource/sessions/{sessionId}/h5p/statements`;
|
|
1360
|
-
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1361
|
-
|
|
1362
|
-
return {
|
|
1363
|
-
path: urlPath,
|
|
1364
|
-
method: 'POST',
|
|
1365
|
-
headers: headerParameters,
|
|
1366
|
-
query: queryParameters,
|
|
1367
|
-
body: PostH5pStatementToJSON(requestParameters['postH5pStatement']),
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1372
|
-
* 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.
|
|
1373
|
-
* Record an xAPI statement emitted by the session\'s H5P content
|
|
1374
|
-
*/
|
|
1375
|
-
async postResourceSessionH5pStatementRaw(requestParameters: PostResourceSessionH5pStatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<H5pStatementResult>> {
|
|
1376
|
-
const requestOptions = await this.postResourceSessionH5pStatementRequestOpts(requestParameters);
|
|
1377
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1378
|
-
|
|
1379
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => H5pStatementResultFromJSON(jsonValue));
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
/**
|
|
1383
|
-
* 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.
|
|
1384
|
-
* Record an xAPI statement emitted by the session\'s H5P content
|
|
1385
|
-
*/
|
|
1386
|
-
async postResourceSessionH5pStatement(requestParameters: PostResourceSessionH5pStatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<H5pStatementResult> {
|
|
1387
|
-
const response = await this.postResourceSessionH5pStatementRaw(requestParameters, initOverrides);
|
|
1388
|
-
return await response.value();
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
/**
|
|
1392
|
-
* Creates request options for putResourceSessionH5pState without sending the request
|
|
1393
|
-
*/
|
|
1394
|
-
async putResourceSessionH5pStateRequestOpts(requestParameters: PutResourceSessionH5pStateRequest): Promise<runtime.RequestOpts> {
|
|
1395
|
-
if (requestParameters['sessionId'] == null) {
|
|
1396
|
-
throw new runtime.RequiredError(
|
|
1397
|
-
'sessionId',
|
|
1398
|
-
'Required parameter "sessionId" was null or undefined when calling putResourceSessionH5pState().'
|
|
1399
|
-
);
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
if (requestParameters['h5pState'] == null) {
|
|
1403
|
-
throw new runtime.RequiredError(
|
|
1404
|
-
'h5pState',
|
|
1405
|
-
'Required parameter "h5pState" was null or undefined when calling putResourceSessionH5pState().'
|
|
1406
|
-
);
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
const queryParameters: any = {};
|
|
1410
|
-
|
|
1411
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1412
|
-
|
|
1413
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
let urlPath = `/resource/sessions/{sessionId}/h5p/state`;
|
|
1417
|
-
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1418
|
-
|
|
1419
|
-
return {
|
|
1420
|
-
path: urlPath,
|
|
1421
|
-
method: 'PUT',
|
|
1422
|
-
headers: headerParameters,
|
|
1423
|
-
query: queryParameters,
|
|
1424
|
-
body: H5pStateToJSON(requestParameters['h5pState']),
|
|
1425
|
-
};
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* Save the learner\'s in-progress H5P state for the session
|
|
1430
|
-
*/
|
|
1431
|
-
async putResourceSessionH5pStateRaw(requestParameters: PutResourceSessionH5pStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1432
|
-
const requestOptions = await this.putResourceSessionH5pStateRequestOpts(requestParameters);
|
|
1433
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1434
|
-
|
|
1435
|
-
return new runtime.VoidApiResponse(response);
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
/**
|
|
1439
|
-
* Save the learner\'s in-progress H5P state for the session
|
|
1440
|
-
*/
|
|
1441
|
-
async putResourceSessionH5pState(requestParameters: PutResourceSessionH5pStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1442
|
-
await this.putResourceSessionH5pStateRaw(requestParameters, initOverrides);
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
1260
|
/**
|
|
1446
1261
|
* Creates request options for putResourceSessionOverride without sending the request
|
|
1447
1262
|
*/
|