@easyedu/js-lsm-api 1.132.0 → 1.133.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 +5 -2
- package/dist/apis/PortalApi.d.ts +9 -0
- package/dist/apis/PortalApi.js +11 -1
- package/dist/apis/QuestionApi.d.ts +19 -0
- package/dist/apis/QuestionApi.js +44 -0
- package/dist/esm/apis/PortalApi.d.ts +9 -0
- package/dist/esm/apis/PortalApi.js +10 -0
- package/dist/esm/apis/QuestionApi.d.ts +19 -0
- package/dist/esm/apis/QuestionApi.js +44 -0
- package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +6 -0
- package/dist/esm/models/GetCourseEnrollmentListItem.js +2 -0
- package/dist/esm/models/GetResourceUsageCoursesInner.d.ts +6 -0
- package/dist/esm/models/GetResourceUsageCoursesInner.js +4 -0
- package/dist/esm/models/PostQuestionTags.d.ts +38 -0
- package/dist/esm/models/PostQuestionTags.js +47 -0
- package/dist/esm/models/PostQuestionTagsResponse.d.ts +32 -0
- package/dist/esm/models/PostQuestionTagsResponse.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/GetCourseEnrollmentListItem.d.ts +6 -0
- package/dist/models/GetCourseEnrollmentListItem.js +2 -0
- package/dist/models/GetResourceUsageCoursesInner.d.ts +6 -0
- package/dist/models/GetResourceUsageCoursesInner.js +4 -0
- package/dist/models/PostQuestionTags.d.ts +38 -0
- package/dist/models/PostQuestionTags.js +54 -0
- package/dist/models/PostQuestionTagsResponse.d.ts +32 -0
- package/dist/models/PostQuestionTagsResponse.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/GetCourseEnrollmentListItem.md +2 -0
- package/docs/GetResourceUsageCoursesInner.md +2 -0
- package/docs/PortalApi.md +4 -1
- package/docs/PostQuestionTags.md +37 -0
- package/docs/PostQuestionTagsResponse.md +34 -0
- package/docs/QuestionApi.md +71 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +13 -0
- package/src/apis/QuestionApi.ts +63 -0
- package/src/models/GetCourseEnrollmentListItem.ts +8 -0
- package/src/models/GetResourceUsageCoursesInner.ts +9 -0
- package/src/models/PostQuestionTags.ts +75 -0
- package/src/models/PostQuestionTagsResponse.ts +66 -0
- package/src/models/index.ts +2 -0
|
@@ -25,6 +25,8 @@ const ContentLibraryVersionStatus_1 = require("./ContentLibraryVersionStatus");
|
|
|
25
25
|
function instanceOfGetResourceUsageCoursesInner(value) {
|
|
26
26
|
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
27
27
|
return false;
|
|
28
|
+
if (!('courseName' in value) || value['courseName'] === undefined)
|
|
29
|
+
return false;
|
|
28
30
|
if (!('courseVersionId' in value) || value['courseVersionId'] === undefined)
|
|
29
31
|
return false;
|
|
30
32
|
if (!('courseVersionNumber' in value) || value['courseVersionNumber'] === undefined)
|
|
@@ -46,6 +48,7 @@ function GetResourceUsageCoursesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
48
|
}
|
|
47
49
|
return {
|
|
48
50
|
'courseId': json['course_id'],
|
|
51
|
+
'courseName': json['course_name'],
|
|
49
52
|
'courseVersionId': json['course_version_id'],
|
|
50
53
|
'courseVersionNumber': json['course_version_number'],
|
|
51
54
|
'courseStatus': (0, ContentLibraryVersionStatus_1.ContentLibraryVersionStatusFromJSON)(json['course_status']),
|
|
@@ -62,6 +65,7 @@ function GetResourceUsageCoursesInnerToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
62
65
|
}
|
|
63
66
|
return {
|
|
64
67
|
'course_id': value['courseId'],
|
|
68
|
+
'course_name': value['courseName'],
|
|
65
69
|
'course_version_id': value['courseVersionId'],
|
|
66
70
|
'course_version_number': value['courseVersionNumber'],
|
|
67
71
|
'course_status': (0, ContentLibraryVersionStatus_1.ContentLibraryVersionStatusToJSON)(value['courseStatus']),
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
* Adds shared tags to several questions at once without creating new question versions.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PostQuestionTags
|
|
16
|
+
*/
|
|
17
|
+
export interface PostQuestionTags {
|
|
18
|
+
/**
|
|
19
|
+
* External IDs of the questions to tag
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof PostQuestionTags
|
|
22
|
+
*/
|
|
23
|
+
questionIds: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Tag names to add. Existing tags on each question are kept.
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof PostQuestionTags
|
|
28
|
+
*/
|
|
29
|
+
tags: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the PostQuestionTags interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfPostQuestionTags(value: object): value is PostQuestionTags;
|
|
35
|
+
export declare function PostQuestionTagsFromJSON(json: any): PostQuestionTags;
|
|
36
|
+
export declare function PostQuestionTagsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionTags;
|
|
37
|
+
export declare function PostQuestionTagsToJSON(json: any): PostQuestionTags;
|
|
38
|
+
export declare function PostQuestionTagsToJSONTyped(value?: PostQuestionTags | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfPostQuestionTags = instanceOfPostQuestionTags;
|
|
17
|
+
exports.PostQuestionTagsFromJSON = PostQuestionTagsFromJSON;
|
|
18
|
+
exports.PostQuestionTagsFromJSONTyped = PostQuestionTagsFromJSONTyped;
|
|
19
|
+
exports.PostQuestionTagsToJSON = PostQuestionTagsToJSON;
|
|
20
|
+
exports.PostQuestionTagsToJSONTyped = PostQuestionTagsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostQuestionTags interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostQuestionTags(value) {
|
|
25
|
+
if (!('questionIds' in value) || value['questionIds'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('tags' in value) || value['tags'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function PostQuestionTagsFromJSON(json) {
|
|
32
|
+
return PostQuestionTagsFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function PostQuestionTagsFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'questionIds': json['question_ids'],
|
|
40
|
+
'tags': json['tags'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function PostQuestionTagsToJSON(json) {
|
|
44
|
+
return PostQuestionTagsToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function PostQuestionTagsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'question_ids': value['questionIds'],
|
|
52
|
+
'tags': value['tags'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -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 PostQuestionTagsResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface PostQuestionTagsResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Number of questions that received the tags
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof PostQuestionTagsResponse
|
|
22
|
+
*/
|
|
23
|
+
updatedCount: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the PostQuestionTagsResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfPostQuestionTagsResponse(value: object): value is PostQuestionTagsResponse;
|
|
29
|
+
export declare function PostQuestionTagsResponseFromJSON(json: any): PostQuestionTagsResponse;
|
|
30
|
+
export declare function PostQuestionTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionTagsResponse;
|
|
31
|
+
export declare function PostQuestionTagsResponseToJSON(json: any): PostQuestionTagsResponse;
|
|
32
|
+
export declare function PostQuestionTagsResponseToJSONTyped(value?: PostQuestionTagsResponse | 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.instanceOfPostQuestionTagsResponse = instanceOfPostQuestionTagsResponse;
|
|
17
|
+
exports.PostQuestionTagsResponseFromJSON = PostQuestionTagsResponseFromJSON;
|
|
18
|
+
exports.PostQuestionTagsResponseFromJSONTyped = PostQuestionTagsResponseFromJSONTyped;
|
|
19
|
+
exports.PostQuestionTagsResponseToJSON = PostQuestionTagsResponseToJSON;
|
|
20
|
+
exports.PostQuestionTagsResponseToJSONTyped = PostQuestionTagsResponseToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostQuestionTagsResponse interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostQuestionTagsResponse(value) {
|
|
25
|
+
if (!('updatedCount' in value) || value['updatedCount'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function PostQuestionTagsResponseFromJSON(json) {
|
|
30
|
+
return PostQuestionTagsResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function PostQuestionTagsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'updatedCount': json['updated_count'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function PostQuestionTagsResponseToJSON(json) {
|
|
41
|
+
return PostQuestionTagsResponseToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function PostQuestionTagsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'updated_count': value['updatedCount'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -277,6 +277,8 @@ export * from './PostQuestionImportCommit';
|
|
|
277
277
|
export * from './PostQuestionImportCommitItem';
|
|
278
278
|
export * from './PostQuestionImportCommitResponse';
|
|
279
279
|
export * from './PostQuestionImportParseResponse';
|
|
280
|
+
export * from './PostQuestionTags';
|
|
281
|
+
export * from './PostQuestionTagsResponse';
|
|
280
282
|
export * from './PostReportExport';
|
|
281
283
|
export * from './PostReportQuery';
|
|
282
284
|
export * from './PostResetPassword';
|
package/dist/models/index.js
CHANGED
|
@@ -295,6 +295,8 @@ __exportStar(require("./PostQuestionImportCommit"), exports);
|
|
|
295
295
|
__exportStar(require("./PostQuestionImportCommitItem"), exports);
|
|
296
296
|
__exportStar(require("./PostQuestionImportCommitResponse"), exports);
|
|
297
297
|
__exportStar(require("./PostQuestionImportParseResponse"), exports);
|
|
298
|
+
__exportStar(require("./PostQuestionTags"), exports);
|
|
299
|
+
__exportStar(require("./PostQuestionTagsResponse"), exports);
|
|
298
300
|
__exportStar(require("./PostReportExport"), exports);
|
|
299
301
|
__exportStar(require("./PostReportQuery"), exports);
|
|
300
302
|
__exportStar(require("./PostResetPassword"), exports);
|
|
@@ -14,6 +14,7 @@ Name | Type
|
|
|
14
14
|
`courseVersionNumber` | number
|
|
15
15
|
`firstName` | string
|
|
16
16
|
`lastName` | string
|
|
17
|
+
`email` | string
|
|
17
18
|
`enrollmentDateStart` | number
|
|
18
19
|
`enrollmentDateEnd` | number
|
|
19
20
|
`status` | string
|
|
@@ -36,6 +37,7 @@ const example = {
|
|
|
36
37
|
"courseVersionNumber": null,
|
|
37
38
|
"firstName": null,
|
|
38
39
|
"lastName": null,
|
|
40
|
+
"email": null,
|
|
39
41
|
"enrollmentDateStart": null,
|
|
40
42
|
"enrollmentDateEnd": null,
|
|
41
43
|
"status": null,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`courseId` | string
|
|
10
|
+
`courseName` | string
|
|
10
11
|
`courseVersionId` | string
|
|
11
12
|
`courseVersionNumber` | number
|
|
12
13
|
`courseStatus` | [ContentLibraryVersionStatus](ContentLibraryVersionStatus.md)
|
|
@@ -21,6 +22,7 @@ import type { GetResourceUsageCoursesInner } from '@easyedu/js-lsm-api'
|
|
|
21
22
|
// TODO: Update the object below with actual values
|
|
22
23
|
const example = {
|
|
23
24
|
"courseId": null,
|
|
25
|
+
"courseName": null,
|
|
24
26
|
"courseVersionId": null,
|
|
25
27
|
"courseVersionNumber": null,
|
|
26
28
|
"courseStatus": null,
|
package/docs/PortalApi.md
CHANGED
|
@@ -554,7 +554,7 @@ No authorization required
|
|
|
554
554
|
|
|
555
555
|
## getPortalUsers
|
|
556
556
|
|
|
557
|
-
> GetPortalUserList getPortalUsers(portalId, type, roles, search, page, pageSize)
|
|
557
|
+
> GetPortalUserList getPortalUsers(portalId, type, roles, search, status, page, pageSize)
|
|
558
558
|
|
|
559
559
|
Get all users for a portal with optional role filtering
|
|
560
560
|
|
|
@@ -580,6 +580,8 @@ async function example() {
|
|
|
580
580
|
roles: ...,
|
|
581
581
|
// string | Search users by first name, last name, or email (optional)
|
|
582
582
|
search: Josh,
|
|
583
|
+
// 'active' | 'removed' | Which members to list. \"removed\" lists people removed from the portal, whose history is kept and who can be re-invited. (optional)
|
|
584
|
+
status: status_example,
|
|
583
585
|
// number (optional)
|
|
584
586
|
page: 56,
|
|
585
587
|
// number (optional)
|
|
@@ -607,6 +609,7 @@ example().catch(console.error);
|
|
|
607
609
|
| **type** | `student`, `instructor` | Filter users by type (student maps to Learner, instructor maps to Instructor) | [Optional] [Defaults to `undefined`] [Enum: student, instructor] |
|
|
608
610
|
| **roles** | `Admin`, `Instructor`, `Learner` | Filter users by role (can specify multiple) | [Optional] [Enum: Admin, Instructor, Learner] |
|
|
609
611
|
| **search** | `string` | Search users by first name, last name, or email | [Optional] [Defaults to `undefined`] |
|
|
612
|
+
| **status** | `active`, `removed` | Which members to list. \"removed\" lists people removed from the portal, whose history is kept and who can be re-invited. | [Optional] [Defaults to `'active'`] [Enum: active, removed] |
|
|
610
613
|
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
611
614
|
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
612
615
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# PostQuestionTags
|
|
3
|
+
|
|
4
|
+
Adds shared tags to several questions at once without creating new question versions.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`questionIds` | Array<string>
|
|
11
|
+
`tags` | Array<string>
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { PostQuestionTags } from '@easyedu/js-lsm-api'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"questionIds": null,
|
|
21
|
+
"tags": null,
|
|
22
|
+
} satisfies PostQuestionTags
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostQuestionTags
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostQuestionTagsResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`updatedCount` | number
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostQuestionTagsResponse } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"updatedCount": null,
|
|
19
|
+
} satisfies PostQuestionTagsResponse
|
|
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 PostQuestionTagsResponse
|
|
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/QuestionApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
9
9
|
| [**getQuestionList**](QuestionApi.md#getquestionlist) | **GET** /questions | Get list of questions with filtering and pagination |
|
|
10
10
|
| [**getQuestionVersions**](QuestionApi.md#getquestionversions) | **GET** /questions/{questionId}/versions | Get all versions of a question |
|
|
11
11
|
| [**postQuestion**](QuestionApi.md#postquestion) | **POST** /questions | Create a new question |
|
|
12
|
+
| [**postQuestionTags**](QuestionApi.md#postquestiontags) | **POST** /questions/tags | Add tags to several questions |
|
|
12
13
|
| [**putQuestion**](QuestionApi.md#putquestion) | **PUT** /questions/{questionId} | Create the next version of a question |
|
|
13
14
|
|
|
14
15
|
|
|
@@ -355,6 +356,76 @@ No authorization required
|
|
|
355
356
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
356
357
|
|
|
357
358
|
|
|
359
|
+
## postQuestionTags
|
|
360
|
+
|
|
361
|
+
> PostQuestionTagsResponse postQuestionTags(postQuestionTags)
|
|
362
|
+
|
|
363
|
+
Add tags to several questions
|
|
364
|
+
|
|
365
|
+
Adds the given tags to every listed question, keeping existing tags. Tags are metadata, so no new question versions are created.
|
|
366
|
+
|
|
367
|
+
### Example
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
import {
|
|
371
|
+
Configuration,
|
|
372
|
+
QuestionApi,
|
|
373
|
+
} from '@easyedu/js-lsm-api';
|
|
374
|
+
import type { PostQuestionTagsRequest } from '@easyedu/js-lsm-api';
|
|
375
|
+
|
|
376
|
+
async function example() {
|
|
377
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
378
|
+
const api = new QuestionApi();
|
|
379
|
+
|
|
380
|
+
const body = {
|
|
381
|
+
// PostQuestionTags
|
|
382
|
+
postQuestionTags: ...,
|
|
383
|
+
} satisfies PostQuestionTagsRequest;
|
|
384
|
+
|
|
385
|
+
try {
|
|
386
|
+
const data = await api.postQuestionTags(body);
|
|
387
|
+
console.log(data);
|
|
388
|
+
} catch (error) {
|
|
389
|
+
console.error(error);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// Run the test
|
|
394
|
+
example().catch(console.error);
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Parameters
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
| Name | Type | Description | Notes |
|
|
401
|
+
|------------- | ------------- | ------------- | -------------|
|
|
402
|
+
| **postQuestionTags** | [PostQuestionTags](PostQuestionTags.md) | | |
|
|
403
|
+
|
|
404
|
+
### Return type
|
|
405
|
+
|
|
406
|
+
[**PostQuestionTagsResponse**](PostQuestionTagsResponse.md)
|
|
407
|
+
|
|
408
|
+
### Authorization
|
|
409
|
+
|
|
410
|
+
No authorization required
|
|
411
|
+
|
|
412
|
+
### HTTP request headers
|
|
413
|
+
|
|
414
|
+
- **Content-Type**: `application/json`
|
|
415
|
+
- **Accept**: `application/json`
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
### HTTP response details
|
|
419
|
+
| Status code | Description | Response headers |
|
|
420
|
+
|-------------|-------------|------------------|
|
|
421
|
+
| **200** | Tags added | - |
|
|
422
|
+
| **400** | Invalid question IDs or tags | - |
|
|
423
|
+
| **403** | Missing permission | - |
|
|
424
|
+
| **409** | A tag is archived | - |
|
|
425
|
+
|
|
426
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
427
|
+
|
|
428
|
+
|
|
358
429
|
## putQuestion
|
|
359
430
|
|
|
360
431
|
> GetQuestion putQuestion(questionId, putQuestion)
|
package/package.json
CHANGED
package/src/apis/PortalApi.ts
CHANGED
|
@@ -113,6 +113,7 @@ export interface GetPortalUsersRequest {
|
|
|
113
113
|
type?: GetPortalUsersTypeEnum;
|
|
114
114
|
roles?: Array<GetPortalUsersRolesEnum>;
|
|
115
115
|
search?: string;
|
|
116
|
+
status?: GetPortalUsersStatusEnum;
|
|
116
117
|
page?: number;
|
|
117
118
|
pageSize?: number;
|
|
118
119
|
}
|
|
@@ -549,6 +550,10 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
549
550
|
queryParameters['search'] = requestParameters['search'];
|
|
550
551
|
}
|
|
551
552
|
|
|
553
|
+
if (requestParameters['status'] != null) {
|
|
554
|
+
queryParameters['status'] = requestParameters['status'];
|
|
555
|
+
}
|
|
556
|
+
|
|
552
557
|
if (requestParameters['page'] != null) {
|
|
553
558
|
queryParameters['page'] = requestParameters['page'];
|
|
554
559
|
}
|
|
@@ -1242,3 +1247,11 @@ export const GetPortalUsersRolesEnum = {
|
|
|
1242
1247
|
Learner: 'Learner'
|
|
1243
1248
|
} as const;
|
|
1244
1249
|
export type GetPortalUsersRolesEnum = typeof GetPortalUsersRolesEnum[keyof typeof GetPortalUsersRolesEnum];
|
|
1250
|
+
/**
|
|
1251
|
+
* @export
|
|
1252
|
+
*/
|
|
1253
|
+
export const GetPortalUsersStatusEnum = {
|
|
1254
|
+
Active: 'active',
|
|
1255
|
+
Removed: 'removed'
|
|
1256
|
+
} as const;
|
|
1257
|
+
export type GetPortalUsersStatusEnum = typeof GetPortalUsersStatusEnum[keyof typeof GetPortalUsersStatusEnum];
|
package/src/apis/QuestionApi.ts
CHANGED
|
@@ -28,6 +28,16 @@ import {
|
|
|
28
28
|
PostQuestionFromJSON,
|
|
29
29
|
PostQuestionToJSON,
|
|
30
30
|
} from '../models/PostQuestion';
|
|
31
|
+
import {
|
|
32
|
+
type PostQuestionTags,
|
|
33
|
+
PostQuestionTagsFromJSON,
|
|
34
|
+
PostQuestionTagsToJSON,
|
|
35
|
+
} from '../models/PostQuestionTags';
|
|
36
|
+
import {
|
|
37
|
+
type PostQuestionTagsResponse,
|
|
38
|
+
PostQuestionTagsResponseFromJSON,
|
|
39
|
+
PostQuestionTagsResponseToJSON,
|
|
40
|
+
} from '../models/PostQuestionTagsResponse';
|
|
31
41
|
import {
|
|
32
42
|
type PutQuestion,
|
|
33
43
|
PutQuestionFromJSON,
|
|
@@ -58,6 +68,10 @@ export interface PostQuestionRequest {
|
|
|
58
68
|
postQuestion: PostQuestion;
|
|
59
69
|
}
|
|
60
70
|
|
|
71
|
+
export interface PostQuestionTagsRequest {
|
|
72
|
+
postQuestionTags: PostQuestionTags;
|
|
73
|
+
}
|
|
74
|
+
|
|
61
75
|
export interface PutQuestionRequest {
|
|
62
76
|
questionId: string;
|
|
63
77
|
putQuestion: PutQuestion;
|
|
@@ -306,6 +320,55 @@ export class QuestionApi extends runtime.BaseAPI {
|
|
|
306
320
|
return await response.value();
|
|
307
321
|
}
|
|
308
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Creates request options for postQuestionTags without sending the request
|
|
325
|
+
*/
|
|
326
|
+
async postQuestionTagsRequestOpts(requestParameters: PostQuestionTagsRequest): Promise<runtime.RequestOpts> {
|
|
327
|
+
if (requestParameters['postQuestionTags'] == null) {
|
|
328
|
+
throw new runtime.RequiredError(
|
|
329
|
+
'postQuestionTags',
|
|
330
|
+
'Required parameter "postQuestionTags" was null or undefined when calling postQuestionTags().'
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const queryParameters: any = {};
|
|
335
|
+
|
|
336
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
337
|
+
|
|
338
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
let urlPath = `/questions/tags`;
|
|
342
|
+
|
|
343
|
+
return {
|
|
344
|
+
path: urlPath,
|
|
345
|
+
method: 'POST',
|
|
346
|
+
headers: headerParameters,
|
|
347
|
+
query: queryParameters,
|
|
348
|
+
body: PostQuestionTagsToJSON(requestParameters['postQuestionTags']),
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Adds the given tags to every listed question, keeping existing tags. Tags are metadata, so no new question versions are created.
|
|
354
|
+
* Add tags to several questions
|
|
355
|
+
*/
|
|
356
|
+
async postQuestionTagsRaw(requestParameters: PostQuestionTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostQuestionTagsResponse>> {
|
|
357
|
+
const requestOptions = await this.postQuestionTagsRequestOpts(requestParameters);
|
|
358
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
359
|
+
|
|
360
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostQuestionTagsResponseFromJSON(jsonValue));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Adds the given tags to every listed question, keeping existing tags. Tags are metadata, so no new question versions are created.
|
|
365
|
+
* Add tags to several questions
|
|
366
|
+
*/
|
|
367
|
+
async postQuestionTags(requestParameters: PostQuestionTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostQuestionTagsResponse> {
|
|
368
|
+
const response = await this.postQuestionTagsRaw(requestParameters, initOverrides);
|
|
369
|
+
return await response.value();
|
|
370
|
+
}
|
|
371
|
+
|
|
309
372
|
/**
|
|
310
373
|
* Creates request options for putQuestion without sending the request
|
|
311
374
|
*/
|
|
@@ -61,6 +61,12 @@ export interface GetCourseEnrollmentListItem {
|
|
|
61
61
|
* @memberof GetCourseEnrollmentListItem
|
|
62
62
|
*/
|
|
63
63
|
lastName: string;
|
|
64
|
+
/**
|
|
65
|
+
* Contact email of the enrolled user. Only populated for Instructor enrollments so learners can contact course instructors; null for Student enrollments.
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof GetCourseEnrollmentListItem
|
|
68
|
+
*/
|
|
69
|
+
email?: string | null;
|
|
64
70
|
/**
|
|
65
71
|
* Start date of the enrollment (Unix timestamp)
|
|
66
72
|
* @type {number}
|
|
@@ -185,6 +191,7 @@ export function GetCourseEnrollmentListItemFromJSONTyped(json: any, ignoreDiscri
|
|
|
185
191
|
'courseVersionNumber': json['course_version_number'],
|
|
186
192
|
'firstName': json['first_name'],
|
|
187
193
|
'lastName': json['last_name'],
|
|
194
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
188
195
|
'enrollmentDateStart': json['enrollment_date_start'],
|
|
189
196
|
'enrollmentDateEnd': json['enrollment_date_end'],
|
|
190
197
|
'status': json['status'],
|
|
@@ -213,6 +220,7 @@ export function GetCourseEnrollmentListItemToJSONTyped(value?: GetCourseEnrollme
|
|
|
213
220
|
'course_version_number': value['courseVersionNumber'],
|
|
214
221
|
'first_name': value['firstName'],
|
|
215
222
|
'last_name': value['lastName'],
|
|
223
|
+
'email': value['email'],
|
|
216
224
|
'enrollment_date_start': value['enrollmentDateStart'],
|
|
217
225
|
'enrollment_date_end': value['enrollmentDateEnd'],
|
|
218
226
|
'status': value['status'],
|
|
@@ -33,6 +33,12 @@ export interface GetResourceUsageCoursesInner {
|
|
|
33
33
|
* @memberof GetResourceUsageCoursesInner
|
|
34
34
|
*/
|
|
35
35
|
courseId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Display name of the course
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetResourceUsageCoursesInner
|
|
40
|
+
*/
|
|
41
|
+
courseName: string;
|
|
36
42
|
/**
|
|
37
43
|
*
|
|
38
44
|
* @type {string}
|
|
@@ -72,6 +78,7 @@ export interface GetResourceUsageCoursesInner {
|
|
|
72
78
|
*/
|
|
73
79
|
export function instanceOfGetResourceUsageCoursesInner(value: object): value is GetResourceUsageCoursesInner {
|
|
74
80
|
if (!('courseId' in value) || value['courseId'] === undefined) return false;
|
|
81
|
+
if (!('courseName' in value) || value['courseName'] === undefined) return false;
|
|
75
82
|
if (!('courseVersionId' in value) || value['courseVersionId'] === undefined) return false;
|
|
76
83
|
if (!('courseVersionNumber' in value) || value['courseVersionNumber'] === undefined) return false;
|
|
77
84
|
if (!('courseStatus' in value) || value['courseStatus'] === undefined) return false;
|
|
@@ -91,6 +98,7 @@ export function GetResourceUsageCoursesInnerFromJSONTyped(json: any, ignoreDiscr
|
|
|
91
98
|
return {
|
|
92
99
|
|
|
93
100
|
'courseId': json['course_id'],
|
|
101
|
+
'courseName': json['course_name'],
|
|
94
102
|
'courseVersionId': json['course_version_id'],
|
|
95
103
|
'courseVersionNumber': json['course_version_number'],
|
|
96
104
|
'courseStatus': ContentLibraryVersionStatusFromJSON(json['course_status']),
|
|
@@ -111,6 +119,7 @@ export function GetResourceUsageCoursesInnerToJSONTyped(value?: GetResourceUsage
|
|
|
111
119
|
return {
|
|
112
120
|
|
|
113
121
|
'course_id': value['courseId'],
|
|
122
|
+
'course_name': value['courseName'],
|
|
114
123
|
'course_version_id': value['courseVersionId'],
|
|
115
124
|
'course_version_number': value['courseVersionNumber'],
|
|
116
125
|
'course_status': ContentLibraryVersionStatusToJSON(value['courseStatus']),
|