idosell 0.1.10 → 0.1.13-a
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.
|
@@ -5,7 +5,7 @@ export default (object) => {
|
|
|
5
5
|
object.gate = { method: 'get', node: '/products/auctions' };
|
|
6
6
|
object.custom = {
|
|
7
7
|
ids: arrayOfObjects("products", "identValue", {"identType":"id"}),
|
|
8
|
-
fromAllegro: () => { const auctionSites =
|
|
8
|
+
fromAllegro: () => { const auctionSites = ["allegro"]; return { auctionSites }},
|
|
9
9
|
page
|
|
10
10
|
};
|
|
11
11
|
return new Proxy(object, paramsProxy);
|
|
@@ -4,7 +4,7 @@ import { dateRangeType, page } from "../helpers.js";
|
|
|
4
4
|
export default (object) => {
|
|
5
5
|
object.gate = { method: 'get', node: '/wms/stocksdocuments/documents' };
|
|
6
6
|
object.custom = {
|
|
7
|
-
dates: dateRangeType({"nodeName":"
|
|
7
|
+
dates: dateRangeType({"nodeName":"dateRange","fromName":"dateBegin","toName":"dateEnd","typeName":"dateType","format":"YYYY-MM-DD HH:mm:ss","defaultType":"open"}),
|
|
8
8
|
page
|
|
9
9
|
};
|
|
10
10
|
return new Proxy(object, paramsProxy);
|
|
@@ -4,7 +4,7 @@ import { dateRangeType, page } from "../helpers.js";
|
|
|
4
4
|
export default (object) => {
|
|
5
5
|
object.gate = { method: 'get', node: '/wms/stocksdocuments/openedDocuments' };
|
|
6
6
|
object.custom = {
|
|
7
|
-
dates: dateRangeType({"nodeName":"
|
|
7
|
+
dates: dateRangeType({"nodeName":"dateRange","fromName":"dateBegin","toName":"dateEnd","typeName":"dateType","format":"YYYY-MM-DD HH:mm:ss","defaultType":"open"}),
|
|
8
8
|
page
|
|
9
9
|
};
|
|
10
10
|
return new Proxy(object, paramsProxy);
|
package/dist/request.js
CHANGED
|
@@ -48,6 +48,14 @@ export const queryfy = (params) => {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export const sendRequest = async (request, options = {}) => {
|
|
51
|
+
if (request.appendable?.arrayNode && request.params[request.appendable.arrayNode]) {
|
|
52
|
+
const array = request.params[request.appendable.arrayNode];
|
|
53
|
+
const last = array[array.length - 1];
|
|
54
|
+
if (typeof last === 'object' && Object.keys(last).length === 0) {
|
|
55
|
+
array.pop();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
51
59
|
const headers = {
|
|
52
60
|
'X-API-KEY': request.auth.apiKey,
|
|
53
61
|
Accept: 'application/json'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idosell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13a",
|
|
4
4
|
"description": "Idosell 3 REST connector",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/ltung7/idosell.git",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"axios": "^1.
|
|
24
|
+
"axios": "^1.7.7"
|
|
25
25
|
},
|
|
26
26
|
"type": "module"
|
|
27
27
|
}
|