@easyedu/js-lsm-api 1.38.0 → 1.40.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 +16 -0
- package/README.md +21 -9
- package/dist/apis/ChatApi.d.ts +95 -0
- package/dist/apis/ChatApi.js +235 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChatApi.d.ts +95 -0
- package/dist/esm/apis/ChatApi.js +231 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetChatMessage.d.ts +44 -0
- package/dist/esm/models/GetChatMessage.js +51 -0
- package/dist/esm/models/GetConversation.d.ts +50 -0
- package/dist/esm/models/GetConversation.js +53 -0
- package/dist/esm/models/GetConversationList.d.ts +57 -0
- package/dist/esm/models/GetConversationList.js +60 -0
- package/dist/esm/models/PostConversation.d.ts +32 -0
- package/dist/esm/models/PostConversation.js +43 -0
- package/dist/esm/models/PostConversationResponse.d.ts +44 -0
- package/dist/esm/models/PostConversationResponse.js +51 -0
- package/dist/esm/models/PostMessage.d.ts +32 -0
- package/dist/esm/models/PostMessage.js +43 -0
- package/dist/esm/models/PostMessageResponse.d.ts +38 -0
- package/dist/esm/models/PostMessageResponse.js +47 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/GetChatMessage.d.ts +44 -0
- package/dist/models/GetChatMessage.js +58 -0
- package/dist/models/GetConversation.d.ts +50 -0
- package/dist/models/GetConversation.js +60 -0
- package/dist/models/GetConversationList.d.ts +57 -0
- package/dist/models/GetConversationList.js +67 -0
- package/dist/models/PostConversation.d.ts +32 -0
- package/dist/models/PostConversation.js +50 -0
- package/dist/models/PostConversationResponse.d.ts +44 -0
- package/dist/models/PostConversationResponse.js +58 -0
- package/dist/models/PostMessage.d.ts +32 -0
- package/dist/models/PostMessage.js +50 -0
- package/dist/models/PostMessageResponse.d.ts +38 -0
- package/dist/models/PostMessageResponse.js +54 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/docs/ChatApi.md +357 -0
- package/docs/GetChatMessage.md +38 -0
- package/docs/GetConversation.md +40 -0
- package/docs/GetConversationList.md +42 -0
- package/docs/PostConversation.md +34 -0
- package/docs/PostConversationResponse.md +38 -0
- package/docs/PostMessage.md +34 -0
- package/docs/PostMessageResponse.md +36 -0
- package/package.json +1 -1
- package/src/apis/ChatApi.ts +303 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetChatMessage.ts +84 -0
- package/src/models/GetConversation.ts +92 -0
- package/src/models/GetConversationList.ts +110 -0
- package/src/models/PostConversation.ts +66 -0
- package/src/models/PostConversationResponse.ts +84 -0
- package/src/models/PostMessage.ts +66 -0
- package/src/models/PostMessageResponse.ts +75 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,303 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
GetChatMessage,
|
|
19
|
+
GetConversationList,
|
|
20
|
+
PostConversation,
|
|
21
|
+
PostConversationResponse,
|
|
22
|
+
PostMessage,
|
|
23
|
+
PostMessageResponse,
|
|
24
|
+
} from '../models/index';
|
|
25
|
+
import {
|
|
26
|
+
GetChatMessageFromJSON,
|
|
27
|
+
GetChatMessageToJSON,
|
|
28
|
+
GetConversationListFromJSON,
|
|
29
|
+
GetConversationListToJSON,
|
|
30
|
+
PostConversationFromJSON,
|
|
31
|
+
PostConversationToJSON,
|
|
32
|
+
PostConversationResponseFromJSON,
|
|
33
|
+
PostConversationResponseToJSON,
|
|
34
|
+
PostMessageFromJSON,
|
|
35
|
+
PostMessageToJSON,
|
|
36
|
+
PostMessageResponseFromJSON,
|
|
37
|
+
PostMessageResponseToJSON,
|
|
38
|
+
} from '../models/index';
|
|
39
|
+
|
|
40
|
+
export interface DeleteConversationRequest {
|
|
41
|
+
conversationId: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GetConversationMessagesRequest {
|
|
45
|
+
conversationId: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface GetConversationsRequest {
|
|
49
|
+
page?: number;
|
|
50
|
+
pageSize?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface PostConversationRequest {
|
|
54
|
+
postConversation: PostConversation;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface PostMessageRequest {
|
|
58
|
+
conversationId: string;
|
|
59
|
+
postMessage: PostMessage;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export class ChatApi extends runtime.BaseAPI {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for deleteConversation without sending the request
|
|
69
|
+
*/
|
|
70
|
+
async deleteConversationRequestOpts(requestParameters: DeleteConversationRequest): Promise<runtime.RequestOpts> {
|
|
71
|
+
if (requestParameters['conversationId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError(
|
|
73
|
+
'conversationId',
|
|
74
|
+
'Required parameter "conversationId" was null or undefined when calling deleteConversation().'
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const queryParameters: any = {};
|
|
79
|
+
|
|
80
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
let urlPath = `/chat/conversations/{conversationId}`;
|
|
84
|
+
urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
path: urlPath,
|
|
88
|
+
method: 'DELETE',
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Delete a conversation
|
|
96
|
+
*/
|
|
97
|
+
async deleteConversationRaw(requestParameters: DeleteConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
98
|
+
const requestOptions = await this.deleteConversationRequestOpts(requestParameters);
|
|
99
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
100
|
+
|
|
101
|
+
return new runtime.VoidApiResponse(response);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Delete a conversation
|
|
106
|
+
*/
|
|
107
|
+
async deleteConversation(requestParameters: DeleteConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
108
|
+
await this.deleteConversationRaw(requestParameters, initOverrides);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Creates request options for getConversationMessages without sending the request
|
|
113
|
+
*/
|
|
114
|
+
async getConversationMessagesRequestOpts(requestParameters: GetConversationMessagesRequest): Promise<runtime.RequestOpts> {
|
|
115
|
+
if (requestParameters['conversationId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError(
|
|
117
|
+
'conversationId',
|
|
118
|
+
'Required parameter "conversationId" was null or undefined when calling getConversationMessages().'
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const queryParameters: any = {};
|
|
123
|
+
|
|
124
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
let urlPath = `/chat/conversations/{conversationId}/messages`;
|
|
128
|
+
urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
path: urlPath,
|
|
132
|
+
method: 'GET',
|
|
133
|
+
headers: headerParameters,
|
|
134
|
+
query: queryParameters,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Get all messages in a conversation
|
|
140
|
+
*/
|
|
141
|
+
async getConversationMessagesRaw(requestParameters: GetConversationMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetChatMessage>>> {
|
|
142
|
+
const requestOptions = await this.getConversationMessagesRequestOpts(requestParameters);
|
|
143
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetChatMessageFromJSON));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get all messages in a conversation
|
|
150
|
+
*/
|
|
151
|
+
async getConversationMessages(requestParameters: GetConversationMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetChatMessage>> {
|
|
152
|
+
const response = await this.getConversationMessagesRaw(requestParameters, initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for getConversations without sending the request
|
|
158
|
+
*/
|
|
159
|
+
async getConversationsRequestOpts(requestParameters: GetConversationsRequest): Promise<runtime.RequestOpts> {
|
|
160
|
+
const queryParameters: any = {};
|
|
161
|
+
|
|
162
|
+
if (requestParameters['page'] != null) {
|
|
163
|
+
queryParameters['page'] = requestParameters['page'];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (requestParameters['pageSize'] != null) {
|
|
167
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
let urlPath = `/chat/conversations`;
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
path: urlPath,
|
|
177
|
+
method: 'GET',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* List conversations for the current user
|
|
185
|
+
*/
|
|
186
|
+
async getConversationsRaw(requestParameters: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetConversationList>> {
|
|
187
|
+
const requestOptions = await this.getConversationsRequestOpts(requestParameters);
|
|
188
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
189
|
+
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetConversationListFromJSON(jsonValue));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* List conversations for the current user
|
|
195
|
+
*/
|
|
196
|
+
async getConversations(requestParameters: GetConversationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetConversationList> {
|
|
197
|
+
const response = await this.getConversationsRaw(requestParameters, initOverrides);
|
|
198
|
+
return await response.value();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Creates request options for postConversation without sending the request
|
|
203
|
+
*/
|
|
204
|
+
async postConversationRequestOpts(requestParameters: PostConversationRequest): Promise<runtime.RequestOpts> {
|
|
205
|
+
if (requestParameters['postConversation'] == null) {
|
|
206
|
+
throw new runtime.RequiredError(
|
|
207
|
+
'postConversation',
|
|
208
|
+
'Required parameter "postConversation" was null or undefined when calling postConversation().'
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const queryParameters: any = {};
|
|
213
|
+
|
|
214
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
215
|
+
|
|
216
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
let urlPath = `/chat/conversations`;
|
|
220
|
+
|
|
221
|
+
return {
|
|
222
|
+
path: urlPath,
|
|
223
|
+
method: 'POST',
|
|
224
|
+
headers: headerParameters,
|
|
225
|
+
query: queryParameters,
|
|
226
|
+
body: PostConversationToJSON(requestParameters['postConversation']),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Create a new conversation
|
|
232
|
+
*/
|
|
233
|
+
async postConversationRaw(requestParameters: PostConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostConversationResponse>> {
|
|
234
|
+
const requestOptions = await this.postConversationRequestOpts(requestParameters);
|
|
235
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
236
|
+
|
|
237
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostConversationResponseFromJSON(jsonValue));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Create a new conversation
|
|
242
|
+
*/
|
|
243
|
+
async postConversation(requestParameters: PostConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostConversationResponse> {
|
|
244
|
+
const response = await this.postConversationRaw(requestParameters, initOverrides);
|
|
245
|
+
return await response.value();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Creates request options for postMessage without sending the request
|
|
250
|
+
*/
|
|
251
|
+
async postMessageRequestOpts(requestParameters: PostMessageRequest): Promise<runtime.RequestOpts> {
|
|
252
|
+
if (requestParameters['conversationId'] == null) {
|
|
253
|
+
throw new runtime.RequiredError(
|
|
254
|
+
'conversationId',
|
|
255
|
+
'Required parameter "conversationId" was null or undefined when calling postMessage().'
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (requestParameters['postMessage'] == null) {
|
|
260
|
+
throw new runtime.RequiredError(
|
|
261
|
+
'postMessage',
|
|
262
|
+
'Required parameter "postMessage" was null or undefined when calling postMessage().'
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const queryParameters: any = {};
|
|
267
|
+
|
|
268
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
269
|
+
|
|
270
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
let urlPath = `/chat/conversations/{conversationId}/messages`;
|
|
274
|
+
urlPath = urlPath.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId'])));
|
|
275
|
+
|
|
276
|
+
return {
|
|
277
|
+
path: urlPath,
|
|
278
|
+
method: 'POST',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
body: PostMessageToJSON(requestParameters['postMessage']),
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Send a message to a conversation
|
|
287
|
+
*/
|
|
288
|
+
async postMessageRaw(requestParameters: PostMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostMessageResponse>> {
|
|
289
|
+
const requestOptions = await this.postMessageRequestOpts(requestParameters);
|
|
290
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
291
|
+
|
|
292
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostMessageResponseFromJSON(jsonValue));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Send a message to a conversation
|
|
297
|
+
*/
|
|
298
|
+
async postMessage(requestParameters: PostMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostMessageResponse> {
|
|
299
|
+
const response = await this.postMessageRaw(requestParameters, initOverrides);
|
|
300
|
+
return await response.value();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
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 GetChatMessage
|
|
20
|
+
*/
|
|
21
|
+
export interface GetChatMessage {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetChatMessage
|
|
26
|
+
*/
|
|
27
|
+
role: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetChatMessage
|
|
32
|
+
*/
|
|
33
|
+
content: string;
|
|
34
|
+
/**
|
|
35
|
+
* Unix epoch timestamp
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof GetChatMessage
|
|
38
|
+
*/
|
|
39
|
+
createdAt: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the GetChatMessage interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfGetChatMessage(value: object): value is GetChatMessage {
|
|
46
|
+
if (!('role' in value) || value['role'] === undefined) return false;
|
|
47
|
+
if (!('content' in value) || value['content'] === undefined) return false;
|
|
48
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function GetChatMessageFromJSON(json: any): GetChatMessage {
|
|
53
|
+
return GetChatMessageFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function GetChatMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetChatMessage {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'role': json['role'],
|
|
63
|
+
'content': json['content'],
|
|
64
|
+
'createdAt': json['created_at'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function GetChatMessageToJSON(json: any): GetChatMessage {
|
|
69
|
+
return GetChatMessageToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function GetChatMessageToJSONTyped(value?: GetChatMessage | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'role': value['role'],
|
|
80
|
+
'content': value['content'],
|
|
81
|
+
'created_at': value['createdAt'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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 GetConversation
|
|
20
|
+
*/
|
|
21
|
+
export interface GetConversation {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetConversation
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetConversation
|
|
32
|
+
*/
|
|
33
|
+
title?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Unix epoch timestamp
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof GetConversation
|
|
38
|
+
*/
|
|
39
|
+
createdAt: number;
|
|
40
|
+
/**
|
|
41
|
+
* Unix epoch timestamp
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetConversation
|
|
44
|
+
*/
|
|
45
|
+
updatedAt: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the GetConversation interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfGetConversation(value: object): value is GetConversation {
|
|
52
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
54
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GetConversationFromJSON(json: any): GetConversation {
|
|
59
|
+
return GetConversationFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function GetConversationFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetConversation {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'id': json['id'],
|
|
69
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
70
|
+
'createdAt': json['created_at'],
|
|
71
|
+
'updatedAt': json['updated_at'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function GetConversationToJSON(json: any): GetConversation {
|
|
76
|
+
return GetConversationToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function GetConversationToJSONTyped(value?: GetConversation | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'id': value['id'],
|
|
87
|
+
'title': value['title'],
|
|
88
|
+
'created_at': value['createdAt'],
|
|
89
|
+
'updated_at': value['updatedAt'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { GetConversation } from './GetConversation';
|
|
17
|
+
import {
|
|
18
|
+
GetConversationFromJSON,
|
|
19
|
+
GetConversationFromJSONTyped,
|
|
20
|
+
GetConversationToJSON,
|
|
21
|
+
GetConversationToJSONTyped,
|
|
22
|
+
} from './GetConversation';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetConversationList
|
|
28
|
+
*/
|
|
29
|
+
export interface GetConversationList {
|
|
30
|
+
/**
|
|
31
|
+
* The current page number
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GetConversationList
|
|
34
|
+
*/
|
|
35
|
+
page: number;
|
|
36
|
+
/**
|
|
37
|
+
* The number of items per page
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GetConversationList
|
|
40
|
+
*/
|
|
41
|
+
pageSize: number;
|
|
42
|
+
/**
|
|
43
|
+
* The total number of pages
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetConversationList
|
|
46
|
+
*/
|
|
47
|
+
totalPages: number;
|
|
48
|
+
/**
|
|
49
|
+
* The total number of items
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GetConversationList
|
|
52
|
+
*/
|
|
53
|
+
totalItems: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<GetConversation>}
|
|
57
|
+
* @memberof GetConversationList
|
|
58
|
+
*/
|
|
59
|
+
items: Array<GetConversation>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the GetConversationList interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfGetConversationList(value: object): value is GetConversationList {
|
|
66
|
+
if (!('page' in value) || value['page'] === undefined) return false;
|
|
67
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
|
|
68
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
|
69
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
|
|
70
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function GetConversationListFromJSON(json: any): GetConversationList {
|
|
75
|
+
return GetConversationListFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function GetConversationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetConversationList {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'page': json['page'],
|
|
85
|
+
'pageSize': json['pageSize'],
|
|
86
|
+
'totalPages': json['totalPages'],
|
|
87
|
+
'totalItems': json['totalItems'],
|
|
88
|
+
'items': ((json['items'] as Array<any>).map(GetConversationFromJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function GetConversationListToJSON(json: any): GetConversationList {
|
|
93
|
+
return GetConversationListToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function GetConversationListToJSONTyped(value?: GetConversationList | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'page': value['page'],
|
|
104
|
+
'pageSize': value['pageSize'],
|
|
105
|
+
'totalPages': value['totalPages'],
|
|
106
|
+
'totalItems': value['totalItems'],
|
|
107
|
+
'items': ((value['items'] as Array<any>).map(GetConversationToJSON)),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -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 PostConversation
|
|
20
|
+
*/
|
|
21
|
+
export interface PostConversation {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PostConversation
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the PostConversation interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfPostConversation(value: object): value is PostConversation {
|
|
34
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function PostConversationFromJSON(json: any): PostConversation {
|
|
39
|
+
return PostConversationFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function PostConversationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostConversation {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'message': json['message'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PostConversationToJSON(json: any): PostConversation {
|
|
53
|
+
return PostConversationToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function PostConversationToJSONTyped(value?: PostConversation | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'message': value['message'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|