@easyedu/js-lsm-api 1.63.0 → 1.64.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 (44) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +9 -2
  3. package/dist/apis/ContentApi.d.ts +19 -0
  4. package/dist/apis/ContentApi.js +48 -0
  5. package/dist/apis/CourseApi.d.ts +17 -0
  6. package/dist/apis/CourseApi.js +40 -0
  7. package/dist/apis/ModuleApi.d.ts +18 -0
  8. package/dist/apis/ModuleApi.js +44 -0
  9. package/dist/apis/UserApi.d.ts +32 -0
  10. package/dist/apis/UserApi.js +82 -0
  11. package/dist/esm/apis/ContentApi.d.ts +19 -0
  12. package/dist/esm/apis/ContentApi.js +48 -0
  13. package/dist/esm/apis/CourseApi.d.ts +17 -0
  14. package/dist/esm/apis/CourseApi.js +40 -0
  15. package/dist/esm/apis/ModuleApi.d.ts +18 -0
  16. package/dist/esm/apis/ModuleApi.js +44 -0
  17. package/dist/esm/apis/UserApi.d.ts +32 -0
  18. package/dist/esm/apis/UserApi.js +82 -0
  19. package/dist/esm/models/PostSignupRequest.d.ts +68 -0
  20. package/dist/esm/models/PostSignupRequest.js +67 -0
  21. package/dist/esm/models/PostSignupRequestResponse.d.ts +32 -0
  22. package/dist/esm/models/PostSignupRequestResponse.js +43 -0
  23. package/dist/esm/models/index.d.ts +2 -0
  24. package/dist/esm/models/index.js +2 -0
  25. package/dist/models/PostSignupRequest.d.ts +68 -0
  26. package/dist/models/PostSignupRequest.js +74 -0
  27. package/dist/models/PostSignupRequestResponse.d.ts +32 -0
  28. package/dist/models/PostSignupRequestResponse.js +50 -0
  29. package/dist/models/index.d.ts +2 -0
  30. package/dist/models/index.js +2 -0
  31. package/docs/ContentApi.md +76 -0
  32. package/docs/CourseApi.md +70 -0
  33. package/docs/ModuleApi.md +73 -0
  34. package/docs/PostSignupRequest.md +46 -0
  35. package/docs/PostSignupRequestResponse.md +34 -0
  36. package/docs/UserApi.md +134 -0
  37. package/package.json +1 -1
  38. package/src/apis/ContentApi.ts +68 -0
  39. package/src/apis/CourseApi.ts +50 -0
  40. package/src/apis/ModuleApi.ts +59 -0
  41. package/src/apis/UserApi.ts +112 -0
  42. package/src/models/PostSignupRequest.ts +120 -0
  43. package/src/models/PostSignupRequestResponse.ts +66 -0
  44. package/src/models/index.ts +2 -0
@@ -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.instanceOfPostSignupRequestResponse = instanceOfPostSignupRequestResponse;
17
+ exports.PostSignupRequestResponseFromJSON = PostSignupRequestResponseFromJSON;
18
+ exports.PostSignupRequestResponseFromJSONTyped = PostSignupRequestResponseFromJSONTyped;
19
+ exports.PostSignupRequestResponseToJSON = PostSignupRequestResponseToJSON;
20
+ exports.PostSignupRequestResponseToJSONTyped = PostSignupRequestResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PostSignupRequestResponse interface.
23
+ */
24
+ function instanceOfPostSignupRequestResponse(value) {
25
+ if (!('message' in value) || value['message'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function PostSignupRequestResponseFromJSON(json) {
30
+ return PostSignupRequestResponseFromJSONTyped(json, false);
31
+ }
32
+ function PostSignupRequestResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'message': json['message'],
38
+ };
39
+ }
40
+ function PostSignupRequestResponseToJSON(json) {
41
+ return PostSignupRequestResponseToJSONTyped(json, false);
42
+ }
43
+ function PostSignupRequestResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'message': value['message'],
49
+ };
50
+ }
@@ -210,6 +210,8 @@ export * from './PostResetPassword';
210
210
  export * from './PostRevokeCertificate';
211
211
  export * from './PostRole';
212
212
  export * from './PostSendResetPassword';
213
+ export * from './PostSignupRequest';
214
+ export * from './PostSignupRequestResponse';
213
215
  export * from './PostSupportTicket';
214
216
  export * from './PostSupportTicketComment';
215
217
  export * from './PostVerifyManifest';
