Comparing version 4.5.0 to 4.6.0
@@ -7,2 +7,6 @@ # Changelog | ||
### 4.6.0 / 2019-06-20 | ||
* Enable link tracking | ||
### 4.5.0 / 2019-04-02 | ||
@@ -9,0 +13,0 @@ |
@@ -120,2 +120,3 @@ "use strict"; | ||
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
var tracking = arguments.length > 1 ? arguments[1] : undefined; | ||
var body = this.rawMime, | ||
@@ -138,2 +139,6 @@ headers = { | ||
body = this.saveRequestBody(); | ||
if (tracking) { | ||
body['tracking'] = tracking; | ||
} | ||
} | ||
@@ -140,0 +145,0 @@ } |
{ | ||
"name": "nylas", | ||
"version": "4.5.0", | ||
"version": "4.6.0", | ||
"description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.", | ||
@@ -5,0 +5,0 @@ "main": "lib/nylas.js", |
@@ -61,3 +61,3 @@ Nylas Node.js SDK [![Travis build status](https://travis-ci.org/nylas/nylas-nodejs.svg?branch=master)](https://travis-ci.org/nylas/nylas-nodejs) | ||
* `state` - An arbitrary string that will be returned back as a query param in your `redirectURI`. | ||
* `scopes` - An array of which scopes you'd like to auth with. Possible items are `'email'`, `'calendar'`, and `'contacts'`. If omitted, defaults to all scopes. | ||
* `scopes` - An array of which scopes you'd like to auth with. The Nylas API provides granular authentication scopes that empower users with control over what level of access your application has to their data. See supported [Authentication Scopes](https://docs.nylas.com/docs/authentication-scopes) for a full list of scopes and details behind the scopes. If omitted, defaults to all scopes. | ||
@@ -77,2 +77,3 @@ ### Step 1: Redirect the user to Nylas | ||
redirectURI: 'http://localhost:3000/oauth/callback', | ||
scopes: ['email.read_only', 'email.send'], | ||
}; | ||
@@ -111,5 +112,3 @@ res.redirect(Nylas.urlForAuthentication(options)); | ||
const nylas = Nylas.with(ACCESS_TOKEN); | ||
// Get IP Addresses | ||
Nylas.accounts.first() | ||
@@ -332,5 +331,15 @@ .then(account => account.ipAddresses()) | ||
// Enabling tracking | ||
// NB: When passing in the tracking object, you *must* pass in a value for callback as the first parameter. | ||
const tracking = { | ||
"links": true, | ||
"opens": true, | ||
"thread_replies": true, | ||
"payload": "12345" | ||
} | ||
// Sending the draft | ||
draft.send().then(message => { | ||
draft.send(null, tracking).then(message => { | ||
console.log(`${message.id} was sent`); | ||
@@ -337,0 +346,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
158720
2888
564