crisp-api 9.11.0 → 9.12.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 +12 -0
- package/EXAMPLES.md +14 -0
- package/README.md +18 -0
- package/lib/resources/WebsiteConversation.js +24 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## v9.12.1
|
|
5
|
+
|
|
6
|
+
### New Features
|
|
7
|
+
|
|
8
|
+
* Changed the prototype of the `CrispClient.website.redeemIdentityVerificationLinkForConversation` method.
|
|
9
|
+
|
|
10
|
+
## v9.12.0
|
|
11
|
+
|
|
12
|
+
### New Features
|
|
13
|
+
|
|
14
|
+
* Added the new `CrispClient.website.redeemIdentityVerificationLinkForConversation` method.
|
|
15
|
+
|
|
4
16
|
## v9.11.0
|
|
5
17
|
|
|
6
18
|
### New Features
|
package/EXAMPLES.md
CHANGED
|
@@ -454,6 +454,20 @@ CrispClient.website.requestIdentityVerificationForConversation(websiteID, sessio
|
|
|
454
454
|
|
|
455
455
|
=========================
|
|
456
456
|
|
|
457
|
+
https://docs.crisp.chat/references/rest-api/v1/#redeem-identity-verification-link-for-conversation
|
|
458
|
+
|
|
459
|
+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
|
460
|
+
var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
|
|
461
|
+
|
|
462
|
+
var verification = {
|
|
463
|
+
"identity": "email",
|
|
464
|
+
"token": "709691"
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, verification);
|
|
468
|
+
|
|
469
|
+
=========================
|
|
470
|
+
|
|
457
471
|
https://docs.crisp.chat/references/rest-api/v1/#request-email-transcript-for-conversation
|
|
458
472
|
|
|
459
473
|
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
package/README.md
CHANGED
|
@@ -789,6 +789,24 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
789
789
|
```
|
|
790
790
|
</details>
|
|
791
791
|
|
|
792
|
+
* **Redeem Identity Verification Link For Conversation**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#redeem-identity-verification-link-for-conversation)
|
|
793
|
+
* `CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, identity, token)`
|
|
794
|
+
* <details>
|
|
795
|
+
<summary>See Example</summary>
|
|
796
|
+
|
|
797
|
+
```javascript
|
|
798
|
+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
|
799
|
+
var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
|
|
800
|
+
|
|
801
|
+
var verification = {
|
|
802
|
+
"identity": "email",
|
|
803
|
+
"token": "709691"
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
CrispClient.website.redeemIdentityVerificationLinkForConversation(websiteID, sessionID, verification);
|
|
807
|
+
```
|
|
808
|
+
</details>
|
|
809
|
+
|
|
792
810
|
* **Request Email Transcript For Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#request-email-transcript-for-conversation)
|
|
793
811
|
* `CrispClient.website.requestEmailTranscriptForConversation(websiteID, sessionID, to, email)`
|
|
794
812
|
* <details>
|
|
@@ -823,7 +823,7 @@ function WebsiteConversation(service, crisp) {
|
|
|
823
823
|
service.requestIdentityVerificationForConversation = function(
|
|
824
824
|
websiteID, sessionID, verification
|
|
825
825
|
) {
|
|
826
|
-
return crisp.
|
|
826
|
+
return crisp.post(
|
|
827
827
|
crisp._prepareRestUrl([
|
|
828
828
|
"website", websiteID, "conversation", sessionID, "verify", "identity"
|
|
829
829
|
]),
|
|
@@ -832,6 +832,29 @@ function WebsiteConversation(service, crisp) {
|
|
|
832
832
|
);
|
|
833
833
|
};
|
|
834
834
|
|
|
835
|
+
/**
|
|
836
|
+
* Redeem Identity Verification Link For Conversation
|
|
837
|
+
* @memberof WebsiteConversation
|
|
838
|
+
* @public
|
|
839
|
+
* @method redeemIdentityVerificationLinkForConversation
|
|
840
|
+
* @param {string} websiteID
|
|
841
|
+
* @param {string} sessionID
|
|
842
|
+
* @param {object} verification
|
|
843
|
+
* @return {Promise}
|
|
844
|
+
*/
|
|
845
|
+
service.redeemIdentityVerificationLinkForConversation = function(
|
|
846
|
+
websiteID, sessionID, verification
|
|
847
|
+
) {
|
|
848
|
+
return crisp.put(
|
|
849
|
+
crisp._prepareRestUrl([
|
|
850
|
+
"website", websiteID, "conversation", sessionID, "verify", "identity",
|
|
851
|
+
"link"
|
|
852
|
+
]),
|
|
853
|
+
|
|
854
|
+
null, verification
|
|
855
|
+
);
|
|
856
|
+
};
|
|
857
|
+
|
|
835
858
|
/**
|
|
836
859
|
* Request Email Transcript For Conversation
|
|
837
860
|
* @memberof WebsiteConversation
|
package/package.json
CHANGED