crisp-api 10.9.3 → 10.10.1

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 CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v10.10.1
5
+
6
+ ### Changes
7
+
8
+ * Added `CrispClient.website.batchUpdateConversationsData`, `CrispClient.website.batchUpdatePeopleData`, `CrispClient.website.batchUpdateConversationsSegments` and `CrispClient.website.batchUpdatePeopleSegments` methods.
9
+
4
10
  ## v10.9.3
5
11
 
6
12
  ### Changes
package/EXAMPLES.md CHANGED
@@ -1692,7 +1692,6 @@ var settings = {
1692
1692
  "emails": {
1693
1693
  "rating": true,
1694
1694
  "transcript": true,
1695
- "enrich": true,
1696
1695
  "junk_filter": true
1697
1696
  },
1698
1697
  "chatbox": {
@@ -1990,6 +1989,84 @@ CrispClient.website.batchRemovePeople(websiteID, people);
1990
1989
 
1991
1990
  =========================
1992
1991
 
1992
+ https://docs.crisp.chat/references/rest-api/v1/#batch-data-items
1993
+
1994
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
1995
+
1996
+ var operation = {
1997
+ "sessions": [
1998
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
1999
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2000
+ ],
2001
+
2002
+ "data": {
2003
+ "plan": "pro",
2004
+ "subscribed": true
2005
+ }
2006
+ };
2007
+
2008
+ CrispClient.website.batchUpdateConversationsData(websiteID, operation);
2009
+
2010
+ =========================
2011
+
2012
+ https://docs.crisp.chat/references/rest-api/v1/#batch-data-items
2013
+
2014
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2015
+
2016
+ var people = {
2017
+ "profiles": [
2018
+ "eee8759d-52db-48e5-982d-3426e3566ce0"
2019
+ ]
2020
+ };
2021
+
2022
+ var data = {
2023
+ "plan": "pro",
2024
+ "subscribed": true
2025
+ };
2026
+
2027
+ CrispClient.website.batchUpdatePeopleData(websiteID, people, data);
2028
+
2029
+ =========================
2030
+
2031
+ https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items
2032
+
2033
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2034
+
2035
+ var operation = {
2036
+ "sessions": [
2037
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2038
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2039
+ ],
2040
+
2041
+ "segments": [
2042
+ "vip",
2043
+ "lead"
2044
+ ]
2045
+ };
2046
+
2047
+ CrispClient.website.batchUpdateConversationsSegments(websiteID, operation);
2048
+
2049
+ =========================
2050
+
2051
+ https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items
2052
+
2053
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2054
+
2055
+ var people = {
2056
+ "profiles": [
2057
+ "eee8759d-52db-48e5-982d-3426e3566ce0"
2058
+ ]
2059
+ };
2060
+
2061
+ var segments = [
2062
+ "vip",
2063
+ "lead"
2064
+ ];
2065
+
2066
+ CrispClient.website.batchUpdatePeopleSegments(websiteID, people, segments);
2067
+
2068
+ =========================
2069
+
1993
2070
  https://docs.crisp.chat/references/rest-api/v1/#list-website-inboxes
1994
2071
 
1995
2072
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
@@ -2379,6 +2456,14 @@ CrispClient.website.listCampaignStatistics(websiteID, campaignID, action, pageNu
2379
2456
 
2380
2457
  =========================
2381
2458
 
2459
+ https://docs.crisp.chat/references/rest-api/v1/#get-website-connect-endpoints
2460
+
2461
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2462
+
2463
+ CrispClient.website.getConnectEndpoints(websiteID);
2464
+
2465
+ =========================
2466
+
2382
2467
  https://docs.crisp.chat/references/rest-api/v1/#get-connect-account
2383
2468
 
2384
2469
  CrispClient.plugin.getConnectAccount();
package/README.md CHANGED
@@ -25,9 +25,9 @@ Then, add authentication parameters to your `client` instance right after you cr
25
25
  var { Crisp } = require("crisp-api");
26
26
  var CrispClient = new Crisp();
27
27
 
28
- // Authenticate to API with your plugin token (identifier, key)
28
+ // Authenticate to API with your token (identifier, key)
29
29
  // eg. CrispClient.authenticate("7c3ef21c-1e04-41ce-8c06-5605c346f73e", "cc29e1a5086e428fcc6a697d5837a66d82808e65c5cce006fbf2191ceea80a0a");
30
- CrispClient.authenticateTier("plugin", identifier, key);
30
+ CrispClient.authenticateTier(tier, identifier, key);
31
31
 
32
32
  // Now, you can use authenticated API sections.
33
33
  ```
@@ -115,6 +115,7 @@ All methods that you will most likely need when building a Crisp integration are
115
115
  <li><a href="#website-verify">Website Verify</a></li>
116
116
  <li><a href="#website-campaigns">Website Campaigns</a></li>
117
117
  <li><a href="#website-campaign">Website Campaign</a></li>
118
+ <li><a href="#website-connect">Website Connect</a></li>
118
119
  </ul>
119
120
  </details>
120
121
  <details>
@@ -2467,7 +2468,6 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
2467
2468
  "emails": {
2468
2469
  "rating": true,
2469
2470
  "transcript": true,
2470
- "enrich": true,
2471
2471
  "junk_filter": true
2472
2472
  },
2473
2473
  "chatbox": {
@@ -2794,6 +2794,25 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
2794
2794
  ```
2795
2795
  </details>
2796
2796
 
2797
+ * **Batch Unresolve Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-unresolve-items)
2798
+ * `CrispClient.website.batchUnresolveConversations(websiteID, operation)`
2799
+ * <details>
2800
+ <summary>See Example</summary>
2801
+
2802
+ ```javascript
2803
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2804
+
2805
+ var operation = {
2806
+ "sessions": [
2807
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2808
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2809
+ ]
2810
+ };
2811
+
2812
+ CrispClient.website.batchUnresolveConversations(websiteID, operation);
2813
+ ```
2814
+ </details>
2815
+
2797
2816
  * **Batch Read Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-read-items)
2798
2817
  * `CrispClient.website.batchReadConversations(websiteID, operation)`
2799
2818
  * <details>
@@ -2815,6 +2834,25 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
2815
2834
  ```
2816
2835
  </details>
2817
2836
 
2837
+ * **Batch Unread Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-unread-items)
2838
+ * `CrispClient.website.batchUnreadConversations(websiteID, operation)`
2839
+ * <details>
2840
+ <summary>See Example</summary>
2841
+
2842
+ ```javascript
2843
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2844
+
2845
+ var operation = {
2846
+ "sessions": [
2847
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2848
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2849
+ ]
2850
+ };
2851
+
2852
+ CrispClient.website.batchUnreadConversations(websiteID, operation);
2853
+ ```
2854
+ </details>
2855
+
2818
2856
  * **Batch Remove Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-remove-items)
2819
2857
  * `CrispClient.website.batchRemoveConversations(websiteID, operation)`
2820
2858
  * <details>
@@ -2853,6 +2891,186 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
2853
2891
  ```
2854
2892
  </details>
2855
2893
 
2894
+ * **Batch Report Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-report-items)
2895
+ * `CrispClient.website.batchReportConversations(websiteID, operation)`
2896
+ * <details>
2897
+ <summary>See Example</summary>
2898
+
2899
+ ```javascript
2900
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2901
+
2902
+ var operation = {
2903
+ "sessions": [
2904
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2905
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2906
+ ],
2907
+
2908
+ "flag": "spam"
2909
+ };
2910
+
2911
+ CrispClient.website.batchReportConversations(websiteID, operation);
2912
+ ```
2913
+ </details>
2914
+
2915
+ * **Batch Block Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-block-items)
2916
+ * `CrispClient.website.batchBlockConversations(websiteID, operation)`
2917
+ * <details>
2918
+ <summary>See Example</summary>
2919
+
2920
+ ```javascript
2921
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2922
+
2923
+ var operation = {
2924
+ "sessions": [
2925
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2926
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2927
+ ],
2928
+
2929
+ "blocked": true
2930
+ };
2931
+
2932
+ CrispClient.website.batchBlockConversations(websiteID, operation);
2933
+ ```
2934
+ </details>
2935
+
2936
+ * **Batch Routing Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-routing-items)
2937
+ * `CrispClient.website.batchRoutingConversations(websiteID, operation)`
2938
+ * <details>
2939
+ <summary>See Example</summary>
2940
+
2941
+ ```javascript
2942
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2943
+
2944
+ var operation = {
2945
+ "sessions": [
2946
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2947
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2948
+ ],
2949
+
2950
+ "assigned": {
2951
+ "user_id": "a4c32c68-be91-4e29-b97e-b3b6af886eaa"
2952
+ }
2953
+ };
2954
+
2955
+ CrispClient.website.batchRoutingConversations(websiteID, operation);
2956
+ ```
2957
+ </details>
2958
+
2959
+ * **Batch Inbox Conversations**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-inbox-items)
2960
+ * `CrispClient.website.batchInboxConversations(websiteID, operation)`
2961
+ * <details>
2962
+ <summary>See Example</summary>
2963
+
2964
+ ```javascript
2965
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2966
+
2967
+ var operation = {
2968
+ "sessions": [
2969
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2970
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2971
+ ],
2972
+
2973
+ "inbox_id": "d42e8b3b-ea8f-4e79-a9f8-d0e467fc1c31"
2974
+ };
2975
+
2976
+ CrispClient.website.batchInboxConversations(websiteID, operation);
2977
+ ```
2978
+ </details>
2979
+
2980
+ * **Batch Update Conversations Data**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-data-items)
2981
+ * `CrispClient.website.batchUpdateConversationsData(websiteID, operation)`
2982
+ * <details>
2983
+ <summary>See Example</summary>
2984
+
2985
+ ```javascript
2986
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2987
+
2988
+ var operation = {
2989
+ "sessions": [
2990
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
2991
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
2992
+ ],
2993
+
2994
+ "data": {
2995
+ "plan": "pro",
2996
+ "subscribed": true
2997
+ }
2998
+ };
2999
+
3000
+ CrispClient.website.batchUpdateConversationsData(websiteID, operation);
3001
+ ```
3002
+ </details>
3003
+
3004
+ * **Batch Update People Data**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-data-items)
3005
+ * `CrispClient.website.batchUpdatePeopleData(websiteID, people, data)`
3006
+ * <details>
3007
+ <summary>See Example</summary>
3008
+
3009
+ ```javascript
3010
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3011
+
3012
+ var people = {
3013
+ "profiles": [
3014
+ "eee8759d-52db-48e5-982d-3426e3566ce0"
3015
+ ]
3016
+ };
3017
+
3018
+ var data = {
3019
+ "plan": "pro",
3020
+ "subscribed": true
3021
+ };
3022
+
3023
+ CrispClient.website.batchUpdatePeopleData(websiteID, people, data);
3024
+ ```
3025
+ </details>
3026
+
3027
+ * **Batch Update Conversations Segments**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items)
3028
+ * `CrispClient.website.batchUpdateConversationsSegments(websiteID, operation)`
3029
+ * <details>
3030
+ <summary>See Example</summary>
3031
+
3032
+ ```javascript
3033
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3034
+
3035
+ var operation = {
3036
+ "sessions": [
3037
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
3038
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
3039
+ ],
3040
+
3041
+ "segments": [
3042
+ "vip",
3043
+ "lead"
3044
+ ]
3045
+ };
3046
+
3047
+ CrispClient.website.batchUpdateConversationsSegments(websiteID, operation);
3048
+ ```
3049
+ </details>
3050
+
3051
+ * **Batch Update People Segments**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items)
3052
+ * `CrispClient.website.batchUpdatePeopleSegments(websiteID, people, segments)`
3053
+ * <details>
3054
+ <summary>See Example</summary>
3055
+
3056
+ ```javascript
3057
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3058
+
3059
+ var people = {
3060
+ "profiles": [
3061
+ "eee8759d-52db-48e5-982d-3426e3566ce0"
3062
+ ]
3063
+ };
3064
+
3065
+ var segments = [
3066
+ "vip",
3067
+ "lead"
3068
+ ];
3069
+
3070
+ CrispClient.website.batchUpdatePeopleSegments(websiteID, people, segments);
3071
+ ```
3072
+ </details>
3073
+
2856
3074
 
2857
3075
  * #### **Website Inbox**
2858
3076
  * **List Inboxes**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-website-inboxes)
@@ -3379,6 +3597,20 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
3379
3597
  </details>
3380
3598
 
3381
3599
 
3600
+ * #### **Website Connect**
3601
+ * **Get Connect Endpoints**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-connect-endpoints)
3602
+ * `CrispClient.website.getConnectEndpoints(websiteID)`
3603
+ * <details>
3604
+ <summary>See Example</summary>
3605
+
3606
+ ```javascript
3607
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3608
+
3609
+ CrispClient.website.getConnectEndpoints(websiteID);
3610
+ ```
3611
+ </details>
3612
+
3613
+
3382
3614
  ### Plugin
3383
3615
 
3384
3616
  * #### **Plugin Connect**
package/dist/crisp.js CHANGED
@@ -46,7 +46,7 @@ const AVAILABLE_RTM_MODES = [
46
46
  "websockets",
47
47
  "webhooks"
48
48
  ];
49
- const VERSION = "10.9.3";
49
+ const VERSION = "10.10.1";
50
50
  // Base configuration
51
51
  const DEFAULT_REQUEST_TIMEOUT = 10000;
52
52
  const DEFAULT_SOCKET_TIMEOUT = 10000;
@@ -9,10 +9,38 @@ export type WebsiteBatchConversationsOperation = {
9
9
  inbox_id?: string;
10
10
  sessions?: string[];
11
11
  };
12
+ export type WebsiteBatchReportOperation = {
13
+ sessions: string[];
14
+ flag: string;
15
+ };
16
+ export type WebsiteBatchBlockOperation = {
17
+ sessions: string[];
18
+ blocked: boolean;
19
+ };
20
+ export type WebsiteBatchRoutingOperationAssigned = {
21
+ user_id: string;
22
+ };
23
+ export type WebsiteBatchRoutingOperation = {
24
+ sessions: string[];
25
+ assigned: WebsiteBatchRoutingOperationAssigned | null;
26
+ };
27
+ export type WebsiteBatchInboxOperation = {
28
+ sessions: string[];
29
+ inbox_id: string | null;
30
+ };
12
31
  export type WebsiteBatchPeopleOperationInner = {
13
32
  profiles?: string[];
14
33
  search?: string;
15
34
  };
35
+ export type WebsiteBatchDataPayload = Record<string, string | number | boolean>;
36
+ export type WebsiteBatchConversationsDataOperation = {
37
+ sessions: string[];
38
+ data: WebsiteBatchDataPayload;
39
+ };
40
+ export type WebsiteBatchConversationsSegmentsOperation = {
41
+ sessions: string[];
42
+ segments: string[];
43
+ };
16
44
  /**************************************************************************
17
45
  * CLASSES
18
46
  ***************************************************************************/
@@ -24,6 +52,10 @@ declare class WebsiteBatch extends BaseResource {
24
52
  * Batch Resolve Conversations
25
53
  */
26
54
  batchResolveConversations(websiteID: string, operation: WebsiteBatchConversationsOperation): Promise<any>;
55
+ /**
56
+ * Batch Unresolve Conversations
57
+ */
58
+ batchUnresolveConversations(websiteID: string, operation: WebsiteBatchConversationsOperation): Promise<any>;
27
59
  /**
28
60
  * Batch Read Conversations
29
61
  * @memberof WebsiteBatch
@@ -34,6 +66,10 @@ declare class WebsiteBatch extends BaseResource {
34
66
  * @return {Promise}
35
67
  */
36
68
  batchReadConversations(websiteID: string, operation: WebsiteBatchConversationsOperation): Promise<any>;
69
+ /**
70
+ * Batch Unread Conversations
71
+ */
72
+ batchUnreadConversations(websiteID: string, operation: WebsiteBatchConversationsOperation): Promise<any>;
37
73
  /**
38
74
  * Batch Remove Conversations
39
75
  * @memberof WebsiteBatch
@@ -54,6 +90,38 @@ declare class WebsiteBatch extends BaseResource {
54
90
  * @return {Promise}
55
91
  */
56
92
  batchRemovePeople(websiteID: string, people: WebsiteBatchPeopleOperationInner): Promise<any>;
93
+ /**
94
+ * Batch Report Conversations
95
+ */
96
+ batchReportConversations(websiteID: string, operation: WebsiteBatchReportOperation): Promise<any>;
97
+ /**
98
+ * Batch Block Conversations
99
+ */
100
+ batchBlockConversations(websiteID: string, operation: WebsiteBatchBlockOperation): Promise<any>;
101
+ /**
102
+ * Batch Routing Conversations
103
+ */
104
+ batchRoutingConversations(websiteID: string, operation: WebsiteBatchRoutingOperation): Promise<any>;
105
+ /**
106
+ * Batch Inbox Conversations
107
+ */
108
+ batchInboxConversations(websiteID: string, operation: WebsiteBatchInboxOperation): Promise<any>;
109
+ /**
110
+ * Batch Update Conversations Data
111
+ */
112
+ batchUpdateConversationsData(websiteID: string, operation: WebsiteBatchConversationsDataOperation): Promise<any>;
113
+ /**
114
+ * Batch Update People Data
115
+ */
116
+ batchUpdatePeopleData(websiteID: string, people: WebsiteBatchPeopleOperationInner, data: WebsiteBatchDataPayload): Promise<any>;
117
+ /**
118
+ * Batch Update Conversations Segments
119
+ */
120
+ batchUpdateConversationsSegments(websiteID: string, operation: WebsiteBatchConversationsSegmentsOperation): Promise<any>;
121
+ /**
122
+ * Batch Update People Segments
123
+ */
124
+ batchUpdatePeopleSegments(websiteID: string, people: WebsiteBatchPeopleOperationInner, segments: string[]): Promise<any>;
57
125
  }
58
126
  /**************************************************************************
59
127
  * EXPORTS
@@ -28,6 +28,13 @@ class WebsiteBatch extends BaseResource_1.default {
28
28
  return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "resolve"]), null, operation);
29
29
  }
30
30
  ;
31
+ /**
32
+ * Batch Unresolve Conversations
33
+ */
34
+ batchUnresolveConversations(websiteID, operation) {
35
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "unresolve"]), null, operation);
36
+ }
37
+ ;
31
38
  /**
32
39
  * Batch Read Conversations
33
40
  * @memberof WebsiteBatch
@@ -41,6 +48,13 @@ class WebsiteBatch extends BaseResource_1.default {
41
48
  return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "read"]), null, operation);
42
49
  }
43
50
  ;
51
+ /**
52
+ * Batch Unread Conversations
53
+ */
54
+ batchUnreadConversations(websiteID, operation) {
55
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "unread"]), null, operation);
56
+ }
57
+ ;
44
58
  /**
45
59
  * Batch Remove Conversations
46
60
  * @memberof WebsiteBatch
@@ -69,6 +83,68 @@ class WebsiteBatch extends BaseResource_1.default {
69
83
  });
70
84
  }
71
85
  ;
86
+ /**
87
+ * Batch Report Conversations
88
+ */
89
+ batchReportConversations(websiteID, operation) {
90
+ return this.crisp.post(this.crisp.prepareRestUrl(["website", websiteID, "batch", "report"]), null, operation);
91
+ }
92
+ ;
93
+ /**
94
+ * Batch Block Conversations
95
+ */
96
+ batchBlockConversations(websiteID, operation) {
97
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "block"]), null, operation);
98
+ }
99
+ ;
100
+ /**
101
+ * Batch Routing Conversations
102
+ */
103
+ batchRoutingConversations(websiteID, operation) {
104
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "routing"]), null, operation);
105
+ }
106
+ ;
107
+ /**
108
+ * Batch Inbox Conversations
109
+ */
110
+ batchInboxConversations(websiteID, operation) {
111
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "inbox"]), null, operation);
112
+ }
113
+ ;
114
+ /**
115
+ * Batch Update Conversations Data
116
+ */
117
+ batchUpdateConversationsData(websiteID, operation) {
118
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "data"]), null, operation);
119
+ }
120
+ ;
121
+ /**
122
+ * Batch Update People Data
123
+ */
124
+ batchUpdatePeopleData(websiteID, people, data) {
125
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "data"]), null, {
126
+ people: people,
127
+ data: data
128
+ });
129
+ }
130
+ ;
131
+ /**
132
+ * Batch Update Conversations Segments
133
+ */
134
+ batchUpdateConversationsSegments(websiteID, operation) {
135
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "segments"]), null, operation);
136
+ }
137
+ ;
138
+ /**
139
+ * Batch Update People Segments
140
+ */
141
+ batchUpdatePeopleSegments(websiteID, people, segments) {
142
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "segments"]), null, {
143
+ people: people,
144
+ segments: segments
145
+ });
146
+ }
147
+ ;
72
148
  }
