Comparing version 5.0.0 to 5.1.0
# 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 @@ |
@@ -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', | ||
}) }); |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
143839
52
3505
0