crisp-api 10.0.2 → 10.0.3
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/CHANGELOG.md +6 -2
- package/dist/crisp.d.ts +41 -29
- package/dist/crisp.js +43 -34
- package/dist/resources/BaseResource.d.ts +6 -0
- package/dist/resources/BaseResource.js +6 -0
- package/dist/resources/BucketURL.d.ts +9 -0
- package/dist/resources/BucketURL.js +6 -0
- package/dist/resources/MediaAnimation.d.ts +6 -0
- package/dist/resources/MediaAnimation.js +9 -1
- package/dist/resources/PluginConnect.d.ts +9 -0
- package/dist/resources/PluginConnect.js +6 -0
- package/dist/resources/PluginSubscription.d.ts +9 -0
- package/dist/resources/PluginSubscription.js +9 -1
- package/dist/resources/WebsiteAnalytics.d.ts +6 -0
- package/dist/resources/WebsiteAnalytics.js +9 -1
- package/dist/resources/WebsiteAvailability.d.ts +9 -0
- package/dist/resources/WebsiteAvailability.js +12 -2
- package/dist/resources/WebsiteBase.d.ts +9 -0
- package/dist/resources/WebsiteBase.js +6 -0
- package/dist/resources/WebsiteBatch.d.ts +9 -0
- package/dist/resources/WebsiteBatch.js +6 -0
- package/dist/resources/WebsiteCampaign.d.ts +9 -0
- package/dist/resources/WebsiteCampaign.js +8 -1
- package/dist/resources/WebsiteConversation.d.ts +9 -0
- package/dist/resources/WebsiteConversation.js +15 -3
- package/dist/resources/WebsiteHelpdesk.d.ts +10 -1
- package/dist/resources/WebsiteHelpdesk.js +6 -0
- package/dist/resources/WebsiteOperator.d.ts +9 -0
- package/dist/resources/WebsiteOperator.js +6 -0
- package/dist/resources/WebsitePeople.d.ts +9 -0
- package/dist/resources/WebsitePeople.js +6 -0
- package/dist/resources/WebsiteSettings.d.ts +9 -0
- package/dist/resources/WebsiteSettings.js +6 -0
- package/dist/resources/WebsiteVerify.d.ts +9 -0
- package/dist/resources/WebsiteVerify.js +6 -0
- package/dist/resources/WebsiteVisitors.d.ts +9 -0
- package/dist/resources/WebsiteVisitors.js +12 -2
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.js +3 -1
- package/dist/services/bucket.d.ts +6 -0
- package/dist/services/bucket.js +3 -0
- package/dist/services/media.d.ts +6 -0
- package/dist/services/media.js +3 -0
- package/dist/services/plugin.d.ts +6 -0
- package/dist/services/plugin.js +3 -0
- package/dist/services/website.d.ts +6 -0
- package/dist/services/website.js +3 -0
- package/lib/crisp.ts +123 -74
- package/lib/resources/BaseResource.ts +8 -0
- package/lib/resources/BucketURL.ts +12 -3
- package/lib/resources/MediaAnimation.ts +11 -1
- package/lib/resources/PluginConnect.ts +12 -5
- package/lib/resources/PluginSubscription.ts +36 -8
- package/lib/resources/WebsiteAnalytics.ts +11 -1
- package/lib/resources/WebsiteAvailability.ts +24 -4
- package/lib/resources/WebsiteBase.ts +14 -3
- package/lib/resources/WebsiteBatch.ts +24 -4
- package/lib/resources/WebsiteCampaign.ts +49 -16
- package/lib/resources/WebsiteConversation.ts +136 -45
- package/lib/resources/WebsiteHelpdesk.ts +75 -33
- package/lib/resources/WebsiteOperator.ts +28 -6
- package/lib/resources/WebsitePeople.ts +60 -19
- package/lib/resources/WebsiteSettings.ts +17 -2
- package/lib/resources/WebsiteVerify.ts +17 -3
- package/lib/resources/WebsiteVisitors.ts +32 -9
- package/lib/resources/index.ts +4 -1
- package/lib/services/bucket.ts +8 -0
- package/lib/services/media.ts +8 -0
- package/lib/services/plugin.ts +8 -0
- package/lib/services/website.ts +8 -0
- package/package.json +1 -1
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
// PROJECT: RESOURCES
|
|
13
13
|
import BaseResource from "./BaseResource";
|
|
14
14
|
|
|
15
|
+
/**************************************************************************
|
|
16
|
+
* TYPES + INTERFACES
|
|
17
|
+
***************************************************************************/
|
|
18
|
+
|
|
15
19
|
export interface Conversation {
|
|
16
20
|
session_id: string;
|
|
17
21
|
website_id: string;
|
|
@@ -571,6 +575,10 @@ export interface ConversationCall {
|
|
|
571
575
|
call_id?: string;
|
|
572
576
|
}
|
|
573
577
|
|
|
578
|
+
/**************************************************************************
|
|
579
|
+
* CLASSES
|
|
580
|
+
***************************************************************************/
|
|
581
|
+
|
|
574
582
|
/**
|
|
575
583
|
* Crisp WebsiteConversation Resource
|
|
576
584
|
* @class
|
|
@@ -579,7 +587,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
579
587
|
/**
|
|
580
588
|
* List Conversations
|
|
581
589
|
*/
|
|
582
|
-
listConversations(
|
|
590
|
+
listConversations(
|
|
591
|
+
websiteID: string, pageNumber: number = 1
|
|
592
|
+
): Promise<Conversation[]> {
|
|
583
593
|
return this.crisp.get(
|
|
584
594
|
this.crisp.prepareRestUrl(["website", websiteID, "conversations", String(pageNumber)])
|
|
585
595
|
);
|
|
@@ -588,7 +598,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
588
598
|
/**
|
|
589
599
|
* List Suggested Conversation Segments
|
|
590
600
|
*/
|
|
591
|
-
listSuggestedConversationSegments(
|
|
601
|
+
listSuggestedConversationSegments(
|
|
602
|
+
websiteID: string, pageNumber: number = 1
|
|
603
|
+
): Promise<ConversationSuggestedSegment[]> {
|
|
592
604
|
return this.crisp.get(
|
|
593
605
|
this.crisp.prepareRestUrl([
|
|
594
606
|
"website", websiteID, "conversations", "suggest", "segments", String(pageNumber)
|
|
@@ -616,7 +628,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
616
628
|
/**
|
|
617
629
|
* List Suggested Conversation Data Keys
|
|
618
630
|
*/
|
|
619
|
-
listSuggestedConversationDataKeys(
|
|
631
|
+
listSuggestedConversationDataKeys(
|
|
632
|
+
websiteID: string, pageNumber: number = 1
|
|
633
|
+
): Promise<ConversationSuggestedData[]> {
|
|
620
634
|
return this.crisp.get(
|
|
621
635
|
this.crisp.prepareRestUrl([
|
|
622
636
|
"website", websiteID, "conversations", "suggest", "data", String(pageNumber)
|
|
@@ -644,7 +658,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
644
658
|
/**
|
|
645
659
|
* List Spam Conversations
|
|
646
660
|
*/
|
|
647
|
-
listSpamConversations(
|
|
661
|
+
listSpamConversations(
|
|
662
|
+
websiteID: string, pageNumber: number = 1
|
|
663
|
+
): Promise<ConversationSpam[]> {
|
|
648
664
|
return this.crisp.get(
|
|
649
665
|
this.crisp.prepareRestUrl([
|
|
650
666
|
"website", websiteID, "conversations", "spams", String(pageNumber)
|
|
@@ -655,7 +671,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
655
671
|
/**
|
|
656
672
|
* Resolve Spam Conversation Content
|
|
657
673
|
*/
|
|
658
|
-
resolveSpamConversationContent(
|
|
674
|
+
resolveSpamConversationContent(
|
|
675
|
+
websiteID: string, spamID: string
|
|
676
|
+
): Promise<ConversationSpamContent> {
|
|
659
677
|
return this.crisp.get(
|
|
660
678
|
this.crisp.prepareRestUrl([
|
|
661
679
|
"website", websiteID, "conversations", "spam", spamID, "content"
|
|
@@ -666,7 +684,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
666
684
|
/**
|
|
667
685
|
* Submit Spam Conversation Decision
|
|
668
686
|
*/
|
|
669
|
-
submitSpamConversationDecision(
|
|
687
|
+
submitSpamConversationDecision(
|
|
688
|
+
websiteID: string, spamID: string, action: string
|
|
689
|
+
) {
|
|
670
690
|
return this.crisp.post(
|
|
671
691
|
this.crisp.prepareRestUrl([
|
|
672
692
|
"website", websiteID, "conversations", "spam", spamID, "decision"
|
|
@@ -683,7 +703,7 @@ class WebsiteConversation extends BaseResource {
|
|
|
683
703
|
/**
|
|
684
704
|
* Create A New Conversation
|
|
685
705
|
*/
|
|
686
|
-
createNewConversation(websiteID: string)
|
|
706
|
+
createNewConversation(websiteID: string): Promise<ConversationNew> {
|
|
687
707
|
return this.crisp.post(
|
|
688
708
|
this.crisp.prepareRestUrl(["website", websiteID, "conversation"]),
|
|
689
709
|
|
|
@@ -698,16 +718,20 @@ class WebsiteConversation extends BaseResource {
|
|
|
698
718
|
*/
|
|
699
719
|
checkConversationExists(websiteID: string, sessionID: string) {
|
|
700
720
|
return this.crisp.head(
|
|
701
|
-
this.crisp.prepareRestUrl([
|
|
721
|
+
this.crisp.prepareRestUrl([
|
|
722
|
+
"website", websiteID, "conversation", sessionID
|
|
723
|
+
])
|
|
702
724
|
);
|
|
703
725
|
};
|
|
704
726
|
|
|
705
727
|
/**
|
|
706
728
|
* Get A Conversation
|
|
707
729
|
*/
|
|
708
|
-
getConversation(websiteID: string, sessionID: string)
|
|
730
|
+
getConversation(websiteID: string, sessionID: string): Promise<Conversation> {
|
|
709
731
|
return this.crisp.get(
|
|
710
|
-
this.crisp.prepareRestUrl([
|
|
732
|
+
this.crisp.prepareRestUrl([
|
|
733
|
+
"website", websiteID, "conversation", sessionID
|
|
734
|
+
])
|
|
711
735
|
);
|
|
712
736
|
};
|
|
713
737
|
|
|
@@ -716,7 +740,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
716
740
|
*/
|
|
717
741
|
removeConversation(websiteID: string, sessionID: string) {
|
|
718
742
|
return this.crisp.delete(
|
|
719
|
-
this.crisp.prepareRestUrl([
|
|
743
|
+
this.crisp.prepareRestUrl([
|
|
744
|
+
"website", websiteID, "conversation", sessionID
|
|
745
|
+
])
|
|
720
746
|
);
|
|
721
747
|
};
|
|
722
748
|
|
|
@@ -738,7 +764,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
738
764
|
/**
|
|
739
765
|
* Get Messages In Conversation
|
|
740
766
|
*/
|
|
741
|
-
getMessagesInConversation(
|
|
767
|
+
getMessagesInConversation(
|
|
768
|
+
websiteID: string, sessionID: string, timestampBefore?: string|number
|
|
769
|
+
): Promise<ConversationMessage[]> {
|
|
742
770
|
// Generate query
|
|
743
771
|
let query = {};
|
|
744
772
|
|
|
@@ -759,7 +787,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
759
787
|
/**
|
|
760
788
|
* Send A Message In Conversation
|
|
761
789
|
*/
|
|
762
|
-
sendMessageInConversation(
|
|
790
|
+
sendMessageInConversation(
|
|
791
|
+
websiteID: string, sessionID: string, message: ConversationMessageNew
|
|
792
|
+
) {
|
|
763
793
|
return this.crisp.post(
|
|
764
794
|
this.crisp.prepareRestUrl([
|
|
765
795
|
"website", websiteID, "conversation", sessionID, "message"
|
|
@@ -772,7 +802,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
772
802
|
/**
|
|
773
803
|
* Get A Message In Conversation
|
|
774
804
|
*/
|
|
775
|
-
getMessageInConversation(
|
|
805
|
+
getMessageInConversation(
|
|
806
|
+
websiteID: string, sessionID: string, fingerprint: number
|
|
807
|
+
): Promise<ConversationMessage> {
|
|
776
808
|
return this.crisp.get(
|
|
777
809
|
this.crisp.prepareRestUrl([
|
|
778
810
|
"website", websiteID, "conversation", sessionID, "message", String(fingerprint)
|
|
@@ -783,7 +815,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
783
815
|
/**
|
|
784
816
|
* Update A Message In Conversation
|
|
785
817
|
*/
|
|
786
|
-
updateMessageInConversation(
|
|
818
|
+
updateMessageInConversation(
|
|
819
|
+
websiteID: string, sessionID: string, fingerprint: number, content: ConversationContent
|
|
820
|
+
) {
|
|
787
821
|
return this.crisp.patch(
|
|
788
822
|
this.crisp.prepareRestUrl([
|
|
789
823
|
"website", websiteID, "conversation", sessionID, "message", String(fingerprint)
|
|
@@ -800,7 +834,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
800
834
|
/**
|
|
801
835
|
* Remove A Message In Conversation
|
|
802
836
|
*/
|
|
803
|
-
removeMessageInConversation(
|
|
837
|
+
removeMessageInConversation(
|
|
838
|
+
websiteID: string, sessionID: string, fingerprint: number
|
|
839
|
+
) {
|
|
804
840
|
return this.crisp.delete(
|
|
805
841
|
this.crisp.prepareRestUrl([
|
|
806
842
|
"website", websiteID, "conversation", sessionID, "message", String(fingerprint)
|
|
@@ -811,7 +847,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
811
847
|
/**
|
|
812
848
|
* Compose A Message In Conversation
|
|
813
849
|
*/
|
|
814
|
-
composeMessageInConversation(
|
|
850
|
+
composeMessageInConversation(
|
|
851
|
+
websiteID: string, sessionID: string, compose: ConversationComposeMessageNew
|
|
852
|
+
) {
|
|
815
853
|
return this.crisp.patch(
|
|
816
854
|
this.crisp.prepareRestUrl([
|
|
817
855
|
"website", websiteID, "conversation", sessionID, "compose"
|
|
@@ -824,7 +862,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
824
862
|
/**
|
|
825
863
|
* Mark Messages As Read In Conversation
|
|
826
864
|
*/
|
|
827
|
-
markMessagesReadInConversation(
|
|
865
|
+
markMessagesReadInConversation(
|
|
866
|
+
websiteID: string, sessionID: string, read: ConversationReadMessageMark
|
|
867
|
+
) {
|
|
828
868
|
return this.crisp.patch(
|
|
829
869
|
this.crisp.prepareRestUrl([
|
|
830
870
|
"website", websiteID, "conversation", sessionID, "read"
|
|
@@ -837,7 +877,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
837
877
|
/**
|
|
838
878
|
* Mark Conversation As Unread
|
|
839
879
|
*/
|
|
840
|
-
markConversationAsUnread(
|
|
880
|
+
markConversationAsUnread(
|
|
881
|
+
websiteID: string, sessionID: string, unread: ConversationUnreadMessageMark
|
|
882
|
+
) {
|
|
841
883
|
return this.crisp.patch(
|
|
842
884
|
this.crisp.prepareRestUrl([
|
|
843
885
|
"website", websiteID, "conversation", sessionID, "unread"
|
|
@@ -850,7 +892,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
850
892
|
/**
|
|
851
893
|
* Mark Messages As Delivered In Conversation
|
|
852
894
|
*/
|
|
853
|
-
markMessagesDeliveredInConversation(
|
|
895
|
+
markMessagesDeliveredInConversation(
|
|
896
|
+
websiteID: string, sessionID: string, delivered: ConversationReadMessageMark
|
|
897
|
+
) {
|
|
854
898
|
return this.crisp.patch(
|
|
855
899
|
this.crisp.prepareRestUrl([
|
|
856
900
|
"website", websiteID, "conversation", sessionID, "delivered"
|
|
@@ -863,7 +907,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
863
907
|
/**
|
|
864
908
|
* Update Conversation Open State
|
|
865
909
|
*/
|
|
866
|
-
updateConversationOpenState(
|
|
910
|
+
updateConversationOpenState(
|
|
911
|
+
websiteID: string, sessionID: string, opened: boolean
|
|
912
|
+
) {
|
|
867
913
|
return this.crisp.patch(
|
|
868
914
|
this.crisp.prepareRestUrl([
|
|
869
915
|
"website", websiteID, "conversation", sessionID, "open"
|
|
@@ -891,7 +937,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
891
937
|
/**
|
|
892
938
|
* Assign Conversation Routing
|
|
893
939
|
*/
|
|
894
|
-
assignConversationRouting(
|
|
940
|
+
assignConversationRouting(
|
|
941
|
+
websiteID: string, sessionID: string, assign: ConversationRoutingAssignUpdate
|
|
942
|
+
) {
|
|
895
943
|
return this.crisp.patch(
|
|
896
944
|
this.crisp.prepareRestUrl([
|
|
897
945
|
"website", websiteID, "conversation", sessionID, "routing"
|
|
@@ -904,7 +952,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
904
952
|
/**
|
|
905
953
|
* Update Conversation Inbox
|
|
906
954
|
*/
|
|
907
|
-
updateConversationInbox(
|
|
955
|
+
updateConversationInbox(
|
|
956
|
+
websiteID: string, sessionID: string, inboxID: string
|
|
957
|
+
) {
|
|
908
958
|
return this.crisp.patch(
|
|
909
959
|
this.crisp.prepareRestUrl([
|
|
910
960
|
"website", websiteID, "conversation", sessionID, "inbox"
|
|
@@ -921,7 +971,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
921
971
|
/**
|
|
922
972
|
* Get Conversation Metas
|
|
923
973
|
*/
|
|
924
|
-
getConversationMetas(
|
|
974
|
+
getConversationMetas(
|
|
975
|
+
websiteID: string, sessionID: string
|
|
976
|
+
): Promise<ConversationMeta> {
|
|
925
977
|
return this.crisp.get(
|
|
926
978
|
this.crisp.prepareRestUrl([
|
|
927
979
|
"website", websiteID, "conversation", sessionID, "meta"
|
|
@@ -932,7 +984,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
932
984
|
/**
|
|
933
985
|
* Update Conversation Metas
|
|
934
986
|
*/
|
|
935
|
-
updateConversationMetas(
|
|
987
|
+
updateConversationMetas(
|
|
988
|
+
websiteID: string, sessionID: string, metas: ConversationMeta
|
|
989
|
+
) {
|
|
936
990
|
return this.crisp.patch(
|
|
937
991
|
this.crisp.prepareRestUrl([
|
|
938
992
|
"website", websiteID, "conversation", sessionID, "meta"
|
|
@@ -945,7 +999,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
945
999
|
/**
|
|
946
1000
|
* Get An Original Message In Conversation
|
|
947
1001
|
*/
|
|
948
|
-
getOriginalMessageInConversation(
|
|
1002
|
+
getOriginalMessageInConversation(
|
|
1003
|
+
websiteID: string, sessionID: string, originalID: string
|
|
1004
|
+
): Promise<ConversationOriginal> {
|
|
949
1005
|
return this.crisp.get(
|
|
950
1006
|
this.crisp.prepareRestUrl([
|
|
951
1007
|
"website", websiteID, "conversation", sessionID, "original", originalID
|
|
@@ -956,7 +1012,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
956
1012
|
/**
|
|
957
1013
|
* List Conversation Pages
|
|
958
1014
|
*/
|
|
959
|
-
listConversationPages(
|
|
1015
|
+
listConversationPages(
|
|
1016
|
+
websiteID: string, sessionID: string, pageNumber: number = 1
|
|
1017
|
+
): Promise<ConversationPage[]> {
|
|
960
1018
|
return this.crisp.get(
|
|
961
1019
|
this.crisp.prepareRestUrl([
|
|
962
1020
|
"website", websiteID, "conversation", sessionID, "pages", String(pageNumber)
|
|
@@ -967,7 +1025,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
967
1025
|
/**
|
|
968
1026
|
* List Conversation Events
|
|
969
1027
|
*/
|
|
970
|
-
listConversationEvents(
|
|
1028
|
+
listConversationEvents(
|
|
1029
|
+
websiteID: string, sessionID: string, pageNumber: number = 1
|
|
1030
|
+
): Promise<ConversationEvent[]> {
|
|
971
1031
|
return this.crisp.get(
|
|
972
1032
|
this.crisp.prepareRestUrl([
|
|
973
1033
|
"website", websiteID, "conversation", sessionID, "events", String(pageNumber)
|
|
@@ -978,7 +1038,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
978
1038
|
/**
|
|
979
1039
|
* List Conversation Files
|
|
980
1040
|
*/
|
|
981
|
-
listConversationFiles(
|
|
1041
|
+
listConversationFiles(
|
|
1042
|
+
websiteID: string, sessionID: string, pageNumber: number = 1
|
|
1043
|
+
): Promise<ConversationFile[]> {
|
|
982
1044
|
return this.crisp.get(
|
|
983
1045
|
this.crisp.prepareRestUrl([
|
|
984
1046
|
"website", websiteID, "conversation", sessionID, "files", String(pageNumber)
|
|
@@ -989,7 +1051,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
989
1051
|
/**
|
|
990
1052
|
* Get Conversation State
|
|
991
1053
|
*/
|
|
992
|
-
getConversationState(
|
|
1054
|
+
getConversationState(
|
|
1055
|
+
websiteID: string, sessionID: string
|
|
1056
|
+
): Promise<ConversationStateData> {
|
|
993
1057
|
return this.crisp.get(
|
|
994
1058
|
this.crisp.prepareRestUrl([
|
|
995
1059
|
"website", websiteID, "conversation", sessionID, "state"
|
|
@@ -1000,7 +1064,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1000
1064
|
/**
|
|
1001
1065
|
* Change Conversation State
|
|
1002
1066
|
*/
|
|
1003
|
-
changeConversationState(
|
|
1067
|
+
changeConversationState(
|
|
1068
|
+
websiteID: string, sessionID: string, state: ConversationState
|
|
1069
|
+
) {
|
|
1004
1070
|
return this.crisp.patch(
|
|
1005
1071
|
this.crisp.prepareRestUrl([
|
|
1006
1072
|
"website", websiteID, "conversation", sessionID, "state"
|
|
@@ -1017,7 +1083,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1017
1083
|
/**
|
|
1018
1084
|
* Get Conversation Participants
|
|
1019
1085
|
*/
|
|
1020
|
-
getConversationParticipants(
|
|
1086
|
+
getConversationParticipants(
|
|
1087
|
+
websiteID: string, sessionID: string
|
|
1088
|
+
): Promise<ConversationParticipant[]> {
|
|
1021
1089
|
return this.crisp.get(
|
|
1022
1090
|
this.crisp.prepareRestUrl([
|
|
1023
1091
|
"website", websiteID, "conversation", sessionID, "participants"
|
|
@@ -1028,7 +1096,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1028
1096
|
/**
|
|
1029
1097
|
* Save Conversation Participants
|
|
1030
1098
|
*/
|
|
1031
|
-
saveConversationParticipants(
|
|
1099
|
+
saveConversationParticipants(
|
|
1100
|
+
websiteID: string, sessionID: string, participants: ConversationParticipantsSave
|
|
1101
|
+
) {
|
|
1032
1102
|
return this.crisp.put(
|
|
1033
1103
|
this.crisp.prepareRestUrl([
|
|
1034
1104
|
"website", websiteID, "conversation", sessionID, "participants"
|
|
@@ -1041,7 +1111,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1041
1111
|
/**
|
|
1042
1112
|
* Get Block Status For Conversation
|
|
1043
1113
|
*/
|
|
1044
|
-
getBlockStatusForConversation(
|
|
1114
|
+
getBlockStatusForConversation(
|
|
1115
|
+
websiteID: string, sessionID: string
|
|
1116
|
+
): Promise<ConversationBlock> {
|
|
1045
1117
|
return this.crisp.get(
|
|
1046
1118
|
this.crisp.prepareRestUrl([
|
|
1047
1119
|
"website", websiteID, "conversation", sessionID, "block"
|
|
@@ -1052,7 +1124,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1052
1124
|
/**
|
|
1053
1125
|
* Block Incoming Messages For Conversation
|
|
1054
1126
|
*/
|
|
1055
|
-
blockIncomingMessagesForConversation(
|
|
1127
|
+
blockIncomingMessagesForConversation(
|
|
1128
|
+
websiteID: string, sessionID: string, blocked: boolean
|
|
1129
|
+
) {
|
|
1056
1130
|
return this.crisp.patch(
|
|
1057
1131
|
this.crisp.prepareRestUrl([
|
|
1058
1132
|
"website", websiteID, "conversation", sessionID, "block"
|
|
@@ -1069,7 +1143,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1069
1143
|
/**
|
|
1070
1144
|
* Get Verify Status For Conversation
|
|
1071
1145
|
*/
|
|
1072
|
-
getVerifyStatusForConversation(
|
|
1146
|
+
getVerifyStatusForConversation(
|
|
1147
|
+
websiteID: string, sessionID: string
|
|
1148
|
+
): Promise<ConversationVerify> {
|
|
1073
1149
|
return this.crisp.get(
|
|
1074
1150
|
this.crisp.prepareRestUrl([
|
|
1075
1151
|
"website", websiteID, "conversation", sessionID, "verify"
|
|
@@ -1080,7 +1156,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1080
1156
|
/**
|
|
1081
1157
|
* Update Verify Status For Conversation
|
|
1082
1158
|
*/
|
|
1083
|
-
updateVerifyStatusForConversation(
|
|
1159
|
+
updateVerifyStatusForConversation(
|
|
1160
|
+
websiteID: string, sessionID: string, verified: boolean
|
|
1161
|
+
) {
|
|
1084
1162
|
return this.crisp.patch(
|
|
1085
1163
|
this.crisp.prepareRestUrl([
|
|
1086
1164
|
"website", websiteID, "conversation", sessionID, "verify"
|
|
@@ -1098,7 +1176,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1098
1176
|
* Request Identity Verification For Conversation
|
|
1099
1177
|
*/
|
|
1100
1178
|
requestIdentityVerificationForConversation(
|
|
1101
|
-
websiteID: string, sessionID: string,
|
|
1179
|
+
websiteID: string, sessionID: string,
|
|
1180
|
+
verification: ConversationVerifyIdentityRequest
|
|
1102
1181
|
) {
|
|
1103
1182
|
return this.crisp.post(
|
|
1104
1183
|
this.crisp.prepareRestUrl([
|
|
@@ -1113,7 +1192,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1113
1192
|
* Redeem Identity Verification Link For Conversation
|
|
1114
1193
|
*/
|
|
1115
1194
|
redeemIdentityVerificationLinkForConversation(
|
|
1116
|
-
websiteID: string, sessionID: string,
|
|
1195
|
+
websiteID: string, sessionID: string,
|
|
1196
|
+
verification: ConversationVerifyIdentityRedeem
|
|
1117
1197
|
) {
|
|
1118
1198
|
return this.crisp.put(
|
|
1119
1199
|
this.crisp.prepareRestUrl([
|
|
@@ -1153,7 +1233,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1153
1233
|
/**
|
|
1154
1234
|
* Request Chatbox Binding Purge For Conversation
|
|
1155
1235
|
*/
|
|
1156
|
-
requestChatboxBindingPurgeForConversation(
|
|
1236
|
+
requestChatboxBindingPurgeForConversation(
|
|
1237
|
+
websiteID: string, sessionID: string
|
|
1238
|
+
) {
|
|
1157
1239
|
return this.crisp.post(
|
|
1158
1240
|
this.crisp.prepareRestUrl([
|
|
1159
1241
|
"website", websiteID, "conversation", sessionID, "purge"
|
|
@@ -1183,7 +1265,9 @@ class WebsiteConversation extends BaseResource {
|
|
|
1183
1265
|
/**
|
|
1184
1266
|
* List Browsing Sessions For Conversation
|
|
1185
1267
|
*/
|
|
1186
|
-
listBrowsingSessionsForConversation(
|
|
1268
|
+
listBrowsingSessionsForConversation(
|
|
1269
|
+
websiteID: string, sessionID: string
|
|
1270
|
+
): Promise<ConversationBrowsing[]> {
|
|
1187
1271
|
return this.crisp.get(
|
|
1188
1272
|
this.crisp.prepareRestUrl([
|
|
1189
1273
|
"website", websiteID, "conversation", sessionID, "browsing"
|
|
@@ -1265,7 +1349,7 @@ class WebsiteConversation extends BaseResource {
|
|
|
1265
1349
|
*/
|
|
1266
1350
|
getOngoingCallSessionForConversation(
|
|
1267
1351
|
websiteID: string, sessionID: string
|
|
1268
|
-
)
|
|
1352
|
+
): Promise<ConversationCall> {
|
|
1269
1353
|
return this.crisp.get(
|
|
1270
1354
|
this.crisp.prepareRestUrl([
|
|
1271
1355
|
"website", websiteID, "conversation", sessionID, "call"
|
|
@@ -1305,7 +1389,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1305
1389
|
* Deliver Widget Button Action For Conversation
|
|
1306
1390
|
*/
|
|
1307
1391
|
deliverWidgetButtonActionForConversation(
|
|
1308
|
-
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1392
|
+
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1393
|
+
itemID: string, data: object, value?: string
|
|
1309
1394
|
) {
|
|
1310
1395
|
// Generate body
|
|
1311
1396
|
let body = {
|
|
@@ -1333,7 +1418,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1333
1418
|
* Deliver Widget Data Fetch Action For Conversation
|
|
1334
1419
|
*/
|
|
1335
1420
|
deliverWidgetDataFetchActionForConversation(
|
|
1336
|
-
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1421
|
+
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1422
|
+
itemID: string, data: object
|
|
1337
1423
|
) {
|
|
1338
1424
|
return this.crisp.post(
|
|
1339
1425
|
this.crisp.prepareRestUrl([
|
|
@@ -1355,7 +1441,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1355
1441
|
* Deliver Widget Data Edit Action For Conversation
|
|
1356
1442
|
*/
|
|
1357
1443
|
deliverWidgetDataEditActionForConversation(
|
|
1358
|
-
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1444
|
+
websiteID: string, sessionID: string, pluginID: string, sectionID: string,
|
|
1445
|
+
itemID: string, value: string
|
|
1359
1446
|
) {
|
|
1360
1447
|
return this.crisp.post(
|
|
1361
1448
|
this.crisp.prepareRestUrl([
|
|
@@ -1413,4 +1500,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1413
1500
|
};
|
|
1414
1501
|
}
|
|
1415
1502
|
|
|
1503
|
+
/**************************************************************************
|
|
1504
|
+
* EXPORTS
|
|
1505
|
+
***************************************************************************/
|
|
1506
|
+
|
|
1416
1507
|
export default WebsiteConversation;
|