73
149
  /**************************************************************************
74
150
  * EXPORTS
@@ -84,6 +84,7 @@ export type WebsiteCampaignRecipientPerson = {
84
84
  avatar?: string;
85
85
  };
86
86
  export type WebsiteCampaignStatistic = {
87
+ type?: string;
87
88
  profile?: WebsiteCampaignStatisticProfile;
88
89
  data?: Record<string, unknown>;
89
90
  created_at?: number;
@@ -0,0 +1,34 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import BaseResource from "./BaseResource";
5
+ /**************************************************************************
6
+ * TYPES
7
+ ***************************************************************************/
8
+ export type WebsiteConnectEndpoints = {
9
+ socket?: WebsiteConnectEndpointsSocket;
10
+ rescue?: WebsiteConnectEndpointsRescue;
11
+ };
12
+ export type WebsiteConnectEndpointsSocket = {
13
+ app?: string;
14
+ stream?: string;
15
+ };
16
+ export type WebsiteConnectEndpointsRescue = {
17
+ socket?: WebsiteConnectEndpointsSocket;
18
+ };
19
+ /**************************************************************************
20
+ * CLASSES
21
+ ***************************************************************************/
22
+ /**
23
+ * Crisp WebsiteConnect Resource
24
+ */
25
+ declare class WebsiteConnect extends BaseResource {
26
+ /**
27
+ * Get Connect Endpoints
28
+ */
29
+ getConnectEndpoints(websiteID: string): Promise<WebsiteConnectEndpoints>;
30
+ }
31
+ /**************************************************************************
32
+ * EXPORTS
33
+ ***************************************************************************/
34
+ export default WebsiteConnect;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /*
3
+ * This file is part of node-crisp-api
4
+ *
5
+ * Copyright (c) 2026 Crisp IM SAS
6
+ * All rights belong to Crisp IM SAS
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ /**************************************************************************
13
+ * IMPORTS
14
+ ***************************************************************************/
15
+ // PROJECT: RESOURCES
16
+ const BaseResource_1 = __importDefault(require("./BaseResource"));
17
+ /**************************************************************************
18
+ * CLASSES
19
+ ***************************************************************************/
20
+ /**
21
+ * Crisp WebsiteConnect Resource
22
+ */
23
+ class WebsiteConnect extends BaseResource_1.default {
24
+ /**
25
+ * Get Connect Endpoints
26
+ */
27
+ getConnectEndpoints(websiteID) {
28
+ return this.crisp.get(this.crisp.prepareRestUrl([
29
+ "website", websiteID, "connect", "endpoints"
30
+ ]));
31
+ }
32
+ ;
33
+ }
34
+ /**************************************************************************
35
+ * EXPORTS
36
+ ***************************************************************************/
37
+ exports.default = WebsiteConnect;
@@ -36,7 +36,6 @@ export interface WebsiteSettingsInbox {
36
36
  export interface WebsiteSettingsEmails {
37
37
  rating?: boolean;
38
38
  transcript?: boolean;
39
- enrich?: boolean;
40
39
  junk_filter?: boolean;
41
40
  }
42
41
  export interface WebsiteSettingsChatbox {
@@ -113,7 +112,6 @@ export interface WebsiteSettingsUpdateInbox {
113
112
  export interface WebsiteSettingsUpdateEmails {
114
113
  rating?: boolean;
115
114
  transcript?: boolean;
116
- enrich?: boolean;
117
115
  junk_filter?: boolean;
118
116
  }
119
117
  export interface WebsiteSettingsUpdateChatbox {
@@ -12,6 +12,7 @@ export * from "./WebsiteAvailability";
12
12
  export * from "./WebsiteBase";
13
13
  export * from "./WebsiteBatch";
14
14
  export * from "./WebsiteCampaign";
15
+ export * from "./WebsiteConnect";
15
16
  export * from "./WebsiteConversation";
16
17
  export * from "./WebsiteHelpdesk";
17
18
  export * from "./WebsiteInbox";
@@ -34,6 +34,7 @@ __exportStar(require("./WebsiteAvailability"), exports);
34
34
  __exportStar(require("./WebsiteBase"), exports);
35
35
  __exportStar(require("./WebsiteBatch"), exports);
36
36
  __exportStar(require("./WebsiteCampaign"), exports);
37
+ __exportStar(require("./WebsiteConnect"), exports);
37
38
  __exportStar(require("./WebsiteConversation"), exports);
38
39
  __exportStar(require("./WebsiteHelpdesk"), exports);
39
40
  __exportStar(require("./WebsiteInbox"), exports);
@@ -6,6 +6,7 @@ import WebsiteAnalytics from "../resources/WebsiteAnalytics";
6
6
  import WebsiteAvailability from "../resources/WebsiteAvailability";
7
7
  import WebsiteBatch from "../resources/WebsiteBatch";
8
8
  import WebsiteCampaign from "../resources/WebsiteCampaign";
9
+ import WebsiteConnect from "../resources/WebsiteConnect";
9
10
  import WebsiteConversation from "../resources/WebsiteConversation";
10
11
  import WebsiteHelpdesk from "../resources/WebsiteHelpdesk";
11
12
  import WebsiteInbox from "../resources/WebsiteInbox";
@@ -26,6 +27,6 @@ declare class WebsiteService {
26
27
  /**************************************************************************
27
28
  * EXPORTS
28
29
  ***************************************************************************/
29
- export interface WebsiteServiceInterface extends WebsiteBase, WebsiteAnalytics, WebsiteAvailability, WebsiteBatch, WebsiteCampaign, WebsiteConversation, WebsiteHelpdesk, WebsiteInbox, WebsiteOperator, WebsitePeople, WebsiteSettings, WebsiteVerify, WebsiteVisitors {
30
+ export interface WebsiteServiceInterface extends WebsiteBase, WebsiteAnalytics, WebsiteAvailability, WebsiteBatch, WebsiteCampaign, WebsiteConnect, WebsiteConversation, WebsiteHelpdesk, WebsiteInbox, WebsiteOperator, WebsitePeople, WebsiteSettings, WebsiteVerify, WebsiteVisitors {
30
31
  }
31
32
  export default WebsiteService;
@@ -18,6 +18,7 @@ const WebsiteAnalytics_1 = __importDefault(require("../resources/WebsiteAnalytic
18
18
  const WebsiteAvailability_1 = __importDefault(require("../resources/WebsiteAvailability"));
19
19
  const WebsiteBatch_1 = __importDefault(require("../resources/WebsiteBatch"));
20
20
  const WebsiteCampaign_1 = __importDefault(require("../resources/WebsiteCampaign"));
21
+ const WebsiteConnect_1 = __importDefault(require("../resources/WebsiteConnect"));
21
22
  const WebsiteConversation_1 = __importDefault(require("../resources/WebsiteConversation"));
22
23
  const WebsiteHelpdesk_1 = __importDefault(require("../resources/WebsiteHelpdesk"));
23
24
  const WebsiteInbox_1 = __importDefault(require("../resources/WebsiteInbox"));
@@ -41,6 +42,7 @@ class WebsiteService {
41
42
  WebsiteAvailability_1.default,
42
43
  WebsiteBatch_1.default,
43
44
  WebsiteCampaign_1.default,
45
+ WebsiteConnect_1.default,
44
46
  WebsiteConversation_1.default,
45
47
  WebsiteHelpdesk_1.default,
46
48
  WebsiteInbox_1.default,
@@ -21,11 +21,47 @@ export type WebsiteBatchConversationsOperation = {
21
21
  sessions?: string[];
22
22
  }
23
23
 
24
+ export type WebsiteBatchReportOperation = {
25
+ sessions: string[];
26
+ flag: string;
27
+ }
28
+
29
+ export type WebsiteBatchBlockOperation = {
30
+ sessions: string[];
31
+ blocked: boolean;
32
+ }
33
+
34
+ export type WebsiteBatchRoutingOperationAssigned = {
35
+ user_id: string;
36
+ }
37
+
38
+ export type WebsiteBatchRoutingOperation = {
39
+ sessions: string[];
40
+ assigned: WebsiteBatchRoutingOperationAssigned | null;
41
+ }
42
+
43
+ export type WebsiteBatchInboxOperation = {
44
+ sessions: string[];
45
+ inbox_id: string | null;
46
+ }
47
+
24
48
  export type WebsiteBatchPeopleOperationInner = {
25
49
  profiles?: string[];
26
50
  search?: string;
27
51
  }
28
52
 
53
+ export type WebsiteBatchDataPayload = Record<string, string | number | boolean>;
54
+
55
+ export type WebsiteBatchConversationsDataOperation = {
56
+ sessions: string[];
57
+ data: WebsiteBatchDataPayload;
58
+ }
59
+
60
+ export type WebsiteBatchConversationsSegmentsOperation = {
61
+ sessions: string[];
62
+ segments: string[];
63
+ }
64
+
29
65
  /**************************************************************************
30
66
  * CLASSES
31
67
  ***************************************************************************/
@@ -47,6 +83,19 @@ class WebsiteBatch extends BaseResource {
47
83
  );
48
84
  };
49
85
 
86
+ /**
87
+ * Batch Unresolve Conversations
88
+ */
89
+ batchUnresolveConversations(
90
+ websiteID: string, operation: WebsiteBatchConversationsOperation
91
+ ) {
92
+ return this.crisp.patch(
93
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "unresolve"]),
94
+
95
+ null, operation
96
+ );
97
+ };
98
+
50
99
  /**
51
100
  * Batch Read Conversations
52
101
  * @memberof WebsiteBatch
@@ -66,6 +115,19 @@ class WebsiteBatch extends BaseResource {
66
115
  );
67
116
  };
68
117
 
118
+ /**
119
+ * Batch Unread Conversations
120
+ */
121
+ batchUnreadConversations(
122
+ websiteID: string, operation: WebsiteBatchConversationsOperation
123
+ ) {
124
+ return this.crisp.patch(
125
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "unread"]),
126
+
127
+ null, operation
128
+ );
129
+ };
130
+
69
131
  /**
70
132
  * Batch Remove Conversations
71
133
  * @memberof WebsiteBatch
@@ -107,6 +169,122 @@ class WebsiteBatch extends BaseResource {
107
169
  }
108
170
  );
109
171
  };
172
+
173
+ /**
174
+ * Batch Report Conversations
175
+ */
176
+ batchReportConversations(
177
+ websiteID: string, operation: WebsiteBatchReportOperation
178
+ ) {
179
+ return this.crisp.post(
180
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "report"]),
181
+
182
+ null, operation
183
+ );
184
+ };
185
+
186
+ /**
187
+ * Batch Block Conversations
188
+ */
189
+ batchBlockConversations(
190
+ websiteID: string, operation: WebsiteBatchBlockOperation
191
+ ) {
192
+ return this.crisp.patch(
193
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "block"]),
194
+
195
+ null, operation
196
+ );
197
+ };
198
+
199
+ /**
200
+ * Batch Routing Conversations
201
+ */
202
+ batchRoutingConversations(
203
+ websiteID: string, operation: WebsiteBatchRoutingOperation
204
+ ) {
205
+ return this.crisp.patch(
206
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "routing"]),
207
+
208
+ null, operation
209
+ );
210
+ };
211
+
212
+ /**
213
+ * Batch Inbox Conversations
214
+ */
215
+ batchInboxConversations(
216
+ websiteID: string, operation: WebsiteBatchInboxOperation
217
+ ) {
218
+ return this.crisp.patch(
219
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "inbox"]),
220
+
221
+ null, operation
222
+ );
223
+ };
224
+
225
+ /**
226
+ * Batch Update Conversations Data
227
+ */
228
+ batchUpdateConversationsData(
229
+ websiteID: string, operation: WebsiteBatchConversationsDataOperation
230
+ ) {
231
+ return this.crisp.patch(
232
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "data"]),
233
+
234
+ null, operation
235
+ );
236
+ };
237
+
238
+ /**
239
+ * Batch Update People Data
240
+ */
241
+ batchUpdatePeopleData(
242
+ websiteID: string, people: WebsiteBatchPeopleOperationInner,
243
+ data: WebsiteBatchDataPayload
244
+ ) {
245
+ return this.crisp.patch(
246
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "data"]),
247
+
248
+ null,
249
+
250
+ {
251
+ people: people,
252
+ data: data
253
+ }
254
+ );
255
+ };
256
+
257
+ /**
258
+ * Batch Update Conversations Segments
259
+ */
260
+ batchUpdateConversationsSegments(
261
+ websiteID: string, operation: WebsiteBatchConversationsSegmentsOperation
262
+ ) {
263
+ return this.crisp.patch(
264
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "segments"]),
265
+
266
+ null, operation
267
+ );
268
+ };
269
+
270
+ /**
271
+ * Batch Update People Segments
272
+ */
273
+ batchUpdatePeopleSegments(
274
+ websiteID: string, people: WebsiteBatchPeopleOperationInner,
275
+ segments: string[]
276
+ ) {
277
+ return this.crisp.patch(
278
+ this.crisp.prepareRestUrl(["website", websiteID, "batch", "segments"]),
279
+
280
+ null,
281
+
282
+ {
283
+ people: people,
284
+ segments: segments
285
+ }
286
+ );
287
+ };
110
288
  }
