nylas 5.10.2 → 5.10.3
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/calendar.js +1 -0
- package/lib/models/contact.d.ts +1 -0
- package/lib/models/contact.js +4 -0
- package/lib/models/folder.d.ts +1 -0
- package/lib/models/folder.js +4 -0
- package/lib/models/job-status.d.ts +3 -0
- package/lib/models/job-status.js +12 -0
- package/lib/models/message.d.ts +1 -0
- package/lib/models/message.js +4 -0
- package/lib/nylas.d.ts +1 -0
- package/lib/nylas.js +3 -0
- package/package.json +1 -1
package/lib/models/calendar.js
CHANGED
|
@@ -79,6 +79,7 @@ Calendar.attributes = __assign(__assign({}, restful_model_1.default.attributes),
|
|
|
79
79
|
}), jobStatusId: attributes_1.default.String({
|
|
80
80
|
modelKey: 'jobStatusId',
|
|
81
81
|
jsonKey: 'job_status_id',
|
|
82
|
+
readOnly: true,
|
|
82
83
|
}), metadata: attributes_1.default.Object({
|
|
83
84
|
modelKey: 'metadata',
|
|
84
85
|
}) });
|
package/lib/models/contact.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ export declare class Contact extends RestfulModel {
|
|
|
67
67
|
webPages?: WebPage[];
|
|
68
68
|
groups?: Group[];
|
|
69
69
|
source?: string;
|
|
70
|
+
jobStatusId?: string;
|
|
70
71
|
save(params?: {} | SaveCallback, callback?: SaveCallback): Promise<this>;
|
|
71
72
|
getPicture(params?: {
|
|
72
73
|
[key: string]: any;
|
package/lib/models/contact.js
CHANGED
|
@@ -242,4 +242,8 @@ Contact.attributes = __assign(__assign({}, restful_model_1.default.attributes),
|
|
|
242
242
|
itemClass: Group,
|
|
243
243
|
}), source: attributes_1.default.String({
|
|
244
244
|
modelKey: 'source',
|
|
245
|
+
}), jobStatusId: attributes_1.default.String({
|
|
246
|
+
modelKey: 'jobStatusId',
|
|
247
|
+
jsonKey: 'job_status_id',
|
|
248
|
+
readOnly: true,
|
|
245
249
|
}) });
|
package/lib/models/folder.d.ts
CHANGED
package/lib/models/folder.js
CHANGED
|
@@ -55,6 +55,10 @@ Folder.attributes = __assign(__assign({}, restful_model_1.default.attributes), {
|
|
|
55
55
|
}), displayName: attributes_1.default.String({
|
|
56
56
|
modelKey: 'displayName',
|
|
57
57
|
jsonKey: 'display_name',
|
|
58
|
+
}), jobStatusId: attributes_1.default.String({
|
|
59
|
+
modelKey: 'jobStatusId',
|
|
60
|
+
jsonKey: 'job_status_id',
|
|
61
|
+
readOnly: true,
|
|
58
62
|
}) });
|
|
59
63
|
var Label = /** @class */ (function (_super) {
|
|
60
64
|
__extends(Label, _super);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import RestfulModel from './restful-model';
|
|
2
|
+
import Message from './message';
|
|
2
3
|
export default class JobStatus extends RestfulModel {
|
|
3
4
|
action?: string;
|
|
4
5
|
createdAt?: Date;
|
|
5
6
|
jobStatusId?: string;
|
|
6
7
|
status?: string;
|
|
8
|
+
originalData?: Message;
|
|
9
|
+
isSuccessful(): boolean;
|
|
7
10
|
}
|
package/lib/models/job-status.js
CHANGED
|
@@ -34,18 +34,30 @@ var JobStatus = /** @class */ (function (_super) {
|
|
|
34
34
|
function JobStatus() {
|
|
35
35
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
36
|
}
|
|
37
|
+
// Returns the status of a job as a boolean
|
|
38
|
+
JobStatus.prototype.isSuccessful = function () {
|
|
39
|
+
return this.status === 'successful';
|
|
40
|
+
};
|
|
37
41
|
return JobStatus;
|
|
38
42
|
}(restful_model_1.default));
|
|
39
43
|
exports.default = JobStatus;
|
|
40
44
|
JobStatus.collectionName = 'job-statuses';
|
|
41
45
|
JobStatus.attributes = __assign(__assign({}, restful_model_1.default.attributes), { action: attributes_1.default.String({
|
|
42
46
|
modelKey: 'action',
|
|
47
|
+
readOnly: true,
|
|
43
48
|
}), createdAt: attributes_1.default.DateTime({
|
|
44
49
|
modelKey: 'createdAt',
|
|
45
50
|
jsonKey: 'created_at',
|
|
51
|
+
readOnly: true,
|
|
46
52
|
}), jobStatusId: attributes_1.default.String({
|
|
47
53
|
modelKey: 'jobStatusId',
|
|
48
54
|
jsonKey: 'job_status_id',
|
|
55
|
+
readOnly: true,
|
|
49
56
|
}), status: attributes_1.default.String({
|
|
50
57
|
modelKey: 'status',
|
|
58
|
+
readOnly: true,
|
|
59
|
+
}), originalData: attributes_1.default.Object({
|
|
60
|
+
modelKey: 'originalData',
|
|
61
|
+
jsonKey: 'original_data',
|
|
62
|
+
readOnly: true,
|
|
51
63
|
}) });
|
package/lib/models/message.d.ts
CHANGED
package/lib/models/message.js
CHANGED
|
@@ -154,4 +154,8 @@ Message.attributes = __assign(__assign({}, restful_model_1.default.attributes),
|
|
|
154
154
|
modelKey: 'metadata',
|
|
155
155
|
}), headers: attributes_1.default.Object({
|
|
156
156
|
modelKey: 'headers',
|
|
157
|
+
}), jobStatusId: attributes_1.default.String({
|
|
158
|
+
modelKey: 'jobStatusId',
|
|
159
|
+
jsonKey: 'job_status_id',
|
|
160
|
+
readOnly: true,
|
|
157
161
|
}) });
|
package/lib/nylas.d.ts
CHANGED
package/lib/nylas.js
CHANGED
|
@@ -170,6 +170,9 @@ var Nylas = /** @class */ (function () {
|
|
|
170
170
|
if (options.scopes != null) {
|
|
171
171
|
url += "&scopes=" + options.scopes.join(',');
|
|
172
172
|
}
|
|
173
|
+
if (options.provider != null) {
|
|
174
|
+
url += "&provider=" + options.provider;
|
|
175
|
+
}
|
|
173
176
|
return url;
|
|
174
177
|
};
|
|
175
178
|
Nylas.clientId = '';
|