@easyedu/js-lsm-api 1.67.0 → 1.68.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 +8 -2
- package/dist/apis/ContentApi.d.ts +56 -0
- package/dist/apis/ContentApi.js +121 -1
- package/dist/esm/apis/ContentApi.d.ts +56 -0
- package/dist/esm/apis/ContentApi.js +120 -0
- package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
- package/dist/esm/models/ContentAttemptItem.js +68 -0
- package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
- package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
- package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
- package/dist/esm/models/ContentAttemptScore.js +47 -0
- package/dist/esm/models/GetContentAttempts.d.ts +90 -0
- package/dist/esm/models/GetContentAttempts.js +84 -0
- package/dist/esm/models/GetContentSession.d.ts +12 -0
- package/dist/esm/models/GetContentSession.js +8 -0
- package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
- package/dist/esm/models/GetContentSessionDetail.js +8 -0
- package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
- package/dist/esm/models/GetContentSessionListItem.js +16 -0
- package/dist/esm/models/PostContentSession.d.ts +12 -0
- package/dist/esm/models/PostContentSession.js +8 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ContentAttemptItem.d.ts +69 -0
- package/dist/models/ContentAttemptItem.js +75 -0
- package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
- package/dist/models/ContentAttemptRollupScore.js +54 -0
- package/dist/models/ContentAttemptScore.d.ts +50 -0
- package/dist/models/ContentAttemptScore.js +54 -0
- package/dist/models/GetContentAttempts.d.ts +90 -0
- package/dist/models/GetContentAttempts.js +92 -0
- package/dist/models/GetContentSession.d.ts +12 -0
- package/dist/models/GetContentSession.js +8 -0
- package/dist/models/GetContentSessionDetail.d.ts +12 -0
- package/dist/models/GetContentSessionDetail.js +8 -0
- package/dist/models/GetContentSessionListItem.d.ts +24 -0
- package/dist/models/GetContentSessionListItem.js +16 -0
- package/dist/models/PostContentSession.d.ts +12 -0
- package/dist/models/PostContentSession.js +8 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ContentApi.md +159 -0
- package/docs/ContentAttemptItem.md +47 -0
- package/docs/ContentAttemptRollupScore.md +37 -0
- package/docs/ContentAttemptScore.md +41 -0
- package/docs/GetContentAttempts.md +51 -0
- package/docs/GetContentSession.md +4 -0
- package/docs/GetContentSessionDetail.md +4 -0
- package/docs/GetContentSessionListItem.md +8 -0
- package/docs/PostContentSession.md +4 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +172 -0
- package/src/models/ContentAttemptItem.ts +128 -0
- package/src/models/ContentAttemptRollupScore.ts +75 -0
- package/src/models/ContentAttemptScore.ts +89 -0
- package/src/models/GetContentAttempts.ts +164 -0
- package/src/models/GetContentSession.ts +18 -0
- package/src/models/GetContentSessionDetail.ts +18 -0
- package/src/models/GetContentSessionListItem.ts +36 -0
- package/src/models/PostContentSession.ts +18 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -8,6 +8,9 @@ docs/CertificateConfig.md
|
|
|
8
8
|
docs/CertificatePublic.md
|
|
9
9
|
docs/ChatApi.md
|
|
10
10
|
docs/ContentApi.md
|
|
11
|
+
docs/ContentAttemptItem.md
|
|
12
|
+
docs/ContentAttemptRollupScore.md
|
|
13
|
+
docs/ContentAttemptScore.md
|
|
11
14
|
docs/ContentLaunchMode.md
|
|
12
15
|
docs/CourseApi.md
|
|
13
16
|
docs/CourseCatalog.md
|
|
@@ -27,6 +30,7 @@ docs/GetCertificateConfigList.md
|
|
|
27
30
|
docs/GetCertificateList.md
|
|
28
31
|
docs/GetChatMessage.md
|
|
29
32
|
docs/GetContent.md
|
|
33
|
+
docs/GetContentAttempts.md
|
|
30
34
|
docs/GetContentContentData.md
|
|
31
35
|
docs/GetContentGradeDetail.md
|
|
32
36
|
docs/GetContentGrades.md
|
|
@@ -305,6 +309,9 @@ src/index.ts
|
|
|
305
309
|
src/models/Certificate.ts
|
|
306
310
|
src/models/CertificateConfig.ts
|
|
307
311
|
src/models/CertificatePublic.ts
|
|
312
|
+
src/models/ContentAttemptItem.ts
|
|
313
|
+
src/models/ContentAttemptRollupScore.ts
|
|
314
|
+
src/models/ContentAttemptScore.ts
|
|
308
315
|
src/models/ContentLaunchMode.ts
|
|
309
316
|
src/models/CourseCatalog.ts
|
|
310
317
|
src/models/CourseShare.ts
|
|
@@ -320,6 +327,7 @@ src/models/GetCertificateConfigList.ts
|
|
|
320
327
|
src/models/GetCertificateList.ts
|
|
321
328
|
src/models/GetChatMessage.ts
|
|
322
329
|
src/models/GetContent.ts
|
|
330
|
+
src/models/GetContentAttempts.ts
|
|
323
331
|
src/models/GetContentContentData.ts
|
|
324
332
|
src/models/GetContentGradeDetail.ts
|
|
325
333
|
src/models/GetContentGrades.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.68.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -72,6 +72,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
72
72
|
*ContentApi* | [**deleteContent**](docs/ContentApi.md#deletecontent) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Delete content by id
|
|
73
73
|
*ContentApi* | [**deleteContentVersion**](docs/ContentApi.md#deletecontentversion) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Delete an inactive content version
|
|
74
74
|
*ContentApi* | [**getContent**](docs/ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content
|
|
75
|
+
*ContentApi* | [**getContentAttempts**](docs/ContentApi.md#getcontentattempts) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/attempts | Get content attempts
|
|
75
76
|
*ContentApi* | [**getContentList**](docs/ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list
|
|
76
77
|
*ContentApi* | [**getContentSession**](docs/ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session
|
|
77
78
|
*ContentApi* | [**getContentSessionDetail**](docs/ContentApi.md#getcontentsessiondetail) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions/{sessionId} | Get content session details (instructor only)
|
|
@@ -87,6 +88,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
87
88
|
*ContentApi* | [**postContentProcess**](docs/ContentApi.md#postcontentprocess) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/process | Post a new content process
|
|
88
89
|
*ContentApi* | [**postContentQuiz**](docs/ContentApi.md#postcontentquiz) | **POST** /courses/{courseId}/modules/{moduleId}/contents/quiz | Create a new quiz content
|
|
89
90
|
*ContentApi* | [**postContentSession**](docs/ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session
|
|
91
|
+
*ContentApi* | [**postContentSessionRetake**](docs/ContentApi.md#postcontentsessionretake) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session/retake | Create a new retake content session
|
|
90
92
|
*ContentApi* | [**postContentUpload**](docs/ContentApi.md#postcontentupload) | **POST** /courses/{courseId}/modules/{moduleId}/contents/upload | Post a new content upload
|
|
91
93
|
*ContentApi* | [**putContent**](docs/ContentApi.md#putcontent) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Update content by id
|
|
92
94
|
*ContentApi* | [**putContentReorder**](docs/ContentApi.md#putcontentreorder) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/reorder | Reorder content in a module
|
|
@@ -248,6 +250,9 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
248
250
|
- [Certificate](docs/Certificate.md)
|
|
249
251
|
- [CertificateConfig](docs/CertificateConfig.md)
|
|
250
252
|
- [CertificatePublic](docs/CertificatePublic.md)
|
|
253
|
+
- [ContentAttemptItem](docs/ContentAttemptItem.md)
|
|
254
|
+
- [ContentAttemptRollupScore](docs/ContentAttemptRollupScore.md)
|
|
255
|
+
- [ContentAttemptScore](docs/ContentAttemptScore.md)
|
|
251
256
|
- [ContentLaunchMode](docs/ContentLaunchMode.md)
|
|
252
257
|
- [CourseCatalog](docs/CourseCatalog.md)
|
|
253
258
|
- [CourseShare](docs/CourseShare.md)
|
|
@@ -263,6 +268,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
263
268
|
- [GetCertificateList](docs/GetCertificateList.md)
|
|
264
269
|
- [GetChatMessage](docs/GetChatMessage.md)
|
|
265
270
|
- [GetContent](docs/GetContent.md)
|
|
271
|
+
- [GetContentAttempts](docs/GetContentAttempts.md)
|
|
266
272
|
- [GetContentContentData](docs/GetContentContentData.md)
|
|
267
273
|
- [GetContentGradeDetail](docs/GetContentGradeDetail.md)
|
|
268
274
|
- [GetContentGrades](docs/GetContentGrades.md)
|
|
@@ -519,7 +525,7 @@ and is automatically generated by the
|
|
|
519
525
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
520
526
|
|
|
521
527
|
- API version: `1.0.0`
|
|
522
|
-
- Package version: `1.
|
|
528
|
+
- Package version: `1.68.0`
|
|
523
529
|
- Generator version: `7.22.0`
|
|
524
530
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
525
531
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import { type GetContent } from '../models/GetContent';
|
|
14
|
+
import { type GetContentAttempts } from '../models/GetContentAttempts';
|
|
14
15
|
import { type GetContentList } from '../models/GetContentList';
|
|
15
16
|
import { type GetContentSession } from '../models/GetContentSession';
|
|
16
17
|
import { type GetContentSessionDetail } from '../models/GetContentSessionDetail';
|
|
@@ -51,6 +52,13 @@ export interface GetContentRequest {
|
|
|
51
52
|
moduleId: string;
|
|
52
53
|
courseId: string;
|
|
53
54
|
}
|
|
55
|
+
export interface GetContentAttemptsRequest {
|
|
56
|
+
contentId: string;
|
|
57
|
+
moduleId: string;
|
|
58
|
+
courseId: string;
|
|
59
|
+
userId?: number;
|
|
60
|
+
environment?: GetContentAttemptsEnvironmentEnum;
|
|
61
|
+
}
|
|
54
62
|
export interface GetContentListRequest {
|
|
55
63
|
moduleId: string;
|
|
56
64
|
courseId: string;
|
|
@@ -128,6 +136,12 @@ export interface PostContentSessionRequest {
|
|
|
128
136
|
courseId: string;
|
|
129
137
|
environment?: PostContentSessionEnvironmentEnum;
|
|
130
138
|
}
|
|
139
|
+
export interface PostContentSessionRetakeRequest {
|
|
140
|
+
contentId: string;
|
|
141
|
+
moduleId: string;
|
|
142
|
+
courseId: string;
|
|
143
|
+
environment?: PostContentSessionRetakeEnvironmentEnum;
|
|
144
|
+
}
|
|
131
145
|
export interface PostContentUploadRequest {
|
|
132
146
|
moduleId: string;
|
|
133
147
|
courseId: string;
|
|
@@ -223,6 +237,20 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
223
237
|
* get content
|
|
224
238
|
*/
|
|
225
239
|
getContent(requestParameters: GetContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
240
|
+
/**
|
|
241
|
+
* Creates request options for getContentAttempts without sending the request
|
|
242
|
+
*/
|
|
243
|
+
getContentAttemptsRequestOpts(requestParameters: GetContentAttemptsRequest): Promise<runtime.RequestOpts>;
|
|
244
|
+
/**
|
|
245
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
246
|
+
* Get content attempts
|
|
247
|
+
*/
|
|
248
|
+
getContentAttemptsRaw(requestParameters: GetContentAttemptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentAttempts>>;
|
|
249
|
+
/**
|
|
250
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
251
|
+
* Get content attempts
|
|
252
|
+
*/
|
|
253
|
+
getContentAttempts(requestParameters: GetContentAttemptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentAttempts>;
|
|
226
254
|
/**
|
|
227
255
|
* Creates request options for getContentList without sending the request
|
|
228
256
|
*/
|
|
@@ -426,6 +454,18 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
426
454
|
* Post a new content session
|
|
427
455
|
*/
|
|
428
456
|
postContentSession(requestParameters: PostContentSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostContentSession>;
|
|
457
|
+
/**
|
|
458
|
+
* Creates request options for postContentSessionRetake without sending the request
|
|
459
|
+
*/
|
|
460
|
+
postContentSessionRetakeRequestOpts(requestParameters: PostContentSessionRetakeRequest): Promise<runtime.RequestOpts>;
|
|
461
|
+
/**
|
|
462
|
+
* Create a new retake content session
|
|
463
|
+
*/
|
|
464
|
+
postContentSessionRetakeRaw(requestParameters: PostContentSessionRetakeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostContentSession>>;
|
|
465
|
+
/**
|
|
466
|
+
* Create a new retake content session
|
|
467
|
+
*/
|
|
468
|
+
postContentSessionRetake(requestParameters: PostContentSessionRetakeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostContentSession>;
|
|
429
469
|
/**
|
|
430
470
|
* Creates request options for postContentUpload without sending the request
|
|
431
471
|
*/
|
|
@@ -531,6 +571,14 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
531
571
|
*/
|
|
532
572
|
verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest>;
|
|
533
573
|
}
|
|
574
|
+
/**
|
|
575
|
+
* @export
|
|
576
|
+
*/
|
|
577
|
+
export declare const GetContentAttemptsEnvironmentEnum: {
|
|
578
|
+
readonly Sandbox: "sandbox";
|
|
579
|
+
readonly Live: "live";
|
|
580
|
+
};
|
|
581
|
+
export type GetContentAttemptsEnvironmentEnum = typeof GetContentAttemptsEnvironmentEnum[keyof typeof GetContentAttemptsEnvironmentEnum];
|
|
534
582
|
/**
|
|
535
583
|
* @export
|
|
536
584
|
*/
|
|
@@ -547,3 +595,11 @@ export declare const PostContentSessionEnvironmentEnum: {
|
|
|
547
595
|
readonly Live: "live";
|
|
548
596
|
};
|
|
549
597
|
export type PostContentSessionEnvironmentEnum = typeof PostContentSessionEnvironmentEnum[keyof typeof PostContentSessionEnvironmentEnum];
|
|
598
|
+
/**
|
|
599
|
+
* @export
|
|
600
|
+
*/
|
|
601
|
+
export declare const PostContentSessionRetakeEnvironmentEnum: {
|
|
602
|
+
readonly Sandbox: "sandbox";
|
|
603
|
+
readonly Live: "live";
|
|
604
|
+
};
|
|
605
|
+
export type PostContentSessionRetakeEnvironmentEnum = typeof PostContentSessionRetakeEnvironmentEnum[keyof typeof PostContentSessionRetakeEnvironmentEnum];
|
package/dist/apis/ContentApi.js
CHANGED
|
@@ -22,9 +22,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.PostContentSessionEnvironmentEnum = exports.ListContentSessionsEnvironmentEnum = exports.ContentApi = void 0;
|
|
25
|
+
exports.PostContentSessionRetakeEnvironmentEnum = exports.PostContentSessionEnvironmentEnum = exports.ListContentSessionsEnvironmentEnum = exports.GetContentAttemptsEnvironmentEnum = exports.ContentApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const GetContent_1 = require("../models/GetContent");
|
|
28
|
+
const GetContentAttempts_1 = require("../models/GetContentAttempts");
|
|
28
29
|
const GetContentList_1 = require("../models/GetContentList");
|
|
29
30
|
const GetContentSession_1 = require("../models/GetContentSession");
|
|
30
31
|
const GetContentSessionDetail_1 = require("../models/GetContentSessionDetail");
|
|
@@ -235,6 +236,61 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
235
236
|
return yield response.value();
|
|
236
237
|
});
|
|
237
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Creates request options for getContentAttempts without sending the request
|
|
241
|
+
*/
|
|
242
|
+
getContentAttemptsRequestOpts(requestParameters) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
if (requestParameters['contentId'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentAttempts().');
|
|
246
|
+
}
|
|
247
|
+
if (requestParameters['moduleId'] == null) {
|
|
248
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentAttempts().');
|
|
249
|
+
}
|
|
250
|
+
if (requestParameters['courseId'] == null) {
|
|
251
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentAttempts().');
|
|
252
|
+
}
|
|
253
|
+
const queryParameters = {};
|
|
254
|
+
if (requestParameters['userId'] != null) {
|
|
255
|
+
queryParameters['user_id'] = requestParameters['userId'];
|
|
256
|
+
}
|
|
257
|
+
if (requestParameters['environment'] != null) {
|
|
258
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
259
|
+
}
|
|
260
|
+
const headerParameters = {};
|
|
261
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/attempts`;
|
|
262
|
+
urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
|
|
263
|
+
urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
|
|
264
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
265
|
+
return {
|
|
266
|
+
path: urlPath,
|
|
267
|
+
method: 'GET',
|
|
268
|
+
headers: headerParameters,
|
|
269
|
+
query: queryParameters,
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
275
|
+
* Get content attempts
|
|
276
|
+
*/
|
|
277
|
+
getContentAttemptsRaw(requestParameters, initOverrides) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
const requestOptions = yield this.getContentAttemptsRequestOpts(requestParameters);
|
|
280
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetContentAttempts_1.GetContentAttemptsFromJSON)(jsonValue));
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
286
|
+
* Get content attempts
|
|
287
|
+
*/
|
|
288
|
+
getContentAttempts(requestParameters, initOverrides) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
const response = yield this.getContentAttemptsRaw(requestParameters, initOverrides);
|
|
291
|
+
return yield response.value();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
238
294
|
/**
|
|
239
295
|
* Creates request options for getContentList without sending the request
|
|
240
296
|
*/
|
|
@@ -962,6 +1018,56 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
962
1018
|
return yield response.value();
|
|
963
1019
|
});
|
|
964
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Creates request options for postContentSessionRetake without sending the request
|
|
1023
|
+
*/
|
|
1024
|
+
postContentSessionRetakeRequestOpts(requestParameters) {
|
|
1025
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1026
|
+
if (requestParameters['contentId'] == null) {
|
|
1027
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling postContentSessionRetake().');
|
|
1028
|
+
}
|
|
1029
|
+
if (requestParameters['moduleId'] == null) {
|
|
1030
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postContentSessionRetake().');
|
|
1031
|
+
}
|
|
1032
|
+
if (requestParameters['courseId'] == null) {
|
|
1033
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postContentSessionRetake().');
|
|
1034
|
+
}
|
|
1035
|
+
const queryParameters = {};
|
|
1036
|
+
if (requestParameters['environment'] != null) {
|
|
1037
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
1038
|
+
}
|
|
1039
|
+
const headerParameters = {};
|
|
1040
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/session/retake`;
|
|
1041
|
+
urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
|
|
1042
|
+
urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
|
|
1043
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1044
|
+
return {
|
|
1045
|
+
path: urlPath,
|
|
1046
|
+
method: 'POST',
|
|
1047
|
+
headers: headerParameters,
|
|
1048
|
+
query: queryParameters,
|
|
1049
|
+
};
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Create a new retake content session
|
|
1054
|
+
*/
|
|
1055
|
+
postContentSessionRetakeRaw(requestParameters, initOverrides) {
|
|
1056
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1057
|
+
const requestOptions = yield this.postContentSessionRetakeRequestOpts(requestParameters);
|
|
1058
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1059
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, PostContentSession_1.PostContentSessionFromJSON)(jsonValue));
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Create a new retake content session
|
|
1064
|
+
*/
|
|
1065
|
+
postContentSessionRetake(requestParameters, initOverrides) {
|
|
1066
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1067
|
+
const response = yield this.postContentSessionRetakeRaw(requestParameters, initOverrides);
|
|
1068
|
+
return yield response.value();
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
965
1071
|
/**
|
|
966
1072
|
* Creates request options for postContentUpload without sending the request
|
|
967
1073
|
*/
|
|
@@ -1348,6 +1454,13 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
1348
1454
|
}
|
|
1349
1455
|
}
|
|
1350
1456
|
exports.ContentApi = ContentApi;
|
|
1457
|
+
/**
|
|
1458
|
+
* @export
|
|
1459
|
+
*/
|
|
1460
|
+
exports.GetContentAttemptsEnvironmentEnum = {
|
|
1461
|
+
Sandbox: 'sandbox',
|
|
1462
|
+
Live: 'live'
|
|
1463
|
+
};
|
|
1351
1464
|
/**
|
|
1352
1465
|
* @export
|
|
1353
1466
|
*/
|
|
@@ -1362,3 +1475,10 @@ exports.PostContentSessionEnvironmentEnum = {
|
|
|
1362
1475
|
Sandbox: 'sandbox',
|
|
1363
1476
|
Live: 'live'
|
|
1364
1477
|
};
|
|
1478
|
+
/**
|
|
1479
|
+
* @export
|
|
1480
|
+
*/
|
|
1481
|
+
exports.PostContentSessionRetakeEnvironmentEnum = {
|
|
1482
|
+
Sandbox: 'sandbox',
|
|
1483
|
+
Live: 'live'
|
|
1484
|
+
};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import { type GetContent } from '../models/GetContent';
|
|
14
|
+
import { type GetContentAttempts } from '../models/GetContentAttempts';
|
|
14
15
|
import { type GetContentList } from '../models/GetContentList';
|
|
15
16
|
import { type GetContentSession } from '../models/GetContentSession';
|
|
16
17
|
import { type GetContentSessionDetail } from '../models/GetContentSessionDetail';
|
|
@@ -51,6 +52,13 @@ export interface GetContentRequest {
|
|
|
51
52
|
moduleId: string;
|
|
52
53
|
courseId: string;
|
|
53
54
|
}
|
|
55
|
+
export interface GetContentAttemptsRequest {
|
|
56
|
+
contentId: string;
|
|
57
|
+
moduleId: string;
|
|
58
|
+
courseId: string;
|
|
59
|
+
userId?: number;
|
|
60
|
+
environment?: GetContentAttemptsEnvironmentEnum;
|
|
61
|
+
}
|
|
54
62
|
export interface GetContentListRequest {
|
|
55
63
|
moduleId: string;
|
|
56
64
|
courseId: string;
|
|
@@ -128,6 +136,12 @@ export interface PostContentSessionRequest {
|
|
|
128
136
|
courseId: string;
|
|
129
137
|
environment?: PostContentSessionEnvironmentEnum;
|
|
130
138
|
}
|
|
139
|
+
export interface PostContentSessionRetakeRequest {
|
|
140
|
+
contentId: string;
|
|
141
|
+
moduleId: string;
|
|
142
|
+
courseId: string;
|
|
143
|
+
environment?: PostContentSessionRetakeEnvironmentEnum;
|
|
144
|
+
}
|
|
131
145
|
export interface PostContentUploadRequest {
|
|
132
146
|
moduleId: string;
|
|
133
147
|
courseId: string;
|
|
@@ -223,6 +237,20 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
223
237
|
* get content
|
|
224
238
|
*/
|
|
225
239
|
getContent(requestParameters: GetContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
|
|
240
|
+
/**
|
|
241
|
+
* Creates request options for getContentAttempts without sending the request
|
|
242
|
+
*/
|
|
243
|
+
getContentAttemptsRequestOpts(requestParameters: GetContentAttemptsRequest): Promise<runtime.RequestOpts>;
|
|
244
|
+
/**
|
|
245
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
246
|
+
* Get content attempts
|
|
247
|
+
*/
|
|
248
|
+
getContentAttemptsRaw(requestParameters: GetContentAttemptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentAttempts>>;
|
|
249
|
+
/**
|
|
250
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
251
|
+
* Get content attempts
|
|
252
|
+
*/
|
|
253
|
+
getContentAttempts(requestParameters: GetContentAttemptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentAttempts>;
|
|
226
254
|
/**
|
|
227
255
|
* Creates request options for getContentList without sending the request
|
|
228
256
|
*/
|
|
@@ -426,6 +454,18 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
426
454
|
* Post a new content session
|
|
427
455
|
*/
|
|
428
456
|
postContentSession(requestParameters: PostContentSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostContentSession>;
|
|
457
|
+
/**
|
|
458
|
+
* Creates request options for postContentSessionRetake without sending the request
|
|
459
|
+
*/
|
|
460
|
+
postContentSessionRetakeRequestOpts(requestParameters: PostContentSessionRetakeRequest): Promise<runtime.RequestOpts>;
|
|
461
|
+
/**
|
|
462
|
+
* Create a new retake content session
|
|
463
|
+
*/
|
|
464
|
+
postContentSessionRetakeRaw(requestParameters: PostContentSessionRetakeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostContentSession>>;
|
|
465
|
+
/**
|
|
466
|
+
* Create a new retake content session
|
|
467
|
+
*/
|
|
468
|
+
postContentSessionRetake(requestParameters: PostContentSessionRetakeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostContentSession>;
|
|
429
469
|
/**
|
|
430
470
|
* Creates request options for postContentUpload without sending the request
|
|
431
471
|
*/
|
|
@@ -531,6 +571,14 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
531
571
|
*/
|
|
532
572
|
verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest>;
|
|
533
573
|
}
|
|
574
|
+
/**
|
|
575
|
+
* @export
|
|
576
|
+
*/
|
|
577
|
+
export declare const GetContentAttemptsEnvironmentEnum: {
|
|
578
|
+
readonly Sandbox: "sandbox";
|
|
579
|
+
readonly Live: "live";
|
|
580
|
+
};
|
|
581
|
+
export type GetContentAttemptsEnvironmentEnum = typeof GetContentAttemptsEnvironmentEnum[keyof typeof GetContentAttemptsEnvironmentEnum];
|
|
534
582
|
/**
|
|
535
583
|
* @export
|
|
536
584
|
*/
|
|
@@ -547,3 +595,11 @@ export declare const PostContentSessionEnvironmentEnum: {
|
|
|
547
595
|
readonly Live: "live";
|
|
548
596
|
};
|
|
549
597
|
export type PostContentSessionEnvironmentEnum = typeof PostContentSessionEnvironmentEnum[keyof typeof PostContentSessionEnvironmentEnum];
|
|
598
|
+
/**
|
|
599
|
+
* @export
|
|
600
|
+
*/
|
|
601
|
+
export declare const PostContentSessionRetakeEnvironmentEnum: {
|
|
602
|
+
readonly Sandbox: "sandbox";
|
|
603
|
+
readonly Live: "live";
|
|
604
|
+
};
|
|
605
|
+
export type PostContentSessionRetakeEnvironmentEnum = typeof PostContentSessionRetakeEnvironmentEnum[keyof typeof PostContentSessionRetakeEnvironmentEnum];
|
|
@@ -22,6 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
24
|
import { GetContentFromJSON, } from '../models/GetContent';
|
|
25
|
+
import { GetContentAttemptsFromJSON, } from '../models/GetContentAttempts';
|
|
25
26
|
import { GetContentListFromJSON, } from '../models/GetContentList';
|
|
26
27
|
import { GetContentSessionFromJSON, } from '../models/GetContentSession';
|
|
27
28
|
import { GetContentSessionDetailFromJSON, } from '../models/GetContentSessionDetail';
|
|
@@ -232,6 +233,61 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
232
233
|
return yield response.value();
|
|
233
234
|
});
|
|
234
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* Creates request options for getContentAttempts without sending the request
|
|
238
|
+
*/
|
|
239
|
+
getContentAttemptsRequestOpts(requestParameters) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
if (requestParameters['contentId'] == null) {
|
|
242
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling getContentAttempts().');
|
|
243
|
+
}
|
|
244
|
+
if (requestParameters['moduleId'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling getContentAttempts().');
|
|
246
|
+
}
|
|
247
|
+
if (requestParameters['courseId'] == null) {
|
|
248
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getContentAttempts().');
|
|
249
|
+
}
|
|
250
|
+
const queryParameters = {};
|
|
251
|
+
if (requestParameters['userId'] != null) {
|
|
252
|
+
queryParameters['user_id'] = requestParameters['userId'];
|
|
253
|
+
}
|
|
254
|
+
if (requestParameters['environment'] != null) {
|
|
255
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
256
|
+
}
|
|
257
|
+
const headerParameters = {};
|
|
258
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/attempts`;
|
|
259
|
+
urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
|
|
260
|
+
urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
|
|
261
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
262
|
+
return {
|
|
263
|
+
path: urlPath,
|
|
264
|
+
method: 'GET',
|
|
265
|
+
headers: headerParameters,
|
|
266
|
+
query: queryParameters,
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
272
|
+
* Get content attempts
|
|
273
|
+
*/
|
|
274
|
+
getContentAttemptsRaw(requestParameters, initOverrides) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
const requestOptions = yield this.getContentAttemptsRequestOpts(requestParameters);
|
|
277
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
278
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentAttemptsFromJSON(jsonValue));
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Lists content attempts and score rollup for the current learner. Instructors may pass user_id to inspect another learner.
|
|
283
|
+
* Get content attempts
|
|
284
|
+
*/
|
|
285
|
+
getContentAttempts(requestParameters, initOverrides) {
|
|
286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
+
const response = yield this.getContentAttemptsRaw(requestParameters, initOverrides);
|
|
288
|
+
return yield response.value();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
235
291
|
/**
|
|
236
292
|
* Creates request options for getContentList without sending the request
|
|
237
293
|
*/
|
|
@@ -959,6 +1015,56 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
959
1015
|
return yield response.value();
|
|
960
1016
|
});
|
|
961
1017
|
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Creates request options for postContentSessionRetake without sending the request
|
|
1020
|
+
*/
|
|
1021
|
+
postContentSessionRetakeRequestOpts(requestParameters) {
|
|
1022
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1023
|
+
if (requestParameters['contentId'] == null) {
|
|
1024
|
+
throw new runtime.RequiredError('contentId', 'Required parameter "contentId" was null or undefined when calling postContentSessionRetake().');
|
|
1025
|
+
}
|
|
1026
|
+
if (requestParameters['moduleId'] == null) {
|
|
1027
|
+
throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postContentSessionRetake().');
|
|
1028
|
+
}
|
|
1029
|
+
if (requestParameters['courseId'] == null) {
|
|
1030
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postContentSessionRetake().');
|
|
1031
|
+
}
|
|
1032
|
+
const queryParameters = {};
|
|
1033
|
+
if (requestParameters['environment'] != null) {
|
|
1034
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
1035
|
+
}
|
|
1036
|
+
const headerParameters = {};
|
|
1037
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/session/retake`;
|
|
1038
|
+
urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
|
|
1039
|
+
urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
|
|
1040
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1041
|
+
return {
|
|
1042
|
+
path: urlPath,
|
|
1043
|
+
method: 'POST',
|
|
1044
|
+
headers: headerParameters,
|
|
1045
|
+
query: queryParameters,
|
|
1046
|
+
};
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Create a new retake content session
|
|
1051
|
+
*/
|
|
1052
|
+
postContentSessionRetakeRaw(requestParameters, initOverrides) {
|
|
1053
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1054
|
+
const requestOptions = yield this.postContentSessionRetakeRequestOpts(requestParameters);
|
|
1055
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1056
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostContentSessionFromJSON(jsonValue));
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Create a new retake content session
|
|
1061
|
+
*/
|
|
1062
|
+
postContentSessionRetake(requestParameters, initOverrides) {
|
|
1063
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1064
|
+
const response = yield this.postContentSessionRetakeRaw(requestParameters, initOverrides);
|
|
1065
|
+
return yield response.value();
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
962
1068
|
/**
|
|
963
1069
|
* Creates request options for postContentUpload without sending the request
|
|
964
1070
|
*/
|
|
@@ -1344,6 +1450,13 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
1344
1450
|
});
|
|
1345
1451
|
}
|
|
1346
1452
|
}
|
|
1453
|
+
/**
|
|
1454
|
+
* @export
|
|
1455
|
+
*/
|
|
1456
|
+
export const GetContentAttemptsEnvironmentEnum = {
|
|
1457
|
+
Sandbox: 'sandbox',
|
|
1458
|
+
Live: 'live'
|
|
1459
|
+
};
|
|
1347
1460
|
/**
|
|
1348
1461
|
* @export
|
|
1349
1462
|
*/
|
|
@@ -1358,3 +1471,10 @@ export const PostContentSessionEnvironmentEnum = {
|
|
|
1358
1471
|
Sandbox: 'sandbox',
|
|
1359
1472
|
Live: 'live'
|
|
1360
1473
|
};
|
|
1474
|
+
/**
|
|
1475
|
+
* @export
|
|
1476
|
+
*/
|
|
1477
|
+
export const PostContentSessionRetakeEnvironmentEnum = {
|
|
1478
|
+
Sandbox: 'sandbox',
|
|
1479
|
+
Live: 'live'
|
|
1480
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
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 { ContentAttemptScore } from './ContentAttemptScore';
|
|
13
|
+
/**
|
|
14
|
+
* A single learner attempt for a content item
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ContentAttemptItem
|
|
17
|
+
*/
|
|
18
|
+
export interface ContentAttemptItem {
|
|
19
|
+
/**
|
|
20
|
+
* Content session UUID for this attempt
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ContentAttemptItem
|
|
23
|
+
*/
|
|
24
|
+
sessionId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Learner attempt number for this content item
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ContentAttemptItem
|
|
29
|
+
*/
|
|
30
|
+
attemptNumber: number;
|
|
31
|
+
/**
|
|
32
|
+
* Completion status for this attempt
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ContentAttemptItem
|
|
35
|
+
*/
|
|
36
|
+
completionStatus: string;
|
|
37
|
+
/**
|
|
38
|
+
* Grade status for this attempt
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ContentAttemptItem
|
|
41
|
+
*/
|
|
42
|
+
gradeStatus: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ContentAttemptScore}
|
|
46
|
+
* @memberof ContentAttemptItem
|
|
47
|
+
*/
|
|
48
|
+
score: ContentAttemptScore | null;
|
|
49
|
+
/**
|
|
50
|
+
* Attempt creation time as a Unix timestamp in seconds
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof ContentAttemptItem
|
|
53
|
+
*/
|
|
54
|
+
createdAt: number;
|
|
55
|
+
/**
|
|
56
|
+
* Attempt update time as a Unix timestamp in seconds
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof ContentAttemptItem
|
|
59
|
+
*/
|
|
60
|
+
updatedAt: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the ContentAttemptItem interface.
|
|
64
|
+
*/
|
|
65
|
+
export declare function instanceOfContentAttemptItem(value: object): value is ContentAttemptItem;
|
|
66
|
+
export declare function ContentAttemptItemFromJSON(json: any): ContentAttemptItem;
|
|
67
|
+
export declare function ContentAttemptItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentAttemptItem;
|
|
68
|
+
export declare function ContentAttemptItemToJSON(json: any): ContentAttemptItem;
|
|
69
|
+
export declare function ContentAttemptItemToJSONTyped(value?: ContentAttemptItem | null, ignoreDiscriminator?: boolean): any;
|