@livechat/customer-sdk 3.1.1 → 3.1.2

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 (47) hide show
  1. package/README.md +6 -0
  2. package/dist/customer-sdk.cjs.js +186 -636
  3. package/dist/customer-sdk.cjs.native.js +186 -635
  4. package/dist/customer-sdk.esm.js +187 -637
  5. package/dist/customer-sdk.js +264 -863
  6. package/dist/customer-sdk.min.js +1 -1
  7. package/package.json +6 -5
  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/reduxActions.d.ts +23 -0
  16. package/types/constants/serverDisconnectionReasons.d.ts +15 -0
  17. package/types/constants/serverErrorCodes.d.ts +23 -0
  18. package/types/constants/serverPushActions.d.ts +26 -0
  19. package/types/constants/serverRequestActions.d.ts +30 -0
  20. package/types/constants/sortOrders.d.ts +3 -0
  21. package/types/constants/userTypes.d.ts +3 -0
  22. package/types/createError.d.ts +9 -0
  23. package/types/createStore.d.ts +12 -0
  24. package/types/debug.d.ts +3 -0
  25. package/types/graylog/index.d.ts +14 -0
  26. package/types/graylog/makeGrayLogRequest.d.ts +2 -0
  27. package/types/graylog/makeGrayLogRequest.native.d.ts +6 -0
  28. package/types/index.d.ts +239 -0
  29. package/types/reducer.d.ts +546 -0
  30. package/types/sendRequestAction.d.ts +4 -0
  31. package/types/sendTicketForm.d.ts +14 -0
  32. package/types/serverDataParser.d.ts +34 -0
  33. package/types/serverEventParser.d.ts +12 -0
  34. package/types/serverFrameParser.d.ts +385 -0
  35. package/types/sideEffects/checkGoals.d.ts +5 -0
  36. package/types/sideEffects/index.d.ts +12 -0
  37. package/types/sideStorage.d.ts +5 -0
  38. package/types/socketClient.d.ts +11 -0
  39. package/types/socketListener.d.ts +9 -0
  40. package/types/thunks.d.ts +4 -0
  41. package/types/types/actions.d.ts +157 -0
  42. package/types/types/clientEntities.d.ts +374 -0
  43. package/types/types/frames.d.ts +635 -0
  44. package/types/types/serverEntities.d.ts +408 -0
  45. package/types/types/state.d.ts +56 -0
  46. package/types/uploadFile.d.ts +19 -0
  47. package/types/validateFile/index.d.ts +3 -0
