New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

almex-sdk

Package Overview
Dependencies
Maintainers
4
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

almex-sdk - npm Package Compare versions

Comparing version 3.0.30 to 3.0.31

build/resources/stocksCalidad.xml

42

build/almexApi.js

@@ -21,3 +21,3 @@ (function() {

almexWsUrl = process.env.ALMEX_WS_URL || "http://201.157.61.34:8989/CkIntegracionGeneral";
almexWsUrl = process.env.ALMEX_WS_URL || "http://138.128.190.226:8085/CkIntegracionGeneral";

@@ -49,2 +49,3 @@ module.exports = AlmexApi = (function() {

this.getStocksPaginated = __bind(this.getStocksPaginated, this);
this.getStocksCalidad = __bind(this.getStocksCalidad, this);
this.getStocks = __bind(this.getStocks, this);

@@ -69,2 +70,5 @@ auth = (function(_this) {

},
stocksCalidad: {
endpoint: "Jobs"
},
stocksPaginated: {

@@ -142,2 +146,38 @@ endpoint: "Jobs"

AlmexApi.prototype.getStocksCalidad = function(skus) {
return this._doRequest(this.requests.stocksCalidad, (function(_this) {
return function() {
return _this.adaptSkus(skus);
};
})(this)).then((function(_this) {
return function(xml) {
var stocks;
stocks = _this._getResult(xml, "ProductoInventarioMethodEdoCal");
return stocks.filter(function(it) {
return it.descripcion !== "No existe ningun registro con la orden especificada";
}).map(function(product) {
var findByCalidad, _ref, _ref1;
findByCalidad = function(edo) {
var _ref;
return (_ref = _.find(product.calidad, function(it) {
return it.edo[0] === edo;
})) != null ? _ref.cantidad[0] : void 0;
};
return _.assign(product, {
identifier: (_ref = product.productoSku) != null ? _ref[0] : void 0,
name: product.descripcion[0],
stock: parseInt(findByCalidad("A") || 0) + parseInt(((_ref1 = product.cantidadSurtir) != null ? _ref1[0] : void 0) || 0),
quarantine_stock: parseInt(findByCalidad("Q") || 0),
damaged_stock: parseInt(findByCalidad("D") || 0)
});
});
};
})(this));
};
/*
Get the stocks for the given skus.
*/
AlmexApi.prototype.getStocksPaginated = function(page, top) {

@@ -144,0 +184,0 @@ var paginationXml;

2

package.json

@@ -8,3 +8,3 @@ {

},
"version": "3.0.30",
"version": "3.0.31",
"main": "build/almexApi.js",

@@ -11,0 +11,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc