@easyedu/js-lsm-api 1.42.0 → 1.43.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.
@@ -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
@@ -296,6 +297,7 @@ src/models/GetCourseEnrollmentList.ts
296
297
  src/models/GetCourseEnrollmentListItem.ts
297
298
  src/models/GetCourseExport.ts
298
299
  src/models/GetCourseExportList.ts
300
+ src/models/GetCourseImageUpload.ts
299
301
  src/models/GetCourseList.ts
300
302
  src/models/GetCourseReportingBasic.ts
301
303
  src/models/GetCourseStudentReporting.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.42.0
1
+ # @easyedu/js-lsm-api@1.43.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)
@@ -413,7 +416,7 @@ and is automatically generated by the
413
416
  [OpenAPI Generator](https://openapi-generator.tech) project:
414
417
 
415
418
  - API version: `1.0.0`
416
- - Package version: `1.42.0`
419
+ - Package version: `1.43.0`
417
420
  - Generator version: `7.21.0`
418
421
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
419
422
 
@@ -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
+ }
@@ -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}
@@ -29,7 +29,6 @@ export function PutCourseFromJSONTyped(json, ignoreDiscriminator) {
29
29
  'name': json['name'] == null ? undefined : json['name'],
30
30
  'description': json['description'] == null ? undefined : json['description'],
31
31
  'instructor': json['instructor'] == null ? undefined : json['instructor'],
32
- 'imageUrl': json['image_url'] == null ? undefined : json['image_url'],
33
32
  'published': json['published'] == null ? undefined : json['published'],
34
33
  };
35
34
  }
@@ -44,7 +43,6 @@ export function PutCourseToJSONTyped(value, ignoreDiscriminator = false) {
44
43
  'name': value['name'],
45
44
  'description': value['description'],
46
45
  'instructor': value['instructor'],
47
- 'image_url': value['imageUrl'],
48
46
  'published': value['published'],
49
47
  };
50
48
  }
@@ -39,6 +39,7 @@ export * from './GetCourseEnrollmentList';
39
39
  export * from './GetCourseEnrollmentListItem';
40
40
  export * from './GetCourseExport';
41
41
  export * from './GetCourseExportList';
42
+ export * from './GetCourseImageUpload';
42
43
  export * from './GetCourseList';
43
44
  export * from './GetCourseReportingBasic';
44
45
  export * from './GetCourseStudentReporting';
@@ -41,6 +41,7 @@ export * from './GetCourseEnrollmentList';
41
41
  export * from './GetCourseEnrollmentListItem';
42
42
  export * from './GetCourseExport';
43
43
  export * from './GetCourseExportList';
44
+ export * from './GetCourseImageUpload';
44
45
  export * from './GetCourseList';
45
46
  export * from './GetCourseReportingBasic';
46
47
  export * from './GetCourseStudentReporting';
@@ -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,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetCourseImageUpload = instanceOfGetCourseImageUpload;
17
+ exports.GetCourseImageUploadFromJSON = GetCourseImageUploadFromJSON;
18
+ exports.GetCourseImageUploadFromJSONTyped = GetCourseImageUploadFromJSONTyped;
19
+ exports.GetCourseImageUploadToJSON = GetCourseImageUploadToJSON;
20
+ exports.GetCourseImageUploadToJSONTyped = GetCourseImageUploadToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetCourseImageUpload interface.
23
+ */
24
+ function instanceOfGetCourseImageUpload(value) {
25
+ if (!('imageUrl' in value) || value['imageUrl'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function GetCourseImageUploadFromJSON(json) {
30
+ return GetCourseImageUploadFromJSONTyped(json, false);
31
+ }
32
+ function GetCourseImageUploadFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'imageUrl': json['image_url'],
38
+ };
39
+ }
40
+ function GetCourseImageUploadToJSON(json) {
41
+ return GetCourseImageUploadToJSONTyped(json, false);
42
+ }
43
+ function GetCourseImageUploadToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'image_url': value['imageUrl'],
49
+ };
50
+ }
@@ -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}
@@ -36,7 +36,6 @@ function PutCourseFromJSONTyped(json, ignoreDiscriminator) {
36
36
  'name': json['name'] == null ? undefined : json['name'],
37
37
  'description': json['description'] == null ? undefined : json['description'],
38
38
  'instructor': json['instructor'] == null ? undefined : json['instructor'],
39
- 'imageUrl': json['image_url'] == null ? undefined : json['image_url'],
40
39
  'published': json['published'] == null ? undefined : json['published'],
41
40
  };
