crisp-api 9.6.0 → 9.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v9.7.0
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.website.reportConversation` method.
9
+
4
10
  ## v9.6.0
5
11
 
6
12
  ### New Features
package/EXAMPLES.md CHANGED
@@ -611,6 +611,17 @@ CrispClient.website.deliverWidgetDataEditActionForConversation(websiteID, sessio
611
611
 
612
612
  =========================
613
613
 
614
+ https://docs.crisp.chat/references/rest-api/v1/#report-conversation
615
+
616
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
617
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
618
+
619
+ var flag = "spam";
620
+
621
+ CrispClient.website.reportConversation(websiteID, sessionID, flag);
622
+
623
+ =========================
624
+
614
625
  https://docs.crisp.chat/references/rest-api/v1/#schedule-a-reminder-for-conversation
615
626
 
616
627
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
@@ -1642,6 +1653,7 @@ var settings = {
1642
1653
  "ongoing_operator_face": true,
1643
1654
  "activity_metrics": true,
1644
1655
  "operator_privacy": false,
1656
+ "visitor_privacy": false,
1645
1657
  "availability_tooltip": true,
1646
1658
  "hide_vacation": false,
1647
1659
  "hide_on_away": false,
package/README.md CHANGED
@@ -6,7 +6,7 @@ The Crisp API Node wrapper. Authenticate, send messages, fetch conversations, ac
6
6
 
7
7
  Copyright 2024 Crisp IM SAS. See LICENSE for copying information.
8
8
 
9
- * **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 27/01/2025
9
+ * **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 30/01/2025
10
10
  * **😘 Maintainers**: [@baptistejamin](https://github.com/baptistejamin), [@eliottvincent](https://github.com/eliottvincent), [@valeriansaliou](https://github.com/valeriansaliou)
11
11
 
12
12
  ## Installation
@@ -1012,6 +1012,21 @@ All methods that you will most likely need when building a Crisp integration are
1012
1012
  ```
1013
1013
  </details>
1014
1014
 
1015
+ * **Report Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#report-conversation)
1016
+ * `CrispClient.website.reportConversation(websiteID, sessionID, flag)`
1017
+ * <details>
1018
+ <summary>See Example</summary>
1019
+
1020
+ ```javascript
1021
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
1022
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
1023
+
1024
+ var flag = "spam";
1025
+
1026
+ CrispClient.website.reportConversation(websiteID, sessionID, flag);
1027
+ ```
1028
+ </details>
1029
+
1015
1030
 
1016
1031
  * ### **Website People** _(these are your end-users)_
1017
1032
  * **Get People Statistics** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-people-statistics)
@@ -2384,6 +2399,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
2384
2399
  "ongoing_operator_face": true,
2385
2400
  "activity_metrics": true,
2386
2401
  "operator_privacy": false,
2402
+ "visitor_privacy": false,
2387
2403
  "availability_tooltip": true,
2388
2404
  "hide_vacation": false,
2389
2405
  "hide_on_away": false,
@@ -1164,6 +1164,32 @@ function WebsiteConversation(service, crisp) {
1164
1164
  }
1165
1165
  );
1166
1166
  };
1167
+
1168
+ /**
1169
+ * Report Conversation
1170
+ * @memberof WebsiteConversation
1171
+ * @public
1172
+ * @method reportConversation
1173
+ * @param {string} websiteID
1174
+ * @param {string} sessionID
1175
+ * @param {string} flag
1176
+ * @return {Promise}
1177
+ */
1178
+ service.reportConversation = function(
1179
+ websiteID, sessionID, flag
1180
+ ) {
1181
+ return crisp.post(
1182
+ crisp._prepareRestUrl([
1183
+ "website", websiteID, "conversation", sessionID, "report"
1184
+ ]),
1185
+
1186
+ null,
1187
+
1188
+ {
1189
+ flag : flag
1190
+ }
1191
+ );
1192
+ };
1167
1193
  }
1168
1194
 
1169
1195
 
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": "9.6.0",
4
+ "version": "9.7.0",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {