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
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Attribute } from './attributes';
|
|
2
|
-
import Model from './model';
|
|
3
|
-
export declare type EventConferencingDetailsProperties = {
|
|
4
|
-
meetingCode?: string;
|
|
5
|
-
phone?: string[];
|
|
6
|
-
password?: string;
|
|
7
|
-
pin?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare class EventConferencingDetails extends Model implements EventConferencingDetailsProperties {
|
|
11
|
-
meetingCode?: string;
|
|
12
|
-
phone?: string[];
|
|
13
|
-
password?: string;
|
|
14
|
-
pin?: string;
|
|
15
|
-
url?: string;
|
|
16
|
-
static attributes: Record<string, Attribute>;
|
|
17
|
-
constructor(props?: EventConferencingProperties);
|
|
18
|
-
}
|
|
19
|
-
export declare type EventConferencingProperties = {
|
|
20
|
-
provider: string;
|
|
21
|
-
details?: EventConferencingDetailsProperties;
|
|
22
|
-
autocreate?: {
|
|
23
|
-
settings?: object;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export default class EventConferencing extends Model implements EventConferencingProperties {
|
|
27
|
-
provider: string;
|
|
28
|
-
details?: EventConferencingDetails;
|
|
29
|
-
autocreate?: {
|
|
30
|
-
settings?: Record<string, string>;
|
|
31
|
-
};
|
|
32
|
-
static attributes: Record<string, Attribute>;
|
|
33
|
-
constructor(props?: EventConferencingProperties);
|
|
34
|
-
}
|
|
@@ -1,71 +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 attributes_1 = __importDefault(require("./attributes"));
|
|
20
|
-
var model_1 = __importDefault(require("./model"));
|
|
21
|
-
var EventConferencingDetails = /** @class */ (function (_super) {
|
|
22
|
-
__extends(EventConferencingDetails, _super);
|
|
23
|
-
function EventConferencingDetails(props) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.initAttributes(props);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
EventConferencingDetails.attributes = {
|
|
29
|
-
meetingCode: attributes_1.default.String({
|
|
30
|
-
modelKey: 'meetingCode',
|
|
31
|
-
jsonKey: 'meeting_code',
|
|
32
|
-
}),
|
|
33
|
-
phone: attributes_1.default.StringList({
|
|
34
|
-
modelKey: 'phone',
|
|
35
|
-
}),
|
|
36
|
-
password: attributes_1.default.String({
|
|
37
|
-
modelKey: 'password',
|
|
38
|
-
}),
|
|
39
|
-
pin: attributes_1.default.String({
|
|
40
|
-
modelKey: 'pin',
|
|
41
|
-
}),
|
|
42
|
-
url: attributes_1.default.String({
|
|
43
|
-
modelKey: 'url',
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
46
|
-
return EventConferencingDetails;
|
|
47
|
-
}(model_1.default));
|
|
48
|
-
exports.EventConferencingDetails = EventConferencingDetails;
|
|
49
|
-
var EventConferencing = /** @class */ (function (_super) {
|
|
50
|
-
__extends(EventConferencing, _super);
|
|
51
|
-
function EventConferencing(props) {
|
|
52
|
-
var _this = _super.call(this) || this;
|
|
53
|
-
_this.provider = '';
|
|
54
|
-
_this.initAttributes(props);
|
|
55
|
-
return _this;
|
|
56
|
-
}
|
|
57
|
-
EventConferencing.attributes = {
|
|
58
|
-
details: attributes_1.default.Object({
|
|
59
|
-
modelKey: 'details',
|
|
60
|
-
itemClass: EventConferencingDetails,
|
|
61
|
-
}),
|
|
62
|
-
provider: attributes_1.default.String({
|
|
63
|
-
modelKey: 'provider',
|
|
64
|
-
}),
|
|
65
|
-
autocreate: attributes_1.default.Object({
|
|
66
|
-
modelKey: 'autocreate',
|
|
67
|
-
}),
|
|
68
|
-
};
|
|
69
|
-
return EventConferencing;
|
|
70
|
-
}(model_1.default));
|
|
71
|
-
exports.default = EventConferencing;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Attribute } from './attributes';
|
|
2
|
-
import Model from './model';
|
|
3
|
-
export declare enum EventNotificationType {
|
|
4
|
-
Email = "email",
|
|
5
|
-
Sms = "sms",
|
|
6
|
-
Webhook = "webhook"
|
|
7
|
-
}
|
|
8
|
-
export declare type EventNotificationProperties = {
|
|
9
|
-
type: EventNotificationType;
|
|
10
|
-
minutesBeforeEvent: number;
|
|
11
|
-
url?: string;
|
|
12
|
-
payload?: string;
|
|
13
|
-
subject?: string;
|
|
14
|
-
body?: string;
|
|
15
|
-
message?: string;
|
|
16
|
-
};
|
|
17
|
-
export default class EventNotification extends Model implements EventNotificationProperties {
|
|
18
|
-
type: EventNotificationType;
|
|
19
|
-
minutesBeforeEvent: number;
|
|
20
|
-
url?: string;
|
|
21
|
-
payload?: string;
|
|
22
|
-
subject?: string;
|
|
23
|
-
body?: string;
|
|
24
|
-
message?: string;
|
|
25
|
-
static attributes: Record<string, Attribute>;
|
|
26
|
-
constructor(props?: EventNotificationProperties);
|
|
27
|
-
}
|
|
@@ -1,62 +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 attributes_1 = __importDefault(require("./attributes"));
|
|
20
|
-
var model_1 = __importDefault(require("./model"));
|
|
21
|
-
var EventNotificationType;
|
|
22
|
-
(function (EventNotificationType) {
|
|
23
|
-
EventNotificationType["Email"] = "email";
|
|
24
|
-
EventNotificationType["Sms"] = "sms";
|
|
25
|
-
EventNotificationType["Webhook"] = "webhook";
|
|
26
|
-
})(EventNotificationType = exports.EventNotificationType || (exports.EventNotificationType = {}));
|
|
27
|
-
var EventNotification = /** @class */ (function (_super) {
|
|
28
|
-
__extends(EventNotification, _super);
|
|
29
|
-
function EventNotification(props) {
|
|
30
|
-
var _this = _super.call(this) || this;
|
|
31
|
-
_this.type = EventNotificationType.Email;
|
|
32
|
-
_this.minutesBeforeEvent = 0;
|
|
33
|
-
_this.initAttributes(props);
|
|
34
|
-
return _this;
|
|
35
|
-
}
|
|
36
|
-
EventNotification.attributes = {
|
|
37
|
-
type: attributes_1.default.String({
|
|
38
|
-
modelKey: 'type',
|
|
39
|
-
}),
|
|
40
|
-
minutesBeforeEvent: attributes_1.default.Number({
|
|
41
|
-
modelKey: 'minutesBeforeEvent',
|
|
42
|
-
jsonKey: 'minutes_before_event',
|
|
43
|
-
}),
|
|
44
|
-
url: attributes_1.default.String({
|
|
45
|
-
modelKey: 'url',
|
|
46
|
-
}),
|
|
47
|
-
payload: attributes_1.default.String({
|
|
48
|
-
modelKey: 'payload',
|
|
49
|
-
}),
|
|
50
|
-
subject: attributes_1.default.String({
|
|
51
|
-
modelKey: 'subject',
|
|
52
|
-
}),
|
|
53
|
-
body: attributes_1.default.String({
|
|
54
|
-
modelKey: 'body',
|
|
55
|
-
}),
|
|
56
|
-
message: attributes_1.default.String({
|
|
57
|
-
modelKey: 'message',
|
|
58
|
-
}),
|
|
59
|
-
};
|
|
60
|
-
return EventNotification;
|
|
61
|
-
}(model_1.default));
|
|
62
|
-
exports.default = EventNotification;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Attribute } from './attributes';
|
|
2
|
-
import Model from './model';
|
|
3
|
-
export declare type EventParticipantProperties = {
|
|
4
|
-
email: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
comment?: string;
|
|
7
|
-
phoneNumber?: string;
|
|
8
|
-
status?: string;
|
|
9
|
-
};
|
|
10
|
-
export default class EventParticipant extends Model implements EventParticipantProperties {
|
|
11
|
-
email: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
comment?: string;
|
|
14
|
-
phoneNumber?: string;
|
|
15
|
-
status?: string;
|
|
16
|
-
static attributes: Record<string, Attribute>;
|
|
17
|
-
constructor(props?: EventParticipantProperties);
|
|
18
|
-
toJSON(enforceReadOnly?: boolean): Record<string, string>;
|
|
19
|
-
}
|
|
@@ -1,56 +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 attributes_1 = __importDefault(require("./attributes"));
|
|
20
|
-
var model_1 = __importDefault(require("./model"));
|
|
21
|
-
var EventParticipant = /** @class */ (function (_super) {
|
|
22
|
-
__extends(EventParticipant, _super);
|
|
23
|
-
function EventParticipant(props) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.email = '';
|
|
26
|
-
_this.initAttributes(props);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
EventParticipant.prototype.toJSON = function (enforceReadOnly) {
|
|
30
|
-
var json = _super.prototype.toJSON.call(this, enforceReadOnly);
|
|
31
|
-
if (!json['name']) {
|
|
32
|
-
json['name'] = json['email'];
|
|
33
|
-
}
|
|
34
|
-
return json;
|
|
35
|
-
};
|
|
36
|
-
EventParticipant.attributes = {
|
|
37
|
-
name: attributes_1.default.String({
|
|
38
|
-
modelKey: 'name',
|
|
39
|
-
}),
|
|
40
|
-
email: attributes_1.default.String({
|
|
41
|
-
modelKey: 'email',
|
|
42
|
-
}),
|
|
43
|
-
comment: attributes_1.default.String({
|
|
44
|
-
modelKey: 'comment',
|
|
45
|
-
}),
|
|
46
|
-
phoneNumber: attributes_1.default.String({
|
|
47
|
-
modelKey: 'phoneNumber',
|
|
48
|
-
jsonKey: 'phone_number',
|
|
49
|
-
}),
|
|
50
|
-
status: attributes_1.default.String({
|
|
51
|
-
modelKey: 'status',
|
|
52
|
-
}),
|
|
53
|
-
};
|
|
54
|
-
return EventParticipant;
|
|
55
|
-
}(model_1.default));
|
|
56
|
-
exports.default = EventParticipant;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Attribute } from './attributes';
|
|
2
|
-
import Model from './model';
|
|
3
|
-
export declare enum EventReminderMethod {
|
|
4
|
-
Email = "email",
|
|
5
|
-
Popup = "popup",
|
|
6
|
-
Display = "display",
|
|
7
|
-
Sound = "sound"
|
|
8
|
-
}
|
|
9
|
-
export declare type EventReminderProperties = {
|
|
10
|
-
reminderMinutes?: string;
|
|
11
|
-
reminderMethod?: EventReminderMethod;
|
|
12
|
-
};
|
|
13
|
-
export declare class EventReminder extends Model implements EventReminderProperties {
|
|
14
|
-
reminderMinutes?: string;
|
|
15
|
-
reminderMethod?: EventReminderMethod;
|
|
16
|
-
static attributes: Record<string, Attribute>;
|
|
17
|
-
constructor(props?: EventReminderProperties);
|
|
18
|
-
}
|
|
@@ -1,47 +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 attributes_1 = __importDefault(require("./attributes"));
|
|
20
|
-
var model_1 = __importDefault(require("./model"));
|
|
21
|
-
var EventReminderMethod;
|
|
22
|
-
(function (EventReminderMethod) {
|
|
23
|
-
EventReminderMethod["Email"] = "email";
|
|
24
|
-
EventReminderMethod["Popup"] = "popup";
|
|
25
|
-
EventReminderMethod["Display"] = "display";
|
|
26
|
-
EventReminderMethod["Sound"] = "sound";
|
|
27
|
-
})(EventReminderMethod = exports.EventReminderMethod || (exports.EventReminderMethod = {}));
|
|
28
|
-
var EventReminder = /** @class */ (function (_super) {
|
|
29
|
-
__extends(EventReminder, _super);
|
|
30
|
-
function EventReminder(props) {
|
|
31
|
-
var _this = _super.call(this) || this;
|
|
32
|
-
_this.initAttributes(props);
|
|
33
|
-
return _this;
|
|
34
|
-
}
|
|
35
|
-
EventReminder.attributes = {
|
|
36
|
-
reminderMinutes: attributes_1.default.String({
|
|
37
|
-
modelKey: 'reminderMinutes',
|
|
38
|
-
jsonKey: 'reminder_minutes',
|
|
39
|
-
}),
|
|
40
|
-
reminderMethod: attributes_1.default.String({
|
|
41
|
-
modelKey: 'reminderMethod',
|
|
42
|
-
jsonKey: 'reminder_method',
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
return EventReminder;
|
|
46
|
-
}(model_1.default));
|
|
47
|
-
exports.EventReminder = EventReminder;
|
package/lib/models/event.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import RestfulModel, { SaveCallback } from './restful-model';
|
|
2
|
-
import { Attribute } from './attributes';
|
|
3
|
-
import EventParticipant, { EventParticipantProperties } from './event-participant';
|
|
4
|
-
import EventConferencing, { EventConferencingProperties } from './event-conferencing';
|
|
5
|
-
import When, { WhenProperties } from './when';
|
|
6
|
-
import NylasConnection from '../nylas-connection';
|
|
7
|
-
import EventNotification, { EventNotificationProperties } from './event-notification';
|
|
8
|
-
import { EventReminder, EventReminderMethod, EventReminderProperties } from './event-reminder-method';
|
|
9
|
-
export declare enum ICSMethod {
|
|
10
|
-
Request = "request",
|
|
11
|
-
Publish = "publish",
|
|
12
|
-
Reply = "reply",
|
|
13
|
-
Add = "add",
|
|
14
|
-
Cancel = "cancel",
|
|
15
|
-
Refresh = "refresh"
|
|
16
|
-
}
|
|
17
|
-
export declare type ICSOptions = {
|
|
18
|
-
iCalUID?: string;
|
|
19
|
-
prodId?: string;
|
|
20
|
-
method?: ICSMethod;
|
|
21
|
-
};
|
|
22
|
-
export declare type EventProperties = {
|
|
23
|
-
calendarId: string;
|
|
24
|
-
when: WhenProperties;
|
|
25
|
-
iCalUID?: string;
|
|
26
|
-
messageId?: string;
|
|
27
|
-
eventCollectionId?: string | number;
|
|
28
|
-
title?: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
owner?: string;
|
|
31
|
-
participants?: EventParticipantProperties[];
|
|
32
|
-
readOnly?: boolean;
|
|
33
|
-
location?: string;
|
|
34
|
-
busy?: boolean;
|
|
35
|
-
status?: string;
|
|
36
|
-
recurrence?: {
|
|
37
|
-
rrule: string[];
|
|
38
|
-
timezone: string;
|
|
39
|
-
};
|
|
40
|
-
masterEventId?: string;
|
|
41
|
-
originalStartTime?: Date;
|
|
42
|
-
capacity?: number;
|
|
43
|
-
conferencing?: EventConferencingProperties;
|
|
44
|
-
notifications?: EventNotificationProperties[];
|
|
45
|
-
roundRobinOrder?: string[];
|
|
46
|
-
metadata?: object;
|
|
47
|
-
jobStatusId?: string;
|
|
48
|
-
organizerEmail?: string;
|
|
49
|
-
organizerName?: string;
|
|
50
|
-
hideParticipants?: boolean;
|
|
51
|
-
visibility?: string;
|
|
52
|
-
customerEventId?: string;
|
|
53
|
-
reminderMinutes?: string;
|
|
54
|
-
reminderMethod?: EventReminderMethod;
|
|
55
|
-
reminders?: EventReminderProperties;
|
|
56
|
-
};
|
|
57
|
-
export default class Event extends RestfulModel {
|
|
58
|
-
calendarId: string;
|
|
59
|
-
when: When;
|
|
60
|
-
iCalUID?: string;
|
|
61
|
-
messageId?: string;
|
|
62
|
-
eventCollectionId?: string | number;
|
|
63
|
-
title?: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
owner?: string;
|
|
66
|
-
participants?: EventParticipant[];
|
|
67
|
-
readOnly?: boolean;
|
|
68
|
-
location?: string;
|
|
69
|
-
busy?: boolean;
|
|
70
|
-
status?: string;
|
|
71
|
-
recurrence?: {
|
|
72
|
-
rrule: string[];
|
|
73
|
-
timezone: string;
|
|
74
|
-
};
|
|
75
|
-
masterEventId?: string;
|
|
76
|
-
originalStartTime?: Date;
|
|
77
|
-
capacity?: number;
|
|
78
|
-
conferencing?: EventConferencing;
|
|
79
|
-
readonly reminders?: EventReminder;
|
|
80
|
-
reminderMinutes?: string;
|
|
81
|
-
reminderMethod?: EventReminderMethod;
|
|
82
|
-
notifications?: EventNotification[];
|
|
83
|
-
roundRobinOrder?: string[];
|
|
84
|
-
metadata?: object;
|
|
85
|
-
jobStatusId?: string;
|
|
86
|
-
organizerEmail?: string;
|
|
87
|
-
organizerName?: string;
|
|
88
|
-
hideParticipants?: boolean;
|
|
89
|
-
visibility?: string;
|
|
90
|
-
customerEventId?: string;
|
|
91
|
-
static collectionName: string;
|
|
92
|
-
static attributes: Record<string, Attribute>;
|
|
93
|
-
constructor(connection: NylasConnection, props?: EventProperties);
|
|
94
|
-
get start(): string | number | undefined;
|
|
95
|
-
set start(val: string | number | undefined);
|
|
96
|
-
get end(): string | number | undefined;
|
|
97
|
-
set end(val: string | number | undefined);
|
|
98
|
-
deleteRequestQueryString(params?: Record<string, unknown>): Record<string, unknown>;
|
|
99
|
-
save(params?: {} | SaveCallback, callback?: SaveCallback): Promise<this>;
|
|
100
|
-
saveRequestBody(): Record<string, unknown>;
|
|
101
|
-
rsvp(status: string, comment: string, callback?: (error: Error | null, data?: Event) => void): Promise<Event>;
|
|
102
|
-
generateICS(options?: ICSOptions): Promise<string>;
|
|
103
|
-
private validate;
|
|
104
|
-
}
|