@easyedu/js-lsm-api 1.45.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.
- package/.openapi-generator/FILES +4 -0
- package/README.md +6 -2
- package/dist/apis/ContentApi.d.ts +18 -1
- package/dist/apis/ContentApi.js +47 -0
- package/dist/apis/ModuleApi.d.ts +17 -1
- package/dist/apis/ModuleApi.js +43 -0
- package/dist/esm/apis/ContentApi.d.ts +18 -1
- package/dist/esm/apis/ContentApi.js +48 -1
- package/dist/esm/apis/ModuleApi.d.ts +17 -1
- package/dist/esm/apis/ModuleApi.js +44 -1
- package/dist/esm/models/PostContentQuiz.d.ts +6 -0
- package/dist/esm/models/PostContentQuiz.js +2 -0
- package/dist/esm/models/PostContentUpload.d.ts +6 -0
- package/dist/esm/models/PostContentUpload.js +2 -0
- package/dist/esm/models/PostCourse.d.ts +0 -6
- package/dist/esm/models/PostCourse.js +0 -4
- package/dist/esm/models/PostModule.d.ts +1 -1
- package/dist/esm/models/PostModule.js +1 -3
- package/dist/esm/models/PutContentReorder.d.ts +32 -0
- package/dist/esm/models/PutContentReorder.js +43 -0
- package/dist/esm/models/PutCourse.d.ts +0 -6
- package/dist/esm/models/PutCourse.js +0 -2
- package/dist/esm/models/PutModule.d.ts +0 -6
- package/dist/esm/models/PutModule.js +0 -2
- package/dist/esm/models/PutModuleReorder.d.ts +32 -0
- package/dist/esm/models/PutModuleReorder.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/PostContentQuiz.d.ts +6 -0
- package/dist/models/PostContentQuiz.js +2 -0
- package/dist/models/PostContentUpload.d.ts +6 -0
- package/dist/models/PostContentUpload.js +2 -0
- package/dist/models/PostCourse.d.ts +0 -6
- package/dist/models/PostCourse.js +0 -4
- package/dist/models/PostModule.d.ts +1 -1
- package/dist/models/PostModule.js +1 -3
- package/dist/models/PutContentReorder.d.ts +32 -0
- package/dist/models/PutContentReorder.js +50 -0
- package/dist/models/PutCourse.d.ts +0 -6
- package/dist/models/PutCourse.js +0 -2
- package/dist/models/PutModule.d.ts +0 -6
- package/dist/models/PutModule.js +0 -2
- package/dist/models/PutModuleReorder.d.ts +32 -0
- package/dist/models/PutModuleReorder.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/ContentApi.md +72 -0
- package/docs/ModuleApi.md +69 -0
- package/docs/PostContentQuiz.md +2 -0
- package/docs/PostContentUpload.md +2 -0
- package/docs/PostCourse.md +0 -2
- package/docs/PutContentReorder.md +34 -0
- package/docs/PutCourse.md +0 -2
- package/docs/PutModule.md +0 -2
- package/docs/PutModuleReorder.md +34 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +71 -0
- package/src/apis/ModuleApi.ts +62 -0
- package/src/models/PostContentQuiz.ts +8 -0
- package/src/models/PostContentUpload.ts +8 -0
- package/src/models/PostCourse.ts +0 -9
- package/src/models/PostModule.ts +2 -3
- package/src/models/PutContentReorder.ts +66 -0
- package/src/models/PutCourse.ts +0 -8
- package/src/models/PutModule.ts +0 -8
- package/src/models/PutModuleReorder.ts +66 -0
- package/src/models/index.ts +2 -0
package/docs/ModuleApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
8
8
|
| [**getModuleList**](ModuleApi.md#getmodulelist) | **GET** /courses/{courseId}/modules | get module list |
|
|
9
9
|
| [**postModule**](ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module |
|
|
10
10
|
| [**putModule**](ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id |
|
|
11
|
+
| [**putModuleReorder**](ModuleApi.md#putmodulereorder) | **PUT** /courses/{courseId}/modules/reorder | Reorder modules in a course |
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
@@ -282,3 +283,71 @@ No authorization required
|
|
|
282
283
|
|
|
283
284
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
284
285
|
|
|
286
|
+
|
|
287
|
+
## putModuleReorder
|
|
288
|
+
|
|
289
|
+
> putModuleReorder(courseId, putModuleReorder)
|
|
290
|
+
|
|
291
|
+
Reorder modules in a course
|
|
292
|
+
|
|
293
|
+
### Example
|
|
294
|
+
|
|
295
|
+
```ts
|
|
296
|
+
import {
|
|
297
|
+
Configuration,
|
|
298
|
+
ModuleApi,
|
|
299
|
+
} from '@easyedu/js-lsm-api';
|
|
300
|
+
import type { PutModuleReorderRequest } from '@easyedu/js-lsm-api';
|
|
301
|
+
|
|
302
|
+
async function example() {
|
|
303
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
304
|
+
const api = new ModuleApi();
|
|
305
|
+
|
|
306
|
+
const body = {
|
|
307
|
+
// string
|
|
308
|
+
courseId: courseId_example,
|
|
309
|
+
// PutModuleReorder | Ordered list of module IDs
|
|
310
|
+
putModuleReorder: ...,
|
|
311
|
+
} satisfies PutModuleReorderRequest;
|
|
312
|
+
|
|
313
|
+
try {
|
|
314
|
+
const data = await api.putModuleReorder(body);
|
|
315
|
+
console.log(data);
|
|
316
|
+
} catch (error) {
|
|
317
|
+
console.error(error);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Run the test
|
|
322
|
+
example().catch(console.error);
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Parameters
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
| Name | Type | Description | Notes |
|
|
329
|
+
|------------- | ------------- | ------------- | -------------|
|
|
330
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
331
|
+
| **putModuleReorder** | [PutModuleReorder](PutModuleReorder.md) | Ordered list of module IDs | |
|
|
332
|
+
|
|
333
|
+
### Return type
|
|
334
|
+
|
|
335
|
+
`void` (Empty response body)
|
|
336
|
+
|
|
337
|
+
### Authorization
|
|
338
|
+
|
|
339
|
+
No authorization required
|
|
340
|
+
|
|
341
|
+
### HTTP request headers
|
|
342
|
+
|
|
343
|
+
- **Content-Type**: `application/json`
|
|
344
|
+
- **Accept**: Not defined
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
### HTTP response details
|
|
348
|
+
| Status code | Description | Response headers |
|
|
349
|
+
|-------------|-------------|------------------|
|
|
350
|
+
| **200** | Modules reordered successfully | - |
|
|
351
|
+
|
|
352
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
353
|
+
|
package/docs/PostContentQuiz.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`description` | string
|
|
11
11
|
`questionSelection` | [PostContentQuizQuestionSelection](PostContentQuizQuestionSelection.md)
|
|
12
12
|
`settings` | [PostContentQuizSettings](PostContentQuizSettings.md)
|
|
13
|
+
`order` | number
|
|
13
14
|
`assignment` | [PostContentQuizAssignment](PostContentQuizAssignment.md)
|
|
14
15
|
|
|
15
16
|
## Example
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"description": null,
|
|
24
25
|
"questionSelection": null,
|
|
25
26
|
"settings": null,
|
|
27
|
+
"order": null,
|
|
26
28
|
"assignment": null,
|
|
27
29
|
} satisfies PostContentQuiz
|
|
28
30
|
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`name` | string
|
|
10
10
|
`contentType` | string
|
|
11
|
+
`order` | number
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { PostContentUpload } from '@easyedu/js-lsm-api'
|
|
|
18
19
|
const example = {
|
|
19
20
|
"name": null,
|
|
20
21
|
"contentType": null,
|
|
22
|
+
"order": null,
|
|
21
23
|
} satisfies PostContentUpload
|
|
22
24
|
|
|
23
25
|
console.log(example)
|
package/docs/PostCourse.md
CHANGED
|
@@ -8,7 +8,6 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`name` | string
|
|
10
10
|
`description` | string
|
|
11
|
-
`instructor` | string
|
|
12
11
|
|
|
13
12
|
## Example
|
|
14
13
|
|
|
@@ -19,7 +18,6 @@ import type { PostCourse } from '@easyedu/js-lsm-api'
|
|
|
19
18
|
const example = {
|
|
20
19
|
"name": null,
|
|
21
20
|
"description": null,
|
|
22
|
-
"instructor": null,
|
|
23
21
|
} satisfies PostCourse
|
|
24
22
|
|
|
25
23
|
console.log(example)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PutContentReorder
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ids` | Array<string>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PutContentReorder } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"ids": null,
|
|
19
|
+
} satisfies PutContentReorder
|
|
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 PutContentReorder
|
|
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
|
@@ -9,7 +9,6 @@ Name | Type
|
|
|
9
9
|
`id` | string
|
|
10
10
|
`name` | string
|
|
11
11
|
`description` | string
|
|
12
|
-
`instructor` | string
|
|
13
12
|
`published` | boolean
|
|
14
13
|
|
|
15
14
|
## Example
|
|
@@ -22,7 +21,6 @@ const example = {
|
|
|
22
21
|
"id": null,
|
|
23
22
|
"name": null,
|
|
24
23
|
"description": null,
|
|
25
|
-
"instructor": null,
|
|
26
24
|
"published": null,
|
|
27
25
|
} satisfies PutCourse
|
|
28
26
|
|
package/docs/PutModule.md
CHANGED
|
@@ -8,7 +8,6 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`name` | string
|
|
10
10
|
`description` | string
|
|
11
|
-
`order` | number
|
|
12
11
|
`published` | boolean
|
|
13
12
|
|
|
14
13
|
## Example
|
|
@@ -20,7 +19,6 @@ import type { PutModule } from '@easyedu/js-lsm-api'
|
|
|
20
19
|
const example = {
|
|
21
20
|
"name": null,
|
|
22
21
|
"description": null,
|
|
23
|
-
"order": null,
|
|
24
22
|
"published": null,
|
|
25
23
|
} satisfies PutModule
|
|
26
24
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PutModuleReorder
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ids` | Array<string>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PutModuleReorder } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"ids": null,
|
|
19
|
+
} satisfies PutModuleReorder
|
|
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 PutModuleReorder
|
|
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/package.json
CHANGED
package/src/apis/ContentApi.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type {
|
|
|
31
31
|
PostContentUpload,
|
|
32
32
|
PostVerifyManifest,
|
|
33
33
|
PutContent,
|
|
34
|
+
PutContentReorder,
|
|
34
35
|
PutContentVersion,
|
|
35
36
|
ScormGetValueResponse,
|
|
36
37
|
ScormSetValueRequest,
|
|
@@ -69,6 +70,8 @@ import {
|
|
|
69
70
|
PostVerifyManifestToJSON,
|
|
70
71
|
PutContentFromJSON,
|
|
71
72
|
PutContentToJSON,
|
|
73
|
+
PutContentReorderFromJSON,
|
|
74
|
+
PutContentReorderToJSON,
|
|
72
75
|
PutContentVersionFromJSON,
|
|
73
76
|
PutContentVersionToJSON,
|
|
74
77
|
ScormGetValueResponseFromJSON,
|
|
@@ -187,6 +190,12 @@ export interface PutContentRequest {
|
|
|
187
190
|
putContent: PutContent;
|
|
188
191
|
}
|
|
189
192
|
|
|
193
|
+
export interface PutContentReorderRequest {
|
|
194
|
+
moduleId: string;
|
|
195
|
+
courseId: string;
|
|
196
|
+
putContentReorder: PutContentReorder;
|
|
197
|
+
}
|
|
198
|
+
|
|
190
199
|
export interface PutContentVersionRequest {
|
|
191
200
|
contentId: string;
|
|
192
201
|
moduleId: string;
|
|
@@ -1305,6 +1314,68 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
1305
1314
|
return await response.value();
|
|
1306
1315
|
}
|
|
1307
1316
|
|
|
1317
|
+
/**
|
|
1318
|
+
* Creates request options for putContentReorder without sending the request
|
|
1319
|
+
*/
|
|
1320
|
+
async putContentReorderRequestOpts(requestParameters: PutContentReorderRequest): Promise<runtime.RequestOpts> {
|
|
1321
|
+
if (requestParameters['moduleId'] == null) {
|
|
1322
|
+
throw new runtime.RequiredError(
|
|
1323
|
+
'moduleId',
|
|
1324
|
+
'Required parameter "moduleId" was null or undefined when calling putContentReorder().'
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
if (requestParameters['courseId'] == null) {
|
|
1329
|
+
throw new runtime.RequiredError(
|
|
1330
|
+
'courseId',
|
|
1331
|
+
'Required parameter "courseId" was null or undefined when calling putContentReorder().'
|
|
1332
|
+
);
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
if (requestParameters['putContentReorder'] == null) {
|
|
1336
|
+
throw new runtime.RequiredError(
|
|
1337
|
+
'putContentReorder',
|
|
1338
|
+
'Required parameter "putContentReorder" was null or undefined when calling putContentReorder().'
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
const queryParameters: any = {};
|
|
1343
|
+
|
|
1344
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1345
|
+
|
|
1346
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/reorder`;
|
|
1350
|
+
urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
|
|
1351
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
1352
|
+
|
|
1353
|
+
return {
|
|
1354
|
+
path: urlPath,
|
|
1355
|
+
method: 'PUT',
|
|
1356
|
+
headers: headerParameters,
|
|
1357
|
+
query: queryParameters,
|
|
1358
|
+
body: PutContentReorderToJSON(requestParameters['putContentReorder']),
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* Reorder content in a module
|
|
1364
|
+
*/
|
|
1365
|
+
async putContentReorderRaw(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1366
|
+
const requestOptions = await this.putContentReorderRequestOpts(requestParameters);
|
|
1367
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1368
|
+
|
|
1369
|
+
return new runtime.VoidApiResponse(response);
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Reorder content in a module
|
|
1374
|
+
*/
|
|
1375
|
+
async putContentReorder(requestParameters: PutContentReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1376
|
+
await this.putContentReorderRaw(requestParameters, initOverrides);
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1308
1379
|
/**
|
|
1309
1380
|
* Creates request options for putContentVersion without sending the request
|
|
1310
1381
|
*/
|
package/src/apis/ModuleApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
GetModuleList,
|
|
20
20
|
PostModule,
|
|
21
21
|
PutModule,
|
|
22
|
+
PutModuleReorder,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
24
25
|
GetModuleFromJSON,
|
|
@@ -29,6 +30,8 @@ import {
|
|
|
29
30
|
PostModuleToJSON,
|
|
30
31
|
PutModuleFromJSON,
|
|
31
32
|
PutModuleToJSON,
|
|
33
|
+
PutModuleReorderFromJSON,
|
|
34
|
+
PutModuleReorderToJSON,
|
|
32
35
|
} from '../models/index';
|
|
33
36
|
|
|
34
37
|
export interface GetModuleRequest {
|
|
@@ -51,6 +54,11 @@ export interface PutModuleRequest {
|
|
|
51
54
|
putModule: PutModule;
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
export interface PutModuleReorderRequest {
|
|
58
|
+
courseId: string;
|
|
59
|
+
putModuleReorder: PutModuleReorder;
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
/**
|
|
55
63
|
*
|
|
56
64
|
*/
|
|
@@ -272,4 +280,58 @@ export class ModuleApi extends runtime.BaseAPI {
|
|
|
272
280
|
return await response.value();
|
|
273
281
|
}
|
|
274
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Creates request options for putModuleReorder without sending the request
|
|
285
|
+
*/
|
|
286
|
+
async putModuleReorderRequestOpts(requestParameters: PutModuleReorderRequest): Promise<runtime.RequestOpts> {
|
|
287
|
+
if (requestParameters['courseId'] == null) {
|
|
288
|
+
throw new runtime.RequiredError(
|
|
289
|
+
'courseId',
|
|
290
|
+
'Required parameter "courseId" was null or undefined when calling putModuleReorder().'
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (requestParameters['putModuleReorder'] == null) {
|
|
295
|
+
throw new runtime.RequiredError(
|
|
296
|
+
'putModuleReorder',
|
|
297
|
+
'Required parameter "putModuleReorder" was null or undefined when calling putModuleReorder().'
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const queryParameters: any = {};
|
|
302
|
+
|
|
303
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
304
|
+
|
|
305
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
let urlPath = `/courses/{courseId}/modules/reorder`;
|
|
309
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
path: urlPath,
|
|
313
|
+
method: 'PUT',
|
|
314
|
+
headers: headerParameters,
|
|
315
|
+
query: queryParameters,
|
|
316
|
+
body: PutModuleReorderToJSON(requestParameters['putModuleReorder']),
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Reorder modules in a course
|
|
322
|
+
*/
|
|
323
|
+
async putModuleReorderRaw(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
324
|
+
const requestOptions = await this.putModuleReorderRequestOpts(requestParameters);
|
|
325
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
326
|
+
|
|
327
|
+
return new runtime.VoidApiResponse(response);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Reorder modules in a course
|
|
332
|
+
*/
|
|
333
|
+
async putModuleReorder(requestParameters: PutModuleReorderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
334
|
+
await this.putModuleReorderRaw(requestParameters, initOverrides);
|
|
335
|
+
}
|
|
336
|
+
|
|
275
337
|
}
|
|
@@ -65,6 +65,12 @@ export interface PostContentQuiz {
|
|
|
65
65
|
* @memberof PostContentQuiz
|
|
66
66
|
*/
|
|
67
67
|
settings: PostContentQuizSettings;
|
|
68
|
+
/**
|
|
69
|
+
* Display order within the module. Auto-assigned if not provided.
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof PostContentQuiz
|
|
72
|
+
*/
|
|
73
|
+
order?: number;
|
|
68
74
|
/**
|
|
69
75
|
*
|
|
70
76
|
* @type {PostContentQuizAssignment}
|
|
@@ -97,6 +103,7 @@ export function PostContentQuizFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
97
103
|
'description': json['description'] == null ? undefined : json['description'],
|
|
98
104
|
'questionSelection': PostContentQuizQuestionSelectionFromJSON(json['question_selection']),
|
|
99
105
|
'settings': PostContentQuizSettingsFromJSON(json['settings']),
|
|
106
|
+
'order': json['order'] == null ? undefined : json['order'],
|
|
100
107
|
'assignment': json['assignment'] == null ? undefined : PostContentQuizAssignmentFromJSON(json['assignment']),
|
|
101
108
|
};
|
|
102
109
|
}
|
|
@@ -116,6 +123,7 @@ export function PostContentQuizToJSONTyped(value?: PostContentQuiz | null, ignor
|
|
|
116
123
|
'description': value['description'],
|
|
117
124
|
'question_selection': PostContentQuizQuestionSelectionToJSON(value['questionSelection']),
|
|
118
125
|
'settings': PostContentQuizSettingsToJSON(value['settings']),
|
|
126
|
+
'order': value['order'],
|
|
119
127
|
'assignment': PostContentQuizAssignmentToJSON(value['assignment']),
|
|
120
128
|
};
|
|
121
129
|
}
|
|
@@ -31,6 +31,12 @@ export interface PostContentUpload {
|
|
|
31
31
|
* @memberof PostContentUpload
|
|
32
32
|
*/
|
|
33
33
|
contentType: PostContentUploadContentTypeEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Display order within the module. Auto-assigned if not provided.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PostContentUpload
|
|
38
|
+
*/
|
|
39
|
+
order?: number;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
|
|
@@ -74,6 +80,7 @@ export function PostContentUploadFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
74
80
|
|
|
75
81
|
'name': json['name'],
|
|
76
82
|
'contentType': json['content_type'],
|
|
83
|
+
'order': json['order'] == null ? undefined : json['order'],
|
|
77
84
|
};
|
|
78
85
|
}
|
|
79
86
|
|
|
@@ -90,6 +97,7 @@ export function PostContentUploadToJSONTyped(value?: PostContentUpload | null, i
|
|
|
90
97
|
|
|
91
98
|
'name': value['name'],
|
|
92
99
|
'content_type': value['contentType'],
|
|
100
|
+
'order': value['order'],
|
|
93
101
|
};
|
|
94
102
|
}
|
|
95
103
|
|
package/src/models/PostCourse.ts
CHANGED
|
@@ -31,12 +31,6 @@ export interface PostCourse {
|
|
|
31
31
|
* @memberof PostCourse
|
|
32
32
|
*/
|
|
33
33
|
description: string;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof PostCourse
|
|
38
|
-
*/
|
|
39
|
-
instructor: string;
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
/**
|
|
@@ -45,7 +39,6 @@ export interface PostCourse {
|
|
|
45
39
|
export function instanceOfPostCourse(value: object): value is PostCourse {
|
|
46
40
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
41
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
48
|
-
if (!('instructor' in value) || value['instructor'] === undefined) return false;
|
|
49
42
|
return true;
|
|
50
43
|
}
|
|
51
44
|
|
|
@@ -61,7 +54,6 @@ export function PostCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
61
54
|
|
|
62
55
|
'name': json['name'],
|
|
63
56
|
'description': json['description'],
|
|
64
|
-
'instructor': json['instructor'],
|
|
65
57
|
};
|
|
66
58
|
}
|
|
67
59
|
|
|
@@ -78,7 +70,6 @@ export function PostCourseToJSONTyped(value?: PostCourse | null, ignoreDiscrimin
|
|
|
78
70
|
|
|
79
71
|
'name': value['name'],
|
|
80
72
|
'description': value['description'],
|
|
81
|
-
'instructor': value['instructor'],
|
|
82
73
|
};
|
|
83
74
|
}
|
|
84
75
|
|
package/src/models/PostModule.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface PostModule {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof PostModule
|
|
38
38
|
*/
|
|
39
|
-
order
|
|
39
|
+
order?: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -45,7 +45,6 @@ export interface PostModule {
|
|
|
45
45
|
export function instanceOfPostModule(value: object): value is PostModule {
|
|
46
46
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
47
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
48
|
-
if (!('order' in value) || value['order'] === undefined) return false;
|
|
49
48
|
return true;
|
|
50
49
|
}
|
|
51
50
|
|
|
@@ -61,7 +60,7 @@ export function PostModuleFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
61
60
|
|
|
62
61
|
'name': json['name'],
|
|
63
62
|
'description': json['description'],
|
|
64
|
-
'order': json['order'],
|
|
63
|
+
'order': json['order'] == null ? undefined : json['order'],
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -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 PutContentReorder
|
|
20
|
+
*/
|
|
21
|
+
export interface PutContentReorder {
|
|
22
|
+
/**
|
|
23
|
+
* Ordered list of content IDs
|
|
24
|
+
* @type {Array<string>}
|
|
25
|
+
* @memberof PutContentReorder
|
|
26
|
+
*/
|
|
27
|
+
ids: Array<string>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the PutContentReorder interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfPutContentReorder(value: object): value is PutContentReorder {
|
|
34
|
+
if (!('ids' in value) || value['ids'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function PutContentReorderFromJSON(json: any): PutContentReorder {
|
|
39
|
+
return PutContentReorderFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function PutContentReorderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutContentReorder {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'ids': json['ids'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PutContentReorderToJSON(json: any): PutContentReorder {
|
|
53
|
+
return PutContentReorderToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function PutContentReorderToJSONTyped(value?: PutContentReorder | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'ids': value['ids'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/src/models/PutCourse.ts
CHANGED
|
@@ -37,12 +37,6 @@ export interface PutCourse {
|
|
|
37
37
|
* @memberof PutCourse
|
|
38
38
|
*/
|
|
39
39
|
description?: string;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof PutCourse
|
|
44
|
-
*/
|
|
45
|
-
instructor?: string;
|
|
46
40
|
/**
|
|
47
41
|
* Whether the course is published and visible to students
|
|
48
42
|
* @type {boolean}
|
|
@@ -71,7 +65,6 @@ export function PutCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
71
65
|
'id': json['id'] == null ? undefined : json['id'],
|
|
72
66
|
'name': json['name'] == null ? undefined : json['name'],
|
|
73
67
|
'description': json['description'] == null ? undefined : json['description'],
|
|
74
|
-
'instructor': json['instructor'] == null ? undefined : json['instructor'],
|
|
75
68
|
'published': json['published'] == null ? undefined : json['published'],
|
|
76
69
|
};
|
|
77
70
|
}
|
|
@@ -89,7 +82,6 @@ export function PutCourseToJSONTyped(value?: Omit<PutCourse, 'id'> | null, ignor
|
|
|
89
82
|
|
|
90
83
|
'name': value['name'],
|
|
91
84
|
'description': value['description'],
|
|
92
|
-
'instructor': value['instructor'],
|
|
93
85
|
'published': value['published'],
|
|
94
86
|
};
|
|
95
87
|
}
|
package/src/models/PutModule.ts
CHANGED
|
@@ -31,12 +31,6 @@ export interface PutModule {
|
|
|
31
31
|
* @memberof PutModule
|
|
32
32
|
*/
|
|
33
33
|
description?: string;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {number}
|
|
37
|
-
* @memberof PutModule
|
|
38
|
-
*/
|
|
39
|
-
order?: number;
|
|
40
34
|
/**
|
|
41
35
|
* Whether the module is published and visible to students
|
|
42
36
|
* @type {boolean}
|
|
@@ -64,7 +58,6 @@ export function PutModuleFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
64
58
|
|
|
65
59
|
'name': json['name'] == null ? undefined : json['name'],
|
|
66
60
|
'description': json['description'] == null ? undefined : json['description'],
|
|
67
|
-
'order': json['order'] == null ? undefined : json['order'],
|
|
68
61
|
'published': json['published'] == null ? undefined : json['published'],
|
|
69
62
|
};
|
|
70
63
|
}
|
|
@@ -82,7 +75,6 @@ export function PutModuleToJSONTyped(value?: PutModule | null, ignoreDiscriminat
|
|
|
82
75
|
|
|
83
76
|
'name': value['name'],
|
|
84
77
|
'description': value['description'],
|
|
85
|
-
'order': value['order'],
|
|
86
78
|
'published': value['published'],
|
|
87
79
|
};
|
|
88
80
|
}
|