crisp-api 6.3.0 → 6.3.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/CHANGELOG.md +17 -0
- package/lib/crisp.js +8 -6
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## v6.3.2
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Prevent Got from throwing errors for non `2xx / 3xx` response codes.
|
|
9
|
+
* Fixed body payload type.
|
|
10
|
+
|
|
11
|
+
## v6.3.1
|
|
12
|
+
|
|
13
|
+
### Breaking Changes
|
|
14
|
+
|
|
15
|
+
* Support for NodeJS 8 has been removed. The minimum version is now NodeJS 10.
|
|
16
|
+
|
|
17
|
+
### Changes
|
|
18
|
+
|
|
19
|
+
* Upgraded dependencies (closes [#30](https://github.com/crisp-im/node-crisp-api/issues/30)).
|
|
20
|
+
|
|
4
21
|
## v6.3.0
|
|
5
22
|
|
|
6
23
|
### New Features
|
package/lib/crisp.js
CHANGED
|
@@ -667,13 +667,15 @@ Crisp.prototype = {
|
|
|
667
667
|
*/
|
|
668
668
|
_request : function(resource, method, query, body, resolve, reject) {
|
|
669
669
|
var requestParameters = {
|
|
670
|
-
|
|
671
|
-
timeout
|
|
670
|
+
responseType : "json",
|
|
671
|
+
timeout : Crisp.DEFAULT_REQUEST_TIMEOUT,
|
|
672
672
|
|
|
673
|
-
headers
|
|
673
|
+
headers : {
|
|
674
674
|
"User-Agent" : this._useragent,
|
|
675
675
|
"X-Crisp-Tier" : this._tier
|
|
676
|
-
}
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
throwHttpErrors : false
|
|
677
679
|
};
|
|
678
680
|
|
|
679
681
|
// Add authorization?
|
|
@@ -683,12 +685,12 @@ Crisp.prototype = {
|
|
|
683
685
|
|
|
684
686
|
// Add body?
|
|
685
687
|
if (body) {
|
|
686
|
-
requestParameters.
|
|
688
|
+
requestParameters.json = body;
|
|
687
689
|
}
|
|
688
690
|
|
|
689
691
|
// Add query?
|
|
690
692
|
if (query) {
|
|
691
|
-
requestParameters.
|
|
693
|
+
requestParameters.searchParams = query;
|
|
692
694
|
}
|
|
693
695
|
|
|
694
696
|
// Proceed request
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crisp-api",
|
|
3
3
|
"description": "Crisp API wrapper for Node - official, maintained by Crisp",
|
|
4
|
-
"version": "6.3.
|
|
4
|
+
"version": "6.3.2",
|
|
5
5
|
"homepage": "https://github.com/crisp-im/node-crisp-api",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"main": "./lib/crisp",
|
|
26
26
|
"types": "./types/crisp.d.ts",
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
28
|
+
"node": ">= 10.19.0"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"test": "check-build",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"socket.io-client": "4.4.1",
|
|
40
|
-
"fbemitter": "
|
|
41
|
-
"got": "
|
|
40
|
+
"fbemitter": "git+https://github.com/crisp-dev/emitter.git#695f60594bdca0c876e5c232de57702ab3151b6f",
|
|
41
|
+
"got": "11.8.5"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
44
44
|
"crisp",
|