Releases: nylas/nylas-nodejs
v5.7.0
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
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
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/availabilityendpoint (#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
v5.5.0
v5.4.0
v5.3.3
v5.3.2
v5.3.1
v5.3.0
- 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
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
objectattribute toevent.whenobject