@easyedu/js-lsm-api 1.56.0 → 1.58.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 +8 -2
- package/dist/apis/PortalApi.d.ts +32 -1
- package/dist/apis/PortalApi.js +99 -0
- package/dist/apis/UserApi.d.ts +32 -1
- package/dist/apis/UserApi.js +99 -0
- package/dist/esm/apis/PortalApi.d.ts +32 -1
- package/dist/esm/apis/PortalApi.js +100 -1
- package/dist/esm/apis/UserApi.d.ts +32 -1
- package/dist/esm/apis/UserApi.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/GetUser.d.ts +6 -0
- package/dist/esm/models/GetUser.js +2 -0
- package/dist/esm/models/GetUserAvatarUpload.d.ts +32 -0
- package/dist/esm/models/GetUserAvatarUpload.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -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/GetUser.d.ts +6 -0
- package/dist/models/GetUser.js +2 -0
- package/dist/models/GetUserAvatarUpload.d.ts +32 -0
- package/dist/models/GetUserAvatarUpload.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/GetPortal.md +2 -0
- package/docs/GetPortalFaviconUpload.md +34 -0
- package/docs/GetUser.md +2 -0
- package/docs/GetUserAvatarUpload.md +34 -0
- package/docs/PortalApi.md +138 -0
- package/docs/UserApi.md +138 -0
- package/package.json +1 -1
- package/src/apis/PortalApi.ts +129 -0
- package/src/apis/UserApi.ts +129 -0
- package/src/models/GetPortal.ts +8 -0
- package/src/models/GetPortalFaviconUpload.ts +66 -0
- package/src/models/GetUser.ts +8 -0
- package/src/models/GetUserAvatarUpload.ts +66 -0
- package/src/models/index.ts +2 -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
|
|
@@ -149,6 +150,7 @@ docs/GetSupportTicketAttachment.md
|
|
|
149
150
|
docs/GetSupportTicketComment.md
|
|
150
151
|
docs/GetSupportTicketList.md
|
|
151
152
|
docs/GetUser.md
|
|
153
|
+
docs/GetUserAvatarUpload.md
|
|
152
154
|
docs/GetUserQuizAttempts.md
|
|
153
155
|
docs/GetUserQuizAttemptsAllOfAttempts.md
|
|
154
156
|
docs/GetUserQuizAttemptsAllOfFilters.md
|
|
@@ -362,6 +364,7 @@ src/models/GetPortal.ts
|
|
|
362
364
|
src/models/GetPortalBasicReporting.ts
|
|
363
365
|
src/models/GetPortalBasicReportingCertificates.ts
|
|
364
366
|
src/models/GetPortalBasicReportingPortalInfo.ts
|
|
367
|
+
src/models/GetPortalFaviconUpload.ts
|
|
365
368
|
src/models/GetPortalList.ts
|
|
366
369
|
src/models/GetPortalLogoUpload.ts
|
|
367
370
|
src/models/GetPortalStudentReporting.ts
|
|
@@ -431,6 +434,7 @@ src/models/GetSupportTicketAttachment.ts
|
|
|
431
434
|
src/models/GetSupportTicketComment.ts
|
|
432
435
|
src/models/GetSupportTicketList.ts
|
|
433
436
|
src/models/GetUser.ts
|
|
437
|
+
src/models/GetUserAvatarUpload.ts
|
|
434
438
|
src/models/GetUserQuizAttempts.ts
|
|
435
439
|
src/models/GetUserQuizAttemptsAllOfAttempts.ts
|
|
436
440
|
src/models/GetUserQuizAttemptsAllOfFilters.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.58.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.
|
|
@@ -200,11 +202,13 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
200
202
|
*SupportTicketApi* | [**postSupportTicketAttachment**](docs/SupportTicketApi.md#postsupportticketattachment) | **POST** /support/tickets/{ticketId}/attachments | Upload an attachment to a ticket
|
|
201
203
|
*SupportTicketApi* | [**postSupportTicketComment**](docs/SupportTicketApi.md#postsupportticketcomment) | **POST** /support/tickets/{ticketId}/comments | Add a comment to a ticket
|
|
202
204
|
*SupportTicketApi* | [**putSupportTicket**](docs/SupportTicketApi.md#putsupportticket) | **PUT** /support/tickets/{ticketId} | Update a support ticket
|
|
205
|
+
*UserApi* | [**deleteUserAvatar**](docs/UserApi.md#deleteuseravatar) | **DELETE** /users/{userId}/avatar | Remove the current user\'s profile photo
|
|
203
206
|
*UserApi* | [**getAuthCheck**](docs/UserApi.md#getauthcheck) | **GET** /auth/check | Check if a user is logged in
|
|
204
207
|
*UserApi* | [**getCurrentUserPermissions**](docs/UserApi.md#getcurrentuserpermissions) | **GET** /users/current/permissions | Get the current user\'s permissions
|
|
205
208
|
*UserApi* | [**getUser**](docs/UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id
|
|
206
209
|
*UserApi* | [**postLogin**](docs/UserApi.md#postlogin) | **POST** /auth/login | Post a new login
|
|
207
210
|
*UserApi* | [**postLogout**](docs/UserApi.md#postlogout) | **POST** /auth/logout | Logout a user
|
|
211
|
+
*UserApi* | [**postUserAvatarUpload**](docs/UserApi.md#postuseravatarupload) | **POST** /users/{userId}/avatar | Upload a profile photo for the current user
|
|
208
212
|
*UserApi* | [**putUser**](docs/UserApi.md#putuser) | **PUT** /users/{userId} | Update a user by id
|
|
209
213
|
*UserApi* | [**resetPassword**](docs/UserApi.md#resetpassword) | **POST** /auth/reset-password | Reset a users password
|
|
210
214
|
*UserApi* | [**sendResetPassword**](docs/UserApi.md#sendresetpassword) | **POST** /auth/send-reset-password | Send a reset password email
|
|
@@ -284,6 +288,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
284
288
|
- [GetPortalBasicReporting](docs/GetPortalBasicReporting.md)
|
|
285
289
|
- [GetPortalBasicReportingCertificates](docs/GetPortalBasicReportingCertificates.md)
|
|
286
290
|
- [GetPortalBasicReportingPortalInfo](docs/GetPortalBasicReportingPortalInfo.md)
|
|
291
|
+
- [GetPortalFaviconUpload](docs/GetPortalFaviconUpload.md)
|
|
287
292
|
- [GetPortalList](docs/GetPortalList.md)
|
|
288
293
|
- [GetPortalLogoUpload](docs/GetPortalLogoUpload.md)
|
|
289
294
|
- [GetPortalStudentReporting](docs/GetPortalStudentReporting.md)
|
|
@@ -353,6 +358,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
353
358
|
- [GetSupportTicketComment](docs/GetSupportTicketComment.md)
|
|
354
359
|
- [GetSupportTicketList](docs/GetSupportTicketList.md)
|
|
355
360
|
- [GetUser](docs/GetUser.md)
|
|
361
|
+
- [GetUserAvatarUpload](docs/GetUserAvatarUpload.md)
|
|
356
362
|
- [GetUserQuizAttempts](docs/GetUserQuizAttempts.md)
|
|
357
363
|
- [GetUserQuizAttemptsAllOfAttempts](docs/GetUserQuizAttemptsAllOfAttempts.md)
|
|
358
364
|
- [GetUserQuizAttemptsAllOfFilters](docs/GetUserQuizAttemptsAllOfFilters.md)
|
|
@@ -478,7 +484,7 @@ and is automatically generated by the
|
|
|
478
484
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
479
485
|
|
|
480
486
|
- API version: `1.0.0`
|
|
481
|
-
- Package version: `1.
|
|
487
|
+
- Package version: `1.58.0`
|
|
482
488
|
- Generator version: `7.21.0`
|
|
483
489
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
484
490
|
|
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
|
*/
|
package/dist/apis/UserApi.d.ts
CHANGED
|
@@ -10,13 +10,20 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetUser, LoginRes, PostLogin, PostResetPassword, PostSendResetPassword, PutUser } from '../models/index';
|
|
13
|
+
import type { GetUser, GetUserAvatarUpload, LoginRes, PostLogin, PostResetPassword, PostSendResetPassword, PutUser } from '../models/index';
|
|
14
|
+
export interface DeleteUserAvatarRequest {
|
|
15
|
+
userId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface GetUserRequest {
|
|
15
18
|
userId: string;
|
|
16
19
|
}
|
|
17
20
|
export interface PostLoginRequest {
|
|
18
21
|
postLogin: PostLogin;
|
|
19
22
|
}
|
|
23
|
+
export interface PostUserAvatarUploadRequest {
|
|
24
|
+
userId: string;
|
|
25
|
+
file: Blob;
|
|
26
|
+
}
|
|
20
27
|
export interface PutUserRequest {
|
|
21
28
|
userId: string;
|
|
22
29
|
putUser: Omit<PutUser, 'id' | 'last_updated'>;
|
|
@@ -31,6 +38,18 @@ export interface SendResetPasswordRequest {
|
|
|
31
38
|
*
|
|
32
39
|
*/
|
|
33
40
|
export declare class UserApi extends runtime.BaseAPI {
|
|
41
|
+
/**
|
|
42
|
+
* Creates request options for deleteUserAvatar without sending the request
|
|
43
|
+
*/
|
|
44
|
+
deleteUserAvatarRequestOpts(requestParameters: DeleteUserAvatarRequest): Promise<runtime.RequestOpts>;
|
|
45
|
+
/**
|
|
46
|
+
* Remove the current user\'s profile photo
|
|
47
|
+
*/
|
|
48
|
+
deleteUserAvatarRaw(requestParameters: DeleteUserAvatarRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
49
|
+
/**
|
|
50
|
+
* Remove the current user\'s profile photo
|
|
51
|
+
*/
|
|
52
|
+
deleteUserAvatar(requestParameters: DeleteUserAvatarRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
34
53
|
/**
|
|
35
54
|
* Creates request options for getAuthCheck without sending the request
|
|
36
55
|
*/
|
|
@@ -93,6 +112,18 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
93
112
|
* Logout a user
|
|
94
113
|
*/
|
|
95
114
|
postLogout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Creates request options for postUserAvatarUpload without sending the request
|
|
117
|
+
*/
|
|
118
|
+
postUserAvatarUploadRequestOpts(requestParameters: PostUserAvatarUploadRequest): Promise<runtime.RequestOpts>;
|
|
119
|
+
/**
|
|
120
|
+
* Upload a profile photo for the current user
|
|
121
|
+
*/
|
|
122
|
+
postUserAvatarUploadRaw(requestParameters: PostUserAvatarUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserAvatarUpload>>;
|
|
123
|
+
/**
|
|
124
|
+
* Upload a profile photo for the current user
|
|
125
|
+
*/
|
|
126
|
+
postUserAvatarUpload(requestParameters: PostUserAvatarUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserAvatarUpload>;
|
|
96
127
|
/**
|
|
97
128
|
* Creates request options for putUser without sending the request
|
|
98
129
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -29,6 +29,44 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class UserApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for deleteUserAvatar without sending the request
|
|
34
|
+
*/
|
|
35
|
+
deleteUserAvatarRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['userId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserAvatar().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
let urlPath = `/users/{userId}/avatar`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'DELETE',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Remove the current user\'s profile photo
|
|
54
|
+
*/
|
|
55
|
+
deleteUserAvatarRaw(requestParameters, initOverrides) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const requestOptions = yield this.deleteUserAvatarRequestOpts(requestParameters);
|
|
58
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
59
|
+
return new runtime.VoidApiResponse(response);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Remove the current user\'s profile photo
|
|
64
|
+
*/
|
|
65
|
+
deleteUserAvatar(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
yield this.deleteUserAvatarRaw(requestParameters, initOverrides);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
32
70
|
/**
|
|
33
71
|
* Creates request options for getAuthCheck without sending the request
|
|
34
72
|
*/
|
|
@@ -213,6 +251,67 @@ class UserApi extends runtime.BaseAPI {
|
|
|
213
251
|
yield this.postLogoutRaw(initOverrides);
|
|
214
252
|
});
|
|
215
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Creates request options for postUserAvatarUpload without sending the request
|
|
256
|
+
*/
|
|
257
|
+
postUserAvatarUploadRequestOpts(requestParameters) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
if (requestParameters['userId'] == null) {
|
|
260
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling postUserAvatarUpload().');
|
|
261
|
+
}
|
|
262
|
+
if (requestParameters['file'] == null) {
|
|
263
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postUserAvatarUpload().');
|
|
264
|
+
}
|
|
265
|
+
const queryParameters = {};
|
|
266
|
+
const headerParameters = {};
|
|
267
|
+
const consumes = [
|
|
268
|
+
{ contentType: 'multipart/form-data' },
|
|
269
|
+
];
|
|
270
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
271
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
272
|
+
let formParams;
|
|
273
|
+
let useForm = false;
|
|
274
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
275
|
+
useForm = canConsumeForm;
|
|
276
|
+
if (useForm) {
|
|
277
|
+
formParams = new FormData();
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
formParams = new URLSearchParams();
|
|
281
|
+
}
|
|
282
|
+
if (requestParameters['file'] != null) {
|
|
283
|
+
formParams.append('file', requestParameters['file']);
|
|
284
|
+
}
|
|
285
|
+
let urlPath = `/users/{userId}/avatar`;
|
|
286
|
+
urlPath = urlPath.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
287
|
+
return {
|
|
288
|
+
path: urlPath,
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
body: formParams,
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Upload a profile photo for the current user
|
|
298
|
+
*/
|
|
299
|
+
postUserAvatarUploadRaw(requestParameters, initOverrides) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
const requestOptions = yield this.postUserAvatarUploadRequestOpts(requestParameters);
|
|
302
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
303
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetUserAvatarUploadFromJSON)(jsonValue));
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Upload a profile photo for the current user
|
|
308
|
+
*/
|
|
309
|
+
postUserAvatarUpload(requestParameters, initOverrides) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
const response = yield this.postUserAvatarUploadRaw(requestParameters, initOverrides);
|
|
312
|
+
return yield response.value();
|
|
313
|
+
});
|
|
314
|
+
}
|
|
216
315
|
/**
|
|
217
316
|
* Creates request options for putUser without sending the request
|
|
218
317
|
*/
|
|
@@ -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
|
*/
|