-
Notifications
You must be signed in to change notification settings - Fork 11
/
website_conversation.go
1985 lines (1554 loc) · 78.3 KB
/
website_conversation.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2018 Crisp IM SAS All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package crisp
import (
"fmt"
"net/http"
"net/url"
)
// ConversationListData mapping
type ConversationListData struct {
Data *[]Conversation `json:"data,omitempty"`
}
// ConversationData mapping
type ConversationData struct {
Data *Conversation `json:"data,omitempty"`
}
// Conversation mapping
type Conversation struct {
SessionID *string `json:"session_id,omitempty"`
WebsiteID *string `json:"website_id,omitempty"`
PeopleID *string `json:"people_id,omitempty"`
State *string `json:"state,omitempty"`
Status *uint8 `json:"status,omitempty"`
IsVerified *bool `json:"is_verified,omitempty"`
IsBlocked *bool `json:"is_blocked,omitempty"`
Availability *string `json:"availability,omitempty"`
Active *ConversationActive `json:"active,omitempty"`
LastMessage *string `json:"last_message,omitempty"`
Topic *string `json:"topic,omitempty"`
Participants *[]ConversationParticipant `json:"participants,omitempty"`
Mentions *[]string `json:"mentions,omitempty"`
Compose *ConversationCompose `json:"compose,omitempty"`
Unread *ConversationUnread `json:"unread,omitempty"`
Assigned *ConversationAssigned `json:"assigned,omitempty"`
Meta *ConversationMeta `json:"meta,omitempty"`
CreatedAt *uint64 `json:"created_at,omitempty"`
UpdatedAt *uint64 `json:"updated_at,omitempty"`
WaitingSince *uint64 `json:"waiting_since,omitempty"`
}
// ConversationActive mapping
type ConversationActive struct {
Now *bool `json:"now,omitempty"`
Last *uint64 `json:"last,omitempty"`
}
// ConversationCompose mapping
type ConversationCompose struct {
Operator *ConversationComposeAtom `json:"operator,omitempty"`
Visitor *ConversationComposeAtom `json:"visitor,omitempty"`
}
// ConversationComposeAtom mapping
type ConversationComposeAtom struct {
Type *string `json:"type,omitempty"`
Excerpt *string `json:"excerpt,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
User *ConversationComposeAtomUser `json:"user,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationComposeAtomUser mapping
type ConversationComposeAtomUser struct {
UserID *string `json:"user_id,omitempty"`
Nickname *string `json:"nickname,omitempty"`
Avatar *string `json:"avatar,omitempty"`
}
// ConversationUnread mapping
type ConversationUnread struct {
Operator *uint16 `json:"operator,omitempty"`
Visitor *uint16 `json:"visitor,omitempty"`
}
// ConversationAssigned mapping
type ConversationAssigned struct {
UserID *string `json:"user_id,omitempty"`
}
// ConversationMeta mapping
type ConversationMeta struct {
Nickname *string `json:"nickname,omitempty"`
Email *string `json:"email,omitempty"`
Phone *string `json:"phone,omitempty"`
Address *string `json:"address,omitempty"`
Subject *string `json:"subject,omitempty"`
IP *string `json:"ip,omitempty"`
Data *interface{} `json:"data,omitempty"`
Avatar *string `json:"avatar,omitempty"`
Device *ConversationMetaDevice `json:"device,omitempty"`
Segments *[]string `json:"segments,omitempty"`
}
// ConversationOriginal mapping
type ConversationOriginal struct {
WebsiteID *string `json:"website_id,omitempty"`
SessionID *string `json:"session_id,omitempty"`
OriginalID *string `json:"original_id,omitempty"`
Type *string `json:"type,omitempty"`
Headers *interface{} `json:"headers,omitempty"`
Content *string `json:"content,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
}
// ConversationPagesData mapping
type ConversationPagesData struct {
Data *[]ConversationPage `json:"data,omitempty"`
}
// ConversationPage mapping
type ConversationPage struct {
PageTitle *string `json:"page_title,omitempty"`
PageURL *string `json:"page_url,omitempty"`
PageReferrer *string `json:"page_referrer,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
}
// ConversationEventsData mapping
type ConversationEventsData struct {
Data *[]ConversationEvent `json:"data,omitempty"`
}
// ConversationEvent mapping
type ConversationEvent struct {
Text *string `json:"text,omitempty"`
Data *interface{} `json:"data,omitempty"`
Color *string `json:"color,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
}
// ConversationFilesData mapping
type ConversationFilesData struct {
Data *[]ConversationFile `json:"data,omitempty"`
}
// ConversationFile mapping
type ConversationFile struct {
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
URL *string `json:"url,omitempty"`
Fingerprint *int `json:"fingerprint,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
}
// ConversationMessage mapping
type ConversationMessage struct {
SessionID *string `json:"session_id,omitempty"`
WebsiteID *string `json:"website_id,omitempty"`
Type *string `json:"type,omitempty"`
From *string `json:"from,omitempty"`
Origin *string `json:"origin,omitempty"`
Content *interface{} `json:"content,omitempty"`
Preview *[]ConversationMessagePreview `json:"preview,omitempty"`
Mentions *[]string `json:"mentions,omitempty"`
Read *string `json:"read,omitempty"`
Delivered *string `json:"delivered,omitempty"`
Edited *bool `json:"edited,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
Fingerprint *int `json:"fingerprint,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
User *ConversationMessageUser `json:"user,omitempty"`
References *[]ConversationMessageReference `json:"references,omitempty"`
Original *ConversationMessageOriginal `json:"original,omitempty"`
}
// ConversationMessageDispatchedData mapping
type ConversationMessageDispatchedData struct {
Data *ConversationMessageDispatched `json:"data,omitempty"`
}
// ConversationMessageDispatched mapping
type ConversationMessageDispatched struct {
Fingerprint *int `json:"fingerprint,omitempty"`
}
// ConversationMessageTextContent mapping
type ConversationMessageTextContent string
// ConversationMessageFileContent mapping
type ConversationMessageFileContent struct {
Name *string `json:"name"`
URL *string `json:"url"`
Type *string `json:"type"`
}
// ConversationMessageAnimationContent mapping
type ConversationMessageAnimationContent struct {
URL *string `json:"url"`
Type *string `json:"type"`
}
// ConversationMessageAudioContent mapping
type ConversationMessageAudioContent struct {
URL *string `json:"url"`
Type *string `json:"type"`
Duration *uint16 `json:"duration"`
}
// ConversationMessagePickerContent mapping
type ConversationMessagePickerContent struct {
ID *string `json:"id"`
Text *string `json:"text"`
Choices *[]ConversationMessagePickerContentChoice `json:"choices"`
Required *bool `json:"required,omitempty"`
}
// ConversationMessagePickerContentChoice mapping
type ConversationMessagePickerContentChoice struct {
Value *string `json:"value"`
Icon *string `json:"icon,omitempty"`
Label *string `json:"label"`
Selected *bool `json:"selected"`
Action *ConversationMessagePickerContentChoiceAction `json:"action,omitempty"`
}
// ConversationMessagePickerContentChoiceAction mapping
type ConversationMessagePickerContentChoiceAction struct {
Type *string `json:"type"`
Target *string `json:"target"`
}
// ConversationMessageFieldContent mapping
type ConversationMessageFieldContent struct {
ID *string `json:"id"`
Text *string `json:"text"`
Explain *string `json:"explain"`
Value *string `json:"value"`
Required *bool `json:"required,omitempty"`
}
// ConversationMessageCarouselContent mapping
type ConversationMessageCarouselContent struct {
Text *string `json:"text"`
Targets *[]ConversationMessageCarouselContentTarget `json:"targets"`
}
// ConversationMessageCarouselContentTarget mapping
type ConversationMessageCarouselContentTarget struct {
Title *string `json:"title"`
Description *string `json:"description"`
Image *string `json:"image,omitempty"`
Actions *[]ConversationMessageCarouselContentTargetAction `json:"actions"`
}
// ConversationMessageCarouselContentTargetAction mapping
type ConversationMessageCarouselContentTargetAction struct {
Label *string `json:"label"`
URL *string `json:"url"`
}
// ConversationMessageNoteContent mapping
type ConversationMessageNoteContent string
// ConversationMessageEventContent mapping
type ConversationMessageEventContent struct {
Namespace *string `json:"namespace"`
Text *string `json:"text,omitempty"`
}
// ConversationMessagePreview mapping
type ConversationMessagePreview struct {
URL *string `json:"url,omitempty"`
Website *string `json:"website,omitempty"`
Title *string `json:"title,omitempty"`
Preview *ConversationMessagePreviewInformation `json:"preview,omitempty"`
Stamped *bool `json:"stamped,omitempty"`
}
// ConversationMessagePreviewInformation mapping
type ConversationMessagePreviewInformation struct {
Excerpt *string `json:"excerpt,omitempty"`
Image *string `json:"image,omitempty"`
Embed *string `json:"embed,omitempty"`
}
// ConversationMessageUser mapping
type ConversationMessageUser struct {
Type *string `json:"type,omitempty"`
UserID *string `json:"user_id,omitempty"`
Nickname *string `json:"nickname,omitempty"`
Avatar *string `json:"avatar,omitempty"`
}
// ConversationMessageReference mapping
type ConversationMessageReference struct {
Type *string `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
Target *string `json:"target,omitempty"`
}
// ConversationMessageOriginal mapping
type ConversationMessageOriginal struct {
OriginalID *string `json:"original_id,omitempty"`
}
// ConversationMetaDevice mapping
type ConversationMetaDevice struct {
Capabilities *[]string `json:"capabilities,omitempty"`
Geolocation *ConversationMetaDeviceGeolocation `json:"geolocation,omitempty"`
System *ConversationMetaDeviceSystem `json:"system,omitempty"`
Timezone *int16 `json:"timezone,omitempty"`
Locales *[]string `json:"locales,omitempty"`
}
// ConversationMetaDeviceGeolocation mapping
type ConversationMetaDeviceGeolocation struct {
Coordinates *ConversationMetaDeviceGeolocationCoordinates `json:"coordinates,omitempty"`
City *string `json:"city,omitempty"`
Region *string `json:"region,omitempty"`
Country *string `json:"country,omitempty"`
}
// ConversationMetaDeviceGeolocationCoordinates mapping
type ConversationMetaDeviceGeolocationCoordinates struct {
Latitude *float32 `json:"latitude,omitempty"`
Longitude *float32 `json:"longitude,omitempty"`
}
// ConversationMetaDeviceSystem mapping
type ConversationMetaDeviceSystem struct {
OS *ConversationMetaDeviceSystemOS `json:"os,omitempty"`
Engine *ConversationMetaDeviceSystemEngine `json:"engine,omitempty"`
Browser *ConversationMetaDeviceSystemBrowser `json:"browser,omitempty"`
Useragent *string `json:"useragent,omitempty"`
}
// ConversationMetaDeviceSystemOS mapping
type ConversationMetaDeviceSystemOS struct {
Version *string `json:"version,omitempty"`
Name *string `json:"name,omitempty"`
}
// ConversationMetaDeviceSystemEngine mapping
type ConversationMetaDeviceSystemEngine struct {
Version *string `json:"version,omitempty"`
Name *string `json:"name,omitempty"`
}
// ConversationMetaDeviceSystemBrowser mapping
type ConversationMetaDeviceSystemBrowser struct {
Major *string `json:"major,omitempty"`
Version *string `json:"version,omitempty"`
Name *string `json:"name,omitempty"`
}
// ConversationSuggestedSegmentData mapping
type ConversationSuggestedSegmentData struct {
Data *[]ConversationSuggestedSegment `json:"data,omitempty"`
}
// ConversationSuggestedSegment mapping
type ConversationSuggestedSegment struct {
Segment *string `json:"segment,omitempty"`
Count *int32 `json:"count,omitempty"`
}
// ConversationSuggestedDataData mapping
type ConversationSuggestedDataData struct {
Data *[]ConversationSuggestedData `json:"data,omitempty"`
}
// ConversationSuggestedData mapping
type ConversationSuggestedData struct {
Key *string `json:"key,omitempty"`
Count *int32 `json:"count,omitempty"`
}
// ConversationRoutingAssignData mapping
type ConversationRoutingAssignData struct {
Data *ConversationRoutingAssign `json:"data,omitempty"`
}
// ConversationRoutingAssign mapping
type ConversationRoutingAssign struct {
Assigned *ConversationRoutingAssignAssigned `json:"assigned,omitempty"`
}
// ConversationRoutingAssignAssigned mapping
type ConversationRoutingAssignAssigned struct {
UserID *string `json:"user_id,omitempty"`
}
// ConversationNewData mapping
type ConversationNewData struct {
Data *ConversationNew `json:"data,omitempty"`
}
// ConversationNew mapping
type ConversationNew struct {
SessionID *string `json:"session_id,omitempty"`
}
// ConversationMessagesData mapping
type ConversationMessagesData struct {
Data *[]ConversationMessage `json:"data,omitempty"`
}
// ConversationMessageData mapping
type ConversationMessageData struct {
Data *ConversationMessage `json:"data,omitempty"`
}
// ConversationSuggestedSegmentDelete mapping
type ConversationSuggestedSegmentDelete struct {
Segment string `json:"segment,omitempty"`
}
// ConversationSuggestedDataDelete mapping
type ConversationSuggestedDataDelete struct {
Key string `json:"key,omitempty"`
}
// ConversationFileMessageNewContent mapping
type ConversationFileMessageNewContent struct {
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Type string `json:"type,omitempty"`
}
// ConversationAnimationMessageNewContent mapping
type ConversationAnimationMessageNewContent struct {
URL string `json:"url,omitempty"`
Type string `json:"type,omitempty"`
}
// ConversationAudioMessageNewContent mapping
type ConversationAudioMessageNewContent struct {
URL string `json:"url,omitempty"`
Type string `json:"type,omitempty"`
Duration uint16 `json:"duration,omitempty"`
}
// ConversationPickerMessageNewContent mapping
type ConversationPickerMessageNewContent struct {
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Choices []ConversationPickerMessageNewContentChoice `json:"choices,omitempty"`
Required *bool `json:"required,omitempty"`
}
// ConversationPickerMessageNewContentChoice mapping
type ConversationPickerMessageNewContentChoice struct {
Value string `json:"value,omitempty"`
Icon *string `json:"icon,omitempty"`
Label string `json:"label,omitempty"`
Selected bool `json:"selected"`
Action *ConversationPickerMessageNewContentChoiceAction `json:"action,omitempty"`
}
// ConversationPickerMessageNewContentChoiceAction mapping
type ConversationPickerMessageNewContentChoiceAction struct {
Type string `json:"type"`
Target string `json:"target"`
}
// ConversationFieldMessageNewContent mapping
type ConversationFieldMessageNewContent struct {
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Explain string `json:"explain,omitempty"`
Value string `json:"value,omitempty"`
Required *bool `json:"required,omitempty"`
}
// ConversationCarouselMessageNewContent mapping
type ConversationCarouselMessageNewContent struct {
Text string `json:"text,omitempty"`
Targets []ConversationCarouselMessageNewContentTarget `json:"targets,omitempty"`
}
// ConversationCarouselMessageNewContentTarget mapping
type ConversationCarouselMessageNewContentTarget struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Image *string `json:"image,omitempty"`
Actions []ConversationCarouselMessageNewContentTargetAction `json:"actions,omitempty"`
}
// ConversationCarouselMessageNewContentTargetAction mapping
type ConversationCarouselMessageNewContentTargetAction struct {
Label string `json:"label,omitempty"`
URL string `json:"url,omitempty"`
}
// ConversationEventMessageNewContent mapping
type ConversationEventMessageNewContent struct {
Namespace string `json:"namespace,omitempty"`
Text *string `json:"text,omitempty"`
}
// ConversationTextMessageNew mapping
type ConversationTextMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content string `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationFileMessageNew mapping
type ConversationFileMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationFileMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationAnimationMessageNew mapping
type ConversationAnimationMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationAnimationMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationAudioMessageNew mapping
type ConversationAudioMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationAudioMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationPickerMessageNew mapping
type ConversationPickerMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationPickerMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationFieldMessageNew mapping
type ConversationFieldMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationFieldMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationCarouselMessageNew mapping
type ConversationCarouselMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationCarouselMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationNoteMessageNew mapping
type ConversationNoteMessageNew ConversationTextMessageNew
// ConversationEventMessageNew mapping
type ConversationEventMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Content ConversationEventMessageNewContent `json:"content,omitempty"`
Mentions []string `json:"mentions,omitempty"`
Fingerprint int `json:"fingerprint,omitempty"`
User ConversationAllMessageNewUser `json:"user,omitempty"`
References *[]ConversationAllMessageNewReference `json:"references,omitempty"`
Original *ConversationAllMessageNewOriginal `json:"original,omitempty"`
Timestamp *uint64 `json:"timestamp,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Translated *bool `json:"translated,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationTextMessageUpdate mapping
type ConversationTextMessageUpdate struct {
Content string `json:"content,omitempty"`
}
// ConversationFileMessageUpdate mapping
type ConversationFileMessageUpdate struct {
Content ConversationFileMessageNewContent `json:"content,omitempty"`
}
// ConversationAnimationMessageUpdate mapping
type ConversationAnimationMessageUpdate struct {
Content ConversationAnimationMessageNewContent `json:"content,omitempty"`
}
// ConversationAudioMessageUpdate mapping
type ConversationAudioMessageUpdate struct {
Content ConversationAudioMessageNewContent `json:"content,omitempty"`
}
// ConversationPickerMessageUpdate mapping
type ConversationPickerMessageUpdate struct {
Content ConversationPickerMessageNewContent `json:"content,omitempty"`
}
// ConversationFieldMessageUpdate mapping
type ConversationFieldMessageUpdate struct {
Content ConversationFieldMessageNewContent `json:"content,omitempty"`
}
// ConversationCarouselMessageUpdate mapping
type ConversationCarouselMessageUpdate struct {
Content ConversationCarouselMessageNewContent `json:"content,omitempty"`
}
// ConversationNoteMessageUpdate mapping
type ConversationNoteMessageUpdate ConversationTextMessageUpdate
// ConversationEventMessageUpdate mapping
type ConversationEventMessageUpdate struct {
Content ConversationEventMessageNewContent `json:"content,omitempty"`
}
// ConversationAllMessageNewUser mapping
type ConversationAllMessageNewUser struct {
Type string `json:"type,omitempty"`
Nickname string `json:"nickname,omitempty"`
Avatar string `json:"avatar,omitempty"`
}
// ConversationAllMessageNewReference mapping
type ConversationAllMessageNewReference struct {
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Target string `json:"target,omitempty"`
}
// ConversationAllMessageNewOriginal mapping
type ConversationAllMessageNewOriginal struct {
Type string `json:"type,omitempty"`
Content string `json:"content,omitempty"`
}
// ConversationComposeMessageNew mapping
type ConversationComposeMessageNew struct {
Type string `json:"type,omitempty"`
From string `json:"from,omitempty"`
Excerpt string `json:"excerpt,omitempty"`
Stealth *bool `json:"stealth,omitempty"`
Automated *bool `json:"automated,omitempty"`
}
// ConversationReadMessageMark mapping
type ConversationReadMessageMark struct {
From string `json:"from,omitempty"`
Origin string `json:"origin,omitempty"`
Fingerprints []int `json:"fingerprints,omitempty"`
}
// ConversationDeliveredMessageMark mapping
type ConversationDeliveredMessageMark ConversationReadMessageMark
// ConversationOpenUpdate mapping
type ConversationOpenUpdate struct {
Opened *bool `json:"blocked,omitempty"`
}
// ConversationRoutingAssignUpdate mapping
type ConversationRoutingAssignUpdate struct {
Assigned *ConversationRoutingAssignUpdateAssigned `json:"assigned"`
}
// ConversationRoutingAssignUpdateAssigned mapping
type ConversationRoutingAssignUpdateAssigned struct {
UserID string `json:"user_id,omitempty"`
}
// ConversationMetaData mapping
type ConversationMetaData struct {
Data *ConversationMeta `json:"data,omitempty"`
}
// ConversationMetaUpdate mapping
type ConversationMetaUpdate struct {
Nickname string `json:"nickname,omitempty"`
Email string `json:"email,omitempty"`
Avatar string `json:"avatar,omitempty"`
IP string `json:"ip,omitempty"`
Phone string `json:"phone,omitempty"`
Address string `json:"address,omitempty"`
Subject string `json:"subject,omitempty"`
Segments []string `json:"segments,omitempty"`
Data interface{} `json:"data,omitempty"`
Device *ConversationMetaUpdateDevice `json:"device,omitempty"`
}
// ConversationMetaUpdateDevice mapping
type ConversationMetaUpdateDevice struct {
Capabilities []string `json:"capabilities,omitempty"`
Geolocation *ConversationMetaUpdateDeviceGeolocation `json:"geolocation,omitempty"`
System *ConversationMetaUpdateDeviceSystem `json:"system,omitempty"`
Timezone int16 `json:"timezone,omitempty"`
Locales []string `json:"locales,omitempty"`
}
// ConversationMetaUpdateDeviceGeolocation mapping
type ConversationMetaUpdateDeviceGeolocation struct {
Coordinates ConversationMetaUpdateDeviceGeolocationCoordinates `json:"coordinates,omitempty"`
City string `json:"city,omitempty"`
Region string `json:"region,omitempty"`
Country string `json:"country,omitempty"`
}
// ConversationMetaUpdateDeviceGeolocationCoordinates mapping
type ConversationMetaUpdateDeviceGeolocationCoordinates struct {
Latitude float32 `json:"latitude,omitempty"`
Longitude float32 `json:"longitude,omitempty"`
}
// ConversationMetaUpdateDeviceSystem mapping
type ConversationMetaUpdateDeviceSystem struct {
OS ConversationMetaUpdateDeviceSystemOS `json:"os,omitempty"`
Engine ConversationMetaUpdateDeviceSystemEngine `json:"engine,omitempty"`
Browser ConversationMetaUpdateDeviceSystemBrowser `json:"browser,omitempty"`
Useragent string `json:"useragent,omitempty"`
}
// ConversationMetaUpdateDeviceSystemOS mapping
type ConversationMetaUpdateDeviceSystemOS struct {
Version string `json:"version,omitempty"`
Name string `json:"name,omitempty"`
}
// ConversationMetaUpdateDeviceSystemEngine mapping
type ConversationMetaUpdateDeviceSystemEngine struct {
Version string `json:"version,omitempty"`
Name string `json:"name,omitempty"`
}
// ConversationMetaUpdateDeviceSystemBrowser mapping
type ConversationMetaUpdateDeviceSystemBrowser struct {
Major string `json:"major,omitempty"`
Version string `json:"version,omitempty"`
Name string `json:"name,omitempty"`
}
// ConversationOriginalData mapping
type ConversationOriginalData struct {
Data *ConversationOriginal `json:"data,omitempty"`
}
// ConversationStateData mapping
type ConversationStateData struct {
Data *ConversationState `json:"data,omitempty"`
}
// ConversationState mapping
type ConversationState struct {
State *string `json:"state,omitempty"`
}
// ConversationStateUpdate mapping
type ConversationStateUpdate struct {
State *string `json:"state,omitempty"`
}
// ConversationParticipantsData mapping
type ConversationParticipantsData struct {
Data *ConversationParticipants `json:"data,omitempty"`
}
// ConversationParticipants mapping
type ConversationParticipants struct {
Participants *[]ConversationParticipant `json:"participants,omitempty"`
}
// ConversationParticipant mapping
type ConversationParticipant struct {
Type *string `json:"type,omitempty"`
Target *string `json:"target,omitempty"`
}
// ConversationParticipantsSave mapping
type ConversationParticipantsSave struct {
Participants *[]ConversationParticipant `json:"participants,omitempty"`
}
// ConversationBlockData mapping
type ConversationBlockData struct {
Data *ConversationBlock `json:"data,omitempty"`
}
// ConversationBlock mapping
type ConversationBlock struct {
Blocked *bool `json:"blocked,omitempty"`
}
// ConversationBlockUpdate mapping
type ConversationBlockUpdate struct {
Blocked *bool `json:"blocked,omitempty"`
}
// ConversationVerifyData mapping
type ConversationVerifyData struct {
Data *ConversationVerify `json:"data,omitempty"`
}
// ConversationVerify mapping
type ConversationVerify struct {
Verified *bool `json:"verified,omitempty"`
}
// ConversationVerifyUpdate mapping
type ConversationVerifyUpdate struct {
Verified *bool `json:"verified,omitempty"`
}
// ConversationTranscriptRequest mapping
type ConversationTranscriptRequest struct {
To *string `json:"to,omitempty"`
Email *string `json:"email,omitempty"`
}
// ConversationBrowsingData mapping
type ConversationBrowsingData struct {
Data *[]ConversationBrowsing `json:"data,omitempty"`
}
// ConversationBrowsing mapping
type ConversationBrowsing struct {
BrowsingID *string `json:"browsing_id,omitempty"`
BrowsingToken *string `json:"browsing_token,omitempty"`
Useragent *string `json:"useragent,omitempty"`
}
// ConversationBrowsingAction mapping
type ConversationBrowsingAction struct {
Action *string `json:"action,omitempty"`
}
// ConversationBrowsingAssist mapping
type ConversationBrowsingAssist struct {
Action *string `json:"action,omitempty"`
Mouse *ConversationBrowsingAssistMouse `json:"mouse,omitempty"`
Click *ConversationBrowsingAssistClick `json:"click,omitempty"`
Scroll *ConversationBrowsingAssistScroll `json:"scroll,omitempty"`
}
// ConversationBrowsingAssistMouse mapping
type ConversationBrowsingAssistMouse struct {
X *uint16 `json:"x,omitempty"`
Y *uint16 `json:"y,omitempty"`
}
// ConversationBrowsingAssistClick mapping
type ConversationBrowsingAssistClick struct {
X *uint16 `json:"x,omitempty"`
Y *uint16 `json:"y,omitempty"`
}
// ConversationBrowsingAssistScroll mapping
type ConversationBrowsingAssistScroll struct {
X *uint16 `json:"x,omitempty"`
Y *uint16 `json:"y,omitempty"`
}
// ConversationCallData mapping
type ConversationCallData struct {
Data *ConversationCall `json:"data,omitempty"`
}
// ConversationCall mapping
type ConversationCall struct {
CallID *string `json:"call_id,omitempty"`
}
// ConversationCallPayload mapping
type ConversationCallPayload struct {
Mode string `json:"mode,omitempty"`
}
// ConversationCallSignalingPayload mapping
type ConversationCallSignalingPayload struct {
Type string `json:"type,omitempty"`
Payload interface{} `json:"payload,omitempty"`
}
// ConversationWidgetActionData mapping
type ConversationWidgetActionData struct {
Data *ConversationWidgetAction `json:"data,omitempty"`
}
// ConversationWidgetAction mapping
type ConversationWidgetAction struct {
CorrelationID *string `json:"correlation_id,omitempty"`
Strategy *ConversationWidgetActionStrategy `json:"strategy,omitempty"`
}
// ConversationWidgetActionStrategy mapping
type ConversationWidgetActionStrategy struct {
Attempts *uint8 `json:"attempts,omitempty"`
Exhaustion *uint16 `json:"exhaustion,omitempty"`
}
// ConversationWidgetButtonPayload mapping
type ConversationWidgetButtonPayload struct {
SectionID string `json:"section_id,omitempty"`
ItemID string `json:"item_id,omitempty"`
Data interface{} `json:"data,omitempty"`
Value *interface{} `json:"value,omitempty"`
}
// ConversationWidgetDataFetchPayload mapping
type ConversationWidgetDataFetchPayload struct {
SectionID string `json:"section_id,omitempty"`
ItemID string `json:"item_id,omitempty"`
Action string `json:"action,omitempty"`
Data interface{} `json:"data,omitempty"`
}
// ConversationWidgetDataEditPayload mapping
type ConversationWidgetDataEditPayload struct {
SectionID string `json:"section_id,omitempty"`
ItemID string `json:"item_id,omitempty"`
Action string `json:"action,omitempty"`
Value string `json:"value,omitempty"`
}
// ConversationReminderPayload mapping
type ConversationReminderPayload struct {
Date string `json:"date,omitempty"`
Note string `json:"note,omitempty"`
}
// String returns the string representation of Conversation
func (instance Conversation) String() string {
return Stringify(instance)
}