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

intercom-client

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intercom-client - npm Package Compare versions

Comparing version 0.5.2 to 1.0.0

dist/note.js

15

dist/client.js

@@ -31,2 +31,4 @@ 'use strict';

var _note = require('./note');
var unirest = require('unirest');

@@ -62,2 +64,3 @@

this.conversations = new _conversation.Conversation(this);
this.notes = new _note.Note(this);
}

@@ -68,3 +71,3 @@

value: function ping(f) {
unirest.get('https://api.intercom.io/admins').auth(this.appId, this.appApiKey).type('json').header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest.get('https://api.intercom.io/admins').auth(this.appId, this.appApiKey).type('json').header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return f(r.status);

@@ -78,3 +81,3 @@ });

unirest.put('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').send(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest.put('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').send(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return _this.callback(f, r);

@@ -88,3 +91,3 @@ });

unirest.post('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').send(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest.post('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').send(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return _this2.callback(f, r);

@@ -98,3 +101,3 @@ });

unirest.get('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').query(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest.get('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').query(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return _this3.callback(f, r);

@@ -108,3 +111,3 @@ });

unirest.get(paginationObject.next).auth(this.appId, this.appApiKey).type('json').header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest.get(paginationObject.next).auth(this.appId, this.appApiKey).type('json').header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return _this4.callback(f, r);

@@ -118,3 +121,3 @@ });

unirest['delete']('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').query(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/0.5.2').end(function (r) {
unirest['delete']('https://api.intercom.io' + endpoint).auth(this.appId, this.appApiKey).type('json').query(data).header('Accept', 'application/json').header('User-Agent', 'intercom-node-client/1.0.0').end(function (r) {
return _this5.callback(f, r);

@@ -121,0 +124,0 @@ });

2

package.json
{
"name": "intercom-client",
"version": "0.5.2",
"version": "1.0.0",
"description": "Official Node bindings to the Intercom API",

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

@@ -6,6 +6,2 @@ # intercom-node

## Beta
This client library is in active development. Full API documentation can be found [here](https://doc.intercom.io/api/).
## Installation

@@ -325,3 +321,3 @@

```node
// Fetching a conversation
// Fetch a conversation
client.conversations.find({ id: '1062682196' }, callback);

@@ -331,3 +327,3 @@ ```

```node
// Replying to a conversation
// Reply to a conversation
var reply = {

@@ -345,6 +341,31 @@ id: '1039067180',

```node
// Marking a conversation as read
// Mark a conversation as read
client.conversations.markAsRead({ id: '1039067180' }, callback);
```
## Notes
```node
// Create a note
var note = {
admin_id: 21599,
body: 'Hello notes!',
user: {
id: '55b26822ce97179e52001334'
}
};
client.notes.create(note, callback);
```
```node
// List notes by user
client.notes.list({ email: 'bob@intercom.io' }, callback);
```
```node
//Fetch a note
client.notes.find({ id: '3342887' }, callback);
```
## Pagination

@@ -351,0 +372,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc