@easyedu/js-lsm-api 1.55.0 → 1.56.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 +6 -0
- package/README.md +8 -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/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/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/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 +3 -0
- package/dist/esm/models/index.js +3 -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/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 +3 -0
- package/dist/models/index.js +3 -0
- package/docs/ContentApi.md +78 -0
- package/docs/CourseApi.md +86 -2
- package/docs/ModuleApi.md +75 -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/models/GetCourseEnrollment.ts +16 -2
- package/src/models/GetCourseEnrollmentListItem.ts +6 -1
- 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 +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -187,6 +187,9 @@ docs/PostCourse.md
|
|
|
187
187
|
docs/PostCourseCatalog.md
|
|
188
188
|
docs/PostCourseEnrollment.md
|
|
189
189
|
docs/PostCourseExport.md
|
|
190
|
+
docs/PostDuplicate.md
|
|
191
|
+
docs/PostDuplicate1.md
|
|
192
|
+
docs/PostDuplicate2.md
|
|
190
193
|
docs/PostLogin.md
|
|
191
194
|
docs/PostManualQuestionSelection.md
|
|
192
195
|
docs/PostMessage.md
|
|
@@ -462,6 +465,9 @@ src/models/PostCourse.ts
|
|
|
462
465
|
src/models/PostCourseCatalog.ts
|
|
463
466
|
src/models/PostCourseEnrollment.ts
|
|
464
467
|
src/models/PostCourseExport.ts
|
|
468
|
+
src/models/PostDuplicate.ts
|
|
469
|
+
src/models/PostDuplicate1.ts
|
|
470
|
+
src/models/PostDuplicate2.ts
|
|
465
471
|
src/models/PostLogin.ts
|
|
466
472
|
src/models/PostManualQuestionSelection.ts
|
|
467
473
|
src/models/PostMessage.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.56.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -81,6 +81,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
81
81
|
*ContentApi* | [**getScormValue**](docs/ContentApi.md#getscormvalue) | **GET** /scorm/sessions/{scormSessionId}/get-value | Get a SCORM CMI data element value
|
|
82
82
|
*ContentApi* | [**initializeScormSession**](docs/ContentApi.md#initializescormsession) | **POST** /scorm/sessions/{scormSessionId}/initialize | Initialize a SCORM session
|
|
83
83
|
*ContentApi* | [**listContentSessions**](docs/ContentApi.md#listcontentsessions) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions | List content sessions (instructor only)
|
|
84
|
+
*ContentApi* | [**postContentDuplicate**](docs/ContentApi.md#postcontentduplicate) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/duplicate | Duplicate a content item
|
|
84
85
|
*ContentApi* | [**postContentProcess**](docs/ContentApi.md#postcontentprocess) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/process | Post a new content process
|
|
85
86
|
*ContentApi* | [**postContentQuiz**](docs/ContentApi.md#postcontentquiz) | **POST** /courses/{courseId}/modules/{moduleId}/contents/quiz | Create a new quiz content
|
|
86
87
|
*ContentApi* | [**postContentSession**](docs/ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session
|
|
@@ -100,6 +101,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
100
101
|
*CourseApi* | [**getCourseList**](docs/CourseApi.md#getcourselist) | **GET** /courses | get course list
|
|
101
102
|
*CourseApi* | [**getCourseReportingBasic**](docs/CourseApi.md#getcoursereportingbasic) | **GET** /courses/{courseId}/reporting/basic | Get basic course reporting data
|
|
102
103
|
*CourseApi* | [**postCourse**](docs/CourseApi.md#postcourse) | **POST** /courses | Post a new course
|
|
104
|
+
*CourseApi* | [**postCourseDuplicate**](docs/CourseApi.md#postcourseduplicate) | **POST** /courses/{courseId}/duplicate | Duplicate a course
|
|
103
105
|
*CourseApi* | [**postCourseEnrollment**](docs/CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment
|
|
104
106
|
*CourseApi* | [**postCourseExport**](docs/CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course
|
|
105
107
|
*CourseApi* | [**postCourseImageUpload**](docs/CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image
|
|
@@ -125,6 +127,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
125
127
|
*ModuleApi* | [**getModule**](docs/ModuleApi.md#getmodule) | **GET** /courses/{courseId}/modules/{moduleId} | get a course module
|
|
126
128
|
*ModuleApi* | [**getModuleList**](docs/ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list
|
|
127
129
|
*ModuleApi* | [**postModule**](docs/ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module
|
|
130
|
+
*ModuleApi* | [**postModuleDuplicate**](docs/ModuleApi.md#postmoduleduplicate) | **POST** /courses/{courseId}/modules/{moduleId}/duplicate | Duplicate a module
|
|
128
131
|
*ModuleApi* | [**putModule**](docs/ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id
|
|
129
132
|
*ModuleApi* | [**putModuleReorder**](docs/ModuleApi.md#putmodulereorder) | **PUT** /courses/{courseId}/modules/reorder | Reorder modules in a course
|
|
130
133
|
*OtherApi* | [**getHealth**](docs/OtherApi.md#gethealth) | **GET** /healthcheck | Health check endpoint
|
|
@@ -384,6 +387,9 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
384
387
|
- [PostCourseCatalog](docs/PostCourseCatalog.md)
|
|
385
388
|
- [PostCourseEnrollment](docs/PostCourseEnrollment.md)
|
|
386
389
|
- [PostCourseExport](docs/PostCourseExport.md)
|
|
390
|
+
- [PostDuplicate](docs/PostDuplicate.md)
|
|
391
|
+
- [PostDuplicate1](docs/PostDuplicate1.md)
|
|
392
|
+
- [PostDuplicate2](docs/PostDuplicate2.md)
|
|
387
393
|
- [PostLogin](docs/PostLogin.md)
|
|
388
394
|
- [PostManualQuestionSelection](docs/PostManualQuestionSelection.md)
|
|
389
395
|
- [PostMessage](docs/PostMessage.md)
|
|
@@ -472,7 +478,7 @@ and is automatically generated by the
|
|
|
472
478
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
473
479
|
|
|
474
480
|
- API version: `1.0.0`
|
|
475
|
-
- Package version: `1.
|
|
481
|
+
- Package version: `1.56.0`
|
|
476
482
|
- Generator version: `7.21.0`
|
|
477
483
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
478
484
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
|
|
13
|
+
import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostDuplicate2, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
|
|
14
14
|
export interface CommitScormSessionRequest {
|
|
15
15
|
scormSessionId: string;
|
|
16
16
|
}
|
|
@@ -74,6 +74,12 @@ export interface ListContentSessionsRequest {
|
|
|
74
74
|
page?: number;
|
|
75
75
|
pageSize?: number;
|
|
76
76
|
}
|
|
77
|
+
export interface PostContentDuplicateRequest {
|
|
78
|
+
courseId: string;
|
|
79
|
+
moduleId: string;
|
|
80
|
+
contentId: string;
|
|
81
|
+
postDuplicate2?: PostDuplicate2;
|
|
82
|
+
}
|
|
77
83
|
export interface PostContentProcessRequest {
|
|
78
84
|
moduleId: string;
|
|
79
85
|
courseId: string;
|
|
@@ -303,6 +309,20 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
303
309
|
* List content sessions (instructor only)
|
|
304
310
|
*/
|
|
305
311
|
listContentSessions(requestParameters: ListContentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSessionList>;
|
|
312
|
+
/**
|
|
313
|
+
* Creates request options for postContentDuplicate without sending the request
|
|
314
|
+
*/
|
|
315
|
+
postContentDuplicateRequestOpts(requestParameters: PostContentDuplicateRequest): Promise<runtime.RequestOpts>;
|
|
316
|
+
/**
|
|
317
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
318
|
+
* Duplicate a content item
|
|
319
|
+
*/
|
|
320
|
+
postContentDuplicateRaw(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContent>>;
|
|
321
|
+
/**
|
|
322
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
323
|
+
* Duplicate a content item
|
|
324
|
+
*/
|
|
325
|
+
postContentDuplicate(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
306
326
|
/**
|
|
307
327
|
* Creates request options for postContentProcess without sending the request
|
|
308
328
|
*/
|
package/dist/apis/ContentApi.js
CHANGED
|
@@ -644,6 +644,57 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
644
644
|
return yield response.value();
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* Creates request options for postContentDuplicate without sending the request
|
|
649
|
+
*/
|
|
650
|
+
postContentDuplicateRequestOpts(requestParameters) {
|
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
+
if (requestParameters['courseId'] == null) {
|
|
653
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postContentDuplicate().');
|
|
654
|
+
}
|
|
655
|
+
if (requestParameters['moduleId'] == null) {
|
|
656
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postContentDuplicate().');
|
|
657
|
+
}
|
|
658
|
+
if (requestParameters['contentId'] == null) {
|
|
659
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling postContentDuplicate().');
|
|
660
|
+
}
|
|
661
|
+
const queryParameters = {};
|
|
662
|
+
const headerParameters = {};
|
|
663
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
664
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/duplicate`;
|
|
665
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
666
|
+
urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
|
|
667
|
+
urlPath = urlPath.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId'])));
|
|
668
|
+
return {
|
|
669
|
+
path: urlPath,
|
|
670
|
+
method: 'POST',
|
|
671
|
+
headers: headerParameters,
|
|
672
|
+
query: queryParameters,
|
|
673
|
+
body: (0, index_1.PostDuplicate2ToJSON)(requestParameters['postDuplicate2']),
|
|
674
|
+
};
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
679
|
+
* Duplicate a content item
|
|
680
|
+
*/
|
|
681
|
+
postContentDuplicateRaw(requestParameters, initOverrides) {
|
|
682
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
683
|
+
const requestOptions = yield this.postContentDuplicateRequestOpts(requestParameters);
|
|
684
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
685
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetContentFromJSON)(jsonValue));
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
690
|
+
* Duplicate a content item
|
|
691
|
+
*/
|
|
692
|
+
postContentDuplicate(requestParameters, initOverrides) {
|
|
693
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
694
|
+
const response = yield this.postContentDuplicateRaw(requestParameters, initOverrides);
|
|
695
|
+
return yield response.value();
|
|
696
|
+
});
|
|
697
|
+
}
|
|
647
698
|
/**
|
|
648
699
|
* Creates request options for postContentProcess without sending the request
|
|
649
700
|
*/
|
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, 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
|
*/
|
package/dist/apis/CourseApi.js
CHANGED
|
@@ -161,6 +161,9 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
161
161
|
if (requestParameters['type'] != null) {
|
|
162
162
|
queryParameters['type'] = requestParameters['type'];
|
|
163
163
|
}
|
|
164
|
+
if (requestParameters['status'] != null) {
|
|
165
|
+
queryParameters['status'] = requestParameters['status'];
|
|
166
|
+
}
|
|
164
167
|
if (requestParameters['page'] != null) {
|
|
165
168
|
queryParameters['page'] = requestParameters['page'];
|
|
166
169
|
}
|
|
@@ -291,9 +294,18 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
291
294
|
getCourseListRequestOpts(requestParameters) {
|
|
292
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
293
296
|
const queryParameters = {};
|
|
297
|
+
if (requestParameters['page'] != null) {
|
|
298
|
+
queryParameters['page'] = requestParameters['page'];
|
|
299
|
+
}
|
|
300
|
+
if (requestParameters['pageSize'] != null) {
|
|
301
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
302
|
+
}
|
|
294
303
|
if (requestParameters['enrolled'] != null) {
|
|
295
304
|
queryParameters['enrolled'] = requestParameters['enrolled'];
|
|
296
305
|
}
|
|
306
|
+
if (requestParameters['search'] != null) {
|
|
307
|
+
queryParameters['search'] = requestParameters['search'];
|
|
308
|
+
}
|
|
297
309
|
const headerParameters = {};
|
|
298
310
|
let urlPath = `/courses`;
|
|
299
311
|
return {
|
|
@@ -402,6 +414,49 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
402
414
|
return yield response.value();
|
|
403
415
|
});
|
|
404
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* Creates request options for postCourseDuplicate without sending the request
|
|
419
|
+
*/
|
|
420
|
+
postCourseDuplicateRequestOpts(requestParameters) {
|
|
421
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
422
|
+
if (requestParameters['courseId'] == null) {
|
|
423
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseDuplicate().');
|
|
424
|
+
}
|
|
425
|
+
const queryParameters = {};
|
|
426
|
+
const headerParameters = {};
|
|
427
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
428
|
+
let urlPath = `/courses/{courseId}/duplicate`;
|
|
429
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
430
|
+
return {
|
|
431
|
+
path: urlPath,
|
|
432
|
+
method: 'POST',
|
|
433
|
+
headers: headerParameters,
|
|
434
|
+
query: queryParameters,
|
|
435
|
+
body: (0, index_1.PostDuplicateToJSON)(requestParameters['postDuplicate']),
|
|
436
|
+
};
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
441
|
+
* Duplicate a course
|
|
442
|
+
*/
|
|
443
|
+
postCourseDuplicateRaw(requestParameters, initOverrides) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
const requestOptions = yield this.postCourseDuplicateRequestOpts(requestParameters);
|
|
446
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
447
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseFromJSON)(jsonValue));
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
|
|
452
|
+
* Duplicate a course
|
|
453
|
+
*/
|
|
454
|
+
postCourseDuplicate(requestParameters, initOverrides) {
|
|
455
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
+
const response = yield this.postCourseDuplicateRaw(requestParameters, initOverrides);
|
|
457
|
+
return yield response.value();
|
|
458
|
+
});
|
|
459
|
+
}
|
|
405
460
|
/**
|
|
406
461
|
* Creates request options for postCourseEnrollment without sending the request
|
|
407
462
|
*/
|
package/dist/apis/ModuleApi.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 { 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
|
*/
|
package/dist/apis/ModuleApi.js
CHANGED
|
@@ -155,6 +155,53 @@ class ModuleApi extends runtime.BaseAPI {
|
|
|
155
155
|
return yield response.value();
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Creates request options for postModuleDuplicate without sending the request
|
|
160
|
+
*/
|
|
161
|
+
postModuleDuplicateRequestOpts(requestParameters) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
if (requestParameters['courseId'] == null) {
|
|
164
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postModuleDuplicate().');
|
|
165
|
+
}
|
|
166
|
+
if (requestParameters['moduleId'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postModuleDuplicate().');
|
|
168
|
+
}
|
|
169
|
+
const queryParameters = {};
|
|
170
|
+
const headerParameters = {};
|
|
171
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
172
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/duplicate`;
|
|
173
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
174
|
+
urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
|
|
175
|
+
return {
|
|
176
|
+
path: urlPath,
|
|
177
|
+
method: 'POST',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
body: (0, index_1.PostDuplicate1ToJSON)(requestParameters['postDuplicate1']),
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
186
|
+
* Duplicate a module
|
|
187
|
+
*/
|
|
188
|
+
postModuleDuplicateRaw(requestParameters, initOverrides) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
const requestOptions = yield this.postModuleDuplicateRequestOpts(requestParameters);
|
|
191
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
192
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetModuleFromJSON)(jsonValue));
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
|
|
197
|
+
* Duplicate a module
|
|
198
|
+
*/
|
|
199
|
+
postModuleDuplicate(requestParameters, initOverrides) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const response = yield this.postModuleDuplicateRaw(requestParameters, initOverrides);
|
|
202
|
+
return yield response.value();
|
|
203
|
+
});
|
|
204
|
+
}
|
|
158
205
|
/**
|
|
159
206
|
* Creates request options for putModule without sending the request
|
|
160
207
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
|
|
13
|
+
import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostDuplicate2, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
|
|
14
14
|
export interface CommitScormSessionRequest {
|
|
15
15
|
scormSessionId: string;
|
|
16
16
|
}
|
|
@@ -74,6 +74,12 @@ export interface ListContentSessionsRequest {
|
|
|
74
74
|
page?: number;
|
|
75
75
|
pageSize?: number;
|
|
76
76
|
}
|
|
77
|
+
export interface PostContentDuplicateRequest {
|
|
78
|
+
courseId: string;
|
|
79
|
+
moduleId: string;
|
|
80
|
+
contentId: string;
|
|
81
|
+
postDuplicate2?: PostDuplicate2;
|
|
82
|
+
}
|
|
77
83
|
export interface PostContentProcessRequest {
|
|
78
84
|
moduleId: string;
|
|
79
85
|
courseId: string;
|
|
@@ -303,6 +309,20 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
303
309
|
* List content sessions (instructor only)
|
|
304
310
|
*/
|
|
305
311
|
listContentSessions(requestParameters: ListContentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSessionList>;
|
|
312
|
+
/**
|
|
313
|
+
* Creates request options for postContentDuplicate without sending the request
|
|
314
|
+
*/
|
|
315
|
+
postContentDuplicateRequestOpts(requestParameters: PostContentDuplicateRequest): Promise<runtime.RequestOpts>;
|
|
316
|
+
/**
|
|
317
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
318
|
+
* Duplicate a content item
|
|
319
|
+
*/
|
|
320
|
+
postContentDuplicateRaw(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContent>>;
|
|
321
|
+
/**
|
|
322
|
+
* Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
|
|
323
|
+
* Duplicate a content item
|
|
324
|
+
*/
|
|
325
|
+
postContentDuplicate(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
306
326
|
/**
|
|
307
327
|
* Creates request options for postContentProcess without sending the request
|
|
308
328
|
*/
|
|
@@ -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
|
*/
|