nylas 6.5.0 → 6.5.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 CHANGED
@@ -1,6 +1,11 @@
1
+ <a href="https://www.nylas.com/">
2
+ <img src="https://brand.nylas.com/assets/downloads/logo_horizontal_png/Nylas-Logo-Horizontal-Blue_.png" alt="Aimeos logo" title="Aimeos" align="right" height="60" />
3
+ </a>
4
+
1
5
  # Nylas Node.js SDK
2
6
 
3
7
  [![Travis build status](https://travis-ci.org/nylas/nylas-nodejs.svg?branch=master)](https://travis-ci.org/nylas/nylas-nodejs)
8
+ [![codecov](https://codecov.io/gh/nylas/nylas-nodejs/branch/main/graph/badge.svg?token=94IMGU4F09)](https://codecov.io/gh/nylas/nylas-nodejs)
4
9
 
5
10
  This is the GitHub repository for the Nylas Node SDK and this repo is primarily for anyone who wants to make contributions to the SDK or install it from source. If you are looking to use Node to access the Nylas Email, Calendar, or Contacts API you should refer to our official [Node SDK Quickstart Guide](https://developer.nylas.com/docs/developer-tools/sdk/node-sdk/).
6
11
 
@@ -13,7 +18,7 @@ Here are some resources to help you get started:
13
18
  - [Nylas API Reference](https://developer.nylas.com/docs/api/)
14
19
 
15
20
 
16
- # Install
21
+ ## ⚙️ Install
17
22
 
18
23
  To run the Nylas Node SDK, you will first need to have [Node](https://nodejs.org/en/download/) and [npm](https://www.npmjs.com/get-npm) installed on your machine.
19
24
 
@@ -30,7 +35,7 @@ cd nylas-nodejs
30
35
  npm install
31
36
  ```
32
37
 
33
- # Usage
38
+ ## ⚡️ Usage
34
39
 
35
40
  Every resource (i.e., messages, events, contacts) is accessed via an instance of `Nylas`. Before making any requests, be sure to call `config` and initialize the `Nylas` instance with your `clientId` and `clientSecret`. Then, call `with` and pass it your `accessToken`. The `accessToken` allows `Nylas` to make requests for a given account's resources.
36
41
 
@@ -54,11 +59,11 @@ nylas.threads.list({}).then(threads => {
54
59
 
55
60
  For more information about how to use the Nylas Node SDK, [take a look at our quickstart guide](https://developer.nylas.com/docs/developer-tools/sdk/node-sdk/).
56
61
 
57
- # Contributing
62
+ ## 💙 Contributing
58
63
 
59
64
  Please refer to [Contributing](Contributing.md) for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.
60
65
 
61
- # License
66
+ ## 📝 License
62
67
 
63
68
  This project is licensed under the terms of the MIT license. Please refer to [LICENSE](LICENSE.txt) for the full terms.
64
69
 
@@ -49,7 +49,6 @@ var EventParticipant = /** @class */ (function (_super) {
49
49
  }),
50
50
  status: attributes_1.default.String({
51
51
  modelKey: 'status',
52
- readOnly: true,
53
52
  }),
54
53
  };
55
54
  return EventParticipant;
@@ -44,6 +44,10 @@ export declare type EventProperties = {
44
44
  roundRobinOrder?: string[];
45
45
  metadata?: object;
46
46
  jobStatusId?: string;
47
+ organizerEmail?: string;
48
+ organizerName?: string;
49
+ visibility?: string;
50
+ customerEventId?: string;
47
51
  };
48
52
  export default class Event extends RestfulModel {
49
53
  calendarId: string;
@@ -72,6 +76,10 @@ export default class Event extends RestfulModel {
72
76
  roundRobinOrder?: string[];
73
77
  metadata?: object;
74
78
  jobStatusId?: string;
79
+ organizerEmail?: string;
80
+ organizerName?: string;
81
+ visibility?: string;
82
+ customerEventId?: string;
75
83
  static collectionName: string;
76
84
  static attributes: Record<string, Attribute>;
77
85
  constructor(connection: NylasConnection, props?: EventProperties);
@@ -143,6 +143,10 @@ var Event = /** @class */ (function (_super) {
143
143
  if (!this.notifications) {
144
144
  delete json.notifications;
145
145
  }
146
+ // Participant status cannot be updated
147
+ if (this.id && json.participants) {
148
+ json.participants.forEach(function (participant) { return delete participant.status; });
149
+ }
146
150
  return json;
147
151
  };
148
152
  Event.prototype.rsvp = function (status, comment, callback) {
@@ -273,6 +277,20 @@ var Event = /** @class */ (function (_super) {
273
277
  modelKey: 'jobStatusId',
274
278
  jsonKey: 'job_status_id',
275
279
  readOnly: true,
280
+ }), organizerEmail: attributes_1.default.String({
281
+ modelKey: 'organizerEmail',
282
+ jsonKey: 'organizer_email',
283
+ readOnly: true,
284
+ }), organizerName: attributes_1.default.String({
285
+ modelKey: 'organizerName',
286
+ jsonKey: 'organizer_name',
287
+ readOnly: true,
288
+ }), visibility: attributes_1.default.String({
289
+ modelKey: 'visibility',
290
+ readOnly: true,
291
+ }), customerEventId: attributes_1.default.String({
292
+ modelKey: 'customerEventId',
293
+ jsonKey: 'customer_event_id',
276
294
  }) });
277
295
  return Event;
278
296
  }(restful_model_1.default));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "6.5.0",
3
+ "version": "6.5.1",
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",
@@ -9,6 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "test": "jest",
12
+ "test:coverage": "npm run test -- --coverage",
12
13
  "lint": "eslint --ext .js,.ts -f visualstudio .",
13
14
  "lint:fix": "npm run lint -- --fix",
14
15
  "lint:ci": "npm run lint:fix -- --quiet",