nylas 7.5.0 → 7.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/lib/cjs/apiClient.js +3 -1
- package/lib/cjs/models/availability.js +1 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/apiClient.js +3 -1
- package/lib/esm/models/availability.js +1 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/models/availability.d.ts +2 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/apiClient.js
CHANGED
|
@@ -68,7 +68,6 @@ class APIClient {
|
|
|
68
68
|
const controller = new AbortController();
|
|
69
69
|
const timeout = setTimeout(() => {
|
|
70
70
|
controller.abort();
|
|
71
|
-
throw new error_js_1.NylasSdkTimeoutError(req.url, this.timeout);
|
|
72
71
|
}, this.timeout);
|
|
73
72
|
try {
|
|
74
73
|
const response = await (0, node_fetch_1.default)(req, { signal: controller.signal });
|
|
@@ -100,6 +99,9 @@ class APIClient {
|
|
|
100
99
|
return response;
|
|
101
100
|
}
|
|
102
101
|
catch (error) {
|
|
102
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
103
|
+
throw new error_js_1.NylasSdkTimeoutError(req.url, this.timeout);
|
|
104
|
+
}
|
|
103
105
|
clearTimeout(timeout);
|
|
104
106
|
throw error;
|
|
105
107
|
}
|
|
@@ -8,4 +8,5 @@ var AvailabilityMethod;
|
|
|
8
8
|
(function (AvailabilityMethod) {
|
|
9
9
|
AvailabilityMethod["MaxFairness"] = "max-fairness";
|
|
10
10
|
AvailabilityMethod["MaxAvailability"] = "max-availability";
|
|
11
|
+
AvailabilityMethod["Collective"] = "collective";
|
|
11
12
|
})(AvailabilityMethod = exports.AvailabilityMethod || (exports.AvailabilityMethod = {}));
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/apiClient.js
CHANGED
|
@@ -66,7 +66,6 @@ export default class APIClient {
|
|
|
66
66
|
const controller = new AbortController();
|
|
67
67
|
const timeout = setTimeout(() => {
|
|
68
68
|
controller.abort();
|
|
69
|
-
throw new NylasSdkTimeoutError(req.url, this.timeout);
|
|
70
69
|
}, this.timeout);
|
|
71
70
|
try {
|
|
72
71
|
const response = await fetch(req, { signal: controller.signal });
|
|
@@ -98,6 +97,9 @@ export default class APIClient {
|
|
|
98
97
|
return response;
|
|
99
98
|
}
|
|
100
99
|
catch (error) {
|
|
100
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
101
|
+
throw new NylasSdkTimeoutError(req.url, this.timeout);
|
|
102
|
+
}
|
|
101
103
|
clearTimeout(timeout);
|
|
102
104
|
throw error;
|
|
103
105
|
}
|
|
@@ -5,4 +5,5 @@ export var AvailabilityMethod;
|
|
|
5
5
|
(function (AvailabilityMethod) {
|
|
6
6
|
AvailabilityMethod["MaxFairness"] = "max-fairness";
|
|
7
7
|
AvailabilityMethod["MaxAvailability"] = "max-availability";
|
|
8
|
+
AvailabilityMethod["Collective"] = "collective";
|
|
8
9
|
})(AvailabilityMethod || (AvailabilityMethod = {}));
|
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.1';
|
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.1";
|