@easyedu/js-lsm-api 1.66.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.
Files changed (115) hide show
  1. package/.openapi-generator/FILES +10 -2
  2. package/README.md +15 -3
  3. package/dist/apis/ContentApi.d.ts +74 -0
  4. package/dist/apis/ContentApi.js +172 -1
  5. package/dist/apis/CourseApi.d.ts +16 -0
  6. package/dist/apis/CourseApi.js +43 -0
  7. package/dist/apis/PortalApi.d.ts +58 -0
  8. package/dist/apis/PortalApi.js +152 -0
  9. package/dist/apis/SupportTicketApi.d.ts +2 -3
  10. package/dist/apis/SupportTicketApi.js +1 -2
  11. package/dist/esm/apis/ContentApi.d.ts +74 -0
  12. package/dist/esm/apis/ContentApi.js +171 -0
  13. package/dist/esm/apis/CourseApi.d.ts +16 -0
  14. package/dist/esm/apis/CourseApi.js +43 -0
  15. package/dist/esm/apis/PortalApi.d.ts +58 -0
  16. package/dist/esm/apis/PortalApi.js +152 -0
  17. package/dist/esm/apis/SupportTicketApi.d.ts +2 -3
  18. package/dist/esm/apis/SupportTicketApi.js +1 -2
  19. package/dist/esm/models/ContentAttemptItem.d.ts +69 -0
  20. package/dist/esm/models/ContentAttemptItem.js +68 -0
  21. package/dist/esm/models/ContentAttemptRollupScore.d.ts +38 -0
  22. package/dist/esm/models/ContentAttemptRollupScore.js +47 -0
  23. package/dist/esm/models/ContentAttemptScore.d.ts +50 -0
  24. package/dist/esm/models/ContentAttemptScore.js +47 -0
  25. package/dist/esm/models/ContentLaunchMode.d.ts +26 -0
  26. package/dist/esm/models/ContentLaunchMode.js +44 -0
  27. package/dist/esm/models/GetContent.d.ts +7 -0
  28. package/dist/esm/models/GetContent.js +5 -0
  29. package/dist/esm/models/GetContentAttempts.d.ts +90 -0
  30. package/dist/esm/models/GetContentAttempts.js +84 -0
  31. package/dist/esm/models/GetContentSession.d.ts +12 -0
  32. package/dist/esm/models/GetContentSession.js +8 -0
  33. package/dist/esm/models/GetContentSessionDetail.d.ts +12 -0
  34. package/dist/esm/models/GetContentSessionDetail.js +8 -0
  35. package/dist/esm/models/GetContentSessionListItem.d.ts +24 -0
  36. package/dist/esm/models/GetContentSessionListItem.js +16 -0
  37. package/dist/esm/models/GetPortal.d.ts +2 -2
  38. package/dist/esm/models/GetPortalFaviconUpload.d.ts +1 -1
  39. package/dist/esm/models/GetPortalLogoUpload.d.ts +1 -1
  40. package/dist/esm/models/GetPublicPortalBranding.d.ts +2 -2
  41. package/dist/esm/models/PostContentSession.d.ts +19 -0
  42. package/dist/esm/models/PostContentSession.js +13 -0
  43. package/dist/esm/models/PutContent.d.ts +7 -0
  44. package/dist/esm/models/PutContent.js +3 -0
  45. package/dist/esm/models/index.d.ts +5 -1
  46. package/dist/esm/models/index.js +5 -1
  47. package/dist/models/ContentAttemptItem.d.ts +69 -0
  48. package/dist/models/ContentAttemptItem.js +75 -0
  49. package/dist/models/ContentAttemptRollupScore.d.ts +38 -0
  50. package/dist/models/ContentAttemptRollupScore.js +54 -0
  51. package/dist/models/ContentAttemptScore.d.ts +50 -0
  52. package/dist/models/ContentAttemptScore.js +54 -0
  53. package/dist/models/ContentLaunchMode.d.ts +26 -0
  54. package/dist/models/ContentLaunchMode.js +52 -0
  55. package/dist/models/GetContent.d.ts +7 -0
  56. package/dist/models/GetContent.js +5 -0
  57. package/dist/models/GetContentAttempts.d.ts +90 -0
  58. package/dist/models/GetContentAttempts.js +92 -0
  59. package/dist/models/GetContentSession.d.ts +12 -0
  60. package/dist/models/GetContentSession.js +8 -0
  61. package/dist/models/GetContentSessionDetail.d.ts +12 -0
  62. package/dist/models/GetContentSessionDetail.js +8 -0
  63. package/dist/models/GetContentSessionListItem.d.ts +24 -0
  64. package/dist/models/GetContentSessionListItem.js +16 -0
  65. package/dist/models/GetPortal.d.ts +2 -2
  66. package/dist/models/GetPortalFaviconUpload.d.ts +1 -1
  67. package/dist/models/GetPortalLogoUpload.d.ts +1 -1
  68. package/dist/models/GetPublicPortalBranding.d.ts +2 -2
  69. package/dist/models/PostContentSession.d.ts +19 -0
  70. package/dist/models/PostContentSession.js +13 -0
  71. package/dist/models/PutContent.d.ts +7 -0
  72. package/dist/models/PutContent.js +3 -0
  73. package/dist/models/index.d.ts +5 -1
  74. package/dist/models/index.js +5 -1
  75. package/docs/ContentApi.md +238 -0
  76. package/docs/ContentAttemptItem.md +47 -0
  77. package/docs/ContentAttemptRollupScore.md +37 -0
  78. package/docs/ContentAttemptScore.md +41 -0
  79. package/docs/{DownloadSupportTicketAttachment200Response.md → ContentLaunchMode.md} +5 -6
  80. package/docs/CourseApi.md +72 -0
  81. package/docs/GetContent.md +2 -0
  82. package/docs/GetContentAttempts.md +51 -0
  83. package/docs/GetContentSession.md +4 -0
  84. package/docs/GetContentSessionDetail.md +4 -0
  85. package/docs/GetContentSessionListItem.md +8 -0
  86. package/docs/PortalApi.md +258 -0
  87. package/docs/PostContentSession.md +6 -0
  88. package/docs/PutContent.md +2 -0
  89. package/docs/SupportTicketApi.md +4 -4
  90. package/package.json +1 -1
  91. package/src/apis/ContentApi.ts +249 -0
  92. package/src/apis/CourseApi.ts +58 -0
  93. package/src/apis/PortalApi.ts +176 -0
  94. package/src/apis/SupportTicketApi.ts +3 -8
  95. package/src/models/ContentAttemptItem.ts +128 -0
  96. package/src/models/ContentAttemptRollupScore.ts +75 -0
  97. package/src/models/ContentAttemptScore.ts +89 -0
  98. package/src/models/ContentLaunchMode.ts +54 -0
  99. package/src/models/GetContent.ts +16 -0
  100. package/src/models/GetContentAttempts.ts +164 -0
  101. package/src/models/GetContentSession.ts +18 -0
  102. package/src/models/GetContentSessionDetail.ts +18 -0
  103. package/src/models/GetContentSessionListItem.ts +36 -0
  104. package/src/models/GetPortal.ts +2 -2
  105. package/src/models/GetPortalFaviconUpload.ts +1 -1
  106. package/src/models/GetPortalLogoUpload.ts +1 -1
  107. package/src/models/GetPublicPortalBranding.ts +2 -2
  108. package/src/models/PostContentSession.ts +37 -0
  109. package/src/models/PutContent.ts +18 -0
  110. package/src/models/index.ts +5 -1
  111. package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  112. package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +0 -43
  113. package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  114. package/dist/models/DownloadSupportTicketAttachment200Response.js +0 -50
  115. package/src/models/DownloadSupportTicketAttachment200Response.ts +0 -66
