@easyedu/js-lsm-api 1.7.0 → 1.8.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 +2 -0
- package/README.md +2 -2
- package/dist/apis/PortalApi.d.ts +24 -1
- package/dist/apis/PortalApi.js +46 -1
- package/dist/esm/apis/PortalApi.d.ts +24 -1
- package/dist/esm/apis/PortalApi.js +46 -1
- package/dist/esm/models/GetPortalUser.d.ts +71 -0
- package/dist/esm/models/GetPortalUser.js +71 -0
- package/dist/esm/models/GetPortalUserList.d.ts +57 -0
- package/dist/esm/models/GetPortalUserList.js +60 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/GetPortalUser.d.ts +71 -0
- package/dist/models/GetPortalUser.js +79 -0
- package/dist/models/GetPortalUserList.d.ts +57 -0
- package/dist/models/GetPortalUserList.js +67 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +65 -0
- package/src/models/GetPortalUser.ts +123 -0
- package/src/models/GetPortalUserList.ts +110 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -31,6 +31,8 @@ src/models/GetModule.ts
|
|
|
31
31
|
src/models/GetModuleList.ts
|
|
32
32
|
src/models/GetPortal.ts
|
|
33
33
|
src/models/GetPortalList.ts
|
|
34
|
+
src/models/GetPortalUser.ts
|
|
35
|
+
src/models/GetPortalUserList.ts
|
|
34
36
|
src/models/GetQuestion.ts
|
|
35
37
|
src/models/GetQuestionAnswerChoicesInner.ts
|
|
36
38
|
src/models/GetQuestionList.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @easyedu/js-lsm-api@1.
|
|
1
|
+
## @easyedu/js-lsm-api@1.8.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @easyedu/js-lsm-api@1.
|
|
39
|
+
npm install @easyedu/js-lsm-api@1.8.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/PortalApi.d.ts
CHANGED
|
@@ -10,10 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
13
|
+
import type { GetPortal, GetPortalList, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
14
14
|
export interface GetPortalByIdRequest {
|
|
15
15
|
portalId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface GetPortalUsersRequest {
|
|
18
|
+
portalId: string;
|
|
19
|
+
roles?: Array<GetPortalUsersRolesEnum>;
|
|
20
|
+
page?: number;
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
}
|
|
17
23
|
export interface InviteUserToPortalRequest {
|
|
18
24
|
portalId: string;
|
|
19
25
|
postPortalInvite: PostPortalInvite;
|
|
@@ -49,6 +55,14 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
49
55
|
* Get all portals a user has access to
|
|
50
56
|
*/
|
|
51
57
|
getPortalList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalList>;
|
|
58
|
+
/**
|
|
59
|
+
* Get all users for a portal with optional role filtering
|
|
60
|
+
*/
|
|
61
|
+
getPortalUsersRaw(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalUserList>>;
|
|
62
|
+
/**
|
|
63
|
+
* Get all users for a portal with optional role filtering
|
|
64
|
+
*/
|
|
65
|
+
getPortalUsers(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalUserList>;
|
|
52
66
|
/**
|
|
53
67
|
* Invite a new user to a portal
|
|
54
68
|
*/
|
|
@@ -82,3 +96,12 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
82
96
|
*/
|
|
83
97
|
updateSelectedPortal(requestParameters: UpdateSelectedPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
84
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export declare const GetPortalUsersRolesEnum: {
|
|
103
|
+
readonly Admin: "Admin";
|
|
104
|
+
readonly Instructor: "Instructor";
|
|
105
|
+
readonly Learner: "Learner";
|
|
106
|
+
};
|
|
107
|
+
export type GetPortalUsersRolesEnum = typeof GetPortalUsersRolesEnum[keyof typeof GetPortalUsersRolesEnum];
|
package/dist/apis/PortalApi.js
CHANGED
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.PortalApi = void 0;
|
|
25
|
+
exports.GetPortalUsersRolesEnum = exports.PortalApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -82,6 +82,43 @@ class PortalApi extends runtime.BaseAPI {
|
|
|
82
82
|
return yield response.value();
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Get all users for a portal with optional role filtering
|
|
87
|
+
*/
|
|
88
|
+
getPortalUsersRaw(requestParameters, initOverrides) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
if (requestParameters['portalId'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling getPortalUsers().');
|
|
92
|
+
}
|
|
93
|
+
const queryParameters = {};
|
|
94
|
+
if (requestParameters['roles'] != null) {
|
|
95
|
+
queryParameters['roles'] = requestParameters['roles'];
|
|
96
|
+
}
|
|
97
|
+
if (requestParameters['page'] != null) {
|
|
98
|
+
queryParameters['page'] = requestParameters['page'];
|
|
99
|
+
}
|
|
100
|
+
if (requestParameters['pageSize'] != null) {
|
|
101
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
102
|
+
}
|
|
103
|
+
const headerParameters = {};
|
|
104
|
+
const response = yield this.request({
|
|
105
|
+
path: `/portals/{portalId}/users`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
106
|
+
method: 'GET',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPortalUserListFromJSON)(jsonValue));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get all users for a portal with optional role filtering
|
|
115
|
+
*/
|
|
116
|
+
getPortalUsers(requestParameters, initOverrides) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const response = yield this.getPortalUsersRaw(requestParameters, initOverrides);
|
|
119
|
+
return yield response.value();
|
|
120
|
+
});
|
|
121
|
+
}
|
|
85
122
|
/**
|
|
86
123
|
* Invite a new user to a portal
|
|
87
124
|
*/
|
|
@@ -209,3 +246,11 @@ class PortalApi extends runtime.BaseAPI {
|
|
|
209
246
|
}
|
|
210
247
|
}
|
|
211
248
|
exports.PortalApi = PortalApi;
|
|
249
|
+
/**
|
|
250
|
+
* @export
|
|
251
|
+
*/
|
|
252
|
+
exports.GetPortalUsersRolesEnum = {
|
|
253
|
+
Admin: 'Admin',
|
|
254
|
+
Instructor: 'Instructor',
|
|
255
|
+
Learner: 'Learner'
|
|
256
|
+
};
|
|
@@ -10,10 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
13
|
+
import type { GetPortal, GetPortalList, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
14
14
|
export interface GetPortalByIdRequest {
|
|
15
15
|
portalId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface GetPortalUsersRequest {
|
|
18
|
+
portalId: string;
|
|
19
|
+
roles?: Array<GetPortalUsersRolesEnum>;
|
|
20
|
+
page?: number;
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
}
|
|
17
23
|
export interface InviteUserToPortalRequest {
|
|
18
24
|
portalId: string;
|
|
19
25
|
postPortalInvite: PostPortalInvite;
|
|
@@ -49,6 +55,14 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
49
55
|
* Get all portals a user has access to
|
|
50
56
|
*/
|
|
51
57
|
getPortalList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalList>;
|
|
58
|
+
/**
|
|
59
|
+
* Get all users for a portal with optional role filtering
|
|
60
|
+
*/
|
|
61
|
+
getPortalUsersRaw(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalUserList>>;
|
|
62
|
+
/**
|
|
63
|
+
* Get all users for a portal with optional role filtering
|
|
64
|
+
*/
|
|
65
|
+
getPortalUsers(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalUserList>;
|
|
52
66
|
/**
|
|
53
67
|
* Invite a new user to a portal
|
|
54
68
|
*/
|
|
@@ -82,3 +96,12 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
82
96
|
*/
|
|
83
97
|
updateSelectedPortal(requestParameters: UpdateSelectedPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
84
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export declare const GetPortalUsersRolesEnum: {
|
|
103
|
+
readonly Admin: "Admin";
|
|
104
|
+
readonly Instructor: "Instructor";
|
|
105
|
+
readonly Learner: "Learner";
|
|
106
|
+
};
|
|
107
|
+
export type GetPortalUsersRolesEnum = typeof GetPortalUsersRolesEnum[keyof typeof GetPortalUsersRolesEnum];
|
|
@@ -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 { GetPortalFromJSON, GetPortalListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
24
|
+
import { GetPortalFromJSON, GetPortalListFromJSON, GetPortalUserListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -79,6 +79,43 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
79
79
|
return yield response.value();
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Get all users for a portal with optional role filtering
|
|
84
|
+
*/
|
|
85
|
+
getPortalUsersRaw(requestParameters, initOverrides) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
if (requestParameters['portalId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling getPortalUsers().');
|
|
89
|
+
}
|
|
90
|
+
const queryParameters = {};
|
|
91
|
+
if (requestParameters['roles'] != null) {
|
|
92
|
+
queryParameters['roles'] = requestParameters['roles'];
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['page'] != null) {
|
|
95
|
+
queryParameters['page'] = requestParameters['page'];
|
|
96
|
+
}
|
|
97
|
+
if (requestParameters['pageSize'] != null) {
|
|
98
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
99
|
+
}
|
|
100
|
+
const headerParameters = {};
|
|
101
|
+
const response = yield this.request({
|
|
102
|
+
path: `/portals/{portalId}/users`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
103
|
+
method: 'GET',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides);
|
|
107
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalUserListFromJSON(jsonValue));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get all users for a portal with optional role filtering
|
|
112
|
+
*/
|
|
113
|
+
getPortalUsers(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const response = yield this.getPortalUsersRaw(requestParameters, initOverrides);
|
|
116
|
+
return yield response.value();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
82
119
|
/**
|
|
83
120
|
* Invite a new user to a portal
|
|
84
121
|
*/
|
|
@@ -205,3 +242,11 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
205
242
|
});
|
|
206
243
|
}
|
|
207
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* @export
|
|
247
|
+
*/
|
|
248
|
+
export const GetPortalUsersRolesEnum = {
|
|
249
|
+
Admin: 'Admin',
|
|
250
|
+
Instructor: 'Instructor',
|
|
251
|
+
Learner: 'Learner'
|
|
252
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* A user with their portal access information
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetPortalUser
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPortalUser {
|
|
18
|
+
/**
|
|
19
|
+
* The unique identifier for the user
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetPortalUser
|
|
22
|
+
*/
|
|
23
|
+
userId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The user's email address
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GetPortalUser
|
|
28
|
+
*/
|
|
29
|
+
email: string;
|
|
30
|
+
/**
|
|
31
|
+
* The user's first name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetPortalUser
|
|
34
|
+
*/
|
|
35
|
+
firstName: string;
|
|
36
|
+
/**
|
|
37
|
+
* The user's last name
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetPortalUser
|
|
40
|
+
*/
|
|
41
|
+
lastName: string;
|
|
42
|
+
/**
|
|
43
|
+
* The user's role in the portal
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof GetPortalUser
|
|
46
|
+
*/
|
|
47
|
+
role: GetPortalUserRoleEnum;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the user's portal access is active
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof GetPortalUser
|
|
52
|
+
*/
|
|
53
|
+
isActive: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const GetPortalUserRoleEnum: {
|
|
59
|
+
readonly Admin: "Admin";
|
|
60
|
+
readonly Instructor: "Instructor";
|
|
61
|
+
readonly Learner: "Learner";
|
|
62
|
+
};
|
|
63
|
+
export type GetPortalUserRoleEnum = typeof GetPortalUserRoleEnum[keyof typeof GetPortalUserRoleEnum];
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the GetPortalUser interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfGetPortalUser(value: object): value is GetPortalUser;
|
|
68
|
+
export declare function GetPortalUserFromJSON(json: any): GetPortalUser;
|
|
69
|
+
export declare function GetPortalUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUser;
|
|
70
|
+
export declare function GetPortalUserToJSON(json: any): GetPortalUser;
|
|
71
|
+
export declare function GetPortalUserToJSONTyped(value?: GetPortalUser | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const GetPortalUserRoleEnum = {
|
|
18
|
+
Admin: 'Admin',
|
|
19
|
+
Instructor: 'Instructor',
|
|
20
|
+
Learner: 'Learner'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GetPortalUser interface.
|
|
24
|
+
*/
|
|
25
|
+
export function instanceOfGetPortalUser(value) {
|
|
26
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('email' in value) || value['email'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('firstName' in value) || value['firstName'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('lastName' in value) || value['lastName'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('role' in value) || value['role'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('isActive' in value) || value['isActive'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
export function GetPortalUserFromJSON(json) {
|
|
41
|
+
return GetPortalUserFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function GetPortalUserFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'userId': json['user_id'],
|
|
49
|
+
'email': json['email'],
|
|
50
|
+
'firstName': json['first_name'],
|
|
51
|
+
'lastName': json['last_name'],
|
|
52
|
+
'role': json['role'],
|
|
53
|
+
'isActive': json['is_active'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function GetPortalUserToJSON(json) {
|
|
57
|
+
return GetPortalUserToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
export function GetPortalUserToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'user_id': value['userId'],
|
|
65
|
+
'email': value['email'],
|
|
66
|
+
'first_name': value['firstName'],
|
|
67
|
+
'last_name': value['lastName'],
|
|
68
|
+
'role': value['role'],
|
|
69
|
+
'is_active': value['isActive'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
import type { GetPortalUser } from './GetPortalUser';
|
|
13
|
+
/**
|
|
14
|
+
* A list of portal users with pagination information
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetPortalUserList
|
|
17
|
+
*/
|
|
18
|
+
export interface GetPortalUserList {
|
|
19
|
+
/**
|
|
20
|
+
* The current page number
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GetPortalUserList
|
|
23
|
+
*/
|
|
24
|
+
page: number;
|
|
25
|
+
/**
|
|
26
|
+
* The number of items per page
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GetPortalUserList
|
|
29
|
+
*/
|
|
30
|
+
pageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* The total number of pages
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GetPortalUserList
|
|
35
|
+
*/
|
|
36
|
+
totalPages: number;
|
|
37
|
+
/**
|
|
38
|
+
* The total number of items
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GetPortalUserList
|
|
41
|
+
*/
|
|
42
|
+
totalItems: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<GetPortalUser>}
|
|
46
|
+
* @memberof GetPortalUserList
|
|
47
|
+
*/
|
|
48
|
+
items: Array<GetPortalUser>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GetPortalUserList interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfGetPortalUserList(value: object): value is GetPortalUserList;
|
|
54
|
+
export declare function GetPortalUserListFromJSON(json: any): GetPortalUserList;
|
|
55
|
+
export declare function GetPortalUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUserList;
|
|
56
|
+
export declare function GetPortalUserListToJSON(json: any): GetPortalUserList;
|
|
57
|
+
export declare function GetPortalUserListToJSONTyped(value?: GetPortalUserList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
import { GetPortalUserFromJSON, GetPortalUserToJSON, } from './GetPortalUser';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the GetPortalUserList interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfGetPortalUserList(value) {
|
|
19
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function GetPortalUserListFromJSON(json) {
|
|
32
|
+
return GetPortalUserListFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function GetPortalUserListFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'page': json['page'],
|
|
40
|
+
'pageSize': json['page_size'],
|
|
41
|
+
'totalPages': json['total_pages'],
|
|
42
|
+
'totalItems': json['total_items'],
|
|
43
|
+
'items': (json['items'].map(GetPortalUserFromJSON)),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function GetPortalUserListToJSON(json) {
|
|
47
|
+
return GetPortalUserListToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function GetPortalUserListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'page': value['page'],
|
|
55
|
+
'page_size': value['pageSize'],
|
|
56
|
+
'total_pages': value['totalPages'],
|
|
57
|
+
'total_items': value['totalItems'],
|
|
58
|
+
'items': (value['items'].map(GetPortalUserToJSON)),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -16,6 +16,8 @@ export * from './GetModule';
|
|
|
16
16
|
export * from './GetModuleList';
|
|
17
17
|
export * from './GetPortal';
|
|
18
18
|
export * from './GetPortalList';
|
|
19
|
+
export * from './GetPortalUser';
|
|
20
|
+
export * from './GetPortalUserList';
|
|
19
21
|
export * from './GetQuestion';
|
|
20
22
|
export * from './GetQuestionAnswerChoicesInner';
|
|
21
23
|
export * from './GetQuestionList';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -18,6 +18,8 @@ export * from './GetModule';
|
|
|
18
18
|
export * from './GetModuleList';
|
|
19
19
|
export * from './GetPortal';
|
|
20
20
|
export * from './GetPortalList';
|
|
21
|
+
export * from './GetPortalUser';
|
|
22
|
+
export * from './GetPortalUserList';
|
|
21
23
|
export * from './GetQuestion';
|
|
22
24
|
export * from './GetQuestionAnswerChoicesInner';
|
|
23
25
|
export * from './GetQuestionList';
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* A user with their portal access information
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetPortalUser
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPortalUser {
|
|
18
|
+
/**
|
|
19
|
+
* The unique identifier for the user
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetPortalUser
|
|
22
|
+
*/
|
|
23
|
+
userId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The user's email address
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GetPortalUser
|
|
28
|
+
*/
|
|
29
|
+
email: string;
|
|
30
|
+
/**
|
|
31
|
+
* The user's first name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetPortalUser
|
|
34
|
+
*/
|
|
35
|
+
firstName: string;
|
|
36
|
+
/**
|
|
37
|
+
* The user's last name
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetPortalUser
|
|
40
|
+
*/
|
|
41
|
+
lastName: string;
|
|
42
|
+
/**
|
|
43
|
+
* The user's role in the portal
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof GetPortalUser
|
|
46
|
+
*/
|
|
47
|
+
role: GetPortalUserRoleEnum;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the user's portal access is active
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof GetPortalUser
|
|
52
|
+
*/
|
|
53
|
+
isActive: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const GetPortalUserRoleEnum: {
|
|
59
|
+
readonly Admin: "Admin";
|
|
60
|
+
readonly Instructor: "Instructor";
|
|
61
|
+
readonly Learner: "Learner";
|
|
62
|
+
};
|
|
63
|
+
export type GetPortalUserRoleEnum = typeof GetPortalUserRoleEnum[keyof typeof GetPortalUserRoleEnum];
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the GetPortalUser interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfGetPortalUser(value: object): value is GetPortalUser;
|
|
68
|
+
export declare function GetPortalUserFromJSON(json: any): GetPortalUser;
|
|
69
|
+
export declare function GetPortalUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUser;
|
|
70
|
+
export declare function GetPortalUserToJSON(json: any): GetPortalUser;
|
|
71
|
+
export declare function GetPortalUserToJSONTyped(value?: GetPortalUser | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,79 @@
|
|
|
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.GetPortalUserRoleEnum = void 0;
|
|
17
|
+
exports.instanceOfGetPortalUser = instanceOfGetPortalUser;
|
|
18
|
+
exports.GetPortalUserFromJSON = GetPortalUserFromJSON;
|
|
19
|
+
exports.GetPortalUserFromJSONTyped = GetPortalUserFromJSONTyped;
|
|
20
|
+
exports.GetPortalUserToJSON = GetPortalUserToJSON;
|
|
21
|
+
exports.GetPortalUserToJSONTyped = GetPortalUserToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.GetPortalUserRoleEnum = {
|
|
26
|
+
Admin: 'Admin',
|
|
27
|
+
Instructor: 'Instructor',
|
|
28
|
+
Learner: 'Learner'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the GetPortalUser interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfGetPortalUser(value) {
|
|
34
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('email' in value) || value['email'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('firstName' in value) || value['firstName'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('lastName' in value) || value['lastName'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('role' in value) || value['role'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('isActive' in value) || value['isActive'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
function GetPortalUserFromJSON(json) {
|
|
49
|
+
return GetPortalUserFromJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function GetPortalUserFromJSONTyped(json, ignoreDiscriminator) {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'userId': json['user_id'],
|
|
57
|
+
'email': json['email'],
|
|
58
|
+
'firstName': json['first_name'],
|
|
59
|
+
'lastName': json['last_name'],
|
|
60
|
+
'role': json['role'],
|
|
61
|
+
'isActive': json['is_active'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function GetPortalUserToJSON(json) {
|
|
65
|
+
return GetPortalUserToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
function GetPortalUserToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'user_id': value['userId'],
|
|
73
|
+
'email': value['email'],
|
|
74
|
+
'first_name': value['firstName'],
|
|
75
|
+
'last_name': value['lastName'],
|
|
76
|
+
'role': value['role'],
|
|
77
|
+
'is_active': value['isActive'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
import type { GetPortalUser } from './GetPortalUser';
|
|
13
|
+
/**
|
|
14
|
+
* A list of portal users with pagination information
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetPortalUserList
|
|
17
|
+
*/
|
|
18
|
+
export interface GetPortalUserList {
|
|
19
|
+
/**
|
|
20
|
+
* The current page number
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GetPortalUserList
|
|
23
|
+
*/
|
|
24
|
+
page: number;
|
|
25
|
+
/**
|
|
26
|
+
* The number of items per page
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GetPortalUserList
|
|
29
|
+
*/
|
|
30
|
+
pageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* The total number of pages
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GetPortalUserList
|
|
35
|
+
*/
|
|
36
|
+
totalPages: number;
|
|
37
|
+
/**
|
|
38
|
+
* The total number of items
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GetPortalUserList
|
|
41
|
+
*/
|
|
42
|
+
totalItems: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<GetPortalUser>}
|
|
46
|
+
* @memberof GetPortalUserList
|
|
47
|
+
*/
|
|
48
|
+
items: Array<GetPortalUser>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GetPortalUserList interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfGetPortalUserList(value: object): value is GetPortalUserList;
|
|
54
|
+
export declare function GetPortalUserListFromJSON(json: any): GetPortalUserList;
|
|
55
|
+
export declare function GetPortalUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUserList;
|
|
56
|
+
export declare function GetPortalUserListToJSON(json: any): GetPortalUserList;
|
|
57
|
+
export declare function GetPortalUserListToJSONTyped(value?: GetPortalUserList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
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.instanceOfGetPortalUserList = instanceOfGetPortalUserList;
|
|
17
|
+
exports.GetPortalUserListFromJSON = GetPortalUserListFromJSON;
|
|
18
|
+
exports.GetPortalUserListFromJSONTyped = GetPortalUserListFromJSONTyped;
|
|
19
|
+
exports.GetPortalUserListToJSON = GetPortalUserListToJSON;
|
|
20
|
+
exports.GetPortalUserListToJSONTyped = GetPortalUserListToJSONTyped;
|
|
21
|
+
const GetPortalUser_1 = require("./GetPortalUser");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GetPortalUserList interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfGetPortalUserList(value) {
|
|
26
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function GetPortalUserListFromJSON(json) {
|
|
39
|
+
return GetPortalUserListFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function GetPortalUserListFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'page': json['page'],
|
|
47
|
+
'pageSize': json['page_size'],
|
|
48
|
+
'totalPages': json['total_pages'],
|
|
49
|
+
'totalItems': json['total_items'],
|
|
50
|
+
'items': (json['items'].map(GetPortalUser_1.GetPortalUserFromJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function GetPortalUserListToJSON(json) {
|
|
54
|
+
return GetPortalUserListToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function GetPortalUserListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'page': value['page'],
|
|
62
|
+
'page_size': value['pageSize'],
|
|
63
|
+
'total_pages': value['totalPages'],
|
|
64
|
+
'total_items': value['totalItems'],
|
|
65
|
+
'items': (value['items'].map(GetPortalUser_1.GetPortalUserToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export * from './GetModule';
|
|
|
16
16
|
export * from './GetModuleList';
|
|
17
17
|
export * from './GetPortal';
|
|
18
18
|
export * from './GetPortalList';
|
|
19
|
+
export * from './GetPortalUser';
|
|
20
|
+
export * from './GetPortalUserList';
|
|
19
21
|
export * from './GetQuestion';
|
|
20
22
|
export * from './GetQuestionAnswerChoicesInner';
|
|
21
23
|
export * from './GetQuestionList';
|
package/dist/models/index.js
CHANGED
|
@@ -34,6 +34,8 @@ __exportStar(require("./GetModule"), exports);
|
|
|
34
34
|
__exportStar(require("./GetModuleList"), exports);
|
|
35
35
|
__exportStar(require("./GetPortal"), exports);
|
|
36
36
|
__exportStar(require("./GetPortalList"), exports);
|
|
37
|
+
__exportStar(require("./GetPortalUser"), exports);
|
|
38
|
+
__exportStar(require("./GetPortalUserList"), exports);
|
|
37
39
|
__exportStar(require("./GetQuestion"), exports);
|
|
38
40
|
__exportStar(require("./GetQuestionAnswerChoicesInner"), exports);
|
|
39
41
|
__exportStar(require("./GetQuestionList"), exports);
|
package/package.json
CHANGED
package/src/apis/PortalApi.ts
CHANGED
|
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
GetPortal,
|
|
19
19
|
GetPortalList,
|
|
20
|
+
GetPortalUserList,
|
|
20
21
|
PostPortal,
|
|
21
22
|
PostPortalInvite,
|
|
22
23
|
PutPortalBranding,
|
|
@@ -26,6 +27,8 @@ import {
|
|
|
26
27
|
GetPortalToJSON,
|
|
27
28
|
GetPortalListFromJSON,
|
|
28
29
|
GetPortalListToJSON,
|
|
30
|
+
GetPortalUserListFromJSON,
|
|
31
|
+
GetPortalUserListToJSON,
|
|
29
32
|
PostPortalFromJSON,
|
|
30
33
|
PostPortalToJSON,
|
|
31
34
|
PostPortalInviteFromJSON,
|
|
@@ -38,6 +41,13 @@ export interface GetPortalByIdRequest {
|
|
|
38
41
|
portalId: string;
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
export interface GetPortalUsersRequest {
|
|
45
|
+
portalId: string;
|
|
46
|
+
roles?: Array<GetPortalUsersRolesEnum>;
|
|
47
|
+
page?: number;
|
|
48
|
+
pageSize?: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
export interface InviteUserToPortalRequest {
|
|
42
52
|
portalId: string;
|
|
43
53
|
postPortalInvite: PostPortalInvite;
|
|
@@ -121,6 +131,51 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
121
131
|
return await response.value();
|
|
122
132
|
}
|
|
123
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Get all users for a portal with optional role filtering
|
|
136
|
+
*/
|
|
137
|
+
async getPortalUsersRaw(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalUserList>> {
|
|
138
|
+
if (requestParameters['portalId'] == null) {
|
|
139
|
+
throw new runtime.RequiredError(
|
|
140
|
+
'portalId',
|
|
141
|
+
'Required parameter "portalId" was null or undefined when calling getPortalUsers().'
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const queryParameters: any = {};
|
|
146
|
+
|
|
147
|
+
if (requestParameters['roles'] != null) {
|
|
148
|
+
queryParameters['roles'] = requestParameters['roles'];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (requestParameters['page'] != null) {
|
|
152
|
+
queryParameters['page'] = requestParameters['page'];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (requestParameters['pageSize'] != null) {
|
|
156
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
160
|
+
|
|
161
|
+
const response = await this.request({
|
|
162
|
+
path: `/portals/{portalId}/users`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
163
|
+
method: 'GET',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalUserListFromJSON(jsonValue));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Get all users for a portal with optional role filtering
|
|
173
|
+
*/
|
|
174
|
+
async getPortalUsers(requestParameters: GetPortalUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalUserList> {
|
|
175
|
+
const response = await this.getPortalUsersRaw(requestParameters, initOverrides);
|
|
176
|
+
return await response.value();
|
|
177
|
+
}
|
|
178
|
+
|
|
124
179
|
/**
|
|
125
180
|
* Invite a new user to a portal
|
|
126
181
|
*/
|
|
@@ -279,3 +334,13 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
279
334
|
}
|
|
280
335
|
|
|
281
336
|
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @export
|
|
340
|
+
*/
|
|
341
|
+
export const GetPortalUsersRolesEnum = {
|
|
342
|
+
Admin: 'Admin',
|
|
343
|
+
Instructor: 'Instructor',
|
|
344
|
+
Learner: 'Learner'
|
|
345
|
+
} as const;
|
|
346
|
+
export type GetPortalUsersRolesEnum = typeof GetPortalUsersRolesEnum[keyof typeof GetPortalUsersRolesEnum];
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
* A user with their portal access information
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetPortalUser
|
|
20
|
+
*/
|
|
21
|
+
export interface GetPortalUser {
|
|
22
|
+
/**
|
|
23
|
+
* The unique identifier for the user
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetPortalUser
|
|
26
|
+
*/
|
|
27
|
+
userId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The user's email address
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetPortalUser
|
|
32
|
+
*/
|
|
33
|
+
email: string;
|
|
34
|
+
/**
|
|
35
|
+
* The user's first name
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetPortalUser
|
|
38
|
+
*/
|
|
39
|
+
firstName: string;
|
|
40
|
+
/**
|
|
41
|
+
* The user's last name
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GetPortalUser
|
|
44
|
+
*/
|
|
45
|
+
lastName: string;
|
|
46
|
+
/**
|
|
47
|
+
* The user's role in the portal
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetPortalUser
|
|
50
|
+
*/
|
|
51
|
+
role: GetPortalUserRoleEnum;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the user's portal access is active
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof GetPortalUser
|
|
56
|
+
*/
|
|
57
|
+
isActive: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const GetPortalUserRoleEnum = {
|
|
65
|
+
Admin: 'Admin',
|
|
66
|
+
Instructor: 'Instructor',
|
|
67
|
+
Learner: 'Learner'
|
|
68
|
+
} as const;
|
|
69
|
+
export type GetPortalUserRoleEnum = typeof GetPortalUserRoleEnum[keyof typeof GetPortalUserRoleEnum];
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the GetPortalUser interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfGetPortalUser(value: object): value is GetPortalUser {
|
|
76
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
77
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
78
|
+
if (!('firstName' in value) || value['firstName'] === undefined) return false;
|
|
79
|
+
if (!('lastName' in value) || value['lastName'] === undefined) return false;
|
|
80
|
+
if (!('role' in value) || value['role'] === undefined) return false;
|
|
81
|
+
if (!('isActive' in value) || value['isActive'] === undefined) return false;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function GetPortalUserFromJSON(json: any): GetPortalUser {
|
|
86
|
+
return GetPortalUserFromJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function GetPortalUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUser {
|
|
90
|
+
if (json == null) {
|
|
91
|
+
return json;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'userId': json['user_id'],
|
|
96
|
+
'email': json['email'],
|
|
97
|
+
'firstName': json['first_name'],
|
|
98
|
+
'lastName': json['last_name'],
|
|
99
|
+
'role': json['role'],
|
|
100
|
+
'isActive': json['is_active'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function GetPortalUserToJSON(json: any): GetPortalUser {
|
|
105
|
+
return GetPortalUserToJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function GetPortalUserToJSONTyped(value?: GetPortalUser | null, ignoreDiscriminator: boolean = false): any {
|
|
109
|
+
if (value == null) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'user_id': value['userId'],
|
|
116
|
+
'email': value['email'],
|
|
117
|
+
'first_name': value['firstName'],
|
|
118
|
+
'last_name': value['lastName'],
|
|
119
|
+
'role': value['role'],
|
|
120
|
+
'is_active': value['isActive'],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
import type { GetPortalUser } from './GetPortalUser';
|
|
17
|
+
import {
|
|
18
|
+
GetPortalUserFromJSON,
|
|
19
|
+
GetPortalUserFromJSONTyped,
|
|
20
|
+
GetPortalUserToJSON,
|
|
21
|
+
GetPortalUserToJSONTyped,
|
|
22
|
+
} from './GetPortalUser';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A list of portal users with pagination information
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetPortalUserList
|
|
28
|
+
*/
|
|
29
|
+
export interface GetPortalUserList {
|
|
30
|
+
/**
|
|
31
|
+
* The current page number
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GetPortalUserList
|
|
34
|
+
*/
|
|
35
|
+
page: number;
|
|
36
|
+
/**
|
|
37
|
+
* The number of items per page
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GetPortalUserList
|
|
40
|
+
*/
|
|
41
|
+
pageSize: number;
|
|
42
|
+
/**
|
|
43
|
+
* The total number of pages
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetPortalUserList
|
|
46
|
+
*/
|
|
47
|
+
totalPages: number;
|
|
48
|
+
/**
|
|
49
|
+
* The total number of items
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GetPortalUserList
|
|
52
|
+
*/
|
|
53
|
+
totalItems: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<GetPortalUser>}
|
|
57
|
+
* @memberof GetPortalUserList
|
|
58
|
+
*/
|
|
59
|
+
items: Array<GetPortalUser>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the GetPortalUserList interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfGetPortalUserList(value: object): value is GetPortalUserList {
|
|
66
|
+
if (!('page' in value) || value['page'] === undefined) return false;
|
|
67
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
|
|
68
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
|
69
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
|
|
70
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function GetPortalUserListFromJSON(json: any): GetPortalUserList {
|
|
75
|
+
return GetPortalUserListFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function GetPortalUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalUserList {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'page': json['page'],
|
|
85
|
+
'pageSize': json['page_size'],
|
|
86
|
+
'totalPages': json['total_pages'],
|
|
87
|
+
'totalItems': json['total_items'],
|
|
88
|
+
'items': ((json['items'] as Array<any>).map(GetPortalUserFromJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function GetPortalUserListToJSON(json: any): GetPortalUserList {
|
|
93
|
+
return GetPortalUserListToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function GetPortalUserListToJSONTyped(value?: GetPortalUserList | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'page': value['page'],
|
|
104
|
+
'page_size': value['pageSize'],
|
|
105
|
+
'total_pages': value['totalPages'],
|
|
106
|
+
'total_items': value['totalItems'],
|
|
107
|
+
'items': ((value['items'] as Array<any>).map(GetPortalUserToJSON)),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -18,6 +18,8 @@ export * from './GetModule';
|
|
|
18
18
|
export * from './GetModuleList';
|
|
19
19
|
export * from './GetPortal';
|
|
20
20
|
export * from './GetPortalList';
|
|
21
|
+
export * from './GetPortalUser';
|
|
22
|
+
export * from './GetPortalUserList';
|
|
21
23
|
export * from './GetQuestion';
|
|
22
24
|
export * from './GetQuestionAnswerChoicesInner';
|
|
23
25
|
export * from './GetQuestionList';
|