@easyedu/js-lsm-api 1.42.0 → 1.44.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 (38) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +6 -2
  3. package/dist/apis/CourseApi.d.ts +32 -1
  4. package/dist/apis/CourseApi.js +99 -0
  5. package/dist/esm/apis/CourseApi.d.ts +32 -1
  6. package/dist/esm/apis/CourseApi.js +100 -1
  7. package/dist/esm/models/GetCourseImageUpload.d.ts +32 -0
  8. package/dist/esm/models/GetCourseImageUpload.js +43 -0
  9. package/dist/esm/models/GetQuestion.d.ts +8 -1
  10. package/dist/esm/models/GetQuestion.js +2 -0
  11. package/dist/esm/models/GetQuestionQuizzesInner.d.ts +50 -0
  12. package/dist/esm/models/GetQuestionQuizzesInner.js +55 -0
  13. package/dist/esm/models/PutCourse.d.ts +0 -6
  14. package/dist/esm/models/PutCourse.js +0 -2
  15. package/dist/esm/models/index.d.ts +2 -0
  16. package/dist/esm/models/index.js +2 -0
  17. package/dist/models/GetCourseImageUpload.d.ts +32 -0
  18. package/dist/models/GetCourseImageUpload.js +50 -0
  19. package/dist/models/GetQuestion.d.ts +8 -1
  20. package/dist/models/GetQuestion.js +2 -0
  21. package/dist/models/GetQuestionQuizzesInner.d.ts +50 -0
  22. package/dist/models/GetQuestionQuizzesInner.js +62 -0
  23. package/dist/models/PutCourse.d.ts +0 -6
  24. package/dist/models/PutCourse.js +0 -2
  25. package/dist/models/index.d.ts +2 -0
  26. package/dist/models/index.js +2 -0
  27. package/docs/CourseApi.md +138 -0
  28. package/docs/GetCourseImageUpload.md +34 -0
  29. package/docs/GetQuestion.md +2 -0
  30. package/docs/GetQuestionQuizzesInner.md +40 -0
  31. package/docs/PutCourse.md +0 -2
  32. package/package.json +1 -1
  33. package/src/apis/CourseApi.ts +129 -0
  34. package/src/models/GetCourseImageUpload.ts +66 -0
  35. package/src/models/GetQuestion.ts +15 -1
  36. package/src/models/GetQuestionQuizzesInner.ts +93 -0
  37. package/src/models/PutCourse.ts +0 -8
  38. package/src/models/index.ts +2 -0
@@ -46,6 +46,7 @@ docs/GetCourseEnrollmentList.md
46
46
  docs/GetCourseEnrollmentListItem.md
47
47
  docs/GetCourseExport.md
48
48
  docs/GetCourseExportList.md
49
+ docs/GetCourseImageUpload.md
49
50
  docs/GetCourseList.md
50
51
  docs/GetCourseReportingBasic.md
51
52
  docs/GetCourseStudentReporting.md
@@ -79,6 +80,7 @@ docs/GetQuestion.md
79
80
  docs/GetQuestionAnswerChoicesInner.md
80
81
  docs/GetQuestionList.md
81
82
  docs/GetQuestionListFilters.md
83
+ docs/GetQuestionQuizzesInner.md
82
84
  docs/GetQuiz.md
83
85
  docs/GetQuizAttempt.md
84
86
  docs/GetQuizAttemptAnalytics.md
@@ -296,6 +298,7 @@ src/models/GetCourseEnrollmentList.ts
296
298
  src/models/GetCourseEnrollmentListItem.ts
297
299
  src/models/GetCourseExport.ts
298
300
  src/models/GetCourseExportList.ts
301
+ src/models/GetCourseImageUpload.ts
299
302
  src/models/GetCourseList.ts
300
303
  src/models/GetCourseReportingBasic.ts
301
304
  src/models/GetCourseStudentReporting.ts
@@ -329,6 +332,7 @@ src/models/GetQuestion.ts
329
332
  src/models/GetQuestionAnswerChoicesInner.ts
330
333
  src/models/GetQuestionList.ts
331
334
  src/models/GetQuestionListFilters.ts
335
+ src/models/GetQuestionQuizzesInner.ts
332
336
  src/models/GetQuiz.ts
333
337
  src/models/GetQuizAttempt.ts
334
338
  src/models/GetQuizAttemptAnalytics.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.42.0
1
+ # @easyedu/js-lsm-api@1.44.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -77,6 +77,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
77
77
  *ContentApi* | [**setScormValue**](docs/ContentApi.md#setscormvalue) | **POST** /scorm/sessions/{scormSessionId}/set-value | Set a SCORM CMI data element value
78
78
  *ContentApi* | [**terminateScormSession**](docs/ContentApi.md#terminatescormsession) | **POST** /scorm/sessions/{scormSessionId}/terminate | Terminate a SCORM session
79
79
  *ContentApi* | [**verifyScormManifest**](docs/ContentApi.md#verifyscormmanifest) | **POST** /scorm/tools/verify-manifest | Parse and verify a SCORM manifest
80
+ *CourseApi* | [**deleteCourseImage**](docs/CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image
80
81
  *CourseApi* | [**getCourse**](docs/CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course
81
82
  *CourseApi* | [**getCourseEnrollment**](docs/CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment
82
83
  *CourseApi* | [**getCourseEnrollments**](docs/CourseApi.md#getcourseenrollments) | **GET** /courses/{courseId}/enrollments | Get course enrollments
@@ -87,6 +88,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
87
88
  *CourseApi* | [**postCourse**](docs/CourseApi.md#postcourse) | **POST** /courses | Post a new course
88
89
  *CourseApi* | [**postCourseEnrollment**](docs/CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment
89
90
  *CourseApi* | [**postCourseExport**](docs/CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course
91
+ *CourseApi* | [**postCourseImageUpload**](docs/CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image
90
92
  *CourseApi* | [**putCourse**](docs/CourseApi.md#putcourse) | **PUT** /courses/{courseId} | Update a course by id
91
93
  *CourseApi* | [**putCourseEnrollment**](docs/CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update a course enrollment
92
94
  *ModuleApi* | [**getModule**](docs/ModuleApi.md#getmodule) | **GET** /courses/{courseId}/modules/{moduleId} | get a course module
@@ -215,6 +217,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
215
217
  - [GetCourseEnrollmentListItem](docs/GetCourseEnrollmentListItem.md)
216
218
  - [GetCourseExport](docs/GetCourseExport.md)
217
219
  - [GetCourseExportList](docs/GetCourseExportList.md)
220
+ - [GetCourseImageUpload](docs/GetCourseImageUpload.md)
218
221
  - [GetCourseList](docs/GetCourseList.md)
219
222
  - [GetCourseReportingBasic](docs/GetCourseReportingBasic.md)
220
223
  - [GetCourseStudentReporting](docs/GetCourseStudentReporting.md)
@@ -248,6 +251,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
248
251
  - [GetQuestionAnswerChoicesInner](docs/GetQuestionAnswerChoicesInner.md)
249
252
  - [GetQuestionList](docs/GetQuestionList.md)
250
253
  - [GetQuestionListFilters](docs/GetQuestionListFilters.md)
254
+ - [GetQuestionQuizzesInner](docs/GetQuestionQuizzesInner.md)
251
255
  - [GetQuiz](docs/GetQuiz.md)
252
256
  - [GetQuizAttempt](docs/GetQuizAttempt.md)
253
257
  - [GetQuizAttemptAnalytics](docs/GetQuizAttemptAnalytics.md)
@@ -413,7 +417,7 @@ and is automatically generated by the
413
417
  [OpenAPI Generator](https://openapi-generator.tech) project:
414
418
 
415
419
  - API version: `1.0.0`
416
- - Package version: `1.42.0`
420
+ - Package version: `1.44.0`
417
421
  - Generator version: `7.21.0`
418
422
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
419
423
 
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
13
+ import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseImageUpload, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
14
+ export interface DeleteCourseImageRequest {
15
+ courseId: string;
16
+ }
14
17
  export interface GetCourseRequest {
15
18
  courseId: string;
16
19
  }
@@ -50,6 +53,10 @@ export interface PostCourseExportRequest {
50
53
  courseId: string;
51
54
  postCourseExport: PostCourseExport;
52
55
  }
56
+ export interface PostCourseImageUploadRequest {
57
+ courseId: string;
58
+ file: Blob;
59
+ }
53
60
  export interface PutCourseRequest {
54
61
  courseId: string;
55
62
  putCourse: Omit<PutCourse, 'id'>;
@@ -63,6 +70,18 @@ export interface PutCourseEnrollmentRequest {
63
70
  *
64
71
  */
65
72
  export declare class CourseApi extends runtime.BaseAPI {
73
+ /**
74
+ * Creates request options for deleteCourseImage without sending the request
75
+ */
76
+ deleteCourseImageRequestOpts(requestParameters: DeleteCourseImageRequest): Promise<runtime.RequestOpts>;
77
+ /**
78
+ * Remove the course image
79
+ */
80
+ deleteCourseImageRaw(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
81
+ /**
82
+ * Remove the course image
83
+ */
84
+ deleteCourseImage(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
66
85
  /**
67
86
  * Creates request options for getCourse without sending the request
68
87
  */
@@ -185,6 +204,18 @@ export declare class CourseApi extends runtime.BaseAPI {
185
204
  * Create a new SCORM export for a course
186
205
  */
187
206
  postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
207
+ /**
208
+ * Creates request options for postCourseImageUpload without sending the request
209
+ */
210
+ postCourseImageUploadRequestOpts(requestParameters: PostCourseImageUploadRequest): Promise<runtime.RequestOpts>;
211
+ /**
212
+ * Upload a course image
213
+ */
214
+ postCourseImageUploadRaw(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseImageUpload>>;
215
+ /**
216
+ * Upload a course image
217
+ */
218
+ postCourseImageUpload(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseImageUpload>;
188
219
  /**
189
220
  * Creates request options for putCourse without sending the request
190
221
  */
@@ -29,6 +29,44 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class CourseApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for deleteCourseImage without sending the request
34
+ */
35
+ deleteCourseImageRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['courseId'] == null) {
38
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling deleteCourseImage().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ let urlPath = `/courses/{courseId}/image`;
43
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
44
+ return {
45
+ path: urlPath,
46
+ method: 'DELETE',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ };
50
+ });
51
+ }
52
+ /**
53
+ * Remove the course image
54
+ */
55
+ deleteCourseImageRaw(requestParameters, initOverrides) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const requestOptions = yield this.deleteCourseImageRequestOpts(requestParameters);
58
+ const response = yield this.request(requestOptions, initOverrides);
59
+ return new runtime.VoidApiResponse(response);
60
+ });
61
+ }
62
+ /**
63
+ * Remove the course image
64
+ */
65
+ deleteCourseImage(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ yield this.deleteCourseImageRaw(requestParameters, initOverrides);
68
+ });
69
+ }
32
70
  /**
33
71
  * Creates request options for getCourse without sending the request
34
72
  */
@@ -454,6 +492,67 @@ class CourseApi extends runtime.BaseAPI {
454
492
  return yield response.value();
455
493
  });
456
494
  }
495
+ /**
496
+ * Creates request options for postCourseImageUpload without sending the request
497
+ */
498
+ postCourseImageUploadRequestOpts(requestParameters) {
499
+ return __awaiter(this, void 0, void 0, function* () {
500
+ if (requestParameters['courseId'] == null) {
501
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseImageUpload().');
502
+ }
503
+ if (requestParameters['file'] == null) {
504
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postCourseImageUpload().');
505
+ }
506
+ const queryParameters = {};
507
+ const headerParameters = {};
508
+ const consumes = [
509
+ { contentType: 'multipart/form-data' },
510
+ ];
511
+ // @ts-ignore: canConsumeForm may be unused
512
+ const canConsumeForm = runtime.canConsumeForm(consumes);
513
+ let formParams;
514
+ let useForm = false;
515
+ // use FormData to transmit files using content-type "multipart/form-data"
516
+ useForm = canConsumeForm;
517
+ if (useForm) {
518
+ formParams = new FormData();
519
+ }
520
+ else {
521
+ formParams = new URLSearchParams();
522
+ }
523
+ if (requestParameters['file'] != null) {
524
+ formParams.append('file', requestParameters['file']);
525
+ }
526
+ let urlPath = `/courses/{courseId}/image`;
527
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
528
+ return {
529
+ path: urlPath,
530
+ method: 'POST',
531
+ headers: headerParameters,
532
+ query: queryParameters,
533
+ body: formParams,
534
+ };
535
+ });
536
+ }
537
+ /**
538
+ * Upload a course image
539
+ */
540
+ postCourseImageUploadRaw(requestParameters, initOverrides) {
541
+ return __awaiter(this, void 0, void 0, function* () {
542
+ const requestOptions = yield this.postCourseImageUploadRequestOpts(requestParameters);
543
+ const response = yield this.request(requestOptions, initOverrides);
544
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseImageUploadFromJSON)(jsonValue));
545
+ });
546
+ }
547
+ /**
548
+ * Upload a course image
549
+ */
550
+ postCourseImageUpload(requestParameters, initOverrides) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ const response = yield this.postCourseImageUploadRaw(requestParameters, initOverrides);
553
+ return yield response.value();
554
+ });
555
+ }
457
556
  /**
458
557
  * Creates request options for putCourse without sending the request
459
558
  */
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
13
+ import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseExport, GetCourseExportList, GetCourseImageUpload, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PostCourseExport, PutCourse, PutCourseEnrollment } from '../models/index';
14
+ export interface DeleteCourseImageRequest {
15
+ courseId: string;
16
+ }
14
17
  export interface GetCourseRequest {
15
18
  courseId: string;
16
19
  }
@@ -50,6 +53,10 @@ export interface PostCourseExportRequest {
50
53
  courseId: string;
51
54
  postCourseExport: PostCourseExport;
52
55
  }
56
+ export interface PostCourseImageUploadRequest {
57
+ courseId: string;
58
+ file: Blob;
59
+ }
53
60
  export interface PutCourseRequest {
54
61
  courseId: string;
55
62
  putCourse: Omit<PutCourse, 'id'>;
@@ -63,6 +70,18 @@ export interface PutCourseEnrollmentRequest {
63
70
  *
64
71
  */
65
72
  export declare class CourseApi extends runtime.BaseAPI {
73
+ /**
74
+ * Creates request options for deleteCourseImage without sending the request
75
+ */
76
+ deleteCourseImageRequestOpts(requestParameters: DeleteCourseImageRequest): Promise<runtime.RequestOpts>;
77
+ /**
78
+ * Remove the course image
79
+ */
80
+ deleteCourseImageRaw(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
81
+ /**
82
+ * Remove the course image
83
+ */
84
+ deleteCourseImage(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
66
85
  /**
67
86
  * Creates request options for getCourse without sending the request
68
87
  */
@@ -185,6 +204,18 @@ export declare class CourseApi extends runtime.BaseAPI {
185
204
  * Create a new SCORM export for a course
186
205
  */
187
206
  postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
207
+ /**
208
+ * Creates request options for postCourseImageUpload without sending the request
209
+ */
210
+ postCourseImageUploadRequestOpts(requestParameters: PostCourseImageUploadRequest): Promise<runtime.RequestOpts>;
211
+ /**
212
+ * Upload a course image
213
+ */
214
+ postCourseImageUploadRaw(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseImageUpload>>;
215
+ /**
216
+ * Upload a course image
217
+ */
218
+ postCourseImageUpload(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseImageUpload>;
188
219
  /**
189
220
  * Creates request options for putCourse without sending the request
190
221
  */
@@ -21,11 +21,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
24
+ import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseImageUploadFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class CourseApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for deleteCourseImage without sending the request
31
+ */
32
+ deleteCourseImageRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['courseId'] == null) {
35
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling deleteCourseImage().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ let urlPath = `/courses/{courseId}/image`;
40
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
41
+ return {
42
+ path: urlPath,
43
+ method: 'DELETE',
44
+ headers: headerParameters,
45
+ query: queryParameters,
46
+ };
47
+ });
48
+ }
49
+ /**
50
+ * Remove the course image
51
+ */
52
+ deleteCourseImageRaw(requestParameters, initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const requestOptions = yield this.deleteCourseImageRequestOpts(requestParameters);
55
+ const response = yield this.request(requestOptions, initOverrides);
56
+ return new runtime.VoidApiResponse(response);
57
+ });
58
+ }
59
+ /**
60
+ * Remove the course image
61
+ */
62
+ deleteCourseImage(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ yield this.deleteCourseImageRaw(requestParameters, initOverrides);
65
+ });
66
+ }
29
67
  /**
30
68
  * Creates request options for getCourse without sending the request
31
69
  */
@@ -451,6 +489,67 @@ export class CourseApi extends runtime.BaseAPI {
451
489
  return yield response.value();
452
490
  });
453
491
  }
492
+ /**
493
+ * Creates request options for postCourseImageUpload without sending the request
494
+ */
495
+ postCourseImageUploadRequestOpts(requestParameters) {
496
+ return __awaiter(this, void 0, void 0, function* () {
497
+ if (requestParameters['courseId'] == null) {
498
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseImageUpload().');
499
+ }
500
+ if (requestParameters['file'] == null) {
501
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postCourseImageUpload().');
502
+ }
503
+ const queryParameters = {};
504
+ const headerParameters = {};
505
+ const consumes = [
506
+ { contentType: 'multipart/form-data' },
507
+ ];
508
+ // @ts-ignore: canConsumeForm may be unused
509
+ const canConsumeForm = runtime.canConsumeForm(consumes);
510
+ let formParams;
511
+ let useForm = false;
512
+ // use FormData to transmit files using content-type "multipart/form-data"
513
+ useForm = canConsumeForm;
514
+ if (useForm) {
515
+ formParams = new FormData();
516
+ }
517
+ else {
518
+ formParams = new URLSearchParams();
519
+ }
520
+ if (requestParameters['file'] != null) {
521
+ formParams.append('file', requestParameters['file']);
522
+ }
523
+ let urlPath = `/courses/{courseId}/image`;
524
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
525
+ return {
526
+ path: urlPath,
527
+ method: 'POST',
528
+ headers: headerParameters,
529
+ query: queryParameters,
530
+ body: formParams,
531
+ };
532
+ });
533
+ }
534
+ /**
535
+ * Upload a course image
536
+ */
537
+ postCourseImageUploadRaw(requestParameters, initOverrides) {
538
+ return __awaiter(this, void 0, void 0, function* () {
539
+ const requestOptions = yield this.postCourseImageUploadRequestOpts(requestParameters);
540
+ const response = yield this.request(requestOptions, initOverrides);
541
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseImageUploadFromJSON(jsonValue));
542
+ });
543
+ }
544
+ /**
545
+ * Upload a course image
546
+ */
547
+ postCourseImageUpload(requestParameters, initOverrides) {
548
+ return __awaiter(this, void 0, void 0, function* () {
549
+ const response = yield this.postCourseImageUploadRaw(requestParameters, initOverrides);
550
+ return yield response.value();
551
+ });
552
+ }
454
553
  /**
455
554
  * Creates request options for putCourse without sending the request
456
555
  */
@@ -0,0 +1,32 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetCourseImageUpload
16
+ */
17
+ export interface GetCourseImageUpload {
18
+ /**
19
+ * Presigned URL for the uploaded course image
20
+ * @type {string}
21
+ * @memberof GetCourseImageUpload
22
+ */
23
+ imageUrl: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the GetCourseImageUpload interface.
27
+ */
28
+ export declare function instanceOfGetCourseImageUpload(value: object): value is GetCourseImageUpload;
29
+ export declare function GetCourseImageUploadFromJSON(json: any): GetCourseImageUpload;
30
+ export declare function GetCourseImageUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseImageUpload;
31
+ export declare function GetCourseImageUploadToJSON(json: any): GetCourseImageUpload;
32
+ export declare function GetCourseImageUploadToJSONTyped(value?: GetCourseImageUpload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the GetCourseImageUpload interface.
16
+ */
17
+ export function instanceOfGetCourseImageUpload(value) {
18
+ if (!('imageUrl' in value) || value['imageUrl'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function GetCourseImageUploadFromJSON(json) {
23
+ return GetCourseImageUploadFromJSONTyped(json, false);
24
+ }
25
+ export function GetCourseImageUploadFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'imageUrl': json['image_url'],
31
+ };
32
+ }
33
+ export function GetCourseImageUploadToJSON(json) {
34
+ return GetCourseImageUploadToJSONTyped(json, false);
35
+ }
36
+ export function GetCourseImageUploadToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'image_url': value['imageUrl'],
42
+ };
43
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { GetQuestionAnswerChoicesInner } from './GetQuestionAnswerChoicesInner';
13
+ import type { GetQuestionQuizzesInner } from './GetQuestionQuizzesInner';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -106,6 +107,12 @@ export interface GetQuestion {
106
107
  * @memberof GetQuestion
107
108
  */
108
109
  readonly quizCount?: number;
110
+ /**
111
+ * Quizzes that use this question
112
+ * @type {Array<GetQuestionQuizzesInner>}
113
+ * @memberof GetQuestion
114
+ */
115
+ readonly quizzes?: Array<GetQuestionQuizzesInner>;
109
116
  }
110
117
  /**
111
118
  * @export
@@ -135,4 +142,4 @@ export declare function instanceOfGetQuestion(value: object): value is GetQuesti
135
142
  export declare function GetQuestionFromJSON(json: any): GetQuestion;
136
143
  export declare function GetQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuestion;
137
144
  export declare function GetQuestionToJSON(json: any): GetQuestion;
138
- export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count'> | null, ignoreDiscriminator?: boolean): any;
145
+ export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count' | 'quizzes'> | null, ignoreDiscriminator?: boolean): any;
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { GetQuestionAnswerChoicesInnerFromJSON, GetQuestionAnswerChoicesInnerToJSON, } from './GetQuestionAnswerChoicesInner';
15
+ import { GetQuestionQuizzesInnerFromJSON, } from './GetQuestionQuizzesInner';
15
16
  /**
16
17
  * @export
17
18
  */
@@ -74,6 +75,7 @@ export function GetQuestionFromJSONTyped(json, ignoreDiscriminator) {
74
75
  'updatedDate': (new Date(json['updated_date'])),
75
76
  'createdBy': json['created_by'] == null ? undefined : json['created_by'],
76
77
  'quizCount': json['quiz_count'] == null ? undefined : json['quiz_count'],
78
+ 'quizzes': json['quizzes'] == null ? undefined : (json['quizzes'].map(GetQuestionQuizzesInnerFromJSON)),
77
79
  };
78
80
  }
79
81
  export function GetQuestionToJSON(json) {
@@ -0,0 +1,50 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetQuestionQuizzesInner
16
+ */
17
+ export interface GetQuestionQuizzesInner {
18
+ /**
19
+ * Quiz external identifier
20
+ * @type {string}
21
+ * @memberof GetQuestionQuizzesInner
22
+ */
23
+ quizId: string;
24
+ /**
25
+ * Quiz name
26
+ * @type {string}
27
+ * @memberof GetQuestionQuizzesInner
28
+ */
29
+ quizName: string;
30
+ /**
31
+ * Module external identifier
32
+ * @type {string}
33
+ * @memberof GetQuestionQuizzesInner
34
+ */
35
+ moduleId: string;
36
+ /**
37
+ * Course external identifier
38
+ * @type {string}
39
+ * @memberof GetQuestionQuizzesInner
40
+ */
41
+ courseId: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the GetQuestionQuizzesInner interface.
45
+ */
46
+ export declare function instanceOfGetQuestionQuizzesInner(value: object): value is GetQuestionQuizzesInner;
47
+ export declare function GetQuestionQuizzesInnerFromJSON(json: any): GetQuestionQuizzesInner;
48
+ export declare function GetQuestionQuizzesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuestionQuizzesInner;
49
+ export declare function GetQuestionQuizzesInnerToJSON(json: any): GetQuestionQuizzesInner;
50
+ export declare function GetQuestionQuizzesInnerToJSONTyped(value?: GetQuestionQuizzesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the GetQuestionQuizzesInner interface.
16
+ */
17
+ export function instanceOfGetQuestionQuizzesInner(value) {
18
+ if (!('quizId' in value) || value['quizId'] === undefined)
19
+ return false;
20
+ if (!('quizName' in value) || value['quizName'] === undefined)
21
+ return false;
22
+ if (!('moduleId' in value) || value['moduleId'] === undefined)
23
+ return false;
24
+ if (!('courseId' in value) || value['courseId'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function GetQuestionQuizzesInnerFromJSON(json) {
29
+ return GetQuestionQuizzesInnerFromJSONTyped(json, false);
30
+ }
31
+ export function GetQuestionQuizzesInnerFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'quizId': json['quiz_id'],
37
+ 'quizName': json['quiz_name'],
38
+ 'moduleId': json['module_id'],
39
+ 'courseId': json['course_id'],
40
+ };
41
+ }
42
+ export function GetQuestionQuizzesInnerToJSON(json) {
43
+ return GetQuestionQuizzesInnerToJSONTyped(json, false);
44
+ }
45
+ export function GetQuestionQuizzesInnerToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'quiz_id': value['quizId'],
51
+ 'quiz_name': value['quizName'],
52
+ 'module_id': value['moduleId'],
53
+ 'course_id': value['courseId'],
54
+ };
55
+ }
@@ -39,12 +39,6 @@ export interface PutCourse {
39
39
  * @memberof PutCourse
40
40
  */
41
41
  instructor?: string;
42
- /**
43
- *
44
- * @type {string}
45
- * @memberof PutCourse
46
- */
47
- imageUrl?: string;
48
42
  /**
49
43
  * Whether the course is published and visible to students
50
44
  * @type {boolean}