@@ -0,0 +1,635 @@
1
+ import { Any } from 'ts-toolbelt';
2
+ import * as serverDisconnectionReasons from '../constants/serverDisconnectionReasons';
3
+ import * as serverPushActions from '../constants/serverPushActions';
4
+ import * as serverRequestActions from '../constants/serverRequestActions';
5
+ import * as serverEntities from './serverEntities';
6
+ import { SortOrder, SubscribablePush } from '.';
7
+ type EmptyObj = Record<string, never>;
8
+ type Values<T> = T[keyof T];
9
+ export type ChatDeactivatedPush = {
10
+ action: typeof serverPushActions.CHAT_DEACTIVATED;
11
+ payload: {
12
+ chat_id: string;
13
+ thread_id: string;
14
+ user_id: string;
15
+ };
16
+ };
17
+ export type ChatPropertiesDeletedPush = {
18
+ action: typeof serverPushActions.CHAT_PROPERTIES_DELETED;
19
+ payload: {
20
+ chat_id: string;
21
+ properties: Record<string, string[]>;
22
+ };
23
+ };
24
+ export type ChatPropertiesUpdatedPush = {
25
+ action: typeof serverPushActions.CHAT_PROPERTIES_UPDATED;
26
+ payload: {
27
+ chat_id: string;
28
+ properties: serverEntities.Properties;
29
+ };
30
+ };
31
+ type BaseTransferPayload = {
32
+ chat_id: string;
33
+ thread_id: string;
34
+ transferred_to: {
35
+ group_ids?: number[];
36
+ agent_ids?: number[];
37
+ };
38
+ queue?: serverEntities.Queue;
39
+ };
40
+ type ManualTransferPayload = BaseTransferPayload & {
41
+ reason: 'manual';
42
+ requester_id?: string;
43
+ };
44
+ type AutoTransferPayload = BaseTransferPayload & {
45
+ reason: 'routing.inactive' | 'routing.assigned';
46
+ requester_id?: never;
47
+ };
48
+ export type ChatTransferredPush = {
49
+ action: typeof serverPushActions.CHAT_TRANSFERRED;
50
+ payload: ManualTransferPayload | AutoTransferPayload;
51
+ };
52
+ export type CustomerDisconnectedPush = {
53
+ action: typeof serverPushActions.CUSTOMER_DISCONNECTED;
54
+ payload: {
55
+ reason: Values<typeof serverDisconnectionReasons>;
56
+ data?: any;
57
+ };
58
+ };
59
+ export type CustomerPageUpdatedPush = {
60
+ action: typeof serverPushActions.CUSTOMER_PAGE_UPDATED;
61
+ payload: {
62
+ url: string;
63
+ title?: string;
64
+ opened_at: string;
65
+ };
66
+ };
67
+ export type CustomerSideStorageUpdatedPush = {
68
+ action: typeof serverPushActions.CUSTOMER_SIDE_STORAGE_UPDATED;
69
+ payload: {
70
+ customer_side_storage: serverEntities.SideStorage;
71
+ };
72
+ };
73
+ export type CustomerUpdatedPush = {
74
+ action: typeof serverPushActions.CUSTOMER_UPDATED;
75
+ payload: Any.Compute<{
76
+ id: string;
77
+ } & serverEntities.OptionalCustomerProps>;
78
+ };
79
+ export type EventPropertiesDeletedPush = {
80
+ action: typeof serverPushActions.EVENT_PROPERTIES_DELETED;
81
+ payload: {
82
+ chat_id: string;
83
+ thread_id: string;
84
+ event_id: string;
85
+ properties: Record<string, string[]>;
86
+ };
87
+ };
88
+ export type EventPropertiesUpdatedPush = {
89
+ action: typeof serverPushActions.EVENT_PROPERTIES_UPDATED;
90
+ payload: {
91
+ chat_id: string;
92
+ thread_id: string;
93
+ event_id: string;
94
+ properties: serverEntities.Properties;
95
+ };
96
+ };
97
+ export type EventUpdatedPush = {
98
+ action: typeof serverPushActions.EVENT_UPDATED;
99
+ payload: {
100
+ chat_id: string;
101
+ thread_id: string;
102
+ event: serverEntities.Event;
103
+ };
104
+ };
105
+ export type EventsMarkedAsSeenPush = {
106
+ action: typeof serverPushActions.EVENTS_MARKED_AS_SEEN;
107
+ payload: {
108
+ user_id: string;
109
+ chat_id: string;
110
+ seen_up_to: string;
111
+ };
112
+ };
113
+ export type GreetingAcceptedPush = {
114
+ action: typeof serverPushActions.GREETING_ACCEPTED;
115
+ payload: {
116
+ unique_id: string;
117
+ };
118
+ };
119
+ export type GreetingCanceledPush = {
120
+ action: typeof serverPushActions.GREETING_CANCELED;
121
+ payload: {
122
+ unique_id: string;
123
+ };
124
+ };
125
+ export type IncomingChatPush = {
126
+ action: typeof serverPushActions.INCOMING_CHAT;
127
+ payload: {
128
+ chat: serverEntities.IncomingChat;
129
+ };
130
+ };
131
+ export type IncomingEventPush = {
132
+ action: typeof serverPushActions.INCOMING_EVENT;
133
+ payload: {
134
+ chat_id: string;
135
+ thread_id: string;
136
+ event: serverEntities.Event;
137
+ };
138
+ };
139
+ export type IncomingGreetingPush = {
140
+ action: typeof serverPushActions.INCOMING_GREETING;
141
+ payload: serverEntities.Greeting;
142
+ };
143
+ export type IncomingMulticastPush = {
144
+ action: typeof serverPushActions.INCOMING_MULTICAST;
145
+ payload: {
146
+ type?: string;
147
+ content: any;
148
+ };
149
+ };
150
+ export type IncomingRichMessagePostbackPush = {
151
+ action: typeof serverPushActions.INCOMING_RICH_MESSAGE_POSTBACK;
152
+ payload: {
153
+ user_id: string;
154
+ chat_id: string;
155
+ thread_id: string;
156
+ event_id: string;
157
+ postback: {
158
+ id: string;
159
+ toggled: boolean;
160
+ };
161
+ };
162
+ };
163
+ export type IncomingTypingIndicatorPush = {
164
+ action: typeof serverPushActions.INCOMING_TYPING_INDICATOR;
165
+ payload: {
166
+ chat_id: string;
167
+ thread_id: string;
168
+ typing_indicator: {
169
+ author_id: string;
170
+ timestamp: number;
171
+ is_typing: boolean;
172
+ };
173
+ };
174
+ };
175
+ export type QueuePositionUpdatedPush = {
176
+ action: typeof serverPushActions.QUEUE_POSITION_UPDATED;
177
+ payload: {
178
+ chat_id: string;
179
+ thread_id: string;
180
+ queue: serverEntities.QueueUpdate;
181
+ };
182
+ };
183
+ export type ThreadPropertiesDeletedPush = {
184
+ action: typeof serverPushActions.THREAD_PROPERTIES_DELETED;
185
+ payload: {
186
+ chat_id: string;
187
+ thread_id: string;
188
+ properties: Record<string, string[]>;
189
+ };
190
+ };
191
+ export type ThreadPropertiesUpdatedPush = {
192
+ action: typeof serverPushActions.THREAD_PROPERTIES_UPDATED;
193
+ payload: {
194
+ chat_id: string;
195
+ thread_id: string;
196
+ properties: serverEntities.Properties;
197
+ };
198
+ };
199
+ export type UserAddedToChatPush = {
200
+ action: typeof serverPushActions.USER_ADDED_TO_CHAT;
201
+ payload: {
202
+ chat_id: string;
203
+ thread_id: string;
204
+ user: serverEntities.ChatUser;
205
+ };
206
+ };
207
+ export type UserRemovedFromChatPush = {
208
+ action: typeof serverPushActions.USER_REMOVED_FROM_CHAT;
209
+ payload: {
210
+ chat_id: string;
211
+ thread_id: string;
212
+ user_id: string;
213
+ };
214
+ };
215
+ export type PushResponse = Any.Compute<{
216
+ type: 'push';
217
+ request_id: string;
218
+ } & (ChatDeactivatedPush | IncomingChatPush | IncomingEventPush)>;
219
+ export type Push = Any.Compute<{
220
+ type: 'push';
221
+ } & (ChatDeactivatedPush | ChatPropertiesDeletedPush | ChatPropertiesUpdatedPush | ChatTransferredPush | CustomerDisconnectedPush | CustomerPageUpdatedPush | CustomerSideStorageUpdatedPush | CustomerUpdatedPush | EventPropertiesDeletedPush | EventPropertiesUpdatedPush | EventUpdatedPush | EventsMarkedAsSeenPush | GreetingAcceptedPush | GreetingCanceledPush | IncomingChatPush | IncomingEventPush | IncomingMulticastPush | IncomingGreetingPush | IncomingRichMessagePostbackPush | IncomingTypingIndicatorPush | QueuePositionUpdatedPush | ThreadPropertiesDeletedPush | ThreadPropertiesUpdatedPush | UserAddedToChatPush | UserRemovedFromChatPush)>;
222
+ export type AcceptGreetingRequest = {
223
+ action: typeof serverRequestActions.ACCEPT_GREETING;
224
+ payload: {
225
+ greeting_id: number;
226
+ unique_id: string;
227
+ };
228
+ };
229
+ export type CancelGreetingRequest = {
230
+ action: typeof serverRequestActions.CANCEL_GREETING;
231
+ payload: {
232
+ unique_id: string;
233
+ };
234
+ };
235
+ export type DeactivateChatRequest = {
236
+ action: typeof serverRequestActions.DEACTIVATE_CHAT;
237
+ payload: {
238
+ id: string;
239
+ };
240
+ };
241
+ export type DeleteChatPropertiesRequest = {
242
+ action: typeof serverRequestActions.DELETE_CHAT_PROPERTIES;
243
+ payload: {
244
+ id: string;
245
+ properties: Record<string, string[]>;
246
+ };
247
+ };
248
+ export type DeleteEventPropertiesRequest = {
249
+ action: typeof serverRequestActions.DELETE_EVENT_PROPERTIES;
250
+ payload: {
251
+ chat_id: string;
252
+ thread_id: string;
253
+ event_id: string;
254
+ properties: Record<string, string[]>;
255
+ };
256
+ };
257
+ export type DeleteThreadPropertiesRequest = {
258
+ action: typeof serverRequestActions.DELETE_THREAD_PROPERTIES;
259
+ payload: {
260
+ chat_id: string;
261
+ thread_id: string;
262
+ properties: Record<string, string[]>;
263
+ };
264
+ };
265
+ export type GetChatRequest = {
266
+ action: typeof serverRequestActions.GET_CHAT;
267
+ payload: {
268
+ chat_id: string;
269
+ thread_id?: string;
270
+ };
271
+ };
272
+ export type GetCustomerRequest = {
273
+ action: typeof serverRequestActions.GET_CUSTOMER;
274
+ payload: EmptyObj;
275
+ };
276
+ export type GetFormRequest = {
277
+ action: typeof serverRequestActions.GET_FORM;
278
+ payload: {
279
+ type: serverEntities.FormType;
280
+ group_id: number;
281
+ };
282
+ };
283
+ export type GetPredictedAgentRequest = {
284
+ action: typeof serverRequestActions.GET_PREDICTED_AGENT;
285
+ payload: {
286
+ group_id?: number;
287
+ };
288
+ };
289
+ export type GetUrlInfoRequest = {
290
+ action: typeof serverRequestActions.GET_URL_INFO;
291
+ payload: {
292
+ url: string;
293
+ };
294
+ };
295
+ export type ListChatsRequest = {
296
+ action: typeof serverRequestActions.LIST_CHATS;
297
+ payload: {
298
+ limit?: number;
299
+ page_id?: string;
300
+ };
301
+ };
302
+ export type ListGroupStatusesRequest = {
303
+ action: typeof serverRequestActions.LIST_GROUP_STATUSES;
304
+ payload: {
305
+ group_ids: number[];
306
+ } | {
307
+ all: true;
308
+ };
309
+ };
310
+ export type ListThreadsRequest = {
311
+ action: typeof serverRequestActions.LIST_THREADS;
312
+ payload: {
313
+ chat_id: string;
314
+ sort_order?: SortOrder;
315
+ limit?: number;
316
+ page_id?: string;
317
+ min_events_count?: number;
318
+ };
319
+ };
320
+ export type LoginRequest = {
321
+ action: typeof serverRequestActions.LOGIN;
322
+ payload: {
323
+ token: string;
324
+ customer?: {
325
+ avatar?: string;
326
+ email?: string;
327
+ name?: string;
328
+ fields?: serverEntities.CustomerSessionFields;
329
+ };
330
+ customer_page?: {
331
+ url?: string;
332
+ title?: string;
333
+ };
334
+ customer_side_storage?: serverEntities.SideStorage;
335
+ is_mobile?: boolean;
336
+ group_id?: number;
337
+ referrer?: string;
338
+ pushes?: Record<string, ReadonlyArray<SubscribablePush>>;
339
+ };
340
+ };
341
+ export type MarkEventsAsSeenRequest = {
342
+ action: typeof serverRequestActions.MARK_EVENTS_AS_SEEN;
343
+ payload: {
344
+ chat_id: string;
345
+ seen_up_to: string;
346
+ };
347
+ };
348
+ export type ResumeChatRequest = {
349
+ action: typeof serverRequestActions.RESUME_CHAT;
350
+ payload: {
351
+ active?: boolean;
352
+ chat: {
353
+ id: string;
354
+ access?: serverEntities.Access;
355
+ properties?: serverEntities.Properties;
356
+ thread?: {
357
+ events?: serverEntities.RequestBodyEvent[];
358
+ properties?: serverEntities.Properties;
359
+ };
360
+ };
361
+ continuous?: boolean;
362
+ };
363
+ };
364
+ export type SendEventRequest = {
365
+ action: typeof serverRequestActions.SEND_EVENT;
366
+ payload: {
367
+ chat_id: string;
368
+ event: serverEntities.RequestBodyEvent;
369
+ attach_to_last_thread?: boolean;
370
+ };
371
+ };
372
+ export type SendRichMessagePostbackRequest = {
373
+ action: typeof serverRequestActions.SEND_RICH_MESSAGE_POSTBACK;
374
+ payload: {
375
+ chat_id: string;
376
+ thread_id: string;
377
+ event_id: string;
378
+ postback: {
379
+ id: string;
380
+ toggled: boolean;
381
+ };
382
+ };
383
+ };
384
+ export type SendSneakPeekRequest = {
385
+ action: typeof serverRequestActions.SEND_SNEAK_PEEK;
386
+ payload: {
387
+ chat_id: string;
388
+ sneak_peek_text: string;
389
+ };
390
+ };
391
+ export type SetCustomerSessionFieldsRequest = {
392
+ action: typeof serverRequestActions.SET_CUSTOMER_SESSION_FIELDS;
393
+ payload: {
394
+ session_fields: serverEntities.CustomerSessionFields;
395
+ };
396
+ };
397
+ export type StartChatRequest = {
398
+ action: typeof serverRequestActions.START_CHAT;
399
+ payload: {
400
+ active?: boolean;
401
+ chat?: {
402
+ access?: serverEntities.Access;
403
+ properties?: serverEntities.Properties;
404
+ thread?: {
405
+ events?: serverEntities.RequestBodyEvent[];
406
+ properties?: serverEntities.Properties;
407
+ };
408
+ };
409
+ continuous?: boolean;
410
+ };
411
+ };
412
+ export type UpdateChatPropertiesRequest = {
413
+ action: typeof serverRequestActions.UPDATE_CHAT_PROPERTIES;
414
+ payload: {
415
+ id: string;
416
+ properties: serverEntities.Properties;
417
+ };
418
+ };
419
+ export type UpdateCustomerPageRequest = {
420
+ action: typeof serverRequestActions.UPDATE_CUSTOMER_PAGE;
421
+ payload: {
422
+ url: string;
423
+ title?: string;
424
+ };
425
+ };
426
+ export type UpdateCustomerRequest = {
427
+ action: typeof serverRequestActions.UPDATE_CUSTOMER;
428
+ payload: {
429
+ avatar?: string;
430
+ name?: string;
431
+ email?: string;
432
+ fields?: serverEntities.CustomerSessionFields;
433
+ };
434
+ };
435
+ export type UpdateEventPropertiesRequest = {
436
+ action: typeof serverRequestActions.UPDATE_EVENT_PROPERTIES;
437
+ payload: {
438
+ chat_id: string;
439
+ thread_id: string;
440
+ event_id: string;
441
+ properties: serverEntities.Properties;
442
+ };
443
+ };
444
+ export type UpdateThreadPropertiesRequest = {
445
+ action: typeof serverRequestActions.UPDATE_THREAD_PROPERTIES;
446
+ payload: {
447
+ chat_id: string;
448
+ thread_id: string;
449
+ properties: serverEntities.Properties;
450
+ };
451
+ };
452
+ export type Request = Any.Compute<{
453
+ request_id: string;
454
+ version?: string;
455
+ } & (AcceptGreetingRequest | CancelGreetingRequest | DeactivateChatRequest | DeleteChatPropertiesRequest | DeleteEventPropertiesRequest | DeleteThreadPropertiesRequest | GetChatRequest | GetCustomerRequest | GetFormRequest | GetPredictedAgentRequest | GetUrlInfoRequest | ListGroupStatusesRequest | ListChatsRequest | ListThreadsRequest | LoginRequest | MarkEventsAsSeenRequest | ResumeChatRequest | SendEventRequest | SendRichMessagePostbackRequest | SendSneakPeekRequest | SetCustomerSessionFieldsRequest | StartChatRequest | UpdateChatPropertiesRequest | UpdateCustomerPageRequest | UpdateCustomerRequest | UpdateEventPropertiesRequest | UpdateThreadPropertiesRequest)>;
456
+ export type AcceptGreetingResponse = {
457
+ action: typeof serverRequestActions.ACCEPT_GREETING;
458
+ payload: EmptyObj;
459
+ };
460
+ export type CancelGreetingResponse = {
461
+ action: typeof serverRequestActions.CANCEL_GREETING;
462
+ payload: EmptyObj;
463
+ };
464
+ export type DeactivateChatResponse = {
465
+ action: typeof serverRequestActions.DEACTIVATE_CHAT;
466
+ payload: EmptyObj;
467
+ };
468
+ export type DeleteChatPropertiesResponse = {
469
+ action: typeof serverRequestActions.DELETE_CHAT_PROPERTIES;
470
+ payload: EmptyObj;
471
+ };
472
+ export type DeleteEventPropertiesResponse = {
473
+ action: typeof serverRequestActions.DELETE_EVENT_PROPERTIES;
474
+ payload: EmptyObj;
475
+ };
476
+ export type DeleteThreadPropertiesResponse = {
477
+ action: typeof serverRequestActions.DELETE_THREAD_PROPERTIES;
478
+ payload: EmptyObj;
479
+ };
480
+ export type GetChatResponse = {
481
+ action: typeof serverRequestActions.GET_CHAT;
482
+ payload: serverEntities.Chat;
483
+ };
484
+ export type GetCustomerResponse = {
485
+ action: typeof serverRequestActions.GET_CUSTOMER;
486
+ payload: serverEntities.Customer;
487
+ };
488
+ export type GetFormResponse = {
489
+ action: typeof serverRequestActions.GET_FORM;
490
+ payload: {
491
+ enabled: true;
492
+ form: {
493
+ id: string;
494
+ fields: serverEntities.FormField[];
495
+ };
496
+ } | {
497
+ enabled: false;
498
+ };
499
+ };
500
+ export type GetPredictedAgentResponse = {
501
+ action: typeof serverRequestActions.GET_PREDICTED_AGENT;
502
+ payload: {
503
+ agent: serverEntities.PredictedAgent;
504
+ queue: boolean;
505
+ };
506
+ };
507
+ export type GetUrlInfoResponse = {
508
+ action: typeof serverRequestActions.GET_URL_INFO;
509
+ payload: {
510
+ url: string;
511
+ title?: string;
512
+ description?: string;
513
+ image_url?: string;
514
+ image_width?: number;
515
+ image_height?: number;
516
+ };
517
+ };
518
+ export type ListChatsResponse = {
519
+ action: typeof serverRequestActions.LIST_CHATS;
520
+ payload: {
521
+ chats_summary: serverEntities.ChatSummary[];
522
+ total_chats: number;
523
+ previous_page_id?: string;
524
+ next_page_id?: string;
525
+ };
526
+ };
527
+ export type ListGroupStatusesResponse = {
528
+ action: typeof serverRequestActions.LIST_GROUP_STATUSES;
529
+ payload: {
530
+ groups_status: Record<number, serverEntities.GroupStatus>;
531
+ };
532
+ };
533
+ export type ListThreadsResponse = {
534
+ action: typeof serverRequestActions.LIST_THREADS;
535
+ payload: {
536
+ threads: serverEntities.Thread[];
537
+ previous_page_id?: string;
538
+ next_page_id?: string;
539
+ };
540
+ };
541
+ export type LoginResponse = {
542
+ action: typeof serverRequestActions.LOGIN;
543
+ payload: {
544
+ customer_id: string;
545
+ customer: serverEntities.Customer;
546
+ has_active_thread: boolean;
547
+ chats: Array<{
548
+ chat_id: string;
549
+ has_unread_events: boolean;
550
+ has_active_thread?: boolean;
551
+ }>;
552
+ __priv_dynamic_config: serverEntities.DynamicConfig;
553
+ greeting?: serverEntities.Greeting;
554
+ };
555
+ };
556
+ export type MarkEventsAsSeenResponse = {
557
+ action: typeof serverRequestActions.MARK_EVENTS_AS_SEEN;
558
+ payload: EmptyObj;
559
+ };
560
+ export type ResumeChatResponse = {
561
+ action: typeof serverRequestActions.RESUME_CHAT;
562
+ payload: {
563
+ thread_id: string;
564
+ };
565
+ };
566
+ export type SendEventResponse = {
567
+ action: typeof serverRequestActions.SEND_EVENT;
568
+ payload: {
569
+ event_id: string;
570
+ };
571
+ };
572
+ export type SendRichMessagePostbackResponse = {
573
+ action: typeof serverRequestActions.SEND_RICH_MESSAGE_POSTBACK;
574
+ payload: EmptyObj;
575
+ };
576
+ export type SendSneakPeekResponse = {
577
+ action: typeof serverRequestActions.SEND_SNEAK_PEEK;
578
+ payload: EmptyObj;
579
+ };
580
+ export type SetCustomerSessionFieldsResponse = {
581
+ action: typeof serverRequestActions.SET_CUSTOMER_SESSION_FIELDS;
582
+ payload: EmptyObj;
583
+ };
584
+ export type StartChatResponse = {
585
+ action: typeof serverRequestActions.START_CHAT;
586
+ payload: {
587
+ chat_id: string;
588
+ thread_id: string;
589
+ };
590
+ };
591
+ export type UpdateChatPropertiesResponse = {
592
+ action: typeof serverRequestActions.UPDATE_CHAT_PROPERTIES;
593
+ payload: EmptyObj;
594
+ };
595
+ export type UpdateCustomerPageResponse = {
596
+ action: typeof serverRequestActions.UPDATE_CUSTOMER_PAGE;
597
+ payload: EmptyObj;
598
+ };
599
+ export type UpdateCustomerResponse = {
600
+ action: typeof serverRequestActions.UPDATE_CUSTOMER;
601
+ payload: EmptyObj;
602
+ };
603
+ export type UpdateEventPropertiesResponse = {
604
+ action: typeof serverRequestActions.UPDATE_EVENT_PROPERTIES;
605
+ payload: EmptyObj;
606
+ };
607
+ export type UpdateThreadPropertiesResponse = {
608
+ action: typeof serverRequestActions.UPDATE_THREAD_PROPERTIES;
609
+ payload: EmptyObj;
610
+ };
611
+ export type Response = Any.Compute<{
612
+ type: 'response';
613
+ request_id: string;
614
+ success: true;
615
+ } & (AcceptGreetingResponse | CancelGreetingResponse | DeleteChatPropertiesResponse | DeleteEventPropertiesResponse | DeleteThreadPropertiesResponse | GetChatResponse | GetCustomerResponse | GetFormResponse | GetPredictedAgentResponse | GetUrlInfoResponse | ListChatsResponse | ListGroupStatusesResponse | ListThreadsResponse | LoginResponse | MarkEventsAsSeenResponse | ResumeChatResponse | SendEventResponse | SendRichMessagePostbackResponse | SendSneakPeekResponse | SetCustomerSessionFieldsResponse | StartChatResponse | UpdateChatPropertiesResponse | UpdateCustomerPageResponse | UpdateCustomerResponse | UpdateEventPropertiesResponse | UpdateThreadPropertiesResponse)>;
616
+ export type DirectResponse = Exclude<Response, {
617
+ action: typeof serverRequestActions.RESUME_CHAT | typeof serverRequestActions.SEND_EVENT | typeof serverRequestActions.START_CHAT;
618
+ }>;
619
+ export type ResponseError = {
620
+ request_id: string;
621
+ action: string;
622
+ type: 'response';
623
+ success: false;
624
+ payload: {
625
+ error: {
626
+ type: string;
627
+ message: string;
628
+ data?: {
629
+ [key: string]: string;
630
+ };
631
+ };
632
+ };
633
+ };
634
+ export {};
635
+ //# sourceMappingURL=frames.d.ts.map