42
41
  }
@@ -51,7 +50,6 @@ function PutCourseToJSONTyped(value, ignoreDiscriminator = false) {
51
50
  'name': value['name'],
52
51
  'description': value['description'],
53
52
  'instructor': value['instructor'],
54
- 'image_url': value['imageUrl'],
55
53
  'published': value['published'],
56
54
  };
57
55
  }
@@ -39,6 +39,7 @@ export * from './GetCourseEnrollmentList';
39
39
  export * from './GetCourseEnrollmentListItem';
40
40
  export * from './GetCourseExport';
41
41
  export * from './GetCourseExportList';
42
+ export * from './GetCourseImageUpload';
42
43
  export * from './GetCourseList';
43
44
  export * from './GetCourseReportingBasic';
44
45
  export * from './GetCourseStudentReporting';
@@ -57,6 +57,7 @@ __exportStar(require("./GetCourseEnrollmentList"), exports);
57
57
  __exportStar(require("./GetCourseEnrollmentListItem"), exports);
58
58
  __exportStar(require("./GetCourseExport"), exports);
59
59
  __exportStar(require("./GetCourseExportList"), exports);
60
+ __exportStar(require("./GetCourseImageUpload"), exports);
60
61
  __exportStar(require("./GetCourseList"), exports);
61
62
  __exportStar(require("./GetCourseReportingBasic"), exports);
62
63
  __exportStar(require("./GetCourseStudentReporting"), exports);
