@easyedu/js-lsm-api 1.26.0 → 1.27.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 +2 -2
- package/dist/apis/ContentApi.d.ts +64 -1
- package/dist/apis/ContentApi.js +155 -0
- package/dist/esm/apis/ContentApi.d.ts +64 -1
- package/dist/esm/apis/ContentApi.js +156 -1
- package/dist/esm/models/GetContentVersion.d.ts +76 -0
- package/dist/esm/models/GetContentVersion.js +71 -0
- package/dist/esm/models/GetContentVersionList.d.ts +57 -0
- package/dist/esm/models/GetContentVersionList.js +60 -0
- package/dist/esm/models/GetContentVersionListItemsInner.d.ts +56 -0
- package/dist/esm/models/GetContentVersionListItemsInner.js +59 -0
- package/dist/esm/models/GetContentVersionSandbox.d.ts +32 -0
- package/dist/esm/models/GetContentVersionSandbox.js +43 -0
- package/dist/esm/models/GetContentVersionScormData.d.ts +32 -0
- package/dist/esm/models/GetContentVersionScormData.js +43 -0
- package/dist/esm/models/GetScormPackage.d.ts +39 -0
- package/dist/esm/models/GetScormPackage.js +48 -0
- package/dist/esm/models/GetScormPackagePackageInfo.d.ts +104 -0
- package/dist/esm/models/GetScormPackagePackageInfo.js +81 -0
- package/dist/esm/models/PutContentVersion.d.ts +32 -0
- package/dist/esm/models/PutContentVersion.js +43 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/GetContentVersion.d.ts +76 -0
- package/dist/models/GetContentVersion.js +78 -0
- package/dist/models/GetContentVersionList.d.ts +57 -0
- package/dist/models/GetContentVersionList.js +67 -0
- package/dist/models/GetContentVersionListItemsInner.d.ts +56 -0
- package/dist/models/GetContentVersionListItemsInner.js +66 -0
- package/dist/models/GetContentVersionSandbox.d.ts +32 -0
- package/dist/models/GetContentVersionSandbox.js +50 -0
- package/dist/models/GetContentVersionScormData.d.ts +32 -0
- package/dist/models/GetContentVersionScormData.js +50 -0
- package/dist/models/GetScormPackage.d.ts +39 -0
- package/dist/models/GetScormPackage.js +55 -0
- package/dist/models/GetScormPackagePackageInfo.d.ts +104 -0
- package/dist/models/GetScormPackagePackageInfo.js +88 -0
- package/dist/models/PutContentVersion.d.ts +32 -0
- package/dist/models/PutContentVersion.js +50 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +253 -0
- package/src/models/GetContentVersion.ts +143 -0
- package/src/models/GetContentVersionList.ts +110 -0
- package/src/models/GetContentVersionListItemsInner.ts +102 -0
- package/src/models/GetContentVersionSandbox.ts +66 -0
- package/src/models/GetContentVersionScormData.ts +66 -0
- package/src/models/GetScormPackage.ts +83 -0
- package/src/models/GetScormPackagePackageInfo.ts +169 -0
- package/src/models/PutContentVersion.ts +66 -0
- package/src/models/index.ts +8 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -32,6 +32,11 @@ src/models/GetContentInstructorBasicReportingPerformance.ts
|
|
|
32
32
|
src/models/GetContentList.ts
|
|
33
33
|
src/models/GetContentSession.ts
|
|
34
34
|
src/models/GetContentUpload.ts
|
|
35
|
+
src/models/GetContentVersion.ts
|
|
36
|
+
src/models/GetContentVersionList.ts
|
|
37
|
+
src/models/GetContentVersionListItemsInner.ts
|
|
38
|
+
src/models/GetContentVersionSandbox.ts
|
|
39
|
+
src/models/GetContentVersionScormData.ts
|
|
35
40
|
src/models/GetCourse.ts
|
|
36
41
|
src/models/GetCourseEnrollment.ts
|
|
37
42
|
src/models/GetCourseEnrollmentList.ts
|
|
@@ -114,6 +119,8 @@ src/models/GetQuizResultsQuestionsInnerStudentAnswer.ts
|
|
|
114
119
|
src/models/GetQuizResultsScore.ts
|
|
115
120
|
src/models/GetQuizResultsTiming.ts
|
|
116
121
|
src/models/GetQuizStatistics.ts
|
|
122
|
+
src/models/GetScormPackage.ts
|
|
123
|
+
src/models/GetScormPackagePackageInfo.ts
|
|
117
124
|
src/models/GetUser.ts
|
|
118
125
|
src/models/GetUserQuizAttempts.ts
|
|
119
126
|
src/models/GetUserQuizAttemptsAllOfAttempts.ts
|
|
@@ -162,6 +169,7 @@ src/models/PostQuizSettings.ts
|
|
|
162
169
|
src/models/PostResetPassword.ts
|
|
163
170
|
src/models/PostSendResetPassword.ts
|
|
164
171
|
src/models/PutContent.ts
|
|
172
|
+
src/models/PutContentVersion.ts
|
|
165
173
|
src/models/PutCourse.ts
|
|
166
174
|
src/models/PutCourseEnrollment.ts
|
|
167
175
|
src/models/PutModule.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @easyedu/js-lsm-api@1.
|
|
1
|
+
## @easyedu/js-lsm-api@1.27.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.27.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -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, GetContentUpload, PostContentQuiz, PostContentSession, PostContentUpload, PutContent } from '../models/index';
|
|
13
|
+
import type { GetContent, GetContentList, GetContentSession, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormPackage, PostContentQuiz, PostContentSession, PostContentUpload, PutContent, PutContentVersion } from '../models/index';
|
|
14
14
|
export interface GetContentRequest {
|
|
15
15
|
contentId: string;
|
|
16
16
|
moduleId: string;
|
|
@@ -25,6 +25,22 @@ export interface GetContentSessionRequest {
|
|
|
25
25
|
moduleId: string;
|
|
26
26
|
courseId: string;
|
|
27
27
|
}
|
|
28
|
+
export interface GetContentVersionRequest {
|
|
29
|
+
contentId: string;
|
|
30
|
+
moduleId: string;
|
|
31
|
+
courseId: string;
|
|
32
|
+
versionId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetContentVersionListRequest {
|
|
35
|
+
contentId: string;
|
|
36
|
+
moduleId: string;
|
|
37
|
+
courseId: string;
|
|
38
|
+
page?: number;
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface GetScormPackageRequest {
|
|
42
|
+
packageId: string;
|
|
43
|
+
}
|
|
28
44
|
export interface PostContentProcessRequest {
|
|
29
45
|
moduleId: string;
|
|
30
46
|
courseId: string;
|
|
@@ -51,6 +67,13 @@ export interface PutContentRequest {
|
|
|
51
67
|
courseId: string;
|
|
52
68
|
putContent: PutContent;
|
|
53
69
|
}
|
|
70
|
+
export interface PutContentVersionRequest {
|
|
71
|
+
contentId: string;
|
|
72
|
+
moduleId: string;
|
|
73
|
+
courseId: string;
|
|
74
|
+
versionId: string;
|
|
75
|
+
putContentVersion: PutContentVersion;
|
|
76
|
+
}
|
|
54
77
|
/**
|
|
55
78
|
*
|
|
56
79
|
*/
|
|
@@ -79,6 +102,36 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
79
102
|
* get content session
|
|
80
103
|
*/
|
|
81
104
|
getContentSession(requestParameters: GetContentSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSession>;
|
|
105
|
+
/**
|
|
106
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
107
|
+
* Get details of a specific content version
|
|
108
|
+
*/
|
|
109
|
+
getContentVersionRaw(requestParameters: GetContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersion>>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
112
|
+
* Get details of a specific content version
|
|
113
|
+
*/
|
|
114
|
+
getContentVersion(requestParameters: GetContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersion>;
|
|
115
|
+
/**
|
|
116
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
117
|
+
* Get all versions of a content
|
|
118
|
+
*/
|
|
119
|
+
getContentVersionListRaw(requestParameters: GetContentVersionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersionList>>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
122
|
+
* Get all versions of a content
|
|
123
|
+
*/
|
|
124
|
+
getContentVersionList(requestParameters: GetContentVersionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersionList>;
|
|
125
|
+
/**
|
|
126
|
+
* Returns package information and table of contents for a SCORM package
|
|
127
|
+
* Get details of a SCORM package
|
|
128
|
+
*/
|
|
129
|
+
getScormPackageRaw(requestParameters: GetScormPackageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetScormPackage>>;
|
|
130
|
+
/**
|
|
131
|
+
* Returns package information and table of contents for a SCORM package
|
|
132
|
+
* Get details of a SCORM package
|
|
133
|
+
*/
|
|
134
|
+
getScormPackage(requestParameters: GetScormPackageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetScormPackage>;
|
|
82
135
|
/**
|
|
83
136
|
* Post a new content process
|
|
84
137
|
*/
|
|
@@ -121,4 +174,14 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
121
174
|
* Update content by id
|
|
122
175
|
*/
|
|
123
176
|
putContent(requestParameters: PutContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
177
|
+
/**
|
|
178
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
179
|
+
* Update a content version
|
|
180
|
+
*/
|
|
181
|
+
putContentVersionRaw(requestParameters: PutContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersion>>;
|
|
182
|
+
/**
|
|
183
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
184
|
+
* Update a content version
|
|
185
|
+
*/
|
|
186
|
+
putContentVersion(requestParameters: PutContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersion>;
|
|
124
187
|
}
|
package/dist/apis/ContentApi.js
CHANGED
|
@@ -128,6 +128,117 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
128
128
|
return yield response.value();
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
133
|
+
* Get details of a specific content version
|
|
134
|
+
*/
|
|
135
|
+
getContentVersionRaw(requestParameters, initOverrides) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
if (requestParameters['contentId'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentVersion().');
|
|
139
|
+
}
|
|
140
|
+
if (requestParameters['moduleId'] == null) {
|
|
141
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentVersion().');
|
|
142
|
+
}
|
|
143
|
+
if (requestParameters['courseId'] == null) {
|
|
144
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentVersion().');
|
|
145
|
+
}
|
|
146
|
+
if (requestParameters['versionId'] == null) {
|
|
147
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getContentVersion().');
|
|
148
|
+
}
|
|
149
|
+
const queryParameters = {};
|
|
150
|
+
const headerParameters = {};
|
|
151
|
+
const response = yield this.request({
|
|
152
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId}`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
153
|
+
method: 'GET',
|
|
154
|
+
headers: headerParameters,
|
|
155
|
+
query: queryParameters,
|
|
156
|
+
}, initOverrides);
|
|
157
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetContentVersionFromJSON)(jsonValue));
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
162
|
+
* Get details of a specific content version
|
|
163
|
+
*/
|
|
164
|
+
getContentVersion(requestParameters, initOverrides) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const response = yield this.getContentVersionRaw(requestParameters, initOverrides);
|
|
167
|
+
return yield response.value();
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
172
|
+
* Get all versions of a content
|
|
173
|
+
*/
|
|
174
|
+
getContentVersionListRaw(requestParameters, initOverrides) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
if (requestParameters['contentId'] == null) {
|
|
177
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentVersionList().');
|
|
178
|
+
}
|
|
179
|
+
if (requestParameters['moduleId'] == null) {
|
|
180
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentVersionList().');
|
|
181
|
+
}
|
|
182
|
+
if (requestParameters['courseId'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentVersionList().');
|
|
184
|
+
}
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
if (requestParameters['page'] != null) {
|
|
187
|
+
queryParameters['page'] = requestParameters['page'];
|
|
188
|
+
}
|
|
189
|
+
if (requestParameters['pageSize'] != null) {
|
|
190
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
191
|
+
}
|
|
192
|
+
const headerParameters = {};
|
|
193
|
+
const response = yield this.request({
|
|
194
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
195
|
+
method: 'GET',
|
|
196
|
+
headers: headerParameters,
|
|
197
|
+
query: queryParameters,
|
|
198
|
+
}, initOverrides);
|
|
199
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetContentVersionListFromJSON)(jsonValue));
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
204
|
+
* Get all versions of a content
|
|
205
|
+
*/
|
|
206
|
+
getContentVersionList(requestParameters, initOverrides) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const response = yield this.getContentVersionListRaw(requestParameters, initOverrides);
|
|
209
|
+
return yield response.value();
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Returns package information and table of contents for a SCORM package
|
|
214
|
+
* Get details of a SCORM package
|
|
215
|
+
*/
|
|
216
|
+
getScormPackageRaw(requestParameters, initOverrides) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
if (requestParameters['packageId'] == null) {
|
|
219
|
+
throw new runtime.RequiredError('packageId', 'Required parameter "packageId" was null or undefined when calling getScormPackage().');
|
|
220
|
+
}
|
|
221
|
+
const queryParameters = {};
|
|
222
|
+
const headerParameters = {};
|
|
223
|
+
const response = yield this.request({
|
|
224
|
+
path: `/scorm/packages/{packageId}`.replace(`{${"packageId"}}`, encodeURIComponent(String(requestParameters['packageId']))),
|
|
225
|
+
method: 'GET',
|
|
226
|
+
headers: headerParameters,
|
|
227
|
+
query: queryParameters,
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetScormPackageFromJSON)(jsonValue));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Returns package information and table of contents for a SCORM package
|
|
234
|
+
* Get details of a SCORM package
|
|
235
|
+
*/
|
|
236
|
+
getScormPackage(requestParameters, initOverrides) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
const response = yield this.getScormPackageRaw(requestParameters, initOverrides);
|
|
239
|
+
return yield response.value();
|
|
240
|
+
});
|
|
241
|
+
}
|
|
131
242
|
/**
|
|
132
243
|
* Post a new content process
|
|
133
244
|
*/
|
|
@@ -309,5 +420,49 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
309
420
|
return yield response.value();
|
|
310
421
|
});
|
|
311
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
425
|
+
* Update a content version
|
|
426
|
+
*/
|
|
427
|
+
putContentVersionRaw(requestParameters, initOverrides) {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
+
if (requestParameters['contentId'] == null) {
|
|
430
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling putContentVersion().');
|
|
431
|
+
}
|
|
432
|
+
if (requestParameters['moduleId'] == null) {
|
|
433
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling putContentVersion().');
|
|
434
|
+
}
|
|
435
|
+
if (requestParameters['courseId'] == null) {
|
|
436
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putContentVersion().');
|
|
437
|
+
}
|
|
438
|
+
if (requestParameters['versionId'] == null) {
|
|
439
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling putContentVersion().');
|
|
440
|
+
}
|
|
441
|
+
if (requestParameters['putContentVersion'] == null) {
|
|
442
|
+
throw new runtime.RequiredError('putContentVersion', 'Required parameter "putContentVersion" was null or undefined when calling putContentVersion().');
|
|
443
|
+
}
|
|
444
|
+
const queryParameters = {};
|
|
445
|
+
const headerParameters = {};
|
|
446
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
447
|
+
const response = yield this.request({
|
|
448
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId}`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
449
|
+
method: 'PUT',
|
|
450
|
+
headers: headerParameters,
|
|
451
|
+
query: queryParameters,
|
|
452
|
+
body: (0, index_1.PutContentVersionToJSON)(requestParameters['putContentVersion']),
|
|
453
|
+
}, initOverrides);
|
|
454
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetContentVersionFromJSON)(jsonValue));
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
459
|
+
* Update a content version
|
|
460
|
+
*/
|
|
461
|
+
putContentVersion(requestParameters, initOverrides) {
|
|
462
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
463
|
+
const response = yield this.putContentVersionRaw(requestParameters, initOverrides);
|
|
464
|
+
return yield response.value();
|
|
465
|
+
});
|
|
466
|
+
}
|
|
312
467
|
}
|
|
313
468
|
exports.ContentApi = ContentApi;
|
|
@@ -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, GetContentUpload, PostContentQuiz, PostContentSession, PostContentUpload, PutContent } from '../models/index';
|
|
13
|
+
import type { GetContent, GetContentList, GetContentSession, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormPackage, PostContentQuiz, PostContentSession, PostContentUpload, PutContent, PutContentVersion } from '../models/index';
|
|
14
14
|
export interface GetContentRequest {
|
|
15
15
|
contentId: string;
|
|
16
16
|
moduleId: string;
|
|
@@ -25,6 +25,22 @@ export interface GetContentSessionRequest {
|
|
|
25
25
|
moduleId: string;
|
|
26
26
|
courseId: string;
|
|
27
27
|
}
|
|
28
|
+
export interface GetContentVersionRequest {
|
|
29
|
+
contentId: string;
|
|
30
|
+
moduleId: string;
|
|
31
|
+
courseId: string;
|
|
32
|
+
versionId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetContentVersionListRequest {
|
|
35
|
+
contentId: string;
|
|
36
|
+
moduleId: string;
|
|
37
|
+
courseId: string;
|
|
38
|
+
page?: number;
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface GetScormPackageRequest {
|
|
42
|
+
packageId: string;
|
|
43
|
+
}
|
|
28
44
|
export interface PostContentProcessRequest {
|
|
29
45
|
moduleId: string;
|
|
30
46
|
courseId: string;
|
|
@@ -51,6 +67,13 @@ export interface PutContentRequest {
|
|
|
51
67
|
courseId: string;
|
|
52
68
|
putContent: PutContent;
|
|
53
69
|
}
|
|
70
|
+
export interface PutContentVersionRequest {
|
|
71
|
+
contentId: string;
|
|
72
|
+
moduleId: string;
|
|
73
|
+
courseId: string;
|
|
74
|
+
versionId: string;
|
|
75
|
+
putContentVersion: PutContentVersion;
|
|
76
|
+
}
|
|
54
77
|
/**
|
|
55
78
|
*
|
|
56
79
|
*/
|
|
@@ -79,6 +102,36 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
79
102
|
* get content session
|
|
80
103
|
*/
|
|
81
104
|
getContentSession(requestParameters: GetContentSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSession>;
|
|
105
|
+
/**
|
|
106
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
107
|
+
* Get details of a specific content version
|
|
108
|
+
*/
|
|
109
|
+
getContentVersionRaw(requestParameters: GetContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersion>>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
112
|
+
* Get details of a specific content version
|
|
113
|
+
*/
|
|
114
|
+
getContentVersion(requestParameters: GetContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersion>;
|
|
115
|
+
/**
|
|
116
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
117
|
+
* Get all versions of a content
|
|
118
|
+
*/
|
|
119
|
+
getContentVersionListRaw(requestParameters: GetContentVersionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersionList>>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
122
|
+
* Get all versions of a content
|
|
123
|
+
*/
|
|
124
|
+
getContentVersionList(requestParameters: GetContentVersionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersionList>;
|
|
125
|
+
/**
|
|
126
|
+
* Returns package information and table of contents for a SCORM package
|
|
127
|
+
* Get details of a SCORM package
|
|
128
|
+
*/
|
|
129
|
+
getScormPackageRaw(requestParameters: GetScormPackageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetScormPackage>>;
|
|
130
|
+
/**
|
|
131
|
+
* Returns package information and table of contents for a SCORM package
|
|
132
|
+
* Get details of a SCORM package
|
|
133
|
+
*/
|
|
134
|
+
getScormPackage(requestParameters: GetScormPackageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetScormPackage>;
|
|
82
135
|
/**
|
|
83
136
|
* Post a new content process
|
|
84
137
|
*/
|
|
@@ -121,4 +174,14 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
121
174
|
* Update content by id
|
|
122
175
|
*/
|
|
123
176
|
putContent(requestParameters: PutContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
177
|
+
/**
|
|
178
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
179
|
+
* Update a content version
|
|
180
|
+
*/
|
|
181
|
+
putContentVersionRaw(requestParameters: PutContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentVersion>>;
|
|
182
|
+
/**
|
|
183
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
184
|
+
* Update a content version
|
|
185
|
+
*/
|
|
186
|
+
putContentVersion(requestParameters: PutContentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentVersion>;
|
|
124
187
|
}
|
|
@@ -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, GetContentUploadFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PutContentToJSON, } from '../models/index';
|
|
24
|
+
import { GetContentFromJSON, GetContentListFromJSON, GetContentSessionFromJSON, GetContentUploadFromJSON, GetContentVersionFromJSON, GetContentVersionListFromJSON, GetScormPackageFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PutContentToJSON, PutContentVersionToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -125,6 +125,117 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
125
125
|
return yield response.value();
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
130
|
+
* Get details of a specific content version
|
|
131
|
+
*/
|
|
132
|
+
getContentVersionRaw(requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
if (requestParameters['contentId'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentVersion().');
|
|
136
|
+
}
|
|
137
|
+
if (requestParameters['moduleId'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentVersion().');
|
|
139
|
+
}
|
|
140
|
+
if (requestParameters['courseId'] == null) {
|
|
141
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentVersion().');
|
|
142
|
+
}
|
|
143
|
+
if (requestParameters['versionId'] == null) {
|
|
144
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getContentVersion().');
|
|
145
|
+
}
|
|
146
|
+
const queryParameters = {};
|
|
147
|
+
const headerParameters = {};
|
|
148
|
+
const response = yield this.request({
|
|
149
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId}`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
150
|
+
method: 'GET',
|
|
151
|
+
headers: headerParameters,
|
|
152
|
+
query: queryParameters,
|
|
153
|
+
}, initOverrides);
|
|
154
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentVersionFromJSON(jsonValue));
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
159
|
+
* Get details of a specific content version
|
|
160
|
+
*/
|
|
161
|
+
getContentVersion(requestParameters, initOverrides) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
const response = yield this.getContentVersionRaw(requestParameters, initOverrides);
|
|
164
|
+
return yield response.value();
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
169
|
+
* Get all versions of a content
|
|
170
|
+
*/
|
|
171
|
+
getContentVersionListRaw(requestParameters, initOverrides) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
if (requestParameters['contentId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentVersionList().');
|
|
175
|
+
}
|
|
176
|
+
if (requestParameters['moduleId'] == null) {
|
|
177
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentVersionList().');
|
|
178
|
+
}
|
|
179
|
+
if (requestParameters['courseId'] == null) {
|
|
180
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentVersionList().');
|
|
181
|
+
}
|
|
182
|
+
const queryParameters = {};
|
|
183
|
+
if (requestParameters['page'] != null) {
|
|
184
|
+
queryParameters['page'] = requestParameters['page'];
|
|
185
|
+
}
|
|
186
|
+
if (requestParameters['pageSize'] != null) {
|
|
187
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
188
|
+
}
|
|
189
|
+
const headerParameters = {};
|
|
190
|
+
const response = yield this.request({
|
|
191
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
192
|
+
method: 'GET',
|
|
193
|
+
headers: headerParameters,
|
|
194
|
+
query: queryParameters,
|
|
195
|
+
}, initOverrides);
|
|
196
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentVersionListFromJSON(jsonValue));
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
201
|
+
* Get all versions of a content
|
|
202
|
+
*/
|
|
203
|
+
getContentVersionList(requestParameters, initOverrides) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const response = yield this.getContentVersionListRaw(requestParameters, initOverrides);
|
|
206
|
+
return yield response.value();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Returns package information and table of contents for a SCORM package
|
|
211
|
+
* Get details of a SCORM package
|
|
212
|
+
*/
|
|
213
|
+
getScormPackageRaw(requestParameters, initOverrides) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
if (requestParameters['packageId'] == null) {
|
|
216
|
+
throw new runtime.RequiredError('packageId', 'Required parameter "packageId" was null or undefined when calling getScormPackage().');
|
|
217
|
+
}
|
|
218
|
+
const queryParameters = {};
|
|
219
|
+
const headerParameters = {};
|
|
220
|
+
const response = yield this.request({
|
|
221
|
+
path: `/scorm/packages/{packageId}`.replace(`{${"packageId"}}`, encodeURIComponent(String(requestParameters['packageId']))),
|
|
222
|
+
method: 'GET',
|
|
223
|
+
headers: headerParameters,
|
|
224
|
+
query: queryParameters,
|
|
225
|
+
}, initOverrides);
|
|
226
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetScormPackageFromJSON(jsonValue));
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Returns package information and table of contents for a SCORM package
|
|
231
|
+
* Get details of a SCORM package
|
|
232
|
+
*/
|
|
233
|
+
getScormPackage(requestParameters, initOverrides) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
const response = yield this.getScormPackageRaw(requestParameters, initOverrides);
|
|
236
|
+
return yield response.value();
|
|
237
|
+
});
|
|
238
|
+
}
|
|
128
239
|
/**
|
|
129
240
|
* Post a new content process
|
|
130
241
|
*/
|
|
@@ -306,4 +417,48 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
306
417
|
return yield response.value();
|
|
307
418
|
});
|
|
308
419
|
}
|
|
420
|
+
/**
|
|
421
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
422
|
+
* Update a content version
|
|
423
|
+
*/
|
|
424
|
+
putContentVersionRaw(requestParameters, initOverrides) {
|
|
425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
+
if (requestParameters['contentId'] == null) {
|
|
427
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling putContentVersion().');
|
|
428
|
+
}
|
|
429
|
+
if (requestParameters['moduleId'] == null) {
|
|
430
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling putContentVersion().');
|
|
431
|
+
}
|
|
432
|
+
if (requestParameters['courseId'] == null) {
|
|
433
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putContentVersion().');
|
|
434
|
+
}
|
|
435
|
+
if (requestParameters['versionId'] == null) {
|
|
436
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling putContentVersion().');
|
|
437
|
+
}
|
|
438
|
+
if (requestParameters['putContentVersion'] == null) {
|
|
439
|
+
throw new runtime.RequiredError('putContentVersion', 'Required parameter "putContentVersion" was null or undefined when calling putContentVersion().');
|
|
440
|
+
}
|
|
441
|
+
const queryParameters = {};
|
|
442
|
+
const headerParameters = {};
|
|
443
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
444
|
+
const response = yield this.request({
|
|
445
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId}`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
446
|
+
method: 'PUT',
|
|
447
|
+
headers: headerParameters,
|
|
448
|
+
query: queryParameters,
|
|
449
|
+
body: PutContentVersionToJSON(requestParameters['putContentVersion']),
|
|
450
|
+
}, initOverrides);
|
|
451
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentVersionFromJSON(jsonValue));
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
456
|
+
* Update a content version
|
|
457
|
+
*/
|
|
458
|
+
putContentVersion(requestParameters, initOverrides) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
const response = yield this.putContentVersionRaw(requestParameters, initOverrides);
|
|
461
|
+
return yield response.value();
|
|
462
|
+
});
|
|
463
|
+
}
|
|
309
464
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { GetContentVersionSandbox } from './GetContentVersionSandbox';
|
|
13
|
+
import type { GetContentVersionScormData } from './GetContentVersionScormData';
|
|
14
|
+
/**
|
|
15
|
+
* Details of a specific content version
|
|
16
|
+
* @export
|
|
17
|
+
* @interface GetContentVersion
|
|
18
|
+
*/
|
|
19
|
+
export interface GetContentVersion {
|
|
20
|
+
/**
|
|
21
|
+
* The external_id (UUID) for this version
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof GetContentVersion
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* The content's external_id that this version belongs to
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof GetContentVersion
|
|
30
|
+
*/
|
|
31
|
+
contentId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Version number
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof GetContentVersion
|
|
36
|
+
*/
|
|
37
|
+
version: number;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this is the currently active version
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof GetContentVersion
|
|
42
|
+
*/
|
|
43
|
+
isActive: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* When this version was created
|
|
46
|
+
* @type {Date}
|
|
47
|
+
* @memberof GetContentVersion
|
|
48
|
+
*/
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
/**
|
|
51
|
+
* When this version was last updated
|
|
52
|
+
* @type {Date}
|
|
53
|
+
* @memberof GetContentVersion
|
|
54
|
+
*/
|
|
55
|
+
updatedAt: Date;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {GetContentVersionSandbox}
|
|
59
|
+
* @memberof GetContentVersion
|
|
60
|
+
*/
|
|
61
|
+
sandbox: GetContentVersionSandbox;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {GetContentVersionScormData}
|
|
65
|
+
* @memberof GetContentVersion
|
|
66
|
+
*/
|
|
67
|
+
scormData?: GetContentVersionScormData | null;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the GetContentVersion interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfGetContentVersion(value: object): value is GetContentVersion;
|
|
73
|
+
export declare function GetContentVersionFromJSON(json: any): GetContentVersion;
|
|
74
|
+
export declare function GetContentVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentVersion;
|
|
75
|
+
export declare function GetContentVersionToJSON(json: any): GetContentVersion;
|
|
76
|
+
export declare function GetContentVersionToJSONTyped(value?: GetContentVersion | null, ignoreDiscriminator?: boolean): any;
|