@easyedu/js-lsm-api 1.56.0 → 1.57.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 +5 -2
- package/dist/apis/PortalApi.d.ts +32 -1
- package/dist/apis/PortalApi.js +99 -0
- package/dist/esm/apis/PortalApi.d.ts +32 -1
- package/dist/esm/apis/PortalApi.js +100 -1
- package/dist/esm/models/GetPortal.d.ts +6 -0
- package/dist/esm/models/GetPortal.js +2 -0
- package/dist/esm/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/esm/models/GetPortalFaviconUpload.js +43 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/GetPortal.d.ts +6 -0
- package/dist/models/GetPortal.js +2 -0
- package/dist/models/GetPortalFaviconUpload.d.ts +32 -0
- package/dist/models/GetPortalFaviconUpload.js +50 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/GetPortal.md +2 -0
- package/docs/GetPortalFaviconUpload.md +34 -0
- package/docs/PortalApi.md +138 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +129 -0
- package/src/models/GetPortal.ts +8 -0
- package/src/models/GetPortalFaviconUpload.ts +66 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -80,6 +80,7 @@ docs/GetPortal.md
|
|
|
80
80
|
docs/GetPortalBasicReporting.md
|
|
81
81
|
docs/GetPortalBasicReportingCertificates.md
|
|
82
82
|
docs/GetPortalBasicReportingPortalInfo.md
|
|
83
|
+
docs/GetPortalFaviconUpload.md
|
|
83
84
|
docs/GetPortalList.md
|
|
84
85
|
docs/GetPortalLogoUpload.md
|
|
85
86
|
docs/GetPortalStudentReporting.md
|
|
@@ -362,6 +363,7 @@ src/models/GetPortal.ts
|
|
|
362
363
|
src/models/GetPortalBasicReporting.ts
|
|
363
364
|
src/models/GetPortalBasicReportingCertificates.ts
|
|
364
365
|
src/models/GetPortalBasicReportingPortalInfo.ts
|
|
366
|
+
src/models/GetPortalFaviconUpload.ts
|
|
365
367
|
src/models/GetPortalList.ts
|
|
366
368
|
src/models/GetPortalLogoUpload.ts
|
|
367
369
|
src/models/GetPortalStudentReporting.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.57.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -131,12 +131,14 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
131
131
|
*ModuleApi* | [**putModule**](docs/ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id
|
|
132
132
|
*ModuleApi* | [**putModuleReorder**](docs/ModuleApi.md#putmodulereorder) | **PUT** /courses/{courseId}/modules/reorder | Reorder modules in a course
|
|
133
133
|
*OtherApi* | [**getHealth**](docs/OtherApi.md#gethealth) | **GET** /healthcheck | Health check endpoint
|
|
134
|
+
*PortalApi* | [**deletePortalFavicon**](docs/PortalApi.md#deleteportalfavicon) | **DELETE** /portals/{portalId}/branding/favicon | Remove the portal favicon
|
|
134
135
|
*PortalApi* | [**deletePortalLogo**](docs/PortalApi.md#deleteportallogo) | **DELETE** /portals/{portalId}/branding/logo | Remove the portal logo
|
|
135
136
|
*PortalApi* | [**getPortalById**](docs/PortalApi.md#getportalbyid) | **GET** /portals/{portalId} | Get a portal by id (can use \'current\' to get the current users selected portal)
|
|
136
137
|
*PortalApi* | [**getPortalList**](docs/PortalApi.md#getportallist) | **GET** /portals | Get all portals a user has access to
|
|
137
138
|
*PortalApi* | [**getPortalUsers**](docs/PortalApi.md#getportalusers) | **GET** /portals/{portalId}/users | Get all users for a portal with optional role filtering
|
|
138
139
|
*PortalApi* | [**inviteUserToPortal**](docs/PortalApi.md#inviteusertoportal) | **POST** /portals/{portalId}/invite | Invite a new user to a portal
|
|
139
140
|
*PortalApi* | [**postPortal**](docs/PortalApi.md#postportal) | **POST** /portals | Create a new portal as a child of the current selected portal
|
|
141
|
+
*PortalApi* | [**postPortalFaviconUpload**](docs/PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding
|
|
140
142
|
*PortalApi* | [**postPortalLogoUpload**](docs/PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding
|
|
141
143
|
*PortalApi* | [**putPortalBranding**](docs/PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding (name, background color, text color)
|
|
142
144
|
*PortalApi* | [**updateSelectedPortal**](docs/PortalApi.md#updateselectedportal) | **PUT** /portals/{portalId}/selected | Update the users current selected portal. Returns new JWT with updated roles.
|
|
@@ -284,6 +286,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
284
286
|
- [GetPortalBasicReporting](docs/GetPortalBasicReporting.md)
|
|
285
287
|
- [GetPortalBasicReportingCertificates](docs/GetPortalBasicReportingCertificates.md)
|
|
286
288
|
- [GetPortalBasicReportingPortalInfo](docs/GetPortalBasicReportingPortalInfo.md)
|
|
289
|
+
- [GetPortalFaviconUpload](docs/GetPortalFaviconUpload.md)
|
|
287
290
|
- [GetPortalList](docs/GetPortalList.md)
|
|
288
291
|
- [GetPortalLogoUpload](docs/GetPortalLogoUpload.md)
|
|
289
292
|
- [GetPortalStudentReporting](docs/GetPortalStudentReporting.md)
|
|
@@ -478,7 +481,7 @@ and is automatically generated by the
|
|
|
478
481
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
479
482
|
|
|
480
483
|
- API version: `1.0.0`
|
|
481
|
-
- Package version: `1.
|
|
484
|
+
- Package version: `1.57.0`
|
|
482
485
|
- Generator version: `7.21.0`
|
|
483
486
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
484
487
|
|
package/dist/apis/PortalApi.d.ts
CHANGED
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
13
|
+
import type { GetPortal, GetPortalFaviconUpload, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
14
|
+
export interface DeletePortalFaviconRequest {
|
|
15
|
+
portalId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface DeletePortalLogoRequest {
|
|
15
18
|
portalId: string;
|
|
16
19
|
}
|
|
@@ -32,6 +35,10 @@ export interface InviteUserToPortalRequest {
|
|
|
32
35
|
export interface PostPortalRequest {
|
|
33
36
|
postPortal: PostPortal;
|
|
34
37
|
}
|
|
38
|
+
export interface PostPortalFaviconUploadRequest {
|
|
39
|
+
portalId: string;
|
|
40
|
+
file: Blob;
|
|
41
|
+
}
|
|
35
42
|
export interface PostPortalLogoUploadRequest {
|
|
36
43
|
portalId: string;
|
|
37
44
|
file: Blob;
|
|
@@ -47,6 +54,18 @@ export interface UpdateSelectedPortalRequest {
|
|
|
47
54
|
*
|
|
48
55
|
*/
|
|
49
56
|
export declare class PortalApi extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
59
|
+
*/
|
|
60
|
+
deletePortalFaviconRequestOpts(requestParameters: DeletePortalFaviconRequest): Promise<runtime.RequestOpts>;
|
|
61
|
+
/**
|
|
62
|
+
* Remove the portal favicon
|
|
63
|
+
*/
|
|
64
|
+
deletePortalFaviconRaw(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
65
|
+
/**
|
|
66
|
+
* Remove the portal favicon
|
|
67
|
+
*/
|
|
68
|
+
deletePortalFavicon(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
69
|
/**
|
|
51
70
|
* Creates request options for deletePortalLogo without sending the request
|
|
52
71
|
*/
|
|
@@ -119,6 +138,18 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
119
138
|
* Create a new portal as a child of the current selected portal
|
|
120
139
|
*/
|
|
121
140
|
postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
141
|
+
/**
|
|
142
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
143
|
+
*/
|
|
144
|
+
postPortalFaviconUploadRequestOpts(requestParameters: PostPortalFaviconUploadRequest): Promise<runtime.RequestOpts>;
|
|
145
|
+
/**
|
|
146
|
+
* Upload a favicon image for portal branding
|
|
147
|
+
*/
|
|
148
|
+
postPortalFaviconUploadRaw(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalFaviconUpload>>;
|
|
149
|
+
/**
|
|
150
|
+
* Upload a favicon image for portal branding
|
|
151
|
+
*/
|
|
152
|
+
postPortalFaviconUpload(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalFaviconUpload>;
|
|
122
153
|
/**
|
|
123
154
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
124
155
|
*/
|
package/dist/apis/PortalApi.js
CHANGED
|
@@ -29,6 +29,44 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class PortalApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
34
|
+
*/
|
|
35
|
+
deletePortalFaviconRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['portalId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling deletePortalFavicon().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'DELETE',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Remove the portal favicon
|
|
54
|
+
*/
|
|
55
|
+
deletePortalFaviconRaw(requestParameters, initOverrides) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const requestOptions = yield this.deletePortalFaviconRequestOpts(requestParameters);
|
|
58
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
59
|
+
return new runtime.VoidApiResponse(response);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Remove the portal favicon
|
|
64
|
+
*/
|
|
65
|
+
deletePortalFavicon(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
yield this.deletePortalFaviconRaw(requestParameters, initOverrides);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
32
70
|
/**
|
|
33
71
|
* Creates request options for deletePortalLogo without sending the request
|
|
34
72
|
*/
|
|
@@ -278,6 +316,67 @@ class PortalApi extends runtime.BaseAPI {
|
|
|
278
316
|
return yield response.value();
|
|
279
317
|
});
|
|
280
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
321
|
+
*/
|
|
322
|
+
postPortalFaviconUploadRequestOpts(requestParameters) {
|
|
323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
+
if (requestParameters['portalId'] == null) {
|
|
325
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling postPortalFaviconUpload().');
|
|
326
|
+
}
|
|
327
|
+
if (requestParameters['file'] == null) {
|
|
328
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postPortalFaviconUpload().');
|
|
329
|
+
}
|
|
330
|
+
const queryParameters = {};
|
|
331
|
+
const headerParameters = {};
|
|
332
|
+
const consumes = [
|
|
333
|
+
{ contentType: 'multipart/form-data' },
|
|
334
|
+
];
|
|
335
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
336
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
337
|
+
let formParams;
|
|
338
|
+
let useForm = false;
|
|
339
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
340
|
+
useForm = canConsumeForm;
|
|
341
|
+
if (useForm) {
|
|
342
|
+
formParams = new FormData();
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
formParams = new URLSearchParams();
|
|
346
|
+
}
|
|
347
|
+
if (requestParameters['file'] != null) {
|
|
348
|
+
formParams.append('file', requestParameters['file']);
|
|
349
|
+
}
|
|
350
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
351
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
352
|
+
return {
|
|
353
|
+
path: urlPath,
|
|
354
|
+
method: 'POST',
|
|
355
|
+
headers: headerParameters,
|
|
356
|
+
query: queryParameters,
|
|
357
|
+
body: formParams,
|
|
358
|
+
};
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Upload a favicon image for portal branding
|
|
363
|
+
*/
|
|
364
|
+
postPortalFaviconUploadRaw(requestParameters, initOverrides) {
|
|
365
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
366
|
+
const requestOptions = yield this.postPortalFaviconUploadRequestOpts(requestParameters);
|
|
367
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
368
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPortalFaviconUploadFromJSON)(jsonValue));
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Upload a favicon image for portal branding
|
|
373
|
+
*/
|
|
374
|
+
postPortalFaviconUpload(requestParameters, initOverrides) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
const response = yield this.postPortalFaviconUploadRaw(requestParameters, initOverrides);
|
|
377
|
+
return yield response.value();
|
|
378
|
+
});
|
|
379
|
+
}
|
|
281
380
|
/**
|
|
282
381
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
283
382
|
*/
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetPortal, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
13
|
+
import type { GetPortal, GetPortalFaviconUpload, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
|
|
14
|
+
export interface DeletePortalFaviconRequest {
|
|
15
|
+
portalId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface DeletePortalLogoRequest {
|
|
15
18
|
portalId: string;
|
|
16
19
|
}
|
|
@@ -32,6 +35,10 @@ export interface InviteUserToPortalRequest {
|
|
|
32
35
|
export interface PostPortalRequest {
|
|
33
36
|
postPortal: PostPortal;
|
|
34
37
|
}
|
|
38
|
+
export interface PostPortalFaviconUploadRequest {
|
|
39
|
+
portalId: string;
|
|
40
|
+
file: Blob;
|
|
41
|
+
}
|
|
35
42
|
export interface PostPortalLogoUploadRequest {
|
|
36
43
|
portalId: string;
|
|
37
44
|
file: Blob;
|
|
@@ -47,6 +54,18 @@ export interface UpdateSelectedPortalRequest {
|
|
|
47
54
|
*
|
|
48
55
|
*/
|
|
49
56
|
export declare class PortalApi extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
59
|
+
*/
|
|
60
|
+
deletePortalFaviconRequestOpts(requestParameters: DeletePortalFaviconRequest): Promise<runtime.RequestOpts>;
|
|
61
|
+
/**
|
|
62
|
+
* Remove the portal favicon
|
|
63
|
+
*/
|
|
64
|
+
deletePortalFaviconRaw(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
65
|
+
/**
|
|
66
|
+
* Remove the portal favicon
|
|
67
|
+
*/
|
|
68
|
+
deletePortalFavicon(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
69
|
/**
|
|
51
70
|
* Creates request options for deletePortalLogo without sending the request
|
|
52
71
|
*/
|
|
@@ -119,6 +138,18 @@ export declare class PortalApi extends runtime.BaseAPI {
|
|
|
119
138
|
* Create a new portal as a child of the current selected portal
|
|
120
139
|
*/
|
|
121
140
|
postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
|
|
141
|
+
/**
|
|
142
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
143
|
+
*/
|
|
144
|
+
postPortalFaviconUploadRequestOpts(requestParameters: PostPortalFaviconUploadRequest): Promise<runtime.RequestOpts>;
|
|
145
|
+
/**
|
|
146
|
+
* Upload a favicon image for portal branding
|
|
147
|
+
*/
|
|
148
|
+
postPortalFaviconUploadRaw(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalFaviconUpload>>;
|
|
149
|
+
/**
|
|
150
|
+
* Upload a favicon image for portal branding
|
|
151
|
+
*/
|
|
152
|
+
postPortalFaviconUpload(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalFaviconUpload>;
|
|
122
153
|
/**
|
|
123
154
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
124
155
|
*/
|
|
@@ -21,11 +21,49 @@ 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, GetPortalLogoUploadFromJSON, GetPortalUserListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
24
|
+
import { GetPortalFromJSON, GetPortalFaviconUploadFromJSON, GetPortalListFromJSON, GetPortalLogoUploadFromJSON, GetPortalUserListFromJSON, PostPortalToJSON, PostPortalInviteToJSON, PutPortalBrandingToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class PortalApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
31
|
+
*/
|
|
32
|
+
deletePortalFaviconRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['portalId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling deletePortalFavicon().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
40
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
41
|
+
return {
|
|
42
|
+
path: urlPath,
|
|
43
|
+
method: 'DELETE',
|
|
44
|
+
headers: headerParameters,
|
|
45
|
+
query: queryParameters,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Remove the portal favicon
|
|
51
|
+
*/
|
|
52
|
+
deletePortalFaviconRaw(requestParameters, initOverrides) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const requestOptions = yield this.deletePortalFaviconRequestOpts(requestParameters);
|
|
55
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
56
|
+
return new runtime.VoidApiResponse(response);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Remove the portal favicon
|
|
61
|
+
*/
|
|
62
|
+
deletePortalFavicon(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield this.deletePortalFaviconRaw(requestParameters, initOverrides);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
29
67
|
/**
|
|
30
68
|
* Creates request options for deletePortalLogo without sending the request
|
|
31
69
|
*/
|
|
@@ -275,6 +313,67 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
275
313
|
return yield response.value();
|
|
276
314
|
});
|
|
277
315
|
}
|
|
316
|
+
/**
|
|
317
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
318
|
+
*/
|
|
319
|
+
postPortalFaviconUploadRequestOpts(requestParameters) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
if (requestParameters['portalId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling postPortalFaviconUpload().');
|
|
323
|
+
}
|
|
324
|
+
if (requestParameters['file'] == null) {
|
|
325
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postPortalFaviconUpload().');
|
|
326
|
+
}
|
|
327
|
+
const queryParameters = {};
|
|
328
|
+
const headerParameters = {};
|
|
329
|
+
const consumes = [
|
|
330
|
+
{ contentType: 'multipart/form-data' },
|
|
331
|
+
];
|
|
332
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
333
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
334
|
+
let formParams;
|
|
335
|
+
let useForm = false;
|
|
336
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
337
|
+
useForm = canConsumeForm;
|
|
338
|
+
if (useForm) {
|
|
339
|
+
formParams = new FormData();
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
formParams = new URLSearchParams();
|
|
343
|
+
}
|
|
344
|
+
if (requestParameters['file'] != null) {
|
|
345
|
+
formParams.append('file', requestParameters['file']);
|
|
346
|
+
}
|
|
347
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
348
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
349
|
+
return {
|
|
350
|
+
path: urlPath,
|
|
351
|
+
method: 'POST',
|
|
352
|
+
headers: headerParameters,
|
|
353
|
+
query: queryParameters,
|
|
354
|
+
body: formParams,
|
|
355
|
+
};
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Upload a favicon image for portal branding
|
|
360
|
+
*/
|
|
361
|
+
postPortalFaviconUploadRaw(requestParameters, initOverrides) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
const requestOptions = yield this.postPortalFaviconUploadRequestOpts(requestParameters);
|
|
364
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
365
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFaviconUploadFromJSON(jsonValue));
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Upload a favicon image for portal branding
|
|
370
|
+
*/
|
|
371
|
+
postPortalFaviconUpload(requestParameters, initOverrides) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
const response = yield this.postPortalFaviconUploadRaw(requestParameters, initOverrides);
|
|
374
|
+
return yield response.value();
|
|
375
|
+
});
|
|
376
|
+
}
|
|
278
377
|
/**
|
|
279
378
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
280
379
|
*/
|
|
@@ -49,6 +49,7 @@ export function GetPortalFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
49
|
'name': json['name'],
|
|
50
50
|
'parentPortalId': json['parent_portal_id'] == null ? undefined : json['parent_portal_id'],
|
|
51
51
|
'logoUrl': json['logo_url'] == null ? undefined : json['logo_url'],
|
|
52
|
+
'faviconUrl': json['favicon_url'] == null ? undefined : json['favicon_url'],
|
|
52
53
|
'headerBackgroundColor': json['header_background_color'],
|
|
53
54
|
'headerTextColor': json['header_text_color'],
|
|
54
55
|
'baseType': json['base_type'] == null ? undefined : json['base_type'],
|
|
@@ -66,6 +67,7 @@ export function GetPortalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
67
|
'name': value['name'],
|
|
67
68
|
'parent_portal_id': value['parentPortalId'],
|
|
68
69
|
'logo_url': value['logoUrl'],
|
|
70
|
+
'favicon_url': value['faviconUrl'],
|
|
69
71
|
'header_background_color': value['headerBackgroundColor'],
|
|
70
72
|
'header_text_color': value['headerTextColor'],
|
|
71
73
|
'base_type': value['baseType'],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetPortalFaviconUpload
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPortalFaviconUpload {
|
|
18
|
+
/**
|
|
19
|
+
* Presigned URL for the uploaded favicon image
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetPortalFaviconUpload
|
|
22
|
+
*/
|
|
23
|
+
faviconUrl: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfGetPortalFaviconUpload(value: object): value is GetPortalFaviconUpload;
|
|
29
|
+
export declare function GetPortalFaviconUploadFromJSON(json: any): GetPortalFaviconUpload;
|
|
30
|
+
export declare function GetPortalFaviconUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalFaviconUpload;
|
|
31
|
+
export declare function GetPortalFaviconUploadToJSON(json: any): GetPortalFaviconUpload;
|
|
32
|
+
export declare function GetPortalFaviconUploadToJSONTyped(value?: GetPortalFaviconUpload | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfGetPortalFaviconUpload(value) {
|
|
18
|
+
if (!('faviconUrl' in value) || value['faviconUrl'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function GetPortalFaviconUploadFromJSON(json) {
|
|
23
|
+
return GetPortalFaviconUploadFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function GetPortalFaviconUploadFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'faviconUrl': json['favicon_url'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function GetPortalFaviconUploadToJSON(json) {
|
|
34
|
+
return GetPortalFaviconUploadToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function GetPortalFaviconUploadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'favicon_url': value['faviconUrl'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -70,6 +70,7 @@ export * from './GetPortal';
|
|
|
70
70
|
export * from './GetPortalBasicReporting';
|
|
71
71
|
export * from './GetPortalBasicReportingCertificates';
|
|
72
72
|
export * from './GetPortalBasicReportingPortalInfo';
|
|
73
|
+
export * from './GetPortalFaviconUpload';
|
|
73
74
|
export * from './GetPortalList';
|
|
74
75
|
export * from './GetPortalLogoUpload';
|
|
75
76
|
export * from './GetPortalStudentReporting';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -72,6 +72,7 @@ export * from './GetPortal';
|
|
|
72
72
|
export * from './GetPortalBasicReporting';
|
|
73
73
|
export * from './GetPortalBasicReportingCertificates';
|
|
74
74
|
export * from './GetPortalBasicReportingPortalInfo';
|
|
75
|
+
export * from './GetPortalFaviconUpload';
|
|
75
76
|
export * from './GetPortalList';
|
|
76
77
|
export * from './GetPortalLogoUpload';
|
|
77
78
|
export * from './GetPortalStudentReporting';
|
package/dist/models/GetPortal.js
CHANGED
|
@@ -57,6 +57,7 @@ function GetPortalFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
57
|
'name': json['name'],
|
|
58
58
|
'parentPortalId': json['parent_portal_id'] == null ? undefined : json['parent_portal_id'],
|
|
59
59
|
'logoUrl': json['logo_url'] == null ? undefined : json['logo_url'],
|
|
60
|
+
'faviconUrl': json['favicon_url'] == null ? undefined : json['favicon_url'],
|
|
60
61
|
'headerBackgroundColor': json['header_background_color'],
|
|
61
62
|
'headerTextColor': json['header_text_color'],
|
|
62
63
|
'baseType': json['base_type'] == null ? undefined : json['base_type'],
|
|
@@ -74,6 +75,7 @@ function GetPortalToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
74
75
|
'name': value['name'],
|
|
75
76
|
'parent_portal_id': value['parentPortalId'],
|
|
76
77
|
'logo_url': value['logoUrl'],
|
|
78
|
+
'favicon_url': value['faviconUrl'],
|
|
77
79
|
'header_background_color': value['headerBackgroundColor'],
|
|
78
80
|
'header_text_color': value['headerTextColor'],
|
|
79
81
|
'base_type': value['baseType'],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetPortalFaviconUpload
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPortalFaviconUpload {
|
|
18
|
+
/**
|
|
19
|
+
* Presigned URL for the uploaded favicon image
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetPortalFaviconUpload
|
|
22
|
+
*/
|
|
23
|
+
faviconUrl: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfGetPortalFaviconUpload(value: object): value is GetPortalFaviconUpload;
|
|
29
|
+
export declare function GetPortalFaviconUploadFromJSON(json: any): GetPortalFaviconUpload;
|
|
30
|
+
export declare function GetPortalFaviconUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalFaviconUpload;
|
|
31
|
+
export declare function GetPortalFaviconUploadToJSON(json: any): GetPortalFaviconUpload;
|
|
32
|
+
export declare function GetPortalFaviconUploadToJSONTyped(value?: GetPortalFaviconUpload | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGetPortalFaviconUpload = instanceOfGetPortalFaviconUpload;
|
|
17
|
+
exports.GetPortalFaviconUploadFromJSON = GetPortalFaviconUploadFromJSON;
|
|
18
|
+
exports.GetPortalFaviconUploadFromJSONTyped = GetPortalFaviconUploadFromJSONTyped;
|
|
19
|
+
exports.GetPortalFaviconUploadToJSON = GetPortalFaviconUploadToJSON;
|
|
20
|
+
exports.GetPortalFaviconUploadToJSONTyped = GetPortalFaviconUploadToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGetPortalFaviconUpload(value) {
|
|
25
|
+
if (!('faviconUrl' in value) || value['faviconUrl'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function GetPortalFaviconUploadFromJSON(json) {
|
|
30
|
+
return GetPortalFaviconUploadFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function GetPortalFaviconUploadFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'faviconUrl': json['favicon_url'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function GetPortalFaviconUploadToJSON(json) {
|
|
41
|
+
return GetPortalFaviconUploadToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function GetPortalFaviconUploadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'favicon_url': value['faviconUrl'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export * from './GetPortal';
|
|
|
70
70
|
export * from './GetPortalBasicReporting';
|
|
71
71
|
export * from './GetPortalBasicReportingCertificates';
|
|
72
72
|
export * from './GetPortalBasicReportingPortalInfo';
|
|
73
|
+
export * from './GetPortalFaviconUpload';
|
|
73
74
|
export * from './GetPortalList';
|
|
74
75
|
export * from './GetPortalLogoUpload';
|
|
75
76
|
export * from './GetPortalStudentReporting';
|
package/dist/models/index.js
CHANGED
|
@@ -88,6 +88,7 @@ __exportStar(require("./GetPortal"), exports);
|
|
|
88
88
|
__exportStar(require("./GetPortalBasicReporting"), exports);
|
|
89
89
|
__exportStar(require("./GetPortalBasicReportingCertificates"), exports);
|
|
90
90
|
__exportStar(require("./GetPortalBasicReportingPortalInfo"), exports);
|
|
91
|
+
__exportStar(require("./GetPortalFaviconUpload"), exports);
|
|
91
92
|
__exportStar(require("./GetPortalList"), exports);
|
|
92
93
|
__exportStar(require("./GetPortalLogoUpload"), exports);
|
|
93
94
|
__exportStar(require("./GetPortalStudentReporting"), exports);
|
package/docs/GetPortal.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`parentPortalId` | string
|
|
12
12
|
`logoUrl` | string
|
|
13
|
+
`faviconUrl` | string
|
|
13
14
|
`headerBackgroundColor` | string
|
|
14
15
|
`headerTextColor` | string
|
|
15
16
|
`baseType` | string
|
|
@@ -25,6 +26,7 @@ const example = {
|
|
|
25
26
|
"name": null,
|
|
26
27
|
"parentPortalId": null,
|
|
27
28
|
"logoUrl": null,
|
|
29
|
+
"faviconUrl": null,
|
|
28
30
|
"headerBackgroundColor": null,
|
|
29
31
|
"headerTextColor": null,
|
|
30
32
|
"baseType": null,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# GetPortalFaviconUpload
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`faviconUrl` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { GetPortalFaviconUpload } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"faviconUrl": null,
|
|
19
|
+
} satisfies GetPortalFaviconUpload
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetPortalFaviconUpload
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/docs/PortalApi.md
CHANGED
|
@@ -4,18 +4,86 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deletePortalFavicon**](PortalApi.md#deleteportalfavicon) | **DELETE** /portals/{portalId}/branding/favicon | Remove the portal favicon |
|
|
7
8
|
| [**deletePortalLogo**](PortalApi.md#deleteportallogo) | **DELETE** /portals/{portalId}/branding/logo | Remove the portal logo |
|
|
8
9
|
| [**getPortalById**](PortalApi.md#getportalbyid) | **GET** /portals/{portalId} | Get a portal by id (can use \'current\' to get the current users selected portal) |
|
|
9
10
|
| [**getPortalList**](PortalApi.md#getportallist) | **GET** /portals | Get all portals a user has access to |
|
|
10
11
|
| [**getPortalUsers**](PortalApi.md#getportalusers) | **GET** /portals/{portalId}/users | Get all users for a portal with optional role filtering |
|
|
11
12
|
| [**inviteUserToPortal**](PortalApi.md#inviteusertoportal) | **POST** /portals/{portalId}/invite | Invite a new user to a portal |
|
|
12
13
|
| [**postPortal**](PortalApi.md#postportal) | **POST** /portals | Create a new portal as a child of the current selected portal |
|
|
14
|
+
| [**postPortalFaviconUpload**](PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding |
|
|
13
15
|
| [**postPortalLogoUpload**](PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding |
|
|
14
16
|
| [**putPortalBranding**](PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding (name, background color, text color) |
|
|
15
17
|
| [**updateSelectedPortal**](PortalApi.md#updateselectedportal) | **PUT** /portals/{portalId}/selected | Update the users current selected portal. Returns new JWT with updated roles. |
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
|
|
21
|
+
## deletePortalFavicon
|
|
22
|
+
|
|
23
|
+
> deletePortalFavicon(portalId)
|
|
24
|
+
|
|
25
|
+
Remove the portal favicon
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
PortalApi,
|
|
33
|
+
} from '@easyedu/js-lsm-api';
|
|
34
|
+
import type { DeletePortalFaviconRequest } from '@easyedu/js-lsm-api';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
38
|
+
const api = new PortalApi();
|
|
39
|
+
|
|
40
|
+
const body = {
|
|
41
|
+
// string
|
|
42
|
+
portalId: portalId_example,
|
|
43
|
+
} satisfies DeletePortalFaviconRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.deletePortalFavicon(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
`void` (Empty response body)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
No authorization required
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: Not defined
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### HTTP response details
|
|
79
|
+
| Status code | Description | Response headers |
|
|
80
|
+
|-------------|-------------|------------------|
|
|
81
|
+
| **204** | Favicon removed successfully | - |
|
|
82
|
+
| **404** | Portal not found | - |
|
|
83
|
+
|
|
84
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
|
+
|
|
86
|
+
|
|
19
87
|
## deletePortalLogo
|
|
20
88
|
|
|
21
89
|
> deletePortalLogo(portalId)
|
|
@@ -421,6 +489,76 @@ No authorization required
|
|
|
421
489
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
422
490
|
|
|
423
491
|
|
|
492
|
+
## postPortalFaviconUpload
|
|
493
|
+
|
|
494
|
+
> GetPortalFaviconUpload postPortalFaviconUpload(portalId, file)
|
|
495
|
+
|
|
496
|
+
Upload a favicon image for portal branding
|
|
497
|
+
|
|
498
|
+
### Example
|
|
499
|
+
|
|
500
|
+
```ts
|
|
501
|
+
import {
|
|
502
|
+
Configuration,
|
|
503
|
+
PortalApi,
|
|
504
|
+
} from '@easyedu/js-lsm-api';
|
|
505
|
+
import type { PostPortalFaviconUploadRequest } from '@easyedu/js-lsm-api';
|
|
506
|
+
|
|
507
|
+
async function example() {
|
|
508
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
509
|
+
const api = new PortalApi();
|
|
510
|
+
|
|
511
|
+
const body = {
|
|
512
|
+
// string
|
|
513
|
+
portalId: portalId_example,
|
|
514
|
+
// Blob | Favicon image file (PNG, ICO, or SVG). Max 1MB.
|
|
515
|
+
file: BINARY_DATA_HERE,
|
|
516
|
+
} satisfies PostPortalFaviconUploadRequest;
|
|
517
|
+
|
|
518
|
+
try {
|
|
519
|
+
const data = await api.postPortalFaviconUpload(body);
|
|
520
|
+
console.log(data);
|
|
521
|
+
} catch (error) {
|
|
522
|
+
console.error(error);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// Run the test
|
|
527
|
+
example().catch(console.error);
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Parameters
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
| Name | Type | Description | Notes |
|
|
534
|
+
|------------- | ------------- | ------------- | -------------|
|
|
535
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
536
|
+
| **file** | `Blob` | Favicon image file (PNG, ICO, or SVG). Max 1MB. | [Defaults to `undefined`] |
|
|
537
|
+
|
|
538
|
+
### Return type
|
|
539
|
+
|
|
540
|
+
[**GetPortalFaviconUpload**](GetPortalFaviconUpload.md)
|
|
541
|
+
|
|
542
|
+
### Authorization
|
|
543
|
+
|
|
544
|
+
No authorization required
|
|
545
|
+
|
|
546
|
+
### HTTP request headers
|
|
547
|
+
|
|
548
|
+
- **Content-Type**: `multipart/form-data`
|
|
549
|
+
- **Accept**: `application/json`
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
### HTTP response details
|
|
553
|
+
| Status code | Description | Response headers |
|
|
554
|
+
|-------------|-------------|------------------|
|
|
555
|
+
| **200** | Favicon uploaded successfully | - |
|
|
556
|
+
| **400** | Invalid file type or file too large | - |
|
|
557
|
+
| **404** | Portal not found | - |
|
|
558
|
+
|
|
559
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
560
|
+
|
|
561
|
+
|
|
424
562
|
## postPortalLogoUpload
|
|
425
563
|
|
|
426
564
|
> GetPortalLogoUpload postPortalLogoUpload(portalId, file)
|
package/package.json
CHANGED
package/src/apis/PortalApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
GetPortal,
|
|
19
|
+
GetPortalFaviconUpload,
|
|
19
20
|
GetPortalList,
|
|
20
21
|
GetPortalLogoUpload,
|
|
21
22
|
GetPortalUserList,
|
|
@@ -26,6 +27,8 @@ import type {
|
|
|
26
27
|
import {
|
|
27
28
|
GetPortalFromJSON,
|
|
28
29
|
GetPortalToJSON,
|
|
30
|
+
GetPortalFaviconUploadFromJSON,
|
|
31
|
+
GetPortalFaviconUploadToJSON,
|
|
29
32
|
GetPortalListFromJSON,
|
|
30
33
|
GetPortalListToJSON,
|
|
31
34
|
GetPortalLogoUploadFromJSON,
|
|
@@ -40,6 +43,10 @@ import {
|
|
|
40
43
|
PutPortalBrandingToJSON,
|
|
41
44
|
} from '../models/index';
|
|
42
45
|
|
|
46
|
+
export interface DeletePortalFaviconRequest {
|
|
47
|
+
portalId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
export interface DeletePortalLogoRequest {
|
|
44
51
|
portalId: string;
|
|
45
52
|
}
|
|
@@ -66,6 +73,11 @@ export interface PostPortalRequest {
|
|
|
66
73
|
postPortal: PostPortal;
|
|
67
74
|
}
|
|
68
75
|
|
|
76
|
+
export interface PostPortalFaviconUploadRequest {
|
|
77
|
+
portalId: string;
|
|
78
|
+
file: Blob;
|
|
79
|
+
}
|
|
80
|
+
|
|
69
81
|
export interface PostPortalLogoUploadRequest {
|
|
70
82
|
portalId: string;
|
|
71
83
|
file: Blob;
|
|
@@ -85,6 +97,50 @@ export interface UpdateSelectedPortalRequest {
|
|
|
85
97
|
*/
|
|
86
98
|
export class PortalApi extends runtime.BaseAPI {
|
|
87
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Creates request options for deletePortalFavicon without sending the request
|
|
102
|
+
*/
|
|
103
|
+
async deletePortalFaviconRequestOpts(requestParameters: DeletePortalFaviconRequest): Promise<runtime.RequestOpts> {
|
|
104
|
+
if (requestParameters['portalId'] == null) {
|
|
105
|
+
throw new runtime.RequiredError(
|
|
106
|
+
'portalId',
|
|
107
|
+
'Required parameter "portalId" was null or undefined when calling deletePortalFavicon().'
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const queryParameters: any = {};
|
|
112
|
+
|
|
113
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
117
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
path: urlPath,
|
|
121
|
+
method: 'DELETE',
|
|
122
|
+
headers: headerParameters,
|
|
123
|
+
query: queryParameters,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Remove the portal favicon
|
|
129
|
+
*/
|
|
130
|
+
async deletePortalFaviconRaw(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
131
|
+
const requestOptions = await this.deletePortalFaviconRequestOpts(requestParameters);
|
|
132
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
133
|
+
|
|
134
|
+
return new runtime.VoidApiResponse(response);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Remove the portal favicon
|
|
139
|
+
*/
|
|
140
|
+
async deletePortalFavicon(requestParameters: DeletePortalFaviconRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
141
|
+
await this.deletePortalFaviconRaw(requestParameters, initOverrides);
|
|
142
|
+
}
|
|
143
|
+
|
|
88
144
|
/**
|
|
89
145
|
* Creates request options for deletePortalLogo without sending the request
|
|
90
146
|
*/
|
|
@@ -377,6 +433,79 @@ export class PortalApi extends runtime.BaseAPI {
|
|
|
377
433
|
return await response.value();
|
|
378
434
|
}
|
|
379
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Creates request options for postPortalFaviconUpload without sending the request
|
|
438
|
+
*/
|
|
439
|
+
async postPortalFaviconUploadRequestOpts(requestParameters: PostPortalFaviconUploadRequest): Promise<runtime.RequestOpts> {
|
|
440
|
+
if (requestParameters['portalId'] == null) {
|
|
441
|
+
throw new runtime.RequiredError(
|
|
442
|
+
'portalId',
|
|
443
|
+
'Required parameter "portalId" was null or undefined when calling postPortalFaviconUpload().'
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (requestParameters['file'] == null) {
|
|
448
|
+
throw new runtime.RequiredError(
|
|
449
|
+
'file',
|
|
450
|
+
'Required parameter "file" was null or undefined when calling postPortalFaviconUpload().'
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const queryParameters: any = {};
|
|
455
|
+
|
|
456
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
457
|
+
|
|
458
|
+
const consumes: runtime.Consume[] = [
|
|
459
|
+
{ contentType: 'multipart/form-data' },
|
|
460
|
+
];
|
|
461
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
462
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
463
|
+
|
|
464
|
+
let formParams: { append(param: string, value: any): any };
|
|
465
|
+
let useForm = false;
|
|
466
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
467
|
+
useForm = canConsumeForm;
|
|
468
|
+
if (useForm) {
|
|
469
|
+
formParams = new FormData();
|
|
470
|
+
} else {
|
|
471
|
+
formParams = new URLSearchParams();
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (requestParameters['file'] != null) {
|
|
475
|
+
formParams.append('file', requestParameters['file'] as any);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
let urlPath = `/portals/{portalId}/branding/favicon`;
|
|
480
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
481
|
+
|
|
482
|
+
return {
|
|
483
|
+
path: urlPath,
|
|
484
|
+
method: 'POST',
|
|
485
|
+
headers: headerParameters,
|
|
486
|
+
query: queryParameters,
|
|
487
|
+
body: formParams,
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Upload a favicon image for portal branding
|
|
493
|
+
*/
|
|
494
|
+
async postPortalFaviconUploadRaw(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalFaviconUpload>> {
|
|
495
|
+
const requestOptions = await this.postPortalFaviconUploadRequestOpts(requestParameters);
|
|
496
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
497
|
+
|
|
498
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFaviconUploadFromJSON(jsonValue));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Upload a favicon image for portal branding
|
|
503
|
+
*/
|
|
504
|
+
async postPortalFaviconUpload(requestParameters: PostPortalFaviconUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalFaviconUpload> {
|
|
505
|
+
const response = await this.postPortalFaviconUploadRaw(requestParameters, initOverrides);
|
|
506
|
+
return await response.value();
|
|
507
|
+
}
|
|
508
|
+
|
|
380
509
|
/**
|
|
381
510
|
* Creates request options for postPortalLogoUpload without sending the request
|
|
382
511
|
*/
|
package/src/models/GetPortal.ts
CHANGED
|
@@ -43,6 +43,12 @@ export interface GetPortal {
|
|
|
43
43
|
* @memberof GetPortal
|
|
44
44
|
*/
|
|
45
45
|
logoUrl?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetPortal
|
|
50
|
+
*/
|
|
51
|
+
faviconUrl?: string | null;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {string}
|
|
@@ -104,6 +110,7 @@ export function GetPortalFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
104
110
|
'name': json['name'],
|
|
105
111
|
'parentPortalId': json['parent_portal_id'] == null ? undefined : json['parent_portal_id'],
|
|
106
112
|
'logoUrl': json['logo_url'] == null ? undefined : json['logo_url'],
|
|
113
|
+
'faviconUrl': json['favicon_url'] == null ? undefined : json['favicon_url'],
|
|
107
114
|
'headerBackgroundColor': json['header_background_color'],
|
|
108
115
|
'headerTextColor': json['header_text_color'],
|
|
109
116
|
'baseType': json['base_type'] == null ? undefined : json['base_type'],
|
|
@@ -125,6 +132,7 @@ export function GetPortalToJSONTyped(value?: GetPortal | null, ignoreDiscriminat
|
|
|
125
132
|
'name': value['name'],
|
|
126
133
|
'parent_portal_id': value['parentPortalId'],
|
|
127
134
|
'logo_url': value['logoUrl'],
|
|
135
|
+
'favicon_url': value['faviconUrl'],
|
|
128
136
|
'header_background_color': value['headerBackgroundColor'],
|
|
129
137
|
'header_text_color': value['headerTextColor'],
|
|
130
138
|
'base_type': value['baseType'],
|
|
@@ -0,0 +1,66 @@
|
|
|
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 GetPortalFaviconUpload
|
|
20
|
+
*/
|
|
21
|
+
export interface GetPortalFaviconUpload {
|
|
22
|
+
/**
|
|
23
|
+
* Presigned URL for the uploaded favicon image
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetPortalFaviconUpload
|
|
26
|
+
*/
|
|
27
|
+
faviconUrl: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the GetPortalFaviconUpload interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfGetPortalFaviconUpload(value: object): value is GetPortalFaviconUpload {
|
|
34
|
+
if (!('faviconUrl' in value) || value['faviconUrl'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function GetPortalFaviconUploadFromJSON(json: any): GetPortalFaviconUpload {
|
|
39
|
+
return GetPortalFaviconUploadFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function GetPortalFaviconUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalFaviconUpload {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'faviconUrl': json['favicon_url'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function GetPortalFaviconUploadToJSON(json: any): GetPortalFaviconUpload {
|
|
53
|
+
return GetPortalFaviconUploadToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function GetPortalFaviconUploadToJSONTyped(value?: GetPortalFaviconUpload | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'favicon_url': value['faviconUrl'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -72,6 +72,7 @@ export * from './GetPortal';
|
|
|
72
72
|
export * from './GetPortalBasicReporting';
|
|
73
73
|
export * from './GetPortalBasicReportingCertificates';
|
|
74
74
|
export * from './GetPortalBasicReportingPortalInfo';
|
|
75
|
+
export * from './GetPortalFaviconUpload';
|
|
75
76
|
export * from './GetPortalList';
|
|
76
77
|
export * from './GetPortalLogoUpload';
|
|
77
78
|
export * from './GetPortalStudentReporting';
|