nylas 6.4.1 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/models/event.d.ts +1 -0
- package/lib/models/event.js +3 -0
- package/lib/models/message.d.ts +2 -1
- package/lib/models/message.js +8 -0
- package/package.json +1 -1
package/lib/models/event.d.ts
CHANGED
package/lib/models/event.js
CHANGED
|
@@ -258,6 +258,9 @@ var Event = /** @class */ (function (_super) {
|
|
|
258
258
|
}), conferencing: attributes_1.default.Object({
|
|
259
259
|
modelKey: 'conferencing',
|
|
260
260
|
itemClass: event_conferencing_1.default,
|
|
261
|
+
}), reminderMinutes: attributes_1.default.String({
|
|
262
|
+
modelKey: 'reminderMinutes',
|
|
263
|
+
jsonKey: 'reminder_minutes',
|
|
261
264
|
}), notifications: attributes_1.default.Collection({
|
|
262
265
|
modelKey: 'notifications',
|
|
263
266
|
itemClass: event_notification_1.default,
|
package/lib/models/message.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import RestfulModel from './restful-model';
|
|
1
|
+
import RestfulModel, { SaveCallback } from './restful-model';
|
|
2
2
|
import { Attribute } from './attributes';
|
|
3
3
|
import File, { FileProperties } from './file';
|
|
4
4
|
import Event, { EventProperties } from './event';
|
|
@@ -53,4 +53,5 @@ export default class Message extends RestfulModel implements MessageProperties {
|
|
|
53
53
|
fileIds(): (string | undefined)[];
|
|
54
54
|
getRaw(): Promise<string>;
|
|
55
55
|
saveRequestBody(): Record<string, unknown>;
|
|
56
|
+
save(params?: {} | SaveCallback, callback?: SaveCallback): Promise<this>;
|
|
56
57
|
}
|
package/lib/models/message.js
CHANGED
|
@@ -106,6 +106,14 @@ var Message = /** @class */ (function (_super) {
|
|
|
106
106
|
json['metadata'] = this.metadata;
|
|
107
107
|
return json;
|
|
108
108
|
};
|
|
109
|
+
Message.prototype.save = function (params, callback) {
|
|
110
|
+
if (params === void 0) { params = {}; }
|
|
111
|
+
// A Message can only be updated
|
|
112
|
+
if (this.constructor.name === 'Message' && !this.id) {
|
|
113
|
+
throw new Error('Cannot create a message. Please create and send a draft instead.');
|
|
114
|
+
}
|
|
115
|
+
return _super.prototype.save.call(this, params, callback);
|
|
116
|
+
};
|
|
109
117
|
Message.collectionName = 'messages';
|
|
110
118
|
Message.attributes = __assign(__assign({}, restful_model_1.default.attributes), { subject: attributes_1.default.String({
|
|
111
119
|
modelKey: 'subject',
|