@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
|
@@ -0,0 +1,44 @@
|
|
|
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 PutPortalBranding
|
|
16
|
+
*/
|
|
17
|
+
export interface PutPortalBranding {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PutPortalBranding
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Hex color value for portal background (e.g.,
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PutPortalBranding
|
|
28
|
+
*/
|
|
29
|
+
headerBackgroundColor?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Hex color value for portal text (e.g.,
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PutPortalBranding
|
|
34
|
+
*/
|
|
35
|
+
headerTextColor?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the PutPortalBranding interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfPutPortalBranding(value: object): value is PutPortalBranding;
|
|
41
|
+
export declare function PutPortalBrandingFromJSON(json: any): PutPortalBranding;
|
|
42
|
+
export declare function PutPortalBrandingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutPortalBranding;
|
|
43
|
+
export declare function PutPortalBrandingToJSON(json: any): PutPortalBranding;
|
|
44
|
+
export declare function PutPortalBrandingToJSONTyped(value?: PutPortalBranding | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfPutPortalBranding = instanceOfPutPortalBranding;
|
|
17
|
+
exports.PutPortalBrandingFromJSON = PutPortalBrandingFromJSON;
|
|
18
|
+
exports.PutPortalBrandingFromJSONTyped = PutPortalBrandingFromJSONTyped;
|
|
19
|
+
exports.PutPortalBrandingToJSON = PutPortalBrandingToJSON;
|
|
20
|
+
exports.PutPortalBrandingToJSONTyped = PutPortalBrandingToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PutPortalBranding interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPutPortalBranding(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function PutPortalBrandingFromJSON(json) {
|
|
28
|
+
return PutPortalBrandingFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function PutPortalBrandingFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
36
|
+
'headerBackgroundColor': json['header_background_color'] == null ? undefined : json['header_background_color'],
|
|
37
|
+
'headerTextColor': json['header_text_color'] == null ? undefined : json['header_text_color'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function PutPortalBrandingToJSON(json) {
|
|
41
|
+
return PutPortalBrandingToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function PutPortalBrandingToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'name': value['name'],
|
|
49
|
+
'header_background_color': value['headerBackgroundColor'],
|
|
50
|
+
'header_text_color': value['headerTextColor'],
|
|
51
|
+
};
|
|
52
|
+
}
|
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';
|
|
@@ -88,6 +90,7 @@ export * from './PostCourse';
|
|
|
88
90
|
export * from './PostCourseEnrollment';
|
|
89
91
|
export * from './PostLogin';
|
|
90
92
|
export * from './PostModule';
|
|
93
|
+
export * from './PostPortal';
|
|
91
94
|
export * from './PostPortalInvite';
|
|
92
95
|
export * from './PostQuestion';
|
|
93
96
|
export * from './PostQuestionAnswerChoicesInner';
|
|
@@ -110,6 +113,7 @@ export * from './PostSendResetPassword';
|
|
|
110
113
|
export * from './PutContent';
|
|
111
114
|
export * from './PutCourse';
|
|
112
115
|
export * from './PutModule';
|
|
116
|
+
export * from './PutPortalBranding';
|
|
113
117
|
export * from './PutQuestion';
|
|
114
118
|
export * from './PutQuestionAnswerChoicesInner';
|
|
115
119
|
export * from './PutQuiz';
|
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);
|
|
@@ -106,6 +108,7 @@ __exportStar(require("./PostCourse"), exports);
|
|
|
106
108
|
__exportStar(require("./PostCourseEnrollment"), exports);
|
|
107
109
|
__exportStar(require("./PostLogin"), exports);
|
|
108
110
|
__exportStar(require("./PostModule"), exports);
|
|
111
|
+
__exportStar(require("./PostPortal"), exports);
|
|
109
112
|
__exportStar(require("./PostPortalInvite"), exports);
|
|
110
113
|
__exportStar(require("./PostQuestion"), exports);
|
|
111
114
|
__exportStar(require("./PostQuestionAnswerChoicesInner"), exports);
|
|
@@ -128,6 +131,7 @@ __exportStar(require("./PostSendResetPassword"), exports);
|
|
|
128
131
|
__exportStar(require("./PutContent"), exports);
|
|
129
132
|
__exportStar(require("./PutCourse"), exports);
|
|
130
133
|
__exportStar(require("./PutModule"), exports);
|
|
134
|
+
__exportStar(require("./PutPortalBranding"), exports);
|
|
131
135
|
__exportStar(require("./PutQuestion"), exports);
|
|
132
136
|
__exportStar(require("./PutQuestionAnswerChoicesInner"), exports);
|
|
133
137
|
__exportStar(require("./PutQuiz"), exports);
|
package/package.json
CHANGED
package/src/apis/PortalApi.ts
CHANGED
|
@@ -17,26 +17,51 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
GetPortal,
|
|
19
19
|
GetPortalList,
|
|
20
|
+
GetPortalUserList,
|
|
21
|
+
PostPortal,
|
|
20
22
|
PostPortalInvite,
|
|
23
|
+
PutPortalBranding,
|
|
21
24
|
} from '../models/index';
|
|
22
25
|
import {
|
|
23
26
|
GetPortalFromJSON,
|
|
24
27
|
GetPortalToJSON,
|
|
25
28
|
GetPortalListFromJSON,
|
|
26
29
|
GetPortalListToJSON,
|
|
30
|
+
GetPortalUserListFromJSON,
|
|
31
|
+
GetPortalUserListToJSON,
|
|
32
|
+
PostPortalFromJSON,
|
|
33
|
+
PostPortalToJSON,
|
|
27
34
|
PostPortalInviteFromJSON,
|
|
28
35
|
PostPortalInviteToJSON,
|
|
36
|
+
PutPortalBrandingFromJSON,
|
|
37
|
+
PutPortalBrandingToJSON,
|
|
29
38
|
} from '../models/index';
|
|
30
39
|
|
|
31
40
|
export interface GetPortalByIdRequest {
|
|
32
41
|
portalId: string;
|
|
33
42
|
}
|
|
34
43
|
|
|
44
|
+
export interface GetPortalUsersRequest {
|
|
45
|
+
portalId: string;
|
|
46
|
+
roles?: Array<GetPortalUsersRolesEnum>;
|
|
47
|
+
page?: number;
|
|
48
|
+
pageSize?: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
35
51
|
export interface InviteUserToPortalRequest {
|
|
36
52
|
portalId: string;
|
|
37
53
|
postPortalInvite: PostPortalInvite;
|
|
38
54
|
}
|
|
39
55
|
|
|
56
|
+
export interface PostPortalRequest {
|
|
57
|
+
postPortal: PostPortal;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface PutPortalBrandingRequest {
|
|
61
|
+
portalId: string;
|
|
62
|
+
putPortalBranding: PutPortalBranding;
|
|
63
|
+
}
|
|
64
|
+
|
|
40
65
|
export interface UpdateSelectedPortalRequest {
|
|
41
66
|
portalId: string;
|
|
42
67
|
selectedUserRole?: string;
|
|
@@ -106,6 +131,51 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
106
131
|
return await response.value();
|
|
107
132
|
}
|
|
108
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
|
+
|
|
109
179
|
/**
|
|
110
180
|
* Invite a new user to a portal
|
|
111
181
|
*/
|
|
@@ -148,6 +218,85 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
148
218
|
await this.inviteUserToPortalRaw(requestParameters, initOverrides);
|
|
149
219
|
}
|
|
150
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Create a new portal as a child of the current selected portal
|
|
223
|
+
*/
|
|
224
|
+
async postPortalRaw(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>> {
|
|
225
|
+
if (requestParameters['postPortal'] == null) {
|
|
226
|
+
throw new runtime.RequiredError(
|
|
227
|
+
'postPortal',
|
|
228
|
+
'Required parameter "postPortal" was null or undefined when calling postPortal().'
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const queryParameters: any = {};
|
|
233
|
+
|
|
234
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
235
|
+
|
|
236
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
237
|
+
|
|
238
|
+
const response = await this.request({
|
|
239
|
+
path: `/portals`,
|
|
240
|
+
method: 'POST',
|
|
241
|
+
headers: headerParameters,
|
|
242
|
+
query: queryParameters,
|
|
243
|
+
body: PostPortalToJSON(requestParameters['postPortal']),
|
|
244
|
+
}, initOverrides);
|
|
245
|
+
|
|
246
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFromJSON(jsonValue));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Create a new portal as a child of the current selected portal
|
|
251
|
+
*/
|
|
252
|
+
async postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal> {
|
|
253
|
+
const response = await this.postPortalRaw(requestParameters, initOverrides);
|
|
254
|
+
return await response.value();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Update portal branding (name, background color, text color)
|
|
259
|
+
*/
|
|
260
|
+
async putPortalBrandingRaw(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>> {
|
|
261
|
+
if (requestParameters['portalId'] == null) {
|
|
262
|
+
throw new runtime.RequiredError(
|
|
263
|
+
'portalId',
|
|
264
|
+
'Required parameter "portalId" was null or undefined when calling putPortalBranding().'
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (requestParameters['putPortalBranding'] == null) {
|
|
269
|
+
throw new runtime.RequiredError(
|
|
270
|
+
'putPortalBranding',
|
|
271
|
+
'Required parameter "putPortalBranding" was null or undefined when calling putPortalBranding().'
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const queryParameters: any = {};
|
|
276
|
+
|
|
277
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
278
|
+
|
|
279
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
280
|
+
|
|
281
|
+
const response = await this.request({
|
|
282
|
+
path: `/portals/{portalId}`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))),
|
|
283
|
+
method: 'PUT',
|
|
284
|
+
headers: headerParameters,
|
|
285
|
+
query: queryParameters,
|
|
286
|
+
body: PutPortalBrandingToJSON(requestParameters['putPortalBranding']),
|
|
287
|
+
}, initOverrides);
|
|
288
|
+
|
|
289
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFromJSON(jsonValue));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Update portal branding (name, background color, text color)
|
|
294
|
+
*/
|
|
295
|
+
async putPortalBranding(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal> {
|
|
296
|
+
const response = await this.putPortalBrandingRaw(requestParameters, initOverrides);
|
|
297
|
+
return await response.value();
|
|
298
|
+
}
|
|
299
|
+
|
|
151
300
|
/**
|
|
152
301
|
* Update the users current selected portal
|
|
153
302
|
*/
|
|
@@ -185,3 +334,13 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
185
334
|
}
|
|
186
335
|
|
|
187
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
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PostPortal
|
|
20
|
+
*/
|
|
21
|
+
export interface PostPortal {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PostPortal
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Hex color value for portal background (e.g.,
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PostPortal
|
|
32
|
+
*/
|
|
33
|
+
headerBackgroundColor?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Hex color value for portal text (e.g.,
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PostPortal
|
|
38
|
+
*/
|
|
39
|
+
headerTextColor?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the PostPortal interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfPostPortal(value: object): value is PostPortal {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function PostPortalFromJSON(json: any): PostPortal {
|
|
51
|
+
return PostPortalFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function PostPortalFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostPortal {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'name': json['name'],
|
|
61
|
+
'headerBackgroundColor': json['header_background_color'] == null ? undefined : json['header_background_color'],
|
|
62
|
+
'headerTextColor': json['header_text_color'] == null ? undefined : json['header_text_color'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PostPortalToJSON(json: any): PostPortal {
|
|
67
|
+
return PostPortalToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PostPortalToJSONTyped(value?: PostPortal | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'name': value['name'],
|
|
78
|
+
'header_background_color': value['headerBackgroundColor'],
|
|
79
|
+
'header_text_color': value['headerTextColor'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|