Skip to content

Commit b060280

Browse files
Add new website.abortWebsiteDeletion() method
1 parent 74f8dfd commit b060280

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

EXAMPLES.md

+8
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,14 @@ CrispClient.website.deleteWebsite(websiteID, verify);
15481548

15491549
=========================
15501550

1551+
https://docs.crisp.chat/references/rest-api/v1/#abort-website-deletion
1552+
1553+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
1554+
1555+
CrispClient.website.abortWebsiteDeletion(websiteID);
1556+
1557+
=========================
1558+
15511559
https://docs.crisp.chat/references/rest-api/v1/#get-website-settings
15521560

15531561
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Crisp API Node wrapper. Authenticate, send messages, fetch conversations, ac
66

77
Copyright 2023 Crisp IM SAS. See LICENSE for copying information.
88

9-
* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 10/04/2024
9+
* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 12/07/2024
1010
* **😘 Maintainers**: [@baptistejamin](https://github.com/baptistejamin), [@eliottvincent](https://github.com/eliottvincent), [@valeriansaliou](https://github.com/valeriansaliou)
1111

1212
## Installation
@@ -2260,6 +2260,18 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
22602260
```
22612261
</details>
22622262

2263+
* **Abort Website Deletion** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#abort-website-deletion)
2264+
* `CrispClient.website.abortWebsiteDeletion(websiteID)`
2265+
* <details>
2266+
<summary>See Example</summary>
2267+
2268+
```javascript
2269+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2270+
2271+
CrispClient.website.abortWebsiteDeletion(websiteID);
2272+
```
2273+
</details>
2274+
22632275

22642276
* #### **Website Settings**
22652277
* **Get Website Settings** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-settings)

lib/resources/WebsiteBase.js

+14
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ function WebsiteBase(service, crisp) {
7979
}
8080
);
8181
};
82+
83+
/**
84+
* Abort Website Deletion
85+
* @memberof WebsiteBase
86+
* @public
87+
* @method abortWebsiteDeletion
88+
* @param {string} websiteID
89+
* @return {Promise}
90+
*/
91+
service.abortWebsiteDeletion = function(websiteID) {
92+
return crisp.delete(
93+
crisp._prepareRestUrl(["website", websiteID, "expunge"])
94+
);
95+
};
8296
}
8397

8498

0 commit comments

Comments
 (0)