New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

intercom-client

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intercom-client - npm Package Compare versions

Comparing version

to
2.10.3

@@ -86,2 +86,21 @@ 'use strict';

}
}, {
key: 'requestPermanentDeletionByParams',
value: function requestPermanentDeletionByParams(params, f) {
var _this = this;
if (params.id) {
return this.requestPermanentDeletion(params.id, f);
}
return this.find(params).then(function (res) {
return _this.requestPermanentDeletion(res.body.id, f);
}).catch(function (err) {
if (f) {
return f(err);
}
throw err;
});
}
}]);

@@ -88,0 +107,0 @@

{
"name": "intercom-client",
"version": "2.10.2",
"version": "2.10.3",
"description": "Official Node bindings to the Intercom API",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/intercom/intercom-node",

@@ -151,3 +151,3 @@ # intercom-node

```node
// Permanently delete a user user by id (https://developers.intercom.com/v2.0/reference#delete-users)
// Permanently delete a user by id (https://developers.intercom.com/v2.0/reference#delete-users)
const intercomUserId = '123'

@@ -157,2 +157,13 @@ client.users.requestPermanentDeletion(intercomUserId, callback);

```node
// Permanently delete a user by id in params
client.users.requestPermanentDeletionByParams({ id: '55b9eaf' }, callback);
// Permanently delete a user by user_id
client.users.requestPermanentDeletionByParams({ user_id: 'foobar' }, callback);
// Permanently delete a user by email
client.users.requestPermanentDeletionByParams({ email: 'jayne@serenity.io' }, callback);
```
## Leads

@@ -189,3 +200,3 @@

setTimeout(() => {
console.log(res.body.users.length);
console.log(res.body.contacts.length);
// Your custom logic

@@ -192,0 +203,0 @@ resolve();