nylas 7.5.1 → 7.5.2

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.
@@ -112,7 +112,8 @@ class APIClient {
112
112
  requestOptions.headers = this.setRequestHeaders(optionParams);
113
113
  requestOptions.method = optionParams.method;
114
114
  if (optionParams.body) {
115
- requestOptions.body = JSON.stringify((0, utils_js_1.objKeysToSnakeCase)(optionParams.body));
115
+ requestOptions.body = JSON.stringify((0, utils_js_1.objKeysToSnakeCase)(optionParams.body, ['metadata']) // metadata should remain as is
116
+ );
116
117
  requestOptions.headers['Content-Type'] = 'application/json';
117
118
  }
118
119
  if (optionParams.form) {
@@ -136,7 +137,7 @@ class APIClient {
136
137
  const text = await response.text();
137
138
  try {
138
139
  const responseJSON = JSON.parse(text);
139
- return (0, utils_js_1.objKeysToCamelCase)(responseJSON);
140
+ return (0, utils_js_1.objKeysToCamelCase)(responseJSON, ['metadata']);
140
141
  }
141
142
  catch (e) {
142
143
  throw new Error(`Could not parse response from the server: ${text}`);
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
4
  // This file is generated by scripts/exportVersion.js
5
- exports.SDK_VERSION = '7.5.1';
5
+ exports.SDK_VERSION = '7.5.2';
@@ -110,7 +110,8 @@ export default class APIClient {
110
110
  requestOptions.headers = this.setRequestHeaders(optionParams);
111
111
  requestOptions.method = optionParams.method;
112
112
  if (optionParams.body) {
113
- requestOptions.body = JSON.stringify(objKeysToSnakeCase(optionParams.body));
113
+ requestOptions.body = JSON.stringify(objKeysToSnakeCase(optionParams.body, ['metadata']) // metadata should remain as is
114
+ );
114
115
  requestOptions.headers['Content-Type'] = 'application/json';
115
116
  }
116
117
  if (optionParams.form) {
@@ -134,7 +135,7 @@ export default class APIClient {
134
135
  const text = await response.text();
135
136
  try {
136
137
  const responseJSON = JSON.parse(text);
137
- return objKeysToCamelCase(responseJSON);
138
+ return objKeysToCamelCase(responseJSON, ['metadata']);
138
139
  }
139
140
  catch (e) {
140
141
  throw new Error(`Could not parse response from the server: ${text}`);
@@ -1,2 +1,2 @@
1
1
  // This file is generated by scripts/exportVersion.js
2
- export const SDK_VERSION = '7.5.1';
2
+ export const SDK_VERSION = '7.5.2';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "7.5.1";
1
+ export declare const SDK_VERSION = "7.5.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "7.5.1",
3
+ "version": "7.5.2",
4
4
  "description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.",
5
5
  "main": "lib/cjs/nylas.js",
6
6
  "types": "lib/types/nylas.d.ts",