@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.
@@ -0,0 +1,149 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Details of a course SCORM export
18
+ * @export
19
+ * @interface GetCourseExport
20
+ */
21
+ export interface GetCourseExport {
22
+ /**
23
+ * Unique identifier for the export
24
+ * @type {string}
25
+ * @memberof GetCourseExport
26
+ */
27
+ id: string;
28
+ /**
29
+ * ID of the course being exported
30
+ * @type {string}
31
+ * @memberof GetCourseExport
32
+ */
33
+ courseId: string;
34
+ /**
35
+ * The SCORM version to export
36
+ * @type {string}
37
+ * @memberof GetCourseExport
38
+ */
39
+ scormVersion: GetCourseExportScormVersionEnum;
40
+ /**
41
+ * Current status of the export generation
42
+ * @type {string}
43
+ * @memberof GetCourseExport
44
+ */
45
+ status: GetCourseExportStatusEnum;
46
+ /**
47
+ * URL to download the export zip file (null if not yet completed)
48
+ * @type {string}
49
+ * @memberof GetCourseExport
50
+ */
51
+ downloadUrl?: string | null;
52
+ /**
53
+ * Size of the export file in bytes (null if not yet completed)
54
+ * @type {number}
55
+ * @memberof GetCourseExport
56
+ */
57
+ fileSize?: number | null;
58
+ /**
59
+ * Error message if status is FAILED
60
+ * @type {string}
61
+ * @memberof GetCourseExport
62
+ */
63
+ errorMessage?: string | null;
64
+ /**
65
+ * Unix epoch timestamp when the export was created
66
+ * @type {number}
67
+ * @memberof GetCourseExport
68
+ */
69
+ createdAt: number;
70
+ }
71
+
72
+
73
+ /**
74
+ * @export
75
+ */
76
+ export const GetCourseExportScormVersionEnum = {
77
+ Scorm12: 'SCORM_1_2',
78
+ Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
79
+ Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
80
+ } as const;
81
+ export type GetCourseExportScormVersionEnum = typeof GetCourseExportScormVersionEnum[keyof typeof GetCourseExportScormVersionEnum];
82
+
83
+ /**
84
+ * @export
85
+ */
86
+ export const GetCourseExportStatusEnum = {
87
+ Pending: 'PENDING',
88
+ Processing: 'PROCESSING',
89
+ Completed: 'COMPLETED',
90
+ Failed: 'FAILED'
91
+ } as const;
92
+ export type GetCourseExportStatusEnum = typeof GetCourseExportStatusEnum[keyof typeof GetCourseExportStatusEnum];
93
+
94
+
95
+ /**
96
+ * Check if a given object implements the GetCourseExport interface.
97
+ */
98
+ export function instanceOfGetCourseExport(value: object): value is GetCourseExport {
99
+ if (!('id' in value) || value['id'] === undefined) return false;
100
+ if (!('courseId' in value) || value['courseId'] === undefined) return false;
101
+ if (!('scormVersion' in value) || value['scormVersion'] === undefined) return false;
102
+ if (!('status' in value) || value['status'] === undefined) return false;
103
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
104
+ return true;
105
+ }
106
+
107
+ export function GetCourseExportFromJSON(json: any): GetCourseExport {
108
+ return GetCourseExportFromJSONTyped(json, false);
109
+ }
110
+
111
+ export function GetCourseExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseExport {
112
+ if (json == null) {
113
+ return json;
114
+ }
115
+ return {
116
+
117
+ 'id': json['id'],
118
+ 'courseId': json['course_id'],
119
+ 'scormVersion': json['scorm_version'],
120
+ 'status': json['status'],
121
+ 'downloadUrl': json['download_url'] == null ? undefined : json['download_url'],
122
+ 'fileSize': json['file_size'] == null ? undefined : json['file_size'],
123
+ 'errorMessage': json['error_message'] == null ? undefined : json['error_message'],
124
+ 'createdAt': json['created_at'],
125
+ };
126
+ }
127
+
128
+ export function GetCourseExportToJSON(json: any): GetCourseExport {
129
+ return GetCourseExportToJSONTyped(json, false);
130
+ }
131
+
132
+ export function GetCourseExportToJSONTyped(value?: GetCourseExport | null, ignoreDiscriminator: boolean = false): any {
133
+ if (value == null) {
134
+ return value;
135
+ }
136
+
137
+ return {
138
+
139
+ 'id': value['id'],
140
+ 'course_id': value['courseId'],
141
+ 'scorm_version': value['scormVersion'],
142
+ 'status': value['status'],
143
+ 'download_url': value['downloadUrl'],
144
+ 'file_size': value['fileSize'],
145
+ 'error_message': value['errorMessage'],
146
+ 'created_at': value['createdAt'],
147
+ };
148
+ }
149
+
@@ -0,0 +1,110 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GetCourseExport } from './GetCourseExport';
17
+ import {
18
+ GetCourseExportFromJSON,
19
+ GetCourseExportFromJSONTyped,
20
+ GetCourseExportToJSON,
21
+ GetCourseExportToJSONTyped,
22
+ } from './GetCourseExport';
23
+
24
+ /**
25
+ * A list of course exports with pagination information
26
+ * @export
27
+ * @interface GetCourseExportList
28
+ */
29
+ export interface GetCourseExportList {
30
+ /**
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetCourseExportList
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetCourseExportList
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetCourseExportList
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of items
50
+ * @type {number}
51
+ * @memberof GetCourseExportList
52
+ */
53
+ totalItems: number;
54
+ /**
55
+ *
56
+ * @type {Array<GetCourseExport>}
57
+ * @memberof GetCourseExportList
58
+ */
59
+ items: Array<GetCourseExport>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the GetCourseExportList interface.
64
+ */
65
+ export function instanceOfGetCourseExportList(value: object): value is GetCourseExportList {
66
+ if (!('page' in value) || value['page'] === undefined) return false;
67
+ if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
68
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
69
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
70
+ if (!('items' in value) || value['items'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetCourseExportListFromJSON(json: any): GetCourseExportList {
75
+ return GetCourseExportListFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetCourseExportListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseExportList {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'page': json['page'],
85
+ 'pageSize': json['page_size'],
86
+ 'totalPages': json['total_pages'],
87
+ 'totalItems': json['total_items'],
88
+ 'items': ((json['items'] as Array<any>).map(GetCourseExportFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function GetCourseExportListToJSON(json: any): GetCourseExportList {
93
+ return GetCourseExportListToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetCourseExportListToJSONTyped(value?: GetCourseExportList | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'page': value['page'],
104
+ 'page_size': value['pageSize'],
105
+ 'total_pages': value['totalPages'],
106
+ 'total_items': value['totalItems'],
107
+ 'items': ((value['items'] as Array<any>).map(GetCourseExportToJSON)),
108
+ };
109
+ }
110
+
@@ -0,0 +1,78 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Request to create a new SCORM export for a course
18
+ * @export
19
+ * @interface PostCourseExport
20
+ */
21
+ export interface PostCourseExport {
22
+ /**
23
+ * The SCORM version to export
24
+ * @type {string}
25
+ * @memberof PostCourseExport
26
+ */
27
+ scormVersion: PostCourseExportScormVersionEnum;
28
+ }
29
+
30
+
31
+ /**
32
+ * @export
33
+ */
34
+ export const PostCourseExportScormVersionEnum = {
35
+ Scorm12: 'SCORM_1_2',
36
+ Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
37
+ Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
38
+ } as const;
39
+ export type PostCourseExportScormVersionEnum = typeof PostCourseExportScormVersionEnum[keyof typeof PostCourseExportScormVersionEnum];
40
+
41
+
42
+ /**
43
+ * Check if a given object implements the PostCourseExport interface.
44
+ */
45
+ export function instanceOfPostCourseExport(value: object): value is PostCourseExport {
46
+ if (!('scormVersion' in value) || value['scormVersion'] === undefined) return false;
47
+ return true;
48
+ }
49
+
50
+ export function PostCourseExportFromJSON(json: any): PostCourseExport {
51
+ return PostCourseExportFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function PostCourseExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostCourseExport {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'scormVersion': json['scorm_version'],
61
+ };
62
+ }
63
+
64
+ export function PostCourseExportToJSON(json: any): PostCourseExport {
65
+ return PostCourseExportToJSONTyped(json, false);
66
+ }
67
+
68
+ export function PostCourseExportToJSONTyped(value?: PostCourseExport | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+
73
+ return {
74
+
75
+ 'scorm_version': value['scormVersion'],
76
+ };
77
+ }
78
+
@@ -22,6 +22,8 @@ export * from './GetCourse';
22
22
  export * from './GetCourseEnrollment';
23
23
  export * from './GetCourseEnrollmentList';
24
24
  export * from './GetCourseEnrollmentListItem';
25
+ export * from './GetCourseExport';
26
+ export * from './GetCourseExportList';
25
27
  export * from './GetCourseList';
26
28
  export * from './GetCourseReportingBasic';
27
29
  export * from './GetCourseStudentReporting';
@@ -121,6 +123,7 @@ export * from './PostContentSession';
121
123
  export * from './PostContentUpload';
122
124
  export * from './PostCourse';
123
125
  export * from './PostCourseEnrollment';
126
+ export * from './PostCourseExport';
124
127
  export * from './PostLogin';
125
128
  export * from './PostManualQuestionSelection';
126
129
  export * from './PostModule';