crisp-api 9.12.0 → 9.13.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,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v9.13.0
5
+
6
+ ### New Features
7
+
8
+ * Added support for the `identity:verify:request` RTM API event.
9
+
10
+ ## v9.12.1
11
+
12
+ ### New Features
13
+
14
+ * Changed the prototype of the `CrispClient.website.redeemIdentityVerificationLinkForConversation` method.
15
+
4
16
  ## v9.12.0
5
17
 
6
18
  ### New Features
package/EXAMPLES.md CHANGED
@@ -459,10 +459,12 @@ https://docs.crisp.chat/references/rest-api/v1/#redeem-identity-verification-lin
459
459
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
460
460
  var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
461
461
 
462
- var identity = "email";
463
- var token = "709691";
462
+ var verification = {
463
+ "identity": "email",
464
+ "token": "709691"
465
+ };
464
466
 
465
- CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, identity, token);
467
+ CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, verification);
466
468
 
467
469
  =========================
468
470
 
package/README.md CHANGED
@@ -798,10 +798,12 @@ All methods that you will most likely need when building a Crisp integration are
798
798
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
799
799
  var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
800
800
 
801
- var identity = "email";
802
- var token = "709691";
801
+ var verification = {
802
+ "identity": "email",
803
+ "token": "709691"
804
+ };
803
805
 
804
- CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, identity, token);
806
+ CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, verification);
805
807
  ```
806
808
  </details>
807
809
 
@@ -3649,6 +3651,10 @@ Available events are listed below:
3649
3651
  * **Call Request Rejected** [`user`, `plugin`]:
3650
3652
  * `call:request:rejected`
3651
3653
 
3654
+ * #### **Identity Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#identity-events)
3655
+ * **Identity Verify Request** [`plugin`]:
3656
+ * `identity:verify:request`
3657
+
3652
3658
  * #### **Widget Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#widget-events)
3653
3659
  * **Widget Action Processed** [`user`]:
3654
3660
  * `widget:action:processed`
package/lib/crisp.js CHANGED
@@ -125,6 +125,9 @@ Crisp.DEFAULT_RTM_EVENTS = [
125
125
  "call:request:initiated",
126
126
  "call:request:rejected",
127
127
 
128
+ // Identity Events
129
+ "identity:verify:request",
130
+
128
131
  // Status Events
129
132
  "status:health:changed",
130
133
 
@@ -839,12 +839,11 @@ function WebsiteConversation(service, crisp) {
839
839
  * @method redeemIdentityVerificationLinkForConversation
840
840
  * @param {string} websiteID
841
841
  * @param {string} sessionID
842
- * @param {string} identity
843
- * @param {string} token
842
+ * @param {object} verification
844
843
  * @return {Promise}
845
844
  */
846
845
  service.redeemIdentityVerificationLinkForConversation = function(
847
- websiteID, sessionID, identity, token
846
+ websiteID, sessionID, verification
848
847
  ) {
849
848
  return crisp.put(
850
849
  crisp._prepareRestUrl([
@@ -852,12 +851,7 @@ function WebsiteConversation(service, crisp) {
852
851
  "link"
853
852
  ]),
854
853
 
855
- null,
856
-
857
- {
858
- identity : identity,
859
- token : token
860
- }
854
+ null, verification
861
855
  );
862
856
  };
863
857
 
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.12.0",
4
+ "version": "9.13.0",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {