Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nylas

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nylas - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

lib/models/calendar-restful-model-collection.d.ts

6

CHANGELOG.md
# Changelog
### 5.1.0 / 2020-06-04
* Fix bug which was overwriting properties on message objects.
* Support recurring events.
* Implement list & update application details endpoints.
* Support free-busy endpoint on Calendars collection.
### 5.0.0 / 2020-05-07

@@ -4,0 +10,0 @@

4

lib/models/event.d.ts

@@ -24,2 +24,6 @@ import RestfulModel, { SaveCallback } from './restful-model';

status?: string;
recurrence?: {
rrule: string[];
timezone: string;
};
get start(): string | number | undefined;

@@ -26,0 +30,0 @@ set start(val: string | number | undefined);

@@ -182,2 +182,4 @@ "use strict";

modelKey: 'status',
}), recurrence: attributes_1.default.Object({
modelKey: 'recurrence',
}) });

8

lib/models/message.js

@@ -41,9 +41,3 @@ "use strict";

function Message() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.subject = '';
_this.to = [];
_this.cc = [];
_this.bcc = [];
_this.body = '';
return _this;
return _super !== null && _super.apply(this, arguments) || this;
}

@@ -50,0 +44,0 @@ // We calculate the list of participants instead of grabbing it from

import request from 'request';
import RestfulModel from './models/restful-model';
import RestfulModelCollection from './models/restful-model-collection';
import CalendarRestfulModelCollection from './models/calendar-restful-model-collection';
import RestfulModelInstance from './models/restful-model-instance';

@@ -14,3 +15,3 @@ import Delta from './models/delta';

files: RestfulModelCollection<RestfulModel>;
calendars: RestfulModelCollection<RestfulModel>;
calendars: CalendarRestfulModelCollection<unknown>;
events: RestfulModelCollection<RestfulModel>;

@@ -17,0 +18,0 @@ deltas: Delta;

@@ -9,2 +9,3 @@ "use strict";

var restful_model_collection_1 = __importDefault(require("./models/restful-model-collection"));
var calendar_restful_model_collection_1 = __importDefault(require("./models/calendar-restful-model-collection"));
var restful_model_instance_1 = __importDefault(require("./models/restful-model-instance"));

@@ -17,3 +18,2 @@ var account_1 = __importDefault(require("./models/account"));

var file_1 = __importDefault(require("./models/file"));
var calendar_1 = __importDefault(require("./models/calendar"));
var event_1 = __importDefault(require("./models/event"));

@@ -33,3 +33,3 @@ var delta_1 = __importDefault(require("./models/delta"));

this.files = new restful_model_collection_1.default(file_1.default, this);
this.calendars = new restful_model_collection_1.default(calendar_1.default, this);
this.calendars = new calendar_restful_model_collection_1.default(this);
this.events = new restful_model_collection_1.default(event_1.default, this);

@@ -36,0 +36,0 @@ this.deltas = new delta_1.default(this);

@@ -24,2 +24,8 @@ import NylasConnection from './nylas-connection';

static with(accessToken: string): NylasConnection;
static application(options?: {
application_name?: string;
redirect_uris?: string[];
applicationName?: string;
redirectUris?: string[];
}): Promise<any>;
static exchangeCodeForToken(code: string, callback?: (error: Error | null, accessToken?: string) => void): Promise<string>;

@@ -26,0 +32,0 @@ static urlForAuthentication(options?: {

@@ -55,2 +55,20 @@ "use strict";

};
Nylas.application = function (options) {
if (!this.clientId) {
throw new Error('This function requires a clientId');
}
if (!this.clientSecret) {
throw new Error('This function requires a clientSecret');
}
var connection = new nylas_connection_1.default(null, { clientId: this.clientId });
var requestOptions = { path: "/a/" + this.clientId };
if (options) {
requestOptions.body = {
application_name: options.applicationName || options.application_name,
redirect_uris: options.redirectUris || options.redirect_uris
};
requestOptions.method = 'PUT';
}
return connection.request(requestOptions);
};
Nylas.exchangeCodeForToken = function (code, callback) {

@@ -57,0 +75,0 @@ var _this = this;

{
"name": "nylas",
"version": "5.0.0",
"version": "5.1.0",
"description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.",

@@ -5,0 +5,0 @@ "main": "lib/nylas.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc