Skip to content

Releases: nylas/nylas-nodejs

v5.7.0

18 Aug 15:08

Choose a tag to compare

This new release of the Nylas Node SDK brings a couple of fixes as well as adding support for Event Conference Sync (Beta).

New Features

  • Add missing fields for recurring events (#259, #221)
  • Add support for conferencing (#261)

Enhancements

  • Fix minor issues with Neural API implementation (#257, #258)
  • Fix not rejecting uncaught errors during requests (#262, #260)

Using New Features

Conference Sync (Beta)

Event.conference is now a field that will contain conference details for Events that contain them, and it can be populated when new events through the SDK.

You can read the values like so:

const event = await nylas.events.find("id");
const conferencingProvider = event.conferencing.provider;
const conferenceURL = event.conferencing.details.url;
const conferencePassword = event.conferencing.details.password;
const conferenceMeetingCode = event.conferencing.details.meetingCode;
const conferencePhoneNumbers = event.conferencing.details.phone;
const conferencePin = event.conferencing.details.pin;

You can also build a new event that includes conferencing details with the SDK:

const zoomEvent = nylas.events.build({
    ...
    conferencing: {
        provider: "Zoom Meeting",
        details: {
            url: "https://us02web.zoom.us/j/****************",
            meeting_code: "213",
            password: "xyz",
            phone: [
                "+11234567890"
            ]
        }
    },
});

v5.6.0

14 Jul 18:28
486fd0b

Choose a tag to compare

This new release of the Nylas Node SDK brings a couple of fixes as well as adding a few features. Most notably, this release brings forward support for the Nylas Neural API! More information below on how to use each part of the Neural API through our Node SDK.

New Features

  • Add linting, enabled and set up eslint and prettier (#252)
  • Add support for /calendars/availability endpoint (#248, #254)
  • Add support for the Neural API (#253)

Enhancements

  • Fix Jest test cases not respecting async methods (#249)
  • Fix issue with parsing raw MIME emails (#247)

Using New Features

Neural API

To use Sentiment Analysis:

// To perform sentiment analysis on a message, pass in the message ID:
const messageAnalysis = await nylas.neural.sentimentAnalysisMessage(MESSAGE_ID);

// To perform sentiment analysis on just text, pass in a string:
const textAnalysis = await nylas.neural.sentimentAnalysisText("Hi, thank you so much for reaching out! We can catch up tomorrow.");

To use Signature Extraction:

const signature = await nylas.neural.extractSignature(MESSAGE_ID);

// The method also accepts two optional parameters
// parseContact, a boolean for whether Nylas should parse the contact from the signature (API defaults to true)
// options, an object of options that can be enabled for the Neural endpoint, of type NeuralMessageOptions:
const options = {
    ignore_links: false,
    ignore_images: false,
    ignore_tables: false,
    remove_conclusion_phrases: false,
    images_as_markdowns: false
}

const signature = await nylas.neural.extractSignature(MESSAGE_ID, true, options);

and to parse the contact and convert it to the standard Nylas contact object:

const contact = signature.contacts.toContactObject();

To use Clean Conversations:

const convo = await nylas.neural.cleanConversation(MESSAGE_ID);

// You can also pass in an object of options that can be enabled for the Neural endpoint, of type NeuralMessageOptions
const convo = await nylas.neural.cleanConversation(MESSAGE_ID, options);

and to extract images from the result:

await convo.extractImages();

To use Optical Character Recognition:

const ocr = await nylas.neural.ocrRequest(FILE_ID);

// This endpoint also supports a second, optional parameter for an array specifying the pages that the user wants analyzed:
const ocr = await nylas.neural.ocrRequest(FILE_ID, [2,3]);

To use Categorizer

let cat = await nylas.neural.categorize(MESSAGE_ID);

// You can also send a request to recategorize the message:
cat = await cat.reCategorize("conversation");

Calendar Availaiblity

const params = {
  startTime: '1590454800',
  endTime: '1590780800',
  interval: 5,
  duration: 30,
  emails: ['jane@email.com'],
  open_hours: [
    {
      emails: ['swag@nylas.com'],
      days: ['0'],
      timezone: 'America/Chicago',
      start: '10:00',
      end: '14:00',
      object_type: 'open_hours',
    },
  ],
};

const availability = await testContext.connection.calendars.availability(params);

v5.5.1

24 Jun 14:06
42a032d

Choose a tag to compare

Enhancements

  • Fix tracking object not being added to a pre-existing draft object (#241)
  • Removed request dependency and related import statements (#240)
  • Fix undefined response when downloading file (#242)

v5.5.0

09 Jun 21:09
a69f8de

Choose a tag to compare

New Features

  • Replaced deprecated request library with node-fetch (#234)
  • Add custom error class NylasApiError to add more error details returned from the API (#236)
  • Add support for read only fields (#237)
  • Enabled Nylas API v2.2 support (#237)

Enhancements

  • Fix bug where saving a draft object with an undefined filesIds would throw an error (#230)
  • Fix typings for classes that extend RestfulModelCollection or RestfulModelInstance (#238)

v5.4.0

21 May 21:26

Choose a tag to compare

New Features

  • Add metadata field in the Event model to support new Event metadata feature (#227)
  • Add support for filtering metadata using metadata_key, metadata_value, and metadata_pair (#228)

Enhancements

  • Updated dependencies lodash, y18n, and pug to the latest stable version (#222)

v5.3.3

26 Mar 19:37

Choose a tag to compare

  • Pass error message #219
  • Migrate delta streaming to node-fetch #216
  • Migrate exchangeCodeForToken to node-fetch #214

v5.3.2

12 Jan 06:38

Choose a tag to compare

v5.3.1

20 Nov 18:26

Choose a tag to compare

5.3.1 / 2020-11-20

  • Drop async dependency for smaller package fingerprint. Async is replaced with promises.
  • Remove circular dependency in nylas-connection.ts
  • Update readme with syntax highlighting

v5.3.0

20 Oct 01:18

Choose a tag to compare

  • Fix bug where setting event.start and event.end did not set event.when if event.when didn't exist
  • Refactor parameter ordering in find() and draft.send() methods [backwards compatible]
  • Add JobStatus model and collection

v5.2.0

29 Jul 22:01

Choose a tag to compare

5.2.0 / 2020-07-27

  • Implement support for GET /contacts/groups
  • Update lodash import
  • Support GET /resources
  • Support POST, PUT and DELETE for calendars, and add location, timezone and isPrimary attributes.
  • Add object attribute to event.when object