@easyedu/js-lsm-api 1.39.0 → 1.41.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.
Files changed (78) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +24 -9
  3. package/dist/apis/ChatApi.d.ts +95 -0
  4. package/dist/apis/ChatApi.js +235 -0
  5. package/dist/apis/PortalApi.d.ts +32 -1
  6. package/dist/apis/PortalApi.js +99 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/ChatApi.d.ts +95 -0
  10. package/dist/esm/apis/ChatApi.js +231 -0
  11. package/dist/esm/apis/PortalApi.d.ts +32 -1
  12. package/dist/esm/apis/PortalApi.js +100 -1
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/GetChatMessage.d.ts +44 -0
  16. package/dist/esm/models/GetChatMessage.js +51 -0
  17. package/dist/esm/models/GetConversation.d.ts +50 -0
  18. package/dist/esm/models/GetConversation.js +53 -0
  19. package/dist/esm/models/GetConversationList.d.ts +57 -0
  20. package/dist/esm/models/GetConversationList.js +60 -0
  21. package/dist/esm/models/GetPortal.d.ts +1 -1
  22. package/dist/esm/models/GetPortal.js +1 -3
  23. package/dist/esm/models/GetPortalLogoUpload.d.ts +32 -0
  24. package/dist/esm/models/GetPortalLogoUpload.js +43 -0
  25. package/dist/esm/models/PostConversation.d.ts +32 -0
  26. package/dist/esm/models/PostConversation.js +43 -0
  27. package/dist/esm/models/PostConversationResponse.d.ts +44 -0
  28. package/dist/esm/models/PostConversationResponse.js +51 -0
  29. package/dist/esm/models/PostMessage.d.ts +32 -0
  30. package/dist/esm/models/PostMessage.js +43 -0
  31. package/dist/esm/models/PostMessageResponse.d.ts +38 -0
  32. package/dist/esm/models/PostMessageResponse.js +47 -0
  33. package/dist/esm/models/index.d.ts +8 -0
  34. package/dist/esm/models/index.js +8 -0
  35. package/dist/models/GetChatMessage.d.ts +44 -0
  36. package/dist/models/GetChatMessage.js +58 -0
  37. package/dist/models/GetConversation.d.ts +50 -0
  38. package/dist/models/GetConversation.js +60 -0
  39. package/dist/models/GetConversationList.d.ts +57 -0
  40. package/dist/models/GetConversationList.js +67 -0
  41. package/dist/models/GetPortal.d.ts +1 -1
  42. package/dist/models/GetPortal.js +1 -3
  43. package/dist/models/GetPortalLogoUpload.d.ts +32 -0
  44. package/dist/models/GetPortalLogoUpload.js +50 -0
  45. package/dist/models/PostConversation.d.ts +32 -0
  46. package/dist/models/PostConversation.js +50 -0
  47. package/dist/models/PostConversationResponse.d.ts +44 -0
  48. package/dist/models/PostConversationResponse.js +58 -0
  49. package/dist/models/PostMessage.d.ts +32 -0
  50. package/dist/models/PostMessage.js +50 -0
  51. package/dist/models/PostMessageResponse.d.ts +38 -0
  52. package/dist/models/PostMessageResponse.js +54 -0
  53. package/dist/models/index.d.ts +8 -0
  54. package/dist/models/index.js +8 -0
  55. package/docs/ChatApi.md +357 -0
  56. package/docs/GetChatMessage.md +38 -0
  57. package/docs/GetConversation.md +40 -0
  58. package/docs/GetConversationList.md +42 -0
  59. package/docs/GetPortalLogoUpload.md +34 -0
  60. package/docs/PortalApi.md +138 -0
  61. package/docs/PostConversation.md +34 -0
  62. package/docs/PostConversationResponse.md +38 -0
  63. package/docs/PostMessage.md +34 -0
  64. package/docs/PostMessageResponse.md +36 -0
  65. package/package.json +1 -1
  66. package/src/apis/ChatApi.ts +303 -0
  67. package/src/apis/PortalApi.ts +129 -0
  68. package/src/apis/index.ts +1 -0
  69. package/src/models/GetChatMessage.ts +84 -0
  70. package/src/models/GetConversation.ts +92 -0
  71. package/src/models/GetConversationList.ts +110 -0
  72. package/src/models/GetPortal.ts +2 -3
  73. package/src/models/GetPortalLogoUpload.ts +66 -0
  74. package/src/models/PostConversation.ts +66 -0
  75. package/src/models/PostConversationResponse.ts +84 -0
  76. package/src/models/PostMessage.ts +66 -0
  77. package/src/models/PostMessageResponse.ts +75 -0
  78. package/src/models/index.ts +8 -0
