@livechat/customer-sdk 3.1.4 → 4.0.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 (48) hide show
  1. package/README.md +27 -78
  2. package/dist/customer-sdk.cjs.js +208 -228
  3. package/dist/customer-sdk.cjs.native.js +208 -228
  4. package/dist/customer-sdk.esm.js +202 -227
  5. package/dist/customer-sdk.js +222 -249
  6. package/dist/customer-sdk.min.js +1 -1
  7. package/package.json +7 -7
  8. package/types/actions.d.ts +331 -0
  9. package/types/chatHistory.d.ts +19 -0
  10. package/types/clientDataParsers.d.ts +55 -0
  11. package/types/completionValues.d.ts +4 -0
  12. package/types/constants/clientErrorCodes.d.ts +11 -0
  13. package/types/constants/connectionStatuses.d.ts +6 -0
  14. package/types/constants/eventTypes.d.ts +8 -0
  15. package/types/constants/organizationIds.d.ts +2 -0
  16. package/types/constants/reduxActions.d.ts +23 -0
  17. package/types/constants/serverDisconnectionReasons.d.ts +16 -0
  18. package/types/constants/serverErrorCodes.d.ts +23 -0
  19. package/types/constants/serverPushActions.d.ts +27 -0
  20. package/types/constants/serverRequestActions.d.ts +30 -0
  21. package/types/constants/sortOrders.d.ts +3 -0
  22. package/types/constants/userTypes.d.ts +3 -0
  23. package/types/createError.d.ts +9 -0
  24. package/types/createStore.d.ts +12 -0
  25. package/types/debug.d.ts +3 -0
  26. package/types/graylog/index.d.ts +14 -0
  27. package/types/graylog/makeGrayLogRequest.d.ts +2 -0
  28. package/types/graylog/makeGrayLogRequest.native.d.ts +6 -0
  29. package/types/index.d.ts +252 -0
  30. package/types/reducer.d.ts +545 -0
  31. package/types/sendRequestAction.d.ts +4 -0
  32. package/types/sendTicketForm.d.ts +14 -0
  33. package/types/serverDataParser.d.ts +34 -0
  34. package/types/serverEventParser.d.ts +12 -0
  35. package/types/serverFrameParser.d.ts +393 -0
  36. package/types/sideEffects/checkGoals.d.ts +5 -0
  37. package/types/sideEffects/index.d.ts +13 -0
  38. package/types/sideStorage.d.ts +5 -0
  39. package/types/socketClient.d.ts +11 -0
  40. package/types/socketListener.d.ts +12 -0
  41. package/types/thunks.d.ts +4 -0
  42. package/types/types/actions.d.ts +157 -0
  43. package/types/types/clientEntities.d.ts +376 -0
  44. package/types/types/frames.d.ts +644 -0
  45. package/types/types/serverEntities.d.ts +409 -0
  46. package/types/types/state.d.ts +56 -0
  47. package/types/uploadFile.d.ts +19 -0
  48. package/types/validateFile/index.d.ts +3 -0
