Comparing version 0.0.3 to 0.0.4
@@ -5,3 +5,3 @@ { | ||
"description": "Magento SOAP API wrapper for Node.js", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "./src/magento", | ||
@@ -8,0 +8,0 @@ "contributors": [ |
@@ -31,2 +31,8 @@ # Magento SOAP API Wrapper | ||
If need be, you can manually change the session id. | ||
```js | ||
magento.changeSession(newSessionId); | ||
``` | ||
All of the API methods take an object of params as the first argument, and a callback as the second. | ||
@@ -33,0 +39,0 @@ |
@@ -56,10 +56,4 @@ # Sales Order | ||
magento.salesOrder.list({ | ||
filters: [ val, val, val ] | ||
filters: { key: 'val' } | ||
}, callback); | ||
// or a single filter | ||
magento.salesOrder.list({ | ||
filters: val | ||
}, callback); | ||
``` | ||
@@ -66,0 +60,0 @@ |
@@ -77,3 +77,3 @@ // external dependencies | ||
} | ||
this.config = magentoConfig; | ||
@@ -104,2 +104,3 @@ this.client = xmlrpc.createClient(this.config); | ||
this.sessionId = null; | ||
this.prevSessionId = null; | ||
@@ -179,3 +180,3 @@ return this; | ||
} | ||
self.sessionId = sessId; | ||
@@ -188,2 +189,9 @@ callback(null, sessId); | ||
Magento.prototype.changeSession = function(sessId) { | ||
this.prevSessId = this.sessionId; | ||
this.sessionId = sessId; | ||
return this; | ||
}; | ||
module.exports = Magento; |
@@ -53,14 +53,3 @@ // external dependencies | ||
list: { | ||
optional: 'filters', | ||
modifiers: { | ||
// to do: cleanup filters, and check them all | ||
/* filters: function(filters) { | ||
// if filters is not an array, wrap it in an array | ||
if (!Array.isArray(filters)) { | ||
return [ filters ]; | ||
} | ||
return filters; | ||
} */ | ||
} | ||
optional: 'filters' | ||
}, | ||
@@ -67,0 +56,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100972
70
1930
73
8