@easyedu/js-lsm-api 1.99.0 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +12 -0
- package/README.md +13 -2
- package/dist/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/apis/CourseApi.d.ts +60 -0
- package/dist/apis/CourseApi.js +167 -0
- package/dist/apis/PlayerApi.d.ts +17 -0
- package/dist/apis/PlayerApi.js +45 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/esm/apis/CourseApi.d.ts +60 -0
- package/dist/esm/apis/CourseApi.js +167 -0
- package/dist/esm/apis/PlayerApi.d.ts +17 -0
- package/dist/esm/apis/PlayerApi.js +45 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/esm/models/GetAttemptAllowance.js +75 -0
- package/dist/esm/models/PostClearSessions.d.ts +32 -0
- package/dist/esm/models/PostClearSessions.js +43 -0
- package/dist/esm/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/esm/models/PostClearSessionsResponse.js +51 -0
- package/dist/esm/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/esm/models/PutAttemptAllowance.js +47 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.js +55 -0
- package/dist/esm/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/esm/models/PutResourceSessionOverride.js +66 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/models/GetAttemptAllowance.js +82 -0
- package/dist/models/PostClearSessions.d.ts +32 -0
- package/dist/models/PostClearSessions.js +50 -0
- package/dist/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/models/PostClearSessionsResponse.js +58 -0
- package/dist/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/models/PutAttemptAllowance.js +54 -0
- package/dist/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/models/PutLibraryQuizSessionOverride.js +63 -0
- package/dist/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/models/PutResourceSessionOverride.js +74 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/docs/ContentLibraryQuizApi.md +71 -0
- package/docs/CourseApi.md +236 -0
- package/docs/GetAttemptAllowance.md +51 -0
- package/docs/PlayerApi.md +71 -0
- package/docs/PostClearSessions.md +34 -0
- package/docs/PostClearSessionsResponse.md +38 -0
- package/docs/PutAttemptAllowance.md +36 -0
- package/docs/PutLibraryQuizSessionOverride.md +41 -0
- package/docs/PutResourceSessionOverride.md +41 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryQuizApi.ts +65 -0
- package/src/apis/CourseApi.ts +270 -0
- package/src/apis/PlayerApi.ts +65 -0
- package/src/models/GetAttemptAllowance.ts +138 -0
- package/src/models/PostClearSessions.ts +66 -0
- package/src/models/PostClearSessionsResponse.ts +84 -0
- package/src/models/PutAttemptAllowance.ts +75 -0
- package/src/models/PutLibraryQuizSessionOverride.ts +100 -0
- package/src/models/PutResourceSessionOverride.ts +113 -0
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PutResourceSessionOverrideGradeStatusEnum = exports.PutResourceSessionOverrideCompletionStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfPutResourceSessionOverride = instanceOfPutResourceSessionOverride;
|
|
18
|
+
exports.PutResourceSessionOverrideFromJSON = PutResourceSessionOverrideFromJSON;
|
|
19
|
+
exports.PutResourceSessionOverrideFromJSONTyped = PutResourceSessionOverrideFromJSONTyped;
|
|
20
|
+
exports.PutResourceSessionOverrideToJSON = PutResourceSessionOverrideToJSON;
|
|
21
|
+
exports.PutResourceSessionOverrideToJSONTyped = PutResourceSessionOverrideToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.PutResourceSessionOverrideCompletionStatusEnum = {
|
|
26
|
+
Completed: 'completed'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
exports.PutResourceSessionOverrideGradeStatusEnum = {
|
|
32
|
+
Ungraded: 'ungraded',
|
|
33
|
+
Passed: 'passed',
|
|
34
|
+
Failed: 'failed',
|
|
35
|
+
PointsEarned: 'points_earned',
|
|
36
|
+
PercentageEarned: 'percentage_earned',
|
|
37
|
+
NotApplicable: 'not_applicable'
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the PutResourceSessionOverride interface.
|
|
41
|
+
*/
|
|
42
|
+
function instanceOfPutResourceSessionOverride(value) {
|
|
43
|
+
if (!('reason' in value) || value['reason'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
function PutResourceSessionOverrideFromJSON(json) {
|
|
48
|
+
return PutResourceSessionOverrideFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function PutResourceSessionOverrideFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'completionStatus': json['completion_status'] == null ? undefined : json['completion_status'],
|
|
56
|
+
'gradeStatus': json['grade_status'] == null ? undefined : json['grade_status'],
|
|
57
|
+
'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
|
|
58
|
+
'reason': json['reason'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function PutResourceSessionOverrideToJSON(json) {
|
|
62
|
+
return PutResourceSessionOverrideToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function PutResourceSessionOverrideToJSONTyped(value, ignoreDiscriminator = false) {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'completion_status': value['completionStatus'],
|
|
70
|
+
'grade_status': value['gradeStatus'],
|
|
71
|
+
'score_raw': value['scoreRaw'],
|
|
72
|
+
'reason': value['reason'],
|
|
73
|
+
};
|
|
74
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export * from './EmailTemplateDefinition';
|
|
|
29
29
|
export * from './EmailTemplateScope';
|
|
30
30
|
export * from './EmailTemplateVariable';
|
|
31
31
|
export * from './EmailTemplateVersion';
|
|
32
|
+
export * from './GetAttemptAllowance';
|
|
32
33
|
export * from './GetCertificateAssetUpload';
|
|
33
34
|
export * from './GetCertificateConfigList';
|
|
34
35
|
export * from './GetCertificateEventList';
|
|
@@ -153,6 +154,8 @@ export * from './PostCertificateLifecycleAction';
|
|
|
153
154
|
export * from './PostCertificateTemplate';
|
|
154
155
|
export * from './PostCertificateTemplateClone';
|
|
155
156
|
export * from './PostCertificateTemplatePreview';
|
|
157
|
+
export * from './PostClearSessions';
|
|
158
|
+
export * from './PostClearSessionsResponse';
|
|
156
159
|
export * from './PostConversation';
|
|
157
160
|
export * from './PostConversationResponse';
|
|
158
161
|
export * from './PostCourse';
|
|
@@ -202,6 +205,7 @@ export * from './PostSignupRequest';
|
|
|
202
205
|
export * from './PostSignupRequestResponse';
|
|
203
206
|
export * from './PostSupportTicket';
|
|
204
207
|
export * from './PostSupportTicketComment';
|
|
208
|
+
export * from './PutAttemptAllowance';
|
|
205
209
|
export * from './PutBadgeIssuer';
|
|
206
210
|
export * from './PutCertificateConfig';
|
|
207
211
|
export * from './PutCertificateTemplate';
|
|
@@ -218,6 +222,7 @@ export * from './PutLibraryQuizCriteria';
|
|
|
218
222
|
export * from './PutLibraryQuizQuestions';
|
|
219
223
|
export * from './PutLibraryQuizSessionAnswer';
|
|
220
224
|
export * from './PutLibraryQuizSessionGrade';
|
|
225
|
+
export * from './PutLibraryQuizSessionOverride';
|
|
221
226
|
export * from './PutLibraryQuizVersion';
|
|
222
227
|
export * from './PutPortalBranding';
|
|
223
228
|
export * from './PutPortalSublicense';
|
|
@@ -225,6 +230,7 @@ export * from './PutPortalUserFieldValues';
|
|
|
225
230
|
export * from './PutQuestion';
|
|
226
231
|
export * from './PutQuestionAnswerChoicesInner';
|
|
227
232
|
export * from './PutResource';
|
|
233
|
+
export * from './PutResourceSessionOverride';
|
|
228
234
|
export * from './PutResourceVersion';
|
|
229
235
|
export * from './PutRole';
|
|
230
236
|
export * from './PutRolePermissions';
|
package/dist/models/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __exportStar(require("./EmailTemplateDefinition"), exports);
|
|
|
47
47
|
__exportStar(require("./EmailTemplateScope"), exports);
|
|
48
48
|
__exportStar(require("./EmailTemplateVariable"), exports);
|
|
49
49
|
__exportStar(require("./EmailTemplateVersion"), exports);
|
|
50
|
+
__exportStar(require("./GetAttemptAllowance"), exports);
|
|
50
51
|
__exportStar(require("./GetCertificateAssetUpload"), exports);
|
|
51
52
|
__exportStar(require("./GetCertificateConfigList"), exports);
|
|
52
53
|
__exportStar(require("./GetCertificateEventList"), exports);
|
|
@@ -171,6 +172,8 @@ __exportStar(require("./PostCertificateLifecycleAction"), exports);
|
|
|
171
172
|
__exportStar(require("./PostCertificateTemplate"), exports);
|
|
172
173
|
__exportStar(require("./PostCertificateTemplateClone"), exports);
|
|
173
174
|
__exportStar(require("./PostCertificateTemplatePreview"), exports);
|
|
175
|
+
__exportStar(require("./PostClearSessions"), exports);
|
|
176
|
+
__exportStar(require("./PostClearSessionsResponse"), exports);
|
|
174
177
|
__exportStar(require("./PostConversation"), exports);
|
|
175
178
|
__exportStar(require("./PostConversationResponse"), exports);
|
|
176
179
|
__exportStar(require("./PostCourse"), exports);
|
|
@@ -220,6 +223,7 @@ __exportStar(require("./PostSignupRequest"), exports);
|
|
|
220
223
|
__exportStar(require("./PostSignupRequestResponse"), exports);
|
|
221
224
|
__exportStar(require("./PostSupportTicket"), exports);
|
|
222
225
|
__exportStar(require("./PostSupportTicketComment"), exports);
|
|
226
|
+
__exportStar(require("./PutAttemptAllowance"), exports);
|
|
223
227
|
__exportStar(require("./PutBadgeIssuer"), exports);
|
|
224
228
|
__exportStar(require("./PutCertificateConfig"), exports);
|
|
225
229
|
__exportStar(require("./PutCertificateTemplate"), exports);
|
|
@@ -236,6 +240,7 @@ __exportStar(require("./PutLibraryQuizCriteria"), exports);
|
|
|
236
240
|
__exportStar(require("./PutLibraryQuizQuestions"), exports);
|
|
237
241
|
__exportStar(require("./PutLibraryQuizSessionAnswer"), exports);
|
|
238
242
|
__exportStar(require("./PutLibraryQuizSessionGrade"), exports);
|
|
243
|
+
__exportStar(require("./PutLibraryQuizSessionOverride"), exports);
|
|
239
244
|
__exportStar(require("./PutLibraryQuizVersion"), exports);
|
|
240
245
|
__exportStar(require("./PutPortalBranding"), exports);
|
|
241
246
|
__exportStar(require("./PutPortalSublicense"), exports);
|
|
@@ -243,6 +248,7 @@ __exportStar(require("./PutPortalUserFieldValues"), exports);
|
|
|
243
248
|
__exportStar(require("./PutQuestion"), exports);
|
|
244
249
|
__exportStar(require("./PutQuestionAnswerChoicesInner"), exports);
|
|
245
250
|
__exportStar(require("./PutResource"), exports);
|
|
251
|
+
__exportStar(require("./PutResourceSessionOverride"), exports);
|
|
246
252
|
__exportStar(require("./PutResourceVersion"), exports);
|
|
247
253
|
__exportStar(require("./PutRole"), exports);
|
|
248
254
|
__exportStar(require("./PutRolePermissions"), exports);
|
|
@@ -29,6 +29,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
29
29
|
| [**putLibraryQuizQuestions**](ContentLibraryQuizApi.md#putlibraryquizquestions) | **PUT** /content-library/quizzes/{quizId}/versions/{versionId}/questions | Replace manual questions on a draft quiz version |
|
|
30
30
|
| [**putLibraryQuizSessionAnswer**](ContentLibraryQuizApi.md#putlibraryquizsessionanswer) | **PUT** /quiz/sessions/{sessionId}/answers/{sessionQuestionId} | Save an answer using version-snapshot identifiers |
|
|
31
31
|
| [**putLibraryQuizSessionGrade**](ContentLibraryQuizApi.md#putlibraryquizsessiongrade) | **PUT** /quiz/sessions/{sessionId}/answers/{sessionQuestionId}/grade | Manually grade a reusable quiz session answer |
|
|
32
|
+
| [**putLibraryQuizSessionOverride**](ContentLibraryQuizApi.md#putlibraryquizsessionoverride) | **PUT** /quiz/sessions/{sessionId}/override | Override a learner\'s live quiz-session progress |
|
|
32
33
|
| [**putLibraryQuizVersion**](ContentLibraryQuizApi.md#putlibraryquizversion) | **PUT** /content-library/quizzes/{quizId}/versions/{versionId} | Edit a draft reusable quiz version |
|
|
33
34
|
|
|
34
35
|
|
|
@@ -1780,6 +1781,76 @@ No authorization required
|
|
|
1780
1781
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1781
1782
|
|
|
1782
1783
|
|
|
1784
|
+
## putLibraryQuizSessionOverride
|
|
1785
|
+
|
|
1786
|
+
> GetLibraryQuizSession putLibraryQuizSessionOverride(sessionId, putLibraryQuizSessionOverride)
|
|
1787
|
+
|
|
1788
|
+
Override a learner\'s live quiz-session progress
|
|
1789
|
+
|
|
1790
|
+
### Example
|
|
1791
|
+
|
|
1792
|
+
```ts
|
|
1793
|
+
import {
|
|
1794
|
+
Configuration,
|
|
1795
|
+
ContentLibraryQuizApi,
|
|
1796
|
+
} from '@easyedu/js-lsm-api';
|
|
1797
|
+
import type { PutLibraryQuizSessionOverrideRequest } from '@easyedu/js-lsm-api';
|
|
1798
|
+
|
|
1799
|
+
async function example() {
|
|
1800
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1801
|
+
const api = new ContentLibraryQuizApi();
|
|
1802
|
+
|
|
1803
|
+
const body = {
|
|
1804
|
+
// string
|
|
1805
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1806
|
+
// PutLibraryQuizSessionOverride
|
|
1807
|
+
putLibraryQuizSessionOverride: ...,
|
|
1808
|
+
} satisfies PutLibraryQuizSessionOverrideRequest;
|
|
1809
|
+
|
|
1810
|
+
try {
|
|
1811
|
+
const data = await api.putLibraryQuizSessionOverride(body);
|
|
1812
|
+
console.log(data);
|
|
1813
|
+
} catch (error) {
|
|
1814
|
+
console.error(error);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
// Run the test
|
|
1819
|
+
example().catch(console.error);
|
|
1820
|
+
```
|
|
1821
|
+
|
|
1822
|
+
### Parameters
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
| Name | Type | Description | Notes |
|
|
1826
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1827
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1828
|
+
| **putLibraryQuizSessionOverride** | [PutLibraryQuizSessionOverride](PutLibraryQuizSessionOverride.md) | | |
|
|
1829
|
+
|
|
1830
|
+
### Return type
|
|
1831
|
+
|
|
1832
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
1833
|
+
|
|
1834
|
+
### Authorization
|
|
1835
|
+
|
|
1836
|
+
No authorization required
|
|
1837
|
+
|
|
1838
|
+
### HTTP request headers
|
|
1839
|
+
|
|
1840
|
+
- **Content-Type**: `application/json`
|
|
1841
|
+
- **Accept**: `application/json`
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
### HTTP response details
|
|
1845
|
+
| Status code | Description | Response headers |
|
|
1846
|
+
|-------------|-------------|------------------|
|
|
1847
|
+
| **200** | Updated quiz session | - |
|
|
1848
|
+
| **400** | Invalid override values | - |
|
|
1849
|
+
| **404** | Quiz session not found | - |
|
|
1850
|
+
|
|
1851
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1852
|
+
|
|
1853
|
+
|
|
1783
1854
|
## putLibraryQuizVersion
|
|
1784
1855
|
|
|
1785
1856
|
> GetLibraryQuizVersion putLibraryQuizVersion(quizId, versionId, putLibraryQuizVersion)
|
package/docs/CourseApi.md
CHANGED
|
@@ -17,6 +17,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
17
17
|
| [**getCourseEnrollments**](CourseApi.md#getcourseenrollments) | **GET** /courses/{courseId}/enrollments | Get course enrollments |
|
|
18
18
|
| [**getCourseExport**](CourseApi.md#getcourseexport) | **GET** /courses/{courseId}/exports/{exportId} | Get details of a specific SCORM export |
|
|
19
19
|
| [**getCourseExports**](CourseApi.md#getcourseexports) | **GET** /courses/{courseId}/exports | List all SCORM exports for a course |
|
|
20
|
+
| [**getCourseItemLearnerAttemptAllowance**](CourseApi.md#getcourseitemlearnerattemptallowance) | **GET** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/attempt-allowance | Get a learner\'s effective attempt limit for a course item |
|
|
20
21
|
| [**getCourseList**](CourseApi.md#getcourselist) | **GET** /courses | get course list |
|
|
21
22
|
| [**getCourseVersion**](CourseApi.md#getcourseversion) | **GET** /courses/{courseId}/versions/{courseVersionId} | Get one immutable course version or preview the owned draft |
|
|
22
23
|
| [**getCourseVersionItemLaunch**](CourseApi.md#getcourseversionitemlaunch) | **GET** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/launch | Resolve the exact immutable resource launch selected by a course version |
|
|
@@ -28,6 +29,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
28
29
|
| [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment |
|
|
29
30
|
| [**postCourseExport**](CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course |
|
|
30
31
|
| [**postCourseImageUpload**](CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image |
|
|
32
|
+
| [**postCourseItemLearnerSessionsClear**](CourseApi.md#postcourseitemlearnersessionsclear) | **POST** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/sessions/clear | Clear all live sessions for a learner and course item |
|
|
31
33
|
| [**postCourseResume**](CourseApi.md#postcourseresume) | **POST** /courses/{courseId}/resume | Resume the current learner\'s progress in a course |
|
|
32
34
|
| [**postCourseVersionItem**](CourseApi.md#postcourseversionitem) | **POST** /courses/{courseId}/draft/sections/{sectionId}/items | Add a pinned library resource or reusable quiz to a draft section |
|
|
33
35
|
| [**postCourseVersionItemSession**](CourseApi.md#postcourseversionitemsession) | **POST** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/sessions | Start or resume a version-pinned resource attempt |
|
|
@@ -36,6 +38,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
36
38
|
| [**postCourseVersionSectionDuplicate**](CourseApi.md#postcourseversionsectionduplicate) | **POST** /courses/{courseId}/draft/sections/{sectionId}/duplicate | Recursively duplicate a draft section and reuse its pinned library items |
|
|
37
39
|
| [**putCourse**](CourseApi.md#putcourse) | **PUT** /courses/{courseId} | Update a course by id |
|
|
38
40
|
| [**putCourseEnrollment**](CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update a course enrollment |
|
|
41
|
+
| [**putCourseItemLearnerAttemptAllowance**](CourseApi.md#putcourseitemlearnerattemptallowance) | **PUT** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/attempt-allowance | Set extra attempts for a learner on a course item |
|
|
39
42
|
| [**putCourseVersionItem**](CourseApi.md#putcourseversionitem) | **PUT** /courses/{courseId}/draft/sections/{sectionId}/items/{itemId} | Update a draft placement; use the outline move endpoint to change its parent or position |
|
|
40
43
|
| [**putCourseVersionOutlineEntryMove**](CourseApi.md#putcourseversionoutlineentrymove) | **PUT** /courses/{courseId}/draft/outline/move | Move a section or item to a new parent and sibling position |
|
|
41
44
|
| [**putCourseVersionSection**](CourseApi.md#putcourseversionsection) | **PUT** /courses/{courseId}/draft/sections/{sectionId} | Update a draft section |
|
|
@@ -948,6 +951,81 @@ No authorization required
|
|
|
948
951
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
949
952
|
|
|
950
953
|
|
|
954
|
+
## getCourseItemLearnerAttemptAllowance
|
|
955
|
+
|
|
956
|
+
> GetAttemptAllowance getCourseItemLearnerAttemptAllowance(courseId, courseVersionId, itemId, userId)
|
|
957
|
+
|
|
958
|
+
Get a learner\'s effective attempt limit for a course item
|
|
959
|
+
|
|
960
|
+
### Example
|
|
961
|
+
|
|
962
|
+
```ts
|
|
963
|
+
import {
|
|
964
|
+
Configuration,
|
|
965
|
+
CourseApi,
|
|
966
|
+
} from '@easyedu/js-lsm-api';
|
|
967
|
+
import type { GetCourseItemLearnerAttemptAllowanceRequest } from '@easyedu/js-lsm-api';
|
|
968
|
+
|
|
969
|
+
async function example() {
|
|
970
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
971
|
+
const api = new CourseApi();
|
|
972
|
+
|
|
973
|
+
const body = {
|
|
974
|
+
// string
|
|
975
|
+
courseId: courseId_example,
|
|
976
|
+
// string
|
|
977
|
+
courseVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
978
|
+
// string
|
|
979
|
+
itemId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
980
|
+
// string | External learner ID.
|
|
981
|
+
userId: userId_example,
|
|
982
|
+
} satisfies GetCourseItemLearnerAttemptAllowanceRequest;
|
|
983
|
+
|
|
984
|
+
try {
|
|
985
|
+
const data = await api.getCourseItemLearnerAttemptAllowance(body);
|
|
986
|
+
console.log(data);
|
|
987
|
+
} catch (error) {
|
|
988
|
+
console.error(error);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// Run the test
|
|
993
|
+
example().catch(console.error);
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
### Parameters
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
| Name | Type | Description | Notes |
|
|
1000
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1001
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1002
|
+
| **courseVersionId** | `string` | | [Defaults to `undefined`] |
|
|
1003
|
+
| **itemId** | `string` | | [Defaults to `undefined`] |
|
|
1004
|
+
| **userId** | `string` | External learner ID. | [Defaults to `undefined`] |
|
|
1005
|
+
|
|
1006
|
+
### Return type
|
|
1007
|
+
|
|
1008
|
+
[**GetAttemptAllowance**](GetAttemptAllowance.md)
|
|
1009
|
+
|
|
1010
|
+
### Authorization
|
|
1011
|
+
|
|
1012
|
+
No authorization required
|
|
1013
|
+
|
|
1014
|
+
### HTTP request headers
|
|
1015
|
+
|
|
1016
|
+
- **Content-Type**: Not defined
|
|
1017
|
+
- **Accept**: `application/json`
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
### HTTP response details
|
|
1021
|
+
| Status code | Description | Response headers |
|
|
1022
|
+
|-------------|-------------|------------------|
|
|
1023
|
+
| **200** | Effective attempt allowance | - |
|
|
1024
|
+
| **404** | Course version item or learner not found | - |
|
|
1025
|
+
|
|
1026
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1027
|
+
|
|
1028
|
+
|
|
951
1029
|
## getCourseList
|
|
952
1030
|
|
|
953
1031
|
> GetCourseList getCourseList(page, pageSize, enrolled, search, recentActivitySince)
|
|
@@ -1711,6 +1789,85 @@ No authorization required
|
|
|
1711
1789
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1712
1790
|
|
|
1713
1791
|
|
|
1792
|
+
## postCourseItemLearnerSessionsClear
|
|
1793
|
+
|
|
1794
|
+
> PostClearSessionsResponse postCourseItemLearnerSessionsClear(courseId, courseVersionId, itemId, userId, postClearSessions)
|
|
1795
|
+
|
|
1796
|
+
Clear all live sessions for a learner and course item
|
|
1797
|
+
|
|
1798
|
+
### Example
|
|
1799
|
+
|
|
1800
|
+
```ts
|
|
1801
|
+
import {
|
|
1802
|
+
Configuration,
|
|
1803
|
+
CourseApi,
|
|
1804
|
+
} from '@easyedu/js-lsm-api';
|
|
1805
|
+
import type { PostCourseItemLearnerSessionsClearRequest } from '@easyedu/js-lsm-api';
|
|
1806
|
+
|
|
1807
|
+
async function example() {
|
|
1808
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1809
|
+
const api = new CourseApi();
|
|
1810
|
+
|
|
1811
|
+
const body = {
|
|
1812
|
+
// string
|
|
1813
|
+
courseId: courseId_example,
|
|
1814
|
+
// string
|
|
1815
|
+
courseVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1816
|
+
// string
|
|
1817
|
+
itemId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1818
|
+
// string | External learner ID.
|
|
1819
|
+
userId: userId_example,
|
|
1820
|
+
// PostClearSessions
|
|
1821
|
+
postClearSessions: ...,
|
|
1822
|
+
} satisfies PostCourseItemLearnerSessionsClearRequest;
|
|
1823
|
+
|
|
1824
|
+
try {
|
|
1825
|
+
const data = await api.postCourseItemLearnerSessionsClear(body);
|
|
1826
|
+
console.log(data);
|
|
1827
|
+
} catch (error) {
|
|
1828
|
+
console.error(error);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
// Run the test
|
|
1833
|
+
example().catch(console.error);
|
|
1834
|
+
```
|
|
1835
|
+
|
|
1836
|
+
### Parameters
|
|
1837
|
+
|
|
1838
|
+
|
|
1839
|
+
| Name | Type | Description | Notes |
|
|
1840
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1841
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1842
|
+
| **courseVersionId** | `string` | | [Defaults to `undefined`] |
|
|
1843
|
+
| **itemId** | `string` | | [Defaults to `undefined`] |
|
|
1844
|
+
| **userId** | `string` | External learner ID. | [Defaults to `undefined`] |
|
|
1845
|
+
| **postClearSessions** | [PostClearSessions](PostClearSessions.md) | | |
|
|
1846
|
+
|
|
1847
|
+
### Return type
|
|
1848
|
+
|
|
1849
|
+
[**PostClearSessionsResponse**](PostClearSessionsResponse.md)
|
|
1850
|
+
|
|
1851
|
+
### Authorization
|
|
1852
|
+
|
|
1853
|
+
No authorization required
|
|
1854
|
+
|
|
1855
|
+
### HTTP request headers
|
|
1856
|
+
|
|
1857
|
+
- **Content-Type**: `application/json`
|
|
1858
|
+
- **Accept**: `application/json`
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
### HTTP response details
|
|
1862
|
+
| Status code | Description | Response headers |
|
|
1863
|
+
|-------------|-------------|------------------|
|
|
1864
|
+
| **200** | Deleted session counts | - |
|
|
1865
|
+
| **400** | Invalid reason | - |
|
|
1866
|
+
| **404** | Course version item or learner not found | - |
|
|
1867
|
+
|
|
1868
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1869
|
+
|
|
1870
|
+
|
|
1714
1871
|
## postCourseResume
|
|
1715
1872
|
|
|
1716
1873
|
> PostCourseResume postCourseResume(courseId)
|
|
@@ -2279,6 +2436,85 @@ No authorization required
|
|
|
2279
2436
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2280
2437
|
|
|
2281
2438
|
|
|
2439
|
+
## putCourseItemLearnerAttemptAllowance
|
|
2440
|
+
|
|
2441
|
+
> GetAttemptAllowance putCourseItemLearnerAttemptAllowance(courseId, courseVersionId, itemId, userId, putAttemptAllowance)
|
|
2442
|
+
|
|
2443
|
+
Set extra attempts for a learner on a course item
|
|
2444
|
+
|
|
2445
|
+
### Example
|
|
2446
|
+
|
|
2447
|
+
```ts
|
|
2448
|
+
import {
|
|
2449
|
+
Configuration,
|
|
2450
|
+
CourseApi,
|
|
2451
|
+
} from '@easyedu/js-lsm-api';
|
|
2452
|
+
import type { PutCourseItemLearnerAttemptAllowanceRequest } from '@easyedu/js-lsm-api';
|
|
2453
|
+
|
|
2454
|
+
async function example() {
|
|
2455
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
2456
|
+
const api = new CourseApi();
|
|
2457
|
+
|
|
2458
|
+
const body = {
|
|
2459
|
+
// string
|
|
2460
|
+
courseId: courseId_example,
|
|
2461
|
+
// string
|
|
2462
|
+
courseVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
2463
|
+
// string
|
|
2464
|
+
itemId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
2465
|
+
// string | External learner ID.
|
|
2466
|
+
userId: userId_example,
|
|
2467
|
+
// PutAttemptAllowance
|
|
2468
|
+
putAttemptAllowance: ...,
|
|
2469
|
+
} satisfies PutCourseItemLearnerAttemptAllowanceRequest;
|
|
2470
|
+
|
|
2471
|
+
try {
|
|
2472
|
+
const data = await api.putCourseItemLearnerAttemptAllowance(body);
|
|
2473
|
+
console.log(data);
|
|
2474
|
+
} catch (error) {
|
|
2475
|
+
console.error(error);
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
// Run the test
|
|
2480
|
+
example().catch(console.error);
|
|
2481
|
+
```
|
|
2482
|
+
|
|
2483
|
+
### Parameters
|
|
2484
|
+
|
|
2485
|
+
|
|
2486
|
+
| Name | Type | Description | Notes |
|
|
2487
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2488
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
2489
|
+
| **courseVersionId** | `string` | | [Defaults to `undefined`] |
|
|
2490
|
+
| **itemId** | `string` | | [Defaults to `undefined`] |
|
|
2491
|
+
| **userId** | `string` | External learner ID. | [Defaults to `undefined`] |
|
|
2492
|
+
| **putAttemptAllowance** | [PutAttemptAllowance](PutAttemptAllowance.md) | | |
|
|
2493
|
+
|
|
2494
|
+
### Return type
|
|
2495
|
+
|
|
2496
|
+
[**GetAttemptAllowance**](GetAttemptAllowance.md)
|
|
2497
|
+
|
|
2498
|
+
### Authorization
|
|
2499
|
+
|
|
2500
|
+
No authorization required
|
|
2501
|
+
|
|
2502
|
+
### HTTP request headers
|
|
2503
|
+
|
|
2504
|
+
- **Content-Type**: `application/json`
|
|
2505
|
+
- **Accept**: `application/json`
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
### HTTP response details
|
|
2509
|
+
| Status code | Description | Response headers |
|
|
2510
|
+
|-------------|-------------|------------------|
|
|
2511
|
+
| **200** | Updated effective attempt allowance | - |
|
|
2512
|
+
| **400** | Invalid allowance or reason | - |
|
|
2513
|
+
| **404** | Course version item or learner not found | - |
|
|
2514
|
+
|
|
2515
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2516
|
+
|
|
2517
|
+
|
|
2282
2518
|
## putCourseVersionItem
|
|
2283
2519
|
|
|
2284
2520
|
> GetCourseVersionItem putCourseVersionItem(courseId, sectionId, itemId, putCourseVersionItem)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# GetAttemptAllowance
|
|
3
|
+
|
|
4
|
+
The effective attempt limit for one learner and course-version item.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`courseId` | string
|
|
11
|
+
`courseVersionId` | string
|
|
12
|
+
`itemId` | string
|
|
13
|
+
`userId` | string
|
|
14
|
+
`baseMaxAttempts` | number
|
|
15
|
+
`additionalAttempts` | number
|
|
16
|
+
`effectiveMaxAttempts` | number
|
|
17
|
+
`attemptsUsed` | number
|
|
18
|
+
`attemptsRemaining` | number
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { GetAttemptAllowance } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"courseId": null,
|
|
28
|
+
"courseVersionId": null,
|
|
29
|
+
"itemId": null,
|
|
30
|
+
"userId": null,
|
|
31
|
+
"baseMaxAttempts": null,
|
|
32
|
+
"additionalAttempts": null,
|
|
33
|
+
"effectiveMaxAttempts": null,
|
|
34
|
+
"attemptsUsed": null,
|
|
35
|
+
"attemptsRemaining": null,
|
|
36
|
+
} satisfies GetAttemptAllowance
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetAttemptAllowance
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
package/docs/PlayerApi.md
CHANGED
|
@@ -20,6 +20,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
20
20
|
| [**initializeResourceScormSession**](PlayerApi.md#initializeresourcescormsession) | **POST** /resource/sessions/{sessionId}/initialize | Initialize a reusable SCORM resource session |
|
|
21
21
|
| [**postResourceSessionActivityEvent**](PlayerApi.md#postresourcesessionactivityevent) | **POST** /resource/sessions/{sessionId}/activities/{activityId}/events | Record learner activity and update active time |
|
|
22
22
|
| [**postResourceSessionComplete**](PlayerApi.md#postresourcesessioncomplete) | **POST** /resource/sessions/{sessionId}/complete | Complete a non-SCORM resource session |
|
|
23
|
+
| [**putResourceSessionOverride**](PlayerApi.md#putresourcesessionoverride) | **PUT** /resource/sessions/{sessionId}/override | Override a learner\'s live resource-session progress |
|
|
23
24
|
| [**setResourceScormValue**](PlayerApi.md#setresourcescormvalue) | **POST** /resource/sessions/{sessionId}/set-value | Store a CMI value in a reusable SCORM resource session |
|
|
24
25
|
| [**terminateResourceScormSession**](PlayerApi.md#terminateresourcescormsession) | **POST** /resource/sessions/{sessionId}/terminate | Terminate a reusable SCORM resource session |
|
|
25
26
|
|
|
@@ -1184,6 +1185,76 @@ No authorization required
|
|
|
1184
1185
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1185
1186
|
|
|
1186
1187
|
|
|
1188
|
+
## putResourceSessionOverride
|
|
1189
|
+
|
|
1190
|
+
> GetResourceSession putResourceSessionOverride(sessionId, putResourceSessionOverride)
|
|
1191
|
+
|
|
1192
|
+
Override a learner\'s live resource-session progress
|
|
1193
|
+
|
|
1194
|
+
### Example
|
|
1195
|
+
|
|
1196
|
+
```ts
|
|
1197
|
+
import {
|
|
1198
|
+
Configuration,
|
|
1199
|
+
PlayerApi,
|
|
1200
|
+
} from '@easyedu/js-lsm-api';
|
|
1201
|
+
import type { PutResourceSessionOverrideRequest } from '@easyedu/js-lsm-api';
|
|
1202
|
+
|
|
1203
|
+
async function example() {
|
|
1204
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1205
|
+
const api = new PlayerApi();
|
|
1206
|
+
|
|
1207
|
+
const body = {
|
|
1208
|
+
// string
|
|
1209
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1210
|
+
// PutResourceSessionOverride
|
|
1211
|
+
putResourceSessionOverride: ...,
|
|
1212
|
+
} satisfies PutResourceSessionOverrideRequest;
|
|
1213
|
+
|
|
1214
|
+
try {
|
|
1215
|
+
const data = await api.putResourceSessionOverride(body);
|
|
1216
|
+
console.log(data);
|
|
1217
|
+
} catch (error) {
|
|
1218
|
+
console.error(error);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
// Run the test
|
|
1223
|
+
example().catch(console.error);
|
|
1224
|
+
```
|
|
1225
|
+
|
|
1226
|
+
### Parameters
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
| Name | Type | Description | Notes |
|
|
1230
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1231
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1232
|
+
| **putResourceSessionOverride** | [PutResourceSessionOverride](PutResourceSessionOverride.md) | | |
|
|
1233
|
+
|
|
1234
|
+
### Return type
|
|
1235
|
+
|
|
1236
|
+
[**GetResourceSession**](GetResourceSession.md)
|
|
1237
|
+
|
|
1238
|
+
### Authorization
|
|
1239
|
+
|
|
1240
|
+
No authorization required
|
|
1241
|
+
|
|
1242
|
+
### HTTP request headers
|
|
1243
|
+
|
|
1244
|
+
- **Content-Type**: `application/json`
|
|
1245
|
+
- **Accept**: `application/json`
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
### HTTP response details
|
|
1249
|
+
| Status code | Description | Response headers |
|
|
1250
|
+
|-------------|-------------|------------------|
|
|
1251
|
+
| **200** | Updated resource session | - |
|
|
1252
|
+
| **400** | Invalid override values | - |
|
|
1253
|
+
| **404** | Resource session not found | - |
|
|
1254
|
+
|
|
1255
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1256
|
+
|
|
1257
|
+
|
|
1187
1258
|
## setResourceScormValue
|
|
1188
1259
|
|
|
1189
1260
|
> ScormSetValueResponse setResourceScormValue(sessionId, scormSetValueRequest, activityId)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostClearSessions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`reason` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostClearSessions } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"reason": null,
|
|
19
|
+
} satisfies PostClearSessions
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostClearSessions
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|