@@ -0,0 +1,545 @@
1
+ import { Action } from './types/actions';
2
+ import { InitialStateData, State } from './types/state';
3
+ export declare const getAllRequests: (state: State) => Record<string, {
4
+ id: string;
5
+ promise: Promise<any>;
6
+ resolve: (val: any) => void;
7
+ reject: (err: any) => void;
8
+ request: import("Object/Pick")._Pick<{
9
+ request_id: string;
10
+ version?: string | undefined;
11
+ action: "accept_greeting";
12
+ payload: {
13
+ greeting_id: number;
14
+ unique_id: string;
15
+ };
16
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
17
+ request_id: string;
18
+ version?: string | undefined;
19
+ action: "cancel_greeting";
20
+ payload: {
21
+ unique_id: string;
22
+ };
23
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
24
+ request_id: string;
25
+ version?: string | undefined;
26
+ action: "deactivate_chat";
27
+ payload: {
28
+ id: string;
29
+ };
30
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
31
+ request_id: string;
32
+ version?: string | undefined;
33
+ action: "delete_chat_properties";
34
+ payload: {
35
+ id: string;
36
+ properties: Record<string, string[]>;
37
+ };
38
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
39
+ request_id: string;
40
+ version?: string | undefined;
41
+ action: "delete_event_properties";
42
+ payload: {
43
+ chat_id: string;
44
+ thread_id: string;
45
+ event_id: string;
46
+ properties: Record<string, string[]>;
47
+ };
48
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
49
+ request_id: string;
50
+ version?: string | undefined;
51
+ action: "delete_thread_properties";
52
+ payload: {
53
+ chat_id: string;
54
+ thread_id: string;
55
+ properties: Record<string, string[]>;
56
+ };
57
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
58
+ request_id: string;
59
+ version?: string | undefined;
60
+ action: "get_chat";
61
+ payload: {
62
+ chat_id: string;
63
+ thread_id?: string | undefined;
64
+ };
65
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
66
+ request_id: string;
67
+ version?: string | undefined;
68
+ action: "get_customer";
69
+ payload: {
70
+ [x: string]: never;
71
+ };
72
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
73
+ request_id: string;
74
+ version?: string | undefined;
75
+ action: "get_form";
76
+ payload: {
77
+ type: import("./types/serverEntities").FormType;
78
+ group_id: number;
79
+ };
80
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
81
+ request_id: string;
82
+ version?: string | undefined;
83
+ action: "get_predicted_agent";
84
+ payload: {
85
+ group_id?: number | undefined;
86
+ };
87
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
88
+ request_id: string;
89
+ version?: string | undefined;
90
+ action: "get_url_info";
91
+ payload: {
92
+ url: string;
93
+ };
94
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
95
+ request_id: string;
96
+ version?: string | undefined;
97
+ action: "list_group_statuses";
98
+ payload: {
99
+ group_ids: number[];
100
+ } | {
101
+ all: true;
102
+ };
103
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
104
+ request_id: string;
105
+ version?: string | undefined;
106
+ action: "list_chats";
107
+ payload: {
108
+ limit?: number | undefined;
109
+ page_id?: string | undefined;
110
+ };
111
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
112
+ request_id: string;
113
+ version?: string | undefined;
114
+ action: "list_threads";
115
+ payload: {
116
+ chat_id: string;
117
+ sort_order?: "asc" | "desc" | undefined;
118
+ limit?: number | undefined;
119
+ page_id?: string | undefined;
120
+ min_events_count?: number | undefined;
121
+ };
122
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
123
+ request_id: string;
124
+ version?: string | undefined;
125
+ action: "login";
126
+ payload: {
127
+ token: string;
128
+ customer?: {
129
+ avatar?: string | undefined;
130
+ email?: string | undefined;
131
+ name?: string | undefined;
132
+ fields?: import("./types/serverEntities").CustomerSessionFields | undefined;
133
+ } | undefined;
134
+ customer_page?: {
135
+ url?: string | undefined;
136
+ title?: string | undefined;
137
+ } | undefined;
138
+ customer_side_storage?: import("./types/serverEntities").SideStorage | undefined;
139
+ is_mobile?: boolean | undefined;
140
+ group_id?: number | undefined;
141
+ referrer?: string | undefined;
142
+ pushes?: Record<string, readonly import("./types").SubscribablePush[]> | undefined;
143
+ };
144
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
145
+ request_id: string;
146
+ version?: string | undefined;
147
+ action: "mark_events_as_seen";
148
+ payload: {
149
+ chat_id: string;
150
+ seen_up_to: string;
151
+ };
152
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
153
+ request_id: string;
154
+ version?: string | undefined;
155
+ action: "resume_chat";
156
+ payload: {
157
+ active?: boolean | undefined;
158
+ chat: {
159
+ id: string;
160
+ access?: import("./types/serverEntities").Access | undefined;
161
+ properties?: import("./types/serverEntities").Properties | undefined;
162
+ thread?: {
163
+ events?: import("./types/serverEntities").RequestBodyEvent[] | undefined;
164
+ properties?: import("./types/serverEntities").Properties | undefined;
165
+ } | undefined;
166
+ };
167
+ continuous?: boolean | undefined;
168
+ };
169
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
170
+ request_id: string;
171
+ version?: string | undefined;
172
+ action: "send_event";
173
+ payload: {
174
+ chat_id: string;
175
+ event: import("./types/serverEntities").RequestBodyEvent;
176
+ attach_to_last_thread?: boolean | undefined;
177
+ };
178
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
179
+ request_id: string;
180
+ version?: string | undefined;
181
+ action: "send_rich_message_postback";
182
+ payload: {
183
+ chat_id: string;
184
+ thread_id: string;
185
+ event_id: string;
186
+ postback: {
187
+ id: string;
188
+ toggled: boolean;
189
+ };
190
+ };
191
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
192
+ request_id: string;
193
+ version?: string | undefined;
194
+ action: "send_sneak_peek";
195
+ payload: {
196
+ chat_id: string;
197
+ sneak_peek_text: string;
198
+ };
199
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
200
+ request_id: string;
201
+ version?: string | undefined;
202
+ action: "set_customer_session_fields";
203
+ payload: {
204
+ session_fields: import("./types/serverEntities").CustomerSessionFields;
205
+ };
206
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
207
+ request_id: string;
208
+ version?: string | undefined;
209
+ action: "start_chat";
210
+ payload: {
211
+ active?: boolean | undefined;
212
+ chat?: {
213
+ access?: import("./types/serverEntities").Access | undefined;
214
+ properties?: import("./types/serverEntities").Properties | undefined;
215
+ thread?: {
216
+ events?: import("./types/serverEntities").RequestBodyEvent[] | undefined;
217
+ properties?: import("./types/serverEntities").Properties | undefined;
218
+ } | undefined;
219
+ } | undefined;
220
+ continuous?: boolean | undefined;
221
+ };
222
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
223
+ request_id: string;
224
+ version?: string | undefined;
225
+ action: "update_chat_properties";
226
+ payload: {
227
+ id: string;
228
+ properties: import("./types/serverEntities").Properties;
229
+ };
230
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
231
+ request_id: string;
232
+ version?: string | undefined;
233
+ action: "update_customer_page";
234
+ payload: {
235
+ url: string;
236
+ title?: string | undefined;
237
+ };
238
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
239
+ request_id: string;
240
+ version?: string | undefined;
241
+ action: "update_customer";
242
+ payload: {
243
+ avatar?: string | undefined;
244
+ name?: string | undefined;
245
+ email?: string | undefined;
246
+ fields?: import("./types/serverEntities").CustomerSessionFields | undefined;
247
+ };
248
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
249
+ request_id: string;
250
+ version?: string | undefined;
251
+ action: "update_event_properties";
252
+ payload: {
253
+ chat_id: string;
254
+ thread_id: string;
255
+ event_id: string;
256
+ properties: import("./types/serverEntities").Properties;
257
+ };
258
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
259
+ request_id: string;
260
+ version?: string | undefined;
261
+ action: "update_thread_properties";
262
+ payload: {
263
+ chat_id: string;
264
+ thread_id: string;
265
+ properties: import("./types/serverEntities").Properties;
266
+ };
267
+ }, "action" | "payload">;
268
+ }>;
269
+ export declare const getConnectionStatus: (state: State) => "connected" | "destroyed" | "disconnected" | "paused" | "reconnecting";
270
+ export declare const getRequest: (state: State, id: string) => {
271
+ id: string;
272
+ promise: Promise<any>;
273
+ resolve: (val: any) => void;
274
+ reject: (err: any) => void;
275
+ request: import("Object/Pick")._Pick<{
276
+ request_id: string;
277
+ version?: string | undefined;
278
+ action: "accept_greeting";
279
+ payload: {
280
+ greeting_id: number;
281
+ unique_id: string;
282
+ };
283
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
284
+ request_id: string;
285
+ version?: string | undefined;
286
+ action: "cancel_greeting";
287
+ payload: {
288
+ unique_id: string;
289
+ };
290
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
291
+ request_id: string;
292
+ version?: string | undefined;
293
+ action: "deactivate_chat";
294
+ payload: {
295
+ id: string;
296
+ };
297
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
298
+ request_id: string;
299
+ version?: string | undefined;
300
+ action: "delete_chat_properties";
301
+ payload: {
302
+ id: string;
303
+ properties: Record<string, string[]>;
304
+ };
305
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
306
+ request_id: string;
307
+ version?: string | undefined;
308
+ action: "delete_event_properties";
309
+ payload: {
310
+ chat_id: string;
311
+ thread_id: string;
312
+ event_id: string;
313
+ properties: Record<string, string[]>;
314
+ };
315
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
316
+ request_id: string;
317
+ version?: string | undefined;
318
+ action: "delete_thread_properties";
319
+ payload: {
320
+ chat_id: string;
321
+ thread_id: string;
322
+ properties: Record<string, string[]>;
323
+ };
324
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
325
+ request_id: string;
326
+ version?: string | undefined;
327
+ action: "get_chat";
328
+ payload: {
329
+ chat_id: string;
330
+ thread_id?: string | undefined;
331
+ };
332
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
333
+ request_id: string;
334
+ version?: string | undefined;
335
+ action: "get_customer";
336
+ payload: {
337
+ [x: string]: never;
338
+ };
339
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
340
+ request_id: string;
341
+ version?: string | undefined;
342
+ action: "get_form";
343
+ payload: {
344
+ type: import("./types/serverEntities").FormType;
345
+ group_id: number;
346
+ };
347
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
348
+ request_id: string;
349
+ version?: string | undefined;
350
+ action: "get_predicted_agent";
351
+ payload: {
352
+ group_id?: number | undefined;
353
+ };
354
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
355
+ request_id: string;
356
+ version?: string | undefined;
357
+ action: "get_url_info";
358
+ payload: {
359
+ url: string;
360
+ };
361
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
362
+ request_id: string;
363
+ version?: string | undefined;
364
+ action: "list_group_statuses";
365
+ payload: {
366
+ group_ids: number[];
367
+ } | {
368
+ all: true;
369
+ };
370
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
371
+ request_id: string;
372
+ version?: string | undefined;
373
+ action: "list_chats";
374
+ payload: {
375
+ limit?: number | undefined;
376
+ page_id?: string | undefined;
377
+ };
378
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
379
+ request_id: string;
380
+ version?: string | undefined;
381
+ action: "list_threads";
382
+ payload: {
383
+ chat_id: string;
384
+ sort_order?: "asc" | "desc" | undefined;
385
+ limit?: number | undefined;
386
+ page_id?: string | undefined;
387
+ min_events_count?: number | undefined;
388
+ };
389
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
390
+ request_id: string;
391
+ version?: string | undefined;
392
+ action: "login";
393
+ payload: {
394
+ token: string;
395
+ customer?: {
396
+ avatar?: string | undefined;
397
+ email?: string | undefined;
398
+ name?: string | undefined;
399
+ fields?: import("./types/serverEntities").CustomerSessionFields | undefined;
400
+ } | undefined;
401
+ customer_page?: {
402
+ url?: string | undefined;
403
+ title?: string | undefined;
404
+ } | undefined;
405
+ customer_side_storage?: import("./types/serverEntities").SideStorage | undefined;
406
+ is_mobile?: boolean | undefined;
407
+ group_id?: number | undefined;
408
+ referrer?: string | undefined;
409
+ pushes?: Record<string, readonly import("./types").SubscribablePush[]> | undefined;
410
+ };
411
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
412
+ request_id: string;
413
+ version?: string | undefined;
414
+ action: "mark_events_as_seen";
415
+ payload: {
416
+ chat_id: string;
417
+ seen_up_to: string;
418
+ };
419
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
420
+ request_id: string;
421
+ version?: string | undefined;
422
+ action: "resume_chat";
423
+ payload: {
424
+ active?: boolean | undefined;
425
+ chat: {
426
+ id: string;
427
+ access?: import("./types/serverEntities").Access | undefined;
428
+ properties?: import("./types/serverEntities").Properties | undefined;
429
+ thread?: {
430
+ events?: import("./types/serverEntities").RequestBodyEvent[] | undefined;
431
+ properties?: import("./types/serverEntities").Properties | undefined;
432
+ } | undefined;
433
+ };
434
+ continuous?: boolean | undefined;
435
+ };
436
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
437
+ request_id: string;
438
+ version?: string | undefined;
439
+ action: "send_event";
440
+ payload: {
441
+ chat_id: string;
442
+ event: import("./types/serverEntities").RequestBodyEvent;
443
+ attach_to_last_thread?: boolean | undefined;
444
+ };
445
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
446
+ request_id: string;
447
+ version?: string | undefined;
448
+ action: "send_rich_message_postback";
449
+ payload: {
450
+ chat_id: string;
451
+ thread_id: string;
452
+ event_id: string;
453
+ postback: {
454
+ id: string;
455
+ toggled: boolean;
456
+ };
457
+ };
458
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
459
+ request_id: string;
460
+ version?: string | undefined;
461
+ action: "send_sneak_peek";
462
+ payload: {
463
+ chat_id: string;
464
+ sneak_peek_text: string;
465
+ };
466
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
467
+ request_id: string;
468
+ version?: string | undefined;
469
+ action: "set_customer_session_fields";
470
+ payload: {
471
+ session_fields: import("./types/serverEntities").CustomerSessionFields;
472
+ };
473
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
474
+ request_id: string;
475
+ version?: string | undefined;
476
+ action: "start_chat";
477
+ payload: {
478
+ active?: boolean | undefined;
479
+ chat?: {
480
+ access?: import("./types/serverEntities").Access | undefined;
481
+ properties?: import("./types/serverEntities").Properties | undefined;
482
+ thread?: {
483
+ events?: import("./types/serverEntities").RequestBodyEvent[] | undefined;
484
+ properties?: import("./types/serverEntities").Properties | undefined;
485
+ } | undefined;
486
+ } | undefined;
487
+ continuous?: boolean | undefined;
488
+ };
489
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
490
+ request_id: string;
491
+ version?: string | undefined;
492
+ action: "update_chat_properties";
493
+ payload: {
494
+ id: string;
495
+ properties: import("./types/serverEntities").Properties;
496
+ };
497
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
498
+ request_id: string;
499
+ version?: string | undefined;
500
+ action: "update_customer_page";
501
+ payload: {
502
+ url: string;
503
+ title?: string | undefined;
504
+ };
505
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
506
+ request_id: string;
507
+ version?: string | undefined;
508
+ action: "update_customer";
509
+ payload: {
510
+ avatar?: string | undefined;
511
+ name?: string | undefined;
512
+ email?: string | undefined;
513
+ fields?: import("./types/serverEntities").CustomerSessionFields | undefined;
514
+ };
515
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
516
+ request_id: string;
517
+ version?: string | undefined;
518
+ action: "update_event_properties";
519
+ payload: {
520
+ chat_id: string;
521
+ thread_id: string;
522
+ event_id: string;
523
+ properties: import("./types/serverEntities").Properties;
524
+ };
525
+ }, "action" | "payload"> | import("Object/Pick")._Pick<{
526
+ request_id: string;
527
+ version?: string | undefined;
528
+ action: "update_thread_properties";
529
+ payload: {
530
+ chat_id: string;
531
+ thread_id: string;
532
+ properties: import("./types/serverEntities").Properties;
533
+ };
534
+ }, "action" | "payload">;
535
+ };
536
+ export declare const getSelfId: (state: State) => string | null;
537
+ export declare const isChatActive: (state: State, chatId: string) => boolean;
538
+ export declare const isConnected: (state: State) => boolean;
539
+ export declare const isDestroyed: (state: State) => boolean;
540
+ export declare const getApiOrigin: (state: State) => string;
541
+ export declare const getServerUrl: (state: State) => string;
542
+ export declare const createInitialState: (initialStateData: InitialStateData) => State;
543
+ declare const _default: (state: State) => import("redux").Reducer<State, Action>;
544
+ export default _default;
545
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { Store } from './types';
2
+ declare const sendRequestAction: (store: Store, action: any) => Promise<unknown>;
3
+ export default sendRequestAction;
4
+ //# sourceMappingURL=sendRequestAction.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { CustomerAuth } from '@livechat/customer-auth';
2
+ import { Store } from './types';
3
+ import * as clientEntities from './types/clientEntities';
4
+ declare const sendTicketForm: (store: Store, auth: CustomerAuth, { filledForm, groupId, timeZone, }: {
5
+ filledForm: Extract<clientEntities.RequestBodyEvent, {
6
+ type: 'filled_form';
7
+ }>;
8
+ groupId?: number | undefined;
9
+ timeZone?: string | undefined;
10
+ }) => Promise<{
11
+ id: string;
12
+ }>;
13
+ export default sendTicketForm;
14
+ //# sourceMappingURL=sendTicketForm.d.ts.map
@@ -0,0 +1,34 @@
1
+ import * as ClientEntities from './types/clientEntities';
2
+ import * as ServerEntities from './types/serverEntities';
3
+ export declare const parseAccess: (access?: ServerEntities.Access) => ClientEntities.Access;
4
+ export declare const getEventsSeenUpToMap: (users: ServerEntities.ChatUser[]) => ClientEntities.EventsSeenUpToMap;
5
+ export declare const parseThread: (chatId: string, thread: ServerEntities.Thread) => ClientEntities.Thread;
6
+ export declare const parseChatCommon: (chat: Omit<ServerEntities.Chat, 'thread'>) => {
7
+ id: string;
8
+ access: ClientEntities.Access;
9
+ users: ClientEntities.ChatUser[];
10
+ properties: ServerEntities.Properties;
11
+ eventsSeenUpToMap: ClientEntities.EventsSeenUpToMap;
12
+ };
13
+ export declare const parseChatAgent: (agent: ServerEntities.ChatAgent) => ClientEntities.ChatAgent;
14
+ export declare const parseCustomerOptionalProps: (customerProps: ServerEntities.OptionalCustomerProps) => ClientEntities.CustomerOptionalProps;
15
+ export declare const parseChatCustomer: (customer: ServerEntities.ChatCustomer) => ClientEntities.ChatCustomer;
16
+ export declare const parseCustomer: (customer: ServerEntities.Customer) => ClientEntities.Customer;
17
+ type PredictedAgentPayload = {
18
+ agent: ServerEntities.PredictedAgent;
19
+ queue: boolean;
20
+ };
21
+ export declare const parsePredictedAgent: (payload: PredictedAgentPayload) => ClientEntities.PredictedAgent;
22
+ export declare const parseQueueUpdate: (queueUpdate: ServerEntities.QueueUpdate) => {
23
+ position: number;
24
+ waitTime: number;
25
+ };
26
+ export declare const parseQueue: (queue: ServerEntities.Queue) => {
27
+ queuedAt: string;
28
+ position: number;
29
+ waitTime: number;
30
+ };
31
+ export declare const parseChatUser: (user: ServerEntities.ChatUser) => ClientEntities.ChatUser;
32
+ export declare const parseGroupStatus: (status: ServerEntities.GroupStatus) => ClientEntities.AvailabilityStatus;
33
+ export {};
34
+ //# sourceMappingURL=serverDataParser.d.ts.map
@@ -0,0 +1,12 @@
1
+ import * as ClientEntities from './types/clientEntities';
2
+ import * as ServerEntities from './types/serverEntities';
3
+ export declare const parseFile: (thread: string, file: ServerEntities.File) => ClientEntities.File;
4
+ export declare const parseForm: (thread: string, form: ServerEntities.Form) => ClientEntities.Form;
5
+ export declare const parseFilledForm: (thread: string, filledForm: ServerEntities.FilledForm) => ClientEntities.FilledForm;
6
+ export declare const parseMessage: (thread: string, message: ServerEntities.Message) => ClientEntities.Message;
7
+ export declare const parseCustomEvent: (thread: string, event: ServerEntities.CustomEvent) => ClientEntities.CustomEvent;
8
+ export declare const parseRichMessage: (thread: string, richMessage: ServerEntities.RichMessage) => ClientEntities.RichMessage | null;
9
+ export declare const parseSystemMessage: (thread: string, systemMessage: ServerEntities.SystemMessage) => ClientEntities.SystemMessage;
10
+ export declare const parseEvent: (thread: string, event: ServerEntities.Event) => ClientEntities.Event | null;
11
+ export declare const parseGreeting: (greeting: ServerEntities.Greeting) => ClientEntities.Greeting;
12
+ //# sourceMappingURL=serverEventParser.d.ts.map