@como/como-client 0.7.68 → 0.7.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/como.js +23 -22
- package/lib/services/auth.service.js +5 -4
- package/package.json +1 -1
- package/src/como.js +3 -2
package/lib/como.js
CHANGED
|
@@ -788,12 +788,13 @@ var Como = function () {
|
|
|
788
788
|
* @param {Object} identifier key-value identifiers
|
|
789
789
|
* @param {*} type login type i.e PhoneNumber/Email/etc
|
|
790
790
|
* @param {*} code a 2-factor verification code sent to the client
|
|
791
|
+
* @param {reCaptchaToken} reCaptcha token for login challenge
|
|
791
792
|
*/
|
|
792
793
|
|
|
793
794
|
}, {
|
|
794
795
|
key: 'loginVerify',
|
|
795
796
|
value: function () {
|
|
796
|
-
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(identifier, type, code) {
|
|
797
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(identifier, type, code, reCaptchaToken) {
|
|
797
798
|
var api, _ref12, consent, _error$response$data7, errCode, message;
|
|
798
799
|
|
|
799
800
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
@@ -803,7 +804,7 @@ var Como = function () {
|
|
|
803
804
|
api = this.comoData.api;
|
|
804
805
|
_context11.prev = 1;
|
|
805
806
|
_context11.next = 4;
|
|
806
|
-
return api.logInVerify(code, type, identifier);
|
|
807
|
+
return api.logInVerify(code, type, identifier, reCaptchaToken);
|
|
807
808
|
|
|
808
809
|
case 4:
|
|
809
810
|
_ref12 = _context11.sent;
|
|
@@ -848,7 +849,7 @@ var Como = function () {
|
|
|
848
849
|
}, _callee11, this, [[1, 9]]);
|
|
849
850
|
}));
|
|
850
851
|
|
|
851
|
-
function loginVerify(_x31, _x32, _x33) {
|
|
852
|
+
function loginVerify(_x31, _x32, _x33, _x34) {
|
|
852
853
|
return _ref11.apply(this, arguments);
|
|
853
854
|
}
|
|
854
855
|
|
|
@@ -923,7 +924,7 @@ var Como = function () {
|
|
|
923
924
|
}, _callee13, this);
|
|
924
925
|
}));
|
|
925
926
|
|
|
926
|
-
function openApp(
|
|
927
|
+
function openApp(_x36) {
|
|
927
928
|
return _ref14.apply(this, arguments);
|
|
928
929
|
}
|
|
929
930
|
|
|
@@ -964,7 +965,7 @@ var Como = function () {
|
|
|
964
965
|
}, _callee14, this, [[1, 5]]);
|
|
965
966
|
}));
|
|
966
967
|
|
|
967
|
-
function clientUpdateMembership(
|
|
968
|
+
function clientUpdateMembership(_x37, _x38) {
|
|
968
969
|
return _ref15.apply(this, arguments);
|
|
969
970
|
}
|
|
970
971
|
|
|
@@ -1015,7 +1016,7 @@ var Como = function () {
|
|
|
1015
1016
|
}, _callee15, this);
|
|
1016
1017
|
}));
|
|
1017
1018
|
|
|
1018
|
-
function downloadMainResource(
|
|
1019
|
+
function downloadMainResource(_x39) {
|
|
1019
1020
|
return _ref16.apply(this, arguments);
|
|
1020
1021
|
}
|
|
1021
1022
|
|
|
@@ -1233,7 +1234,7 @@ var Como = function () {
|
|
|
1233
1234
|
}, _callee20, this);
|
|
1234
1235
|
}));
|
|
1235
1236
|
|
|
1236
|
-
function redeemAsset(
|
|
1237
|
+
function redeemAsset(_x40) {
|
|
1237
1238
|
return _ref21.apply(this, arguments);
|
|
1238
1239
|
}
|
|
1239
1240
|
|
|
@@ -1271,7 +1272,7 @@ var Como = function () {
|
|
|
1271
1272
|
}, _callee21, this);
|
|
1272
1273
|
}));
|
|
1273
1274
|
|
|
1274
|
-
function purchaseAsset(
|
|
1275
|
+
function purchaseAsset(_x41) {
|
|
1275
1276
|
return _ref22.apply(this, arguments);
|
|
1276
1277
|
}
|
|
1277
1278
|
|
|
@@ -1335,7 +1336,7 @@ var Como = function () {
|
|
|
1335
1336
|
}, _callee23, this);
|
|
1336
1337
|
}));
|
|
1337
1338
|
|
|
1338
|
-
function purchaseAssetAPI2(
|
|
1339
|
+
function purchaseAssetAPI2(_x42) {
|
|
1339
1340
|
return _ref24.apply(this, arguments);
|
|
1340
1341
|
}
|
|
1341
1342
|
|
|
@@ -1659,7 +1660,7 @@ var Como = function () {
|
|
|
1659
1660
|
}, _callee26, this);
|
|
1660
1661
|
}));
|
|
1661
1662
|
|
|
1662
|
-
function getRegistrationUrl(
|
|
1663
|
+
function getRegistrationUrl(_x43) {
|
|
1663
1664
|
return _ref27.apply(this, arguments);
|
|
1664
1665
|
}
|
|
1665
1666
|
|
|
@@ -1698,7 +1699,7 @@ var Como = function () {
|
|
|
1698
1699
|
}, _callee27, this);
|
|
1699
1700
|
}));
|
|
1700
1701
|
|
|
1701
|
-
function getProfileUrl(
|
|
1702
|
+
function getProfileUrl(_x44) {
|
|
1702
1703
|
return _ref28.apply(this, arguments);
|
|
1703
1704
|
}
|
|
1704
1705
|
|
|
@@ -1771,7 +1772,7 @@ var Como = function () {
|
|
|
1771
1772
|
}, _callee29, this);
|
|
1772
1773
|
}));
|
|
1773
1774
|
|
|
1774
|
-
function getDataPortabilityUrl(
|
|
1775
|
+
function getDataPortabilityUrl(_x45, _x46) {
|
|
1775
1776
|
return _ref30.apply(this, arguments);
|
|
1776
1777
|
}
|
|
1777
1778
|
|
|
@@ -1958,7 +1959,7 @@ var Como = function () {
|
|
|
1958
1959
|
}, _callee32, this);
|
|
1959
1960
|
}));
|
|
1960
1961
|
|
|
1961
|
-
function addPaymentMethod(
|
|
1962
|
+
function addPaymentMethod(_x48) {
|
|
1962
1963
|
return _ref33.apply(this, arguments);
|
|
1963
1964
|
}
|
|
1964
1965
|
|
|
@@ -1985,7 +1986,7 @@ var Como = function () {
|
|
|
1985
1986
|
}, _callee33, this);
|
|
1986
1987
|
}));
|
|
1987
1988
|
|
|
1988
|
-
function knowYourData(
|
|
1989
|
+
function knowYourData(_x49) {
|
|
1989
1990
|
return _ref34.apply(this, arguments);
|
|
1990
1991
|
}
|
|
1991
1992
|
|
|
@@ -2012,7 +2013,7 @@ var Como = function () {
|
|
|
2012
2013
|
}, _callee34, this);
|
|
2013
2014
|
}));
|
|
2014
2015
|
|
|
2015
|
-
function consentWithdraw(
|
|
2016
|
+
function consentWithdraw(_x50) {
|
|
2016
2017
|
return _ref35.apply(this, arguments);
|
|
2017
2018
|
}
|
|
2018
2019
|
|
|
@@ -2085,7 +2086,7 @@ var Como = function () {
|
|
|
2085
2086
|
}, _callee36, this);
|
|
2086
2087
|
}));
|
|
2087
2088
|
|
|
2088
|
-
function payInApp(
|
|
2089
|
+
function payInApp(_x51, _x52, _x53, _x54, _x55) {
|
|
2089
2090
|
return _ref37.apply(this, arguments);
|
|
2090
2091
|
}
|
|
2091
2092
|
|
|
@@ -2122,7 +2123,7 @@ var Como = function () {
|
|
|
2122
2123
|
}, _callee37, this);
|
|
2123
2124
|
}));
|
|
2124
2125
|
|
|
2125
|
-
function deletePayment(
|
|
2126
|
+
function deletePayment(_x56) {
|
|
2126
2127
|
return _ref38.apply(this, arguments);
|
|
2127
2128
|
}
|
|
2128
2129
|
|
|
@@ -2157,7 +2158,7 @@ var Como = function () {
|
|
|
2157
2158
|
}, _callee38, this);
|
|
2158
2159
|
}));
|
|
2159
2160
|
|
|
2160
|
-
function getMemberMessages(
|
|
2161
|
+
function getMemberMessages(_x57, _x58, _x59) {
|
|
2161
2162
|
return _ref39.apply(this, arguments);
|
|
2162
2163
|
}
|
|
2163
2164
|
|
|
@@ -2207,7 +2208,7 @@ var Como = function () {
|
|
|
2207
2208
|
}, _callee39, this);
|
|
2208
2209
|
}));
|
|
2209
2210
|
|
|
2210
|
-
function budgetTransfer(
|
|
2211
|
+
function budgetTransfer(_x60, _x61, _x62, _x63) {
|
|
2211
2212
|
return _ref40.apply(this, arguments);
|
|
2212
2213
|
}
|
|
2213
2214
|
|
|
@@ -2253,7 +2254,7 @@ var Como = function () {
|
|
|
2253
2254
|
}, _callee40, this);
|
|
2254
2255
|
}));
|
|
2255
2256
|
|
|
2256
|
-
function budgetTransferClaim(
|
|
2257
|
+
function budgetTransferClaim(_x64) {
|
|
2257
2258
|
return _ref41.apply(this, arguments);
|
|
2258
2259
|
}
|
|
2259
2260
|
|
|
@@ -2306,7 +2307,7 @@ var Como = function () {
|
|
|
2306
2307
|
}, _callee41, this);
|
|
2307
2308
|
}));
|
|
2308
2309
|
|
|
2309
|
-
function logUserAction(
|
|
2310
|
+
function logUserAction(_x65, _x66) {
|
|
2310
2311
|
return _ref42.apply(this, arguments);
|
|
2311
2312
|
}
|
|
2312
2313
|
|
|
@@ -2340,7 +2341,7 @@ var Como = function () {
|
|
|
2340
2341
|
}, _callee42, this);
|
|
2341
2342
|
}));
|
|
2342
2343
|
|
|
2343
|
-
function getPurchaseHistory(
|
|
2344
|
+
function getPurchaseHistory(_x67, _x68) {
|
|
2344
2345
|
return _ref43.apply(this, arguments);
|
|
2345
2346
|
}
|
|
2346
2347
|
|
|
@@ -261,7 +261,7 @@ exports.logIn = function (service) {
|
|
|
261
261
|
|
|
262
262
|
exports.logInVerify = function (service) {
|
|
263
263
|
return function () {
|
|
264
|
-
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(code, type, identifier) {
|
|
264
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(code, type, identifier, reCaptchaToken) {
|
|
265
265
|
var params, headers, _ref16, data;
|
|
266
266
|
|
|
267
267
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
@@ -271,7 +271,8 @@ exports.logInVerify = function (service) {
|
|
|
271
271
|
params = {
|
|
272
272
|
identifier: identifier,
|
|
273
273
|
code: code,
|
|
274
|
-
type: type
|
|
274
|
+
type: type,
|
|
275
|
+
reCaptchaToken: reCaptchaToken
|
|
275
276
|
};
|
|
276
277
|
headers = getHashHeader(params);
|
|
277
278
|
_context8.next = 4;
|
|
@@ -290,7 +291,7 @@ exports.logInVerify = function (service) {
|
|
|
290
291
|
}, _callee8, undefined);
|
|
291
292
|
}));
|
|
292
293
|
|
|
293
|
-
return function (_x26, _x27, _x28) {
|
|
294
|
+
return function (_x26, _x27, _x28, _x29) {
|
|
294
295
|
return _ref15.apply(this, arguments);
|
|
295
296
|
};
|
|
296
297
|
}();
|
|
@@ -348,7 +349,7 @@ exports.refreshToken = function (service) {
|
|
|
348
349
|
}, _callee10, undefined);
|
|
349
350
|
}));
|
|
350
351
|
|
|
351
|
-
return function (
|
|
352
|
+
return function (_x30, _x31, _x32, _x33) {
|
|
352
353
|
return _ref19.apply(this, arguments);
|
|
353
354
|
};
|
|
354
355
|
}();
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -337,11 +337,12 @@ class Como {
|
|
|
337
337
|
* @param {Object} identifier key-value identifiers
|
|
338
338
|
* @param {*} type login type i.e PhoneNumber/Email/etc
|
|
339
339
|
* @param {*} code a 2-factor verification code sent to the client
|
|
340
|
+
* @param {reCaptchaToken} reCaptcha token for login challenge
|
|
340
341
|
*/
|
|
341
|
-
async loginVerify(identifier, type, code) {
|
|
342
|
+
async loginVerify(identifier, type, code, reCaptchaToken) {
|
|
342
343
|
const { api } = this.comoData;
|
|
343
344
|
try {
|
|
344
|
-
const { consent } = await api.logInVerify(code, type, identifier);
|
|
345
|
+
const { consent } = await api.logInVerify(code, type, identifier, reCaptchaToken);
|
|
345
346
|
this.comoData.consent = consent;
|
|
346
347
|
} catch (error) {
|
|
347
348
|
if (error.response && error.response.data) {
|