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.
- package/lib/cjs/apiClient.js +3 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/apiClient.js +3 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/apiClient.js
CHANGED
|
@@ -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}`);
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/apiClient.js
CHANGED
|
@@ -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}`);
|
package/lib/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is generated by scripts/exportVersion.js
|
|
2
|
-
export const SDK_VERSION = '7.5.
|
|
2
|
+
export const SDK_VERSION = '7.5.2';
|
package/lib/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "7.5.
|
|
1
|
+
export declare const SDK_VERSION = "7.5.2";
|