@easyedu/js-lsm-api 1.25.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/esm/apis/CourseApi.d.ts +40 -1
- package/dist/esm/apis/CourseApi.js +101 -1
- 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/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
package/.openapi-generator/FILES
CHANGED
|
@@ -36,6 +36,8 @@ src/models/GetCourse.ts
|
|
|
36
36
|
src/models/GetCourseEnrollment.ts
|
|
37
37
|
src/models/GetCourseEnrollmentList.ts
|
|
38
38
|
src/models/GetCourseEnrollmentListItem.ts
|
|
39
|
+
src/models/GetCourseExport.ts
|
|
40
|
+
src/models/GetCourseExportList.ts
|
|
39
41
|
src/models/GetCourseList.ts
|
|
40
42
|
src/models/GetCourseReportingBasic.ts
|
|
41
43
|
src/models/GetCourseStudentReporting.ts
|
|
@@ -135,6 +137,7 @@ src/models/PostContentSession.ts
|
|
|
135
137
|
src/models/PostContentUpload.ts
|
|
136
138
|
src/models/PostCourse.ts
|
|
137
139
|
src/models/PostCourseEnrollment.ts
|
|
140
|
+
src/models/PostCourseExport.ts
|
|
138
141
|
src/models/PostLogin.ts
|
|
139
142
|
src/models/PostManualQuestionSelection.ts
|
|
140
143
|
src/models/PostModule.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @easyedu/js-lsm-api@1.
|
|
1
|
+
## @easyedu/js-lsm-api@1.26.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @easyedu/js-lsm-api@1.
|
|
39
|
+
npm install @easyedu/js-lsm-api@1.26.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/CourseApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
13
|
+
import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
14
14
|
export interface GetCourseRequest {
|
|
15
15
|
courseId: string;
|
|
16
16
|
}
|
|
@@ -24,6 +24,15 @@ export interface GetCourseEnrollmentsRequest {
|
|
|
24
24
|
page?: number;
|
|
25
25
|
pageSize?: number;
|
|
26
26
|
}
|
|
27
|
+
export interface GetCourseExportRequest {
|
|
28
|
+
courseId: string;
|
|
29
|
+
exportId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetCourseExportsRequest {
|
|
32
|
+
courseId: string;
|
|
33
|
+
page?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
}
|
|
27
36
|
export interface GetCourseListRequest {
|
|
28
37
|
enrolled?: boolean;
|
|
29
38
|
}
|
|
@@ -37,6 +46,10 @@ export interface PostCourseEnrollmentRequest {
|
|
|
37
46
|
courseId: string;
|
|
38
47
|
postCourseEnrollment: PostCourseEnrollment;
|
|
39
48
|
}
|
|
49
|
+
export interface PostCourseExportRequest {
|
|
50
|
+
courseId: string;
|
|
51
|
+
postCourseExport: PostCourseExport;
|
|
52
|
+
}
|
|
40
53
|
export interface PutCourseRequest {
|
|
41
54
|
courseId: string;
|
|
42
55
|
putCourse: Omit<PutCourse, 'id'>;
|
|
@@ -74,6 +87,22 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
74
87
|
* Get course enrollments
|
|
75
88
|
*/
|
|
76
89
|
getCourseEnrollments(requestParameters: GetCourseEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollmentList>;
|
|
90
|
+
/**
|
|
91
|
+
* Get details of a specific SCORM export
|
|
92
|
+
*/
|
|
93
|
+
getCourseExportRaw(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>>;
|
|
94
|
+
/**
|
|
95
|
+
* Get details of a specific SCORM export
|
|
96
|
+
*/
|
|
97
|
+
getCourseExport(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
98
|
+
/**
|
|
99
|
+
* List all SCORM exports for a course
|
|
100
|
+
*/
|
|
101
|
+
getCourseExportsRaw(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExportList>>;
|
|
102
|
+
/**
|
|
103
|
+
* List all SCORM exports for a course
|
|
104
|
+
*/
|
|
105
|
+
getCourseExports(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExportList>;
|
|
77
106
|
/**
|
|
78
107
|
* get course list
|
|
79
108
|
*/
|
|
@@ -106,6 +135,16 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
106
135
|
* Create a new course enrollment
|
|
107
136
|
*/
|
|
108
137
|
postCourseEnrollment(requestParameters: PostCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollment>;
|
|
138
|
+
/**
|
|
139
|
+
* 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
|
|
140
|
+
* Create a new SCORM export for a course
|
|
141
|
+
*/
|
|
142
|
+
postCourseExportRaw(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>>;
|
|
143
|
+
/**
|
|
144
|
+
* 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
|
|
145
|
+
* Create a new SCORM export for a course
|
|
146
|
+
*/
|
|
147
|
+
postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
109
148
|
/**
|
|
110
149
|
* Update a course by id
|
|
111
150
|
*/
|
package/dist/apis/CourseApi.js
CHANGED
|
@@ -125,6 +125,71 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
125
125
|
return yield response.value();
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Get details of a specific SCORM export
|
|
130
|
+
*/
|
|
131
|
+
getCourseExportRaw(requestParameters, initOverrides) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
if (requestParameters['courseId'] == null) {
|
|
134
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseExport().');
|
|
135
|
+
}
|
|
136
|
+
if (requestParameters['exportId'] == null) {
|
|
137
|
+
throw new runtime.RequiredError('exportId', 'Required parameter "exportId" was null or undefined when calling getCourseExport().');
|
|
138
|
+
}
|
|
139
|
+
const queryParameters = {};
|
|
140
|
+
const headerParameters = {};
|
|
141
|
+
const response = yield this.request({
|
|
142
|
+
path: `/courses/{courseId}/exports/{exportId}`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"exportId"}}`, encodeURIComponent(String(requestParameters['exportId']))),
|
|
143
|
+
method: 'GET',
|
|
144
|
+
headers: headerParameters,
|
|
145
|
+
query: queryParameters,
|
|
146
|
+
}, initOverrides);
|
|
147
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseExportFromJSON)(jsonValue));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Get details of a specific SCORM export
|
|
152
|
+
*/
|
|
153
|
+
getCourseExport(requestParameters, initOverrides) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const response = yield this.getCourseExportRaw(requestParameters, initOverrides);
|
|
156
|
+
return yield response.value();
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* List all SCORM exports for a course
|
|
161
|
+
*/
|
|
162
|
+
getCourseExportsRaw(requestParameters, initOverrides) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
if (requestParameters['courseId'] == null) {
|
|
165
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseExports().');
|
|
166
|
+
}
|
|
167
|
+
const queryParameters = {};
|
|
168
|
+
if (requestParameters['page'] != null) {
|
|
169
|
+
queryParameters['page'] = requestParameters['page'];
|
|
170
|
+
}
|
|
171
|
+
if (requestParameters['pageSize'] != null) {
|
|
172
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
173
|
+
}
|
|
174
|
+
const headerParameters = {};
|
|
175
|
+
const response = yield this.request({
|
|
176
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
177
|
+
method: 'GET',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
}, initOverrides);
|
|
181
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseExportListFromJSON)(jsonValue));
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* List all SCORM exports for a course
|
|
186
|
+
*/
|
|
187
|
+
getCourseExports(requestParameters, initOverrides) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
const response = yield this.getCourseExportsRaw(requestParameters, initOverrides);
|
|
190
|
+
return yield response.value();
|
|
191
|
+
});
|
|
192
|
+
}
|
|
128
193
|
/**
|
|
129
194
|
* get course list
|
|
130
195
|
*/
|
|
@@ -244,6 +309,41 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
244
309
|
return yield response.value();
|
|
245
310
|
});
|
|
246
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* 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
|
|
314
|
+
* Create a new SCORM export for a course
|
|
315
|
+
*/
|
|
316
|
+
postCourseExportRaw(requestParameters, initOverrides) {
|
|
317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
+
if (requestParameters['courseId'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseExport().');
|
|
320
|
+
}
|
|
321
|
+
if (requestParameters['postCourseExport'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('postCourseExport', 'Required parameter "postCourseExport" was null or undefined when calling postCourseExport().');
|
|
323
|
+
}
|
|
324
|
+
const queryParameters = {};
|
|
325
|
+
const headerParameters = {};
|
|
326
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
327
|
+
const response = yield this.request({
|
|
328
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
329
|
+
method: 'POST',
|
|
330
|
+
headers: headerParameters,
|
|
331
|
+
query: queryParameters,
|
|
332
|
+
body: (0, index_1.PostCourseExportToJSON)(requestParameters['postCourseExport']),
|
|
333
|
+
}, initOverrides);
|
|
334
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseExportFromJSON)(jsonValue));
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* 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
|
|
339
|
+
* Create a new SCORM export for a course
|
|
340
|
+
*/
|
|
341
|
+
postCourseExport(requestParameters, initOverrides) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
const response = yield this.postCourseExportRaw(requestParameters, initOverrides);
|
|
344
|
+
return yield response.value();
|
|
345
|
+
});
|
|
346
|
+
}
|
|
247
347
|
/**
|
|
248
348
|
* Update a course by id
|
|
249
349
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
13
|
+
import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
14
14
|
export interface GetCourseRequest {
|
|
15
15
|
courseId: string;
|
|
16
16
|
}
|
|
@@ -24,6 +24,15 @@ export interface GetCourseEnrollmentsRequest {
|
|
|
24
24
|
page?: number;
|
|
25
25
|
pageSize?: number;
|
|
26
26
|
}
|
|
27
|
+
export interface GetCourseExportRequest {
|
|
28
|
+
courseId: string;
|
|
29
|
+
exportId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetCourseExportsRequest {
|
|
32
|
+
courseId: string;
|
|
33
|
+
page?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
}
|
|
27
36
|
export interface GetCourseListRequest {
|
|
28
37
|
enrolled?: boolean;
|
|
29
38
|
}
|
|
@@ -37,6 +46,10 @@ export interface PostCourseEnrollmentRequest {
|
|
|
37
46
|
courseId: string;
|
|
38
47
|
postCourseEnrollment: PostCourseEnrollment;
|
|
39
48
|
}
|
|
49
|
+
export interface PostCourseExportRequest {
|
|
50
|
+
courseId: string;
|
|
51
|
+
postCourseExport: PostCourseExport;
|
|
52
|
+
}
|
|
40
53
|
export interface PutCourseRequest {
|
|
41
54
|
courseId: string;
|
|
42
55
|
putCourse: Omit<PutCourse, 'id'>;
|
|
@@ -74,6 +87,22 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
74
87
|
* Get course enrollments
|
|
75
88
|
*/
|
|
76
89
|
getCourseEnrollments(requestParameters: GetCourseEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollmentList>;
|
|
90
|
+
/**
|
|
91
|
+
* Get details of a specific SCORM export
|
|
92
|
+
*/
|
|
93
|
+
getCourseExportRaw(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>>;
|
|
94
|
+
/**
|
|
95
|
+
* Get details of a specific SCORM export
|
|
96
|
+
*/
|
|
97
|
+
getCourseExport(requestParameters: GetCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
98
|
+
/**
|
|
99
|
+
* List all SCORM exports for a course
|
|
100
|
+
*/
|
|
101
|
+
getCourseExportsRaw(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExportList>>;
|
|
102
|
+
/**
|
|
103
|
+
* List all SCORM exports for a course
|
|
104
|
+
*/
|
|
105
|
+
getCourseExports(requestParameters: GetCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExportList>;
|
|
77
106
|
/**
|
|
78
107
|
* get course list
|
|
79
108
|
*/
|
|
@@ -106,6 +135,16 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
106
135
|
* Create a new course enrollment
|
|
107
136
|
*/
|
|
108
137
|
postCourseEnrollment(requestParameters: PostCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollment>;
|
|
138
|
+
/**
|
|
139
|
+
* 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
|
|
140
|
+
* Create a new SCORM export for a course
|
|
141
|
+
*/
|
|
142
|
+
postCourseExportRaw(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>>;
|
|
143
|
+
/**
|
|
144
|
+
* 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
|
|
145
|
+
* Create a new SCORM export for a course
|
|
146
|
+
*/
|
|
147
|
+
postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
109
148
|
/**
|
|
110
149
|
* Update a course by id
|
|
111
150
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
|
|
24
|
+
import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -122,6 +122,71 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
122
122
|
return yield response.value();
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Get details of a specific SCORM export
|
|
127
|
+
*/
|
|
128
|
+
getCourseExportRaw(requestParameters, initOverrides) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
if (requestParameters['courseId'] == null) {
|
|
131
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseExport().');
|
|
132
|
+
}
|
|
133
|
+
if (requestParameters['exportId'] == null) {
|
|
134
|
+
throw new runtime.RequiredError('exportId', 'Required parameter "exportId" was null or undefined when calling getCourseExport().');
|
|
135
|
+
}
|
|
136
|
+
const queryParameters = {};
|
|
137
|
+
const headerParameters = {};
|
|
138
|
+
const response = yield this.request({
|
|
139
|
+
path: `/courses/{courseId}/exports/{exportId}`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"exportId"}}`, encodeURIComponent(String(requestParameters['exportId']))),
|
|
140
|
+
method: 'GET',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportFromJSON(jsonValue));
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Get details of a specific SCORM export
|
|
149
|
+
*/
|
|
150
|
+
getCourseExport(requestParameters, initOverrides) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const response = yield this.getCourseExportRaw(requestParameters, initOverrides);
|
|
153
|
+
return yield response.value();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* List all SCORM exports for a course
|
|
158
|
+
*/
|
|
159
|
+
getCourseExportsRaw(requestParameters, initOverrides) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
if (requestParameters['courseId'] == null) {
|
|
162
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseExports().');
|
|
163
|
+
}
|
|
164
|
+
const queryParameters = {};
|
|
165
|
+
if (requestParameters['page'] != null) {
|
|
166
|
+
queryParameters['page'] = requestParameters['page'];
|
|
167
|
+
}
|
|
168
|
+
if (requestParameters['pageSize'] != null) {
|
|
169
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
170
|
+
}
|
|
171
|
+
const headerParameters = {};
|
|
172
|
+
const response = yield this.request({
|
|
173
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
174
|
+
method: 'GET',
|
|
175
|
+
headers: headerParameters,
|
|
176
|
+
query: queryParameters,
|
|
177
|
+
}, initOverrides);
|
|
178
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportListFromJSON(jsonValue));
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* List all SCORM exports for a course
|
|
183
|
+
*/
|
|
184
|
+
getCourseExports(requestParameters, initOverrides) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const response = yield this.getCourseExportsRaw(requestParameters, initOverrides);
|
|
187
|
+
return yield response.value();
|
|
188
|
+
});
|
|
189
|
+
}
|
|
125
190
|
/**
|
|
126
191
|
* get course list
|
|
127
192
|
*/
|
|
@@ -241,6 +306,41 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
241
306
|
return yield response.value();
|
|
242
307
|
});
|
|
243
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* 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
|
|
311
|
+
* Create a new SCORM export for a course
|
|
312
|
+
*/
|
|
313
|
+
postCourseExportRaw(requestParameters, initOverrides) {
|
|
314
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
if (requestParameters['courseId'] == null) {
|
|
316
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseExport().');
|
|
317
|
+
}
|
|
318
|
+
if (requestParameters['postCourseExport'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('postCourseExport', 'Required parameter "postCourseExport" was null or undefined when calling postCourseExport().');
|
|
320
|
+
}
|
|
321
|
+
const queryParameters = {};
|
|
322
|
+
const headerParameters = {};
|
|
323
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
324
|
+
const response = yield this.request({
|
|
325
|
+
path: `/courses/{courseId}/exports`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
326
|
+
method: 'POST',
|
|
327
|
+
headers: headerParameters,
|
|
328
|
+
query: queryParameters,
|
|
329
|
+
body: PostCourseExportToJSON(requestParameters['postCourseExport']),
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportFromJSON(jsonValue));
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* 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
|
|
336
|
+
* Create a new SCORM export for a course
|
|
337
|
+
*/
|
|
338
|
+
postCourseExport(requestParameters, initOverrides) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
const response = yield this.postCourseExportRaw(requestParameters, initOverrides);
|
|
341
|
+
return yield response.value();
|
|
342
|
+
});
|
|
343
|
+
}
|
|
244
344
|
/**
|
|
245
345
|
* Update a course by id
|
|
246
346
|
*/
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
* Details of a course SCORM export
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetCourseExport
|
|
16
|
+
*/
|
|
17
|
+
export interface GetCourseExport {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the export
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetCourseExport
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the course being exported
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GetCourseExport
|
|
28
|
+
*/
|
|
29
|
+
courseId: string;
|
|
30
|
+
/**
|
|
31
|
+
* The SCORM version to export
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetCourseExport
|
|
34
|
+
*/
|
|
35
|
+
scormVersion: GetCourseExportScormVersionEnum;
|
|
36
|
+
/**
|
|
37
|
+
* Current status of the export generation
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetCourseExport
|
|
40
|
+
*/
|
|
41
|
+
status: GetCourseExportStatusEnum;
|
|
42
|
+
/**
|
|
43
|
+
* URL to download the export zip file (null if not yet completed)
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof GetCourseExport
|
|
46
|
+
*/
|
|
47
|
+
downloadUrl?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Size of the export file in bytes (null if not yet completed)
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GetCourseExport
|
|
52
|
+
*/
|
|
53
|
+
fileSize?: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* Error message if status is FAILED
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof GetCourseExport
|
|
58
|
+
*/
|
|
59
|
+
errorMessage?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Unix epoch timestamp when the export was created
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof GetCourseExport
|
|
64
|
+
*/
|
|
65
|
+
createdAt: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export declare const GetCourseExportScormVersionEnum: {
|
|
71
|
+
readonly Scorm12: "SCORM_1_2";
|
|
72
|
+
readonly Scorm20043RdEdition: "SCORM_2004_3RD_EDITION";
|
|
73
|
+
readonly Scorm20044ThEdition: "SCORM_2004_4TH_EDITION";
|
|
74
|
+
};
|
|
75
|
+
export type GetCourseExportScormVersionEnum = typeof GetCourseExportScormVersionEnum[keyof typeof GetCourseExportScormVersionEnum];
|
|
76
|
+
/**
|
|
77
|
+
* @export
|
|
78
|
+
*/
|
|
79
|
+
export declare const GetCourseExportStatusEnum: {
|
|
80
|
+
readonly Pending: "PENDING";
|
|
81
|
+
readonly Processing: "PROCESSING";
|
|
82
|
+
readonly Completed: "COMPLETED";
|
|
83
|
+
readonly Failed: "FAILED";
|
|
84
|
+
};
|
|
85
|
+
export type GetCourseExportStatusEnum = typeof GetCourseExportStatusEnum[keyof typeof GetCourseExportStatusEnum];
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given object implements the GetCourseExport interface.
|
|
88
|
+
*/
|
|
89
|
+
export declare function instanceOfGetCourseExport(value: object): value is GetCourseExport;
|
|
90
|
+
export declare function GetCourseExportFromJSON(json: any): GetCourseExport;
|
|
91
|
+
export declare function GetCourseExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseExport;
|
|
92
|
+
export declare function GetCourseExportToJSON(json: any): GetCourseExport;
|
|
93
|
+
export declare function GetCourseExportToJSONTyped(value?: GetCourseExport | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const GetCourseExportScormVersionEnum = {
|
|
18
|
+
Scorm12: 'SCORM_1_2',
|
|
19
|
+
Scorm20043RdEdition: 'SCORM_2004_3RD_EDITION',
|
|
20
|
+
Scorm20044ThEdition: 'SCORM_2004_4TH_EDITION'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const GetCourseExportStatusEnum = {
|
|
26
|
+
Pending: 'PENDING',
|
|
27
|
+
Processing: 'PROCESSING',
|
|
28
|
+
Completed: 'COMPLETED',
|
|
29
|
+
Failed: 'FAILED'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the GetCourseExport interface.
|
|
33
|
+
*/
|
|
34
|
+
export function instanceOfGetCourseExport(value) {
|
|
35
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('scormVersion' in value) || value['scormVersion'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
export function GetCourseExportFromJSON(json) {
|
|
48
|
+
return GetCourseExportFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function GetCourseExportFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'courseId': json['course_id'],
|
|
57
|
+
'scormVersion': json['scorm_version'],
|
|
58
|
+
'status': json['status'],
|
|
59
|
+
'downloadUrl': json['download_url'] == null ? undefined : json['download_url'],
|
|
60
|
+
'fileSize': json['file_size'] == null ? undefined : json['file_size'],
|
|
61
|
+
'errorMessage': json['error_message'] == null ? undefined : json['error_message'],
|
|
62
|
+
'createdAt': json['created_at'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function GetCourseExportToJSON(json) {
|
|
66
|
+
return GetCourseExportToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
export function GetCourseExportToJSONTyped(value, ignoreDiscriminator = false) {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'id': value['id'],
|
|
74
|
+
'course_id': value['courseId'],
|
|
75
|
+
'scorm_version': value['scormVersion'],
|
|
76
|
+
'status': value['status'],
|
|
77
|
+
'download_url': value['downloadUrl'],
|
|
78
|
+
'file_size': value['fileSize'],
|
|
79
|
+
'error_message': value['errorMessage'],
|
|
80
|
+
'created_at': value['createdAt'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -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;
|