@@ -153,6 +153,45 @@ class PortalApi extends runtime.BaseAPI {
153
153
  return yield response.value();
154
154
  });
155
155
  }
156
+ /**
157
+ * Creates request options for getPortalFaviconAsset without sending the request
158
+ */
159
+ getPortalFaviconAssetRequestOpts(requestParameters) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ if (requestParameters['portalId'] == null) {
162
+ throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling getPortalFaviconAsset().');
163
+ }
164
+ const queryParameters = {};
165
+ const headerParameters = {};
166
+ let urlPath = `/portals/{portalId}/branding/favicon`;
167
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
168
+ return {
169
+ path: urlPath,
170
+ method: 'GET',
171
+ headers: headerParameters,
172
+ query: queryParameters,
173
+ };
174
+ });
175
+ }
176
+ /**
177
+ * Stream the configured portal favicon
178
+ */
179
+ getPortalFaviconAssetRaw(requestParameters, initOverrides) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ const requestOptions = yield this.getPortalFaviconAssetRequestOpts(requestParameters);
182
+ const response = yield this.request(requestOptions, initOverrides);
183
+ return new runtime.BlobApiResponse(response);
184
+ });
185
+ }
186
+ /**
187
+ * Stream the configured portal favicon
188
+ */
189
+ getPortalFaviconAsset(requestParameters, initOverrides) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ const response = yield this.getPortalFaviconAssetRaw(requestParameters, initOverrides);
192
+ return yield response.value();
193
+ });
194
+ }
156
195
  /**
157
196
  * Creates request options for getPortalList without sending the request
158
197
  */
@@ -188,6 +227,45 @@ class PortalApi extends runtime.BaseAPI {
188
227
  return yield response.value();
189
228
  });
190
229
  }
230
+ /**
231
+ * Creates request options for getPortalLogoAsset without sending the request
232
+ */
233
+ getPortalLogoAssetRequestOpts(requestParameters) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ if (requestParameters['portalId'] == null) {
236
+ throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling getPortalLogoAsset().');
237
+ }
238
+ const queryParameters = {};
239
+ const headerParameters = {};
240
+ let urlPath = `/portals/{portalId}/branding/logo`;
241
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
242
+ return {
243
+ path: urlPath,
244
+ method: 'GET',
245
+ headers: headerParameters,
246
+ query: queryParameters,
247
+ };
248
+ });
249
+ }
250
+ /**
251
+ * Stream the configured portal logo
252
+ */
253
+ getPortalLogoAssetRaw(requestParameters, initOverrides) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const requestOptions = yield this.getPortalLogoAssetRequestOpts(requestParameters);
256
+ const response = yield this.request(requestOptions, initOverrides);
257
+ return new runtime.BlobApiResponse(response);
258
+ });
259
+ }
260
+ /**
261
+ * Stream the configured portal logo
262
+ */
263
+ getPortalLogoAsset(requestParameters, initOverrides) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ const response = yield this.getPortalLogoAssetRaw(requestParameters, initOverrides);
266
+ return yield response.value();
267
+ });
268
+ }
191
269
  /**
192
270
  * Creates request options for getPortalUsers without sending the request
193
271
  */
@@ -279,6 +357,80 @@ class PortalApi extends runtime.BaseAPI {
279
357
  return yield response.value();
280
358
  });
281
359
  }
360
+ /**
361
+ * Creates request options for getPublicPortalFaviconAsset without sending the request
362
+ */
363
+ getPublicPortalFaviconAssetRequestOpts() {
364
+ return __awaiter(this, void 0, void 0, function* () {
365
+ const queryParameters = {};
366
+ const headerParameters = {};
367
+ let urlPath = `/public/portal/branding/favicon`;
368
+ return {
369
+ path: urlPath,
370
+ method: 'GET',
371
+ headers: headerParameters,
372
+ query: queryParameters,
373
+ };
374
+ });
375
+ }
376
+ /**
377
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured favicon.
378
+ * Public portal favicon resolved from the request host
379
+ */
380
+ getPublicPortalFaviconAssetRaw(initOverrides) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ const requestOptions = yield this.getPublicPortalFaviconAssetRequestOpts();
383
+ const response = yield this.request(requestOptions, initOverrides);
384
+ return new runtime.BlobApiResponse(response);
385
+ });
386
+ }
387
+ /**
388
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured favicon.
389
+ * Public portal favicon resolved from the request host
390
+ */
391
+ getPublicPortalFaviconAsset(initOverrides) {
392
+ return __awaiter(this, void 0, void 0, function* () {
393
+ const response = yield this.getPublicPortalFaviconAssetRaw(initOverrides);
394
+ return yield response.value();
395
+ });
396
+ }
397
+ /**
398
+ * Creates request options for getPublicPortalLogoAsset without sending the request
399
+ */
400
+ getPublicPortalLogoAssetRequestOpts() {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ const queryParameters = {};
403
+ const headerParameters = {};
404
+ let urlPath = `/public/portal/branding/logo`;
405
+ return {
406
+ path: urlPath,
407
+ method: 'GET',
408
+ headers: headerParameters,
409
+ query: queryParameters,
410
+ };
411
+ });
412
+ }
413
+ /**
414
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured logo.
415
+ * Public portal logo resolved from the request host
416
+ */
417
+ getPublicPortalLogoAssetRaw(initOverrides) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ const requestOptions = yield this.getPublicPortalLogoAssetRequestOpts();
420
+ const response = yield this.request(requestOptions, initOverrides);
421
+ return new runtime.BlobApiResponse(response);
422
+ });
423
+ }
424
+ /**
425
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured logo.
426
+ * Public portal logo resolved from the request host
427
+ */
428
+ getPublicPortalLogoAsset(initOverrides) {
429
+ return __awaiter(this, void 0, void 0, function* () {
430
+ const response = yield this.getPublicPortalLogoAssetRaw(initOverrides);
431
+ return yield response.value();
432
+ });
433
+ }
282
434
  /**
283
435
  * Creates request options for inviteUserToPortal without sending the request
284
436
  */
@@ -10,7 +10,6 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { type DownloadSupportTicketAttachment200Response } from '../models/DownloadSupportTicketAttachment200Response';
14
13
  import { type GetSupportTicket } from '../models/GetSupportTicket';
15
14
  import { type GetSupportTicketAttachment } from '../models/GetSupportTicketAttachment';
16
15
  import { type GetSupportTicketComment } from '../models/GetSupportTicketComment';
@@ -76,11 +75,11 @@ export declare class SupportTicketApi extends runtime.BaseAPI {
76
75
  /**
77
76
  * Download a ticket attachment
78
77
  */
79
- downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadSupportTicketAttachment200Response>>;
78
+ downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
80
79
  /**
81
80
  * Download a ticket attachment
82
81
  */
83
- downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadSupportTicketAttachment200Response>;
82
+ downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
84
83
  /**
85
84
  * Creates request options for getSupportTicket without sending the request
86
85
  */
@@ -24,7 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.GetSupportTicketsCategoryEnum = exports.GetSupportTicketsPriorityEnum = exports.GetSupportTicketsStatusEnum = exports.SupportTicketApi = void 0;
26
26
  const runtime = require("../runtime");
27
- const DownloadSupportTicketAttachment200Response_1 = require("../models/DownloadSupportTicketAttachment200Response");
28
27
  const GetSupportTicket_1 = require("../models/GetSupportTicket");
29
28
  const GetSupportTicketAttachment_1 = require("../models/GetSupportTicketAttachment");
30
29
  const GetSupportTicketComment_1 = require("../models/GetSupportTicketComment");
@@ -105,7 +104,7 @@ class SupportTicketApi extends runtime.BaseAPI {
105
104
  return __awaiter(this, void 0, void 0, function* () {
106
105
  const requestOptions = yield this.downloadSupportTicketAttachmentRequestOpts(requestParameters);
107
106
  const response = yield this.request(requestOptions, initOverrides);
108
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, DownloadSupportTicketAttachment200Response_1.DownloadSupportTicketAttachment200ResponseFromJSON)(jsonValue));
107
+ return new runtime.BlobApiResponse(response);
109
108
  });
110
109
  }
111
110
  /**
@@ -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;
@@ -144,6 +158,12 @@ export interface PutContentReorderRequest {
144
158
  courseId: string;
145
159
  putContentReorder: PutContentReorder;
146
160
  }
161
+ export interface PutContentUploadFileRequest {
162
+ courseId: string;
163
+ moduleId: string;
164
+ uploadId: number;
165
+ body: Blob;
166
+ }
147
167
  export interface PutContentVersionRequest {
148
168
  contentId: string;
149
169
  moduleId: string;
@@ -217,6 +237,20 @@ export declare class ContentApi extends runtime.BaseAPI {
217
237
  * get content
218
238
  */
219
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>;
220
254
  /**
221
255
  * Creates request options for getContentList without sending the request
222
256
  */
@@ -420,6 +454,18 @@ export declare class ContentApi extends runtime.BaseAPI {
420
454
  * Post a new content session
421
455
  */
422
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>;
423
469
  /**
424
470
  * Creates request options for postContentUpload without sending the request
425
471
  */
@@ -456,6 +502,18 @@ export declare class ContentApi extends runtime.BaseAPI {
456
502
  * Reorder content in a module
457
503
  */
458
504
  putContentReorder(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
505
+ /**
506
+ * Creates request options for putContentUploadFile without sending the request
507
+ */
508
+ putContentUploadFileRequestOpts(requestParameters: PutContentUploadFileRequest): Promise<runtime.RequestOpts>;
509
+ /**
510
+ * Upload content file through the API
511
+ */
512
+ putContentUploadFileRaw(requestParameters: PutContentUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
513
+ /**
514
+ * Upload content file through the API
515
+ */
516
+ putContentUploadFile(requestParameters: PutContentUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
459
517
  /**
460
518
  * Creates request options for putContentVersion without sending the request
461
519
  */
@@ -513,6 +571,14 @@ export declare class ContentApi extends runtime.BaseAPI {
513
571
  */
514
572
  verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest>;
515
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];
516
582
  /**
517
583
  * @export
518
584
  */
@@ -529,3 +595,11 @@ export declare const PostContentSessionEnvironmentEnum: {
529
595
  readonly Live: "live";
530
596
  };
531
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
  */
@@ -1106,6 +1212,57 @@ export class ContentApi extends runtime.BaseAPI {
1106
1212
  yield this.putContentReorderRaw(requestParameters, initOverrides);
1107
1213
  });
1108
1214
  }
1215
+ /**
1216
+ * Creates request options for putContentUploadFile without sending the request
1217
+ */
1218
+ putContentUploadFileRequestOpts(requestParameters) {
1219
+ return __awaiter(this, void 0, void 0, function* () {
1220
+ if (requestParameters['courseId'] == null) {
1221
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putContentUploadFile().');
1222
+ }
1223
+ if (requestParameters['moduleId'] == null) {
1224
+ throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling putContentUploadFile().');
1225
+ }
1226
+ if (requestParameters['uploadId'] == null) {
1227
+ throw new runtime.RequiredError('uploadId', 'Required parameter "uploadId" was null or undefined when calling putContentUploadFile().');
1228
+ }
1229
+ if (requestParameters['body'] == null) {
1230
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling putContentUploadFile().');
1231
+ }
1232
+ const queryParameters = {};
1233
+ const headerParameters = {};
1234
+ headerParameters['Content-Type'] = 'application/octet-stream';
1235
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/uploads/{uploadId}/file`;
1236
+ urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
1237
+ urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
1238
+ urlPath = urlPath.replace('{uploadId}', encodeURIComponent(String(requestParameters['uploadId'])));
1239
+ return {
1240
+ path: urlPath,
1241
+ method: 'PUT',
1242
+ headers: headerParameters,
1243
+ query: queryParameters,
1244
+ body: requestParameters['body'],
1245
+ };
1246
+ });
1247
+ }
1248
+ /**
1249
+ * Upload content file through the API
1250
+ */
1251
+ putContentUploadFileRaw(requestParameters, initOverrides) {
1252
+ return __awaiter(this, void 0, void 0, function* () {
1253
+ const requestOptions = yield this.putContentUploadFileRequestOpts(requestParameters);
1254
+ const response = yield this.request(requestOptions, initOverrides);
1255
+ return new runtime.VoidApiResponse(response);
1256
+ });
1257
+ }
1258
+ /**
1259
+ * Upload content file through the API
1260
+ */
1261
+ putContentUploadFile(requestParameters, initOverrides) {
1262
+ return __awaiter(this, void 0, void 0, function* () {
1263
+ yield this.putContentUploadFileRaw(requestParameters, initOverrides);
1264
+ });
1265
+ }
1109
1266
  /**
1110
1267
  * Creates request options for putContentVersion without sending the request
1111
1268
  */
@@ -1293,6 +1450,13 @@ export class ContentApi extends runtime.BaseAPI {
1293
1450
  });
1294
1451
  }
1295
1452
  }
1453
+ /**
1454
+ * @export
1455
+ */
1456
+ export const GetContentAttemptsEnvironmentEnum = {
1457
+ Sandbox: 'sandbox',
1458
+ Live: 'live'
1459
+ };
1296
1460
  /**
1297
1461
  * @export
1298
1462
  */
@@ -1307,3 +1471,10 @@ export const PostContentSessionEnvironmentEnum = {
1307
1471
  Sandbox: 'sandbox',
1308
1472
  Live: 'live'
1309
1473
  };
1474
+ /**
1475
+ * @export
1476
+ */
1477
+ export const PostContentSessionRetakeEnvironmentEnum = {
1478
+ Sandbox: 'sandbox',
1479
+ Live: 'live'
1480
+ };
@@ -38,6 +38,10 @@ export interface DeleteCourseExportRequest {
38
38
  export interface DeleteCourseImageRequest {
39
39
  courseId: string;
40
40
  }
41
+ export interface DownloadCourseExportRequest {
42
+ courseId: string;
43
+ exportId: string;
44
+ }
41
45
  export interface GetCourseRequest {
42
46
  courseId: string;
43
47
  }
@@ -152,6 +156,18 @@ export declare class CourseApi extends runtime.BaseAPI {
152
156
  * Remove the course image
153
157
  */
154
158
  deleteCourseImage(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
159
+ /**
160
+ * Creates request options for downloadCourseExport without sending the request
161
+ */
162
+ downloadCourseExportRequestOpts(requestParameters: DownloadCourseExportRequest): Promise<runtime.RequestOpts>;
163
+ /**
164
+ * Download a completed course export
165
+ */
166
+ downloadCourseExportRaw(requestParameters: DownloadCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
167
+ /**
168
+ * Download a completed course export
169
+ */
170
+ downloadCourseExport(requestParameters: DownloadCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
155
171
  /**
156
172
  * Creates request options for getCourse without sending the request
157
173
  */
@@ -201,6 +201,49 @@ export class CourseApi extends runtime.BaseAPI {
201
201
  yield this.deleteCourseImageRaw(requestParameters, initOverrides);
202
202
  });
203
203
  }
204
+ /**
205
+ * Creates request options for downloadCourseExport without sending the request
206
+ */
207
+ downloadCourseExportRequestOpts(requestParameters) {
208
+ return __awaiter(this, void 0, void 0, function* () {
209
+ if (requestParameters['courseId'] == null) {
210
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling downloadCourseExport().');
211
+ }
212
+ if (requestParameters['exportId'] == null) {
213
+ throw new runtime.RequiredError('exportId', 'Required parameter "exportId" was null or undefined when calling downloadCourseExport().');
214
+ }
215
+ const queryParameters = {};
216
+ const headerParameters = {};
217
+ let urlPath = `/courses/{courseId}/exports/{exportId}/download`;
218
+ urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
219
+ urlPath = urlPath.replace('{exportId}', encodeURIComponent(String(requestParameters['exportId'])));
220
+ return {
221
+ path: urlPath,
222
+ method: 'GET',
223
+ headers: headerParameters,
224
+ query: queryParameters,
225
+ };
226
+ });
227
+ }
228
+ /**
229
+ * Download a completed course export
230
+ */
231
+ downloadCourseExportRaw(requestParameters, initOverrides) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ const requestOptions = yield this.downloadCourseExportRequestOpts(requestParameters);
234
+ const response = yield this.request(requestOptions, initOverrides);
235
+ return new runtime.BlobApiResponse(response);
236
+ });
237
+ }
238
+ /**
239
+ * Download a completed course export
240
+ */
241
+ downloadCourseExport(requestParameters, initOverrides) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const response = yield this.downloadCourseExportRaw(requestParameters, initOverrides);
244
+ return yield response.value();
245
+ });
246
+ }
204
247
  /**
205
248
  * Creates request options for getCourse without sending the request
206
249
  */