nylas 5.10.0 → 5.10.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.
@@ -27,4 +27,5 @@ export default class SchedulerBookingRequest extends RestfulModel {
27
27
  replacesBookingHash?: string;
28
28
  slot?: SchedulerTimeSlot;
29
29
  timezone?: string;
30
+ toJSON(enforceReadOnly?: boolean): Record<string, any>;
30
31
  }
@@ -93,6 +93,20 @@ var SchedulerBookingRequest = /** @class */ (function (_super) {
93
93
  function SchedulerBookingRequest() {
94
94
  return _super !== null && _super.apply(this, arguments) || this;
95
95
  }
96
+ /*
97
+ * The booking endpoint requires additional_values and additional_emails
98
+ to exist regardless if they are empty or not
99
+ */
100
+ SchedulerBookingRequest.prototype.toJSON = function (enforceReadOnly) {
101
+ var json = _super.prototype.toJSON.call(this, enforceReadOnly);
102
+ if (!this.additionalEmails) {
103
+ json['additional_emails'] = [];
104
+ }
105
+ if (!this.additionalValues) {
106
+ json['additional_values'] = {};
107
+ }
108
+ return json;
109
+ };
96
110
  return SchedulerBookingRequest;
97
111
  }(restful_model_1.default));
98
112
  exports.default = SchedulerBookingRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "5.10.0",
3
+ "version": "5.10.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",