@@ -2,6 +2,7 @@
2
2
  .npmignore
3
3
  .openapi-generator-ignore
4
4
  README.md
5
+ docs/ChatApi.md
5
6
  docs/ContentApi.md
6
7
  docs/CourseApi.md
7
8
  docs/CriteriaBasedSelection.md
@@ -11,6 +12,7 @@ docs/Essay.md
11
12
  docs/Essay1.md
12
13
  docs/FillInBlank.md
13
14
  docs/FillInBlank1.md
15
+ docs/GetChatMessage.md
14
16
  docs/GetContent.md
15
17
  docs/GetContentContentData.md
16
18
  docs/GetContentGradeDetail.md
@@ -35,6 +37,8 @@ docs/GetContentVersionList.md
35
37
  docs/GetContentVersionListItemsInner.md
36
38
  docs/GetContentVersionSandbox.md
37
39
  docs/GetContentVersionScormData.md
40
+ docs/GetConversation.md
41
+ docs/GetConversationList.md
38
42
  docs/GetCourse.md
39
43
  docs/GetCourseEnrollment.md
40
44
  docs/GetCourseEnrollmentList.md
@@ -64,6 +68,7 @@ docs/GetPortalBasicReporting.md
64
68
  docs/GetPortalBasicReportingCertificates.md
65
69
  docs/GetPortalBasicReportingPortalInfo.md
66
70
  docs/GetPortalList.md
71
+ docs/GetPortalLogoUpload.md
67
72
  docs/GetPortalStudentReporting.md
68
73
  docs/GetPortalStudentReportingCertificates.md
69
74
  docs/GetPortalStudentReportingPortalInfo.md
@@ -154,11 +159,15 @@ docs/PostContentQuizQuestionSelection.md
154
159
  docs/PostContentQuizSettings.md
155
160
  docs/PostContentSession.md
156
161
  docs/PostContentUpload.md
162
+ docs/PostConversation.md
163
+ docs/PostConversationResponse.md
157
164
  docs/PostCourse.md
158
165
  docs/PostCourseEnrollment.md
159
166
  docs/PostCourseExport.md
160
167
  docs/PostLogin.md
161
168
  docs/PostManualQuestionSelection.md
169
+ docs/PostMessage.md
170
+ docs/PostMessageResponse.md
162
171
  docs/PostModule.md
163
172
  docs/PostPortal.md
164
173
  docs/PostPortalInvite.md
@@ -222,6 +231,7 @@ docs/ShortAnswer1.md
222
231
  docs/SingleAnswer.md
223
232
  docs/UserApi.md
224
233
  package.json
234
+ src/apis/ChatApi.ts
225
235
  src/apis/ContentApi.ts
226
236
  src/apis/CourseApi.ts
227
237
  src/apis/ModuleApi.ts
@@ -241,6 +251,7 @@ src/models/Essay.ts
241
251
  src/models/Essay1.ts
242
252
  src/models/FillInBlank.ts
243
253
  src/models/FillInBlank1.ts
254
+ src/models/GetChatMessage.ts
244
255
  src/models/GetContent.ts
245
256
  src/models/GetContentContentData.ts
246
257
  src/models/GetContentGradeDetail.ts
@@ -265,6 +276,8 @@ src/models/GetContentVersionList.ts
265
276
  src/models/GetContentVersionListItemsInner.ts
266
277
  src/models/GetContentVersionSandbox.ts
267
278
  src/models/GetContentVersionScormData.ts
279
+ src/models/GetConversation.ts
280
+ src/models/GetConversationList.ts
268
281
  src/models/GetCourse.ts
269
282
  src/models/GetCourseEnrollment.ts
270
283
  src/models/GetCourseEnrollmentList.ts
@@ -294,6 +307,7 @@ src/models/GetPortalBasicReporting.ts
294
307
  src/models/GetPortalBasicReportingCertificates.ts
295
308
  src/models/GetPortalBasicReportingPortalInfo.ts
