Skip to content

Releases: nylas/nylas-java

v2.2.0

27 Feb 23:14
baa8d8a

Choose a tag to compare

Changelog

Added

  • Added support for roundTo field in availability response (#215)
  • Added support for attributes field in folder model (#215)
  • Added support for icloud as an auth provider (#215)

Changed

  • Fixed builder for FindAttachmentQueryParams (#208)
  • Fixed scopes to be optional for IMAP grants (#210)
  • Fixed typo in updating grant schema (#211)
  • Fixed endpoint for rotating webhook secrets (#212)
  • Fixed response type for returning webhook IP addresses (#213)

Removed

  • Removed unnecessary clientId from detectProvider params (#215)

v2.1.0

12 Feb 21:05
7f87707

Choose a tag to compare

The first release adds support for a new endpoint and updates to some models.

Changelog

Added

  • Add support for getting OAuth token info (#205)

Changed

  • Fix schema issues in the Event, Message, Draft, and CodeExchangeResponse models (#203, #204, #205)

v2.0.0

09 Feb 14:38
9bc4b02

Choose a tag to compare

The Nylas SDK for Kotlin & Java v2.0.0 is out of beta now Generally Available! This SDK sees a number of changes, including breaking changes, and more importantly brings full support of the new Nylas API v3 as well as full Kotlin support.

Changelog

Breaking changes

  • Renamed artifact from nylas-java-sdk to nylas.
  • Nylas SDK v2 supports the Nylas API v3 exclusively, dropping support for any endpoints that are not available in v3. See API v3 Features and Changes for more information.
  • Removed all REST calls from models and moved them directly into resources.

Added

  • Full Kotlin support.
  • Created models for all API resources and endpoints, for all HTTP methods to reduce confusion on which fields are available for each endpoint.
  • Created error classes for the different API errors as well as SDK-specific errors.

Updated

  • Now using Moshi annotations for JSON serialization/deserialization as opposed to manually writing JSON maps.
  • Removed all REST calls from models and moved them directly into resources.

Removed

  • Non-builder ways for initializing NylasClient.
  • Local Webhook development support is removed due to incompatibility with the new API version.

Docs and References

Please refer to the README.md for a quick description and getting started guide with the new SDK. Furthermore, we have an UPGRADE.md for instructions on upgrading from v1.x to v2.x, as well as a reference guide for the Kotlin & Java SDK.

v1.22.0

29 Jan 20:59

Choose a tag to compare

This release of the Nylas Java SDK comes with new features.

Release Notes

Added

  • Added support for querying events using customer event ID (#153)
  • Added support for overriding the Event ID when updating, for recurring events (#186)
  • Added support for reply_to_message_id field in Message (#194)

v1.21.0

14 Feb 17:37

Choose a tag to compare

This release of the Nylas Java SDK comes with new features and a fix.

Release Notes

Added

  • Added missing content_disposition field in File (#149)
  • Added toJSON() and toMap() support to account owned models (#150)
  • Added scheduler support for the EU region (#151)

Fixed

  • Fixed NullPointerException sporadically occurring when calling Message.toString() (#149)

Usage

toJSON() and toMap()

public class NylasExample {
  public static void main(String[] args) throws Exception {
    NylasClient client = new NylasClient();
    NylasApplication application = client.application("CLIENT_ID", "CLIENT_SECRET");
    Event event = application.events().get("EVENT_ID");

    // Convert Event to JSON
    String eventJSON = event.toJSON();

    // Convert Event to Map
    Map<String, Event> eventMap = event.toMap();
  }
}

EU Scheduler

public class NylasExample {
  public static void main(String[] args) throws Exception {
    // Setup Nylas client, defaulting to US region
    NylasClient client = new NylasClient();
    NylasApplication application = client.account("ACESS_TOKEN");
    Schedulers usScheduler = application.schedulers(); // Scheduler URL pointing to https://api.schedule.nylas.com/

    // Setup Nylas client for the EU region
    NylasClient euClient = new NylasClient.Builder()
        .baseUrl(NylasClient.EU_BASE_URL)
        .build();
    NylasApplication euApplication = euClient.account("ACESS_TOKEN");
    Schedulers euScheduler = euApplication.schedulers(); // Scheduler URL pointing to https://ireland.api.schedule.nylas.com/
  }
}

v1.20.1

09 Feb 19:41

Choose a tag to compare

This release of the Nylas Java SDK comes with a few changes/fixes regarding the local webhook implementation.

Changed

  • Provide default implementations for WebhookHandler methods onOpen, onClose, and onError (#147)

Fixed

  • Fix Tunnel.onMessage not emitting individual deltas (#147)
  • Change java-websocket dependency to api configuration (#147)

v1.20.0

06 Feb 23:47

Choose a tag to compare

This release of the Nylas Java SDK includes a couple of changes, most notably the release of local webhook development support built directly into the SDK. When implementing this feature in your app, the SDK will create a tunnel connection to a websocket server and registers it as a webhook callback to your Nylas account. See below for a usage example.

Release Notes

Added

  • Added local webhook testing support (#145)
  • Added new enums for Webhook.Triggers and Webhook.State (#145)

Usage

Webhook Tunnel

During the setup process you can pass in a class that implements WebhookTunnel.WebhookHandler with methods to override the websocket client's callback methods. The most important method is the onMessage method which returns a parsed delta event from the webhook server.

public class NylasWebhook {
  public static void main(String[] args) throws Exception {
    ExampleConf conf = new ExampleConf();
    NylasClient client = new NylasClient();
    NylasApplication application = client.application("CLIENT_ID", "CLIENT_SECRET");

    Tunnel webhookTunnel = new Tunnel.Builder(application, new HandleNotifications()).build();
    webhookTunnel.connect();
  }
}

class HandleNotifications implements Tunnel.WebhookHandler {
  private static final Logger log = LogManager.getLogger(HandleNotifications.class);

  @Override
  public void onOpen(short httpStatusCode) {
    log.info("OnOpen");
  }

  @Override
  public void onClose(int code, String reason, boolean remote) {
    log.info("onClose");
  }

  @Override
  public void onMessage(Notification notification) {
    log.info("onMessage");
  }

  @Override
  public void onError(Exception ex) {
    log.info("onError");
  }
}

v1.19.2

24 Jan 23:09

Choose a tag to compare

This release of the Nylas Java SDK comes with a few fixes.

Release Notes

Fixed

  • Fix Event.hide_participants not serializing (#143)
  • Fix Event.visibility not serializing (#143)
  • Fix FreeBusy not having a calendar_id field (#143)

v1.19.1

18 Jan 14:45

Choose a tag to compare

This release of the Nylas Java SDK comes with a couple of changes.

Release Notes

Changed

  • Added missing setters for FreeBusy (#140)

Fixed

  • Fixed typo in Event.hide_participants (#140)

v1.19.0

18 Nov 23:20

Choose a tag to compare

This release of the Nylas Java SDK comes with new features, changes, and fixes.

Release Notes

Added

  • Added support for calendar colors (for Microsoft calendars) (#107)
  • Added support for rate limit errors (#112)

Changed

  • Set Content-Type and Accept headers on outgoing calls (#113)

Fixed

  • Fixed revoke access token always throwing an error (#111)
  • Fixed participant status not serializing on Event creation (#124)