111
289
 
112
290
  /**************************************************************************
@@ -107,6 +107,7 @@ export type WebsiteCampaignRecipientPerson = {
107
107
  }
108
108
 
109
109
  export type WebsiteCampaignStatistic = {
110
+ type?: string;
110
111
  profile?: WebsiteCampaignStatisticProfile;
111
112
  data?: Record<string, unknown>;
112
113
  created_at?: number;
@@ -0,0 +1,57 @@
1
+ /*
2
+ * This file is part of node-crisp-api
3
+ *
4
+ * Copyright (c) 2026 Crisp IM SAS
5
+ * All rights belong to Crisp IM SAS
6
+ */
7
+
8
+ /**************************************************************************
9
+ * IMPORTS
10
+ ***************************************************************************/
11
+
12
+ // PROJECT: RESOURCES
13
+ import BaseResource from "./BaseResource";
14
+
15
+ /**************************************************************************
16
+ * TYPES
17
+ ***************************************************************************/
18
+
19
+ export type WebsiteConnectEndpoints = {
20
+ socket?: WebsiteConnectEndpointsSocket;
21
+ rescue?: WebsiteConnectEndpointsRescue;
22
+ }
23
+
24
+ export type WebsiteConnectEndpointsSocket = {
25
+ app?: string;
26
+ stream?: string;
27
+ }
28
+
29
+ export type WebsiteConnectEndpointsRescue = {
30
+ socket?: WebsiteConnectEndpointsSocket;
31
+ }
32
+
33
+ /**************************************************************************
34
+ * CLASSES
35
+ ***************************************************************************/
36
+
37
+ /**
38
+ * Crisp WebsiteConnect Resource
39
+ */
40
+ class WebsiteConnect extends BaseResource {
41
+ /**
42
+ * Get Connect Endpoints
43
+ */
44
+ getConnectEndpoints(websiteID: string): Promise<WebsiteConnectEndpoints> {
45
+ return this.crisp.get(
46
+ this.crisp.prepareRestUrl([
47
+ "website", websiteID, "connect", "endpoints"
48
+ ])
49
+ );
50
+ };
51
+ }
52
+
53
+ /**************************************************************************
54
+ * EXPORTS
55
+ ***************************************************************************/
56
+
57
+ export default WebsiteConnect;
@@ -51,7 +51,6 @@ export interface WebsiteSettingsInbox {
51
51
  export interface WebsiteSettingsEmails {
52
52
  rating?: boolean;
53
53
  transcript?: boolean;
54
- enrich?: boolean;
55
54
  junk_filter?: boolean;
56
55
  }
57
56
 
@@ -134,7 +133,6 @@ export interface WebsiteSettingsUpdateInbox {
134
133
  export interface WebsiteSettingsUpdateEmails {
135
134
  rating?: boolean;
136
135
  transcript?: boolean;
137
- enrich?: boolean;
138
136
  junk_filter?: boolean;
139
137
  }
140
138
 
@@ -20,6 +20,7 @@ export * from "./WebsiteAvailability";
20
20
  export * from "./WebsiteBase";
21
21
  export * from "./WebsiteBatch";
22
22
  export * from "./WebsiteCampaign";
23
+ export * from "./WebsiteConnect";
23
24
  export * from "./WebsiteConversation";
24
25
  export * from "./WebsiteHelpdesk";
25
26
  export * from "./WebsiteInbox";
@@ -15,6 +15,7 @@ import WebsiteAnalytics from "@/resources/WebsiteAnalytics";
15
15
  import WebsiteAvailability from "@/resources/WebsiteAvailability";
16
16
  import WebsiteBatch from "@/resources/WebsiteBatch";
17
17
  import WebsiteCampaign from "@/resources/WebsiteCampaign";
18
+ import WebsiteConnect from "@/resources/WebsiteConnect";
18
19
  import WebsiteConversation from "@/resources/WebsiteConversation";
19
20
  import WebsiteHelpdesk from "@/resources/WebsiteHelpdesk";
20
21
  import WebsiteInbox from "@/resources/WebsiteInbox";
@@ -39,6 +40,7 @@ class WebsiteService {
39
40
  WebsiteAvailability,
40
41
  WebsiteBatch,
41
42
  WebsiteCampaign,
43
+ WebsiteConnect,
42
44
  WebsiteConversation,
43
45
  WebsiteHelpdesk,
44
46
  WebsiteInbox,
@@ -60,6 +62,7 @@ export interface WebsiteServiceInterface extends
60
62
  WebsiteAvailability,
61
63
  WebsiteBatch,
62
64
  WebsiteCampaign,
65
+ WebsiteConnect,
63
66
  WebsiteConversation,
64
67
  WebsiteHelpdesk,
65
68
  WebsiteInbox,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "crisp-api",
3
3
  "description": "Crisp API wrapper for Node - official, maintained by Crisp",
4
- "version": "10.9.3",
4
+ "version": "10.10.1",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {