@easyedu/js-lsm-api 1.24.0 → 1.26.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 +3 -0
- package/README.md +2 -2
- package/dist/apis/CourseApi.d.ts +40 -1
- package/dist/apis/CourseApi.js +100 -0
- package/dist/apis/ReportingApi.d.ts +10 -10
- package/dist/apis/ReportingApi.js +10 -10
- package/dist/esm/apis/CourseApi.d.ts +40 -1
- package/dist/esm/apis/CourseApi.js +101 -1
- package/dist/esm/apis/ReportingApi.d.ts +10 -10
- package/dist/esm/apis/ReportingApi.js +10 -10
- package/dist/esm/models/GetCourseExport.d.ts +93 -0
- package/dist/esm/models/GetCourseExport.js +82 -0
- package/dist/esm/models/GetCourseExportList.d.ts +57 -0
- package/dist/esm/models/GetCourseExportList.js +60 -0
- package/dist/esm/models/PostCourseExport.d.ts +41 -0
- package/dist/esm/models/PostCourseExport.js +51 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/GetCourseExport.d.ts +93 -0
- package/dist/models/GetCourseExport.js +90 -0
- package/dist/models/GetCourseExportList.d.ts +57 -0
- package/dist/models/GetCourseExportList.js +67 -0
- package/dist/models/PostCourseExport.d.ts +41 -0
- package/dist/models/PostCourseExport.js +59 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +151 -0
- package/src/apis/ReportingApi.ts +10 -10
- package/src/models/GetCourseExport.ts +149 -0
- package/src/models/GetCourseExportList.ts +110 -0
- package/src/models/PostCourseExport.ts +78 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,90 @@
|
|
|
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.GetCourseExportStatusEnum = exports.GetCourseExportScormVersionEnum = void 0;
|
|
17
|
+
exports.instanceOfGetCourseExport = instanceOfGetCourseExport;
|
|
18
|
+
exports.GetCourseExportFromJSON = GetCourseExportFromJSON;
|
|
19
|
+
exports.GetCourseExportFromJSONTyped = GetCourseExportFromJSONTyped;
|
|
20
|
+
exports.GetCourseExportToJSON = GetCourseExportToJSON;
|
|
21
|
+
exports.GetCourseExportToJSONTyped = GetCourseExportToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.GetCourseExportScormVersionEnum = {
|
|
26
|
+
Scorm12: 'SCORM_1_2',
|
|
27
|
+
Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
|
|
28
|
+
Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.GetCourseExportStatusEnum = {
|
|
34
|
+
Pending: 'PENDING',
|
|
35
|
+
Processing: 'PROCESSING',
|
|
36
|
+
Completed: 'COMPLETED',
|
|
37
|
+
Failed: 'FAILED'
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the GetCourseExport interface.
|
|
41
|
+
*/
|
|
42
|
+
function instanceOfGetCourseExport(value) {
|
|
43
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('scormVersion' in value) || value['scormVersion'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function GetCourseExportFromJSON(json) {
|
|
56
|
+
return GetCourseExportFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function GetCourseExportFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'id': json['id'],
|
|
64
|
+
'courseId': json['course_id'],
|
|
65
|
+
'scormVersion': json['scorm_version'],
|
|
66
|
+
'status': json['status'],
|
|
67
|
+
'downloadUrl': json['download_url'] == null ? undefined : json['download_url'],
|
|
68
|
+
'fileSize': json['file_size'] == null ? undefined : json['file_size'],
|
|
69
|
+
'errorMessage': json['error_message'] == null ? undefined : json['error_message'],
|
|
70
|
+
'createdAt': json['created_at'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function GetCourseExportToJSON(json) {
|
|
74
|
+
return GetCourseExportToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
function GetCourseExportToJSONTyped(value, ignoreDiscriminator = false) {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'id': value['id'],
|
|
82
|
+
'course_id': value['courseId'],
|
|
83
|
+
'scorm_version': value['scormVersion'],
|
|
84
|
+
'status': value['status'],
|
|
85
|
+
'download_url': value['downloadUrl'],
|
|
86
|
+
'file_size': value['fileSize'],
|
|
87
|
+
'error_message': value['errorMessage'],
|
|
88
|
+
'created_at': value['createdAt'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { GetCourseExport } from './GetCourseExport';
|
|
13
|
+
/**
|
|
14
|
+
* A list of course exports with pagination information
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetCourseExportList
|
|
17
|
+
*/
|
|
18
|
+
export interface GetCourseExportList {
|
|
19
|
+
/**
|
|
20
|
+
* The current page number
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GetCourseExportList
|
|
23
|
+
*/
|
|
24
|
+
page: number;
|
|
25
|
+
/**
|
|
26
|
+
* The number of items per page
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GetCourseExportList
|
|
29
|
+
*/
|
|
30
|
+
pageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* The total number of pages
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GetCourseExportList
|
|
35
|
+
*/
|
|
36
|
+
totalPages: number;
|
|
37
|
+
/**
|
|
38
|
+
* The total number of items
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GetCourseExportList
|
|
41
|
+
*/
|
|
42
|
+
totalItems: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<GetCourseExport>}
|
|
46
|
+
* @memberof GetCourseExportList
|
|
47
|
+
*/
|
|
48
|
+
items: Array<GetCourseExport>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GetCourseExportList interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfGetCourseExportList(value: object): value is GetCourseExportList;
|
|
54
|
+
export declare function GetCourseExportListFromJSON(json: any): GetCourseExportList;
|
|
55
|
+
export declare function GetCourseExportListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseExportList;
|
|
56
|
+
export declare function GetCourseExportListToJSON(json: any): GetCourseExportList;
|
|
57
|
+
export declare function GetCourseExportListToJSONTyped(value?: GetCourseExportList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
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.instanceOfGetCourseExportList = instanceOfGetCourseExportList;
|
|
17
|
+
exports.GetCourseExportListFromJSON = GetCourseExportListFromJSON;
|
|
18
|
+
exports.GetCourseExportListFromJSONTyped = GetCourseExportListFromJSONTyped;
|
|
19
|
+
exports.GetCourseExportListToJSON = GetCourseExportListToJSON;
|
|
20
|
+
exports.GetCourseExportListToJSONTyped = GetCourseExportListToJSONTyped;
|
|
21
|
+
const GetCourseExport_1 = require("./GetCourseExport");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GetCourseExportList interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfGetCourseExportList(value) {
|
|
26
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function GetCourseExportListFromJSON(json) {
|
|
39
|
+
return GetCourseExportListFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function GetCourseExportListFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'page': json['page'],
|
|
47
|
+
'pageSize': json['page_size'],
|
|
48
|
+
'totalPages': json['total_pages'],
|
|
49
|
+
'totalItems': json['total_items'],
|
|
50
|
+
'items': (json['items'].map(GetCourseExport_1.GetCourseExportFromJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function GetCourseExportListToJSON(json) {
|
|
54
|
+
return GetCourseExportListToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function GetCourseExportListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'page': value['page'],
|
|
62
|
+
'page_size': value['pageSize'],
|
|
63
|
+
'total_pages': value['totalPages'],
|
|
64
|
+
'total_items': value['totalItems'],
|
|
65
|
+
'items': (value['items'].map(GetCourseExport_1.GetCourseExportToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
* Request to create a new SCORM export for a course
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PostCourseExport
|
|
16
|
+
*/
|
|
17
|
+
export interface PostCourseExport {
|
|
18
|
+
/**
|
|
19
|
+
* The SCORM version to export
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PostCourseExport
|
|
22
|
+
*/
|
|
23
|
+
scormVersion: PostCourseExportScormVersionEnum;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export declare const PostCourseExportScormVersionEnum: {
|
|
29
|
+
readonly Scorm12: "SCORM_1_2";
|
|
30
|
+
readonly Scorm20043RdEdition: "SCORM_2004_3RD_EDITION";
|
|
31
|
+
readonly Scorm20044ThEdition: "SCORM_2004_4TH_EDITION";
|
|
32
|
+
};
|
|
33
|
+
export type PostCourseExportScormVersionEnum = typeof PostCourseExportScormVersionEnum[keyof typeof PostCourseExportScormVersionEnum];
|
|
34
|
+
/**
|
|
35
|
+
* Check if a given object implements the PostCourseExport interface.
|
|
36
|
+
*/
|
|
37
|
+
export declare function instanceOfPostCourseExport(value: object): value is PostCourseExport;
|
|
38
|
+
export declare function PostCourseExportFromJSON(json: any): PostCourseExport;
|
|
39
|
+
export declare function PostCourseExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostCourseExport;
|
|
40
|
+
export declare function PostCourseExportToJSON(json: any): PostCourseExport;
|
|
41
|
+
export declare function PostCourseExportToJSONTyped(value?: PostCourseExport | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
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.PostCourseExportScormVersionEnum = void 0;
|
|
17
|
+
exports.instanceOfPostCourseExport = instanceOfPostCourseExport;
|
|
18
|
+
exports.PostCourseExportFromJSON = PostCourseExportFromJSON;
|
|
19
|
+
exports.PostCourseExportFromJSONTyped = PostCourseExportFromJSONTyped;
|
|
20
|
+
exports.PostCourseExportToJSON = PostCourseExportToJSON;
|
|
21
|
+
exports.PostCourseExportToJSONTyped = PostCourseExportToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.PostCourseExportScormVersionEnum = {
|
|
26
|
+
Scorm12: 'SCORM_1_2',
|
|
27
|
+
Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
|
|
28
|
+
Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the PostCourseExport interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfPostCourseExport(value) {
|
|
34
|
+
if (!('scormVersion' in value) || value['scormVersion'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function PostCourseExportFromJSON(json) {
|
|
39
|
+
return PostCourseExportFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function PostCourseExportFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'scormVersion': json['scorm_version'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function PostCourseExportToJSON(json) {
|
|
50
|
+
return PostCourseExportToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function PostCourseExportToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'scorm_version': value['scormVersion'],
|
|
58
|
+
};
|
|
59
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export * from './GetCourse';
|
|
|
20
20
|
export * from './GetCourseEnrollment';
|
|
21
21
|
export * from './GetCourseEnrollmentList';
|
|
22
22
|
export * from './GetCourseEnrollmentListItem';
|
|
23
|
+
export * from './GetCourseExport';
|
|
24
|
+
export * from './GetCourseExportList';
|
|
23
25
|
export * from './GetCourseList';
|
|
24
26
|
export * from './GetCourseReportingBasic';
|
|
25
27
|
export * from './GetCourseStudentReporting';
|
|
@@ -119,6 +121,7 @@ export * from './PostContentSession';
|
|
|
119
121
|
export * from './PostContentUpload';
|
|
120
122
|
export * from './PostCourse';
|
|
121
123
|
export * from './PostCourseEnrollment';
|
|
124
|
+
export * from './PostCourseExport';
|
|
122
125
|
export * from './PostLogin';
|
|
123
126
|
export * from './PostManualQuestionSelection';
|
|
124
127
|
export * from './PostModule';
|
package/dist/models/index.js
CHANGED
|
@@ -38,6 +38,8 @@ __exportStar(require("./GetCourse"), exports);
|
|
|
38
38
|
__exportStar(require("./GetCourseEnrollment"), exports);
|
|
39
39
|
__exportStar(require("./GetCourseEnrollmentList"), exports);
|
|
40
40
|
__exportStar(require("./GetCourseEnrollmentListItem"), exports);
|
|
41
|
+
__exportStar(require("./GetCourseExport"), exports);
|
|
42
|
+
__exportStar(require("./GetCourseExportList"), exports);
|
|
41
43
|
__exportStar(require("./GetCourseList"), exports);
|
|
42
44
|
__exportStar(require("./GetCourseReportingBasic"), exports);
|
|
43
45
|
__exportStar(require("./GetCourseStudentReporting"), exports);
|
|
@@ -137,6 +139,7 @@ __exportStar(require("./PostContentSession"), exports);
|
|
|
137
139
|
__exportStar(require("./PostContentUpload"), exports);
|
|
138
140
|
__exportStar(require("./PostCourse"), exports);
|
|
139
141
|
__exportStar(require("./PostCourseEnrollment"), exports);
|
|
142
|
+
__exportStar(require("./PostCourseExport"), exports);
|
|
140
143
|
__exportStar(require("./PostLogin"), exports);
|
|
141
144
|
__exportStar(require("./PostManualQuestionSelection"), exports);
|
|
142
145
|
__exportStar(require("./PostModule"), exports);
|
package/package.json
CHANGED
package/src/apis/CourseApi.ts
CHANGED
|
@@ -18,10 +18,13 @@ import type {
|
|
|
18
18
|
GetCourse,
|
|
19
19
|
GetCourseEnrollment,
|
|
20
20
|
GetCourseEnrollmentList,
|
|
21
|
+
GetCourseExport,
|
|
22
|
+
GetCourseExportList,
|
|
21
23
|
GetCourseList,
|
|
22
24
|
GetCourseReportingBasic,
|
|
23
25
|
PostCourse,
|
|
24
26
|
PostCourseEnrollment,
|
|
27
|
+
PostCourseExport,
|
|
25
28
|
PutCourse,
|
|
26
29
|
PutCourseEnrollment,
|
|
27
30
|
} from '../models/index';
|
|
@@ -32,6 +35,10 @@ import {
|
|
|
32
35
|
GetCourseEnrollmentToJSON,
|
|
33
36
|
GetCourseEnrollmentListFromJSON,
|
|
34
37
|
GetCourseEnrollmentListToJSON,
|
|
38
|
+
GetCourseExportFromJSON,
|
|
39
|
+
GetCourseExportToJSON,
|
|
40
|
+
GetCourseExportListFromJSON,
|
|
41
|
+
GetCourseExportListToJSON,
|
|
35
42
|
GetCourseListFromJSON,
|
|
36
43
|
GetCourseListToJSON,
|
|
37
44
|
GetCourseReportingBasicFromJSON,
|
|
@@ -40,6 +47,8 @@ import {
|
|
|
40
47
|
PostCourseToJSON,
|
|
41
48
|
PostCourseEnrollmentFromJSON,
|
|
42
49
|
PostCourseEnrollmentToJSON,
|
|
50
|
+
PostCourseExportFromJSON,
|
|
51
|
+
PostCourseExportToJSON,
|
|
43
52
|
PutCourseFromJSON,
|
|
44
53
|
PutCourseToJSON,
|
|
45
54
|
PutCourseEnrollmentFromJSON,
|
|
@@ -62,6 +71,17 @@ export interface GetCourseEnrollmentsRequest {
|
|
|
62
71
|
pageSize?: number;
|
|
63
72
|
}
|
|
64
73
|
|
|
74
|
+
export interface GetCourseExportRequest {
|
|
75
|
+
courseId: string;
|
|
76
|
+
exportId: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface GetCourseExportsRequest {
|
|
80
|
+
courseId: string;
|
|
81
|
+
page?: number;
|
|
82
|
+
pageSize?: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
export interface GetCourseListRequest {
|
|
66
86
|
enrolled?: boolean;
|
|
67
87
|
}
|
|
@@ -79,6 +99,11 @@ export interface PostCourseEnrollmentRequest {
|
|
|
79
99
|
postCourseEnrollment: PostCourseEnrollment;
|
|
80
100
|
}
|
|
81
101
|
|
|
102
|
+
export interface PostCourseExportRequest {
|
|
103
|
+
courseId: string;
|
|
104
|
+
postCourseExport: PostCourseExport;
|
|
105
|
+
}
|
|
106
|
+
|
|
82
107
|
export interface PutCourseRequest {
|
|
83
108
|
courseId: string;
|
|
84
109
|
putCourse: Omit<PutCourse, 'id'>;
|
|
@@ -213,6 +238,87 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
213
238
|
return await response.value();
|
|
214
239
|
}
|
|
215
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Get details of a specific SCORM export
|
|
243
|
+
*/
|
|
244
|
+
async getCourseExportRaw(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>> {
|
|
245
|
+
if (requestParameters['courseId'] == null) {
|
|
246
|
+
throw new runtime.RequiredError(
|
|
247
|
+
'courseId',
|
|
248
|
+
'Required parameter "courseId" was null or undefined when calling getCourseExport().'
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (requestParameters['exportId'] == null) {
|
|
253
|
+
throw new runtime.RequiredError(
|
|
254
|
+
'exportId',
|
|
255
|
+
'Required parameter "exportId" was null or undefined when calling getCourseExport().'
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const queryParameters: any = {};
|
|
260
|
+
|
|
261
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
262
|
+
|
|
263
|
+
const response = await this.request({
|
|
264
|
+
path: `/courses/{courseId}/exports/{exportId}`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"exportId"}}`, encodeURIComponent(String(requestParameters['exportId']))),
|
|
265
|
+
method: 'GET',
|
|
266
|
+
headers: headerParameters,
|
|
267
|
+
query: queryParameters,
|
|
268
|
+
}, initOverrides);
|
|
269
|
+
|
|
270
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportFromJSON(jsonValue));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Get details of a specific SCORM export
|
|
275
|
+
*/
|
|
276
|
+
async getCourseExport(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport> {
|
|
277
|
+
const response = await this.getCourseExportRaw(requestParameters, initOverrides);
|
|
278
|
+
return await response.value();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* List all SCORM exports for a course
|
|
283
|
+
*/
|
|
284
|
+
async getCourseExportsRaw(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExportList>> {
|
|
285
|
+
if (requestParameters['courseId'] == null) {
|
|
286
|
+
throw new runtime.RequiredError(
|
|
287
|
+
'courseId',
|
|
288
|
+
'Required parameter "courseId" was null or undefined when calling getCourseExports().'
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const queryParameters: any = {};
|
|
293
|
+
|
|
294
|
+
if (requestParameters['page'] != null) {
|
|
295
|
+
queryParameters['page'] = requestParameters['page'];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (requestParameters['pageSize'] != null) {
|
|
299
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
303
|
+
|
|
304
|
+
const response = await this.request({
|
|
305
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
306
|
+
method: 'GET',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
}, initOverrides);
|
|
310
|
+
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportListFromJSON(jsonValue));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* List all SCORM exports for a course
|
|
316
|
+
*/
|
|
317
|
+
async getCourseExports(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExportList> {
|
|
318
|
+
const response = await this.getCourseExportsRaw(requestParameters, initOverrides);
|
|
319
|
+
return await response.value();
|
|
320
|
+
}
|
|
321
|
+
|
|
216
322
|
/**
|
|
217
323
|
* get course list
|
|
218
324
|
*/
|
|
@@ -355,6 +461,51 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
355
461
|
return await response.value();
|
|
356
462
|
}
|
|
357
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Actual SCORM package generation is not yet implemented (TODO) - Export metadata should be persisted to a database table (TODO) - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
|
|
466
|
+
* Create a new SCORM export for a course
|
|
467
|
+
*/
|
|
468
|
+
async postCourseExportRaw(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>> {
|
|
469
|
+
if (requestParameters['courseId'] == null) {
|
|
470
|
+
throw new runtime.RequiredError(
|
|
471
|
+
'courseId',
|
|
472
|
+
'Required parameter "courseId" was null or undefined when calling postCourseExport().'
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
if (requestParameters['postCourseExport'] == null) {
|
|
477
|
+
throw new runtime.RequiredError(
|
|
478
|
+
'postCourseExport',
|
|
479
|
+
'Required parameter "postCourseExport" was null or undefined when calling postCourseExport().'
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const queryParameters: any = {};
|
|
484
|
+
|
|
485
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
486
|
+
|
|
487
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
488
|
+
|
|
489
|
+
const response = await this.request({
|
|
490
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
491
|
+
method: 'POST',
|
|
492
|
+
headers: headerParameters,
|
|
493
|
+
query: queryParameters,
|
|
494
|
+
body: PostCourseExportToJSON(requestParameters['postCourseExport']),
|
|
495
|
+
}, initOverrides);
|
|
496
|
+
|
|
497
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportFromJSON(jsonValue));
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Actual SCORM package generation is not yet implemented (TODO) - Export metadata should be persisted to a database table (TODO) - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
|
|
502
|
+
* Create a new SCORM export for a course
|
|
503
|
+
*/
|
|
504
|
+
async postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport> {
|
|
505
|
+
const response = await this.postCourseExportRaw(requestParameters, initOverrides);
|
|
506
|
+
return await response.value();
|
|
507
|
+
}
|
|
508
|
+
|
|
358
509
|
/**
|
|
359
510
|
* Update a course by id
|
|
360
511
|
*/
|
package/src/apis/ReportingApi.ts
CHANGED
|
@@ -103,7 +103,7 @@ export interface GetPortalStudentReportingRequest {
|
|
|
103
103
|
export class ReportingApi extends runtime.BaseAPI {
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* Get detailed grade information for a specific student and content
|
|
106
|
+
* Get detailed grade information for a specific student and content (can use \'current\' for studentId)
|
|
107
107
|
*/
|
|
108
108
|
async getContentGradeDetailRaw(requestParameters: GetContentGradeDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentGradeDetail>> {
|
|
109
109
|
if (requestParameters['courseId'] == null) {
|
|
@@ -149,7 +149,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* Get detailed grade information for a specific student and content
|
|
152
|
+
* Get detailed grade information for a specific student and content (can use \'current\' for studentId)
|
|
153
153
|
*/
|
|
154
154
|
async getContentGradeDetail(requestParameters: GetContentGradeDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentGradeDetail> {
|
|
155
155
|
const response = await this.getContentGradeDetailRaw(requestParameters, initOverrides);
|
|
@@ -296,7 +296,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
/**
|
|
299
|
-
* Get student-specific reporting for a course
|
|
299
|
+
* Get student-specific reporting for a course (can use \'current\' for studentId)
|
|
300
300
|
*/
|
|
301
301
|
async getCourseStudentReportingRaw(requestParameters: GetCourseStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseStudentReporting>> {
|
|
302
302
|
if (requestParameters['courseId'] == null) {
|
|
@@ -328,7 +328,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
* Get student-specific reporting for a course
|
|
331
|
+
* Get student-specific reporting for a course (can use \'current\' for studentId)
|
|
332
332
|
*/
|
|
333
333
|
async getCourseStudentReporting(requestParameters: GetCourseStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseStudentReporting> {
|
|
334
334
|
const response = await this.getCourseStudentReportingRaw(requestParameters, initOverrides);
|
|
@@ -376,7 +376,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
|
-
* Get student-specific reporting for a module
|
|
379
|
+
* Get student-specific reporting for a module (can use \'current\' for studentId)
|
|
380
380
|
*/
|
|
381
381
|
async getModuleStudentReportingRaw(requestParameters: GetModuleStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModuleStudentReporting>> {
|
|
382
382
|
if (requestParameters['courseId'] == null) {
|
|
@@ -415,7 +415,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
|
-
* Get student-specific reporting for a module
|
|
418
|
+
* Get student-specific reporting for a module (can use \'current\' for studentId)
|
|
419
419
|
*/
|
|
420
420
|
async getModuleStudentReporting(requestParameters: GetModuleStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModuleStudentReporting> {
|
|
421
421
|
const response = await this.getModuleStudentReportingRaw(requestParameters, initOverrides);
|
|
@@ -423,7 +423,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
/**
|
|
426
|
-
* Get basic reporting for a portal
|
|
426
|
+
* Get basic reporting for a portal (can use \'current\' for portalId)
|
|
427
427
|
*/
|
|
428
428
|
async getPortalBasicReportingRaw(requestParameters: GetPortalBasicReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalBasicReporting>> {
|
|
429
429
|
if (requestParameters['portalId'] == null) {
|
|
@@ -448,7 +448,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
/**
|
|
451
|
-
* Get basic reporting for a portal
|
|
451
|
+
* Get basic reporting for a portal (can use \'current\' for portalId)
|
|
452
452
|
*/
|
|
453
453
|
async getPortalBasicReporting(requestParameters: GetPortalBasicReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalBasicReporting> {
|
|
454
454
|
const response = await this.getPortalBasicReportingRaw(requestParameters, initOverrides);
|
|
@@ -456,7 +456,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
/**
|
|
459
|
-
* Get student reporting for a portal
|
|
459
|
+
* Get student reporting for a portal (can use \'current\' for portalId and studentId)
|
|
460
460
|
*/
|
|
461
461
|
async getPortalStudentReportingRaw(requestParameters: GetPortalStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalStudentReporting>> {
|
|
462
462
|
if (requestParameters['portalId'] == null) {
|
|
@@ -488,7 +488,7 @@ export class ReportingApi extends runtime.BaseAPI {
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
/**
|
|
491
|
-
* Get student reporting for a portal
|
|
491
|
+
* Get student reporting for a portal (can use \'current\' for portalId and studentId)
|
|
492
492
|
*/
|
|
493
493
|
async getPortalStudentReporting(requestParameters: GetPortalStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalStudentReporting> {
|
|
494
494
|
const response = await this.getPortalStudentReportingRaw(requestParameters, initOverrides);
|