nylas 6.10.0 → 7.0.0-beta.1
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/README.md +26 -14
- package/lib/cjs/apiClient.js +115 -0
- package/lib/cjs/config.js +32 -0
- package/lib/cjs/models/applicationDetails.js +2 -0
- package/lib/cjs/models/auth.js +2 -0
- package/lib/cjs/models/availability.js +11 -0
- package/lib/cjs/models/calendars.js +2 -0
- package/lib/cjs/models/error.js +53 -0
- package/lib/cjs/models/events.js +2 -0
- package/lib/cjs/models/grants.js +2 -0
- package/lib/cjs/models/listQueryParams.js +2 -0
- package/lib/cjs/models/redirectUri.js +2 -0
- package/lib/cjs/models/response.js +2 -0
- package/lib/cjs/models/webhooks.js +18 -0
- package/lib/cjs/nylas.js +34 -0
- package/lib/cjs/resources/applications.js +30 -0
- package/lib/cjs/resources/auth.js +153 -0
- package/lib/cjs/resources/calendars.js +78 -0
- package/lib/cjs/resources/events.js +69 -0
- package/lib/cjs/resources/grants.js +65 -0
- package/lib/cjs/resources/redirectUris.js +64 -0
- package/lib/cjs/resources/resource.js +111 -0
- package/lib/cjs/resources/webhooks.js +98 -0
- package/lib/cjs/utils.js +58 -0
- package/lib/esm/apiClient.js +112 -0
- package/lib/esm/config.js +29 -0
- package/lib/esm/models/applicationDetails.js +1 -0
- package/lib/esm/models/auth.js +1 -0
- package/lib/esm/models/availability.js +8 -0
- package/lib/esm/models/calendars.js +1 -0
- package/lib/esm/models/error.js +45 -0
- package/lib/esm/models/events.js +1 -0
- package/lib/esm/models/grants.js +1 -0
- package/lib/esm/models/listQueryParams.js +1 -0
- package/lib/esm/models/redirectUri.js +1 -0
- package/lib/esm/models/response.js +1 -0
- package/lib/esm/models/webhooks.js +15 -0
- package/lib/esm/nylas.js +31 -0
- package/lib/esm/resources/applications.js +26 -0
- package/lib/esm/resources/auth.js +149 -0
- package/lib/esm/resources/calendars.js +74 -0
- package/lib/esm/resources/events.js +65 -0
- package/lib/esm/resources/grants.js +61 -0
- package/lib/esm/resources/redirectUris.js +60 -0
- package/lib/esm/resources/resource.js +107 -0
- package/lib/esm/resources/webhooks.js +94 -0
- package/lib/esm/utils.js +53 -0
- package/lib/types/apiClient.d.ts +65 -0
- package/lib/types/config.d.ts +50 -0
- package/lib/types/models/applicationDetails.d.ts +93 -0
- package/lib/types/models/auth.d.ts +196 -0
- package/lib/types/models/availability.d.ts +159 -0
- package/lib/types/models/calendars.d.ts +121 -0
- package/lib/types/models/error.d.ts +104 -0
- package/lib/types/models/events.d.ts +494 -0
- package/lib/types/models/grants.d.ts +134 -0
- package/lib/types/models/listQueryParams.d.ts +4 -0
- package/lib/types/models/redirectUri.d.ts +71 -0
- package/lib/types/models/response.d.ts +40 -0
- package/lib/types/models/webhooks.d.ts +45 -0
- package/lib/types/nylas.d.ts +44 -0
- package/lib/types/resources/applications.d.ts +26 -0
- package/lib/types/resources/auth.d.ts +66 -0
- package/lib/types/resources/calendars.d.ts +97 -0
- package/lib/types/resources/events.d.ts +87 -0
- package/lib/types/resources/grants.d.ts +63 -0
- package/lib/types/resources/redirectUris.d.ts +63 -0
- package/lib/types/resources/resource.d.ts +55 -0
- package/lib/types/resources/webhooks.d.ts +79 -0
- package/lib/types/utils.d.ts +22 -0
- package/package.json +28 -39
- package/lib/config.d.ts +0 -52
- package/lib/config.js +0 -47
- package/lib/models/access-token.d.ts +0 -18
- package/lib/models/access-token.js +0 -56
- package/lib/models/account.d.ts +0 -27
- package/lib/models/account.js +0 -73
- package/lib/models/application-details.d.ts +0 -14
- package/lib/models/application-details.js +0 -47
- package/lib/models/attributes.d.ts +0 -151
- package/lib/models/attributes.js +0 -382
- package/lib/models/calendar-availability.d.ts +0 -76
- package/lib/models/calendar-availability.js +0 -121
- package/lib/models/calendar-restful-model-collection.d.ts +0 -17
- package/lib/models/calendar-restful-model-collection.js +0 -181
- package/lib/models/calendar.d.ts +0 -33
- package/lib/models/calendar.js +0 -97
- package/lib/models/component-restful-model-collection.d.ts +0 -9
- package/lib/models/component-restful-model-collection.js +0 -34
- package/lib/models/component.d.ts +0 -37
- package/lib/models/component.js +0 -91
- package/lib/models/connect.d.ts +0 -73
- package/lib/models/connect.js +0 -193
- package/lib/models/contact-restful-model-collection.d.ts +0 -9
- package/lib/models/contact-restful-model-collection.js +0 -60
- package/lib/models/contact.d.ts +0 -129
- package/lib/models/contact.js +0 -289
- package/lib/models/delta-collection.d.ts +0 -17
- package/lib/models/delta-collection.js +0 -139
- package/lib/models/delta-stream.d.ts +0 -32
- package/lib/models/delta-stream.js +0 -250
- package/lib/models/delta.d.ts +0 -28
- package/lib/models/delta.js +0 -88
- package/lib/models/deltas.d.ts +0 -17
- package/lib/models/deltas.js +0 -49
- package/lib/models/draft.d.ts +0 -27
- package/lib/models/draft.js +0 -156
- package/lib/models/email-participant.d.ts +0 -13
- package/lib/models/email-participant.js +0 -46
- package/lib/models/event-conferencing.d.ts +0 -34
- package/lib/models/event-conferencing.js +0 -71
- package/lib/models/event-notification.d.ts +0 -27
- package/lib/models/event-notification.js +0 -62
- package/lib/models/event-participant.d.ts +0 -19
- package/lib/models/event-participant.js +0 -56
- package/lib/models/event-reminder-method.d.ts +0 -18
- package/lib/models/event-reminder-method.js +0 -47
- package/lib/models/event.d.ts +0 -104
- package/lib/models/event.js +0 -308
- package/lib/models/file.d.ts +0 -29
- package/lib/models/file.js +0 -136
- package/lib/models/folder.d.ts +0 -21
- package/lib/models/folder.js +0 -69
- package/lib/models/free-busy.d.ts +0 -58
- package/lib/models/free-busy.js +0 -132
- package/lib/models/job-status-restful-model-collection.d.ts +0 -9
- package/lib/models/job-status-restful-model-collection.js +0 -38
- package/lib/models/job-status.d.ts +0 -24
- package/lib/models/job-status.js +0 -68
- package/lib/models/management-account.d.ts +0 -63
- package/lib/models/management-account.js +0 -187
- package/lib/models/management-model-collection.d.ts +0 -10
- package/lib/models/management-model-collection.js +0 -39
- package/lib/models/management-model.d.ts +0 -6
- package/lib/models/management-model.js +0 -29
- package/lib/models/message-restful-model-collection.d.ts +0 -26
- package/lib/models/message-restful-model-collection.js +0 -80
- package/lib/models/message.d.ts +0 -57
- package/lib/models/message.js +0 -173
- package/lib/models/model-collection.d.ts +0 -25
- package/lib/models/model-collection.js +0 -201
- package/lib/models/model.d.ts +0 -12
- package/lib/models/model.js +0 -64
- package/lib/models/neural-categorizer.d.ts +0 -28
- package/lib/models/neural-categorizer.js +0 -139
- package/lib/models/neural-clean-conversation.d.ts +0 -16
- package/lib/models/neural-clean-conversation.js +0 -114
- package/lib/models/neural-ocr.d.ts +0 -14
- package/lib/models/neural-ocr.js +0 -50
- package/lib/models/neural-sentiment-analysis.d.ts +0 -20
- package/lib/models/neural-sentiment-analysis.js +0 -56
- package/lib/models/neural-signature-contact.d.ts +0 -43
- package/lib/models/neural-signature-contact.js +0 -142
- package/lib/models/neural-signature-extraction.d.ts +0 -17
- package/lib/models/neural-signature-extraction.js +0 -54
- package/lib/models/neural.d.ts +0 -36
- package/lib/models/neural.js +0 -163
- package/lib/models/nylas-api-error.d.ts +0 -26
- package/lib/models/nylas-api-error.js +0 -62
- package/lib/models/outbox-job-status.d.ts +0 -20
- package/lib/models/outbox-job-status.js +0 -64
- package/lib/models/outbox-message.d.ts +0 -16
- package/lib/models/outbox-message.js +0 -54
- package/lib/models/outbox.d.ts +0 -35
- package/lib/models/outbox.js +0 -158
- package/lib/models/rate-limit-error.d.ts +0 -26
- package/lib/models/rate-limit-error.js +0 -47
- package/lib/models/resource.d.ts +0 -22
- package/lib/models/resource.js +0 -66
- package/lib/models/restful-model-collection.d.ts +0 -15
- package/lib/models/restful-model-collection.js +0 -169
- package/lib/models/restful-model-instance.d.ts +0 -9
- package/lib/models/restful-model-instance.js +0 -37
- package/lib/models/restful-model.d.ts +0 -36
- package/lib/models/restful-model.js +0 -146
- package/lib/models/scheduler-booking-request.d.ts +0 -64
- package/lib/models/scheduler-booking-request.js +0 -148
- package/lib/models/scheduler-restful-model-collection.d.ts +0 -26
- package/lib/models/scheduler-restful-model-collection.js +0 -133
- package/lib/models/scheduler-time-slot.d.ts +0 -20
- package/lib/models/scheduler-time-slot.js +0 -53
- package/lib/models/scheduler.d.ts +0 -226
- package/lib/models/scheduler.js +0 -446
- package/lib/models/thread.d.ts +0 -49
- package/lib/models/thread.js +0 -127
- package/lib/models/webhook-notification.d.ts +0 -133
- package/lib/models/webhook-notification.js +0 -314
- package/lib/models/webhook.d.ts +0 -50
- package/lib/models/webhook.js +0 -101
- package/lib/models/when.d.ts +0 -29
- package/lib/models/when.js +0 -76
- package/lib/nylas-connection.d.ts +0 -71
- package/lib/nylas-connection.js +0 -282
- package/lib/nylas.d.ts +0 -34
- package/lib/nylas.js +0 -199
- package/lib/services/tunnel.d.ts +0 -28
- package/lib/services/tunnel.js +0 -89
package/lib/models/when.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
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 When = /** @class */ (function (_super) {
|
|
22
|
-
__extends(When, _super);
|
|
23
|
-
function When(props) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.initAttributes(props);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
// Helper method to check if the When object is actually set properly or not
|
|
29
|
-
When.prototype.isSet = function () {
|
|
30
|
-
return ((this.startTime != undefined && this.endTime != undefined) ||
|
|
31
|
-
this.time != undefined ||
|
|
32
|
-
(this.startDate != undefined && this.endDate != undefined) ||
|
|
33
|
-
this.date != undefined);
|
|
34
|
-
};
|
|
35
|
-
When.attributes = {
|
|
36
|
-
startTime: attributes_1.default.Number({
|
|
37
|
-
modelKey: 'startTime',
|
|
38
|
-
jsonKey: 'start_time',
|
|
39
|
-
}),
|
|
40
|
-
endTime: attributes_1.default.Number({
|
|
41
|
-
modelKey: 'endTime',
|
|
42
|
-
jsonKey: 'end_time',
|
|
43
|
-
}),
|
|
44
|
-
startTimezone: attributes_1.default.String({
|
|
45
|
-
modelKey: 'startTimezone',
|
|
46
|
-
jsonKey: 'start_timezone',
|
|
47
|
-
}),
|
|
48
|
-
endTimezone: attributes_1.default.String({
|
|
49
|
-
modelKey: 'endTimezone',
|
|
50
|
-
jsonKey: 'end_timezone',
|
|
51
|
-
}),
|
|
52
|
-
time: attributes_1.default.Number({
|
|
53
|
-
modelKey: 'time',
|
|
54
|
-
}),
|
|
55
|
-
timezone: attributes_1.default.String({
|
|
56
|
-
modelKey: 'timezone',
|
|
57
|
-
}),
|
|
58
|
-
startDate: attributes_1.default.String({
|
|
59
|
-
modelKey: 'startDate',
|
|
60
|
-
jsonKey: 'start_date',
|
|
61
|
-
}),
|
|
62
|
-
endDate: attributes_1.default.String({
|
|
63
|
-
modelKey: 'endDate',
|
|
64
|
-
jsonKey: 'end_date',
|
|
65
|
-
}),
|
|
66
|
-
date: attributes_1.default.String({
|
|
67
|
-
modelKey: 'date',
|
|
68
|
-
}),
|
|
69
|
-
object: attributes_1.default.String({
|
|
70
|
-
modelKey: 'object',
|
|
71
|
-
readOnly: true,
|
|
72
|
-
}),
|
|
73
|
-
};
|
|
74
|
-
return When;
|
|
75
|
-
}(model_1.default));
|
|
76
|
-
exports.default = When;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { URL } from 'url';
|
|
3
|
-
import { Request } from 'node-fetch';
|
|
4
|
-
import RestfulModelCollection from './models/restful-model-collection';
|
|
5
|
-
import CalendarRestfulModelCollection from './models/calendar-restful-model-collection';
|
|
6
|
-
import ContactRestfulModelCollection from './models/contact-restful-model-collection';
|
|
7
|
-
import RestfulModelInstance from './models/restful-model-instance';
|
|
8
|
-
import Account from './models/account';
|
|
9
|
-
import Thread from './models/thread';
|
|
10
|
-
import Draft from './models/draft';
|
|
11
|
-
import File from './models/file';
|
|
12
|
-
import Event from './models/event';
|
|
13
|
-
import Resource from './models/resource';
|
|
14
|
-
import Folder, { Label } from './models/folder';
|
|
15
|
-
import { AppendOptions } from 'form-data';
|
|
16
|
-
import Neural from './models/neural';
|
|
17
|
-
import ComponentRestfulModelCollection from './models/component-restful-model-collection';
|
|
18
|
-
import SchedulerRestfulModelCollection from './models/scheduler-restful-model-collection';
|
|
19
|
-
import MessageRestfulModelCollection from './models/message-restful-model-collection';
|
|
20
|
-
import DeltaCollection from './models/delta-collection';
|
|
21
|
-
import Outbox from './models/outbox';
|
|
22
|
-
import JobStatusRestfulModelCollection from './models/job-status-restful-model-collection';
|
|
23
|
-
export declare enum AuthMethod {
|
|
24
|
-
BASIC = 0,
|
|
25
|
-
BEARER = 1
|
|
26
|
-
}
|
|
27
|
-
export declare type RequestOptions = {
|
|
28
|
-
path: string;
|
|
29
|
-
method?: string;
|
|
30
|
-
headers?: Record<string, string>;
|
|
31
|
-
qs?: Record<string, unknown>;
|
|
32
|
-
downloadRequest?: boolean;
|
|
33
|
-
json?: boolean;
|
|
34
|
-
formData?: Record<string, FormDataType>;
|
|
35
|
-
body?: any;
|
|
36
|
-
baseUrl?: string;
|
|
37
|
-
url?: URL;
|
|
38
|
-
authMethod?: AuthMethod;
|
|
39
|
-
};
|
|
40
|
-
export declare type FormDataType = {
|
|
41
|
-
value: unknown;
|
|
42
|
-
options?: Record<string, unknown> | AppendOptions;
|
|
43
|
-
};
|
|
44
|
-
export default class NylasConnection {
|
|
45
|
-
accessToken: string | null | undefined;
|
|
46
|
-
clientId: string | null | undefined;
|
|
47
|
-
threads: RestfulModelCollection<Thread>;
|
|
48
|
-
contacts: ContactRestfulModelCollection;
|
|
49
|
-
messages: MessageRestfulModelCollection;
|
|
50
|
-
drafts: RestfulModelCollection<Draft>;
|
|
51
|
-
files: RestfulModelCollection<File>;
|
|
52
|
-
calendars: CalendarRestfulModelCollection;
|
|
53
|
-
jobStatuses: JobStatusRestfulModelCollection;
|
|
54
|
-
events: RestfulModelCollection<Event>;
|
|
55
|
-
resources: RestfulModelCollection<Resource>;
|
|
56
|
-
deltas: DeltaCollection;
|
|
57
|
-
labels: RestfulModelCollection<Label>;
|
|
58
|
-
folders: RestfulModelCollection<Folder>;
|
|
59
|
-
account: RestfulModelInstance<Account>;
|
|
60
|
-
component: ComponentRestfulModelCollection;
|
|
61
|
-
scheduler: SchedulerRestfulModelCollection;
|
|
62
|
-
outbox: Outbox;
|
|
63
|
-
neural: Neural;
|
|
64
|
-
constructor(accessToken: string | null | undefined, { clientId }: {
|
|
65
|
-
clientId: string | null | undefined;
|
|
66
|
-
});
|
|
67
|
-
requestOptions(options: RequestOptions): RequestOptions;
|
|
68
|
-
newRequest(options: RequestOptions): Request;
|
|
69
|
-
private getWarningForVersion;
|
|
70
|
-
request(options: RequestOptions): Promise<any>;
|
|
71
|
-
}
|
package/lib/nylas-connection.js
DELETED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
17
|
-
if (mod && mod.__esModule) return mod;
|
|
18
|
-
var result = {};
|
|
19
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
20
|
-
result["default"] = mod;
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
// TODO since node 10 URL is global
|
|
25
|
-
var url_1 = require("url");
|
|
26
|
-
// TODO since node 15 AbortController is global
|
|
27
|
-
var abort_controller_1 = __importDefault(require("abort-controller"));
|
|
28
|
-
var node_fetch_1 = __importStar(require("node-fetch"));
|
|
29
|
-
var config = __importStar(require("./config"));
|
|
30
|
-
var restful_model_collection_1 = __importDefault(require("./models/restful-model-collection"));
|
|
31
|
-
var calendar_restful_model_collection_1 = __importDefault(require("./models/calendar-restful-model-collection"));
|
|
32
|
-
var contact_restful_model_collection_1 = __importDefault(require("./models/contact-restful-model-collection"));
|
|
33
|
-
var restful_model_instance_1 = __importDefault(require("./models/restful-model-instance"));
|
|
34
|
-
var account_1 = __importDefault(require("./models/account"));
|
|
35
|
-
var thread_1 = __importDefault(require("./models/thread"));
|
|
36
|
-
var draft_1 = __importDefault(require("./models/draft"));
|
|
37
|
-
var file_1 = __importDefault(require("./models/file"));
|
|
38
|
-
var event_1 = __importDefault(require("./models/event"));
|
|
39
|
-
var resource_1 = __importDefault(require("./models/resource"));
|
|
40
|
-
var folder_1 = __importStar(require("./models/folder"));
|
|
41
|
-
var form_data_1 = __importDefault(require("form-data"));
|
|
42
|
-
var neural_1 = __importDefault(require("./models/neural"));
|
|
43
|
-
var nylas_api_error_1 = __importDefault(require("./models/nylas-api-error"));
|
|
44
|
-
var component_restful_model_collection_1 = __importDefault(require("./models/component-restful-model-collection"));
|
|
45
|
-
var scheduler_restful_model_collection_1 = __importDefault(require("./models/scheduler-restful-model-collection"));
|
|
46
|
-
var message_restful_model_collection_1 = __importDefault(require("./models/message-restful-model-collection"));
|
|
47
|
-
var delta_collection_1 = __importDefault(require("./models/delta-collection"));
|
|
48
|
-
var outbox_1 = __importDefault(require("./models/outbox"));
|
|
49
|
-
var job_status_restful_model_collection_1 = __importDefault(require("./models/job-status-restful-model-collection"));
|
|
50
|
-
var rate_limit_error_1 = __importDefault(require("./models/rate-limit-error"));
|
|
51
|
-
var PACKAGE_JSON = require('../package.json');
|
|
52
|
-
var SDK_VERSION = PACKAGE_JSON.version;
|
|
53
|
-
var SUPPORTED_API_VERSION = '2.5';
|
|
54
|
-
var AuthMethod;
|
|
55
|
-
(function (AuthMethod) {
|
|
56
|
-
AuthMethod[AuthMethod["BASIC"] = 0] = "BASIC";
|
|
57
|
-
AuthMethod[AuthMethod["BEARER"] = 1] = "BEARER";
|
|
58
|
-
})(AuthMethod = exports.AuthMethod || (exports.AuthMethod = {}));
|
|
59
|
-
var NylasConnection = /** @class */ (function () {
|
|
60
|
-
function NylasConnection(accessToken, _a) {
|
|
61
|
-
var clientId = _a.clientId;
|
|
62
|
-
this.threads = new restful_model_collection_1.default(thread_1.default, this);
|
|
63
|
-
this.contacts = new contact_restful_model_collection_1.default(this);
|
|
64
|
-
this.messages = new message_restful_model_collection_1.default(this);
|
|
65
|
-
this.drafts = new restful_model_collection_1.default(draft_1.default, this);
|
|
66
|
-
this.files = new restful_model_collection_1.default(file_1.default, this);
|
|
67
|
-
this.calendars = new calendar_restful_model_collection_1.default(this);
|
|
68
|
-
this.jobStatuses = new job_status_restful_model_collection_1.default(this);
|
|
69
|
-
this.events = new restful_model_collection_1.default(event_1.default, this);
|
|
70
|
-
this.resources = new restful_model_collection_1.default(resource_1.default, this);
|
|
71
|
-
this.deltas = new delta_collection_1.default(this);
|
|
72
|
-
this.labels = new restful_model_collection_1.default(folder_1.Label, this);
|
|
73
|
-
this.folders = new restful_model_collection_1.default(folder_1.default, this);
|
|
74
|
-
this.account = new restful_model_instance_1.default(account_1.default, this);
|
|
75
|
-
this.component = new component_restful_model_collection_1.default(this);
|
|
76
|
-
this.scheduler = new scheduler_restful_model_collection_1.default(this);
|
|
77
|
-
this.outbox = new outbox_1.default(this);
|
|
78
|
-
this.neural = new neural_1.default(this);
|
|
79
|
-
this.accessToken = accessToken;
|
|
80
|
-
this.clientId = clientId;
|
|
81
|
-
}
|
|
82
|
-
NylasConnection.prototype.requestOptions = function (options) {
|
|
83
|
-
var baseUrl = options.baseUrl ? options.baseUrl : config.apiServer;
|
|
84
|
-
var url = new url_1.URL("" + baseUrl + options.path);
|
|
85
|
-
// map querystring to search params
|
|
86
|
-
if (options.qs) {
|
|
87
|
-
for (var _i = 0, _a = Object.entries(options.qs); _i < _a.length; _i++) {
|
|
88
|
-
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
89
|
-
// For convenience, If `expanded` param is provided, convert to view:
|
|
90
|
-
// 'expanded' api option
|
|
91
|
-
if (key === 'expanded') {
|
|
92
|
-
if (value === true) {
|
|
93
|
-
url.searchParams.set('view', 'expanded');
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
else if (key == 'metadata_pair') {
|
|
97
|
-
// The API understands a metadata_pair filter in the form of:
|
|
98
|
-
// <key>:<value>
|
|
99
|
-
for (var item in value) {
|
|
100
|
-
url.searchParams.set('metadata_pair', item + ":" + value[item]);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else if (Array.isArray(value)) {
|
|
104
|
-
for (var _c = 0, value_1 = value; _c < value_1.length; _c++) {
|
|
105
|
-
var item = value_1[_c];
|
|
106
|
-
url.searchParams.append(key, item);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
url.searchParams.set(key, value);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
options.url = url;
|
|
115
|
-
var headers = __assign({}, options.headers);
|
|
116
|
-
var user = options.path.substr(0, 3) === '/a/' || options.path.includes('/component')
|
|
117
|
-
? config.clientSecret
|
|
118
|
-
: this.accessToken;
|
|
119
|
-
if (user) {
|
|
120
|
-
if (options.authMethod === AuthMethod.BEARER) {
|
|
121
|
-
headers['authorization'] = "Bearer " + user;
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
headers['authorization'] =
|
|
125
|
-
'Basic ' + Buffer.from(user + ":", 'utf8').toString('base64');
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
if (!headers['User-Agent']) {
|
|
129
|
-
headers['User-Agent'] = "Nylas Node SDK v" + SDK_VERSION;
|
|
130
|
-
}
|
|
131
|
-
headers['Nylas-API-Version'] = SUPPORTED_API_VERSION;
|
|
132
|
-
headers['Nylas-SDK-API-Version'] = SUPPORTED_API_VERSION;
|
|
133
|
-
if (this.clientId != null) {
|
|
134
|
-
headers['X-Nylas-Client-Id'] = this.clientId;
|
|
135
|
-
}
|
|
136
|
-
options.headers = headers;
|
|
137
|
-
if (options.formData) {
|
|
138
|
-
var fd = new form_data_1.default();
|
|
139
|
-
for (var _d = 0, _e = Object.entries(options.formData); _d < _e.length; _d++) {
|
|
140
|
-
var _f = _e[_d], key = _f[0], obj = _f[1];
|
|
141
|
-
if (obj.options) {
|
|
142
|
-
fd.append(key, obj.value, obj.options);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
fd.append(key, obj.value);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
options.body = fd;
|
|
149
|
-
}
|
|
150
|
-
else if (options.body && options.json !== false) {
|
|
151
|
-
options.body = JSON.stringify(options.body);
|
|
152
|
-
}
|
|
153
|
-
return options;
|
|
154
|
-
};
|
|
155
|
-
NylasConnection.prototype.newRequest = function (options) {
|
|
156
|
-
var newOptions = this.requestOptions(options);
|
|
157
|
-
return new node_fetch_1.Request(newOptions.url || '', {
|
|
158
|
-
method: newOptions.method || 'GET',
|
|
159
|
-
headers: newOptions.headers,
|
|
160
|
-
body: newOptions.body,
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
NylasConnection.prototype.getWarningForVersion = function (sdkApiVersion, apiVersion) {
|
|
164
|
-
var warning = '';
|
|
165
|
-
if (sdkApiVersion != apiVersion) {
|
|
166
|
-
if (sdkApiVersion && apiVersion) {
|
|
167
|
-
warning +=
|
|
168
|
-
"WARNING: SDK version may not support your Nylas API version." +
|
|
169
|
-
(" SDK supports version " + sdkApiVersion + " of the API and your application") +
|
|
170
|
-
(" is currently running on version " + apiVersion + " of the API.");
|
|
171
|
-
var apiNum = parseInt(apiVersion.split('-')[0]);
|
|
172
|
-
var sdkNum = parseInt(sdkApiVersion.split('-')[0]);
|
|
173
|
-
if (sdkNum > apiNum) {
|
|
174
|
-
warning += " Please update the version of the API that your application is using through the developer dashboard.";
|
|
175
|
-
}
|
|
176
|
-
else if (apiNum > sdkNum) {
|
|
177
|
-
warning += " Please update the sdk to ensure it works properly.";
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return warning;
|
|
182
|
-
};
|
|
183
|
-
NylasConnection.prototype.request = function (options) {
|
|
184
|
-
var _this = this;
|
|
185
|
-
var req = this.newRequest(options);
|
|
186
|
-
var controller;
|
|
187
|
-
var timeout;
|
|
188
|
-
if (config.timeout && config.timeout !== 0) {
|
|
189
|
-
controller = new abort_controller_1.default();
|
|
190
|
-
timeout = setTimeout(function () {
|
|
191
|
-
controller.abort();
|
|
192
|
-
}, 150);
|
|
193
|
-
}
|
|
194
|
-
return new Promise(function (resolve, reject) {
|
|
195
|
-
return node_fetch_1.default(req, { signal: controller === null || controller === void 0 ? void 0 : controller.signal })
|
|
196
|
-
.then(function (response) {
|
|
197
|
-
if (typeof response === 'undefined') {
|
|
198
|
-
return reject(new Error('No response'));
|
|
199
|
-
}
|
|
200
|
-
// node headers are lowercaser so this refers to `Nylas-Api-Version`
|
|
201
|
-
var apiVersion = response.headers.get('nylas-api-version');
|
|
202
|
-
var warning = _this.getWarningForVersion(SUPPORTED_API_VERSION, apiVersion);
|
|
203
|
-
if (warning) {
|
|
204
|
-
console.warn(warning);
|
|
205
|
-
}
|
|
206
|
-
if (response.status > 299) {
|
|
207
|
-
return response.text().then(function (body) {
|
|
208
|
-
try {
|
|
209
|
-
var parsedApiError = JSON.parse(body);
|
|
210
|
-
var error = void 0;
|
|
211
|
-
if (response.status === rate_limit_error_1.default.RATE_LIMIT_STATUS_CODE) {
|
|
212
|
-
error = rate_limit_error_1.default.parseErrorResponse(parsedApiError, response.headers);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
error = new nylas_api_error_1.default(response.status, parsedApiError.type, parsedApiError.message);
|
|
216
|
-
}
|
|
217
|
-
if (parsedApiError.missing_fields) {
|
|
218
|
-
error.missingFields = parsedApiError.missing_fields;
|
|
219
|
-
}
|
|
220
|
-
if (parsedApiError.server_error) {
|
|
221
|
-
error.serverError = parsedApiError.server_error;
|
|
222
|
-
}
|
|
223
|
-
return reject(error);
|
|
224
|
-
}
|
|
225
|
-
catch (e) {
|
|
226
|
-
var error = new nylas_api_error_1.default(response.status, response.statusText, body);
|
|
227
|
-
return reject(error);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
if (options.downloadRequest) {
|
|
233
|
-
response
|
|
234
|
-
.buffer()
|
|
235
|
-
.then(function (buffer) {
|
|
236
|
-
// Return an object with the headers and the body as a buffer
|
|
237
|
-
var fileDetails = {};
|
|
238
|
-
response.headers.forEach(function (v, k) {
|
|
239
|
-
fileDetails[k] = v;
|
|
240
|
-
});
|
|
241
|
-
fileDetails['body'] = buffer;
|
|
242
|
-
return resolve(fileDetails);
|
|
243
|
-
})
|
|
244
|
-
.catch(function (e) {
|
|
245
|
-
return reject(e);
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
else if (response.headers.get('content-length') &&
|
|
249
|
-
Number(response.headers.get('content-length')) == 0) {
|
|
250
|
-
return resolve(undefined);
|
|
251
|
-
}
|
|
252
|
-
else if (response.headers.get('Content-Type') === 'message/rfc822') {
|
|
253
|
-
return resolve(response.text());
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
return response.text().then(function (text) {
|
|
257
|
-
try {
|
|
258
|
-
return resolve(JSON.parse(text));
|
|
259
|
-
}
|
|
260
|
-
catch (e) {
|
|
261
|
-
return resolve(text);
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
})
|
|
267
|
-
.catch(function (err) {
|
|
268
|
-
if (err && err.name && err.name === 'AbortError') {
|
|
269
|
-
console.warn('Request timed out');
|
|
270
|
-
return reject(err);
|
|
271
|
-
}
|
|
272
|
-
console.error("Error encountered during request:\n" + err.stack);
|
|
273
|
-
return reject(err);
|
|
274
|
-
})
|
|
275
|
-
.then(function () {
|
|
276
|
-
clearTimeout(timeout);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
return NylasConnection;
|
|
281
|
-
}());
|
|
282
|
-
exports.default = NylasConnection;
|
package/lib/nylas.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import NylasConnection from './nylas-connection';
|
|
2
|
-
import ManagementAccount from './models/management-account';
|
|
3
|
-
import Account from './models/account';
|
|
4
|
-
import Connect from './models/connect';
|
|
5
|
-
import RestfulModelCollection from './models/restful-model-collection';
|
|
6
|
-
import ManagementModelCollection from './models/management-model-collection';
|
|
7
|
-
import Webhook from './models/webhook';
|
|
8
|
-
import { AuthenticateUrlConfig, NylasConfig } from './config';
|
|
9
|
-
import AccessToken from './models/access-token';
|
|
10
|
-
import ApplicationDetails, { ApplicationDetailsProperties } from './models/application-details';
|
|
11
|
-
declare class Nylas {
|
|
12
|
-
static clientId: string;
|
|
13
|
-
static get clientSecret(): string;
|
|
14
|
-
static set clientSecret(newClientSecret: string);
|
|
15
|
-
static get apiServer(): string | null;
|
|
16
|
-
static set apiServer(newApiServer: string | null);
|
|
17
|
-
static get timeout(): number;
|
|
18
|
-
static set timeout(timeout: number);
|
|
19
|
-
static accounts: ManagementModelCollection<ManagementAccount> | RestfulModelCollection<Account>;
|
|
20
|
-
static connect: Connect;
|
|
21
|
-
static webhooks: ManagementModelCollection<Webhook>;
|
|
22
|
-
static config(config: NylasConfig): Nylas;
|
|
23
|
-
static clientCredentials(): boolean;
|
|
24
|
-
static with(accessToken: string): NylasConnection;
|
|
25
|
-
static application(options?: ApplicationDetailsProperties): Promise<ApplicationDetails>;
|
|
26
|
-
static exchangeCodeForToken(code: string, callback?: (error: Error | null, accessToken?: string) => void): Promise<AccessToken>;
|
|
27
|
-
static urlForAuthentication(options: AuthenticateUrlConfig): string;
|
|
28
|
-
/**
|
|
29
|
-
* Revoke a single access token
|
|
30
|
-
* @param accessToken The access token to revoke
|
|
31
|
-
*/
|
|
32
|
-
static revoke(accessToken: string): Promise<void>;
|
|
33
|
-
}
|
|
34
|
-
export = Nylas;
|
package/lib/nylas.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
6
|
-
if (mod && mod.__esModule) return mod;
|
|
7
|
-
var result = {};
|
|
8
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
9
|
-
result["default"] = mod;
|
|
10
|
-
return result;
|
|
11
|
-
};
|
|
12
|
-
// TODO since node 10 URL is global
|
|
13
|
-
var url_1 = require("url");
|
|
14
|
-
var node_fetch_1 = __importDefault(require("node-fetch"));
|
|
15
|
-
var config = __importStar(require("./config"));
|
|
16
|
-
var nylas_connection_1 = __importDefault(require("./nylas-connection"));
|
|
17
|
-
var management_account_1 = __importDefault(require("./models/management-account"));
|
|
18
|
-
var account_1 = __importDefault(require("./models/account"));
|
|
19
|
-
var connect_1 = __importDefault(require("./models/connect"));
|
|
20
|
-
var restful_model_collection_1 = __importDefault(require("./models/restful-model-collection"));
|
|
21
|
-
var management_model_collection_1 = __importDefault(require("./models/management-model-collection"));
|
|
22
|
-
var webhook_1 = __importDefault(require("./models/webhook"));
|
|
23
|
-
var config_1 = require("./config");
|
|
24
|
-
var access_token_1 = __importDefault(require("./models/access-token"));
|
|
25
|
-
var application_details_1 = __importDefault(require("./models/application-details"));
|
|
26
|
-
var Nylas = /** @class */ (function () {
|
|
27
|
-
function Nylas() {
|
|
28
|
-
}
|
|
29
|
-
Object.defineProperty(Nylas, "clientSecret", {
|
|
30
|
-
get: function () {
|
|
31
|
-
return config.clientSecret;
|
|
32
|
-
},
|
|
33
|
-
set: function (newClientSecret) {
|
|
34
|
-
config.setClientSecret(newClientSecret);
|
|
35
|
-
},
|
|
36
|
-
enumerable: true,
|
|
37
|
-
configurable: true
|
|
38
|
-
});
|
|
39
|
-
Object.defineProperty(Nylas, "apiServer", {
|
|
40
|
-
get: function () {
|
|
41
|
-
return config.apiServer;
|
|
42
|
-
},
|
|
43
|
-
set: function (newApiServer) {
|
|
44
|
-
config.setApiServer(newApiServer);
|
|
45
|
-
},
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(Nylas, "timeout", {
|
|
50
|
-
get: function () {
|
|
51
|
-
return config.timeout;
|
|
52
|
-
},
|
|
53
|
-
// Timeout for outgoing API calls, in milliseconds
|
|
54
|
-
set: function (timeout) {
|
|
55
|
-
config.setTimeout(timeout);
|
|
56
|
-
},
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
Nylas.config = function (config) {
|
|
61
|
-
if (config.apiServer && config.apiServer.indexOf('://') === -1) {
|
|
62
|
-
throw new Error('Please specify a fully qualified URL for the API Server.');
|
|
63
|
-
}
|
|
64
|
-
if (config.clientId) {
|
|
65
|
-
this.clientId = config.clientId;
|
|
66
|
-
}
|
|
67
|
-
if (config.clientSecret) {
|
|
68
|
-
this.clientSecret = config.clientSecret;
|
|
69
|
-
}
|
|
70
|
-
if (config.apiServer) {
|
|
71
|
-
this.apiServer = config.apiServer;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
this.apiServer = 'https://api.nylas.com';
|
|
75
|
-
}
|
|
76
|
-
this.timeout = config.timeout || 0;
|
|
77
|
-
var conn = new nylas_connection_1.default(this.clientSecret, {
|
|
78
|
-
clientId: this.clientId,
|
|
79
|
-
});
|
|
80
|
-
this.connect = new connect_1.default(conn, this.clientId, this.clientSecret);
|
|
81
|
-
this.webhooks = new management_model_collection_1.default(webhook_1.default, conn, this.clientId);
|
|
82
|
-
if (this.clientCredentials()) {
|
|
83
|
-
this.accounts = new management_model_collection_1.default(management_account_1.default, conn, this.clientId);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
this.accounts = new restful_model_collection_1.default(account_1.default, conn);
|
|
87
|
-
}
|
|
88
|
-
return this;
|
|
89
|
-
};
|
|
90
|
-
Nylas.clientCredentials = function () {
|
|
91
|
-
return this.clientId != null && this.clientSecret != null;
|
|
92
|
-
};
|
|
93
|
-
Nylas.with = function (accessToken) {
|
|
94
|
-
if (!accessToken) {
|
|
95
|
-
throw new Error('This function requires an access token');
|
|
96
|
-
}
|
|
97
|
-
return new nylas_connection_1.default(accessToken, { clientId: this.clientId });
|
|
98
|
-
};
|
|
99
|
-
Nylas.application = function (options) {
|
|
100
|
-
if (!this.clientId) {
|
|
101
|
-
throw new Error('This function requires a clientId');
|
|
102
|
-
}
|
|
103
|
-
if (!this.clientSecret) {
|
|
104
|
-
throw new Error('This function requires a clientSecret');
|
|
105
|
-
}
|
|
106
|
-
var connection = new nylas_connection_1.default(null, { clientId: this.clientId });
|
|
107
|
-
var requestOptions = {
|
|
108
|
-
path: "/a/" + this.clientId,
|
|
109
|
-
};
|
|
110
|
-
if (options) {
|
|
111
|
-
requestOptions.body = {
|
|
112
|
-
application_name: options.applicationName,
|
|
113
|
-
icon_url: options.iconUrl,
|
|
114
|
-
redirect_uris: options.redirectUris,
|
|
115
|
-
};
|
|
116
|
-
requestOptions.method = 'PUT';
|
|
117
|
-
}
|
|
118
|
-
return connection.request(requestOptions).then(function (res) {
|
|
119
|
-
return new application_details_1.default().fromJSON(res);
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
Nylas.exchangeCodeForToken = function (code, callback) {
|
|
123
|
-
if (!this.clientId || !this.clientSecret) {
|
|
124
|
-
throw new Error('exchangeCodeForToken() cannot be called until you provide a clientId and secret via config()');
|
|
125
|
-
}
|
|
126
|
-
if (!code) {
|
|
127
|
-
throw new Error('exchangeCodeForToken() must be called with a code');
|
|
128
|
-
}
|
|
129
|
-
var url = new url_1.URL(this.apiServer + "/oauth/token");
|
|
130
|
-
url.searchParams.set('client_id', this.clientId);
|
|
131
|
-
url.searchParams.set('client_secret', this.clientSecret);
|
|
132
|
-
url.searchParams.set('grant_type', 'authorization_code');
|
|
133
|
-
url.searchParams.set('code', code);
|
|
134
|
-
return node_fetch_1.default(url)
|
|
135
|
-
.then(function (response) {
|
|
136
|
-
if (response.ok) {
|
|
137
|
-
return response.json();
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
.then(function (body) {
|
|
141
|
-
if (!body || !body['access_token']) {
|
|
142
|
-
var errorMessage = 'No access token in response';
|
|
143
|
-
if (body && body.message)
|
|
144
|
-
errorMessage = body.message;
|
|
145
|
-
throw new Error(errorMessage);
|
|
146
|
-
}
|
|
147
|
-
if (callback) {
|
|
148
|
-
callback(null, body);
|
|
149
|
-
}
|
|
150
|
-
return new access_token_1.default().fromJSON(body);
|
|
151
|
-
}, function (error) {
|
|
152
|
-
var newError = new Error(error.message);
|
|
153
|
-
if (callback) {
|
|
154
|
-
callback(newError);
|
|
155
|
-
}
|
|
156
|
-
throw newError;
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
Nylas.urlForAuthentication = function (options) {
|
|
160
|
-
if (!this.clientId) {
|
|
161
|
-
throw new Error('urlForAuthentication() cannot be called until you provide a clientId via config()');
|
|
162
|
-
}
|
|
163
|
-
if (!options.redirectURI) {
|
|
164
|
-
throw new Error('urlForAuthentication() requires options.redirectURI');
|
|
165
|
-
}
|
|
166
|
-
if (!options.loginHint) {
|
|
167
|
-
options.loginHint = '';
|
|
168
|
-
}
|
|
169
|
-
var url = this.apiServer + "/oauth/authorize?client_id=" + this.clientId + "&response_type=" + (options.responseType || config_1.ResponseType.CODE) + "&login_hint=" + options.loginHint + "&redirect_uri=" + options.redirectURI;
|
|
170
|
-
if (options.state != null) {
|
|
171
|
-
url += "&state=" + options.state;
|
|
172
|
-
}
|
|
173
|
-
if (options.scopes != null) {
|
|
174
|
-
url += "&scopes=" + options.scopes.join(',');
|
|
175
|
-
}
|
|
176
|
-
if (options.provider != null) {
|
|
177
|
-
url += "&provider=" + options.provider;
|
|
178
|
-
}
|
|
179
|
-
if (options.redirectOnError) {
|
|
180
|
-
url += '&redirect_on_error=true';
|
|
181
|
-
}
|
|
182
|
-
return url;
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* Revoke a single access token
|
|
186
|
-
* @param accessToken The access token to revoke
|
|
187
|
-
*/
|
|
188
|
-
Nylas.revoke = function (accessToken) {
|
|
189
|
-
return Nylas.with(accessToken)
|
|
190
|
-
.request({
|
|
191
|
-
method: 'POST',
|
|
192
|
-
path: '/oauth/revoke',
|
|
193
|
-
})
|
|
194
|
-
.catch(function (err) { return Promise.reject(err); });
|
|
195
|
-
};
|
|
196
|
-
Nylas.clientId = '';
|
|
197
|
-
return Nylas;
|
|
198
|
-
}());
|
|
199
|
-
module.exports = Nylas;
|