@easyedu/js-lsm-api 1.6.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 +4 -0
- package/README.md +2 -2
- package/dist/apis/PortalApi.d.ts +47 -1
- package/dist/apis/PortalApi.js +109 -1
- package/dist/esm/apis/PortalApi.d.ts +47 -1
- package/dist/esm/apis/PortalApi.js +109 -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/PostPortal.d.ts +44 -0
- package/dist/esm/models/PostPortal.js +47 -0
- package/dist/esm/models/PutPortalBranding.d.ts +44 -0
- package/dist/esm/models/PutPortalBranding.js +45 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -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/PostPortal.d.ts +44 -0
- package/dist/models/PostPortal.js +54 -0
- package/dist/models/PutPortalBranding.d.ts +44 -0
- package/dist/models/PutPortalBranding.js +52 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +159 -0
- package/src/models/GetPortalUser.ts +123 -0
- package/src/models/GetPortalUserList.ts +110 -0
- package/src/models/PostPortal.ts +82 -0
- package/src/models/PutPortalBranding.ts +81 -0
- package/src/models/index.ts +4 -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
|
|
@@ -103,6 +105,7 @@ src/models/PostCourse.ts
|
|
|
103
105
|
src/models/PostCourseEnrollment.ts
|
|
104
106
|
src/models/PostLogin.ts
|
|
105
107
|
src/models/PostModule.ts
|
|
108
|
+
src/models/PostPortal.ts
|
|
106
109
|
src/models/PostPortalInvite.ts
|
|
107
110
|
src/models/PostQuestion.ts
|
|
108
111
|
src/models/PostQuestionAnswerChoicesInner.ts
|
|
@@ -125,6 +128,7 @@ src/models/PostSendResetPassword.ts
|
|
|
125
128
|
src/models/PutContent.ts
|
|
126
129
|
src/models/PutCourse.ts
|
|
127
130
|
src/models/PutModule.ts
|
|
131
|
+
src/models/PutPortalBranding.ts
|
|
128
132
|
src/models/PutQuestion.ts
|
|
129
133
|
src/models/PutQuestionAnswerChoicesInner.ts
|
|
130
134
|
src/models/PutQuiz.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,14 +10,27 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, PostPortalInvite } 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;
|
|
20
26
|
}
|
|
27
|
+
export interface PostPortalRequest {
|
|
28
|
+
postPortal: PostPortal;
|
|
29
|
+
}
|
|
30
|
+
export interface PutPortalBrandingRequest {
|
|
31
|
+
portalId: string;
|
|
32
|
+
putPortalBranding: PutPortalBranding;
|
|
33
|
+
}
|
|
21
34
|
export interface UpdateSelectedPortalRequest {
|
|
22
35
|
portalId: string;
|
|
23
36
|
selectedUserRole?: string;
|
|
@@ -42,6 +55,14 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
42
55
|
* Get all portals a user has access to
|
|
43
56
|
*/
|
|
44
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>;
|
|
45
66
|
/**
|
|
46
67
|
* Invite a new user to a portal
|
|
47
68
|
*/
|
|
@@ -50,6 +71,22 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
50
71
|
* Invite a new user to a portal
|
|
51
72
|
*/
|
|
52
73
|
inviteUserToPortal(requestParameters: InviteUserToPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Create a new portal as a child of the current selected portal
|
|
76
|
+
*/
|
|
77
|
+
postPortalRaw(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>>;
|
|
78
|
+
/**
|
|
79
|
+
* Create a new portal as a child of the current selected portal
|
|
80
|
+
*/
|
|
81
|
+
postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
82
|
+
/**
|
|
83
|
+
* Update portal branding (name, background color, text color)
|
|
84
|
+
*/
|
|
85
|
+
putPortalBrandingRaw(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>>;
|
|
86
|
+
/**
|
|
87
|
+
* Update portal branding (name, background color, text color)
|
|
88
|
+
*/
|
|
89
|
+
putPortalBranding(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
53
90
|
/**
|
|
54
91
|
* Update the users current selected portal
|
|
55
92
|
*/
|
|
@@ -59,3 +96,12 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
59
96
|
*/
|
|
60
97
|
updateSelectedPortal(requestParameters: UpdateSelectedPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
61
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
|
*/
|
|
@@ -114,6 +151,69 @@ class PortalApi extends runtime.BaseAPI {
|
|
|
114
151
|
yield this.inviteUserToPortalRaw(requestParameters, initOverrides);
|
|
115
152
|
});
|
|
116
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Create a new portal as a child of the current selected portal
|
|
156
|
+
*/
|
|
157
|
+
postPortalRaw(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
if (requestParameters['postPortal'] == null) {
|
|
160
|
+
throw new runtime.RequiredError('postPortal', 'Required parameter "postPortal" was null or undefined when calling postPortal().');
|
|
161
|
+
}
|
|
162
|
+
const queryParameters = {};
|
|
163
|
+
const headerParameters = {};
|
|
164
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
165
|
+
const response = yield this.request({
|
|
166
|
+
path: `/portals`,
|
|
167
|
+
method: 'POST',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
body: (0, index_1.PostPortalToJSON)(requestParameters['postPortal']),
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPortalFromJSON)(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Create a new portal as a child of the current selected portal
|
|
177
|
+
*/
|
|
178
|
+
postPortal(requestParameters, initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const response = yield this.postPortalRaw(requestParameters, initOverrides);
|
|
181
|
+
return yield response.value();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Update portal branding (name, background color, text color)
|
|
186
|
+
*/
|
|
187
|
+
putPortalBrandingRaw(requestParameters, initOverrides) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
if (requestParameters['portalId'] == null) {
|
|
190
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling putPortalBranding().');
|
|
191
|
+
}
|
|
192
|
+
if (requestParameters['putPortalBranding'] == null) {
|
|
193
|
+
throw new runtime.RequiredError('putPortalBranding', 'Required parameter "putPortalBranding" was null or undefined when calling putPortalBranding().');
|
|
194
|
+
}
|
|
195
|
+
const queryParameters = {};
|
|
196
|
+
const headerParameters = {};
|
|
197
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
198
|
+
const response = yield this.request({
|
|
199
|
+
path: `/portals/{portalId}`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
200
|
+
method: 'PUT',
|
|
201
|
+
headers: headerParameters,
|
|
202
|
+
query: queryParameters,
|
|
203
|
+
body: (0, index_1.PutPortalBrandingToJSON)(requestParameters['putPortalBranding']),
|
|
204
|
+
}, initOverrides);
|
|
205
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPortalFromJSON)(jsonValue));
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Update portal branding (name, background color, text color)
|
|
210
|
+
*/
|
|
211
|
+
putPortalBranding(requestParameters, initOverrides) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
const response = yield this.putPortalBrandingRaw(requestParameters, initOverrides);
|
|
214
|
+
return yield response.value();
|
|
215
|
+
});
|
|
216
|
+
}
|
|
117
217
|
/**
|
|
118
218
|
* Update the users current selected portal
|
|
119
219
|
*/
|
|
@@ -146,3 +246,11 @@ class PortalApi extends runtime.BaseAPI {
|
|
|
146
246
|
}
|
|
147
247
|
}
|
|
148
248
|
exports.PortalApi = PortalApi;
|
|
249
|
+
/**
|
|
250
|
+
* @export
|
|
251
|
+
*/
|
|
252
|
+
exports.GetPortalUsersRolesEnum = {
|
|
253
|
+
Admin: 'Admin',
|
|
254
|
+
Instructor: 'Instructor',
|
|
255
|
+
Learner: 'Learner'
|
|
256
|
+
};
|
|
@@ -10,14 +10,27 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, PostPortalInvite } 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;
|
|
20
26
|
}
|
|
27
|
+
export interface PostPortalRequest {
|
|
28
|
+
postPortal: PostPortal;
|
|
29
|
+
}
|
|
30
|
+
export interface PutPortalBrandingRequest {
|
|
31
|
+
portalId: string;
|
|
32
|
+
putPortalBranding: PutPortalBranding;
|
|
33
|
+
}
|
|
21
34
|
export interface UpdateSelectedPortalRequest {
|
|
22
35
|
portalId: string;
|
|
23
36
|
selectedUserRole?: string;
|
|
@@ -42,6 +55,14 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
42
55
|
* Get all portals a user has access to
|
|
43
56
|
*/
|
|
44
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>;
|
|
45
66
|
/**
|
|
46
67
|
* Invite a new user to a portal
|
|
47
68
|
*/
|
|
@@ -50,6 +71,22 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
50
71
|
* Invite a new user to a portal
|
|
51
72
|
*/
|
|
52
73
|
inviteUserToPortal(requestParameters: InviteUserToPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Create a new portal as a child of the current selected portal
|
|
76
|
+
*/
|
|
77
|
+
postPortalRaw(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>>;
|
|
78
|
+
/**
|
|
79
|
+
* Create a new portal as a child of the current selected portal
|
|
80
|
+
*/
|
|
81
|
+
postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
82
|
+
/**
|
|
83
|
+
* Update portal branding (name, background color, text color)
|
|
84
|
+
*/
|
|
85
|
+
putPortalBrandingRaw(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>>;
|
|
86
|
+
/**
|
|
87
|
+
* Update portal branding (name, background color, text color)
|
|
88
|
+
*/
|
|
89
|
+
putPortalBranding(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
53
90
|
/**
|
|
54
91
|
* Update the users current selected portal
|
|
55
92
|
*/
|
|
@@ -59,3 +96,12 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
59
96
|
*/
|
|
60
97
|
updateSelectedPortal(requestParameters: UpdateSelectedPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
61
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, PostPortalInviteToJSON, } 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
|
*/
|
|
@@ -111,6 +148,69 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
111
148
|
yield this.inviteUserToPortalRaw(requestParameters, initOverrides);
|
|
112
149
|
});
|
|
113
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Create a new portal as a child of the current selected portal
|
|
153
|
+
*/
|
|
154
|
+
postPortalRaw(requestParameters, initOverrides) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
if (requestParameters['postPortal'] == null) {
|
|
157
|
+
throw new runtime.RequiredError('postPortal', 'Required parameter "postPortal" was null or undefined when calling postPortal().');
|
|
158
|
+
}
|
|
159
|
+
const queryParameters = {};
|
|
160
|
+
const headerParameters = {};
|
|
161
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
162
|
+
const response = yield this.request({
|
|
163
|
+
path: `/portals`,
|
|
164
|
+
method: 'POST',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
body: PostPortalToJSON(requestParameters['postPortal']),
|
|
168
|
+
}, initOverrides);
|
|
169
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFromJSON(jsonValue));
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Create a new portal as a child of the current selected portal
|
|
174
|
+
*/
|
|
175
|
+
postPortal(requestParameters, initOverrides) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
const response = yield this.postPortalRaw(requestParameters, initOverrides);
|
|
178
|
+
return yield response.value();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Update portal branding (name, background color, text color)
|
|
183
|
+
*/
|
|
184
|
+
putPortalBrandingRaw(requestParameters, initOverrides) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
if (requestParameters['portalId'] == null) {
|
|
187
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling putPortalBranding().');
|
|
188
|
+
}
|
|
189
|
+
if (requestParameters['putPortalBranding'] == null) {
|
|
190
|
+
throw new runtime.RequiredError('putPortalBranding', 'Required parameter "putPortalBranding" was null or undefined when calling putPortalBranding().');
|
|
191
|
+
}
|
|
192
|
+
const queryParameters = {};
|
|
193
|
+
const headerParameters = {};
|
|
194
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
195
|
+
const response = yield this.request({
|
|
196
|
+
path: `/portals/{portalId}`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
197
|
+
method: 'PUT',
|
|
198
|
+
headers: headerParameters,
|
|
199
|
+
query: queryParameters,
|
|
200
|
+
body: PutPortalBrandingToJSON(requestParameters['putPortalBranding']),
|
|
201
|
+
}, initOverrides);
|
|
202
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFromJSON(jsonValue));
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Update portal branding (name, background color, text color)
|
|
207
|
+
*/
|
|
208
|
+
putPortalBranding(requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const response = yield this.putPortalBrandingRaw(requestParameters, initOverrides);
|
|
211
|
+
return yield response.value();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
114
214
|
/**
|
|
115
215
|
* Update the users current selected portal
|
|
116
216
|
*/
|
|
@@ -142,3 +242,11 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
142
242
|
});
|
|
143
243
|
}
|
|
144
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;
|