@como/como-client
Advanced tools
Comparing version 0.1.37 to 0.1.38
@@ -372,6 +372,7 @@ 'use strict'; | ||
exports.openApp = function (service) { | ||
exports.verifyReferralCode = function (service) { | ||
return function () { | ||
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl, token, locationId, data) { | ||
var dateNow, url, response; | ||
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl, token, locationId, code) { | ||
var url, _ref20, data; | ||
return _regenerator2.default.wrap(function _callee11$(_context11) { | ||
@@ -381,10 +382,10 @@ while (1) { | ||
case 0: | ||
dateNow = moment(); | ||
url = baseUrl + '/alpha/api/OpenApp?InputType=json&locationId=' + locationId + '&token=' + token + '&Action=openedclub&TimeStamp=' + dateNow; | ||
_context11.next = 4; | ||
return service.post(url, { LocationID: locationId, Data: data }); | ||
url = baseUrl + '/referralCode/validate?locationId=' + locationId + '&token=' + token + '&code=' + code; | ||
_context11.next = 3; | ||
return service.get(url); | ||
case 4: | ||
response = _context11.sent; | ||
return _context11.abrupt('return', response); | ||
case 3: | ||
_ref20 = _context11.sent; | ||
data = _ref20.data; | ||
return _context11.abrupt('return', data); | ||
@@ -405,6 +406,6 @@ case 6: | ||
exports.clientUpdateMembership = function (service) { | ||
exports.openApp = function (service) { | ||
return function () { | ||
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl, token, locationId, pushEnable, locationEnable) { | ||
var url, response; | ||
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl, token, locationId, data) { | ||
var dateNow, url, response; | ||
return _regenerator2.default.wrap(function _callee12$(_context12) { | ||
@@ -414,11 +415,12 @@ while (1) { | ||
case 0: | ||
url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId + '&token=' + token; | ||
_context12.next = 3; | ||
return service.put(url, { PushNotificationEnabled: pushEnable, LocationEnabled: locationEnable }); | ||
dateNow = moment(); | ||
url = baseUrl + '/alpha/api/OpenApp?InputType=json&locationId=' + locationId + '&token=' + token + '&Action=openedclub&TimeStamp=' + dateNow; | ||
_context12.next = 4; | ||
return service.post(url, { LocationID: locationId, Data: data }); | ||
case 3: | ||
case 4: | ||
response = _context12.sent; | ||
return _context12.abrupt('return', response); | ||
case 5: | ||
case 6: | ||
case 'end': | ||
@@ -431,4 +433,4 @@ return _context12.stop(); | ||
return function (_x33, _x34, _x35, _x36, _x37) { | ||
return _ref20.apply(this, arguments); | ||
return function (_x33, _x34, _x35, _x36) { | ||
return _ref21.apply(this, arguments); | ||
}; | ||
@@ -438,7 +440,6 @@ }(); | ||
exports.generateTemporaryToken = function (service) { | ||
exports.clientUpdateMembership = function (service) { | ||
return function () { | ||
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl, locationId, token, timeToLive) { | ||
var url, _ref22, data; | ||
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl, token, locationId, pushEnable, locationEnable) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee13$(_context13) { | ||
@@ -448,16 +449,11 @@ while (1) { | ||
case 0: | ||
url = baseUrl + '/memberships/generateToken?locationId=' + locationId + '&token=' + token; | ||
url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId + '&token=' + token; | ||
_context13.next = 3; | ||
return service.post(url, { | ||
timeToLive: timeToLive | ||
}, { | ||
headers: { 'Content-Type': 'application/json' } | ||
}); | ||
return service.put(url, { PushNotificationEnabled: pushEnable, LocationEnabled: locationEnable }); | ||
case 3: | ||
_ref22 = _context13.sent; | ||
data = _ref22.data; | ||
return _context13.abrupt('return', data); | ||
response = _context13.sent; | ||
return _context13.abrupt('return', response); | ||
case 6: | ||
case 5: | ||
case 'end': | ||
@@ -470,4 +466,4 @@ return _context13.stop(); | ||
return function (_x38, _x39, _x40, _x41) { | ||
return _ref21.apply(this, arguments); | ||
return function (_x37, _x38, _x39, _x40, _x41) { | ||
return _ref22.apply(this, arguments); | ||
}; | ||
@@ -477,5 +473,5 @@ }(); | ||
exports.getFeedbackFormData = function (service) { | ||
exports.generateTemporaryToken = function (service) { | ||
return function () { | ||
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId, token) { | ||
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId, token, timeToLive) { | ||
var url, _ref24, data; | ||
@@ -487,5 +483,9 @@ | ||
case 0: | ||
url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json'; | ||
url = baseUrl + '/memberships/generateToken?locationId=' + locationId + '&token=' + token; | ||
_context14.next = 3; | ||
return service.get(url); | ||
return service.post(url, { | ||
timeToLive: timeToLive | ||
}, { | ||
headers: { 'Content-Type': 'application/json' } | ||
}); | ||
@@ -505,3 +505,3 @@ case 3: | ||
return function (_x42, _x43, _x44) { | ||
return function (_x42, _x43, _x44, _x45) { | ||
return _ref23.apply(this, arguments); | ||
@@ -512,6 +512,7 @@ }; | ||
exports.sendPushChannel = function (service) { | ||
exports.getFeedbackFormData = function (service) { | ||
return function () { | ||
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId, token, identifier) { | ||
var url, response; | ||
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId, token) { | ||
var url, _ref26, data; | ||
return _regenerator2.default.wrap(function _callee15$(_context15) { | ||
@@ -521,14 +522,12 @@ while (1) { | ||
case 0: | ||
url = baseUrl + '/push_channels?locationId=' + locationId + '&token=' + token; | ||
url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json'; | ||
_context15.next = 3; | ||
return service.post(url, { | ||
type: 'fcm', | ||
identifier: identifier | ||
}); | ||
return service.get(url); | ||
case 3: | ||
response = _context15.sent; | ||
return _context15.abrupt('return', response); | ||
_ref26 = _context15.sent; | ||
data = _ref26.data; | ||
return _context15.abrupt('return', data); | ||
case 5: | ||
case 6: | ||
case 'end': | ||
@@ -541,3 +540,3 @@ return _context15.stop(); | ||
return function (_x45, _x46, _x47, _x48) { | ||
return function (_x46, _x47, _x48) { | ||
return _ref25.apply(this, arguments); | ||
@@ -548,7 +547,6 @@ }; | ||
exports.getClientBusinessBackend = function (service) { | ||
exports.sendPushChannel = function (service) { | ||
return function () { | ||
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, token, locationId) { | ||
var url, _ref27, data; | ||
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, locationId, token, identifier) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee16$(_context16) { | ||
@@ -558,12 +556,14 @@ while (1) { | ||
case 0: | ||
url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json'; | ||
url = baseUrl + '/push_channels?locationId=' + locationId + '&token=' + token; | ||
_context16.next = 3; | ||
return service.post(url); | ||
return service.post(url, { | ||
type: 'fcm', | ||
identifier: identifier | ||
}); | ||
case 3: | ||
_ref27 = _context16.sent; | ||
data = _ref27.data; | ||
return _context16.abrupt('return', data); | ||
response = _context16.sent; | ||
return _context16.abrupt('return', response); | ||
case 6: | ||
case 5: | ||
case 'end': | ||
@@ -576,4 +576,4 @@ return _context16.stop(); | ||
return function (_x49, _x50, _x51) { | ||
return _ref26.apply(this, arguments); | ||
return function (_x49, _x50, _x51, _x52) { | ||
return _ref27.apply(this, arguments); | ||
}; | ||
@@ -583,6 +583,7 @@ }(); | ||
exports.sendCouponCode = function (service) { | ||
exports.getClientBusinessBackend = function (service) { | ||
return function () { | ||
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl, locationId, token, code) { | ||
var url, response; | ||
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl, token, locationId) { | ||
var url, _ref29, data; | ||
return _regenerator2.default.wrap(function _callee17$(_context17) { | ||
@@ -592,3 +593,3 @@ while (1) { | ||
case 0: | ||
url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '&Token=' + token + '&Code=' + code + '&InputType=json&MimeType=application/json'; | ||
url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json'; | ||
_context17.next = 3; | ||
@@ -598,6 +599,7 @@ return service.post(url); | ||
case 3: | ||
response = _context17.sent; | ||
return _context17.abrupt('return', response); | ||
_ref29 = _context17.sent; | ||
data = _ref29.data; | ||
return _context17.abrupt('return', data); | ||
case 5: | ||
case 6: | ||
case 'end': | ||
@@ -610,3 +612,3 @@ return _context17.stop(); | ||
return function (_x52, _x53, _x54, _x55) { | ||
return function (_x53, _x54, _x55) { | ||
return _ref28.apply(this, arguments); | ||
@@ -617,5 +619,6 @@ }; | ||
exports.addPaymentMethod = function (service) { | ||
exports.sendCouponCode = function (service) { | ||
return function () { | ||
var _ref29 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId, token, cardToken) { | ||
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId, token, code) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee18$(_context18) { | ||
@@ -625,9 +628,11 @@ while (1) { | ||
case 0: | ||
return _context18.abrupt('return', service({ | ||
method: 'post', | ||
url: baseUrl + '/payments/v2/methods/' + cardToken + '?locationId=' + locationId, | ||
timeout: 5000 // Wait for 5 seconds | ||
})); | ||
url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '&Token=' + token + '&Code=' + code + '&InputType=json&MimeType=application/json'; | ||
_context18.next = 3; | ||
return service.post(url); | ||
case 1: | ||
case 3: | ||
response = _context18.sent; | ||
return _context18.abrupt('return', response); | ||
case 5: | ||
case 'end': | ||
@@ -641,3 +646,3 @@ return _context18.stop(); | ||
return function (_x56, _x57, _x58, _x59) { | ||
return _ref29.apply(this, arguments); | ||
return _ref30.apply(this, arguments); | ||
}; | ||
@@ -647,5 +652,5 @@ }(); | ||
exports.getPaymentMethods = function (service) { | ||
exports.addPaymentMethod = function (service) { | ||
return function () { | ||
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId) { | ||
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId, token, cardToken) { | ||
return _regenerator2.default.wrap(function _callee19$(_context19) { | ||
@@ -656,4 +661,4 @@ while (1) { | ||
return _context19.abrupt('return', service({ | ||
method: 'get', | ||
url: baseUrl + '/payments/v2/methods?locationId=' + locationId + '&InputType=json&MimeType=application/json', | ||
method: 'post', | ||
url: baseUrl + '/payments/v2/methods/' + cardToken + '?locationId=' + locationId, | ||
timeout: 5000 // Wait for 5 seconds | ||
@@ -670,4 +675,4 @@ })); | ||
return function (_x60, _x61) { | ||
return _ref30.apply(this, arguments); | ||
return function (_x60, _x61, _x62, _x63) { | ||
return _ref31.apply(this, arguments); | ||
}; | ||
@@ -677,5 +682,5 @@ }(); | ||
exports.payInApp = function (service) { | ||
exports.getPaymentMethods = function (service) { | ||
return function () { | ||
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey) { | ||
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId) { | ||
return _regenerator2.default.wrap(function _callee20$(_context20) { | ||
@@ -686,2 +691,29 @@ while (1) { | ||
return _context20.abrupt('return', service({ | ||
method: 'get', | ||
url: baseUrl + '/payments/v2/methods?locationId=' + locationId + '&InputType=json&MimeType=application/json', | ||
timeout: 5000 // Wait for 5 seconds | ||
})); | ||
case 1: | ||
case 'end': | ||
return _context20.stop(); | ||
} | ||
} | ||
}, _callee20, undefined); | ||
})); | ||
return function (_x64, _x65) { | ||
return _ref32.apply(this, arguments); | ||
}; | ||
}(); | ||
}; | ||
exports.payInApp = function (service) { | ||
return function () { | ||
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(baseUrl, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey) { | ||
return _regenerator2.default.wrap(function _callee21$(_context21) { | ||
while (1) { | ||
switch (_context21.prev = _context21.next) { | ||
case 0: | ||
return _context21.abrupt('return', service({ | ||
method: 'post', | ||
@@ -708,10 +740,10 @@ url: baseUrl + '/payments/v2/payments/charge?locationId=' + locationId, | ||
case 'end': | ||
return _context20.stop(); | ||
return _context21.stop(); | ||
} | ||
} | ||
}, _callee20, undefined); | ||
}, _callee21, undefined); | ||
})); | ||
return function (_x62, _x63, _x64, _x65, _x66, _x67, _x68, _x69) { | ||
return _ref31.apply(this, arguments); | ||
return function (_x66, _x67, _x68, _x69, _x70, _x71, _x72, _x73) { | ||
return _ref33.apply(this, arguments); | ||
}; | ||
@@ -723,26 +755,26 @@ }(); | ||
return function () { | ||
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(baseUrl, locationId, token, creditCardToken) { | ||
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(baseUrl, locationId, token, creditCardToken) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee21$(_context21) { | ||
return _regenerator2.default.wrap(function _callee22$(_context22) { | ||
while (1) { | ||
switch (_context21.prev = _context21.next) { | ||
switch (_context22.prev = _context22.next) { | ||
case 0: | ||
url = baseUrl + '/payments/v2/methods/' + creditCardToken + '?locationId=' + locationId; | ||
_context21.next = 3; | ||
_context22.next = 3; | ||
return service.delete(url); | ||
case 3: | ||
response = _context21.sent; | ||
return _context21.abrupt('return', response); | ||
response = _context22.sent; | ||
return _context22.abrupt('return', response); | ||
case 5: | ||
case 'end': | ||
return _context21.stop(); | ||
return _context22.stop(); | ||
} | ||
} | ||
}, _callee21, undefined); | ||
}, _callee22, undefined); | ||
})); | ||
return function (_x70, _x71, _x72, _x73) { | ||
return _ref32.apply(this, arguments); | ||
return function (_x74, _x75, _x76, _x77) { | ||
return _ref34.apply(this, arguments); | ||
}; | ||
@@ -754,7 +786,7 @@ }(); | ||
return function () { | ||
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(baseUrl, locationId, tag, limit, offset) { | ||
var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee23(baseUrl, locationId, tag, limit, offset) { | ||
var query, url; | ||
return _regenerator2.default.wrap(function _callee22$(_context22) { | ||
return _regenerator2.default.wrap(function _callee23$(_context23) { | ||
while (1) { | ||
switch (_context22.prev = _context22.next) { | ||
switch (_context23.prev = _context23.next) { | ||
case 0: | ||
@@ -769,14 +801,14 @@ query = { | ||
url = urlsUtils.appendQuery(baseUrl + '/memberMessages', query); | ||
return _context22.abrupt('return', service.get(url)); | ||
return _context23.abrupt('return', service.get(url)); | ||
case 3: | ||
case 'end': | ||
return _context22.stop(); | ||
return _context23.stop(); | ||
} | ||
} | ||
}, _callee22, undefined); | ||
}, _callee23, undefined); | ||
})); | ||
return function (_x74, _x75, _x76, _x77, _x78) { | ||
return _ref33.apply(this, arguments); | ||
return function (_x78, _x79, _x80, _x81, _x82) { | ||
return _ref35.apply(this, arguments); | ||
}; | ||
@@ -788,10 +820,10 @@ }(); | ||
return function () { | ||
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee23(baseUrl, locationId, keysList) { | ||
var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee24(baseUrl, locationId, keysList) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee23$(_context23) { | ||
return _regenerator2.default.wrap(function _callee24$(_context24) { | ||
while (1) { | ||
switch (_context23.prev = _context23.next) { | ||
switch (_context24.prev = _context24.next) { | ||
case 0: | ||
url = baseUrl + '/memberMessages/markAsRead/v2?locationId=' + locationId; | ||
_context23.next = 3; | ||
_context24.next = 3; | ||
return service.put(url, { | ||
@@ -802,15 +834,15 @@ keys: keysList | ||
case 3: | ||
response = _context23.sent; | ||
return _context23.abrupt('return', response); | ||
response = _context24.sent; | ||
return _context24.abrupt('return', response); | ||
case 5: | ||
case 'end': | ||
return _context23.stop(); | ||
return _context24.stop(); | ||
} | ||
} | ||
}, _callee23, undefined); | ||
}, _callee24, undefined); | ||
})); | ||
return function (_x79, _x80, _x81) { | ||
return _ref34.apply(this, arguments); | ||
return function (_x83, _x84, _x85) { | ||
return _ref36.apply(this, arguments); | ||
}; | ||
@@ -822,8 +854,8 @@ }(); | ||
return function () { | ||
var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee24(baseUrl, locationId, receiver, sender, amount, wallet) { | ||
return _regenerator2.default.wrap(function _callee24$(_context24) { | ||
var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25(baseUrl, locationId, receiver, sender, amount, wallet) { | ||
return _regenerator2.default.wrap(function _callee25$(_context25) { | ||
while (1) { | ||
switch (_context24.prev = _context24.next) { | ||
switch (_context25.prev = _context25.next) { | ||
case 0: | ||
return _context24.abrupt('return', service({ | ||
return _context25.abrupt('return', service({ | ||
method: 'post', | ||
@@ -842,10 +874,10 @@ url: baseUrl + '/budgetTransfer?locationId=' + locationId, | ||
case 'end': | ||
return _context24.stop(); | ||
return _context25.stop(); | ||
} | ||
} | ||
}, _callee24, undefined); | ||
}, _callee25, undefined); | ||
})); | ||
return function (_x82, _x83, _x84, _x85, _x86, _x87) { | ||
return _ref35.apply(this, arguments); | ||
return function (_x86, _x87, _x88, _x89, _x90, _x91) { | ||
return _ref37.apply(this, arguments); | ||
}; | ||
@@ -856,8 +888,8 @@ }(); | ||
return function () { | ||
var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25(baseUrl, locationId, claimCode) { | ||
return _regenerator2.default.wrap(function _callee25$(_context25) { | ||
var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee26(baseUrl, locationId, claimCode) { | ||
return _regenerator2.default.wrap(function _callee26$(_context26) { | ||
while (1) { | ||
switch (_context25.prev = _context25.next) { | ||
switch (_context26.prev = _context26.next) { | ||
case 0: | ||
return _context25.abrupt('return', service({ | ||
return _context26.abrupt('return', service({ | ||
method: 'post', | ||
@@ -870,10 +902,10 @@ url: baseUrl + '/budgetTransfer/' + claimCode + '/claim?locationId=' + locationId, | ||
case 'end': | ||
return _context25.stop(); | ||
return _context26.stop(); | ||
} | ||
} | ||
}, _callee25, undefined); | ||
}, _callee26, undefined); | ||
})); | ||
return function (_x88, _x89, _x90) { | ||
return _ref36.apply(this, arguments); | ||
return function (_x92, _x93, _x94) { | ||
return _ref38.apply(this, arguments); | ||
}; | ||
@@ -885,26 +917,26 @@ }(); | ||
return function () { | ||
var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee26(baseUrl, claimId) { | ||
var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27(baseUrl, claimId) { | ||
var url, response; | ||
return _regenerator2.default.wrap(function _callee26$(_context26) { | ||
return _regenerator2.default.wrap(function _callee27$(_context27) { | ||
while (1) { | ||
switch (_context26.prev = _context26.next) { | ||
switch (_context27.prev = _context27.next) { | ||
case 0: | ||
url = baseUrl + '/budgetTransfer/' + claimId; | ||
_context26.next = 3; | ||
_context27.next = 3; | ||
return service.get(url); | ||
case 3: | ||
response = _context26.sent; | ||
return _context26.abrupt('return', response); | ||
response = _context27.sent; | ||
return _context27.abrupt('return', response); | ||
case 5: | ||
case 'end': | ||
return _context26.stop(); | ||
return _context27.stop(); | ||
} | ||
} | ||
}, _callee26, undefined); | ||
}, _callee27, undefined); | ||
})); | ||
return function (_x91, _x92) { | ||
return _ref37.apply(this, arguments); | ||
return function (_x95, _x96) { | ||
return _ref39.apply(this, arguments); | ||
}; | ||
@@ -916,10 +948,10 @@ }(); | ||
return function () { | ||
var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27(baseUrl, locationId, token, AssetKey, ItemID, Tag) { | ||
var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee28(baseUrl, locationId, token, AssetKey, ItemID, Tag) { | ||
var url; | ||
return _regenerator2.default.wrap(function _callee27$(_context27) { | ||
return _regenerator2.default.wrap(function _callee28$(_context28) { | ||
while (1) { | ||
switch (_context27.prev = _context27.next) { | ||
switch (_context28.prev = _context28.next) { | ||
case 0: | ||
url = baseUrl + '/alpha/api/Claim?Token=' + token + '&LocationID=' + locationId + '&InputType=JSON&MimeType=application/json'; | ||
return _context27.abrupt('return', service.post(url, { | ||
return _context28.abrupt('return', service.post(url, { | ||
Data: { | ||
@@ -934,12 +966,12 @@ AssetKey: AssetKey, | ||
case 'end': | ||
return _context27.stop(); | ||
return _context28.stop(); | ||
} | ||
} | ||
}, _callee27, undefined); | ||
}, _callee28, undefined); | ||
})); | ||
return function (_x93, _x94, _x95, _x96, _x97, _x98) { | ||
return _ref38.apply(this, arguments); | ||
return function (_x97, _x98, _x99, _x100, _x101, _x102) { | ||
return _ref40.apply(this, arguments); | ||
}; | ||
}(); | ||
}; |
{ | ||
"name": "@como/como-client", | ||
"version": "0.1.37", | ||
"version": "0.1.38", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -592,2 +592,13 @@ const moment = require('moment-timezone'); | ||
/** | ||
* Check that referral code is valid | ||
*/ | ||
verifyReferralCode(code) { | ||
const { | ||
api, locationId, token, env_params: env, | ||
} = this.comoData; | ||
return api.verifyReferralCode(env.services_root, token, locationId, code); | ||
}; | ||
/** | ||
* Returns current accessToken and refreshToken | ||
@@ -594,0 +605,0 @@ * Caution: make sure to pass refresh callback to init to get the latest credentials |
Sorry, the diff of this file is too big to display
187692
4084