crisp-api 6.1.0 → 6.2.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,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v6.2.0
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.website.getVerifyStatusForConversation` method.
9
+ * Added the new `CrispClient.website.updateVerifyStatusForConversation` method.
10
+
4
11
  ## v6.1.0
5
12
 
6
13
  ### New Features
package/EXAMPLES.md CHANGED
@@ -359,6 +359,26 @@ CrispClient.website.blockIncomingMessagesForConversation(websiteID, sessionID, b
359
359
 
360
360
  =========================
361
361
 
362
+ https://docs.crisp.chat/references/rest-api/v1/#get-verify-status-for-conversation
363
+
364
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
365
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
366
+
367
+ CrispClient.website.getVerifyStatusForConversation(websiteID, sessionID);
368
+
369
+ =========================
370
+
371
+ https://docs.crisp.chat/references/rest-api/v1/#update-verify-status-for-conversation
372
+
373
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
374
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
375
+
376
+ var verified = true;
377
+
378
+ CrispClient.website.updateVerifyStatusForConversation(websiteID, sessionID, verified);
379
+
380
+ =========================
381
+
362
382
  https://docs.crisp.chat/references/rest-api/v1/#request-email-transcript-for-conversation
363
383
 
364
384
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
package/README.md CHANGED
@@ -657,6 +657,34 @@ All methods that you will most likely need when building a Crisp integration are
657
657
  ```
658
658
  </details>
659
659
 
660
+ * **Get Verify Status For Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-verify-status-for-conversation)
661
+ * `CrispClient.website.getVerifyStatusForConversation(websiteID, sessionID)`
662
+ * <details>
663
+ <summary>See Example</summary>
664
+
665
+ ```javascript
666
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
667
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
668
+
669
+ CrispClient.website.getVerifyStatusForConversation(websiteID, sessionID);
670
+ ```
671
+ </details>
672
+
673
+ * **Update Verify Status For Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#update-verify-status-for-conversation)
674
+ * `CrispClient.website.updateVerifyStatusForConversation(websiteID, sessionID, verified)`
675
+ * <details>
676
+ <summary>See Example</summary>
677
+
678
+ ```javascript
679
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
680
+ var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
681
+
682
+ var verified = true;
683
+
684
+ CrispClient.website.updateVerifyStatusForConversation(websiteID, sessionID, verified);
685
+ ```
686
+ </details>
687
+
660
688
  * **Request Email Transcript For Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#request-email-transcript-for-conversation)
661
689
  * `CrispClient.website.requestEmailTranscriptForConversation(websiteID, sessionID, to, email)`
662
690
  * <details>
@@ -534,6 +534,42 @@ function WebsiteConversation(service, crisp) {
534
534
  );
535
535
  };
536
536
 
537
+ /**
538
+ * Get Verify Status For Conversation
539
+ * @memberof WebsiteConversation
540
+ * @method getVerifyStatusForConversation
541
+ * @return Promise
542
+ */
543
+ service.getVerifyStatusForConversation = function(websiteID, sessionID) {
544
+ return crisp.get(
545
+ crisp._prepareRestUrl([
546
+ "website", websiteID, "conversation", sessionID, "verify"
547
+ ])
548
+ );
549
+ };
550
+
551
+ /**
552
+ * Update Verify Status For Conversation
553
+ * @memberof WebsiteConversation
554
+ * @method updateVerifyStatusForConversation
555
+ * @return Promise
556
+ */
557
+ service.updateVerifyStatusForConversation = function(
558
+ websiteID, sessionID, verified
559
+ ) {
560
+ return crisp.patch(
561
+ crisp._prepareRestUrl([
562
+ "website", websiteID, "conversation", sessionID, "verify"
563
+ ]),
564
+
565
+ null,
566
+
567
+ {
568
+ verified : (verified || false)
569
+ }
570
+ );
571
+ };
572
+
537
573
  /**
538
574
  * Request Email Transcript For Conversation
539
575
  * @memberof WebsiteConversation
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": "6.1.0",
4
+ "version": "6.2.0",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {