@easyedu/js-lsm-api 1.67.0 → 1.69.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 +10 -2
- package/dist/apis/ContentApi.d.ts +56 -0
- package/dist/apis/ContentApi.js +121 -1
- package/dist/esm/apis/ContentApi.d.ts +56 -0
- package/dist/esm/apis/ContentApi.js +120 -0
- package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
- package/dist/esm/models/ContentAttemptItem.js +68 -0
- package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
- package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
- package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
- package/dist/esm/models/ContentAttemptScore.js +47 -0
- package/dist/esm/models/ContentAttemptSettings.d.ts +46 -0
- package/dist/esm/models/ContentAttemptSettings.js +54 -0
- package/dist/esm/models/GetContent.d.ts +7 -0
- package/dist/esm/models/GetContent.js +5 -0
- package/dist/esm/models/GetContentAttempts.d.ts +90 -0
- package/dist/esm/models/GetContentAttempts.js +84 -0
- package/dist/esm/models/GetContentSession.d.ts +12 -0
- package/dist/esm/models/GetContentSession.js +8 -0
- package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
- package/dist/esm/models/GetContentSessionDetail.js +8 -0
- package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
- package/dist/esm/models/GetContentSessionListItem.js +16 -0
- package/dist/esm/models/PostContentSession.d.ts +12 -0
- package/dist/esm/models/PostContentSession.js +8 -0
- package/dist/esm/models/PutContent.d.ts +7 -0
- package/dist/esm/models/PutContent.js +3 -0
- package/dist/esm/models/PutContentAttemptSettings.d.ts +46 -0
- package/dist/esm/models/PutContentAttemptSettings.js +50 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/ContentAttemptItem.d.ts +69 -0
- package/dist/models/ContentAttemptItem.js +75 -0
- package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
- package/dist/models/ContentAttemptRollupScore.js +54 -0
- package/dist/models/ContentAttemptScore.d.ts +50 -0
- package/dist/models/ContentAttemptScore.js +54 -0
- package/dist/models/ContentAttemptSettings.d.ts +46 -0
- package/dist/models/ContentAttemptSettings.js +62 -0
- package/dist/models/GetContent.d.ts +7 -0
- package/dist/models/GetContent.js +5 -0
- package/dist/models/GetContentAttempts.d.ts +90 -0
- package/dist/models/GetContentAttempts.js +92 -0
- package/dist/models/GetContentSession.d.ts +12 -0
- package/dist/models/GetContentSession.js +8 -0
- package/dist/models/GetContentSessionDetail.d.ts +12 -0
- package/dist/models/GetContentSessionDetail.js +8 -0
- package/dist/models/GetContentSessionListItem.d.ts +24 -0
- package/dist/models/GetContentSessionListItem.js +16 -0
- package/dist/models/PostContentSession.d.ts +12 -0
- package/dist/models/PostContentSession.js +8 -0
- package/dist/models/PutContent.d.ts +7 -0
- package/dist/models/PutContent.js +3 -0
- package/dist/models/PutContentAttemptSettings.d.ts +46 -0
- package/dist/models/PutContentAttemptSettings.js +58 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/docs/ContentApi.md +159 -0
- package/docs/ContentAttemptItem.md +47 -0
- package/docs/ContentAttemptRollupScore.md +37 -0
- package/docs/ContentAttemptScore.md +41 -0
- package/docs/ContentAttemptSettings.md +36 -0
- package/docs/GetContent.md +2 -0
- package/docs/GetContentAttempts.md +51 -0
- package/docs/GetContentSession.md +4 -0
- package/docs/GetContentSessionDetail.md +4 -0
- package/docs/GetContentSessionListItem.md +8 -0
- package/docs/PostContentSession.md +4 -0
- package/docs/PutContent.md +2 -0
- package/docs/PutContentAttemptSettings.md +36 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +172 -0
- package/src/models/ContentAttemptItem.ts +128 -0
- package/src/models/ContentAttemptRollupScore.ts +75 -0
- package/src/models/ContentAttemptScore.ts +89 -0
- package/src/models/ContentAttemptSettings.ts +86 -0
- package/src/models/GetContent.ts +16 -0
- package/src/models/GetContentAttempts.ts +164 -0
- package/src/models/GetContentSession.ts +18 -0
- package/src/models/GetContentSessionDetail.ts +18 -0
- package/src/models/GetContentSessionListItem.ts +36 -0
- package/src/models/PostContentSession.ts +18 -0
- package/src/models/PutContent.ts +15 -0
- package/src/models/PutContentAttemptSettings.ts +84 -0
- package/src/models/index.ts +6 -0
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ContentLaunchMode } from './ContentLaunchMode';
|
|
13
|
+
import type { PutContentAttemptSettings } from './PutContentAttemptSettings';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -34,6 +35,12 @@ export interface PutContent {
|
|
|
34
35
|
* @memberof PutContent
|
|
35
36
|
*/
|
|
36
37
|
launchMode?: ContentLaunchMode;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {PutContentAttemptSettings}
|
|
41
|
+
* @memberof PutContent
|
|
42
|
+
*/
|
|
43
|
+
attemptSettings?: PutContentAttemptSettings;
|
|
37
44
|
}
|
|
38
45
|
/**
|
|
39
46
|
* Check if a given object implements the PutContent interface.
|
|
@@ -19,6 +19,7 @@ exports.PutContentFromJSONTyped = PutContentFromJSONTyped;
|
|
|
19
19
|
exports.PutContentToJSON = PutContentToJSON;
|
|
20
20
|
exports.PutContentToJSONTyped = PutContentToJSONTyped;
|
|
21
21
|
const ContentLaunchMode_1 = require("./ContentLaunchMode");
|
|
22
|
+
const PutContentAttemptSettings_1 = require("./PutContentAttemptSettings");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the PutContent interface.
|
|
24
25
|
*/
|
|
@@ -36,6 +37,7 @@ function PutContentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
37
|
'name': json['name'] == null ? undefined : json['name'],
|
|
37
38
|
'published': json['published'] == null ? undefined : json['published'],
|
|
38
39
|
'launchMode': json['launch_mode'] == null ? undefined : (0, ContentLaunchMode_1.ContentLaunchModeFromJSON)(json['launch_mode']),
|
|
40
|
+
'attemptSettings': json['attempt_settings'] == null ? undefined : (0, PutContentAttemptSettings_1.PutContentAttemptSettingsFromJSON)(json['attempt_settings']),
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
function PutContentToJSON(json) {
|
|
@@ -49,5 +51,6 @@ function PutContentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
49
51
|
'name': value['name'],
|
|
50
52
|
'published': value['published'],
|
|
51
53
|
'launch_mode': (0, ContentLaunchMode_1.ContentLaunchModeToJSON)(value['launchMode']),
|
|
54
|
+
'attempt_settings': (0, PutContentAttemptSettings_1.PutContentAttemptSettingsToJSON)(value['attemptSettings']),
|
|
52
55
|
};
|
|
53
56
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PutContentAttemptSettings
|
|
16
|
+
*/
|
|
17
|
+
export interface PutContentAttemptSettings {
|
|
18
|
+
/**
|
|
19
|
+
* Maximum allowed attempts for this content
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof PutContentAttemptSettings
|
|
22
|
+
*/
|
|
23
|
+
maxAttempts?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Strategy used to calculate the content rollup score
|
|
26
|
+
* @type {PutContentAttemptSettingsScoreRollupStrategyEnum}
|
|
27
|
+
* @memberof PutContentAttemptSettings
|
|
28
|
+
*/
|
|
29
|
+
scoreRollupStrategy?: PutContentAttemptSettingsScoreRollupStrategyEnum;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const PutContentAttemptSettingsScoreRollupStrategyEnum: {
|
|
35
|
+
readonly Latest: "Latest";
|
|
36
|
+
readonly Best: "Best";
|
|
37
|
+
};
|
|
38
|
+
export type PutContentAttemptSettingsScoreRollupStrategyEnum = typeof PutContentAttemptSettingsScoreRollupStrategyEnum[keyof typeof PutContentAttemptSettingsScoreRollupStrategyEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the PutContentAttemptSettings interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfPutContentAttemptSettings(value: object): value is PutContentAttemptSettings;
|
|
43
|
+
export declare function PutContentAttemptSettingsFromJSON(json: any): PutContentAttemptSettings;
|
|
44
|
+
export declare function PutContentAttemptSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutContentAttemptSettings;
|
|
45
|
+
export declare function PutContentAttemptSettingsToJSON(json: any): PutContentAttemptSettings;
|
|
46
|
+
export declare function PutContentAttemptSettingsToJSONTyped(value?: PutContentAttemptSettings | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.PutContentAttemptSettingsScoreRollupStrategyEnum = void 0;
|
|
17
|
+
exports.instanceOfPutContentAttemptSettings = instanceOfPutContentAttemptSettings;
|
|
18
|
+
exports.PutContentAttemptSettingsFromJSON = PutContentAttemptSettingsFromJSON;
|
|
19
|
+
exports.PutContentAttemptSettingsFromJSONTyped = PutContentAttemptSettingsFromJSONTyped;
|
|
20
|
+
exports.PutContentAttemptSettingsToJSON = PutContentAttemptSettingsToJSON;
|
|
21
|
+
exports.PutContentAttemptSettingsToJSONTyped = PutContentAttemptSettingsToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.PutContentAttemptSettingsScoreRollupStrategyEnum = {
|
|
26
|
+
Latest: 'Latest',
|
|
27
|
+
Best: 'Best'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the PutContentAttemptSettings interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfPutContentAttemptSettings(value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function PutContentAttemptSettingsFromJSON(json) {
|
|
36
|
+
return PutContentAttemptSettingsFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function PutContentAttemptSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
|
|
44
|
+
'scoreRollupStrategy': json['score_rollup_strategy'] == null ? undefined : json['score_rollup_strategy'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function PutContentAttemptSettingsToJSON(json) {
|
|
48
|
+
return PutContentAttemptSettingsToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function PutContentAttemptSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'max_attempts': value['maxAttempts'],
|
|
56
|
+
'score_rollup_strategy': value['scoreRollupStrategy'],
|
|
57
|
+
};
|
|
58
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export * from './Certificate';
|
|
2
2
|
export * from './CertificateConfig';
|
|
3
3
|
export * from './CertificatePublic';
|
|
4
|
+
export * from './ContentAttemptItem';
|
|
5
|
+
export * from './ContentAttemptRollupScore';
|
|
6
|
+
export * from './ContentAttemptScore';
|
|
7
|
+
export * from './ContentAttemptSettings';
|
|
4
8
|
export * from './ContentLaunchMode';
|
|
5
9
|
export * from './CourseCatalog';
|
|
6
10
|
export * from './CourseShare';
|
|
@@ -16,6 +20,7 @@ export * from './GetCertificateConfigList';
|
|
|
16
20
|
export * from './GetCertificateList';
|
|
17
21
|
export * from './GetChatMessage';
|
|
18
22
|
export * from './GetContent';
|
|
23
|
+
export * from './GetContentAttempts';
|
|
19
24
|
export * from './GetContentContentData';
|
|
20
25
|
export * from './GetContentGradeDetail';
|
|
21
26
|
export * from './GetContentGrades';
|
|
@@ -219,6 +224,7 @@ export * from './PostVerifyManifestItemsInner';
|
|
|
219
224
|
export * from './PostVerifyManifestResourcesInner';
|
|
220
225
|
export * from './PutCertificateConfig';
|
|
221
226
|
export * from './PutContent';
|
|
227
|
+
export * from './PutContentAttemptSettings';
|
|
222
228
|
export * from './PutContentReorder';
|
|
223
229
|
export * from './PutContentVersion';
|
|
224
230
|
export * from './PutCourse';
|
package/dist/models/index.js
CHANGED
|
@@ -19,6 +19,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
__exportStar(require("./Certificate"), exports);
|
|
20
20
|
__exportStar(require("./CertificateConfig"), exports);
|
|
21
21
|
__exportStar(require("./CertificatePublic"), exports);
|
|
22
|
+
__exportStar(require("./ContentAttemptItem"), exports);
|
|
23
|
+
__exportStar(require("./ContentAttemptRollupScore"), exports);
|
|
24
|
+
__exportStar(require("./ContentAttemptScore"), exports);
|
|
25
|
+
__exportStar(require("./ContentAttemptSettings"), exports);
|
|
22
26
|
__exportStar(require("./ContentLaunchMode"), exports);
|
|
23
27
|
__exportStar(require("./CourseCatalog"), exports);
|
|
24
28
|
__exportStar(require("./CourseShare"), exports);
|
|
@@ -34,6 +38,7 @@ __exportStar(require("./GetCertificateConfigList"), exports);
|
|
|
34
38
|
__exportStar(require("./GetCertificateList"), exports);
|
|
35
39
|
__exportStar(require("./GetChatMessage"), exports);
|
|
36
40
|
__exportStar(require("./GetContent"), exports);
|
|
41
|
+
__exportStar(require("./GetContentAttempts"), exports);
|
|
37
42
|
__exportStar(require("./GetContentContentData"), exports);
|
|
38
43
|
__exportStar(require("./GetContentGradeDetail"), exports);
|
|
39
44
|
__exportStar(require("./GetContentGrades"), exports);
|
|
@@ -237,6 +242,7 @@ __exportStar(require("./PostVerifyManifestItemsInner"), exports);
|
|
|
237
242
|
__exportStar(require("./PostVerifyManifestResourcesInner"), exports);
|
|
238
243
|
__exportStar(require("./PutCertificateConfig"), exports);
|
|
239
244
|
__exportStar(require("./PutContent"), exports);
|
|
245
|
+
__exportStar(require("./PutContentAttemptSettings"), exports);
|
|
240
246
|
__exportStar(require("./PutContentReorder"), exports);
|
|
241
247
|
__exportStar(require("./PutContentVersion"), exports);
|
|
242
248
|
__exportStar(require("./PutCourse"), exports);
|
package/docs/ContentApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
8
8
|
| [**deleteContent**](ContentApi.md#deletecontent) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Delete content by id |
|
|
9
9
|
| [**deleteContentVersion**](ContentApi.md#deletecontentversion) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Delete an inactive content version |
|
|
10
10
|
| [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
|
|
11
|
+
| [**getContentAttempts**](ContentApi.md#getcontentattempts) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/attempts | Get content attempts |
|
|
11
12
|
| [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
|
|
12
13
|
| [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
|
|
13
14
|
| [**getContentSessionDetail**](ContentApi.md#getcontentsessiondetail) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions/{sessionId} | Get content session details (instructor only) |
|
|
@@ -23,6 +24,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
23
24
|
| [**postContentProcess**](ContentApi.md#postcontentprocess) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/process | Post a new content process |
|
|
24
25
|
| [**postContentQuiz**](ContentApi.md#postcontentquiz) | **POST** /courses/{courseId}/modules/{moduleId}/contents/quiz | Create a new quiz content |
|
|
25
26
|
| [**postContentSession**](ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session |
|
|
27
|
+
| [**postContentSessionRetake**](ContentApi.md#postcontentsessionretake) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session/retake | Create a new retake content session |
|
|
26
28
|
| [**postContentUpload**](ContentApi.md#postcontentupload) | **POST** /courses/{courseId}/modules/{moduleId}/contents/upload | Post a new content upload |
|
|
27
29
|
| [**putContent**](ContentApi.md#putcontent) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Update content by id |
|
|
28
30
|
| [**putContentReorder**](ContentApi.md#putcontentreorder) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/reorder | Reorder content in a module |
|
|
@@ -327,6 +329,88 @@ No authorization required
|
|
|
327
329
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
328
330
|
|
|
329
331
|
|
|
332
|
+
## getContentAttempts
|
|
333
|
+
|
|
334
|
+
> GetContentAttempts getContentAttempts(contentId, moduleId, courseId, userId, environment)
|
|
335
|
+
|
|
336
|
+
Get content attempts
|
|
337
|
+
|
|
338
|
+
Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
339
|
+
|
|
340
|
+
### Example
|
|
341
|
+
|
|
342
|
+
```ts
|
|
343
|
+
import {
|
|
344
|
+
Configuration,
|
|
345
|
+
ContentApi,
|
|
346
|
+
} from '@easyedu/js-lsm-api';
|
|
347
|
+
import type { GetContentAttemptsRequest } from '@easyedu/js-lsm-api';
|
|
348
|
+
|
|
349
|
+
async function example() {
|
|
350
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
351
|
+
const api = new ContentApi();
|
|
352
|
+
|
|
353
|
+
const body = {
|
|
354
|
+
// string
|
|
355
|
+
contentId: contentId_example,
|
|
356
|
+
// string
|
|
357
|
+
moduleId: moduleId_example,
|
|
358
|
+
// string
|
|
359
|
+
courseId: courseId_example,
|
|
360
|
+
// number | Internal user ID to inspect. Defaults to the authenticated user. (optional)
|
|
361
|
+
userId: 56,
|
|
362
|
+
// 'sandbox' | 'live' | Environment type for the attempts list (defaults to live) (optional)
|
|
363
|
+
environment: environment_example,
|
|
364
|
+
} satisfies GetContentAttemptsRequest;
|
|
365
|
+
|
|
366
|
+
try {
|
|
367
|
+
const data = await api.getContentAttempts(body);
|
|
368
|
+
console.log(data);
|
|
369
|
+
} catch (error) {
|
|
370
|
+
console.error(error);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Run the test
|
|
375
|
+
example().catch(console.error);
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Parameters
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
| Name | Type | Description | Notes |
|
|
382
|
+
|------------- | ------------- | ------------- | -------------|
|
|
383
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
384
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
385
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
386
|
+
| **userId** | `number` | Internal user ID to inspect. Defaults to the authenticated user. | [Optional] [Defaults to `undefined`] |
|
|
387
|
+
| **environment** | `sandbox`, `live` | Environment type for the attempts list (defaults to live) | [Optional] [Defaults to `'live'`] [Enum: sandbox, live] |
|
|
388
|
+
|
|
389
|
+
### Return type
|
|
390
|
+
|
|
391
|
+
[**GetContentAttempts**](GetContentAttempts.md)
|
|
392
|
+
|
|
393
|
+
### Authorization
|
|
394
|
+
|
|
395
|
+
No authorization required
|
|
396
|
+
|
|
397
|
+
### HTTP request headers
|
|
398
|
+
|
|
399
|
+
- **Content-Type**: Not defined
|
|
400
|
+
- **Accept**: `application/json`
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
### HTTP response details
|
|
404
|
+
| Status code | Description | Response headers |
|
|
405
|
+
|-------------|-------------|------------------|
|
|
406
|
+
| **200** | Content attempts response OK | - |
|
|
407
|
+
| **401** | Unauthorized | - |
|
|
408
|
+
| **403** | Forbidden | - |
|
|
409
|
+
| **404** | Content not found | - |
|
|
410
|
+
|
|
411
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
412
|
+
|
|
413
|
+
|
|
330
414
|
## getContentList
|
|
331
415
|
|
|
332
416
|
> GetContentList getContentList(moduleId, courseId)
|
|
@@ -1442,6 +1526,81 @@ No authorization required
|
|
|
1442
1526
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1443
1527
|
|
|
1444
1528
|
|
|
1529
|
+
## postContentSessionRetake
|
|
1530
|
+
|
|
1531
|
+
> PostContentSession postContentSessionRetake(contentId, moduleId, courseId, environment)
|
|
1532
|
+
|
|
1533
|
+
Create a new retake content session
|
|
1534
|
+
|
|
1535
|
+
### Example
|
|
1536
|
+
|
|
1537
|
+
```ts
|
|
1538
|
+
import {
|
|
1539
|
+
Configuration,
|
|
1540
|
+
ContentApi,
|
|
1541
|
+
} from '@easyedu/js-lsm-api';
|
|
1542
|
+
import type { PostContentSessionRetakeRequest } from '@easyedu/js-lsm-api';
|
|
1543
|
+
|
|
1544
|
+
async function example() {
|
|
1545
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1546
|
+
const api = new ContentApi();
|
|
1547
|
+
|
|
1548
|
+
const body = {
|
|
1549
|
+
// string
|
|
1550
|
+
contentId: contentId_example,
|
|
1551
|
+
// string
|
|
1552
|
+
moduleId: moduleId_example,
|
|
1553
|
+
// string
|
|
1554
|
+
courseId: courseId_example,
|
|
1555
|
+
// 'sandbox' | 'live' | Environment type for the session (defaults to live) (optional)
|
|
1556
|
+
environment: environment_example,
|
|
1557
|
+
} satisfies PostContentSessionRetakeRequest;
|
|
1558
|
+
|
|
1559
|
+
try {
|
|
1560
|
+
const data = await api.postContentSessionRetake(body);
|
|
1561
|
+
console.log(data);
|
|
1562
|
+
} catch (error) {
|
|
1563
|
+
console.error(error);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
// Run the test
|
|
1568
|
+
example().catch(console.error);
|
|
1569
|
+
```
|
|
1570
|
+
|
|
1571
|
+
### Parameters
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
| Name | Type | Description | Notes |
|
|
1575
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1576
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
1577
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1578
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1579
|
+
| **environment** | `sandbox`, `live` | Environment type for the session (defaults to live) | [Optional] [Defaults to `'live'`] [Enum: sandbox, live] |
|
|
1580
|
+
|
|
1581
|
+
### Return type
|
|
1582
|
+
|
|
1583
|
+
[**PostContentSession**](PostContentSession.md)
|
|
1584
|
+
|
|
1585
|
+
### Authorization
|
|
1586
|
+
|
|
1587
|
+
No authorization required
|
|
1588
|
+
|
|
1589
|
+
### HTTP request headers
|
|
1590
|
+
|
|
1591
|
+
- **Content-Type**: Not defined
|
|
1592
|
+
- **Accept**: `application/json`
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
### HTTP response details
|
|
1596
|
+
| Status code | Description | Response headers |
|
|
1597
|
+
|-------------|-------------|------------------|
|
|
1598
|
+
| **200** | post retake session response OK | - |
|
|
1599
|
+
| **409** | Maximum attempts reached for this content | - |
|
|
1600
|
+
|
|
1601
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1602
|
+
|
|
1603
|
+
|
|
1445
1604
|
## postContentUpload
|
|
1446
1605
|
|
|
1447
1606
|
> GetContentUpload postContentUpload(moduleId, courseId, postContentUpload)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# ContentAttemptItem
|
|
3
|
+
|
|
4
|
+
A single learner attempt for a content item
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`sessionId` | string
|
|
11
|
+
`attemptNumber` | number
|
|
12
|
+
`completionStatus` | string
|
|
13
|
+
`gradeStatus` | string
|
|
14
|
+
`score` | [ContentAttemptScore](ContentAttemptScore.md)
|
|
15
|
+
`createdAt` | number
|
|
16
|
+
`updatedAt` | number
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ContentAttemptItem } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"sessionId": null,
|
|
26
|
+
"attemptNumber": null,
|
|
27
|
+
"completionStatus": null,
|
|
28
|
+
"gradeStatus": null,
|
|
29
|
+
"score": null,
|
|
30
|
+
"createdAt": null,
|
|
31
|
+
"updatedAt": null,
|
|
32
|
+
} satisfies ContentAttemptItem
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContentAttemptItem
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ContentAttemptRollupScore
|
|
3
|
+
|
|
4
|
+
Rolled-up score for a content item
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`percentage` | number
|
|
11
|
+
`sourceAttemptNumber` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ContentAttemptRollupScore } from '@easyedu/js-lsm-api'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"percentage": null,
|
|
21
|
+
"sourceAttemptNumber": null,
|
|
22
|
+
} satisfies ContentAttemptRollupScore
|
|
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 ContentAttemptRollupScore
|
|
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,41 @@
|
|
|
1
|
+
|
|
2
|
+
# ContentAttemptScore
|
|
3
|
+
|
|
4
|
+
Normalized score data for a content attempt
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`raw` | number
|
|
11
|
+
`min` | number
|
|
12
|
+
`max` | number
|
|
13
|
+
`percentage` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { ContentAttemptScore } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"raw": null,
|
|
23
|
+
"min": null,
|
|
24
|
+
"max": null,
|
|
25
|
+
"percentage": null,
|
|
26
|
+
} satisfies ContentAttemptScore
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContentAttemptScore
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ContentAttemptSettings
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`maxAttempts` | number
|
|
10
|
+
`scoreRollupStrategy` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ContentAttemptSettings } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"maxAttempts": null,
|
|
20
|
+
"scoreRollupStrategy": null,
|
|
21
|
+
} satisfies ContentAttemptSettings
|
|
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 ContentAttemptSettings
|
|
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/docs/GetContent.md
CHANGED
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`description` | string
|
|
13
13
|
`contentType` | string
|
|
14
14
|
`launchMode` | [ContentLaunchMode](ContentLaunchMode.md)
|
|
15
|
+
`attemptSettings` | [ContentAttemptSettings](ContentAttemptSettings.md)
|
|
15
16
|
`contentData` | [GetContentContentData](GetContentContentData.md)
|
|
16
17
|
`order` | number
|
|
17
18
|
`published` | boolean
|
|
@@ -34,6 +35,7 @@ const example = {
|
|
|
34
35
|
"description": null,
|
|
35
36
|
"contentType": null,
|
|
36
37
|
"launchMode": null,
|
|
38
|
+
"attemptSettings": null,
|
|
37
39
|
"contentData": null,
|
|
38
40
|
"order": null,
|
|
39
41
|
"published": null,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# GetContentAttempts
|
|
3
|
+
|
|
4
|
+
Learner attempt history and rollup for a content item
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`contentId` | string
|
|
11
|
+
`userId` | string
|
|
12
|
+
`maxAttempts` | number
|
|
13
|
+
`attemptsUsed` | number
|
|
14
|
+
`attemptsRemaining` | number
|
|
15
|
+
`canStartNewAttempt` | boolean
|
|
16
|
+
`scoreRollupStrategy` | string
|
|
17
|
+
`rollupScore` | [ContentAttemptRollupScore](ContentAttemptRollupScore.md)
|
|
18
|
+
`attempts` | [Array<ContentAttemptItem>](ContentAttemptItem.md)
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { GetContentAttempts } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"contentId": null,
|
|
28
|
+
"userId": null,
|
|
29
|
+
"maxAttempts": null,
|
|
30
|
+
"attemptsUsed": null,
|
|
31
|
+
"attemptsRemaining": null,
|
|
32
|
+
"canStartNewAttempt": null,
|
|
33
|
+
"scoreRollupStrategy": null,
|
|
34
|
+
"rollupScore": null,
|
|
35
|
+
"attempts": null,
|
|
36
|
+
} satisfies GetContentAttempts
|
|
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 GetContentAttempts
|
|
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
|
+
|
|
@@ -13,6 +13,8 @@ Name | Type
|
|
|
13
13
|
`updatedAt` | number
|
|
14
14
|
`completionStatus` | string
|
|
15
15
|
`gradeStatus` | string
|
|
16
|
+
`attemptNumber` | number
|
|
17
|
+
`isCurrent` | boolean
|
|
16
18
|
|
|
17
19
|
## Example
|
|
18
20
|
|
|
@@ -27,6 +29,8 @@ const example = {
|
|
|
27
29
|
"updatedAt": null,
|
|
28
30
|
"completionStatus": null,
|
|
29
31
|
"gradeStatus": null,
|
|
32
|
+
"attemptNumber": null,
|
|
33
|
+
"isCurrent": null,
|
|
30
34
|
} satisfies GetContentSession
|
|
31
35
|
|
|
32
36
|
console.log(example)
|
|
@@ -14,6 +14,8 @@ Name | Type
|
|
|
14
14
|
`completionStatus` | string
|
|
15
15
|
`gradeStatus` | string
|
|
16
16
|
`durationInSeconds` | number
|
|
17
|
+
`attemptNumber` | number
|
|
18
|
+
`isCurrent` | boolean
|
|
17
19
|
`userData` | [GetContentSessionDetailUserData](GetContentSessionDetailUserData.md)
|
|
18
20
|
`scormSessionData` | [Array<GetContentSessionDetailScormSessionDataInner>](GetContentSessionDetailScormSessionDataInner.md)
|
|
19
21
|
|
|
@@ -31,6 +33,8 @@ const example = {
|
|
|
31
33
|
"completionStatus": null,
|
|
32
34
|
"gradeStatus": null,
|
|
33
35
|
"durationInSeconds": null,
|
|
36
|
+
"attemptNumber": null,
|
|
37
|
+
"isCurrent": null,
|
|
34
38
|
"userData": null,
|
|
35
39
|
"scormSessionData": null,
|
|
36
40
|
} satisfies GetContentSessionDetail
|
|
@@ -11,6 +11,10 @@ Name | Type
|
|
|
11
11
|
`createdAt` | number
|
|
12
12
|
`updatedAt` | number
|
|
13
13
|
`contentId` | string
|
|
14
|
+
`completionStatus` | string
|
|
15
|
+
`gradeStatus` | string
|
|
16
|
+
`attemptNumber` | number
|
|
17
|
+
`isCurrent` | boolean
|
|
14
18
|
`userData` | [GetContentSessionDetailUserData](GetContentSessionDetailUserData.md)
|
|
15
19
|
`scormSessionData` | [GetContentSessionListItemScormSessionData](GetContentSessionListItemScormSessionData.md)
|
|
16
20
|
|
|
@@ -25,6 +29,10 @@ const example = {
|
|
|
25
29
|
"createdAt": null,
|
|
26
30
|
"updatedAt": null,
|
|
27
31
|
"contentId": null,
|
|
32
|
+
"completionStatus": null,
|
|
33
|
+
"gradeStatus": null,
|
|
34
|
+
"attemptNumber": null,
|
|
35
|
+
"isCurrent": null,
|
|
28
36
|
"userData": null,
|
|
29
37
|
"scormSessionData": null,
|
|
30
38
|
} satisfies GetContentSessionListItem
|