nylas 6.2.0-canary.0 → 6.2.0

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.
@@ -12,9 +12,11 @@ export default class Draft extends Message implements DraftProperties {
12
12
  rawMime?: string;
13
13
  replyToMessageId?: string;
14
14
  version?: number;
15
+ fileIdsToAttach?: string[];
15
16
  static collectionName: string;
16
17
  static attributes: Record<string, Attribute>;
17
18
  constructor(connection: NylasConnection, props?: DraftProperties);
19
+ fileIds(): (string | undefined)[];
18
20
  toJSON(enforceReadOnly?: boolean): Record<string, any>;
19
21
  save(params?: {} | SaveCallback, callback?: SaveCallback): Promise<this>;
20
22
  saveRequestBody(): Record<string, unknown>;
@@ -36,12 +36,19 @@ var Draft = /** @class */ (function (_super) {
36
36
  _this.initAttributes(props);
37
37
  return _this;
38
38
  }
39
+ Draft.prototype.fileIds = function () {
40
+ var fileIds = _super.prototype.fileIds.call(this);
41
+ if (this.fileIdsToAttach) {
42
+ fileIds = Array.from(new Set(fileIds.concat(this.fileIdsToAttach)));
43
+ }
44
+ return fileIds;
45
+ };
39
46
  Draft.prototype.toJSON = function (enforceReadOnly) {
40
47
  if (this.rawMime) {
41
48
  throw Error('toJSON() cannot be called for raw MIME drafts');
42
49
  }
43
50
  var json = _super.prototype.toJSON.call(this, enforceReadOnly);
44
- json.file_ids = _super.prototype.fileIds.call(this);
51
+ json.file_ids = this.fileIds();
45
52
  return json;
46
53
  };
47
54
  Draft.prototype.save = function (params, callback) {
@@ -0,0 +1,20 @@
1
+ import RestfulModelCollection from './restful-model-collection';
2
+ import Message from './message';
3
+ import NylasConnection from '../nylas-connection';
4
+ export default class MessageRestfulModelCollection extends RestfulModelCollection<Message> {
5
+ connection: NylasConnection;
6
+ modelClass: typeof Message;
7
+ constructor(connection: NylasConnection);
8
+ /**
9
+ * Return Multiple Messages by a list of Message IDs.
10
+ * @param messageIds The list of message ids to find.
11
+ * @param options Additional options including: view, offset, limit, and callback
12
+ * @returns The list of messages.
13
+ */
14
+ findMultiple(messageIds: string[], options?: {
15
+ view?: string;
16
+ offset?: number;
17
+ limit?: number;
18
+ callback?: (error: Error | null, results?: Message[]) => void;
19
+ }): Promise<Message[]>;
20
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ var __assign = (this && this.__assign) || function () {
16
+ __assign = Object.assign || function(t) {
17
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
18
+ s = arguments[i];
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
+ t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
26
+ var __importDefault = (this && this.__importDefault) || function (mod) {
27
+ return (mod && mod.__esModule) ? mod : { "default": mod };
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ var restful_model_collection_1 = __importDefault(require("./restful-model-collection"));
31
+ var message_1 = __importDefault(require("./message"));
32
+ var MessageRestfulModelCollection = /** @class */ (function (_super) {
33
+ __extends(MessageRestfulModelCollection, _super);
34
+ function MessageRestfulModelCollection(connection) {
35
+ var _this = _super.call(this, message_1.default, connection) || this;
36
+ _this.connection = connection;
37
+ _this.modelClass = message_1.default;
38
+ return _this;
39
+ }
40
+ /**
41
+ * Return Multiple Messages by a list of Message IDs.
42
+ * @param messageIds The list of message ids to find.
43
+ * @param options Additional options including: view, offset, limit, and callback
44
+ * @returns The list of messages.
45
+ */
46
+ MessageRestfulModelCollection.prototype.findMultiple = function (messageIds, options) {
47
+ if (options && options.view) {
48
+ // view is a parameter, so move it into a params object
49
+ options.params = {
50
+ view: options.view,
51
+ };
52
+ delete options.view;
53
+ }
54
+ return this.range(__assign({ path: this.path() + "/" + messageIds.join() }, options));
55
+ };
56
+ return MessageRestfulModelCollection;
57
+ }(restful_model_collection_1.default));
58
+ exports.default = MessageRestfulModelCollection;
@@ -0,0 +1,108 @@
1
+ import Model from './model';
2
+ import { Attribute } from './attributes';
3
+ export declare type LinkClickProperties = {
4
+ id: number;
5
+ ip: string;
6
+ userAgent: string;
7
+ timestamp: Date;
8
+ linkIndex?: number;
9
+ };
10
+ export declare class LinkClick extends Model implements LinkClickProperties {
11
+ id: number;
12
+ ip: string;
13
+ userAgent: string;
14
+ timestamp: Date;
15
+ linkIndex?: number;
16
+ static attributes: Record<string, Attribute>;
17
+ constructor(props?: LinkClickCountProperties);
18
+ }
19
+ export declare type LinkClickCountProperties = {
20
+ url: string;
21
+ count: number;
22
+ };
23
+ export declare class LinkClickCount extends Model implements LinkClickCountProperties {
24
+ url: string;
25
+ count: number;
26
+ static attributes: Record<string, Attribute>;
27
+ constructor(props?: LinkClickCountProperties);
28
+ }
29
+ export declare type MessageTrackingDataProperties = {
30
+ messageId: string;
31
+ payload: string;
32
+ senderAppId: number;
33
+ threadId?: string;
34
+ replyToMessageId?: string;
35
+ timestamp?: Date;
36
+ count?: number;
37
+ fromSelf?: boolean;
38
+ recents?: LinkClickProperties[];
39
+ linkData?: LinkClickCountProperties[];
40
+ };
41
+ export declare class MessageTrackingData extends Model implements MessageTrackingDataProperties {
42
+ messageId: string;
43
+ payload: string;
44
+ senderAppId: number;
45
+ replyToMessageId?: string;
46
+ timestamp?: Date;
47
+ threadId?: string;
48
+ fromSelf?: boolean;
49
+ count?: number;
50
+ linkData?: LinkClickCount[];
51
+ recents?: LinkClick[];
52
+ static attributes: Record<string, Attribute>;
53
+ constructor(props?: MessageTrackingDataProperties);
54
+ }
55
+ export declare type WebhookObjectAttributesProperties = {
56
+ action?: string;
57
+ jobStatusId?: string;
58
+ threadId?: string;
59
+ receivedDate?: Date;
60
+ };
61
+ export declare class WebhookObjectAttributes extends Model implements WebhookObjectAttributesProperties {
62
+ action?: string;
63
+ jobStatusId?: string;
64
+ threadId?: string;
65
+ receivedDate?: Date;
66
+ static attributes: Record<string, Attribute>;
67
+ constructor(props?: WebhookObjectAttributesProperties);
68
+ }
69
+ export declare type WebhookObjectDataProperties = {
70
+ id: string;
71
+ accountId: string;
72
+ namespaceId: string;
73
+ object: string;
74
+ metadata?: MessageTrackingDataProperties;
75
+ objectAttributes?: WebhookObjectAttributesProperties;
76
+ };
77
+ export declare class WebhookObjectData extends Model implements WebhookObjectDataProperties {
78
+ id: string;
79
+ accountId: string;
80
+ namespaceId: string;
81
+ object: string;
82
+ metadata?: MessageTrackingData;
83
+ objectAttributes?: WebhookObjectAttributes;
84
+ static attributes: Record<string, Attribute>;
85
+ constructor(props?: WebhookObjectDataProperties);
86
+ }
87
+ export declare type WebhookDeltaProperties = {
88
+ object: string;
89
+ type: string;
90
+ date: Date;
91
+ objectData: WebhookObjectDataProperties;
92
+ };
93
+ export declare class WebhookDelta extends Model implements WebhookDeltaProperties {
94
+ date: Date;
95
+ object: string;
96
+ type: string;
97
+ objectData: WebhookObjectData;
98
+ static attributes: Record<string, Attribute>;
99
+ constructor(props?: WebhookDeltaProperties);
100
+ }
101
+ export declare type WebhookNotificationProperties = {
102
+ deltas: WebhookDeltaProperties[];
103
+ };
104
+ export default class WebhookNotification extends Model implements WebhookNotificationProperties {
105
+ deltas: WebhookDelta[];
106
+ static attributes: Record<string, Attribute>;
107
+ constructor(props?: WebhookNotificationProperties);
108
+ }
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ var model_1 = __importDefault(require("./model"));
20
+ var attributes_1 = __importDefault(require("./attributes"));
21
+ var LinkClick = /** @class */ (function (_super) {
22
+ __extends(LinkClick, _super);
23
+ function LinkClick(props) {
24
+ var _this = _super.call(this) || this;
25
+ _this.id = 0;
26
+ _this.ip = '';
27
+ _this.userAgent = '';
28
+ _this.timestamp = new Date();
29
+ _this.initAttributes(props);
30
+ return _this;
31
+ }
32
+ LinkClick.attributes = {
33
+ id: attributes_1.default.Number({
34
+ modelKey: 'id',
35
+ }),
36
+ ip: attributes_1.default.String({
37
+ modelKey: 'ip',
38
+ }),
39
+ userAgent: attributes_1.default.String({
40
+ modelKey: 'userAgent',
41
+ jsonKey: 'user_agent',
42
+ }),
43
+ timestamp: attributes_1.default.DateTime({
44
+ modelKey: 'timestamp',
45
+ }),
46
+ linkIndex: attributes_1.default.Number({
47
+ modelKey: 'linkIndex',
48
+ jsonKey: 'link_index',
49
+ }),
50
+ };
51
+ return LinkClick;
52
+ }(model_1.default));
53
+ exports.LinkClick = LinkClick;
54
+ var LinkClickCount = /** @class */ (function (_super) {
55
+ __extends(LinkClickCount, _super);
56
+ function LinkClickCount(props) {
57
+ var _this = _super.call(this) || this;
58
+ _this.url = '';
59
+ _this.count = 0;
60
+ _this.initAttributes(props);
61
+ return _this;
62
+ }
63
+ LinkClickCount.attributes = {
64
+ url: attributes_1.default.String({
65
+ modelKey: 'url',
66
+ }),
67
+ count: attributes_1.default.Number({
68
+ modelKey: 'count',
69
+ }),
70
+ };
71
+ return LinkClickCount;
72
+ }(model_1.default));
73
+ exports.LinkClickCount = LinkClickCount;
74
+ var MessageTrackingData = /** @class */ (function (_super) {
75
+ __extends(MessageTrackingData, _super);
76
+ function MessageTrackingData(props) {
77
+ var _this = _super.call(this) || this;
78
+ _this.messageId = '';
79
+ _this.payload = '';
80
+ _this.senderAppId = 0;
81
+ _this.initAttributes(props);
82
+ return _this;
83
+ }
84
+ MessageTrackingData.attributes = {
85
+ messageId: attributes_1.default.String({
86
+ modelKey: 'messageId',
87
+ jsonKey: 'message_id',
88
+ }),
89
+ payload: attributes_1.default.String({
90
+ modelKey: 'payload',
91
+ }),
92
+ senderAppId: attributes_1.default.Number({
93
+ modelKey: 'senderAppId',
94
+ jsonKey: 'sender_app_id',
95
+ }),
96
+ replyToMessageId: attributes_1.default.String({
97
+ modelKey: 'replyToMessageId',
98
+ jsonKey: 'reply_to_message_id',
99
+ }),
100
+ timestamp: attributes_1.default.DateTime({
101
+ modelKey: 'timestamp',
102
+ }),
103
+ threadId: attributes_1.default.String({
104
+ modelKey: 'threadId',
105
+ jsonKey: 'thread_id',
106
+ }),
107
+ fromSelf: attributes_1.default.Boolean({
108
+ modelKey: 'fromSelf',
109
+ jsonKey: 'from_self',
110
+ }),
111
+ count: attributes_1.default.Number({
112
+ modelKey: 'count',
113
+ }),
114
+ linkData: attributes_1.default.Collection({
115
+ modelKey: 'linkData',
116
+ jsonKey: 'link_data',
117
+ itemClass: LinkClickCount,
118
+ }),
119
+ recents: attributes_1.default.Collection({
120
+ modelKey: 'recents',
121
+ itemClass: LinkClick,
122
+ }),
123
+ };
124
+ return MessageTrackingData;
125
+ }(model_1.default));
126
+ exports.MessageTrackingData = MessageTrackingData;
127
+ var WebhookObjectAttributes = /** @class */ (function (_super) {
128
+ __extends(WebhookObjectAttributes, _super);
129
+ function WebhookObjectAttributes(props) {
130
+ var _this = _super.call(this) || this;
131
+ _this.initAttributes(props);
132
+ return _this;
133
+ }
134
+ WebhookObjectAttributes.attributes = {
135
+ action: attributes_1.default.String({
136
+ modelKey: 'action',
137
+ }),
138
+ jobStatusId: attributes_1.default.String({
139
+ modelKey: 'jobStatusId',
140
+ jsonKey: 'job_status_id',
141
+ }),
142
+ threadId: attributes_1.default.String({
143
+ modelKey: 'threadId',
144
+ jsonKey: 'thread_id',
145
+ }),
146
+ receivedDate: attributes_1.default.DateTime({
147
+ modelKey: 'receivedDate',
148
+ jsonKey: 'received_date',
149
+ }),
150
+ };
151
+ return WebhookObjectAttributes;
152
+ }(model_1.default));
153
+ exports.WebhookObjectAttributes = WebhookObjectAttributes;
154
+ var WebhookObjectData = /** @class */ (function (_super) {
155
+ __extends(WebhookObjectData, _super);
156
+ function WebhookObjectData(props) {
157
+ var _this = _super.call(this) || this;
158
+ _this.id = '';
159
+ _this.accountId = '';
160
+ _this.namespaceId = '';
161
+ _this.object = '';
162
+ _this.initAttributes(props);
163
+ return _this;
164
+ }
165
+ WebhookObjectData.attributes = {
166
+ id: attributes_1.default.String({
167
+ modelKey: 'id',
168
+ }),
169
+ accountId: attributes_1.default.String({
170
+ modelKey: 'accountId',
171
+ jsonKey: 'account_id',
172
+ }),
173
+ namespaceId: attributes_1.default.String({
174
+ modelKey: 'namespaceId',
175
+ jsonKey: 'namespace_id',
176
+ }),
177
+ object: attributes_1.default.String({
178
+ modelKey: 'object',
179
+ }),
180
+ metadata: attributes_1.default.Object({
181
+ modelKey: 'metadata',
182
+ itemClass: MessageTrackingData,
183
+ }),
184
+ objectAttributes: attributes_1.default.Object({
185
+ modelKey: 'objectAttributes',
186
+ jsonKey: 'attributes',
187
+ itemClass: WebhookObjectAttributes,
188
+ }),
189
+ };
190
+ return WebhookObjectData;
191
+ }(model_1.default));
192
+ exports.WebhookObjectData = WebhookObjectData;
193
+ var WebhookDelta = /** @class */ (function (_super) {
194
+ __extends(WebhookDelta, _super);
195
+ function WebhookDelta(props) {
196
+ var _this = _super.call(this) || this;
197
+ _this.date = new Date();
198
+ _this.object = '';
199
+ _this.type = '';
200
+ _this.objectData = new WebhookObjectData();
201
+ _this.initAttributes(props);
202
+ return _this;
203
+ }
204
+ WebhookDelta.attributes = {
205
+ date: attributes_1.default.DateTime({
206
+ modelKey: 'date',
207
+ }),
208
+ object: attributes_1.default.String({
209
+ modelKey: 'object',
210
+ }),
211
+ type: attributes_1.default.String({
212
+ modelKey: 'type',
213
+ }),
214
+ objectData: attributes_1.default.Object({
215
+ modelKey: 'objectData',
216
+ jsonKey: 'object_data',
217
+ itemClass: WebhookObjectData,
218
+ }),
219
+ };
220
+ return WebhookDelta;
221
+ }(model_1.default));
222
+ exports.WebhookDelta = WebhookDelta;
223
+ var WebhookNotification = /** @class */ (function (_super) {
224
+ __extends(WebhookNotification, _super);
225
+ function WebhookNotification(props) {
226
+ var _this = _super.call(this) || this;
227
+ _this.deltas = [];
228
+ _this.initAttributes(props);
229
+ return _this;
230
+ }
231
+ WebhookNotification.attributes = {
232
+ deltas: attributes_1.default.Collection({
233
+ modelKey: 'deltas',
234
+ itemClass: WebhookDelta,
235
+ }),
236
+ };
237
+ return WebhookNotification;
238
+ }(model_1.default));
239
+ exports.default = WebhookNotification;
@@ -2,6 +2,29 @@ import ManagementModel from './management-model';
2
2
  import { Attribute } from './attributes';
3
3
  import { SaveCallback } from './restful-model';
4
4
  import NylasConnection from '../nylas-connection';
5
+ export declare enum WebhookTriggers {
6
+ AccountConnected = "account.connected",
7
+ AccountRunning = "account.running",
8
+ AccountStopped = "account.stopped",
9
+ AccountInvalid = "account.invalid",
10
+ AccountSyncError = "account.sync_error",
11
+ MessageCreated = "message.created",
12
+ MessageOpened = "message.opened",
13
+ MessageUpdated = "message.updated",
14
+ MessageLinkClicked = "message.link_clicked",
15
+ ThreadReplied = "thread.replied",
16
+ ContactCreated = "contact.created",
17
+ ContactUpdated = "contact.updated",
18
+ ContactDeleted = "contact.deleted",
19
+ CalendarCreated = "calendar.created",
20
+ CalendarUpdated = "calendar.updated",
21
+ CalendarDeleted = "calendar.deleted",
22
+ EventCreated = "event.created",
23
+ EventUpdated = "event.updated",
24
+ EventDeleted = "event.deleted",
25
+ JobSuccessful = "job.successful",
26
+ JobFailed = "job.failed"
27
+ }
5
28
  export declare type WebhookProperties = {
6
29
  callbackUrl: string;
7
30
  state: string;
@@ -18,6 +18,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  var management_model_1 = __importDefault(require("./management-model"));
20
20
  var attributes_1 = __importDefault(require("./attributes"));
21
+ var WebhookTriggers;
22
+ (function (WebhookTriggers) {
23
+ WebhookTriggers["AccountConnected"] = "account.connected";
24
+ WebhookTriggers["AccountRunning"] = "account.running";
25
+ WebhookTriggers["AccountStopped"] = "account.stopped";
26
+ WebhookTriggers["AccountInvalid"] = "account.invalid";
27
+ WebhookTriggers["AccountSyncError"] = "account.sync_error";
28
+ WebhookTriggers["MessageCreated"] = "message.created";
29
+ WebhookTriggers["MessageOpened"] = "message.opened";
30
+ WebhookTriggers["MessageUpdated"] = "message.updated";
31
+ WebhookTriggers["MessageLinkClicked"] = "message.link_clicked";
32
+ WebhookTriggers["ThreadReplied"] = "thread.replied";
33
+ WebhookTriggers["ContactCreated"] = "contact.created";
34
+ WebhookTriggers["ContactUpdated"] = "contact.updated";
35
+ WebhookTriggers["ContactDeleted"] = "contact.deleted";
36
+ WebhookTriggers["CalendarCreated"] = "calendar.created";
37
+ WebhookTriggers["CalendarUpdated"] = "calendar.updated";
38
+ WebhookTriggers["CalendarDeleted"] = "calendar.deleted";
39
+ WebhookTriggers["EventCreated"] = "event.created";
40
+ WebhookTriggers["EventUpdated"] = "event.updated";
41
+ WebhookTriggers["EventDeleted"] = "event.deleted";
42
+ WebhookTriggers["JobSuccessful"] = "job.successful";
43
+ WebhookTriggers["JobFailed"] = "job.failed";
44
+ })(WebhookTriggers = exports.WebhookTriggers || (exports.WebhookTriggers = {}));
21
45
  var Webhook = /** @class */ (function (_super) {
22
46
  __extends(Webhook, _super);
23
47
  function Webhook(connection, clientId, props) {
@@ -7,7 +7,6 @@ import ContactRestfulModelCollection from './models/contact-restful-model-collec
7
7
  import RestfulModelInstance from './models/restful-model-instance';
8
8
  import Account from './models/account';
9
9
  import Thread from './models/thread';
10
- import Message from './models/message';
11
10
  import Draft from './models/draft';
12
11
  import File from './models/file';
13
12
  import Event from './models/event';
@@ -18,6 +17,7 @@ import { AppendOptions } from 'form-data';
18
17
  import Neural from './models/neural';
19
18
  import ComponentRestfulModelCollection from './models/component-restful-model-collection';
20
19
  import SchedulerRestfulModelCollection from './models/scheduler-restful-model-collection';
20
+ import MessageRestfulModelCollection from './models/message-restful-model-collection';
21
21
  import DeltaCollection from './models/delta-collection';
22
22
  export declare type RequestOptions = {
23
23
  path: string;
@@ -40,7 +40,7 @@ export default class NylasConnection {
40
40
  clientId: string | null | undefined;
41
41
  threads: RestfulModelCollection<Thread>;
42
42
  contacts: ContactRestfulModelCollection;
43
- messages: RestfulModelCollection<Message>;
43
+ messages: MessageRestfulModelCollection;
44
44
  drafts: RestfulModelCollection<Draft>;
45
45
  files: RestfulModelCollection<File>;
46
46
  calendars: CalendarRestfulModelCollection;
@@ -31,7 +31,6 @@ var contact_restful_model_collection_1 = __importDefault(require("./models/conta
31
31
  var restful_model_instance_1 = __importDefault(require("./models/restful-model-instance"));
32
32
  var account_1 = __importDefault(require("./models/account"));
33
33
  var thread_1 = __importDefault(require("./models/thread"));
34
- var message_1 = __importDefault(require("./models/message"));
35
34
  var draft_1 = __importDefault(require("./models/draft"));
36
35
  var file_1 = __importDefault(require("./models/file"));
37
36
  var event_1 = __importDefault(require("./models/event"));
@@ -43,6 +42,7 @@ var neural_1 = __importDefault(require("./models/neural"));
43
42
  var nylas_api_error_1 = __importDefault(require("./models/nylas-api-error"));
44
43
  var component_restful_model_collection_1 = __importDefault(require("./models/component-restful-model-collection"));
45
44
  var scheduler_restful_model_collection_1 = __importDefault(require("./models/scheduler-restful-model-collection"));
45
+ var message_restful_model_collection_1 = __importDefault(require("./models/message-restful-model-collection"));
46
46
  var delta_collection_1 = __importDefault(require("./models/delta-collection"));
47
47
  var PACKAGE_JSON = require('../package.json');
48
48
  var SDK_VERSION = PACKAGE_JSON.version;
@@ -52,7 +52,7 @@ var NylasConnection = /** @class */ (function () {
52
52
  var clientId = _a.clientId;
53
53
  this.threads = new restful_model_collection_1.default(thread_1.default, this);
54
54
  this.contacts = new contact_restful_model_collection_1.default(this);
55
- this.messages = new restful_model_collection_1.default(message_1.default, this);
55
+ this.messages = new message_restful_model_collection_1.default(this);
56
56
  this.drafts = new restful_model_collection_1.default(draft_1.default, this);
57
57
  this.files = new restful_model_collection_1.default(file_1.default, this);
58
58
  this.calendars = new calendar_restful_model_collection_1.default(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "6.2.0-canary.0",
3
+ "version": "6.2.0",
4
4
  "description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.",
5
5
  "main": "lib/nylas.js",
6
6
  "types": "lib/nylas.d.ts",