@easyedu/js-lsm-api 1.46.0 → 1.47.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 (61) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +6 -2
  3. package/dist/apis/ContentApi.d.ts +18 -1
  4. package/dist/apis/ContentApi.js +47 -0
  5. package/dist/apis/ModuleApi.d.ts +17 -1
  6. package/dist/apis/ModuleApi.js +43 -0
  7. package/dist/esm/apis/ContentApi.d.ts +18 -1
  8. package/dist/esm/apis/ContentApi.js +48 -1
  9. package/dist/esm/apis/ModuleApi.d.ts +17 -1
  10. package/dist/esm/apis/ModuleApi.js +44 -1
  11. package/dist/esm/models/PostContentQuiz.d.ts +6 -0
  12. package/dist/esm/models/PostContentQuiz.js +2 -0
  13. package/dist/esm/models/PostContentUpload.d.ts +6 -0
  14. package/dist/esm/models/PostContentUpload.js +2 -0
  15. package/dist/esm/models/PostModule.d.ts +1 -1
  16. package/dist/esm/models/PostModule.js +1 -3
  17. package/dist/esm/models/PutContentReorder.d.ts +32 -0
  18. package/dist/esm/models/PutContentReorder.js +43 -0
  19. package/dist/esm/models/PutCourse.d.ts +0 -6
  20. package/dist/esm/models/PutCourse.js +0 -2
  21. package/dist/esm/models/PutModule.d.ts +0 -6
  22. package/dist/esm/models/PutModule.js +0 -2
  23. package/dist/esm/models/PutModuleReorder.d.ts +32 -0
  24. package/dist/esm/models/PutModuleReorder.js +43 -0
  25. package/dist/esm/models/index.d.ts +2 -0
  26. package/dist/esm/models/index.js +2 -0
  27. package/dist/models/PostContentQuiz.d.ts +6 -0
  28. package/dist/models/PostContentQuiz.js +2 -0
  29. package/dist/models/PostContentUpload.d.ts +6 -0
  30. package/dist/models/PostContentUpload.js +2 -0
  31. package/dist/models/PostModule.d.ts +1 -1
  32. package/dist/models/PostModule.js +1 -3
  33. package/dist/models/PutContentReorder.d.ts +32 -0
  34. package/dist/models/PutContentReorder.js +50 -0
  35. package/dist/models/PutCourse.d.ts +0 -6
  36. package/dist/models/PutCourse.js +0 -2
  37. package/dist/models/PutModule.d.ts +0 -6
  38. package/dist/models/PutModule.js +0 -2
  39. package/dist/models/PutModuleReorder.d.ts +32 -0
  40. package/dist/models/PutModuleReorder.js +50 -0
  41. package/dist/models/index.d.ts +2 -0
  42. package/dist/models/index.js +2 -0
  43. package/docs/ContentApi.md +72 -0
  44. package/docs/ModuleApi.md +69 -0
  45. package/docs/PostContentQuiz.md +2 -0
  46. package/docs/PostContentUpload.md +2 -0
  47. package/docs/PutContentReorder.md +34 -0
  48. package/docs/PutCourse.md +0 -2
  49. package/docs/PutModule.md +0 -2
  50. package/docs/PutModuleReorder.md +34 -0
  51. package/package.json +1 -1
  52. package/src/apis/ContentApi.ts +71 -0
  53. package/src/apis/ModuleApi.ts +62 -0
  54. package/src/models/PostContentQuiz.ts +8 -0
  55. package/src/models/PostContentUpload.ts +8 -0
  56. package/src/models/PostModule.ts +2 -3
  57. package/src/models/PutContentReorder.ts +66 -0
  58. package/src/models/PutCourse.ts +0 -8
  59. package/src/models/PutModule.ts +0 -8
  60. package/src/models/PutModuleReorder.ts +66 -0
  61. package/src/models/index.ts +2 -0
@@ -203,10 +203,12 @@ docs/PostVerifyManifest.md
203
203
  docs/PostVerifyManifestItemsInner.md
204
204
  docs/PostVerifyManifestResourcesInner.md
205
205
  docs/PutContent.md
206
+ docs/PutContentReorder.md
206
207
  docs/PutContentVersion.md
207
208
  docs/PutCourse.md
208
209
  docs/PutCourseEnrollment.md
209
210
  docs/PutModule.md
