@easyedu/js-lsm-api 1.67.0 → 1.69.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.
Files changed (86) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +10 -2
  3. package/dist/apis/ContentApi.d.ts +56 -0
  4. package/dist/apis/ContentApi.js +121 -1
  5. package/dist/esm/apis/ContentApi.d.ts +56 -0
  6. package/dist/esm/apis/ContentApi.js +120 -0
  7. package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
  8. package/dist/esm/models/ContentAttemptItem.js +68 -0
  9. package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
  10. package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
  11. package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
  12. package/dist/esm/models/ContentAttemptScore.js +47 -0
  13. package/dist/esm/models/ContentAttemptSettings.d.ts +46 -0
  14. package/dist/esm/models/ContentAttemptSettings.js +54 -0
  15. package/dist/esm/models/GetContent.d.ts +7 -0
  16. package/dist/esm/models/GetContent.js +5 -0
  17. package/dist/esm/models/GetContentAttempts.d.ts +90 -0
  18. package/dist/esm/models/GetContentAttempts.js +84 -0
  19. package/dist/esm/models/GetContentSession.d.ts +12 -0
  20. package/dist/esm/models/GetContentSession.js +8 -0
  21. package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
  22. package/dist/esm/models/GetContentSessionDetail.js +8 -0
  23. package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
  24. package/dist/esm/models/GetContentSessionListItem.js +16 -0
  25. package/dist/esm/models/PostContentSession.d.ts +12 -0
  26. package/dist/esm/models/PostContentSession.js +8 -0
  27. package/dist/esm/models/PutContent.d.ts +7 -0
  28. package/dist/esm/models/PutContent.js +3 -0
  29. package/dist/esm/models/PutContentAttemptSettings.d.ts +46 -0
  30. package/dist/esm/models/PutContentAttemptSettings.js +50 -0
  31. package/dist/esm/models/index.d.ts +6 -0
  32. package/dist/esm/models/index.js +6 -0
  33. package/dist/models/ContentAttemptItem.d.ts +69 -0
  34. package/dist/models/ContentAttemptItem.js +75 -0
  35. package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
  36. package/dist/models/ContentAttemptRollupScore.js +54 -0
  37. package/dist/models/ContentAttemptScore.d.ts +50 -0
  38. package/dist/models/ContentAttemptScore.js +54 -0
  39. package/dist/models/ContentAttemptSettings.d.ts +46 -0
  40. package/dist/models/ContentAttemptSettings.js +62 -0
  41. package/dist/models/GetContent.d.ts +7 -0
  42. package/dist/models/GetContent.js +5 -0
  43. package/dist/models/GetContentAttempts.d.ts +90 -0
  44. package/dist/models/GetContentAttempts.js +92 -0
  45. package/dist/models/GetContentSession.d.ts +12 -0
  46. package/dist/models/GetContentSession.js +8 -0
  47. package/dist/models/GetContentSessionDetail.d.ts +12 -0
  48. package/dist/models/GetContentSessionDetail.js +8 -0
  49. package/dist/models/GetContentSessionListItem.d.ts +24 -0
  50. package/dist/models/GetContentSessionListItem.js +16 -0
  51. package/dist/models/PostContentSession.d.ts +12 -0
  52. package/dist/models/PostContentSession.js +8 -0
  53. package/dist/models/PutContent.d.ts +7 -0
  54. package/dist/models/PutContent.js +3 -0
  55. package/dist/models/PutContentAttemptSettings.d.ts +46 -0
  56. package/dist/models/PutContentAttemptSettings.js +58 -0
  57. package/dist/models/index.d.ts +6 -0
  58. package/dist/models/index.js +6 -0
  59. package/docs/ContentApi.md +159 -0
  60. package/docs/ContentAttemptItem.md +47 -0
  61. package/docs/ContentAttemptRollupScore.md +37 -0
  62. package/docs/ContentAttemptScore.md +41 -0
  63. package/docs/ContentAttemptSettings.md +36 -0
  64. package/docs/GetContent.md +2 -0
  65. package/docs/GetContentAttempts.md +51 -0
  66. package/docs/GetContentSession.md +4 -0
  67. package/docs/GetContentSessionDetail.md +4 -0
  68. package/docs/GetContentSessionListItem.md +8 -0
  69. package/docs/PostContentSession.md +4 -0
  70. package/docs/PutContent.md +2 -0
  71. package/docs/PutContentAttemptSettings.md +36 -0
  72. package/package.json +1 -1
  73. package/src/apis/ContentApi.ts +172 -0
  74. package/src/models/ContentAttemptItem.ts +128 -0
  75. package/src/models/ContentAttemptRollupScore.ts +75 -0
  76. package/src/models/ContentAttemptScore.ts +89 -0
  77. package/src/models/ContentAttemptSettings.ts +86 -0
  78. package/src/models/GetContent.ts +16 -0
  79. package/src/models/GetContentAttempts.ts +164 -0
  80. package/src/models/GetContentSession.ts +18 -0
  81. package/src/models/GetContentSessionDetail.ts +18 -0
  82. package/src/models/GetContentSessionListItem.ts +36 -0
  83. package/src/models/PostContentSession.ts +18 -0
  84. package/src/models/PutContent.ts +15 -0
  85. package/src/models/PutContentAttemptSettings.ts +84 -0
  86. package/src/models/index.ts +6 -0
@@ -8,6 +8,10 @@ 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
14
+ docs/ContentAttemptSettings.md
11
15
  docs/ContentLaunchMode.md
12
16
  docs/CourseApi.md
13
17
  docs/CourseCatalog.md
@@ -27,6 +31,7 @@ docs/GetCertificateConfigList.md
27
31
  docs/GetCertificateList.md
28
32
  docs/GetChatMessage.md
29
33
  docs/GetContent.md
34
+ docs/GetContentAttempts.md
30
35
  docs/GetContentContentData.md
31
36
  docs/GetContentGradeDetail.md
32
37
  docs/GetContentGrades.md
@@ -235,6 +240,7 @@ docs/PostVerifyManifestItemsInner.md
235
240
  docs/PostVerifyManifestResourcesInner.md
236
241
  docs/PutCertificateConfig.md
237
242
  docs/PutContent.md
243
+ docs/PutContentAttemptSettings.md
238
244
  docs/PutContentReorder.md
239
245
  docs/PutContentVersion.md
240
246
  docs/PutCourse.md
@@ -305,6 +311,10 @@ src/index.ts
305
311
  src/models/Certificate.ts
306
312
  src/models/CertificateConfig.ts
307
313
  src/models/CertificatePublic.ts
314
+ src/models/ContentAttemptItem.ts
315
+ src/models/ContentAttemptRollupScore.ts
316
+ src/models/ContentAttemptScore.ts
317
+ src/models/ContentAttemptSettings.ts
308
318
  src/models/ContentLaunchMode.ts
309
319
  src/models/CourseCatalog.ts
310
320
  src/models/CourseShare.ts
@@ -320,6 +330,7 @@ src/models/GetCertificateConfigList.ts
320
330
  src/models/GetCertificateList.ts
321
331
  src/models/GetChatMessage.ts
322
332
  src/models/GetContent.ts
333
+ src/models/GetContentAttempts.ts
323
334
  src/models/GetContentContentData.ts
324
335
  src/models/GetContentGradeDetail.ts
325
336
  src/models/GetContentGrades.ts
@@ -523,6 +534,7 @@ src/models/PostVerifyManifestItemsInner.ts
523
534
  src/models/PostVerifyManifestResourcesInner.ts
524
535
  src/models/PutCertificateConfig.ts
525
536
  src/models/PutContent.ts
537
+ src/models/PutContentAttemptSettings.ts
526
538
  src/models/PutContentReorder.ts
527
539
  src/models/PutContentVersion.ts
528
540
  src/models/PutCourse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.67.0
1
+ # @easyedu/js-lsm-api@1.69.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,10 @@ 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)
256
+ - [ContentAttemptSettings](docs/ContentAttemptSettings.md)
251
257
  - [ContentLaunchMode](docs/ContentLaunchMode.md)
252
258
  - [CourseCatalog](docs/CourseCatalog.md)
253
259
  - [CourseShare](docs/CourseShare.md)
@@ -263,6 +269,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
263
269
  - [GetCertificateList](docs/GetCertificateList.md)
264
270
  - [GetChatMessage](docs/GetChatMessage.md)
265
271
  - [GetContent](docs/GetContent.md)
272
+ - [GetContentAttempts](docs/GetContentAttempts.md)
266
273
  - [GetContentContentData](docs/GetContentContentData.md)
267
274
  - [GetContentGradeDetail](docs/GetContentGradeDetail.md)
268
275
  - [GetContentGrades](docs/GetContentGrades.md)
@@ -466,6 +473,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
466
473
  - [PostVerifyManifestResourcesInner](docs/PostVerifyManifestResourcesInner.md)
467
474
  - [PutCertificateConfig](docs/PutCertificateConfig.md)
468
475
  - [PutContent](docs/PutContent.md)
476
+ - [PutContentAttemptSettings](docs/PutContentAttemptSettings.md)
469
477
  - [PutContentReorder](docs/PutContentReorder.md)
470
478
  - [PutContentVersion](docs/PutContentVersion.md)
471
479
  - [PutCourse](docs/PutCourse.md)
@@ -519,7 +527,7 @@ and is automatically generated by the
519
527
  [OpenAPI Generator](https://openapi-generator.tech) project:
520
528
 
521
529
  - API version: `1.0.0`
522
- - Package version: `1.67.0`
530
+ - Package version: `1.69.0`
523
531
  - Generator version: `7.22.0`
524
532
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
525
533
 
@@ -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,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
+ };