package/docs/CourseApi.md CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**deleteCourseImage**](CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image |
7
8
  | [**getCourse**](CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course |
8
9
  | [**getCourseEnrollment**](CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment |
9
10
  | [**getCourseEnrollments**](CourseApi.md#getcourseenrollments) | **GET** /courses/{courseId}/enrollments | Get course enrollments |
@@ -14,11 +15,78 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
14
15
  | [**postCourse**](CourseApi.md#postcourse) | **POST** /courses | Post a new course |
15
16
  | [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment |
16
17
  | [**postCourseExport**](CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course |
18
+ | [**postCourseImageUpload**](CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image |
17
19
  | [**putCourse**](CourseApi.md#putcourse) | **PUT** /courses/{courseId} | Update a course by id |
18
20
  | [**putCourseEnrollment**](CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update a course enrollment |
19
21
 
20
22
 
21
23
 
24
+ ## deleteCourseImage
25
+
26
+ > deleteCourseImage(courseId)
27
+
28
+ Remove the course image
29
+
30
+ ### Example
31
+
32
+ ```ts
33
+ import {
34
+ Configuration,
35
+ CourseApi,
36
+ } from '@easyedu/js-lsm-api';
37
+ import type { DeleteCourseImageRequest } from '@easyedu/js-lsm-api';
38
+
39
+ async function example() {
40
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
41
+ const api = new CourseApi();
42
+
43
+ const body = {
44
+ // string
45
+ courseId: courseId_example,
46
+ } satisfies DeleteCourseImageRequest;
47
+
48
+ try {
49
+ const data = await api.deleteCourseImage(body);
50
+ console.log(data);
51
+ } catch (error) {
52
+ console.error(error);
53
+ }
54
+ }
55
+
56
+ // Run the test
57
+ example().catch(console.error);
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+
63
+ | Name | Type | Description | Notes |
64
+ |------------- | ------------- | ------------- | -------------|
65
+ | **courseId** | `string` | | [Defaults to `undefined`] |
66
+
67
+ ### Return type
68
+
69
+ `void` (Empty response body)
70
+
71
+ ### Authorization
72
+
73
+ No authorization required
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: Not defined
79
+
80
+
81
+ ### HTTP response details
82
+ | Status code | Description | Response headers |
83
+ |-------------|-------------|------------------|
84
+ | **204** | Image removed successfully | - |
85
+ | **404** | Course not found | - |
86
+
87
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
88
+
89
+
22
90
  ## getCourse
23
91
 
24
92
  > GetCourse getCourse(courseId)
@@ -705,6 +773,76 @@ No authorization required
705
773
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
706
774
 
707
775
 
776
+ ## postCourseImageUpload
777
+
778
+ > GetCourseImageUpload postCourseImageUpload(courseId, file)
779
+
780
+ Upload a course image
781
+
782
+ ### Example
783
+
784
+ ```ts
785
+ import {
786
+ Configuration,
787
+ CourseApi,
788
+ } from '@easyedu/js-lsm-api';
789
+ import type { PostCourseImageUploadRequest } from '@easyedu/js-lsm-api';
790
+
791
+ async function example() {
792
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
793
+ const api = new CourseApi();
794
+
795
+ const body = {
796
+ // string
797
+ courseId: courseId_example,
798
+ // Blob | Course image file (PNG, JPEG, or SVG). Max 5MB.
799
+ file: BINARY_DATA_HERE,
800
+ } satisfies PostCourseImageUploadRequest;
801
+
802
+ try {
803
+ const data = await api.postCourseImageUpload(body);
804
+ console.log(data);
805
+ } catch (error) {
806
+ console.error(error);
807
+ }
808
+ }
809
+
810
+ // Run the test
811
+ example().catch(console.error);
812
+ ```
813
+
814
+ ### Parameters
815
+
816
+
817
+ | Name | Type | Description | Notes |
818
+ |------------- | ------------- | ------------- | -------------|
819
+ | **courseId** | `string` | | [Defaults to `undefined`] |
820
+ | **file** | `Blob` | Course image file (PNG, JPEG, or SVG). Max 5MB. | [Defaults to `undefined`] |
821
+
822
+ ### Return type
823
+
824
+ [**GetCourseImageUpload**](GetCourseImageUpload.md)
825
+
826
+ ### Authorization
827
+
828
+ No authorization required
829
+
830
+ ### HTTP request headers
831
+
832
+ - **Content-Type**: `multipart/form-data`
833
+ - **Accept**: `application/json`
834
+
835
+
836
+ ### HTTP response details
837
+ | Status code | Description | Response headers |
838
+ |-------------|-------------|------------------|
839
+ | **200** | Image uploaded successfully | - |
840
+ | **400** | Invalid file type or file too large | - |
841
+ | **404** | Course not found | - |
842
+
843
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
844
+
845
+
708
846
  ## putCourse
709
847
 
710
848
  > GetCourse putCourse(courseId, putCourse)
@@ -0,0 +1,34 @@
1
+
2
+ # GetCourseImageUpload
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `imageUrl` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { GetCourseImageUpload } from '@easyedu/js-lsm-api'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "imageUrl": null,
19
+ } satisfies GetCourseImageUpload
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as GetCourseImageUpload
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
package/docs/PutCourse.md CHANGED
@@ -10,7 +10,6 @@ Name | Type
10
10
  `name` | string
11
11
  `description` | string
12
12
  `instructor` | string
13
- `imageUrl` | string
14
13
  `published` | boolean
15
14
 
16
15
  ## Example
@@ -24,7 +23,6 @@ const example = {
24
23
  "name": null,
25
24
  "description": null,
26
25
  "instructor": null,
27
- "imageUrl": null,
28
26
  "published": null,
29
27
  } satisfies PutCourse
30
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -20,6 +20,7 @@ import type {
20
20
  GetCourseEnrollmentList,
21
21
  GetCourseExport,
22
22
  GetCourseExportList,
23
+ GetCourseImageUpload,
23
24
  GetCourseList,
24
25
  GetCourseReportingBasic,
25
26
  PostCourse,
@@ -39,6 +40,8 @@ import {
39
40
  GetCourseExportToJSON,
40
41
  GetCourseExportListFromJSON,
41
42
  GetCourseExportListToJSON,
43
+ GetCourseImageUploadFromJSON,
44
+ GetCourseImageUploadToJSON,
42
45
  GetCourseListFromJSON,
43
46
  GetCourseListToJSON,
44
47
  GetCourseReportingBasicFromJSON,
@@ -55,6 +58,10 @@ import {
55
58
  PutCourseEnrollmentToJSON,
56
59
  } from '../models/index';
57
60
 
61
+ export interface DeleteCourseImageRequest {
62
+ courseId: string;
63
+ }
64
+
58
65
  export interface GetCourseRequest {
59
66
  courseId: string;
60
67
  }
@@ -104,6 +111,11 @@ export interface PostCourseExportRequest {
104
111
  postCourseExport: PostCourseExport;
105
112
  }
106
113
 
114
+ export interface PostCourseImageUploadRequest {
115
+ courseId: string;
116
+ file: Blob;
117
+ }
118
+
107
119
  export interface PutCourseRequest {
108
120
  courseId: string;
109
121
  putCourse: Omit<PutCourse, 'id'>;
@@ -120,6 +132,50 @@ export interface PutCourseEnrollmentRequest {
120
132
  */
121
133
  export class CourseApi extends runtime.BaseAPI {
122
134
 
135
+ /**
136
+ * Creates request options for deleteCourseImage without sending the request
137
+ */
138
+ async deleteCourseImageRequestOpts(requestParameters: DeleteCourseImageRequest): Promise<runtime.RequestOpts> {
139
+ if (requestParameters['courseId'] == null) {
140
+ throw new runtime.RequiredError(
141
+ 'courseId',
142
+ 'Required parameter "courseId" was null or undefined when calling deleteCourseImage().'
143
+ );
144
+ }
145
+
146
+ const queryParameters: any = {};
147
+
148
+ const headerParameters: runtime.HTTPHeaders = {};
149
+
150
+
151
+ let urlPath = `/courses/{courseId}/image`;
152
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
153
+
154
+ return {
155
+ path: urlPath,
156
+ method: 'DELETE',
157
+ headers: headerParameters,
158
+ query: queryParameters,
159
+ };
160
+ }
161
+
162
+ /**
163
+ * Remove the course image
164
+ */
165
+ async deleteCourseImageRaw(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
166
+ const requestOptions = await this.deleteCourseImageRequestOpts(requestParameters);
167
+ const response = await this.request(requestOptions, initOverrides);
168
+
169
+ return new runtime.VoidApiResponse(response);
170
+ }
171
+
172
+ /**
173
+ * Remove the course image
174
+ */
175
+ async deleteCourseImage(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
176
+ await this.deleteCourseImageRaw(requestParameters, initOverrides);
177
+ }
178
+
123
179
  /**
124
180
  * Creates request options for getCourse without sending the request
125
181
  */
@@ -626,6 +682,79 @@ export class CourseApi extends runtime.BaseAPI {
626
682
  return await response.value();
627
683
  }
628
684
 
685
+ /**
686
+ * Creates request options for postCourseImageUpload without sending the request
687
+ */
688
+ async postCourseImageUploadRequestOpts(requestParameters: PostCourseImageUploadRequest): Promise<runtime.RequestOpts> {
689
+ if (requestParameters['courseId'] == null) {
690
+ throw new runtime.RequiredError(
691
+ 'courseId',
692
+ 'Required parameter "courseId" was null or undefined when calling postCourseImageUpload().'
693
+ );
694
+ }
695
+
696
+ if (requestParameters['file'] == null) {
697
+ throw new runtime.RequiredError(
698
+ 'file',
699
+ 'Required parameter "file" was null or undefined when calling postCourseImageUpload().'
700
+ );
701
+ }
702
+
703
+ const queryParameters: any = {};
704
+
705
+ const headerParameters: runtime.HTTPHeaders = {};
706
+
707
+ const consumes: runtime.Consume[] = [
708
+ { contentType: 'multipart/form-data' },
709
+ ];
710
+ // @ts-ignore: canConsumeForm may be unused
711
+ const canConsumeForm = runtime.canConsumeForm(consumes);
712
+
713
+ let formParams: { append(param: string, value: any): any };
714
+ let useForm = false;
715
+ // use FormData to transmit files using content-type "multipart/form-data"
716
+ useForm = canConsumeForm;
717
+ if (useForm) {
718
+ formParams = new FormData();
719
+ } else {
720
+ formParams = new URLSearchParams();
721
+ }
722
+
723
+ if (requestParameters['file'] != null) {
724
+ formParams.append('file', requestParameters['file'] as any);
725
+ }
726
+
727
+
728
+ let urlPath = `/courses/{courseId}/image`;
729
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
730
+
731
+ return {
732
+ path: urlPath,
733
+ method: 'POST',
734
+ headers: headerParameters,
735
+ query: queryParameters,
736
+ body: formParams,
737
+ };
738
+ }
739
+
740
+ /**
741
+ * Upload a course image
742
+ */
743
+ async postCourseImageUploadRaw(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseImageUpload>> {
744
+ const requestOptions = await this.postCourseImageUploadRequestOpts(requestParameters);
745
+ const response = await this.request(requestOptions, initOverrides);
746
+
747
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseImageUploadFromJSON(jsonValue));
748
+ }
749
+
750
+ /**
751
+ * Upload a course image
752
+ */
753
+ async postCourseImageUpload(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseImageUpload> {
754
+ const response = await this.postCourseImageUploadRaw(requestParameters, initOverrides);
755
+ return await response.value();
756
+ }
757
+
629
758
  /**
630
759
  * Creates request options for putCourse without sending the request
631
760
  */
@@ -0,0 +1,66 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GetCourseImageUpload
20
+ */
21
+ export interface GetCourseImageUpload {
22
+ /**
23
+ * Presigned URL for the uploaded course image
24
+ * @type {string}
25
+ * @memberof GetCourseImageUpload
26
+ */
27
+ imageUrl: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetCourseImageUpload interface.
32
+ */
33
+ export function instanceOfGetCourseImageUpload(value: object): value is GetCourseImageUpload {
34
+ if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function GetCourseImageUploadFromJSON(json: any): GetCourseImageUpload {
39
+ return GetCourseImageUploadFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function GetCourseImageUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseImageUpload {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'imageUrl': json['image_url'],
49
+ };
50
+ }
51
+
52
+ export function GetCourseImageUploadToJSON(json: any): GetCourseImageUpload {
53
+ return GetCourseImageUploadToJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetCourseImageUploadToJSONTyped(value?: GetCourseImageUpload | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'image_url': value['imageUrl'],
64
+ };
65
+ }
66
+
@@ -43,12 +43,6 @@ export interface PutCourse {
43
43
  * @memberof PutCourse
44
44
  */
45
45
  instructor?: string;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof PutCourse
50
- */
51
- imageUrl?: string;
52
46
  /**
53
47
  * Whether the course is published and visible to students
54
48
  * @type {boolean}
@@ -78,7 +72,6 @@ export function PutCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean):
78
72
  'name': json['name'] == null ? undefined : json['name'],
79
73
  'description': json['description'] == null ? undefined : json['description'],
80
74
  'instructor': json['instructor'] == null ? undefined : json['instructor'],
81
- 'imageUrl': json['image_url'] == null ? undefined : json['image_url'],
82
75
  'published': json['published'] == null ? undefined : json['published'],
83
76
  };
84
77
  }
@@ -97,7 +90,6 @@ export function PutCourseToJSONTyped(value?: Omit<PutCourse, 'id'> | null, ignor
97
90
  'name': value['name'],
98
91
  'description': value['description'],
99
92
  'instructor': value['instructor'],
100
- 'image_url': value['imageUrl'],
101
93
  'published': value['published'],
102
94
  };
103
95
  }
@@ -41,6 +41,7 @@ export * from './GetCourseEnrollmentList';
41
41
  export * from './GetCourseEnrollmentListItem';
42
42
  export * from './GetCourseExport';
43
43
  export * from './GetCourseExportList';
44
+ export * from './GetCourseImageUpload';
44
45
  export * from './GetCourseList';
45
46
  export * from './GetCourseReportingBasic';
46
47
  export * from './GetCourseStudentReporting';