@easyedu/js-lsm-api 1.59.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +4 -0
- package/README.md +5 -2
- package/dist/apis/PortalApi.d.ts +15 -0
- package/dist/apis/PortalApi.js +38 -0
- package/dist/esm/apis/PortalApi.d.ts +15 -0
- package/dist/esm/apis/PortalApi.js +38 -0
- package/dist/esm/models/GetPublicPortalBranding.d.ts +68 -0
- package/dist/esm/models/GetPublicPortalBranding.js +67 -0
- package/dist/esm/models/UpdateSelectedPortalResponse.d.ts +7 -0
- package/dist/esm/models/UpdateSelectedPortalResponse.js +5 -0
- package/dist/esm/models/UpdateSelectedPortalResponseHostPortal.d.ts +44 -0
- package/dist/esm/models/UpdateSelectedPortalResponseHostPortal.js +51 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/GetPublicPortalBranding.d.ts +68 -0
- package/dist/models/GetPublicPortalBranding.js +74 -0
- package/dist/models/UpdateSelectedPortalResponse.d.ts +7 -0
- package/dist/models/UpdateSelectedPortalResponse.js +5 -0
- package/dist/models/UpdateSelectedPortalResponseHostPortal.d.ts +44 -0
- package/dist/models/UpdateSelectedPortalResponseHostPortal.js +58 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/GetPublicPortalBranding.md +47 -0
- package/docs/PortalApi.md +62 -0
- package/docs/UpdateSelectedPortalResponse.md +2 -0
- package/docs/UpdateSelectedPortalResponseHostPortal.md +39 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +44 -0
- package/src/models/GetPublicPortalBranding.ts +120 -0
- package/src/models/UpdateSelectedPortalResponse.ts +16 -0
- package/src/models/UpdateSelectedPortalResponseHostPortal.ts +84 -0
- package/src/models/index.ts +2 -0
|
@@ -0,0 +1,74 @@
|
|
|
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.instanceOfGetPublicPortalBranding = instanceOfGetPublicPortalBranding;
|
|
17
|
+
exports.GetPublicPortalBrandingFromJSON = GetPublicPortalBrandingFromJSON;
|
|
18
|
+
exports.GetPublicPortalBrandingFromJSONTyped = GetPublicPortalBrandingFromJSONTyped;
|
|
19
|
+
exports.GetPublicPortalBrandingToJSON = GetPublicPortalBrandingToJSON;
|
|
20
|
+
exports.GetPublicPortalBrandingToJSONTyped = GetPublicPortalBrandingToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GetPublicPortalBranding interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGetPublicPortalBranding(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('slug' in value) || value['slug'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('logoUrl' in value) || value['logoUrl'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('faviconUrl' in value) || value['faviconUrl'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('headerBackgroundColor' in value) || value['headerBackgroundColor'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('headerTextColor' in value) || value['headerTextColor'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function GetPublicPortalBrandingFromJSON(json) {
|
|
42
|
+
return GetPublicPortalBrandingFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function GetPublicPortalBrandingFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': json['id'],
|
|
50
|
+
'name': json['name'],
|
|
51
|
+
'slug': json['slug'],
|
|
52
|
+
'logoUrl': json['logo_url'],
|
|
53
|
+
'faviconUrl': json['favicon_url'],
|
|
54
|
+
'headerBackgroundColor': json['header_background_color'],
|
|
55
|
+
'headerTextColor': json['header_text_color'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function GetPublicPortalBrandingToJSON(json) {
|
|
59
|
+
return GetPublicPortalBrandingToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function GetPublicPortalBrandingToJSONTyped(value, ignoreDiscriminator = false) {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'id': value['id'],
|
|
67
|
+
'name': value['name'],
|
|
68
|
+
'slug': value['slug'],
|
|
69
|
+
'logo_url': value['logoUrl'],
|
|
70
|
+
'favicon_url': value['faviconUrl'],
|
|
71
|
+
'header_background_color': value['headerBackgroundColor'],
|
|
72
|
+
'header_text_color': value['headerTextColor'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { UpdateSelectedPortalResponseSelectedPortal } from './UpdateSelectedPortalResponseSelectedPortal';
|
|
13
|
+
import type { UpdateSelectedPortalResponseHostPortal } from './UpdateSelectedPortalResponseHostPortal';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -34,6 +35,12 @@ export interface UpdateSelectedPortalResponse {
|
|
|
34
35
|
* @memberof UpdateSelectedPortalResponse
|
|
35
36
|
*/
|
|
36
37
|
selectedPortal: UpdateSelectedPortalResponseSelectedPortal;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {UpdateSelectedPortalResponseHostPortal}
|
|
41
|
+
* @memberof UpdateSelectedPortalResponse
|
|
42
|
+
*/
|
|
43
|
+
hostPortal: UpdateSelectedPortalResponseHostPortal;
|
|
37
44
|
}
|
|
38
45
|
/**
|
|
39
46
|
* Check if a given object implements the UpdateSelectedPortalResponse interface.
|
|
@@ -19,6 +19,7 @@ exports.UpdateSelectedPortalResponseFromJSONTyped = UpdateSelectedPortalResponse
|
|
|
19
19
|
exports.UpdateSelectedPortalResponseToJSON = UpdateSelectedPortalResponseToJSON;
|
|
20
20
|
exports.UpdateSelectedPortalResponseToJSONTyped = UpdateSelectedPortalResponseToJSONTyped;
|
|
21
21
|
const UpdateSelectedPortalResponseSelectedPortal_1 = require("./UpdateSelectedPortalResponseSelectedPortal");
|
|
22
|
+
const UpdateSelectedPortalResponseHostPortal_1 = require("./UpdateSelectedPortalResponseHostPortal");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the UpdateSelectedPortalResponse interface.
|
|
24
25
|
*/
|
|
@@ -29,6 +30,8 @@ function instanceOfUpdateSelectedPortalResponse(value) {
|
|
|
29
30
|
return false;
|
|
30
31
|
if (!('selectedPortal' in value) || value['selectedPortal'] === undefined)
|
|
31
32
|
return false;
|
|
33
|
+
if (!('hostPortal' in value) || value['hostPortal'] === undefined)
|
|
34
|
+
return false;
|
|
32
35
|
return true;
|
|
33
36
|
}
|
|
34
37
|
function UpdateSelectedPortalResponseFromJSON(json) {
|
|
@@ -42,6 +45,7 @@ function UpdateSelectedPortalResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
45
|
'token': json['token'],
|
|
43
46
|
'expiration': json['expiration'],
|
|
44
47
|
'selectedPortal': (0, UpdateSelectedPortalResponseSelectedPortal_1.UpdateSelectedPortalResponseSelectedPortalFromJSON)(json['selected_portal']),
|
|
48
|
+
'hostPortal': (0, UpdateSelectedPortalResponseHostPortal_1.UpdateSelectedPortalResponseHostPortalFromJSON)(json['host_portal']),
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
function UpdateSelectedPortalResponseToJSON(json) {
|
|
@@ -55,5 +59,6 @@ function UpdateSelectedPortalResponseToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
55
59
|
'token': value['token'],
|
|
56
60
|
'expiration': value['expiration'],
|
|
57
61
|
'selected_portal': (0, UpdateSelectedPortalResponseSelectedPortal_1.UpdateSelectedPortalResponseSelectedPortalToJSON)(value['selectedPortal']),
|
|
62
|
+
'host_portal': (0, UpdateSelectedPortalResponseHostPortal_1.UpdateSelectedPortalResponseHostPortalToJSON)(value['hostPortal']),
|
|
58
63
|
};
|
|
59
64
|
}
|
|
@@ -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
|
+
* Nearest selected-portal ancestor that owns the platform subdomain.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateSelectedPortalResponseHostPortal
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateSelectedPortalResponseHostPortal {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateSelectedPortalResponseHostPortal
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UpdateSelectedPortalResponseHostPortal
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Platform subdomain slug used for redirecting after portal switch.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateSelectedPortalResponseHostPortal
|
|
34
|
+
*/
|
|
35
|
+
slug: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the UpdateSelectedPortalResponseHostPortal interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfUpdateSelectedPortalResponseHostPortal(value: object): value is UpdateSelectedPortalResponseHostPortal;
|
|
41
|
+
export declare function UpdateSelectedPortalResponseHostPortalFromJSON(json: any): UpdateSelectedPortalResponseHostPortal;
|
|
42
|
+
export declare function UpdateSelectedPortalResponseHostPortalFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSelectedPortalResponseHostPortal;
|
|
43
|
+
export declare function UpdateSelectedPortalResponseHostPortalToJSON(json: any): UpdateSelectedPortalResponseHostPortal;
|
|
44
|
+
export declare function UpdateSelectedPortalResponseHostPortalToJSONTyped(value?: UpdateSelectedPortalResponseHostPortal | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfUpdateSelectedPortalResponseHostPortal = instanceOfUpdateSelectedPortalResponseHostPortal;
|
|
17
|
+
exports.UpdateSelectedPortalResponseHostPortalFromJSON = UpdateSelectedPortalResponseHostPortalFromJSON;
|
|
18
|
+
exports.UpdateSelectedPortalResponseHostPortalFromJSONTyped = UpdateSelectedPortalResponseHostPortalFromJSONTyped;
|
|
19
|
+
exports.UpdateSelectedPortalResponseHostPortalToJSON = UpdateSelectedPortalResponseHostPortalToJSON;
|
|
20
|
+
exports.UpdateSelectedPortalResponseHostPortalToJSONTyped = UpdateSelectedPortalResponseHostPortalToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UpdateSelectedPortalResponseHostPortal interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUpdateSelectedPortalResponseHostPortal(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('slug' in value) || value['slug'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function UpdateSelectedPortalResponseHostPortalFromJSON(json) {
|
|
34
|
+
return UpdateSelectedPortalResponseHostPortalFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function UpdateSelectedPortalResponseHostPortalFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'id': json['id'],
|
|
42
|
+
'name': json['name'],
|
|
43
|
+
'slug': json['slug'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function UpdateSelectedPortalResponseHostPortalToJSON(json) {
|
|
47
|
+
return UpdateSelectedPortalResponseHostPortalToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function UpdateSelectedPortalResponseHostPortalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'id': value['id'],
|
|
55
|
+
'name': value['name'],
|
|
56
|
+
'slug': value['slug'],
|
|
57
|
+
};
|
|
58
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ export * from './GetPortalStudentReportingCertificates';
|
|
|
78
78
|
export * from './GetPortalStudentReportingPortalInfo';
|
|
79
79
|
export * from './GetPortalUser';
|
|
80
80
|
export * from './GetPortalUserList';
|
|
81
|
+
export * from './GetPublicPortalBranding';
|
|
81
82
|
export * from './GetQuestion';
|
|
82
83
|
export * from './GetQuestionAnswerChoicesInner';
|
|
83
84
|
export * from './GetQuestionList';
|
|
@@ -254,4 +255,5 @@ export * from './ShortAnswer1';
|
|
|
254
255
|
export * from './SingleAnswer';
|
|
255
256
|
export * from './SupportTicketUser';
|
|
256
257
|
export * from './UpdateSelectedPortalResponse';
|
|
258
|
+
export * from './UpdateSelectedPortalResponseHostPortal';
|
|
257
259
|
export * from './UpdateSelectedPortalResponseSelectedPortal';
|
package/dist/models/index.js
CHANGED
|
@@ -96,6 +96,7 @@ __exportStar(require("./GetPortalStudentReportingCertificates"), exports);
|
|
|
96
96
|
__exportStar(require("./GetPortalStudentReportingPortalInfo"), exports);
|
|
97
97
|
__exportStar(require("./GetPortalUser"), exports);
|
|
98
98
|
__exportStar(require("./GetPortalUserList"), exports);
|
|
99
|
+
__exportStar(require("./GetPublicPortalBranding"), exports);
|
|
99
100
|
__exportStar(require("./GetQuestion"), exports);
|
|
100
101
|
__exportStar(require("./GetQuestionAnswerChoicesInner"), exports);
|
|
101
102
|
__exportStar(require("./GetQuestionList"), exports);
|
|
@@ -272,4 +273,5 @@ __exportStar(require("./ShortAnswer1"), exports);
|
|
|
272
273
|
__exportStar(require("./SingleAnswer"), exports);
|
|
273
274
|
__exportStar(require("./SupportTicketUser"), exports);
|
|
274
275
|
__exportStar(require("./UpdateSelectedPortalResponse"), exports);
|
|
276
|
+
__exportStar(require("./UpdateSelectedPortalResponseHostPortal"), exports);
|
|
275
277
|
__exportStar(require("./UpdateSelectedPortalResponseSelectedPortal"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# GetPublicPortalBranding
|
|
3
|
+
|
|
4
|
+
Public portal branding resolved from the browser host.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`slug` | string
|
|
13
|
+
`logoUrl` | string
|
|
14
|
+
`faviconUrl` | string
|
|
15
|
+
`headerBackgroundColor` | string
|
|
16
|
+
`headerTextColor` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { GetPublicPortalBranding } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"id": null,
|
|
26
|
+
"name": null,
|
|
27
|
+
"slug": null,
|
|
28
|
+
"logoUrl": null,
|
|
29
|
+
"faviconUrl": null,
|
|
30
|
+
"headerBackgroundColor": null,
|
|
31
|
+
"headerTextColor": null,
|
|
32
|
+
} satisfies GetPublicPortalBranding
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetPublicPortalBranding
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
package/docs/PortalApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
9
9
|
| [**getPortalById**](PortalApi.md#getportalbyid) | **GET** /portals/{portalId} | Get a portal by id (can use \'current\' to get the current users selected portal) |
|
|
10
10
|
| [**getPortalList**](PortalApi.md#getportallist) | **GET** /portals | Get all portals a user has access to |
|
|
11
11
|
| [**getPortalUsers**](PortalApi.md#getportalusers) | **GET** /portals/{portalId}/users | Get all users for a portal with optional role filtering |
|
|
12
|
+
| [**getPublicPortalBranding**](PortalApi.md#getpublicportalbranding) | **GET** /public/portal/branding | Public portal branding resolved from the request host |
|
|
12
13
|
| [**inviteUserToPortal**](PortalApi.md#inviteusertoportal) | **POST** /portals/{portalId}/invite | Invite a new user to a portal |
|
|
13
14
|
| [**postPortal**](PortalApi.md#postportal) | **POST** /portals | Create a new portal as a child of the current selected portal |
|
|
14
15
|
| [**postPortalFaviconUpload**](PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding |
|
|
@@ -354,6 +355,67 @@ No authorization required
|
|
|
354
355
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
355
356
|
|
|
356
357
|
|
|
358
|
+
## getPublicPortalBranding
|
|
359
|
+
|
|
360
|
+
> GetPublicPortalBranding getPublicPortalBranding()
|
|
361
|
+
|
|
362
|
+
Public portal branding resolved from the request host
|
|
363
|
+
|
|
364
|
+
Resolves the browser Origin/Referer/Host to a platform portal and returns branding for unauthenticated pages.
|
|
365
|
+
|
|
366
|
+
### Example
|
|
367
|
+
|
|
368
|
+
```ts
|
|
369
|
+
import {
|
|
370
|
+
Configuration,
|
|
371
|
+
PortalApi,
|
|
372
|
+
} from '@easyedu/js-lsm-api';
|
|
373
|
+
import type { GetPublicPortalBrandingRequest } from '@easyedu/js-lsm-api';
|
|
374
|
+
|
|
375
|
+
async function example() {
|
|
376
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
377
|
+
const api = new PortalApi();
|
|
378
|
+
|
|
379
|
+
try {
|
|
380
|
+
const data = await api.getPublicPortalBranding();
|
|
381
|
+
console.log(data);
|
|
382
|
+
} catch (error) {
|
|
383
|
+
console.error(error);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Run the test
|
|
388
|
+
example().catch(console.error);
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Parameters
|
|
392
|
+
|
|
393
|
+
This endpoint does not need any parameter.
|
|
394
|
+
|
|
395
|
+
### Return type
|
|
396
|
+
|
|
397
|
+
[**GetPublicPortalBranding**](GetPublicPortalBranding.md)
|
|
398
|
+
|
|
399
|
+
### Authorization
|
|
400
|
+
|
|
401
|
+
No authorization required
|
|
402
|
+
|
|
403
|
+
### HTTP request headers
|
|
404
|
+
|
|
405
|
+
- **Content-Type**: Not defined
|
|
406
|
+
- **Accept**: `application/json`
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
### HTTP response details
|
|
410
|
+
| Status code | Description | Response headers |
|
|
411
|
+
|-------------|-------------|------------------|
|
|
412
|
+
| **200** | Public portal branding | - |
|
|
413
|
+
| **400** | Invalid portal host | - |
|
|
414
|
+
| **404** | Portal host not found | - |
|
|
415
|
+
|
|
416
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
417
|
+
|
|
418
|
+
|
|
357
419
|
## inviteUserToPortal
|
|
358
420
|
|
|
359
421
|
> inviteUserToPortal(portalId, postPortalInvite)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`token` | string
|
|
10
10
|
`expiration` | number
|
|
11
11
|
`selectedPortal` | [UpdateSelectedPortalResponseSelectedPortal](UpdateSelectedPortalResponseSelectedPortal.md)
|
|
12
|
+
`hostPortal` | [UpdateSelectedPortalResponseHostPortal](UpdateSelectedPortalResponseHostPortal.md)
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"token": null,
|
|
21
22
|
"expiration": null,
|
|
22
23
|
"selectedPortal": null,
|
|
24
|
+
"hostPortal": null,
|
|
23
25
|
} satisfies UpdateSelectedPortalResponse
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateSelectedPortalResponseHostPortal
|
|
3
|
+
|
|
4
|
+
Nearest selected-portal ancestor that owns the platform subdomain.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`slug` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { UpdateSelectedPortalResponseHostPortal } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"name": null,
|
|
23
|
+
"slug": null,
|
|
24
|
+
} satisfies UpdateSelectedPortalResponseHostPortal
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateSelectedPortalResponseHostPortal
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/package.json
CHANGED
package/src/apis/PortalApi.ts
CHANGED
|
@@ -38,6 +38,11 @@ import {
|
|
|
38
38
|
GetPortalUserListFromJSON,
|
|
39
39
|
GetPortalUserListToJSON,
|
|
40
40
|
} from '../models/GetPortalUserList';
|
|
41
|
+
import {
|
|
42
|
+
type GetPublicPortalBranding,
|
|
43
|
+
GetPublicPortalBrandingFromJSON,
|
|
44
|
+
GetPublicPortalBrandingToJSON,
|
|
45
|
+
} from '../models/GetPublicPortalBranding';
|
|
41
46
|
import {
|
|
42
47
|
type PostPortal,
|
|
43
48
|
PostPortalFromJSON,
|
|
@@ -348,6 +353,45 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
348
353
|
return await response.value();
|
|
349
354
|
}
|
|
350
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Creates request options for getPublicPortalBranding without sending the request
|
|
358
|
+
*/
|
|
359
|
+
async getPublicPortalBrandingRequestOpts(): Promise<runtime.RequestOpts> {
|
|
360
|
+
const queryParameters: any = {};
|
|
361
|
+
|
|
362
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
let urlPath = `/public/portal/branding`;
|
|
366
|
+
|
|
367
|
+
return {
|
|
368
|
+
path: urlPath,
|
|
369
|
+
method: 'GET',
|
|
370
|
+
headers: headerParameters,
|
|
371
|
+
query: queryParameters,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Resolves the browser Origin/Referer/Host to a platform portal and returns branding for unauthenticated pages.
|
|
377
|
+
* Public portal branding resolved from the request host
|
|
378
|
+
*/
|
|
379
|
+
async getPublicPortalBrandingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPublicPortalBranding>> {
|
|
380
|
+
const requestOptions = await this.getPublicPortalBrandingRequestOpts();
|
|
381
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
382
|
+
|
|
383
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPublicPortalBrandingFromJSON(jsonValue));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Resolves the browser Origin/Referer/Host to a platform portal and returns branding for unauthenticated pages.
|
|
388
|
+
* Public portal branding resolved from the request host
|
|
389
|
+
*/
|
|
390
|
+
async getPublicPortalBranding(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPublicPortalBranding> {
|
|
391
|
+
const response = await this.getPublicPortalBrandingRaw(initOverrides);
|
|
392
|
+
return await response.value();
|
|
393
|
+
}
|
|
394
|
+
|
|
351
395
|
/**
|
|
352
396
|
* Creates request options for inviteUserToPortal without sending the request
|
|
353
397
|
*/
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
* Public portal branding resolved from the browser host.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetPublicPortalBranding
|
|
20
|
+
*/
|
|
21
|
+
export interface GetPublicPortalBranding {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetPublicPortalBranding
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetPublicPortalBranding
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetPublicPortalBranding
|
|
38
|
+
*/
|
|
39
|
+
slug: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Presigned portal logo URL when a logo is configured.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GetPublicPortalBranding
|
|
44
|
+
*/
|
|
45
|
+
logoUrl: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Presigned portal favicon URL when a favicon is configured.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetPublicPortalBranding
|
|
50
|
+
*/
|
|
51
|
+
faviconUrl: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof GetPublicPortalBranding
|
|
56
|
+
*/
|
|
57
|
+
headerBackgroundColor: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof GetPublicPortalBranding
|
|
62
|
+
*/
|
|
63
|
+
headerTextColor: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the GetPublicPortalBranding interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfGetPublicPortalBranding(value: object): value is GetPublicPortalBranding {
|
|
70
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
71
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
72
|
+
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
73
|
+
if (!('logoUrl' in value) || value['logoUrl'] === undefined) return false;
|
|
74
|
+
if (!('faviconUrl' in value) || value['faviconUrl'] === undefined) return false;
|
|
75
|
+
if (!('headerBackgroundColor' in value) || value['headerBackgroundColor'] === undefined) return false;
|
|
76
|
+
if (!('headerTextColor' in value) || value['headerTextColor'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function GetPublicPortalBrandingFromJSON(json: any): GetPublicPortalBranding {
|
|
81
|
+
return GetPublicPortalBrandingFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function GetPublicPortalBrandingFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPublicPortalBranding {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'id': json['id'],
|
|
91
|
+
'name': json['name'],
|
|
92
|
+
'slug': json['slug'],
|
|
93
|
+
'logoUrl': json['logo_url'],
|
|
94
|
+
'faviconUrl': json['favicon_url'],
|
|
95
|
+
'headerBackgroundColor': json['header_background_color'],
|
|
96
|
+
'headerTextColor': json['header_text_color'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function GetPublicPortalBrandingToJSON(json: any): GetPublicPortalBranding {
|
|
101
|
+
return GetPublicPortalBrandingToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function GetPublicPortalBrandingToJSONTyped(value?: GetPublicPortalBranding | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': value['id'],
|
|
112
|
+
'name': value['name'],
|
|
113
|
+
'slug': value['slug'],
|
|
114
|
+
'logo_url': value['logoUrl'],
|
|
115
|
+
'favicon_url': value['faviconUrl'],
|
|
116
|
+
'header_background_color': value['headerBackgroundColor'],
|
|
117
|
+
'header_text_color': value['headerTextColor'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
UpdateSelectedPortalResponseSelectedPortalToJSON,
|
|
21
21
|
UpdateSelectedPortalResponseSelectedPortalToJSONTyped,
|
|
22
22
|
} from './UpdateSelectedPortalResponseSelectedPortal';
|
|
23
|
+
import type { UpdateSelectedPortalResponseHostPortal } from './UpdateSelectedPortalResponseHostPortal';
|
|
24
|
+
import {
|
|
25
|
+
UpdateSelectedPortalResponseHostPortalFromJSON,
|
|
26
|
+
UpdateSelectedPortalResponseHostPortalFromJSONTyped,
|
|
27
|
+
UpdateSelectedPortalResponseHostPortalToJSON,
|
|
28
|
+
UpdateSelectedPortalResponseHostPortalToJSONTyped,
|
|
29
|
+
} from './UpdateSelectedPortalResponseHostPortal';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
@@ -45,6 +52,12 @@ export interface UpdateSelectedPortalResponse {
|
|
|
45
52
|
* @memberof UpdateSelectedPortalResponse
|
|
46
53
|
*/
|
|
47
54
|
selectedPortal: UpdateSelectedPortalResponseSelectedPortal;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {UpdateSelectedPortalResponseHostPortal}
|
|
58
|
+
* @memberof UpdateSelectedPortalResponse
|
|
59
|
+
*/
|
|
60
|
+
hostPortal: UpdateSelectedPortalResponseHostPortal;
|
|
48
61
|
}
|
|
49
62
|
|
|
50
63
|
/**
|
|
@@ -54,6 +67,7 @@ export function instanceOfUpdateSelectedPortalResponse(value: object): value is
|
|
|
54
67
|
if (!('token' in value) || value['token'] === undefined) return false;
|
|
55
68
|
if (!('expiration' in value) || value['expiration'] === undefined) return false;
|
|
56
69
|
if (!('selectedPortal' in value) || value['selectedPortal'] === undefined) return false;
|
|
70
|
+
if (!('hostPortal' in value) || value['hostPortal'] === undefined) return false;
|
|
57
71
|
return true;
|
|
58
72
|
}
|
|
59
73
|
|
|
@@ -70,6 +84,7 @@ export function UpdateSelectedPortalResponseFromJSONTyped(json: any, ignoreDiscr
|
|
|
70
84
|
'token': json['token'],
|
|
71
85
|
'expiration': json['expiration'],
|
|
72
86
|
'selectedPortal': UpdateSelectedPortalResponseSelectedPortalFromJSON(json['selected_portal']),
|
|
87
|
+
'hostPortal': UpdateSelectedPortalResponseHostPortalFromJSON(json['host_portal']),
|
|
73
88
|
};
|
|
74
89
|
}
|
|
75
90
|
|
|
@@ -87,6 +102,7 @@ export function UpdateSelectedPortalResponseToJSONTyped(value?: UpdateSelectedPo
|
|
|
87
102
|
'token': value['token'],
|
|
88
103
|
'expiration': value['expiration'],
|
|
89
104
|
'selected_portal': UpdateSelectedPortalResponseSelectedPortalToJSON(value['selectedPortal']),
|
|
105
|
+
'host_portal': UpdateSelectedPortalResponseHostPortalToJSON(value['hostPortal']),
|
|
90
106
|
};
|
|
91
107
|
}
|
|
92
108
|
|