@como/como-client
Advanced tools
Comparing version 0.6.9 to 0.7.0
@@ -139,2 +139,34 @@ "use strict"; | ||
}(); | ||
}; | ||
exports.getAllTranslations = function (service) { | ||
return function () { | ||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(locationId) { | ||
var url, _ref10, data; | ||
return _regenerator2.default.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
url = "/v1/translation/" + locationId; | ||
_context5.next = 3; | ||
return service.get(url); | ||
case 3: | ||
_ref10 = _context5.sent; | ||
data = _ref10.data; | ||
return _context5.abrupt("return", data); | ||
case 6: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, _callee5, undefined); | ||
})); | ||
return function (_x9) { | ||
return _ref9.apply(this, arguments); | ||
}; | ||
}(); | ||
}; |
{ | ||
"name": "@como/como-client", | ||
"version": "0.6.9", | ||
"version": "0.7.0", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -375,4 +375,4 @@ const moment = require('moment-timezone'); | ||
catch(e){ | ||
console.log(`clientUpdateMembership failed, token:${token}, locationId:${locationId}`); | ||
initService.logError({method: 'clientUpdateMembership', token, locationId}); | ||
console.log(`clientUpdateMembership failed, token:${token}, locationId:${locationId}, error: ${e}`); | ||
} | ||
@@ -942,4 +942,12 @@ } | ||
} | ||
/** | ||
* Get app texts for multi languages - only for apps that has project set in translation service | ||
*/ | ||
getAppTextsV2() { | ||
const { api, locationId } = this.comoData; | ||
return api.getAllTranslations(locationId); | ||
} | ||
} | ||
module.exports = Como; |
Sorry, the diff of this file is too big to display
215691
4656