@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
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* Normalized score data for a content attempt
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ContentAttemptScore
|
|
16
|
+
*/
|
|
17
|
+
export interface ContentAttemptScore {
|
|
18
|
+
/**
|
|
19
|
+
* Raw score reported by the content, if available
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ContentAttemptScore
|
|
22
|
+
*/
|
|
23
|
+
raw?: number | null;
|
|
24
|
+
/**
|
|
25
|
+
* Minimum possible score, if available
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ContentAttemptScore
|
|
28
|
+
*/
|
|
29
|
+
min?: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum possible score, if available
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ContentAttemptScore
|
|
34
|
+
*/
|
|
35
|
+
max?: number | null;
|
|
36
|
+
/**
|
|
37
|
+
* Score normalized to a 0-100 percentage, if available
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ContentAttemptScore
|
|
40
|
+
*/
|
|
41
|
+
percentage?: number | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ContentAttemptScore interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfContentAttemptScore(value: object): value is ContentAttemptScore;
|
|
47
|
+
export declare function ContentAttemptScoreFromJSON(json: any): ContentAttemptScore;
|
|
48
|
+
export declare function ContentAttemptScoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptScore;
|
|
49
|
+
export declare function ContentAttemptScoreToJSON(json: any): ContentAttemptScore;
|
|
50
|
+
export declare function ContentAttemptScoreToJSONTyped(value?: ContentAttemptScore | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfContentAttemptScore = instanceOfContentAttemptScore;
|
|
17
|
+
exports.ContentAttemptScoreFromJSON = ContentAttemptScoreFromJSON;
|
|
18
|
+
exports.ContentAttemptScoreFromJSONTyped = ContentAttemptScoreFromJSONTyped;
|
|
19
|
+
exports.ContentAttemptScoreToJSON = ContentAttemptScoreToJSON;
|
|
20
|
+
exports.ContentAttemptScoreToJSONTyped = ContentAttemptScoreToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ContentAttemptScore interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfContentAttemptScore(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function ContentAttemptScoreFromJSON(json) {
|
|
28
|
+
return ContentAttemptScoreFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function ContentAttemptScoreFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'raw': json['raw'] == null ? undefined : json['raw'],
|
|
36
|
+
'min': json['min'] == null ? undefined : json['min'],
|
|
37
|
+
'max': json['max'] == null ? undefined : json['max'],
|
|
38
|
+
'percentage': json['percentage'] == null ? undefined : json['percentage'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ContentAttemptScoreToJSON(json) {
|
|
42
|
+
return ContentAttemptScoreToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ContentAttemptScoreToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'raw': value['raw'],
|
|
50
|
+
'min': value['min'],
|
|
51
|
+
'max': value['max'],
|
|
52
|
+
'percentage': value['percentage'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -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 ContentAttemptSettings
|
|
16
|
+
*/
|
|
17
|
+
export interface ContentAttemptSettings {
|
|
18
|
+
/**
|
|
19
|
+
* Maximum allowed attempts for this content
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ContentAttemptSettings
|
|
22
|
+
*/
|
|
23
|
+
maxAttempts: number;
|
|
24
|
+
/**
|
|
25
|
+
* Strategy used to calculate the content rollup score
|
|
26
|
+
* @type {ContentAttemptSettingsScoreRollupStrategyEnum}
|
|
27
|
+
* @memberof ContentAttemptSettings
|
|
28
|
+
*/
|
|
29
|
+
scoreRollupStrategy: ContentAttemptSettingsScoreRollupStrategyEnum;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const ContentAttemptSettingsScoreRollupStrategyEnum: {
|
|
35
|
+
readonly Latest: "Latest";
|
|
36
|
+
readonly Best: "Best";
|
|
37
|
+
};
|
|
38
|
+
export type ContentAttemptSettingsScoreRollupStrategyEnum = typeof ContentAttemptSettingsScoreRollupStrategyEnum[keyof typeof ContentAttemptSettingsScoreRollupStrategyEnum];
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ContentAttemptSettings interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfContentAttemptSettings(value: object): value is ContentAttemptSettings;
|
|
43
|
+
export declare function ContentAttemptSettingsFromJSON(json: any): ContentAttemptSettings;
|
|
44
|
+
export declare function ContentAttemptSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptSettings;
|
|
45
|
+
export declare function ContentAttemptSettingsToJSON(json: any): ContentAttemptSettings;
|
|
46
|
+
export declare function ContentAttemptSettingsToJSONTyped(value?: ContentAttemptSettings | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.ContentAttemptSettingsScoreRollupStrategyEnum = void 0;
|
|
17
|
+
exports.instanceOfContentAttemptSettings = instanceOfContentAttemptSettings;
|
|
18
|
+
exports.ContentAttemptSettingsFromJSON = ContentAttemptSettingsFromJSON;
|
|
19
|
+
exports.ContentAttemptSettingsFromJSONTyped = ContentAttemptSettingsFromJSONTyped;
|
|
20
|
+
exports.ContentAttemptSettingsToJSON = ContentAttemptSettingsToJSON;
|
|
21
|
+
exports.ContentAttemptSettingsToJSONTyped = ContentAttemptSettingsToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ContentAttemptSettingsScoreRollupStrategyEnum = {
|
|
26
|
+
Latest: 'Latest',
|
|
27
|
+
Best: 'Best'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the ContentAttemptSettings interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfContentAttemptSettings(value) {
|
|
33
|
+
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('scoreRollupStrategy' in value) || value['scoreRollupStrategy'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function ContentAttemptSettingsFromJSON(json) {
|
|
40
|
+
return ContentAttemptSettingsFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function ContentAttemptSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'maxAttempts': json['max_attempts'],
|
|
48
|
+
'scoreRollupStrategy': json['score_rollup_strategy'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function ContentAttemptSettingsToJSON(json) {
|
|
52
|
+
return ContentAttemptSettingsToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function ContentAttemptSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'max_attempts': value['maxAttempts'],
|
|
60
|
+
'score_rollup_strategy': value['scoreRollupStrategy'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { GetContentContentData } from './GetContentContentData';
|
|
13
|
+
import type { ContentAttemptSettings } from './ContentAttemptSettings';
|
|
13
14
|
import type { ContentLaunchMode } from './ContentLaunchMode';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -53,6 +54,12 @@ export interface GetContent {
|
|
|
53
54
|
* @memberof GetContent
|
|
54
55
|
*/
|
|
55
56
|
launchMode: ContentLaunchMode;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {ContentAttemptSettings}
|
|
60
|
+
* @memberof GetContent
|
|
61
|
+
*/
|
|
62
|
+
attemptSettings: ContentAttemptSettings;
|
|
56
63
|
/**
|
|
57
64
|
*
|
|
58
65
|
* @type {GetContentContentData}
|
|
@@ -20,6 +20,7 @@ exports.GetContentFromJSONTyped = GetContentFromJSONTyped;
|
|
|
20
20
|
exports.GetContentToJSON = GetContentToJSON;
|
|
21
21
|
exports.GetContentToJSONTyped = GetContentToJSONTyped;
|
|
22
22
|
const GetContentContentData_1 = require("./GetContentContentData");
|
|
23
|
+
const ContentAttemptSettings_1 = require("./ContentAttemptSettings");
|
|
23
24
|
const ContentLaunchMode_1 = require("./ContentLaunchMode");
|
|
24
25
|
/**
|
|
25
26
|
* @export
|
|
@@ -47,6 +48,8 @@ function instanceOfGetContent(value) {
|
|
|
47
48
|
return false;
|
|
48
49
|
if (!('launchMode' in value) || value['launchMode'] === undefined)
|
|
49
50
|
return false;
|
|
51
|
+
if (!('attemptSettings' in value) || value['attemptSettings'] === undefined)
|
|
52
|
+
return false;
|
|
50
53
|
if (!('contentData' in value) || value['contentData'] === undefined)
|
|
51
54
|
return false;
|
|
52
55
|
if (!('published' in value) || value['published'] === undefined)
|
|
@@ -67,6 +70,7 @@ function GetContentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
70
|
'description': json['description'] == null ? undefined : json['description'],
|
|
68
71
|
'contentType': json['content_type'],
|
|
69
72
|
'launchMode': (0, ContentLaunchMode_1.ContentLaunchModeFromJSON)(json['launch_mode']),
|
|
73
|
+
'attemptSettings': (0, ContentAttemptSettings_1.ContentAttemptSettingsFromJSON)(json['attempt_settings']),
|
|
70
74
|
'contentData': (0, GetContentContentData_1.GetContentContentDataFromJSON)(json['content_data']),
|
|
71
75
|
'order': json['order'] == null ? undefined : json['order'],
|
|
72
76
|
'published': json['published'],
|
|
@@ -90,6 +94,7 @@ function GetContentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
90
94
|
'description': value['description'],
|
|
91
95
|
'content_type': value['contentType'],
|
|
92
96
|
'launch_mode': (0, ContentLaunchMode_1.ContentLaunchModeToJSON)(value['launchMode']),
|
|
97
|
+
'attempt_settings': (0, ContentAttemptSettings_1.ContentAttemptSettingsToJSON)(value['attemptSettings']),
|
|
93
98
|
'content_data': (0, GetContentContentData_1.GetContentContentDataToJSON)(value['contentData']),
|
|
94
99
|
'order': value['order'],
|
|
95
100
|
'published': value['published'],
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
import type { ContentAttemptRollupScore } from './ContentAttemptRollupScore';
|
|
13
|
+
import type { ContentAttemptItem } from './ContentAttemptItem';
|
|
14
|
+
/**
|
|
15
|
+
* Learner attempt history and rollup for a content item
|
|
16
|
+
* @export
|
|
17
|
+
* @interface GetContentAttempts
|
|
18
|
+
*/
|
|
19
|
+
export interface GetContentAttempts {
|
|
20
|
+
/**
|
|
21
|
+
* Content external ID
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof GetContentAttempts
|
|
24
|
+
*/
|
|
25
|
+
contentId: string;
|
|
26
|
+
/**
|
|
27
|
+
* User ID these attempts belong to
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof GetContentAttempts
|
|
30
|
+
*/
|
|
31
|
+
userId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum content sessions allowed for this learner/content pair
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof GetContentAttempts
|
|
36
|
+
*/
|
|
37
|
+
maxAttempts: number;
|
|
38
|
+
/**
|
|
39
|
+
* Number of attempts already created
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof GetContentAttempts
|
|
42
|
+
*/
|
|
43
|
+
attemptsUsed: number;
|
|
44
|
+
/**
|
|
45
|
+
* Number of additional attempts that can be created
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof GetContentAttempts
|
|
48
|
+
*/
|
|
49
|
+
attemptsRemaining: number;
|
|
50
|
+
/**
|
|
51
|
+
* Whether another attempt may be started under the current policy
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof GetContentAttempts
|
|
54
|
+
*/
|
|
55
|
+
canStartNewAttempt: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Strategy used to compute rollup_score from attempts
|
|
58
|
+
* @type {GetContentAttemptsScoreRollupStrategyEnum}
|
|
59
|
+
* @memberof GetContentAttempts
|
|
60
|
+
*/
|
|
61
|
+
scoreRollupStrategy: GetContentAttemptsScoreRollupStrategyEnum;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {ContentAttemptRollupScore}
|
|
65
|
+
* @memberof GetContentAttempts
|
|
66
|
+
*/
|
|
67
|
+
rollupScore: ContentAttemptRollupScore | null;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {Array<ContentAttemptItem>}
|
|
71
|
+
* @memberof GetContentAttempts
|
|
72
|
+
*/
|
|
73
|
+
attempts: Array<ContentAttemptItem>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export declare const GetContentAttemptsScoreRollupStrategyEnum: {
|
|
79
|
+
readonly Latest: "Latest";
|
|
80
|
+
readonly Best: "Best";
|
|
81
|
+
};
|
|
82
|
+
export type GetContentAttemptsScoreRollupStrategyEnum = typeof GetContentAttemptsScoreRollupStrategyEnum[keyof typeof GetContentAttemptsScoreRollupStrategyEnum];
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the GetContentAttempts interface.
|
|
85
|
+
*/
|
|
86
|
+
export declare function instanceOfGetContentAttempts(value: object): value is GetContentAttempts;
|
|
87
|
+
export declare function GetContentAttemptsFromJSON(json: any): GetContentAttempts;
|
|
88
|
+
export declare function GetContentAttemptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentAttempts;
|
|
89
|
+
export declare function GetContentAttemptsToJSON(json: any): GetContentAttempts;
|
|
90
|
+
export declare function GetContentAttemptsToJSONTyped(value?: GetContentAttempts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,92 @@
|
|
|
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.GetContentAttemptsScoreRollupStrategyEnum = void 0;
|
|
17
|
+
exports.instanceOfGetContentAttempts = instanceOfGetContentAttempts;
|
|
18
|
+
exports.GetContentAttemptsFromJSON = GetContentAttemptsFromJSON;
|
|
19
|
+
exports.GetContentAttemptsFromJSONTyped = GetContentAttemptsFromJSONTyped;
|
|
20
|
+
exports.GetContentAttemptsToJSON = GetContentAttemptsToJSON;
|
|
21
|
+
exports.GetContentAttemptsToJSONTyped = GetContentAttemptsToJSONTyped;
|
|
22
|
+
const ContentAttemptRollupScore_1 = require("./ContentAttemptRollupScore");
|
|
23
|
+
const ContentAttemptItem_1 = require("./ContentAttemptItem");
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.GetContentAttemptsScoreRollupStrategyEnum = {
|
|
28
|
+
Latest: 'Latest',
|
|
29
|
+
Best: 'Best'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the GetContentAttempts interface.
|
|
33
|
+
*/
|
|
34
|
+
function instanceOfGetContentAttempts(value) {
|
|
35
|
+
if (!('contentId' in value) || value['contentId'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('attemptsUsed' in value) || value['attemptsUsed'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('canStartNewAttempt' in value) || value['canStartNewAttempt'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('scoreRollupStrategy' in value) || value['scoreRollupStrategy'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('rollupScore' in value) || value['rollupScore'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('attempts' in value) || value['attempts'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function GetContentAttemptsFromJSON(json) {
|
|
56
|
+
return GetContentAttemptsFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function GetContentAttemptsFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'contentId': json['content_id'],
|
|
64
|
+
'userId': json['user_id'],
|
|
65
|
+
'maxAttempts': json['max_attempts'],
|
|
66
|
+
'attemptsUsed': json['attempts_used'],
|
|
67
|
+
'attemptsRemaining': json['attempts_remaining'],
|
|
68
|
+
'canStartNewAttempt': json['can_start_new_attempt'],
|
|
69
|
+
'scoreRollupStrategy': json['score_rollup_strategy'],
|
|
70
|
+
'rollupScore': (0, ContentAttemptRollupScore_1.ContentAttemptRollupScoreFromJSON)(json['rollup_score']),
|
|
71
|
+
'attempts': (json['attempts'].map(ContentAttemptItem_1.ContentAttemptItemFromJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function GetContentAttemptsToJSON(json) {
|
|
75
|
+
return GetContentAttemptsToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
function GetContentAttemptsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
'content_id': value['contentId'],
|
|
83
|
+
'user_id': value['userId'],
|
|
84
|
+
'max_attempts': value['maxAttempts'],
|
|
85
|
+
'attempts_used': value['attemptsUsed'],
|
|
86
|
+
'attempts_remaining': value['attemptsRemaining'],
|
|
87
|
+
'can_start_new_attempt': value['canStartNewAttempt'],
|
|
88
|
+
'score_rollup_strategy': value['scoreRollupStrategy'],
|
|
89
|
+
'rollup_score': (0, ContentAttemptRollupScore_1.ContentAttemptRollupScoreToJSON)(value['rollupScore']),
|
|
90
|
+
'attempts': (value['attempts'].map(ContentAttemptItem_1.ContentAttemptItemToJSON)),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -51,6 +51,18 @@ export interface GetContentSession {
|
|
|
51
51
|
* @memberof GetContentSession
|
|
52
52
|
*/
|
|
53
53
|
gradeStatus: string;
|
|
54
|
+
/**
|
|
55
|
+
* The learner attempt number for this content session
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof GetContentSession
|
|
58
|
+
*/
|
|
59
|
+
attemptNumber: number;
|
|
60
|
+
/**
|
|
61
|
+
* Whether this is the current attempt used for learner progress display
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof GetContentSession
|
|
64
|
+
*/
|
|
65
|
+
isCurrent: boolean;
|
|
54
66
|
}
|
|
55
67
|
/**
|
|
56
68
|
* Check if a given object implements the GetContentSession interface.
|
|
@@ -34,6 +34,10 @@ function instanceOfGetContentSession(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
if (!('gradeStatus' in value) || value['gradeStatus'] === undefined)
|
|
36
36
|
return false;
|
|
37
|
+
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('isCurrent' in value) || value['isCurrent'] === undefined)
|
|
40
|
+
return false;
|
|
37
41
|
return true;
|
|
38
42
|
}
|
|
39
43
|
function GetContentSessionFromJSON(json) {
|
|
@@ -50,6 +54,8 @@ function GetContentSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
54
|
'updatedAt': json['updated_at'],
|
|
51
55
|
'completionStatus': json['completion_status'],
|
|
52
56
|
'gradeStatus': json['grade_status'],
|
|
57
|
+
'attemptNumber': json['attempt_number'],
|
|
58
|
+
'isCurrent': json['is_current'],
|
|
53
59
|
};
|
|
54
60
|
}
|
|
55
61
|
function GetContentSessionToJSON(json) {
|
|
@@ -66,5 +72,7 @@ function GetContentSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
72
|
'updated_at': value['updatedAt'],
|
|
67
73
|
'completion_status': value['completionStatus'],
|
|
68
74
|
'grade_status': value['gradeStatus'],
|
|
75
|
+
'attempt_number': value['attemptNumber'],
|
|
76
|
+
'is_current': value['isCurrent'],
|
|
69
77
|
};
|
|
70
78
|
}
|
|
@@ -59,6 +59,18 @@ export interface GetContentSessionDetail {
|
|
|
59
59
|
* @memberof GetContentSessionDetail
|
|
60
60
|
*/
|
|
61
61
|
durationInSeconds: number;
|
|
62
|
+
/**
|
|
63
|
+
* The learner attempt number for this content session
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof GetContentSessionDetail
|
|
66
|
+
*/
|
|
67
|
+
attemptNumber: number;
|
|
68
|
+
/**
|
|
69
|
+
* Whether this is the current attempt used for learner progress display
|
|
70
|
+
* @type {boolean}
|
|
71
|
+
* @memberof GetContentSessionDetail
|
|
72
|
+
*/
|
|
73
|
+
isCurrent: boolean;
|
|
62
74
|
/**
|
|
63
75
|
*
|
|
64
76
|
* @type {GetContentSessionDetailUserData}
|
|
@@ -58,6 +58,10 @@ function instanceOfGetContentSessionDetail(value) {
|
|
|
58
58
|
return false;
|
|
59
59
|
if (!('durationInSeconds' in value) || value['durationInSeconds'] === undefined)
|
|
60
60
|
return false;
|
|
61
|
+
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
|
|
62
|
+
return false;
|
|
63
|
+
if (!('isCurrent' in value) || value['isCurrent'] === undefined)
|
|
64
|
+
return false;
|
|
61
65
|
if (!('userData' in value) || value['userData'] === undefined)
|
|
62
66
|
return false;
|
|
63
67
|
if (!('scormSessionData' in value) || value['scormSessionData'] === undefined)
|
|
@@ -79,6 +83,8 @@ function GetContentSessionDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
79
83
|
'completionStatus': json['completion_status'],
|
|
80
84
|
'gradeStatus': json['grade_status'],
|
|
81
85
|
'durationInSeconds': json['duration_in_seconds'],
|
|
86
|
+
'attemptNumber': json['attempt_number'],
|
|
87
|
+
'isCurrent': json['is_current'],
|
|
82
88
|
'userData': (0, GetContentSessionDetailUserData_1.GetContentSessionDetailUserDataFromJSON)(json['user_data']),
|
|
83
89
|
'scormSessionData': (json['scorm_session_data'] == null ? null : json['scorm_session_data'].map(GetContentSessionDetailScormSessionDataInner_1.GetContentSessionDetailScormSessionDataInnerFromJSON)),
|
|
84
90
|
};
|
|
@@ -98,6 +104,8 @@ function GetContentSessionDetailToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
98
104
|
'completion_status': value['completionStatus'],
|
|
99
105
|
'grade_status': value['gradeStatus'],
|
|
100
106
|
'duration_in_seconds': value['durationInSeconds'],
|
|
107
|
+
'attempt_number': value['attemptNumber'],
|
|
108
|
+
'is_current': value['isCurrent'],
|
|
101
109
|
'user_data': (0, GetContentSessionDetailUserData_1.GetContentSessionDetailUserDataToJSON)(value['userData']),
|
|
102
110
|
'scorm_session_data': (value['scormSessionData'] == null ? null : value['scormSessionData'].map(GetContentSessionDetailScormSessionDataInner_1.GetContentSessionDetailScormSessionDataInnerToJSON)),
|
|
103
111
|
};
|
|
@@ -41,6 +41,30 @@ export interface GetContentSessionListItem {
|
|
|
41
41
|
* @memberof GetContentSessionListItem
|
|
42
42
|
*/
|
|
43
43
|
contentId: string;
|
|
44
|
+
/**
|
|
45
|
+
* The completion status of the content session
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof GetContentSessionListItem
|
|
48
|
+
*/
|
|
49
|
+
completionStatus: string;
|
|
50
|
+
/**
|
|
51
|
+
* The grade status of the content session
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof GetContentSessionListItem
|
|
54
|
+
*/
|
|
55
|
+
gradeStatus: string;
|
|
56
|
+
/**
|
|
57
|
+
* The learner attempt number for this content session
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof GetContentSessionListItem
|
|
60
|
+
*/
|
|
61
|
+
attemptNumber: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether this is the current attempt used for learner progress display
|
|
64
|
+
* @type {boolean}
|
|
65
|
+
* @memberof GetContentSessionListItem
|
|
66
|
+
*/
|
|
67
|
+
isCurrent: boolean;
|
|
44
68
|
/**
|
|
45
69
|
*
|
|
46
70
|
* @type {GetContentSessionDetailUserData}
|
|
@@ -32,6 +32,14 @@ function instanceOfGetContentSessionListItem(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if (!('contentId' in value) || value['contentId'] === undefined)
|
|
34
34
|
return false;
|
|
35
|
+
if (!('completionStatus' in value) || value['completionStatus'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('gradeStatus' in value) || value['gradeStatus'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('isCurrent' in value) || value['isCurrent'] === undefined)
|
|
42
|
+
return false;
|
|
35
43
|
if (!('userData' in value) || value['userData'] === undefined)
|
|
36
44
|
return false;
|
|
37
45
|
if (!('scormSessionData' in value) || value['scormSessionData'] === undefined)
|
|
@@ -50,6 +58,10 @@ function GetContentSessionListItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
58
|
'createdAt': json['created_at'],
|
|
51
59
|
'updatedAt': json['updated_at'],
|
|
52
60
|
'contentId': json['content_id'],
|
|
61
|
+
'completionStatus': json['completion_status'],
|
|
62
|
+
'gradeStatus': json['grade_status'],
|
|
63
|
+
'attemptNumber': json['attempt_number'],
|
|
64
|
+
'isCurrent': json['is_current'],
|
|
53
65
|
'userData': (0, GetContentSessionDetailUserData_1.GetContentSessionDetailUserDataFromJSON)(json['user_data']),
|
|
54
66
|
'scormSessionData': (0, GetContentSessionListItemScormSessionData_1.GetContentSessionListItemScormSessionDataFromJSON)(json['scorm_session_data']),
|
|
55
67
|
};
|
|
@@ -66,6 +78,10 @@ function GetContentSessionListItemToJSONTyped(value, ignoreDiscriminator = false
|
|
|
66
78
|
'created_at': value['createdAt'],
|
|
67
79
|
'updated_at': value['updatedAt'],
|
|
68
80
|
'content_id': value['contentId'],
|
|
81
|
+
'completion_status': value['completionStatus'],
|
|
82
|
+
'grade_status': value['gradeStatus'],
|
|
83
|
+
'attempt_number': value['attemptNumber'],
|
|
84
|
+
'is_current': value['isCurrent'],
|
|
69
85
|
'user_data': (0, GetContentSessionDetailUserData_1.GetContentSessionDetailUserDataToJSON)(value['userData']),
|
|
70
86
|
'scorm_session_data': (0, GetContentSessionListItemScormSessionData_1.GetContentSessionListItemScormSessionDataToJSON)(value['scormSessionData']),
|
|
71
87
|
};
|
|
@@ -52,6 +52,18 @@ export interface PostContentSession {
|
|
|
52
52
|
* @memberof PostContentSession
|
|
53
53
|
*/
|
|
54
54
|
playerSessionId?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* The learner attempt number for this content session
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof PostContentSession
|
|
59
|
+
*/
|
|
60
|
+
attemptNumber: number;
|
|
61
|
+
/**
|
|
62
|
+
* Whether this is the current attempt used for learner progress display
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
* @memberof PostContentSession
|
|
65
|
+
*/
|
|
66
|
+
isCurrent: boolean;
|
|
55
67
|
}
|
|
56
68
|
/**
|
|
57
69
|
* Check if a given object implements the PostContentSession interface.
|
|
@@ -33,6 +33,10 @@ function instanceOfPostContentSession(value) {
|
|
|
33
33
|
return false;
|
|
34
34
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
35
35
|
return false;
|
|
36
|
+
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('isCurrent' in value) || value['isCurrent'] === undefined)
|
|
39
|
+
return false;
|
|
36
40
|
return true;
|
|
37
41
|
}
|
|
38
42
|
function PostContentSessionFromJSON(json) {
|
|
@@ -49,6 +53,8 @@ function PostContentSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
53
|
'launchMode': (0, ContentLaunchMode_1.ContentLaunchModeFromJSON)(json['launch_mode']),
|
|
50
54
|
'createdAt': json['created_at'],
|
|
51
55
|
'playerSessionId': json['player_session_id'] == null ? undefined : json['player_session_id'],
|
|
56
|
+
'attemptNumber': json['attempt_number'],
|
|
57
|
+
'isCurrent': json['is_current'],
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
function PostContentSessionToJSON(json) {
|
|
@@ -65,5 +71,7 @@ function PostContentSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
65
71
|
'launch_mode': (0, ContentLaunchMode_1.ContentLaunchModeToJSON)(value['launchMode']),
|
|
66
72
|
'created_at': value['createdAt'],
|
|
67
73
|
'player_session_id': value['playerSessionId'],
|
|
74
|
+
'attempt_number': value['attemptNumber'],
|
|
75
|
+
'is_current': value['isCurrent'],
|
|
68
76
|
};
|
|
69
77
|
}
|