All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Make
Participant.emailoptional inEventmodel to match API behavior (#670) - Updated
ListGrantsQueryParams.sortByvalues to match API expectations ('created_at' | 'updated_at'instead of'createdAt' | 'updatedAt')
- Broken CJS build outputs resulted in a "TypeError: Nylas is not a constructor" error
- Support
isPlaintextboolean for messages send and drafts create requests - Expose raw response headers on all responses via non-enumerable
rawHeaderswhile keeping existingheaderscamelCased
- Upgraded node-fetch from v2 to v3 for better ESM support and compatibility with edge environments
- Fixed test expectations for file attachment sizes and content types to match actual implementation behavior
- Updated Jest configuration to properly handle ESM modules from node-fetch v3
- Removed incompatible AbortSignal import from node-fetch externals (now uses native Node.js AbortSignal)
- Support for new message
fieldsquery parameter values:include_tracking_optionsandraw_mime - Support for
trackingOptionsproperty in Message responses when usingfields=include_tracking_options - Support for
rawMimeproperty in Message responses when usingfields=raw_mime MessageTrackingOptionsinterface for tracking message opens, thread replies, link clicks, and custom labels- Support for
includeHiddenFoldersquery parameter in folders list endpoint for Microsoft accounts - Support for
singleLevelquery parameter inListFolderQueryParamsfor Microsoft accounts to control folder hierarchy traversal
- Fixed 3MB payload size limit to consider total request size (message body + attachments) instead of just attachment size when determining whether to use multipart/form-data encoding
- Support for 'zoom' as a provider type in Auth module
- Support for
tentativeAsBusyparameter in FreeBusy requests to control how tentative events are treated
- Event status type to use 'maybe' instead of 'tentative' in Event interface to match API documentation
- Missing
/cancelsuffix in Notetaker API endpoint - URL encoding for API path components to properly handle special characters
- Support for Notetaker API endpoints
- Notetaker settings to calendar and event models
- Support for
tentativeAsBusyparameter in availability and event listing
- Providing timeout in milliseconds via request overrides - please use seconds instead
- Support for
listImportEventsmethod to import events from a specified calendar within a given time frame - Support for returning all response headers in node sdk for error responses
- Grants support for queryParams in list method first parameter
any_emailwas not transformed to a comma delimited list for messages.list
latestMessageReceivedDate&latestMessageSentDateto be optional on threads model
createdAtfield from message model
- Issue where timeout was not being respected when overriding the timeout in the request options
- Issue where query params with array values were not being transformed into comma-delimited strings
- Transform anyEmail array into comma-delimited any_email parameter in threads list
credentialsresource to use correct endpoint
- Query parameters for array values
- Support for Scheduling API
- Issue where inline attachments > 3Mb were not sent correctly
- Missing
selectfield on query params - Missing
namefield on grant model - Missing
masterEventIdon Event model
- Webhook rotate secret calling the wrong endpoint
- Support for filtering events by masterEventID
- Support for gzip compression
- Support for filtering events by attendee email
- Buffer support for file attachments
- New webhook trigger types
- EWS as a provider
- Rotate secret endpoint from being a PUT to a POST call
- Issue where crypto import was causing downstream Jest incompatibilities
- FormData import compatibility issues with ESM
- eslint-plugin-import from production dependencies
- Issue where metadata was being incorrectly modified before being sent to the API
- Collective availability method
- Crash when timeout encountered
- Bump
bracessub-dependency from 3.0.2 to 3.0.3
- Support for filtering by event type when listing events
- Support for filtering a list of folders
- Query parameters not being formatted properly
- Support for
providerfield in code exchange response - Clean messages support
- Issue where attachments < 3mb were not being encoded correctly
- Response type to
sendRsvp - Support for adding custom headers to outgoing requests
- Support for custom headers field for drafts and messages
- Support for setting
include_grant_scopesfor auth url generation
- Incorrect
typefield inWhenmodels toobject
- Inaccuracy in
ReminderOverridemodel
- Default timeout to match API (90 seconds)
- Improved message sending and draft create/update performance
- Serialization/deserialization of keys with numbers in them
- Support for
roundTofield in availability response model - Support for
attributesfield in folder model - Support for icloud as an auth provider
- Query params not showing up in method parameters for finding a message
- Missing fields in message models
- Unnecessary
clientIdfrom detectProvider params
- Support for
/v3/connect/tokeninfoendpoint - Models can now directly be imported from the top-level
nylaspackage
- Inaccuracies in event and webhook models
- Support for both ES6 and CommonJS module systems
- Models for all API resources and endpoints, for all HTTP methods to reduce confusion on which fields are available for each endpoint
- Error classes for the different API errors as well as SDK-specific errors
- BREAKING: Node SDK v7 supports the Nylas API v3 exclusively, dropping support for any endpoints that are not available in v3
- BREAKING: Convert
Nylasclass from a static to a non-static class - BREAKING: Officially support minimum Node 16
- BREAKING: Dropped the use of 'Collections' in favor of 'Resources'
- BREAKING: Removed all REST calls from models and moved them directly into resources
- Rewritten the majority of SDK to be more modular and efficient
- Removed the use of custom strings for serialization and deserialization, now automatically converting to camelCase and from the API's snake_case
- BREAKING: Local Webhook development support is removed due to incompatibility
- Local webhook testing support
hideParticipantsfield toEvent
- Support for rate limit errors
- responseType to AuthenticateUrlConfig
- New attributes for Event webhook notifications
- Event
visibilityfield to be writeable
- Bump
decode-uri-componentsub-dependency from 0.2.0 to 0.2.2 - Bump
qssub-dependency from 6.5.2 to 6.5.3 - Bump
json5sub-dependency from 2.1.0 to 2.2.3 - Bump
minimatchsub-dependency from 3.0.4 to 3.1.2
- Calendar color implementation
- Additional fields for job status webhook notifications
- Support for calendar colors (for Microsoft calendars)
- Support for event reminders
- Typo in
SchedulerBooking.calendarInviteToGuestsattribute
- Bump
minimistsub-dependency from 1.2.5 to 1.2.6
- Additional
Eventfields
- Issue with
EventParticipantnot sending status on new event creation
metadatafield toJobStatusinterval_minutesfield in Scheduler booking config
Event.originalStartTimetype to beDateSchedulerBookingOpeningHours.accountIddeserialization- Json value for
confirmationEmailToHostinSchedulerBooking
Message.save()functionality for updating existing messages- Missing
reminderMinutesfield inEvent
- Issue where API response data was being lost
- Incorrect tunnel index number in webhook example
- Support for collective and group events
fileIdsToAttachfield not being set when initializing aDraft
- Missing
fileIdsToAttachfield inDraftProperties
- JSON parse error when using
CalendarRestfulModelCollection.freeBusy - Base URL not being set for
SchedulerRestfulModelCollectionfunctions
- Missing order and emails field in calendar availability
- Issue where passing in an array of one for
MessageRestfulModelCollection.findMultiplethrows an error
- Support for revoking a single access token
- Improved Outbox job status support
- Support Setting Redirect On Error in Authenticate URL Config
- Issue where an empty response body could trigger a JSON deserialization error
- Usage of unreliable
node-fetch response.size
- Allow getting raw message by message ID directly instead of needing to fetch the message first
- New
authenticationTypefield inManagementAccount
- JSON error thrown when Nylas API returns non-JSON error payload
- Enable Nylas API v2.5 support
- Circular dependency issue in
Attribute SchedulerBookingOpeningHoursProperties.daysand add missing fields to Scheduler models
- Bump
node-fetchdependency from 2.6.1 to 2.6.7 - Bump
ajvsub-dependency from 6.10.2 to 6.12.6
- Support for returning multiple messages by a list of message IDs
- New field in
Draftfor adding files by file IDs - Webhook Notification models
- Improved
Deltasupport: addedDeltamodel and two new methods;sinceandlongpoll
- Virtual Calendar logic and serialization
- Support for
Eventto ICS commentandphoneNumberfields toEventParticipant- Support for
calendarfield in free-busy, availability, and consecutive availability queries
- Issue where properties of
Modeltype were sending read-only attributes to the API
- Introduction of interfaces that accompany models to improve experience when instantiating API models and provides better insight on "required" fields
- Several
Contactfields that took an object as a value now take a correspondingContactsubclass type - New
FreeBusytype forCalendarRestfulModelCollection.freeBusy()return value - New
CalendarAvailabilitytype forCalendarRestfulModelCollection.availability()return value - New
CalendarConsecutiveAvailabilitytype forCalendarRestfulModelCollection.consecutiveAvailability()return value - New
AuthorizationCodetype forConnect.authorize()return value - New
AccessTokentype forNylas.exchangeCodeForToken()return value - New
ApplicationDetailtype forNylas.application()return and parameter types - Lots of new models are introduced, almost all API objects are represented as a model in the SDK now
- Introduction of
Enumtypes
- BREAKING: Refactored
RestfulModelandRestfulModelCollection, introducedModelandModelCollectionsuperclass for models that do not directly interact with the Nylas API - BREAKING: Applied missing variable and return types, and applied stricter typing to improve deserialization and to adhere Typescript best practice
- BREAKING:
Event.whenis now ofWhentype - BREAKING: All
Eventfields for participants are now ofEventParticipanttype - BREAKING:
NeuralMessageOptionsis now aModelclass instead of an interface type - BREAKING:
CalendarRestfulModelCollection.freeBusy()now returns a (new)FreeBusytype instead of a JSON - BREAKING:
CalendarRestfulModelCollection.availability()now returns a (new)CalendarAvailabilitytype instead of a JSON - BREAKING:
CalendarRestfulModelCollection.consecutiveAvailability()now returns a (new)CalendarConsecutiveAvailabilitytype instead of a JSON - BREAKING:
Connect.authorize()now takes in a parameter ofVirtualCalendarProperties | NativeAuthenticationPropertiestype (new) instead of an object and returnsAuthorizationCodetype (new) instead of a JSON - BREAKING:
Connect.token()now returns anAccounttype instead of a JSON - BREAKING:
Contact,EventConferencing, andFolderare now default exports - BREAKING:
Nylashas stricter parameters and introduction of defined return types - BREAKING:
Nylas.exchangeCodeForToken()now returns anAccessTokentype that's a representation of the full API response as opposed to just the access token string - BREAKING:
Nylas.application()takesApplicationDetailPropertiestype and returns anApplicationDetailtype
- BREAKING:
RestfulModelCollection.build()as it does not allow for proper property and type hinting in favor of instantiating vianew Model() - BREAKING:
Connect.newAccount()as it had no functionality - BREAKING:
File.metadata()as it doesn't appear any different than making aNylasConnection.files().find()call
- Prevent
Eventobjects from sending an empty list of notifications when not set, causing errors for recurring events
- Missing
provideroption forurlForAuthentication - Job status improvements
- Scheduler and Component types
- Component sending unmodifiable fields during update
- Bug where updating an event resulted in an API error
- Bug where booking a valid timeslot resulted in an API error
- Support for Event notifications
- Support for remaining Scheduler endpoints
- Metadata support for
Calendar,MessageandManagementAccount
- Component CRUD Support
- Scheduler support
- Support for consecutive availability
- Issue where JSON.stringify would omit read-only values
- Webhook example throwing error if body is not a raw body
- Readonly calendar attributes being sent for POST and PUT calls
- Missing fields for recurring events
- Support for conferencing
- Minor issues with Neural API implementation
- Not rejecting uncaught errors during requests
- Support for
/calendars/availabilityendpoint - Support for the Neural API
- Linting, enabled and set up eslint and prettier
- Jest test cases not respecting async methods
- Issue with parsing raw MIME emails
- Tracking object not being added to a pre-existing
draftobject undefinedresponse when downloading file
requestdependency and related import statements
- Custom error class
NylasApiErrorto add more error details returned from the API - Support for read only fields
- Enable Nylas API v2.2 support
- Replaced deprecated
requestlibrary withnode-fetch
- Bug where saving a
draftobject with an undefinedfilesIdswould throw an error - Typings for classes that extend
RestfulModelCollectionorRestfulModelInstance
metadatafield in the Event model to support new Event metadata feature- Support for filtering
metadatausingmetadata_key,metadata_value, andmetadata_pair
- Updated dependencies
lodash,y18n, andpugto the latest stable version
- Pass error message from the API to the SDK user
- Migrate
deltastreaming tonode-fetch - Migrate
exchangeCodeForTokentonode-fetch
- Typing fixes to
nylas.draftsand otherRestfulModelCollections
- Update readme with syntax highlighting
- Drop async dependency for smaller package fingerprint. Async is replaced with promises
- Circular dependency in
nylas-connection.ts
JobStatusmodel and collection
- Refactor parameter ordering in
find()anddraft.send()methods [backwards compatible]
- Bug where setting
event.startandevent.enddid not setevent.whenifevent.whendidn't exist
- Implement support for GET /contacts/groups
- Support GET /resources
- Support POST, PUT and DELETE for calendars, and add location, timezone and isPrimary attributes
objectattribute toevent.whenobject
- Update lodash import
- Support recurring events
- Implement list & update application details endpoints
- Support free-busy endpoint on Calendars collection
- Bug which was overwriting properties on message objects
- BREAKING: Officially support minimum Node 16
- BREAKING:
appIdandappSecret. Please useclientIdandclientSecret - BREAKING:
Thread.folder. Please useThread.folders
- Migrate to Typescript
- Update
exchangeCodeForTokento reject when noaccess_tokenis returned - Unhandled error when response is undefined
- Get contact picture request to correctly use callback, if provided
- iCalUID attribute to Event model
- Allow file streaming uploads
- Update SUPPORTED_API_VERSION to 2.1
- Update Thread.folder to use Folder model, and rename to Thread.folders
- Update Thread participants to use EmailParticipant
- Remove error handling in /connect models
- Bump handlebars version
- Support for
/connect/tokenendpoint
- Events so that they support all time subojects
- Support for
/connect/authorizeendpoint - Improvements to example/webhooks
- Update formatting for DeprecationWarnings
- Update package-lock.json
- Draft deletion bug
- Support for
/token-infoendpoint - Webhooks CRUD functionality
- Update app id and app secret to client id and client secret
- contentDisposition to File
- emailAddress to ManagementAccount
- provider to ManagementAccount
groupsandsourceto contact attributes
- Update dependancies
- Contact birthday type from date to string
emailAddressesattribute in Contact model
- billingState to Account model
- Update webhooks example code
- Error to string reassignment bug
- Enable link tracking
- Support for
/ip_addressesendpoint
- Support for
revoke-allendpoint
- X-Nylas-Client-Id header for HTTP requests
- Replace Underscore with lodash
- Replace Bluebird promises with native promises
- Upgrade all other dependencies and devDependencies to latest versions
- Reduce package size by only including
libdirectory
- Drop unnecessary dependencies: express-session, clone
- Status code to error to allow it to bubble up from API request errors
- Improvements to example/sample-app
- linkedAt to the account model
- Move version mismatch warning to only print if both API and SDK versions are present. This will decrease unhelpful spamming
- Parse response into JSON if it is a string
- Support for new contact fields and functionality
- Bump supported Nylas API version to 2.0
- Variable for supported version of Nylas API - set to
1.0and will be updated when the SDK supports later versions of the API - Warnings when the version of the API that the SDK supports differs from the version of the API that the application is using
- ESLint and Prettier for linting
search()for messages and threadsupgrade()anddowngrade()for account managementgetRaw()for retrieving raw messages
- BREAKING: Converted Coffeescript to ES6
- BREAKING: Updated test framework from Jasmine 1.0 to Jest
- BREAKING: Changed Travis to run Node 8 and lint, build, and test code in CI
- BREAKING: Updated docs and example code
- BREAKING: Changed API for sending raw messages to use
draft.send()instead ofMessage.sendRaw() - BREAKING: Changed models for
Contact,Draft,Event,File,Folder,Message, andThreadto accurately reflect the attribute that the API returns - BREAKING: Return
Messageobject instead ofDraftobject after send - BREAKING: Privatized
_range(),_getModel(), and_getModelCollection()(not documented) - Changed
list()to override defaultoffsetwith user's - Return headers correctly for
expandedview forMessageobjects - Return sending failures for partial sends
- Return server errors for SMTP exceptions on send
- BREAKING:
draftattribute onMessageandDraftobjects, since the object type is already distinguished - BREAKING: Support for
Tagobjects, which has been deprecated, and instance methods onThreadforTagchanges - BREAKING: Support for
generateCursor(), which has been deprecated - BREAKING: Support for the
trialoption for auth, which has been deprecated
- Status to event model
- Emit
DeltaStreamretry status as an event
- No longer throw an error after successful calls to
Message.sendRaw() - Don't require secret for
urlForAuthentication(), allowing client-side usage without leaking or faking the app secret - Catch rejected promises in some missing cases
- Don't
console.log(), ever (callers should instrument desired logging) - Missing fields and typos in message and thread models
- Support for
view=expandedoption. Now all methods on that hit the API can take querystring params as objects. Additionally, you can pass in{expanded: true}for convenience
- BREAKING:
DeltaStreamnow also supportsview=expanded,exclude_types, andinclude_types, as well as any arbitrary query string param.Delta::startStreamnow takes an object as a second argument for query string params, instead of anexclude_typesarray