@kfarranger/mapping-utils
Advanced tools
Comparing version 1.9.0 to 1.10.0
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.saveSet = void 0; | ||
exports.deleteSaveSets = exports.saveSet = void 0; | ||
@@ -292,2 +292,61 @@ var _lodash = require("lodash"); | ||
exports.saveSet = saveSet; | ||
exports.saveSet = saveSet; | ||
var deleteSaveSets = function deleteSaveSets(_ref16) { | ||
var callback = _ref16.callback; | ||
return (/*#__PURE__*/function () { | ||
var _ref19 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(obj, _ref17, _ref18) { | ||
var setIds, userId, es, esResponse; | ||
return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
setIds = _ref17.setIds, userId = _ref17.userId; | ||
es = _ref18.es; | ||
_context5.next = 4; | ||
return es.deleteByQuery({ | ||
index: _middleware.CONSTANTS.ES_ARRANGER_SET_INDEX, | ||
type: _middleware.CONSTANTS.ES_ARRANGER_SET_TYPE, | ||
body: { | ||
query: { | ||
terms: { | ||
setId: setIds | ||
} | ||
} | ||
} | ||
}); | ||
case 4: | ||
esResponse = _context5.sent; | ||
if (!(0, _lodash.isFunction)(callback)) { | ||
_context5.next = 8; | ||
break; | ||
} | ||
_context5.next = 8; | ||
return callback({ | ||
userId: userId, | ||
setIds: setIds, | ||
toDelete: true | ||
}); | ||
case 8: | ||
return _context5.abrupt("return", esResponse.deleted); | ||
case 9: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, _callee5); | ||
})); | ||
return function (_x6, _x7, _x8) { | ||
return _ref19.apply(this, arguments); | ||
}; | ||
}() | ||
); | ||
}; | ||
exports.deleteSaveSets = deleteSaveSets; |
{ | ||
"name": "@kfarranger/mapping-utils", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "Transform Elasticsearch mappings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
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
187558
3647