@@ -228,6 +228,8 @@ __exportStar(require("./PostResetPassword"), exports);
228
228
  __exportStar(require("./PostRevokeCertificate"), exports);
229
229
  __exportStar(require("./PostRole"), exports);
230
230
  __exportStar(require("./PostSendResetPassword"), exports);
231
+ __exportStar(require("./PostSignupRequest"), exports);
232
+ __exportStar(require("./PostSignupRequestResponse"), exports);
231
233
  __exportStar(require("./PostSupportTicket"), exports);
232
234
  __exportStar(require("./PostSupportTicketComment"), exports);
233
235
  __exportStar(require("./PostVerifyManifest"), exports);
@@ -5,6 +5,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
7
  | [**commitScormSession**](ContentApi.md#commitscormsession) | **POST** /scorm/sessions/{scormSessionId}/commit | Commit SCORM session data |
8
+ | [**deleteContent**](ContentApi.md#deletecontent) | **DELETE** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Delete content by id |
8
9
  | [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
9
10
  | [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
10
11
  | [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
@@ -100,6 +101,81 @@ No authorization required
100
101
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
101
102
 
102
103
 
104
+ ## deleteContent
105
+
106
+ > deleteContent(contentId, moduleId, courseId)
107
+
108
+ Delete content by id
109
+
110
+ Soft-deletes the content item.
111
+
112
+ ### Example
113
+
114
+ ```ts
115
+ import {
116
+ Configuration,
117
+ ContentApi,
118
+ } from '@easyedu/js-lsm-api';
119
+ import type { DeleteContentRequest } from '@easyedu/js-lsm-api';
120
+
121
+ async function example() {
122
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
123
+ const api = new ContentApi();
124
+
125
+ const body = {
126
+ // string
127
+ contentId: contentId_example,
128
+ // string
129
+ moduleId: moduleId_example,
130
+ // string
131
+ courseId: courseId_example,
132
+ } satisfies DeleteContentRequest;
133
+
134
+ try {
135
+ const data = await api.deleteContent(body);
136
+ console.log(data);
137
+ } catch (error) {
138
+ console.error(error);
139
+ }
140
+ }
141
+
142
+ // Run the test
143
+ example().catch(console.error);
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+
149
+ | Name | Type | Description | Notes |
150
+ |------------- | ------------- | ------------- | -------------|
151
+ | **contentId** | `string` | | [Defaults to `undefined`] |
152
+ | **moduleId** | `string` | | [Defaults to `undefined`] |
153
+ | **courseId** | `string` | | [Defaults to `undefined`] |
154
+
155
+ ### Return type
156
+
157
+ `void` (Empty response body)
158
+
159
+ ### Authorization
160
+
161
+ No authorization required
162
+
163
+ ### HTTP request headers
164
+
165
+ - **Content-Type**: Not defined
166
+ - **Accept**: Not defined
167
+
168
+
169
+ ### HTTP response details
170
+ | Status code | Description | Response headers |
171
+ |-------------|-------------|------------------|
172
+ | **204** | Content deleted successfully | - |
173
+ | **403** | Forbidden - parent course is not owned by the selected portal | - |
174
+ | **404** | Content not found | - |
175
+
176
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
177
+
178
+
103
179
  ## getContent
104
180
 
105
181
  > GetContent getContent(contentId, moduleId, courseId)
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
+ | [**deleteCourse**](CourseApi.md#deletecourse) | **DELETE** /courses/{courseId} | Delete a course by id |
7
8
  | [**deleteCourseImage**](CourseApi.md#deletecourseimage) | **DELETE** /courses/{courseId}/image | Remove the course image |
8
9
  | [**getCourse**](CourseApi.md#getcourse) | **GET** /courses/{courseId} | get course |
9
10
  | [**getCourseEnrollment**](CourseApi.md#getcourseenrollment) | **GET** /courses/{courseId}/enrollments/{enrollmentId} | Get a specific course enrollment |
@@ -22,6 +23,75 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
22
23
 
23
24
 
24
25
 
26
+ ## deleteCourse
27
+
28
+ > deleteCourse(courseId)
29
+
30
+ Delete a course by id
31
+
32
+ Soft-deletes the course and its modules/content.
33
+
34
+ ### Example
35
+
36
+ ```ts
37
+ import {
38
+ Configuration,
39
+ CourseApi,
40
+ } from '@easyedu/js-lsm-api';
41
+ import type { DeleteCourseRequest } from '@easyedu/js-lsm-api';
42
+
43
+ async function example() {
44
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
45
+ const api = new CourseApi();
46
+
47
+ const body = {
48
+ // string
49
+ courseId: courseId_example,
50
+ } satisfies DeleteCourseRequest;
51
+
52
+ try {
53
+ const data = await api.deleteCourse(body);
54
+ console.log(data);
55
+ } catch (error) {
56
+ console.error(error);
57
+ }
58
+ }
59
+
60
+ // Run the test
61
+ example().catch(console.error);
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+
67
+ | Name | Type | Description | Notes |
68
+ |------------- | ------------- | ------------- | -------------|
69
+ | **courseId** | `string` | | [Defaults to `undefined`] |
70
+
71
+ ### Return type
72
+
73
+ `void` (Empty response body)
74
+
75
+ ### Authorization
76
+
77
+ No authorization required
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: Not defined
83
+
84
+
85
+ ### HTTP response details
86
+ | Status code | Description | Response headers |
87
+ |-------------|-------------|------------------|
88
+ | **204** | Course deleted successfully | - |
89
+ | **403** | Forbidden - course is not owned by the selected portal | - |
90
+ | **404** | Course not found | - |
91
+
92
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
93
+
94
+
25
95
  ## deleteCourseImage
26
96
 
27
97
  > deleteCourseImage(courseId)
package/docs/ModuleApi.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
+ | [**deleteModule**](ModuleApi.md#deletemodule) | **DELETE** /courses/{courseId}/modules/{moduleId} | Delete a module by id |
7
8
  | [**getModule**](ModuleApi.md#getmodule) | **GET** /courses/{courseId}/modules/{moduleId} | get a course module |
8
9
  | [**getModuleList**](ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list |
9
10
  | [**postModule**](ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module |
@@ -13,6 +14,78 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
13
14
 
14
15
 
15
16
 
17
+ ## deleteModule
18
+
19
+ > deleteModule(moduleId, courseId)
20
+
21
+ Delete a module by id
22
+
23
+ Soft-deletes the module and its content.
24
+
25
+ ### Example
26
+
27
+ ```ts
28
+ import {
29
+ Configuration,
30
+ ModuleApi,
31
+ } from '@easyedu/js-lsm-api';
32
+ import type { DeleteModuleRequest } from '@easyedu/js-lsm-api';
33
+
34
+ async function example() {
35
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
36
+ const api = new ModuleApi();
37
+
38
+ const body = {
39
+ // string
40
+ moduleId: moduleId_example,
41
+ // string
42
+ courseId: courseId_example,
43
+ } satisfies DeleteModuleRequest;
44
+
45
+ try {
46
+ const data = await api.deleteModule(body);
47
+ console.log(data);
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
51
+ }
52
+
53
+ // Run the test
54
+ example().catch(console.error);
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+
60
+ | Name | Type | Description | Notes |
61
+ |------------- | ------------- | ------------- | -------------|
62
+ | **moduleId** | `string` | | [Defaults to `undefined`] |
63
+ | **courseId** | `string` | | [Defaults to `undefined`] |
64
+
65
+ ### Return type
66
+
67
+ `void` (Empty response body)
68
+
69
+ ### Authorization
70
+
71
+ No authorization required
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: Not defined
76
+ - **Accept**: Not defined
77
+
78
+
79
+ ### HTTP response details
80
+ | Status code | Description | Response headers |
81
+ |-------------|-------------|------------------|
82
+ | **204** | Module deleted successfully | - |
83
+ | **403** | Forbidden - parent course is not owned by the selected portal | - |
84
+ | **404** | Module not found | - |
85
+
86
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
+
88
+
16
89
  ## getModule
17
90
 
18
91
  > GetModule getModule(moduleId, courseId)
@@ -0,0 +1,46 @@
1
+
2
+ # PostSignupRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `firstName` | string
10
+ `lastName` | string
11
+ `email` | string
12
+ `password` | string
13
+ `organization` | string
14
+ `jobRole` | string
15
+ `learnerCount` | number
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { PostSignupRequest } from '@easyedu/js-lsm-api'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "firstName": null,
25
+ "lastName": null,
26
+ "email": null,
27
+ "password": null,
28
+ "organization": null,
29
+ "jobRole": null,
30
+ "learnerCount": null,
31
+ } satisfies PostSignupRequest
32
+
33
+ console.log(example)
34
+
35
+ // Convert the instance to a JSON string
36
+ const exampleJSON: string = JSON.stringify(example)
37
+ console.log(exampleJSON)
38
+
39
+ // Parse the JSON string back to an object
40
+ const exampleParsed = JSON.parse(exampleJSON) as PostSignupRequest
41
+ console.log(exampleParsed)
42
+ ```
43
+
44
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
45
+
46
+
@@ -0,0 +1,34 @@
1
+
2
+ # PostSignupRequestResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `message` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { PostSignupRequestResponse } from '@easyedu/js-lsm-api'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "message": null,
19
+ } satisfies PostSignupRequestResponse
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 PostSignupRequestResponse
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/UserApi.md CHANGED
@@ -10,10 +10,12 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
10
10
  | [**getUser**](UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id |
11
11
  | [**postLogin**](UserApi.md#postlogin) | **POST** /auth/login | Post a new login |
12
12
  | [**postLogout**](UserApi.md#postlogout) | **POST** /auth/logout | Logout a user |
13
+ | [**postSignupRequest**](UserApi.md#postsignuprequest) | **POST** /auth/signup-request | Request a new organization signup |
13
14
  | [**postUserAvatarUpload**](UserApi.md#postuseravatarupload) | **POST** /users/{userId}/avatar | Upload a profile photo for the current user |
14
15
  | [**putUser**](UserApi.md#putuser) | **PUT** /users/{userId} | Update a user by id |
15
16
  | [**resetPassword**](UserApi.md#resetpassword) | **POST** /auth/reset-password | Reset a users password |
16
17
  | [**sendResetPassword**](UserApi.md#sendresetpassword) | **POST** /auth/send-reset-password | Send a reset password email |
18
+ | [**verifySignupRequest**](UserApi.md#verifysignuprequest) | **GET** /auth/signup/verify | Verify a signup request and provision the portal |
17
19
 
18
20
 
19
21
 
@@ -388,6 +390,72 @@ No authorization required
388
390
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
389
391
 
390
392
 
393
+ ## postSignupRequest
394
+
395
+ > PostSignupRequestResponse postSignupRequest(postSignupRequest)
396
+
397
+ Request a new organization signup
398
+
399
+ ### Example
400
+
401
+ ```ts
402
+ import {
403
+ Configuration,
404
+ UserApi,
405
+ } from '@easyedu/js-lsm-api';
406
+ import type { PostSignupRequestRequest } from '@easyedu/js-lsm-api';
407
+
408
+ async function example() {
409
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
410
+ const api = new UserApi();
411
+
412
+ const body = {
413
+ // PostSignupRequest | Pending signup request
414
+ postSignupRequest: ...,
415
+ } satisfies PostSignupRequestRequest;
416
+
417
+ try {
418
+ const data = await api.postSignupRequest(body);
419
+ console.log(data);
420
+ } catch (error) {
421
+ console.error(error);
422
+ }
423
+ }
424
+
425
+ // Run the test
426
+ example().catch(console.error);
427
+ ```
428
+
429
+ ### Parameters
430
+
431
+
432
+ | Name | Type | Description | Notes |
433
+ |------------- | ------------- | ------------- | -------------|
434
+ | **postSignupRequest** | [PostSignupRequest](PostSignupRequest.md) | Pending signup request | |
435
+
436
+ ### Return type
437
+
438
+ [**PostSignupRequestResponse**](PostSignupRequestResponse.md)
439
+
440
+ ### Authorization
441
+
442
+ No authorization required
443
+
444
+ ### HTTP request headers
445
+
446
+ - **Content-Type**: `application/json`
447
+ - **Accept**: `application/json`
448
+
449
+
450
+ ### HTTP response details
451
+ | Status code | Description | Response headers |
452
+ |-------------|-------------|------------------|
453
+ | **200** | signup request accepted | - |
454
+ | **400** | signup request validation error | - |
455
+
456
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
457
+
458
+
391
459
  ## postUserAvatarUpload
392
460
 
393
461
  > GetUserAvatarUpload postUserAvatarUpload(userId, file)
@@ -657,3 +725,69 @@ No authorization required
657
725
 
658
726
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
659
727
 
728
+
729
+ ## verifySignupRequest
730
+
731
+ > verifySignupRequest(token)
732
+
733
+ Verify a signup request and provision the portal
734
+
735
+ ### Example
736
+
737
+ ```ts
738
+ import {
739
+ Configuration,
740
+ UserApi,
741
+ } from '@easyedu/js-lsm-api';
742
+ import type { VerifySignupRequestRequest } from '@easyedu/js-lsm-api';
743
+
744
+ async function example() {
745
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
746
+ const api = new UserApi();
747
+
748
+ const body = {
749
+ // string
750
+ token: token_example,
751
+ } satisfies VerifySignupRequestRequest;
752
+
753
+ try {
754
+ const data = await api.verifySignupRequest(body);
755
+ console.log(data);
756
+ } catch (error) {
757
+ console.error(error);
758
+ }
759
+ }
760
+
761
+ // Run the test
762
+ example().catch(console.error);
763
+ ```
764
+
765
+ ### Parameters
766
+
767
+
768
+ | Name | Type | Description | Notes |
769
+ |------------- | ------------- | ------------- | -------------|
770
+ | **token** | `string` | | [Defaults to `undefined`] |
771
+
772
+ ### Return type
773
+
774
+ `void` (Empty response body)
775
+
776
+ ### Authorization
777
+
778
+ No authorization required
779
+
780
+ ### HTTP request headers
781
+
782
+ - **Content-Type**: Not defined
783
+ - **Accept**: Not defined
784
+
785
+
786
+ ### HTTP response details
787
+ | Status code | Description | Response headers |
788
+ |-------------|-------------|------------------|
789
+ | **303** | signup verified and redirected to portal signin | - |
790
+ | **400** | invalid or expired signup verification token | - |
791
+
792
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
793
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.63.0",
3
+ "version": "1.64.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -128,6 +128,12 @@ export interface CommitScormSessionRequest {
128
128
  scormSessionId: string;
129
129
  }
130
130
 
131
+ export interface DeleteContentRequest {
132
+ contentId: string;
133
+ moduleId: string;
134
+ courseId: string;
135
+ }
136
+
131
137
  export interface GetContentRequest {
132
138
  contentId: string;
133
139
  moduleId: string;
@@ -317,6 +323,68 @@ export class ContentApi extends runtime.BaseAPI {
317
323
  await this.commitScormSessionRaw(requestParameters, initOverrides);
318
324
  }
319
325
 
326
+ /**
327
+ * Creates request options for deleteContent without sending the request
328
+ */
329
+ async deleteContentRequestOpts(requestParameters: DeleteContentRequest): Promise<runtime.RequestOpts> {
330
+ if (requestParameters['contentId'] == null) {
331
+ throw new runtime.RequiredError(
332
+ 'contentId',
333
+ 'Required parameter "contentId" was null or undefined when calling deleteContent().'
334
+ );
335
+ }
336
+
337
+ if (requestParameters['moduleId'] == null) {
338
+ throw new runtime.RequiredError(
339
+ 'moduleId',
340
+ 'Required parameter "moduleId" was null or undefined when calling deleteContent().'
341
+ );
342
+ }
343
+
344
+ if (requestParameters['courseId'] == null) {
345
+ throw new runtime.RequiredError(
346
+ 'courseId',
347
+ 'Required parameter "courseId" was null or undefined when calling deleteContent().'
348
+ );
349
+ }
350
+
351
+ const queryParameters: any = {};
352
+
353
+ const headerParameters: runtime.HTTPHeaders = {};
354
+
355
+
356
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}`;
357
+ urlPath = urlPath.replace('{contentId}', encodeURIComponent(String(requestParameters['contentId'])));
358
+ urlPath = urlPath.replace('{moduleId}', encodeURIComponent(String(requestParameters['moduleId'])));
359
+ urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
360
+
361
+ return {
362
+ path: urlPath,
363
+ method: 'DELETE',
364
+ headers: headerParameters,
365
+ query: queryParameters,
366
+ };
367
+ }
368
+
369
+ /**
370
+ * Soft-deletes the content item.
371
+ * Delete content by id
372
+ */
373
+ async deleteContentRaw(requestParameters: DeleteContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
374
+ const requestOptions = await this.deleteContentRequestOpts(requestParameters);
375
+ const response = await this.request(requestOptions, initOverrides);
376
+
377
+ return new runtime.VoidApiResponse(response);
378
+ }
379
+
380
+ /**
381
+ * Soft-deletes the content item.
382
+ * Delete content by id
383
+ */
384
+ async deleteContent(requestParameters: DeleteContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
385
+ await this.deleteContentRaw(requestParameters, initOverrides);
386
+ }
387
+
320
388
  /**
321
389
  * Creates request options for getContent without sending the request
322
390
  */