296
309
  src/models/GetPortalList.ts
310
+ src/models/GetPortalLogoUpload.ts
297
311
  src/models/GetPortalStudentReporting.ts
298
312
  src/models/GetPortalStudentReportingCertificates.ts
299
313
  src/models/GetPortalStudentReportingPortalInfo.ts
@@ -381,11 +395,15 @@ src/models/PostContentQuizQuestionSelection.ts
381
395
  src/models/PostContentQuizSettings.ts
382
396
  src/models/PostContentSession.ts
383
397
  src/models/PostContentUpload.ts
398
+ src/models/PostConversation.ts
399
+ src/models/PostConversationResponse.ts
384
400
  src/models/PostCourse.ts
385
401
  src/models/PostCourseEnrollment.ts
386
402
  src/models/PostCourseExport.ts
387
403
  src/models/PostLogin.ts
388
404
  src/models/PostManualQuestionSelection.ts
405
+ src/models/PostMessage.ts
406
+ src/models/PostMessageResponse.ts
389
407
  src/models/PostModule.ts
390
408
  src/models/PostPortal.ts
391
409
  src/models/PostPortalInvite.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.39.0
1
+ # @easyedu/js-lsm-api@1.41.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -16,21 +16,21 @@ Next, try it out.
16
16
  ```ts
17
17
  import {
18
18
  Configuration,
19
- ContentApi,
19
+ ChatApi,
20
20
  } from '@easyedu/js-lsm-api';
21
- import type { CommitScormSessionRequest } from '@easyedu/js-lsm-api';
21
+ import type { DeleteConversationRequest } from '@easyedu/js-lsm-api';
22
22
 
23
23
  async function example() {
24
24
  console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
25
- const api = new ContentApi();
25
+ const api = new ChatApi();
26
26
 
27
27
  const body = {
28
- // string | The external_id of the SCORM session
29
- scormSessionId: scormSessionId_example,
30
- } satisfies CommitScormSessionRequest;
28
+ // string
29
+ conversationId: conversationId_example,
30
+ } satisfies DeleteConversationRequest;
31
31
 
32
32
  try {
33
- const data = await api.commitScormSession(body);
33
+ const data = await api.deleteConversation(body);
34
34
  console.log(data);
35
35
  } catch (error) {
36
36
  console.error(error);
@@ -50,6 +50,11 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
50
50
 
51
51
  | Class | Method | HTTP request | Description
52
52
  | ----- | ------ | ------------ | -------------
53
+ *ChatApi* | [**deleteConversation**](docs/ChatApi.md#deleteconversation) | **DELETE** /chat/conversations/{conversationId} | Delete a conversation
54
+ *ChatApi* | [**getConversationMessages**](docs/ChatApi.md#getconversationmessages) | **GET** /chat/conversations/{conversationId}/messages | Get all messages in a conversation
55
+ *ChatApi* | [**getConversations**](docs/ChatApi.md#getconversations) | **GET** /chat/conversations | List conversations for the current user
56
+ *ChatApi* | [**postConversation**](docs/ChatApi.md#postconversation) | **POST** /chat/conversations | Create a new conversation
57
+ *ChatApi* | [**postMessage**](docs/ChatApi.md#postmessage) | **POST** /chat/conversations/{conversationId}/messages | Send a message to a conversation
53
58
  *ContentApi* | [**commitScormSession**](docs/ContentApi.md#commitscormsession) | **POST** /scorm/sessions/{scormSessionId}/commit | Commit SCORM session data
54
59
  *ContentApi* | [**getContent**](docs/ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content
55
60
  *ContentApi* | [**getContentList**](docs/ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list
@@ -89,11 +94,13 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
89
94
  *ModuleApi* | [**postModule**](docs/ModuleApi.md#postmodule) | **POST** /courses/{courseId}/modules | Post a new module
90
95
  *ModuleApi* | [**putModule**](docs/ModuleApi.md#putmodule) | **PUT** /courses/{courseId}/modules/{moduleId} | Update a module by id
91
96
  *OtherApi* | [**getHealth**](docs/OtherApi.md#gethealth) | **GET** /healthcheck | Health check endpoint
97
+ *PortalApi* | [**deletePortalLogo**](docs/PortalApi.md#deleteportallogo) | **DELETE** /portals/{portalId}/branding/logo | Remove the portal logo
92
98
  *PortalApi* | [**getPortalById**](docs/PortalApi.md#getportalbyid) | **GET** /portals/{portalId} | Get a portal by id (can use \'current\' to get the current users selected portal)
93
99
  *PortalApi* | [**getPortalList**](docs/PortalApi.md#getportallist) | **GET** /portals | Get all portals a user has access to
94
100
  *PortalApi* | [**getPortalUsers**](docs/PortalApi.md#getportalusers) | **GET** /portals/{portalId}/users | Get all users for a portal with optional role filtering
95
101
  *PortalApi* | [**inviteUserToPortal**](docs/PortalApi.md#inviteusertoportal) | **POST** /portals/{portalId}/invite | Invite a new user to a portal
96
102
  *PortalApi* | [**postPortal**](docs/PortalApi.md#postportal) | **POST** /portals | Create a new portal as a child of the current selected portal
103
+ *PortalApi* | [**postPortalLogoUpload**](docs/PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding
97
104
  *PortalApi* | [**putPortalBranding**](docs/PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding (name, background color, text color)
98
105
  *PortalApi* | [**updateSelectedPortal**](docs/PortalApi.md#updateselectedportal) | **PUT** /portals/{portalId}/selected | Update the users current selected portal. Returns new JWT with updated roles.
99
106
  *QuestionApi* | [**deleteQuestion**](docs/QuestionApi.md#deletequestion) | **DELETE** /questions/{questionId} | Delete a question by ID
@@ -165,6 +172,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
165
172
  - [Essay1](docs/Essay1.md)
166
173
  - [FillInBlank](docs/FillInBlank.md)
167
174
  - [FillInBlank1](docs/FillInBlank1.md)
175
+ - [GetChatMessage](docs/GetChatMessage.md)
168
176
  - [GetContent](docs/GetContent.md)
169
177
  - [GetContentContentData](docs/GetContentContentData.md)
170
178
  - [GetContentGradeDetail](docs/GetContentGradeDetail.md)
@@ -189,6 +197,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
189
197
  - [GetContentVersionListItemsInner](docs/GetContentVersionListItemsInner.md)
190
198
  - [GetContentVersionSandbox](docs/GetContentVersionSandbox.md)
191
199
  - [GetContentVersionScormData](docs/GetContentVersionScormData.md)
200
+ - [GetConversation](docs/GetConversation.md)
201
+ - [GetConversationList](docs/GetConversationList.md)
192
202
  - [GetCourse](docs/GetCourse.md)
193
203
  - [GetCourseEnrollment](docs/GetCourseEnrollment.md)
194
204
  - [GetCourseEnrollmentList](docs/GetCourseEnrollmentList.md)
@@ -218,6 +228,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
218
228
  - [GetPortalBasicReportingCertificates](docs/GetPortalBasicReportingCertificates.md)
219
229
  - [GetPortalBasicReportingPortalInfo](docs/GetPortalBasicReportingPortalInfo.md)
220
230
  - [GetPortalList](docs/GetPortalList.md)
231
+ - [GetPortalLogoUpload](docs/GetPortalLogoUpload.md)
221
232
  - [GetPortalStudentReporting](docs/GetPortalStudentReporting.md)
222
233
  - [GetPortalStudentReportingCertificates](docs/GetPortalStudentReportingCertificates.md)
223
234
  - [GetPortalStudentReportingPortalInfo](docs/GetPortalStudentReportingPortalInfo.md)
@@ -305,11 +316,15 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
305
316
  - [PostContentQuizSettings](docs/PostContentQuizSettings.md)
306
317
  - [PostContentSession](docs/PostContentSession.md)
307
318
  - [PostContentUpload](docs/PostContentUpload.md)
319
+ - [PostConversation](docs/PostConversation.md)
320
+ - [PostConversationResponse](docs/PostConversationResponse.md)
308
321
  - [PostCourse](docs/PostCourse.md)
309
322
  - [PostCourseEnrollment](docs/PostCourseEnrollment.md)
310
323
  - [PostCourseExport](docs/PostCourseExport.md)
311
324
  - [PostLogin](docs/PostLogin.md)
312
325
  - [PostManualQuestionSelection](docs/PostManualQuestionSelection.md)
326
+ - [PostMessage](docs/PostMessage.md)
327
+ - [PostMessageResponse](docs/PostMessageResponse.md)
313
328
  - [PostModule](docs/PostModule.md)
314
329
  - [PostPortal](docs/PostPortal.md)
315
330
  - [PostPortalInvite](docs/PostPortalInvite.md)
@@ -380,7 +395,7 @@ and is automatically generated by the
380
395
  [OpenAPI Generator](https://openapi-generator.tech) project:
381
396
 
382
397
  - API version: `1.0.0`
383
- - Package version: `1.39.0`
398
+ - Package version: `1.41.0`
384
399
  - Generator version: `7.21.0`
385
400
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
386
401
 
@@ -0,0 +1,95 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { GetChatMessage, GetConversationList, PostConversation, PostConversationResponse, PostMessage, PostMessageResponse } from '../models/index';
14
+ export interface DeleteConversationRequest {
15
+ conversationId: string;
16
+ }
17
+ export interface GetConversationMessagesRequest {
18
+ conversationId: string;
19
+ }
20
+ export interface GetConversationsRequest {
21
+ page?: number;
22
+ pageSize?: number;
23
+ }
24
+ export interface PostConversationRequest {
25
+ postConversation: PostConversation;
26
+ }
27
+ export interface PostMessageRequest {
28
+ conversationId: string;
29
+ postMessage: PostMessage;
30
+ }
31
+ /**
32
+ *
33
+ */
34
+ export declare class ChatApi extends runtime.BaseAPI {
35
+ /**
36
+ * Creates request options for deleteConversation without sending the request
37
+ */
38
+ deleteConversationRequestOpts(requestParameters: DeleteConversationRequest): Promise<runtime.RequestOpts>;
39
+ /**
40
+ * Delete a conversation
41
+ */
42
+ deleteConversationRaw(requestParameters: DeleteConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
43
+ /**
44
+ * Delete a conversation
45
+ */
46
+ deleteConversation(requestParameters: DeleteConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
47
+ /**
48
+ * Creates request options for getConversationMessages without sending the request
49
+ */
50
+ getConversationMessagesRequestOpts(requestParameters: GetConversationMessagesRequest): Promise<runtime.RequestOpts>;
51
+ /**
52
+ * Get all messages in a conversation
53
+ */
54
+ getConversationMessagesRaw(requestParameters: GetConversationMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetChatMessage>>>;
55
+ /**
56
+ * Get all messages in a conversation
57
+ */
58
+ getConversationMessages(requestParameters: GetConversationMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetChatMessage>>;
59
+ /**
60
+ * Creates request options for getConversations without sending the request
61
+ */
62
+ getConversationsRequestOpts(requestParameters: GetConversationsRequest): Promise<runtime.RequestOpts>;
63
+ /**
64
+ * List conversations for the current user
65
+ */
66
+ getConversationsRaw(requestParameters: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetConversationList>>;
67
+ /**
68
+ * List conversations for the current user
69
+ */
70
+ getConversations(requestParameters?: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetConversationList>;
71
+ /**
72
+ * Creates request options for postConversation without sending the request
73
+ */
74
+ postConversationRequestOpts(requestParameters: PostConversationRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * Create a new conversation
77
+ */
78
+ postConversationRaw(requestParameters: PostConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostConversationResponse>>;
79
+ /**
80
+ * Create a new conversation
81
+ */
82
+ postConversation(requestParameters: PostConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostConversationResponse>;
83
+ /**
84
+ * Creates request options for postMessage without sending the request
85
+ */
86
+ postMessageRequestOpts(requestParameters: PostMessageRequest): Promise<runtime.RequestOpts>;
87
+ /**
88
+ * Send a message to a conversation
89
+ */
90
+ postMessageRaw(requestParameters: PostMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostMessageResponse>>;
91
+ /**
92
+ * Send a message to a conversation
93
+ */
94
+ postMessage(requestParameters: PostMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostMessageResponse>;
95
+ }
@@ -0,0 +1,235 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ChatApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class ChatApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for deleteConversation without sending the request
34
+ */
35
+ deleteConversationRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['conversationId'] == null) {
38
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling deleteConversation().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ let urlPath = `/chat/conversations/{conversationId}`;
43
+ urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
44
+ return {
45
+ path: urlPath,
46
+ method: 'DELETE',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ };
50
+ });
51
+ }
52
+ /**
53
+ * Delete a conversation
54
+ */
55
+ deleteConversationRaw(requestParameters, initOverrides) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const requestOptions = yield this.deleteConversationRequestOpts(requestParameters);
58
+ const response = yield this.request(requestOptions, initOverrides);
59
+ return new runtime.VoidApiResponse(response);
60
+ });
61
+ }
62
+ /**
63
+ * Delete a conversation
64
+ */
65
+ deleteConversation(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ yield this.deleteConversationRaw(requestParameters, initOverrides);
68
+ });
69
+ }
70
+ /**
71
+ * Creates request options for getConversationMessages without sending the request
72
+ */
73
+ getConversationMessagesRequestOpts(requestParameters) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ if (requestParameters['conversationId'] == null) {
76
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getConversationMessages().');
77
+ }
78
+ const queryParameters = {};
79
+ const headerParameters = {};
80
+ let urlPath = `/chat/conversations/{conversationId}/messages`;
81
+ urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
82
+ return {
83
+ path: urlPath,
84
+ method: 'GET',
85
+ headers: headerParameters,
86
+ query: queryParameters,
87
+ };
88
+ });
89
+ }
90
+ /**
91
+ * Get all messages in a conversation
92
+ */
93
+ getConversationMessagesRaw(requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const requestOptions = yield this.getConversationMessagesRequestOpts(requestParameters);
96
+ const response = yield this.request(requestOptions, initOverrides);
97
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GetChatMessageFromJSON));
98
+ });
99
+ }
100
+ /**
101
+ * Get all messages in a conversation
102
+ */
103
+ getConversationMessages(requestParameters, initOverrides) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const response = yield this.getConversationMessagesRaw(requestParameters, initOverrides);
106
+ return yield response.value();
107
+ });
108
+ }
109
+ /**
110
+ * Creates request options for getConversations without sending the request
111
+ */
112
+ getConversationsRequestOpts(requestParameters) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ const queryParameters = {};
115
+ if (requestParameters['page'] != null) {
116
+ queryParameters['page'] = requestParameters['page'];
117
+ }
118
+ if (requestParameters['pageSize'] != null) {
119
+ queryParameters['pageSize'] = requestParameters['pageSize'];
120
+ }
121
+ const headerParameters = {};
122
+ let urlPath = `/chat/conversations`;
123
+ return {
124
+ path: urlPath,
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ };
129
+ });
130
+ }
131
+ /**
132
+ * List conversations for the current user
133
+ */
134
+ getConversationsRaw(requestParameters, initOverrides) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const requestOptions = yield this.getConversationsRequestOpts(requestParameters);
137
+ const response = yield this.request(requestOptions, initOverrides);
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetConversationListFromJSON)(jsonValue));
139
+ });
140
+ }
141
+ /**
142
+ * List conversations for the current user
143
+ */
144
+ getConversations() {
145
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
146
+ const response = yield this.getConversationsRaw(requestParameters, initOverrides);
147
+ return yield response.value();
148
+ });
149
+ }
150
+ /**
151
+ * Creates request options for postConversation without sending the request
152
+ */
153
+ postConversationRequestOpts(requestParameters) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ if (requestParameters['postConversation'] == null) {
156
+ throw new runtime.RequiredError('postConversation', 'Required parameter "postConversation" was null or undefined when calling postConversation().');
157
+ }
158
+ const queryParameters = {};
159
+ const headerParameters = {};
160
+ headerParameters['Content-Type'] = 'application/json';
161
+ let urlPath = `/chat/conversations`;
162
+ return {
163
+ path: urlPath,
164
+ method: 'POST',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ body: (0, index_1.PostConversationToJSON)(requestParameters['postConversation']),
168
+ };
169
+ });
170
+ }
171
+ /**
172
+ * Create a new conversation
173
+ */
174
+ postConversationRaw(requestParameters, initOverrides) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ const requestOptions = yield this.postConversationRequestOpts(requestParameters);
177
+ const response = yield this.request(requestOptions, initOverrides);
178
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PostConversationResponseFromJSON)(jsonValue));
179
+ });
180
+ }
181
+ /**
182
+ * Create a new conversation
183
+ */
184
+ postConversation(requestParameters, initOverrides) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const response = yield this.postConversationRaw(requestParameters, initOverrides);
187
+ return yield response.value();
188
+ });
189
+ }
190
+ /**
191
+ * Creates request options for postMessage without sending the request
192
+ */
193
+ postMessageRequestOpts(requestParameters) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ if (requestParameters['conversationId'] == null) {
196
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling postMessage().');
197
+ }
198
+ if (requestParameters['postMessage'] == null) {
199
+ throw new runtime.RequiredError('postMessage', 'Required parameter "postMessage" was null or undefined when calling postMessage().');
200
+ }
201
+ const queryParameters = {};
202
+ const headerParameters = {};
203
+ headerParameters['Content-Type'] = 'application/json';
204
+ let urlPath = `/chat/conversations/{conversationId}/messages`;
205
+ urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
206
+ return {
207
+ path: urlPath,
208
+ method: 'POST',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ body: (0, index_1.PostMessageToJSON)(requestParameters['postMessage']),
212
+ };
213
+ });
214
+ }
215
+ /**
216
+ * Send a message to a conversation
217
+ */
218
+ postMessageRaw(requestParameters, initOverrides) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ const requestOptions = yield this.postMessageRequestOpts(requestParameters);
221
+ const response = yield this.request(requestOptions, initOverrides);
222
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PostMessageResponseFromJSON)(jsonValue));
223
+ });
224
+ }
225
+ /**
226
+ * Send a message to a conversation
227
+ */
228
+ postMessage(requestParameters, initOverrides) {
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ const response = yield this.postMessageRaw(requestParameters, initOverrides);
231
+ return yield response.value();
232
+ });
233
+ }
234
+ }
235
+ exports.ChatApi = ChatApi;
@@ -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, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
13
+ import type { GetPortal, GetPortalList, GetPortalLogoUpload, GetPortalUserList, PostPortal, PostPortalInvite, PutPortalBranding } from '../models/index';
14
+ export interface DeletePortalLogoRequest {
15
+ portalId: string;
16
+ }
14
17
  export interface GetPortalByIdRequest {
15
18
  portalId: string;
16
19
  }
@@ -29,6 +32,10 @@ export interface InviteUserToPortalRequest {
29
32
  export interface PostPortalRequest {
30
33
  postPortal: PostPortal;
31
34
  }
35
+ export interface PostPortalLogoUploadRequest {
36
+ portalId: string;
37
+ file: Blob;
38
+ }
32
39
  export interface PutPortalBrandingRequest {
33
40
  portalId: string;
34
41
  putPortalBranding: PutPortalBranding;
@@ -40,6 +47,18 @@ export interface UpdateSelectedPortalRequest {
40
47
  *
41
48
  */
42
49
  export declare class PortalApi extends runtime.BaseAPI {
50
+ /**
51
+ * Creates request options for deletePortalLogo without sending the request
52
+ */
53
+ deletePortalLogoRequestOpts(requestParameters: DeletePortalLogoRequest): Promise<runtime.RequestOpts>;
54
+ /**
55
+ * Remove the portal logo
56
+ */
57
+ deletePortalLogoRaw(requestParameters: DeletePortalLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
58
+ /**
59
+ * Remove the portal logo
60
+ */
61
+ deletePortalLogo(requestParameters: DeletePortalLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
43
62
  /**
44
63
  * Creates request options for getPortalById without sending the request
45
64
  */
@@ -100,6 +119,18 @@ export declare class PortalApi extends runtime.BaseAPI {
100
119
  * Create a new portal as a child of the current selected portal
101
120
  */
102
121
  postPortal(requestParameters: PostPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
122
+ /**
123
+ * Creates request options for postPortalLogoUpload without sending the request
124
+ */
125
+ postPortalLogoUploadRequestOpts(requestParameters: PostPortalLogoUploadRequest): Promise<runtime.RequestOpts>;
126
+ /**
127
+ * Upload a logo image for portal branding
128
+ */
129
+ postPortalLogoUploadRaw(requestParameters: PostPortalLogoUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalLogoUpload>>;
130
+ /**
131
+ * Upload a logo image for portal branding
132
+ */
133
+ postPortalLogoUpload(requestParameters: PostPortalLogoUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalLogoUpload>;
103
134
  /**
104
135
  * Creates request options for putPortalBranding without sending the request
105
136
  */