211
+ docs/PutModuleReorder.md
210
212
  docs/PutPortalBranding.md
211
213
  docs/PutQuestion.md
212
214
  docs/PutQuestionAnswerChoicesInner.md
@@ -452,10 +454,12 @@ src/models/PostVerifyManifest.ts
452
454
  src/models/PostVerifyManifestItemsInner.ts
453
455
  src/models/PostVerifyManifestResourcesInner.ts
454
456
  src/models/PutContent.ts
457
+ src/models/PutContentReorder.ts
455
458
  src/models/PutContentVersion.ts
456
459
  src/models/PutCourse.ts
457
460
  src/models/PutCourseEnrollment.ts
458
461
  src/models/PutModule.ts
462
+ src/models/PutModuleReorder.ts
459
463
  src/models/PutPortalBranding.ts
460
464
  src/models/PutQuestion.ts
461
465
  src/models/PutQuestionAnswerChoicesInner.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.46.0
1
+ # @easyedu/js-lsm-api@1.47.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -73,6 +73,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
73
73
  *ContentApi* | [**postContentSession**](docs/ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session
74
74
  *ContentApi* | [**postContentUpload**](docs/ContentApi.md#postcontentupload) | **POST** /courses/{courseId}/modules/{moduleId}/contents/upload | Post a new content upload
75
75
  *ContentApi* | [**putContent**](docs/ContentApi.md#putcontent) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Update content by id
76
+ *ContentApi* | [**putContentReorder**](docs/ContentApi.md#putcontentreorder) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/reorder | Reorder content in a module
76
77
  *ContentApi* | [**putContentVersion**](docs/ContentApi.md#putcontentversion) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Update a content version
77
78
  *ContentApi* | [**setScormValue**](docs/ContentApi.md#setscormvalue) | **POST** /scorm/sessions/{scormSessionId}/set-value | Set a SCORM CMI data element value
78
79
  *ContentApi* | [**terminateScormSession**](docs/ContentApi.md#terminatescormsession) | **POST** /scorm/sessions/{scormSessionId}/terminate | Terminate a SCORM session
@@ -95,6 +96,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
95
96
  *ModuleApi* | [**getModuleList**](docs/ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list
96
97
  *ModuleApi* | [**postModule**](docs/ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module
97
98
  *ModuleApi* | [**putModule**](docs/ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id
99
+ *ModuleApi* | [**putModuleReorder**](docs/ModuleApi.md#putmodulereorder) | **PUT** /courses/{courseId}/modules/reorder | Reorder modules in a course
98
100
  *OtherApi* | [**getHealth**](docs/OtherApi.md#gethealth) | **GET** /healthcheck | Health check endpoint
99
101
  *PortalApi* | [**deletePortalLogo**](docs/PortalApi.md#deleteportallogo) | **DELETE** /portals/{portalId}/branding/logo | Remove the portal logo
100
102
  *PortalApi* | [**getPortalById**](docs/PortalApi.md#getportalbyid) | **GET** /portals/{portalId} | Get a portal by id (can use \'current\' to get the current users selected portal)
@@ -371,10 +373,12 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
371
373
  - [PostVerifyManifestItemsInner](docs/PostVerifyManifestItemsInner.md)
372
374
  - [PostVerifyManifestResourcesInner](docs/PostVerifyManifestResourcesInner.md)
373
375
  - [PutContent](docs/PutContent.md)
376
+ - [PutContentReorder](docs/PutContentReorder.md)
374
377
  - [PutContentVersion](docs/PutContentVersion.md)
375
378
  - [PutCourse](docs/PutCourse.md)
376
379
  - [PutCourseEnrollment](docs/PutCourseEnrollment.md)
377
380
  - [PutModule](docs/PutModule.md)
381
+ - [PutModuleReorder](docs/PutModuleReorder.md)
378
382
  - [PutPortalBranding](docs/PutPortalBranding.md)
379
383
  - [PutQuestion](docs/PutQuestion.md)
380
384
  - [PutQuestionAnswerChoicesInner](docs/PutQuestionAnswerChoicesInner.md)
@@ -417,7 +421,7 @@ and is automatically generated by the
417
421
  [OpenAPI Generator](https://openapi-generator.tech) project:
418
422
 
419
423
  - API version: `1.0.0`
420
- - Package version: `1.46.0`
424
+ - Package version: `1.47.0`
421
425
  - Generator version: `7.21.0`
422
426
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
423
427
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
13
+ import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
14
14
  export interface CommitScormSessionRequest {
15
15
  scormSessionId: string;
16
16
  }
@@ -101,6 +101,11 @@ export interface PutContentRequest {
101
101
  courseId: string;
102
102
  putContent: PutContent;
103
103
  }
104
+ export interface PutContentReorderRequest {
105
+ moduleId: string;
106
+ courseId: string;
107
+ putContentReorder: PutContentReorder;
108
+ }
104
109
  export interface PutContentVersionRequest {
105
110
  contentId: string;
106
111
  moduleId: string;
@@ -361,6 +366,18 @@ export declare class ContentApi extends runtime.BaseAPI {
361
366
  * Update content by id
362
367
  */
363
368
  putContent(requestParameters: PutContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
369
+ /**
370
+ * Creates request options for putContentReorder without sending the request
371
+ */
372
+ putContentReorderRequestOpts(requestParameters: PutContentReorderRequest): Promise<runtime.RequestOpts>;
373
+ /**
374
+ * Reorder content in a module
375
+ */
376
+ putContentReorderRaw(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
377
+ /**
378
+ * Reorder content in a module
379
+ */
380
+ putContentReorder(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
364
381
  /**
365
382
  * Creates request options for putContentVersion without sending the request
366
383
  */
@@ -892,6 +892,53 @@ class ContentApi extends runtime.BaseAPI {
892
892
  return yield response.value();
893
893
  });
894
894
  }
895
+ /**
896
+ * Creates request options for putContentReorder without sending the request
897
+ */
898
+ putContentReorderRequestOpts(requestParameters) {
899
+ return __awaiter(this, void 0, void 0, function* () {
900
+ if (requestParameters['moduleId'] == null) {
901
+ throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling putContentReorder().');
902
+ }
903
+ if (requestParameters['courseId'] == null) {
904
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putContentReorder().');
905
+ }
906
+ if (requestParameters['putContentReorder'] == null) {
907
+ throw new runtime.RequiredError('putContentReorder', 'Required parameter "putContentReorder" was null or undefined when calling putContentReorder().');
908
+ }
909
+ const queryParameters = {};
910
+ const headerParameters = {};
911
+ headerParameters['Content-Type'] = 'application/json';
912
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/reorder`;
913
+ urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
914
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
915
+ return {
916
+ path: urlPath,
917
+ method: 'PUT',
918
+ headers: headerParameters,
919
+ query: queryParameters,
920
+ body: (0, index_1.PutContentReorderToJSON)(requestParameters['putContentReorder']),
921
+ };
922
+ });
923
+ }
924
+ /**
925
+ * Reorder content in a module
926
+ */
927
+ putContentReorderRaw(requestParameters, initOverrides) {
928
+ return __awaiter(this, void 0, void 0, function* () {
929
+ const requestOptions = yield this.putContentReorderRequestOpts(requestParameters);
930
+ const response = yield this.request(requestOptions, initOverrides);
931
+ return new runtime.VoidApiResponse(response);
932
+ });
933
+ }
934
+ /**
935
+ * Reorder content in a module
936
+ */
937
+ putContentReorder(requestParameters, initOverrides) {
938
+ return __awaiter(this, void 0, void 0, function* () {
939
+ yield this.putContentReorderRaw(requestParameters, initOverrides);
940
+ });
941
+ }
895
942
  /**
896
943
  * Creates request options for putContentVersion without sending the request
897
944
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetModule, GetModuleList, PostModule, PutModule } from '../models/index';
13
+ import type { GetModule, GetModuleList, PostModule, PutModule, PutModuleReorder } from '../models/index';
14
14
  export interface GetModuleRequest {
15
15
  moduleId: string;
16
16
  courseId: string;
@@ -27,6 +27,10 @@ export interface PutModuleRequest {
27
27
  courseId: string;
28
28
  putModule: PutModule;
29
29
  }
30
+ export interface PutModuleReorderRequest {
31
+ courseId: string;
32
+ putModuleReorder: PutModuleReorder;
33
+ }
30
34
  /**
31
35
  *
32
36
  */
@@ -79,4 +83,16 @@ export declare class ModuleApi extends runtime.BaseAPI {
79
83
  * Update a module by id
80
84
  */
81
85
  putModule(requestParameters: PutModuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
86
+ /**
87
+ * Creates request options for putModuleReorder without sending the request
88
+ */
89
+ putModuleReorderRequestOpts(requestParameters: PutModuleReorderRequest): Promise<runtime.RequestOpts>;
90
+ /**
91
+ * Reorder modules in a course
92
+ */
93
+ putModuleReorderRaw(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
94
+ /**
95
+ * Reorder modules in a course
96
+ */
97
+ putModuleReorder(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
82
98
  }
@@ -203,5 +203,48 @@ class ModuleApi extends runtime.BaseAPI {
203
203
  return yield response.value();
204
204
  });
205
205
  }
206
+ /**
207
+ * Creates request options for putModuleReorder without sending the request
208
+ */
209
+ putModuleReorderRequestOpts(requestParameters) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ if (requestParameters['courseId'] == null) {
212
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putModuleReorder().');
213
+ }
214
+ if (requestParameters['putModuleReorder'] == null) {
215
+ throw new runtime.RequiredError('putModuleReorder', 'Required parameter "putModuleReorder" was null or undefined when calling putModuleReorder().');
216
+ }
217
+ const queryParameters = {};
218
+ const headerParameters = {};
219
+ headerParameters['Content-Type'] = 'application/json';
220
+ let urlPath = `/courses/{courseId}/modules/reorder`;
221
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
222
+ return {
223
+ path: urlPath,
224
+ method: 'PUT',
225
+ headers: headerParameters,
226
+ query: queryParameters,
227
+ body: (0, index_1.PutModuleReorderToJSON)(requestParameters['putModuleReorder']),
228
+ };
229
+ });
230
+ }
231
+ /**
232
+ * Reorder modules in a course
233
+ */
234
+ putModuleReorderRaw(requestParameters, initOverrides) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ const requestOptions = yield this.putModuleReorderRequestOpts(requestParameters);
237
+ const response = yield this.request(requestOptions, initOverrides);
238
+ return new runtime.VoidApiResponse(response);
239
+ });
240
+ }
241
+ /**
242
+ * Reorder modules in a course
243
+ */
244
+ putModuleReorder(requestParameters, initOverrides) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ yield this.putModuleReorderRaw(requestParameters, initOverrides);
247
+ });
248
+ }
206
249
  }
207
250
  exports.ModuleApi = ModuleApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
13
+ import type { GetContent, GetContentList, GetContentSession, GetContentSessionDetail, GetContentSessionList, GetContentUpload, GetContentVersion, GetContentVersionList, GetScormApiLogs, GetScormPackage, GetScormSessionData, PostContentQuiz, PostContentSession, PostContentUpload, PostVerifyManifest, PutContent, PutContentReorder, PutContentVersion, ScormGetValueResponse, ScormSetValueRequest, ScormSetValueResponse } from '../models/index';
14
14
  export interface CommitScormSessionRequest {
15
15
  scormSessionId: string;
16
16
  }
@@ -101,6 +101,11 @@ export interface PutContentRequest {
101
101
  courseId: string;
102
102
  putContent: PutContent;
103
103
  }
104
+ export interface PutContentReorderRequest {
105
+ moduleId: string;
106
+ courseId: string;
107
+ putContentReorder: PutContentReorder;
108
+ }
104
109
  export interface PutContentVersionRequest {
105
110
  contentId: string;
106
111
  moduleId: string;
@@ -361,6 +366,18 @@ export declare class ContentApi extends runtime.BaseAPI {
361
366
  * Update content by id
362
367
  */
363
368
  putContent(requestParameters: PutContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent>;
369
+ /**
370
+ * Creates request options for putContentReorder without sending the request
371
+ */
372
+ putContentReorderRequestOpts(requestParameters: PutContentReorderRequest): Promise<runtime.RequestOpts>;
373
+ /**
374
+ * Reorder content in a module
375
+ */
376
+ putContentReorderRaw(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
377
+ /**
378
+ * Reorder content in a module
379
+ */
380
+ putContentReorder(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
364
381
  /**
365
382
  * Creates request options for putContentVersion without sending the request
366
383
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { GetContentFromJSON, GetContentListFromJSON, GetContentSessionFromJSON, GetContentSessionDetailFromJSON, GetContentSessionListFromJSON, GetContentUploadFromJSON, GetContentVersionFromJSON, GetContentVersionListFromJSON, GetScormApiLogsFromJSON, GetScormPackageFromJSON, GetScormSessionDataFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PostVerifyManifestFromJSON, PutContentToJSON, PutContentVersionToJSON, ScormGetValueResponseFromJSON, ScormSetValueRequestToJSON, ScormSetValueResponseFromJSON, } from '../models/index';
24
+ import { GetContentFromJSON, GetContentListFromJSON, GetContentSessionFromJSON, GetContentSessionDetailFromJSON, GetContentSessionListFromJSON, GetContentUploadFromJSON, GetContentVersionFromJSON, GetContentVersionListFromJSON, GetScormApiLogsFromJSON, GetScormPackageFromJSON, GetScormSessionDataFromJSON, PostContentQuizToJSON, PostContentSessionFromJSON, PostContentUploadToJSON, PostVerifyManifestFromJSON, PutContentToJSON, PutContentReorderToJSON, PutContentVersionToJSON, ScormGetValueResponseFromJSON, ScormSetValueRequestToJSON, ScormSetValueResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -889,6 +889,53 @@ export class ContentApi extends runtime.BaseAPI {
889
889
  return yield response.value();
890
890
  });
891
891
  }
892
+ /**
893
+ * Creates request options for putContentReorder without sending the request
894
+ */
895
+ putContentReorderRequestOpts(requestParameters) {
896
+ return __awaiter(this, void 0, void 0, function* () {
897
+ if (requestParameters['moduleId'] == null) {
898
+ throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling putContentReorder().');
899
+ }
900
+ if (requestParameters['courseId'] == null) {
901
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putContentReorder().');
902
+ }
903
+ if (requestParameters['putContentReorder'] == null) {
904
+ throw new runtime.RequiredError('putContentReorder', 'Required parameter "putContentReorder" was null or undefined when calling putContentReorder().');
905
+ }
906
+ const queryParameters = {};
907
+ const headerParameters = {};
908
+ headerParameters['Content-Type'] = 'application/json';
909
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/reorder`;
910
+ urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
911
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
912
+ return {
913
+ path: urlPath,
914
+ method: 'PUT',
915
+ headers: headerParameters,
916
+ query: queryParameters,
917
+ body: PutContentReorderToJSON(requestParameters['putContentReorder']),
918
+ };
919
+ });
920
+ }
921
+ /**
922
+ * Reorder content in a module
923
+ */
924
+ putContentReorderRaw(requestParameters, initOverrides) {
925
+ return __awaiter(this, void 0, void 0, function* () {
926
+ const requestOptions = yield this.putContentReorderRequestOpts(requestParameters);
927
+ const response = yield this.request(requestOptions, initOverrides);
928
+ return new runtime.VoidApiResponse(response);
929
+ });
930
+ }
931
+ /**
932
+ * Reorder content in a module
933
+ */
934
+ putContentReorder(requestParameters, initOverrides) {
935
+ return __awaiter(this, void 0, void 0, function* () {
936
+ yield this.putContentReorderRaw(requestParameters, initOverrides);
937
+ });
938
+ }
892
939
  /**
893
940
  * Creates request options for putContentVersion without sending the request
894
941
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetModule, GetModuleList, PostModule, PutModule } from '../models/index';
13
+ import type { GetModule, GetModuleList, PostModule, PutModule, PutModuleReorder } from '../models/index';
14
14
  export interface GetModuleRequest {
15
15
  moduleId: string;
16
16
  courseId: string;
@@ -27,6 +27,10 @@ export interface PutModuleRequest {
27
27
  courseId: string;
28
28
  putModule: PutModule;
29
29
  }
30
+ export interface PutModuleReorderRequest {
31
+ courseId: string;
32
+ putModuleReorder: PutModuleReorder;
33
+ }
30
34
  /**
31
35
  *
32
36
  */
@@ -79,4 +83,16 @@ export declare class ModuleApi extends runtime.BaseAPI {
79
83
  * Update a module by id
80
84
  */
81
85
  putModule(requestParameters: PutModuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
86
+ /**
87
+ * Creates request options for putModuleReorder without sending the request
88
+ */
89
+ putModuleReorderRequestOpts(requestParameters: PutModuleReorderRequest): Promise<runtime.RequestOpts>;
90
+ /**
91
+ * Reorder modules in a course
92
+ */
93
+ putModuleReorderRaw(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
94
+ /**
95
+ * Reorder modules in a course
96
+ */
97
+ putModuleReorder(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
82
98
  }
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { GetModuleFromJSON, GetModuleListFromJSON, PostModuleToJSON, PutModuleToJSON, } from '../models/index';
24
+ import { GetModuleFromJSON, GetModuleListFromJSON, PostModuleToJSON, PutModuleToJSON, PutModuleReorderToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -200,4 +200,47 @@ export class ModuleApi extends runtime.BaseAPI {
200
200
  return yield response.value();
201
201
  });
202
202
  }
203
+ /**
204
+ * Creates request options for putModuleReorder without sending the request
205
+ */
206
+ putModuleReorderRequestOpts(requestParameters) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ if (requestParameters['courseId'] == null) {
209
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putModuleReorder().');
210
+ }
211
+ if (requestParameters['putModuleReorder'] == null) {
212
+ throw new runtime.RequiredError('putModuleReorder', 'Required parameter "putModuleReorder" was null or undefined when calling putModuleReorder().');
213
+ }
214
+ const queryParameters = {};
215
+ const headerParameters = {};
216
+ headerParameters['Content-Type'] = 'application/json';
217
+ let urlPath = `/courses/{courseId}/modules/reorder`;
218
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
219
+ return {
220
+ path: urlPath,
221
+ method: 'PUT',
222
+ headers: headerParameters,
223
+ query: queryParameters,
224
+ body: PutModuleReorderToJSON(requestParameters['putModuleReorder']),
225
+ };
226
+ });
227
+ }
228
+ /**
229
+ * Reorder modules in a course
230
+ */
231
+ putModuleReorderRaw(requestParameters, initOverrides) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ const requestOptions = yield this.putModuleReorderRequestOpts(requestParameters);
234
+ const response = yield this.request(requestOptions, initOverrides);
235
+ return new runtime.VoidApiResponse(response);
236
+ });
237
+ }
238
+ /**
239
+ * Reorder modules in a course
240
+ */
241
+ putModuleReorder(requestParameters, initOverrides) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ yield this.putModuleReorderRaw(requestParameters, initOverrides);
244
+ });
245
+ }
203
246
  }
@@ -42,6 +42,12 @@ export interface PostContentQuiz {
42
42
  * @memberof PostContentQuiz
43
43
  */
44
44
  settings: PostContentQuizSettings;
45
+ /**
46
+ * Display order within the module. Auto-assigned if not provided.
47
+ * @type {number}
48
+ * @memberof PostContentQuiz
49
+ */
50
+ order?: number;
45
51
  /**
46
52
  *
47
53
  * @type {PostContentQuizAssignment}
@@ -38,6 +38,7 @@ export function PostContentQuizFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'description': json['description'] == null ? undefined : json['description'],
39
39
  'questionSelection': PostContentQuizQuestionSelectionFromJSON(json['question_selection']),
40
40
  'settings': PostContentQuizSettingsFromJSON(json['settings']),
41
+ 'order': json['order'] == null ? undefined : json['order'],
41
42
  'assignment': json['assignment'] == null ? undefined : PostContentQuizAssignmentFromJSON(json['assignment']),
42
43
  };
43
44
  }
@@ -53,6 +54,7 @@ export function PostContentQuizToJSONTyped(value, ignoreDiscriminator = false) {
53
54
  'description': value['description'],
54
55
  'question_selection': PostContentQuizQuestionSelectionToJSON(value['questionSelection']),
55
56
  'settings': PostContentQuizSettingsToJSON(value['settings']),
57
+ 'order': value['order'],
56
58
  'assignment': PostContentQuizAssignmentToJSON(value['assignment']),
57
59
  };
58
60
  }
@@ -27,6 +27,12 @@ export interface PostContentUpload {
27
27
  * @memberof PostContentUpload
28
28
  */
29
29
  contentType: PostContentUploadContentTypeEnum;
30
+ /**
31
+ * Display order within the module. Auto-assigned if not provided.
32
+ * @type {number}
33
+ * @memberof PostContentUpload
34
+ */
35
+ order?: number;
30
36
  }
31
37
  /**
32
38
  * @export
@@ -47,6 +47,7 @@ export function PostContentUploadFromJSONTyped(json, ignoreDiscriminator) {
47
47
  return {
48
48
  'name': json['name'],
49
49
  'contentType': json['content_type'],
50
+ 'order': json['order'] == null ? undefined : json['order'],
50
51
  };
51
52
  }
52
53
  export function PostContentUploadToJSON(json) {
@@ -59,5 +60,6 @@ export function PostContentUploadToJSONTyped(value, ignoreDiscriminator = false)
59
60
  return {
60
61
  'name': value['name'],
61
62
  'content_type': value['contentType'],
63
+ 'order': value['order'],
62
64
  };
63
65
  }
@@ -32,7 +32,7 @@ export interface PostModule {
32
32
  * @type {number}
33
33
  * @memberof PostModule
34
34
  */
35
- order: number;
35
+ order?: number;
36
36
  }
37
37
  /**
38
38
  * Check if a given object implements the PostModule interface.
@@ -19,8 +19,6 @@ export function instanceOfPostModule(value) {
19
19
  return false;
20
20
  if (!('description' in value) || value['description'] === undefined)
21
21
  return false;
22
- if (!('order' in value) || value['order'] === undefined)
23
- return false;
24
22
  return true;
25
23
  }
26
24
  export function PostModuleFromJSON(json) {
@@ -33,7 +31,7 @@ export function PostModuleFromJSONTyped(json, ignoreDiscriminator) {
33
31
  return {
34
32
  'name': json['name'],
35
33
  'description': json['description'],
36
- 'order': json['order'],
34
+ 'order': json['order'] == null ? undefined : json['order'],
37
35
  };
38
36
  }
39
37
  export function PostModuleToJSON(json) {
@@ -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 PutContentReorder
16
+ */
17
+ export interface PutContentReorder {
18
+ /**
19
+ * Ordered list of content IDs
20
+ * @type {Array<string>}
21
+ * @memberof PutContentReorder
22
+ */
23
+ ids: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PutContentReorder interface.
27
+ */
28
+ export declare function instanceOfPutContentReorder(value: object): value is PutContentReorder;
29
+ export declare function PutContentReorderFromJSON(json: any): PutContentReorder;
30
+ export declare function PutContentReorderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutContentReorder;
31
+ export declare function PutContentReorderToJSON(json: any): PutContentReorder;
32
+ export declare function PutContentReorderToJSONTyped(value?: PutContentReorder | 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 PutContentReorder interface.
16
+ */
17
+ export function instanceOfPutContentReorder(value) {
18
+ if (!('ids' in value) || value['ids'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function PutContentReorderFromJSON(json) {
23
+ return PutContentReorderFromJSONTyped(json, false);
24
+ }
25
+ export function PutContentReorderFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'ids': json['ids'],
31
+ };
32
+ }
33
+ export function PutContentReorderToJSON(json) {
34
+ return PutContentReorderToJSONTyped(json, false);
35
+ }
36
+ export function PutContentReorderToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'ids': value['ids'],
42
+ };
43
+ }
@@ -33,12 +33,6 @@ export interface PutCourse {
33
33
  * @memberof PutCourse
34
34
  */
35
35
  description?: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof PutCourse
40
- */
41
- instructor?: string;
42
36
  /**
43
37
  * Whether the course is published and visible to students
44
38
  * @type {boolean}
@@ -28,7 +28,6 @@ export function PutCourseFromJSONTyped(json, ignoreDiscriminator) {
28
28
  'id': json['id'] == null ? undefined : json['id'],
29
29
  'name': json['name'] == null ? undefined : json['name'],
30
30
  'description': json['description'] == null ? undefined : json['description'],
31
- 'instructor': json['instructor'] == null ? undefined : json['instructor'],
32
31
  'published': json['published'] == null ? undefined : json['published'],
33
32
  };
34
33
  }
@@ -42,7 +41,6 @@ export function PutCourseToJSONTyped(value, ignoreDiscriminator = false) {
42
41
  return {
43
42
  'name': value['name'],
44
43
  'description': value['description'],
45
- 'instructor': value['instructor'],
46
44
  'published': value['published'],
47
45
  };
48
46
  }
@@ -27,12 +27,6 @@ export interface PutModule {
27
27
  * @memberof PutModule
28
28
  */
29
29
  description?: string;
30
- /**
31
- *
32
- * @type {number}
33
- * @memberof PutModule
34
- */
35
- order?: number;
36
30
  /**
37
31
  * Whether the module is published and visible to students
38
32
  * @type {boolean}