@easyedu/js-lsm-api 1.55.0 → 1.57.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 +8 -0
- package/README.md +11 -2
- package/dist/apis/ContentApi.d.ts +21 -1
- package/dist/apis/ContentApi.js +51 -0
- package/dist/apis/CourseApi.d.ts +23 -1
- package/dist/apis/CourseApi.js +55 -0
- package/dist/apis/ModuleApi.d.ts +20 -1
- package/dist/apis/ModuleApi.js +47 -0
- package/dist/apis/PortalApi.d.ts +32 -1
- package/dist/apis/PortalApi.js +99 -0
- package/dist/esm/apis/ContentApi.d.ts +21 -1
- package/dist/esm/apis/ContentApi.js +52 -1
- package/dist/esm/apis/CourseApi.d.ts +23 -1
- package/dist/esm/apis/CourseApi.js +56 -1
- package/dist/esm/apis/ModuleApi.d.ts +20 -1
- package/dist/esm/apis/ModuleApi.js +48 -1
- package/dist/esm/apis/PortalApi.d.ts +32 -1
- package/dist/esm/apis/PortalApi.js +100 -1
- package/dist/esm/models/GetCourseEnrollment.d.ts +15 -1
- package/dist/esm/models/GetCourseEnrollment.js +6 -1
- package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +5 -0
- package/dist/esm/models/GetCourseEnrollmentListItem.js +6 -1
- package/dist/esm/models/GetPortal.d.ts +6 -0
- package/dist/esm/models/GetPortal.js +2 -0
- package/dist/esm/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/esm/models/GetPortalFaviconUpload.js +43 -0
- package/dist/esm/models/PostDuplicate.d.ts +32 -0
- package/dist/esm/models/PostDuplicate.js +41 -0
- package/dist/esm/models/PostDuplicate1.d.ts +32 -0
- package/dist/esm/models/PostDuplicate1.js +41 -0
- package/dist/esm/models/PostDuplicate2.d.ts +32 -0
- package/dist/esm/models/PostDuplicate2.js +41 -0
- package/dist/esm/models/PutCourseEnrollment.d.ts +7 -1
- package/dist/esm/models/PutCourseEnrollment.js +4 -1
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/GetCourseEnrollment.d.ts +15 -1
- package/dist/models/GetCourseEnrollment.js +6 -1
- package/dist/models/GetCourseEnrollmentListItem.d.ts +5 -0
- package/dist/models/GetCourseEnrollmentListItem.js +6 -1
- package/dist/models/GetPortal.d.ts +6 -0
- package/dist/models/GetPortal.js +2 -0
- package/dist/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/models/GetPortalFaviconUpload.js +50 -0
- package/dist/models/PostDuplicate.d.ts +32 -0
- package/dist/models/PostDuplicate.js +48 -0
- package/dist/models/PostDuplicate1.d.ts +32 -0
- package/dist/models/PostDuplicate1.js +48 -0
- package/dist/models/PostDuplicate2.d.ts +32 -0
- package/dist/models/PostDuplicate2.js +48 -0
- package/dist/models/PutCourseEnrollment.d.ts +7 -1
- package/dist/models/PutCourseEnrollment.js +4 -1
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ContentApi.md +78 -0
- package/docs/CourseApi.md +86 -2
- package/docs/GetPortal.md +2 -0
- package/docs/GetPortalFaviconUpload.md +34 -0
- package/docs/ModuleApi.md +75 -0
- package/docs/PortalApi.md +138 -0
- package/docs/PostDuplicate.md +35 -0
- package/docs/PostDuplicate1.md +35 -0
- package/docs/PostDuplicate2.md +35 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +76 -0
- package/src/apis/CourseApi.ts +78 -0
- package/src/apis/ModuleApi.ts +67 -0
- package/src/apis/PortalApi.ts +129 -0
- package/src/models/GetCourseEnrollment.ts +16 -2
- package/src/models/GetCourseEnrollmentListItem.ts +6 -1
- package/src/models/GetPortal.ts +8 -0
- package/src/models/GetPortalFaviconUpload.ts +66 -0
- package/src/models/PostDuplicate.ts +65 -0
- package/src/models/PostDuplicate1.ts +65 -0
- package/src/models/PostDuplicate2.ts +65 -0
- package/src/models/PutCourseEnrollment.ts +8 -2
- package/src/models/index.ts +4 -0
|
@@ -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 { GetContentFromJSON, GetContentListFromJSON, GetContentSessionFromJSON, GetContentSessionDetailFromJSON, GetContentSessionListFromJSON, GetContentUploadFromJSON, GetContentVersionFromJSON, GetContentVersionListFromJSON, GetScormApiLogsFromJSON, GetScormPackageFromJSON, GetScormSessionDataFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PostVerifyManifestFromJSON, PutContentToJSON, PutContentReorderToJSON, PutContentVersionToJSON, ScormGetValueResponseFromJSON, ScormSetValueRequestToJSON, ScormSetValueResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { GetContentFromJSON, GetContentListFromJSON, GetContentSessionFromJSON, GetContentSessionDetailFromJSON, GetContentSessionListFromJSON, GetContentUploadFromJSON, GetContentVersionFromJSON, GetContentVersionListFromJSON, GetScormApiLogsFromJSON, GetScormPackageFromJSON, GetScormSessionDataFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PostDuplicate2ToJSON, PostVerifyManifestFromJSON, PutContentToJSON, PutContentReorderToJSON, PutContentVersionToJSON, ScormGetValueResponseFromJSON, ScormSetValueRequestToJSON, ScormSetValueResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -641,6 +641,57 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
641
641
|
return yield response.value();
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* Creates request options for postContentDuplicate without sending the request
|
|
646
|
+
*/
|
|
647
|
+
postContentDuplicateRequestOpts(requestParameters) {
|
|
648
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
649
|
+
if (requestParameters['courseId'] == null) {
|
|
650
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postContentDuplicate().');
|
|
651
|
+
}
|
|
652
|
+
if (requestParameters['moduleId'] == null) {
|
|
653
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postContentDuplicate().');
|
|
654
|
+
}
|
|
655
|
+
if (requestParameters['contentId'] == null) {
|
|
656
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling postContentDuplicate().');
|
|
657
|
+
}
|
|
658
|
+
const queryParameters = {};
|
|
659
|
+
const headerParameters = {};
|
|
660
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
661
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/duplicate`;
|
|
662
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
663
|
+
urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
|
|
664
|
+
urlPath = urlPath.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId'])));
|
|
665
|
+
return {
|
|
666
|
+
path: urlPath,
|
|
667
|
+
method: 'POST',
|
|
668
|
+
headers: headerParameters,
|
|
669
|
+
query: queryParameters,
|
|
670
|
+
body: PostDuplicate2ToJSON(requestParameters['postDuplicate2']),
|
|
671
|
+
};
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
676
|
+
* Duplicate a content item
|
|
677
|
+
*/
|
|
678
|
+
postContentDuplicateRaw(requestParameters, initOverrides) {
|
|
679
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
680
|
+
const requestOptions = yield this.postContentDuplicateRequestOpts(requestParameters);
|
|
681
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
682
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentFromJSON(jsonValue));
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
687
|
+
* Duplicate a content item
|
|
688
|
+
*/
|
|
689
|
+
postContentDuplicate(requestParameters, initOverrides) {
|
|
690
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
691
|
+
const response = yield this.postContentDuplicateRaw(requestParameters, initOverrides);
|
|
692
|
+
return yield response.value();
|
|
693
|
+
});
|
|
694
|
+
}
|
|
644
695
|
/**
|
|
645
696
|
* Creates request options for postContentProcess without sending the request
|
|
646
697
|
*/
|
|
@@ -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, GetCourseExport, GetCourseExportList, GetCourseImageUpload, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
13
|
+
import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseImageUpload, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PostDuplicate, PutCourse, PutCourseEnrollment } from '../models/index';
|
|
14
14
|
export interface DeleteCourseImageRequest {
|
|
15
15
|
courseId: string;
|
|
16
16
|
}
|
|
@@ -24,6 +24,7 @@ export interface GetCourseEnrollmentRequest {
|
|
|
24
24
|
export interface GetCourseEnrollmentsRequest {
|
|
25
25
|
courseId: string;
|
|
26
26
|
type?: GetCourseEnrollmentsTypeEnum;
|
|
27
|
+
status?: string;
|
|
27
28
|
page?: number;
|
|
28
29
|
pageSize?: number;
|
|
29
30
|
}
|
|
@@ -37,7 +38,10 @@ export interface GetCourseExportsRequest {
|
|
|
37
38
|
pageSize?: number;
|
|
38
39
|
}
|
|
39
40
|
export interface GetCourseListRequest {
|
|
41
|
+
page?: number;
|
|
42
|
+
pageSize?: number;
|
|
40
43
|
enrolled?: boolean;
|
|
44
|
+
search?: string;
|
|
41
45
|
}
|
|
42
46
|
export interface GetCourseReportingBasicRequest {
|
|
43
47
|
courseId: string;
|
|
@@ -45,6 +49,10 @@ export interface GetCourseReportingBasicRequest {
|
|
|
45
49
|
export interface PostCourseRequest {
|
|
46
50
|
postCourse: PostCourse;
|
|
47
51
|
}
|
|
52
|
+
export interface PostCourseDuplicateRequest {
|
|
53
|
+
courseId: string;
|
|
54
|
+
postDuplicate?: PostDuplicate;
|
|
55
|
+
}
|
|
48
56
|
export interface PostCourseEnrollmentRequest {
|
|
49
57
|
courseId: string;
|
|
50
58
|
postCourseEnrollment: PostCourseEnrollment;
|
|
@@ -178,6 +186,20 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
178
186
|
* Post a new course
|
|
179
187
|
*/
|
|
180
188
|
postCourse(requestParameters: PostCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourse>;
|
|
189
|
+
/**
|
|
190
|
+
* Creates request options for postCourseDuplicate without sending the request
|
|
191
|
+
*/
|
|
192
|
+
postCourseDuplicateRequestOpts(requestParameters: PostCourseDuplicateRequest): Promise<runtime.RequestOpts>;
|
|
193
|
+
/**
|
|
194
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
195
|
+
* Duplicate a course
|
|
196
|
+
*/
|
|
197
|
+
postCourseDuplicateRaw(requestParameters: PostCourseDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourse>>;
|
|
198
|
+
/**
|
|
199
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
200
|
+
* Duplicate a course
|
|
201
|
+
*/
|
|
202
|
+
postCourseDuplicate(requestParameters: PostCourseDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourse>;
|
|
181
203
|
/**
|
|
182
204
|
* Creates request options for postCourseEnrollment without sending the request
|
|
183
205
|
*/
|
|
@@ -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, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseImageUploadFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
|
|
24
|
+
import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseImageUploadFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PostDuplicateToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -158,6 +158,9 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
158
158
|
if (requestParameters['type'] != null) {
|
|
159
159
|
queryParameters['type'] = requestParameters['type'];
|
|
160
160
|
}
|
|
161
|
+
if (requestParameters['status'] != null) {
|
|
162
|
+
queryParameters['status'] = requestParameters['status'];
|
|
163
|
+
}
|
|
161
164
|
if (requestParameters['page'] != null) {
|
|
162
165
|
queryParameters['page'] = requestParameters['page'];
|
|
163
166
|
}
|
|
@@ -288,9 +291,18 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
288
291
|
getCourseListRequestOpts(requestParameters) {
|
|
289
292
|
return __awaiter(this, void 0, void 0, function* () {
|
|
290
293
|
const queryParameters = {};
|
|
294
|
+
if (requestParameters['page'] != null) {
|
|
295
|
+
queryParameters['page'] = requestParameters['page'];
|
|
296
|
+
}
|
|
297
|
+
if (requestParameters['pageSize'] != null) {
|
|
298
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
299
|
+
}
|
|
291
300
|
if (requestParameters['enrolled'] != null) {
|
|
292
301
|
queryParameters['enrolled'] = requestParameters['enrolled'];
|
|
293
302
|
}
|
|
303
|
+
if (requestParameters['search'] != null) {
|
|
304
|
+
queryParameters['search'] = requestParameters['search'];
|
|
305
|
+
}
|
|
294
306
|
const headerParameters = {};
|
|
295
307
|
let urlPath = `/courses`;
|
|
296
308
|
return {
|
|
@@ -399,6 +411,49 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
399
411
|
return yield response.value();
|
|
400
412
|
});
|
|
401
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Creates request options for postCourseDuplicate without sending the request
|
|
416
|
+
*/
|
|
417
|
+
postCourseDuplicateRequestOpts(requestParameters) {
|
|
418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
+
if (requestParameters['courseId'] == null) {
|
|
420
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseDuplicate().');
|
|
421
|
+
}
|
|
422
|
+
const queryParameters = {};
|
|
423
|
+
const headerParameters = {};
|
|
424
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
425
|
+
let urlPath = `/courses/{courseId}/duplicate`;
|
|
426
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
427
|
+
return {
|
|
428
|
+
path: urlPath,
|
|
429
|
+
method: 'POST',
|
|
430
|
+
headers: headerParameters,
|
|
431
|
+
query: queryParameters,
|
|
432
|
+
body: PostDuplicateToJSON(requestParameters['postDuplicate']),
|
|
433
|
+
};
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
438
|
+
* Duplicate a course
|
|
439
|
+
*/
|
|
440
|
+
postCourseDuplicateRaw(requestParameters, initOverrides) {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
442
|
+
const requestOptions = yield this.postCourseDuplicateRequestOpts(requestParameters);
|
|
443
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
444
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseFromJSON(jsonValue));
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
449
|
+
* Duplicate a course
|
|
450
|
+
*/
|
|
451
|
+
postCourseDuplicate(requestParameters, initOverrides) {
|
|
452
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
453
|
+
const response = yield this.postCourseDuplicateRaw(requestParameters, initOverrides);
|
|
454
|
+
return yield response.value();
|
|
455
|
+
});
|
|
456
|
+
}
|
|
402
457
|
/**
|
|
403
458
|
* Creates request options for postCourseEnrollment without sending the request
|
|
404
459
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetModule, GetModuleList, PostModule, PutModule, PutModuleReorder } from '../models/index';
|
|
13
|
+
import type { GetModule, GetModuleList, PostDuplicate1, PostModule, PutModule, PutModuleReorder } from '../models/index';
|
|
14
14
|
export interface GetModuleRequest {
|
|
15
15
|
moduleId: string;
|
|
16
16
|
courseId: string;
|
|
@@ -22,6 +22,11 @@ export interface PostModuleRequest {
|
|
|
22
22
|
courseId: string;
|
|
23
23
|
postModule: PostModule;
|
|
24
24
|
}
|
|
25
|
+
export interface PostModuleDuplicateRequest {
|
|
26
|
+
courseId: string;
|
|
27
|
+
moduleId: string;
|
|
28
|
+
postDuplicate1?: PostDuplicate1;
|
|
29
|
+
}
|
|
25
30
|
export interface PutModuleRequest {
|
|
26
31
|
moduleId: string;
|
|
27
32
|
courseId: string;
|
|
@@ -71,6 +76,20 @@ export declare class ModuleApi extends runtime.BaseAPI {
|
|
|
71
76
|
* Post a new module
|
|
72
77
|
*/
|
|
73
78
|
postModule(requestParameters: PostModuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for postModuleDuplicate without sending the request
|
|
81
|
+
*/
|
|
82
|
+
postModuleDuplicateRequestOpts(requestParameters: PostModuleDuplicateRequest): Promise<runtime.RequestOpts>;
|
|
83
|
+
/**
|
|
84
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
85
|
+
* Duplicate a module
|
|
86
|
+
*/
|
|
87
|
+
postModuleDuplicateRaw(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModule>>;
|
|
88
|
+
/**
|
|
89
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
90
|
+
* Duplicate a module
|
|
91
|
+
*/
|
|
92
|
+
postModuleDuplicate(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
|
|
74
93
|
/**
|
|
75
94
|
* Creates request options for putModule without sending the request
|
|
76
95
|
*/
|
|
@@ -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 { GetModuleFromJSON, GetModuleListFromJSON, PostModuleToJSON, PutModuleToJSON, PutModuleReorderToJSON, } from '../models/index';
|
|
24
|
+
import { GetModuleFromJSON, GetModuleListFromJSON, PostDuplicate1ToJSON, PostModuleToJSON, PutModuleToJSON, PutModuleReorderToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -152,6 +152,53 @@ export class ModuleApi extends runtime.BaseAPI {
|
|
|
152
152
|
return yield response.value();
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Creates request options for postModuleDuplicate without sending the request
|
|
157
|
+
*/
|
|
158
|
+
postModuleDuplicateRequestOpts(requestParameters) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
if (requestParameters['courseId'] == null) {
|
|
161
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postModuleDuplicate().');
|
|
162
|
+
}
|
|
163
|
+
if (requestParameters['moduleId'] == null) {
|
|
164
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postModuleDuplicate().');
|
|
165
|
+
}
|
|
166
|
+
const queryParameters = {};
|
|
167
|
+
const headerParameters = {};
|
|
168
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
169
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/duplicate`;
|
|
170
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
171
|
+
urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
|
|
172
|
+
return {
|
|
173
|
+
path: urlPath,
|
|
174
|
+
method: 'POST',
|
|
175
|
+
headers: headerParameters,
|
|
176
|
+
query: queryParameters,
|
|
177
|
+
body: PostDuplicate1ToJSON(requestParameters['postDuplicate1']),
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
183
|
+
* Duplicate a module
|
|
184
|
+
*/
|
|
185
|
+
postModuleDuplicateRaw(requestParameters, initOverrides) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
const requestOptions = yield this.postModuleDuplicateRequestOpts(requestParameters);
|
|
188
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
189
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetModuleFromJSON(jsonValue));
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
194
|
+
* Duplicate a module
|
|
195
|
+
*/
|
|
196
|
+
postModuleDuplicate(requestParameters, initOverrides) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const response = yield this.postModuleDuplicateRaw(requestParameters, initOverrides);
|
|
199
|
+
return yield response.value();
|
|
200
|
+
});
|
|
201
|
+
}
|
|
155
202
|
/**
|
|
156
203
|
* Creates request options for putModule without sending the request
|
|
157
204
|
*/
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
13
|
+
import type { GetPortal, GetPortalFaviconUpload, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
14
|
+
export interface DeletePortalFaviconRequest {
|
|
15
|
+
portalId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface DeletePortalLogoRequest {
|
|
15
18
|
portalId: string;
|
|
16
19
|
}
|
|
@@ -32,6 +35,10 @@ export interface InviteUserToPortalRequest {
|
|
|
32
35
|
export interface PostPortalRequest {
|
|
33
36
|
postPortal: PostPortal;
|
|
34
37
|
}
|
|
38
|
+
export interface PostPortalFaviconUploadRequest {
|
|
39
|
+
portalId: string;
|
|
40
|
+
file: Blob;
|
|
41
|
+
}
|
|
35
42
|
export interface PostPortalLogoUploadRequest {
|
|
36
43
|
portalId: string;
|
|
37
44
|
file: Blob;
|
|
@@ -47,6 +54,18 @@ export interface UpdateSelectedPortalRequest {
|
|
|
47
54
|
*
|
|
48
55
|
*/
|
|
49
56
|
export declare class PortalApi extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
59
|
+
*/
|
|
60
|
+
deletePortalFaviconRequestOpts(requestParameters: DeletePortalFaviconRequest): Promise<runtime.RequestOpts>;
|
|
61
|
+
/**
|
|
62
|
+
* Remove the portal favicon
|
|
63
|
+
*/
|
|
64
|
+
deletePortalFaviconRaw(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
65
|
+
/**
|
|
66
|
+
* Remove the portal favicon
|
|
67
|
+
*/
|
|
68
|
+
deletePortalFavicon(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
69
|
/**
|
|
51
70
|
* Creates request options for deletePortalLogo without sending the request
|
|
52
71
|
*/
|
|
@@ -119,6 +138,18 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
119
138
|
* Create a new portal as a child of the current selected portal
|
|
120
139
|
*/
|
|
121
140
|
postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
141
|
+
/**
|
|
142
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
143
|
+
*/
|
|
144
|
+
postPortalFaviconUploadRequestOpts(requestParameters: PostPortalFaviconUploadRequest): Promise<runtime.RequestOpts>;
|
|
145
|
+
/**
|
|
146
|
+
* Upload a favicon image for portal branding
|
|
147
|
+
*/
|
|
148
|
+
postPortalFaviconUploadRaw(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalFaviconUpload>>;
|
|
149
|
+
/**
|
|
150
|
+
* Upload a favicon image for portal branding
|
|
151
|
+
*/
|
|
152
|
+
postPortalFaviconUpload(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalFaviconUpload>;
|
|
122
153
|
/**
|
|
123
154
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
124
155
|
*/
|
|
@@ -21,11 +21,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { GetPortalFromJSON, GetPortalListFromJSON, GetPortalLogoUploadFromJSON, GetPortalUserListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
24
|
+
import { GetPortalFromJSON, GetPortalFaviconUploadFromJSON, GetPortalListFromJSON, GetPortalLogoUploadFromJSON, GetPortalUserListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class PortalApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
31
|
+
*/
|
|
32
|
+
deletePortalFaviconRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['portalId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling deletePortalFavicon().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
40
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
41
|
+
return {
|
|
42
|
+
path: urlPath,
|
|
43
|
+
method: 'DELETE',
|
|
44
|
+
headers: headerParameters,
|
|
45
|
+
query: queryParameters,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Remove the portal favicon
|
|
51
|
+
*/
|
|
52
|
+
deletePortalFaviconRaw(requestParameters, initOverrides) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const requestOptions = yield this.deletePortalFaviconRequestOpts(requestParameters);
|
|
55
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
56
|
+
return new runtime.VoidApiResponse(response);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Remove the portal favicon
|
|
61
|
+
*/
|
|
62
|
+
deletePortalFavicon(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield this.deletePortalFaviconRaw(requestParameters, initOverrides);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
29
67
|
/**
|
|
30
68
|
* Creates request options for deletePortalLogo without sending the request
|
|
31
69
|
*/
|
|
@@ -275,6 +313,67 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
275
313
|
return yield response.value();
|
|
276
314
|
});
|
|
277
315
|
}
|
|
316
|
+
/**
|
|
317
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
318
|
+
*/
|
|
319
|
+
postPortalFaviconUploadRequestOpts(requestParameters) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
if (requestParameters['portalId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling postPortalFaviconUpload().');
|
|
323
|
+
}
|
|
324
|
+
if (requestParameters['file'] == null) {
|
|
325
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postPortalFaviconUpload().');
|
|
326
|
+
}
|
|
327
|
+
const queryParameters = {};
|
|
328
|
+
const headerParameters = {};
|
|
329
|
+
const consumes = [
|
|
330
|
+
{ contentType: 'multipart/form-data' },
|
|
331
|
+
];
|
|
332
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
333
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
334
|
+
let formParams;
|
|
335
|
+
let useForm = false;
|
|
336
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
337
|
+
useForm = canConsumeForm;
|
|
338
|
+
if (useForm) {
|
|
339
|
+
formParams = new FormData();
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
formParams = new URLSearchParams();
|
|
343
|
+
}
|
|
344
|
+
if (requestParameters['file'] != null) {
|
|
345
|
+
formParams.append('file', requestParameters['file']);
|
|
346
|
+
}
|
|
347
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
348
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
349
|
+
return {
|
|
350
|
+
path: urlPath,
|
|
351
|
+
method: 'POST',
|
|
352
|
+
headers: headerParameters,
|
|
353
|
+
query: queryParameters,
|
|
354
|
+
body: formParams,
|
|
355
|
+
};
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Upload a favicon image for portal branding
|
|
360
|
+
*/
|
|
361
|
+
postPortalFaviconUploadRaw(requestParameters, initOverrides) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
const requestOptions = yield this.postPortalFaviconUploadRequestOpts(requestParameters);
|
|
364
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
365
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFaviconUploadFromJSON(jsonValue));
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Upload a favicon image for portal branding
|
|
370
|
+
*/
|
|
371
|
+
postPortalFaviconUpload(requestParameters, initOverrides) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
const response = yield this.postPortalFaviconUploadRaw(requestParameters, initOverrides);
|
|
374
|
+
return yield response.value();
|
|
375
|
+
});
|
|
376
|
+
}
|
|
278
377
|
/**
|
|
279
378
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
280
379
|
*/
|
|
@@ -52,7 +52,16 @@ export interface GetCourseEnrollment {
|
|
|
52
52
|
*/
|
|
53
53
|
notes: string | null;
|
|
54
54
|
/**
|
|
55
|
-
* Current status of the enrollment
|
|
55
|
+
* Current status of the enrollment.
|
|
56
|
+
* - Enrolled: registered, no progress yet
|
|
57
|
+
* - InProgress: learner has started at least one content session
|
|
58
|
+
* - Completed: finished successfully
|
|
59
|
+
* - Failed: finished but did not pass
|
|
60
|
+
* - Expired: enrollment_date_end passed before completion
|
|
61
|
+
* - Withdrawn: learner pulled out before completion
|
|
62
|
+
* - Removed: admin-removed enrollment
|
|
63
|
+
* - Archived: historical / read-only (e.g. course share revoked)
|
|
64
|
+
*
|
|
56
65
|
* @type {GetCourseEnrollmentStatusEnum}
|
|
57
66
|
* @memberof GetCourseEnrollment
|
|
58
67
|
*/
|
|
@@ -75,8 +84,13 @@ export interface GetCourseEnrollment {
|
|
|
75
84
|
*/
|
|
76
85
|
export declare const GetCourseEnrollmentStatusEnum: {
|
|
77
86
|
readonly Enrolled: "Enrolled";
|
|
87
|
+
readonly InProgress: "InProgress";
|
|
78
88
|
readonly Completed: "Completed";
|
|
89
|
+
readonly Failed: "Failed";
|
|
90
|
+
readonly Expired: "Expired";
|
|
91
|
+
readonly Withdrawn: "Withdrawn";
|
|
79
92
|
readonly Removed: "Removed";
|
|
93
|
+
readonly Archived: "Archived";
|
|
80
94
|
};
|
|
81
95
|
export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
|
|
82
96
|
/**
|
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export const GetCourseEnrollmentStatusEnum = {
|
|
18
18
|
Enrolled: 'Enrolled',
|
|
19
|
+
InProgress: 'InProgress',
|
|
19
20
|
Completed: 'Completed',
|
|
20
|
-
|
|
21
|
+
Failed: 'Failed',
|
|
22
|
+
Expired: 'Expired',
|
|
23
|
+
Withdrawn: 'Withdrawn',
|
|
24
|
+
Removed: 'Removed',
|
|
25
|
+
Archived: 'Archived'
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
* @export
|
|
@@ -81,8 +81,13 @@ export interface GetCourseEnrollmentListItem {
|
|
|
81
81
|
*/
|
|
82
82
|
export declare const GetCourseEnrollmentListItemStatusEnum: {
|
|
83
83
|
readonly Enrolled: "Enrolled";
|
|
84
|
+
readonly InProgress: "InProgress";
|
|
84
85
|
readonly Completed: "Completed";
|
|
86
|
+
readonly Failed: "Failed";
|
|
87
|
+
readonly Expired: "Expired";
|
|
88
|
+
readonly Withdrawn: "Withdrawn";
|
|
85
89
|
readonly Removed: "Removed";
|
|
90
|
+
readonly Archived: "Archived";
|
|
86
91
|
};
|
|
87
92
|
export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
|
|
88
93
|
/**
|
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export const GetCourseEnrollmentListItemStatusEnum = {
|
|
18
18
|
Enrolled: 'Enrolled',
|
|
19
|
+
InProgress: 'InProgress',
|
|
19
20
|
Completed: 'Completed',
|
|
20
|
-
|
|
21
|
+
Failed: 'Failed',
|
|
22
|
+
Expired: 'Expired',
|
|
23
|
+
Withdrawn: 'Withdrawn',
|
|
24
|
+
Removed: 'Removed',
|
|
25
|
+
Archived: 'Archived'
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
* @export
|
|
@@ -49,6 +49,7 @@ export function GetPortalFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
49
|
'name': json['name'],
|
|
50
50
|
'parentPortalId': json['parent_portal_id'] == null ? undefined : json['parent_portal_id'],
|
|
51
51
|
'logoUrl': json['logo_url'] == null ? undefined : json['logo_url'],
|
|
52
|
+
'faviconUrl': json['favicon_url'] == null ? undefined : json['favicon_url'],
|
|
52
53
|
'headerBackgroundColor': json['header_background_color'],
|
|
53
54
|
'headerTextColor': json['header_text_color'],
|
|
54
55
|
'baseType': json['base_type'] == null ? undefined : json['base_type'],
|
|
@@ -66,6 +67,7 @@ export function GetPortalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
67
|
'name': value['name'],
|
|
67
68
|
'parent_portal_id': value['parentPortalId'],
|
|
68
69
|
'logo_url': value['logoUrl'],
|
|
70
|
+
'favicon_url': value['faviconUrl'],
|
|
69
71
|
'header_background_color': value['headerBackgroundColor'],
|
|
70
72
|
'header_text_color': value['headerTextColor'],
|
|
71
73
|
'base_type': value['baseType'],
|
|
@@ -0,0 +1,32 @@
|
|
|
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 GetPortalFaviconUpload
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPortalFaviconUpload {
|
|
18
|
+
/**
|
|
19
|
+
* Presigned URL for the uploaded favicon image
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetPortalFaviconUpload
|
|
22
|
+
*/
|
|
23
|
+
faviconUrl: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfGetPortalFaviconUpload(value: object): value is GetPortalFaviconUpload;
|
|
29
|
+
export declare function GetPortalFaviconUploadFromJSON(json: any): GetPortalFaviconUpload;
|
|
30
|
+
export declare function GetPortalFaviconUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalFaviconUpload;
|
|
31
|
+
export declare function GetPortalFaviconUploadToJSON(json: any): GetPortalFaviconUpload;
|
|
32
|
+
export declare function GetPortalFaviconUploadToJSONTyped(value?: GetPortalFaviconUpload | null, ignoreDiscriminator?: boolean): any;
|