nylas 6.0.0 → 6.1.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.
- package/lib/models/access-token.d.ts +2 -0
- package/lib/models/access-token.js +21 -21
- package/lib/models/account.d.ts +4 -0
- package/lib/models/account.js +25 -25
- package/lib/models/application-details.d.ts +2 -0
- package/lib/models/application-details.js +14 -14
- package/lib/models/calendar-availability.d.ts +9 -3
- package/lib/models/calendar-availability.js +41 -41
- package/lib/models/calendar-restful-model-collection.d.ts +2 -0
- package/lib/models/calendar-restful-model-collection.js +72 -55
- package/lib/models/calendar.d.ts +3 -0
- package/lib/models/calendar.js +24 -24
- package/lib/models/component.d.ts +3 -0
- package/lib/models/component.js +33 -33
- package/lib/models/connect.d.ts +3 -0
- package/lib/models/connect.js +47 -47
- package/lib/models/contact.d.ts +9 -0
- package/lib/models/contact.js +144 -144
- package/lib/models/draft.d.ts +3 -0
- package/lib/models/draft.js +10 -10
- package/lib/models/email-participant.d.ts +2 -0
- package/lib/models/email-participant.js +8 -8
- package/lib/models/event-conferencing.d.ts +3 -0
- package/lib/models/event-conferencing.js +30 -30
- package/lib/models/event-notification.d.ts +2 -0
- package/lib/models/event-notification.js +24 -24
- package/lib/models/event-participant.d.ts +6 -0
- package/lib/models/event-participant.js +19 -12
- package/lib/models/event.d.ts +17 -0
- package/lib/models/event.js +92 -61
- package/lib/models/file.d.ts +3 -0
- package/lib/models/file.js +21 -21
- package/lib/models/folder.d.ts +4 -0
- package/lib/models/folder.js +13 -13
- package/lib/models/free-busy.d.ts +15 -1
- package/lib/models/free-busy.js +51 -29
- package/lib/models/job-status.d.ts +3 -0
- package/lib/models/job-status.js +20 -20
- package/lib/models/management-account.d.ts +5 -0
- package/lib/models/management-account.js +46 -46
- package/lib/models/message.d.ts +3 -0
- package/lib/models/message.js +54 -54
- package/lib/models/model.d.ts +1 -0
- package/lib/models/model.js +5 -0
- package/lib/models/neural-categorizer.d.ts +4 -0
- package/lib/models/neural-categorizer.js +21 -21
- package/lib/models/neural-clean-conversation.d.ts +3 -0
- package/lib/models/neural-clean-conversation.js +7 -7
- package/lib/models/neural-ocr.d.ts +3 -0
- package/lib/models/neural-ocr.js +7 -7
- package/lib/models/neural-sentiment-analysis.d.ts +3 -0
- package/lib/models/neural-sentiment-analysis.js +21 -21
- package/lib/models/neural-signature-contact.d.ts +4 -0
- package/lib/models/neural-signature-contact.js +39 -39
- package/lib/models/neural-signature-extraction.d.ts +3 -0
- package/lib/models/neural-signature-extraction.js +10 -10
- package/lib/models/neural.d.ts +2 -0
- package/lib/models/neural.js +26 -26
- package/lib/models/resource.d.ts +3 -0
- package/lib/models/resource.js +31 -31
- package/lib/models/restful-model.d.ts +2 -1
- package/lib/models/restful-model.js +15 -20
- package/lib/models/scheduler-booking-request.d.ts +3 -0
- package/lib/models/scheduler-booking-request.js +93 -93
- package/lib/models/scheduler-time-slot.d.ts +2 -0
- package/lib/models/scheduler-time-slot.js +23 -23
- package/lib/models/scheduler.d.ts +10 -0
- package/lib/models/scheduler.js +247 -247
- package/lib/models/thread.d.ts +3 -0
- package/lib/models/thread.js +50 -50
- package/lib/models/webhook.d.ts +3 -0
- package/lib/models/webhook.js +23 -23
- package/lib/models/when.d.ts +3 -0
- package/lib/models/when.js +35 -27
- package/package.json +1 -1
package/lib/models/thread.js
CHANGED
|
@@ -72,56 +72,56 @@ var Thread = /** @class */ (function (_super) {
|
|
|
72
72
|
if (params === void 0) { params = {}; }
|
|
73
73
|
return _super.prototype.save.call(this, params, callback);
|
|
74
74
|
};
|
|
75
|
+
Thread.collectionName = 'threads';
|
|
76
|
+
Thread.attributes = __assign(__assign({}, restful_model_1.default.attributes), { subject: attributes_1.default.String({
|
|
77
|
+
modelKey: 'subject',
|
|
78
|
+
}), participants: attributes_1.default.Collection({
|
|
79
|
+
modelKey: 'participants',
|
|
80
|
+
itemClass: email_participant_1.default,
|
|
81
|
+
}), lastMessageTimestamp: attributes_1.default.DateTime({
|
|
82
|
+
modelKey: 'lastMessageTimestamp',
|
|
83
|
+
jsonKey: 'last_message_timestamp',
|
|
84
|
+
}), lastMessageReceivedTimestamp: attributes_1.default.DateTime({
|
|
85
|
+
modelKey: 'lastMessageReceivedTimestamp',
|
|
86
|
+
jsonKey: 'last_message_received_timestamp',
|
|
87
|
+
}), lastMessageSentTimestamp: attributes_1.default.DateTime({
|
|
88
|
+
modelKey: 'lastMessageSentTimestamp',
|
|
89
|
+
jsonKey: 'last_message_sent_timestamp',
|
|
90
|
+
}), firstMessageTimestamp: attributes_1.default.DateTime({
|
|
91
|
+
modelKey: 'firstMessageTimestamp',
|
|
92
|
+
jsonKey: 'first_message_timestamp',
|
|
93
|
+
}), snippet: attributes_1.default.String({
|
|
94
|
+
modelKey: 'snippet',
|
|
95
|
+
}), unread: attributes_1.default.Boolean({
|
|
96
|
+
modelKey: 'unread',
|
|
97
|
+
}), starred: attributes_1.default.Boolean({
|
|
98
|
+
modelKey: 'starred',
|
|
99
|
+
}), hasAttachments: attributes_1.default.Boolean({
|
|
100
|
+
modelKey: 'has_attachments',
|
|
101
|
+
}), version: attributes_1.default.String({
|
|
102
|
+
modelKey: 'version',
|
|
103
|
+
jsonKey: 'version',
|
|
104
|
+
}), folders: attributes_1.default.Collection({
|
|
105
|
+
modelKey: 'folders',
|
|
106
|
+
itemClass: folder_1.default,
|
|
107
|
+
jsonKey: 'folders',
|
|
108
|
+
}), labels: attributes_1.default.Collection({
|
|
109
|
+
modelKey: 'labels',
|
|
110
|
+
itemClass: folder_1.Label,
|
|
111
|
+
jsonKey: 'labels',
|
|
112
|
+
}), messageIds: attributes_1.default.StringList({
|
|
113
|
+
modelKey: 'messageIds',
|
|
114
|
+
jsonKey: 'message_ids',
|
|
115
|
+
}), draftIds: attributes_1.default.StringList({
|
|
116
|
+
modelKey: 'draftIds',
|
|
117
|
+
jsonKey: 'draft_ids',
|
|
118
|
+
}), messages: attributes_1.default.Collection({
|
|
119
|
+
modelKey: 'messages',
|
|
120
|
+
itemClass: message_1.default,
|
|
121
|
+
}), drafts: attributes_1.default.Collection({
|
|
122
|
+
modelKey: 'drafts',
|
|
123
|
+
itemClass: message_1.default,
|
|
124
|
+
}) });
|
|
75
125
|
return Thread;
|
|
76
126
|
}(restful_model_1.default));
|
|
77
127
|
exports.default = Thread;
|
|
78
|
-
Thread.collectionName = 'threads';
|
|
79
|
-
Thread.attributes = __assign(__assign({}, restful_model_1.default.attributes), { subject: attributes_1.default.String({
|
|
80
|
-
modelKey: 'subject',
|
|
81
|
-
}), participants: attributes_1.default.Collection({
|
|
82
|
-
modelKey: 'participants',
|
|
83
|
-
itemClass: email_participant_1.default,
|
|
84
|
-
}), lastMessageTimestamp: attributes_1.default.DateTime({
|
|
85
|
-
modelKey: 'lastMessageTimestamp',
|
|
86
|
-
jsonKey: 'last_message_timestamp',
|
|
87
|
-
}), lastMessageReceivedTimestamp: attributes_1.default.DateTime({
|
|
88
|
-
modelKey: 'lastMessageReceivedTimestamp',
|
|
89
|
-
jsonKey: 'last_message_received_timestamp',
|
|
90
|
-
}), lastMessageSentTimestamp: attributes_1.default.DateTime({
|
|
91
|
-
modelKey: 'lastMessageSentTimestamp',
|
|
92
|
-
jsonKey: 'last_message_sent_timestamp',
|
|
93
|
-
}), firstMessageTimestamp: attributes_1.default.DateTime({
|
|
94
|
-
modelKey: 'firstMessageTimestamp',
|
|
95
|
-
jsonKey: 'first_message_timestamp',
|
|
96
|
-
}), snippet: attributes_1.default.String({
|
|
97
|
-
modelKey: 'snippet',
|
|
98
|
-
}), unread: attributes_1.default.Boolean({
|
|
99
|
-
modelKey: 'unread',
|
|
100
|
-
}), starred: attributes_1.default.Boolean({
|
|
101
|
-
modelKey: 'starred',
|
|
102
|
-
}), hasAttachments: attributes_1.default.Boolean({
|
|
103
|
-
modelKey: 'has_attachments',
|
|
104
|
-
}), version: attributes_1.default.String({
|
|
105
|
-
modelKey: 'version',
|
|
106
|
-
jsonKey: 'version',
|
|
107
|
-
}), folders: attributes_1.default.Collection({
|
|
108
|
-
modelKey: 'folders',
|
|
109
|
-
itemClass: folder_1.default,
|
|
110
|
-
jsonKey: 'folders',
|
|
111
|
-
}), labels: attributes_1.default.Collection({
|
|
112
|
-
modelKey: 'labels',
|
|
113
|
-
itemClass: folder_1.Label,
|
|
114
|
-
jsonKey: 'labels',
|
|
115
|
-
}), messageIds: attributes_1.default.StringList({
|
|
116
|
-
modelKey: 'messageIds',
|
|
117
|
-
jsonKey: 'message_ids',
|
|
118
|
-
}), draftIds: attributes_1.default.StringList({
|
|
119
|
-
modelKey: 'draftIds',
|
|
120
|
-
jsonKey: 'draft_ids',
|
|
121
|
-
}), messages: attributes_1.default.Collection({
|
|
122
|
-
modelKey: 'messages',
|
|
123
|
-
itemClass: message_1.default,
|
|
124
|
-
}), drafts: attributes_1.default.Collection({
|
|
125
|
-
modelKey: 'drafts',
|
|
126
|
-
itemClass: message_1.default,
|
|
127
|
-
}) });
|
package/lib/models/webhook.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ManagementModel from './management-model';
|
|
2
|
+
import { Attribute } from './attributes';
|
|
2
3
|
import { SaveCallback } from './restful-model';
|
|
3
4
|
import NylasConnection from '../nylas-connection';
|
|
4
5
|
export declare type WebhookProperties = {
|
|
@@ -16,6 +17,8 @@ export default class Webhook extends ManagementModel implements WebhookPropertie
|
|
|
16
17
|
id?: string;
|
|
17
18
|
applicationId?: string;
|
|
18
19
|
version?: string;
|
|
20
|
+
static collectionName: string;
|
|
21
|
+
static attributes: Record<string, Attribute>;
|
|
19
22
|
constructor(connection: NylasConnection, clientId: string, props: WebhookProperties);
|
|
20
23
|
pathPrefix(): string;
|
|
21
24
|
saveRequestBody(): Record<string, unknown>;
|
package/lib/models/webhook.js
CHANGED
|
@@ -48,29 +48,29 @@ var Webhook = /** @class */ (function (_super) {
|
|
|
48
48
|
if (params === void 0) { params = {}; }
|
|
49
49
|
return _super.prototype.save.call(this, params, callback);
|
|
50
50
|
};
|
|
51
|
+
Webhook.collectionName = 'webhooks';
|
|
52
|
+
Webhook.attributes = {
|
|
53
|
+
id: attributes_1.default.String({
|
|
54
|
+
modelKey: 'id',
|
|
55
|
+
}),
|
|
56
|
+
applicationId: attributes_1.default.String({
|
|
57
|
+
modelKey: 'applicationId',
|
|
58
|
+
jsonKey: 'application_id',
|
|
59
|
+
}),
|
|
60
|
+
callbackUrl: attributes_1.default.String({
|
|
61
|
+
modelKey: 'callbackUrl',
|
|
62
|
+
jsonKey: 'callback_url',
|
|
63
|
+
}),
|
|
64
|
+
state: attributes_1.default.String({
|
|
65
|
+
modelKey: 'state',
|
|
66
|
+
}),
|
|
67
|
+
triggers: attributes_1.default.StringList({
|
|
68
|
+
modelKey: 'triggers',
|
|
69
|
+
}),
|
|
70
|
+
version: attributes_1.default.String({
|
|
71
|
+
modelKey: 'version',
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
51
74
|
return Webhook;
|
|
52
75
|
}(management_model_1.default));
|
|
53
76
|
exports.default = Webhook;
|
|
54
|
-
Webhook.collectionName = 'webhooks';
|
|
55
|
-
Webhook.attributes = {
|
|
56
|
-
id: attributes_1.default.String({
|
|
57
|
-
modelKey: 'id',
|
|
58
|
-
}),
|
|
59
|
-
applicationId: attributes_1.default.String({
|
|
60
|
-
modelKey: 'applicationId',
|
|
61
|
-
jsonKey: 'application_id',
|
|
62
|
-
}),
|
|
63
|
-
callbackUrl: attributes_1.default.String({
|
|
64
|
-
modelKey: 'callbackUrl',
|
|
65
|
-
jsonKey: 'callback_url',
|
|
66
|
-
}),
|
|
67
|
-
state: attributes_1.default.String({
|
|
68
|
-
modelKey: 'state',
|
|
69
|
-
}),
|
|
70
|
-
triggers: attributes_1.default.StringList({
|
|
71
|
-
modelKey: 'triggers',
|
|
72
|
-
}),
|
|
73
|
-
version: attributes_1.default.String({
|
|
74
|
-
modelKey: 'version',
|
|
75
|
-
}),
|
|
76
|
-
};
|
package/lib/models/when.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Model from './model';
|
|
2
|
+
import { Attribute } from './attributes';
|
|
2
3
|
export declare type WhenProperties = {
|
|
3
4
|
startTime?: number;
|
|
4
5
|
endTime?: number;
|
|
@@ -16,5 +17,7 @@ export default class When extends Model implements WhenProperties {
|
|
|
16
17
|
endDate?: string;
|
|
17
18
|
date?: string;
|
|
18
19
|
object?: string;
|
|
20
|
+
static attributes: Record<string, Attribute>;
|
|
19
21
|
constructor(props?: WhenProperties);
|
|
22
|
+
isSet(): boolean;
|
|
20
23
|
}
|
package/lib/models/when.js
CHANGED
|
@@ -25,33 +25,41 @@ var When = /** @class */ (function (_super) {
|
|
|
25
25
|
_this.initAttributes(props);
|
|
26
26
|
return _this;
|
|
27
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
|
+
time: attributes_1.default.Number({
|
|
45
|
+
modelKey: 'time',
|
|
46
|
+
}),
|
|
47
|
+
startDate: attributes_1.default.String({
|
|
48
|
+
modelKey: 'startDate',
|
|
49
|
+
jsonKey: 'start_date',
|
|
50
|
+
}),
|
|
51
|
+
endDate: attributes_1.default.String({
|
|
52
|
+
modelKey: 'endDate',
|
|
53
|
+
jsonKey: 'end_date',
|
|
54
|
+
}),
|
|
55
|
+
date: attributes_1.default.String({
|
|
56
|
+
modelKey: 'date',
|
|
57
|
+
}),
|
|
58
|
+
object: attributes_1.default.String({
|
|
59
|
+
modelKey: 'object',
|
|
60
|
+
readOnly: true,
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
28
63
|
return When;
|
|
29
64
|
}(model_1.default));
|
|
30
65
|
exports.default = When;
|
|
31
|
-
When.attributes = {
|
|
32
|
-
startTime: attributes_1.default.Number({
|
|
33
|
-
modelKey: 'startTime',
|
|
34
|
-
jsonKey: 'start_time',
|
|
35
|
-
}),
|
|
36
|
-
endTime: attributes_1.default.Number({
|
|
37
|
-
modelKey: 'endTime',
|
|
38
|
-
jsonKey: 'end_time',
|
|
39
|
-
}),
|
|
40
|
-
time: attributes_1.default.Number({
|
|
41
|
-
modelKey: 'time',
|
|
42
|
-
}),
|
|
43
|
-
startDate: attributes_1.default.String({
|
|
44
|
-
modelKey: 'startDate',
|
|
45
|
-
jsonKey: 'start_date',
|
|
46
|
-
}),
|
|
47
|
-
endDate: attributes_1.default.String({
|
|
48
|
-
modelKey: 'endDate',
|
|
49
|
-
jsonKey: 'end_date',
|
|
50
|
-
}),
|
|
51
|
-
date: attributes_1.default.String({
|
|
52
|
-
modelKey: 'date',
|
|
53
|
-
}),
|
|
54
|
-
object: attributes_1.default.String({
|
|
55
|
-
modelKey: 'object',
|
|
56
|
-
}),
|
|
57
|
-
};
|