@como/como-client 0.7.65 → 0.7.66
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 +24 -23
- package/lib/services/auth.service.js +5 -5
- package/package.json +1 -1
- package/src/como.js +3 -2
package/lib/como.js
CHANGED
|
@@ -729,12 +729,13 @@ var Como = function () {
|
|
|
729
729
|
*
|
|
730
730
|
* @param {Object} identifier an object which identifies the user by its credentials
|
|
731
731
|
* @param {string} type login type i.e PhoneNumber/Email/etc
|
|
732
|
+
* @param {reCaptchaToken} reCaptcha token for login chalenge
|
|
732
733
|
*/
|
|
733
734
|
|
|
734
735
|
}, {
|
|
735
736
|
key: 'login',
|
|
736
737
|
value: function () {
|
|
737
|
-
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(identifier, type) {
|
|
738
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(identifier, type, reCaptchaToken) {
|
|
738
739
|
var api, data, _error$response$data6, code, message;
|
|
739
740
|
|
|
740
741
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
@@ -744,7 +745,7 @@ var Como = function () {
|
|
|
744
745
|
api = this.comoData.api;
|
|
745
746
|
_context10.prev = 1;
|
|
746
747
|
_context10.next = 4;
|
|
747
|
-
return api.logIn(type, identifier);
|
|
748
|
+
return api.logIn(type, identifier, reCaptchaToken);
|
|
748
749
|
|
|
749
750
|
case 4:
|
|
750
751
|
data = _context10.sent;
|
|
@@ -773,7 +774,7 @@ var Como = function () {
|
|
|
773
774
|
}, _callee10, this, [[1, 8]]);
|
|
774
775
|
}));
|
|
775
776
|
|
|
776
|
-
function login(_x28, _x29) {
|
|
777
|
+
function login(_x28, _x29, _x30) {
|
|
777
778
|
return _ref10.apply(this, arguments);
|
|
778
779
|
}
|
|
779
780
|
|
|
@@ -845,7 +846,7 @@ var Como = function () {
|
|
|
845
846
|
}, _callee11, this, [[1, 9]]);
|
|
846
847
|
}));
|
|
847
848
|
|
|
848
|
-
function loginVerify(
|
|
849
|
+
function loginVerify(_x31, _x32, _x33) {
|
|
849
850
|
return _ref11.apply(this, arguments);
|
|
850
851
|
}
|
|
851
852
|
|
|
@@ -920,7 +921,7 @@ var Como = function () {
|
|
|
920
921
|
}, _callee13, this);
|
|
921
922
|
}));
|
|
922
923
|
|
|
923
|
-
function openApp(
|
|
924
|
+
function openApp(_x35) {
|
|
924
925
|
return _ref14.apply(this, arguments);
|
|
925
926
|
}
|
|
926
927
|
|
|
@@ -961,7 +962,7 @@ var Como = function () {
|
|
|
961
962
|
}, _callee14, this, [[1, 5]]);
|
|
962
963
|
}));
|
|
963
964
|
|
|
964
|
-
function clientUpdateMembership(
|
|
965
|
+
function clientUpdateMembership(_x36, _x37) {
|
|
965
966
|
return _ref15.apply(this, arguments);
|
|
966
967
|
}
|
|
967
968
|
|
|
@@ -1012,7 +1013,7 @@ var Como = function () {
|
|
|
1012
1013
|
}, _callee15, this);
|
|
1013
1014
|
}));
|
|
1014
1015
|
|
|
1015
|
-
function downloadMainResource(
|
|
1016
|
+
function downloadMainResource(_x38) {
|
|
1016
1017
|
return _ref16.apply(this, arguments);
|
|
1017
1018
|
}
|
|
1018
1019
|
|
|
@@ -1230,7 +1231,7 @@ var Como = function () {
|
|
|
1230
1231
|
}, _callee20, this);
|
|
1231
1232
|
}));
|
|
1232
1233
|
|
|
1233
|
-
function redeemAsset(
|
|
1234
|
+
function redeemAsset(_x39) {
|
|
1234
1235
|
return _ref21.apply(this, arguments);
|
|
1235
1236
|
}
|
|
1236
1237
|
|
|
@@ -1268,7 +1269,7 @@ var Como = function () {
|
|
|
1268
1269
|
}, _callee21, this);
|
|
1269
1270
|
}));
|
|
1270
1271
|
|
|
1271
|
-
function purchaseAsset(
|
|
1272
|
+
function purchaseAsset(_x40) {
|
|
1272
1273
|
return _ref22.apply(this, arguments);
|
|
1273
1274
|
}
|
|
1274
1275
|
|
|
@@ -1332,7 +1333,7 @@ var Como = function () {
|
|
|
1332
1333
|
}, _callee23, this);
|
|
1333
1334
|
}));
|
|
1334
1335
|
|
|
1335
|
-
function purchaseAssetAPI2(
|
|
1336
|
+
function purchaseAssetAPI2(_x41) {
|
|
1336
1337
|
return _ref24.apply(this, arguments);
|
|
1337
1338
|
}
|
|
1338
1339
|
|
|
@@ -1646,7 +1647,7 @@ var Como = function () {
|
|
|
1646
1647
|
}, _callee26, this);
|
|
1647
1648
|
}));
|
|
1648
1649
|
|
|
1649
|
-
function getRegistrationUrl(
|
|
1650
|
+
function getRegistrationUrl(_x42) {
|
|
1650
1651
|
return _ref27.apply(this, arguments);
|
|
1651
1652
|
}
|
|
1652
1653
|
|
|
@@ -1685,7 +1686,7 @@ var Como = function () {
|
|
|
1685
1686
|
}, _callee27, this);
|
|
1686
1687
|
}));
|
|
1687
1688
|
|
|
1688
|
-
function getProfileUrl(
|
|
1689
|
+
function getProfileUrl(_x43) {
|
|
1689
1690
|
return _ref28.apply(this, arguments);
|
|
1690
1691
|
}
|
|
1691
1692
|
|
|
@@ -1758,7 +1759,7 @@ var Como = function () {
|
|
|
1758
1759
|
}, _callee29, this);
|
|
1759
1760
|
}));
|
|
1760
1761
|
|
|
1761
|
-
function getDataPortabilityUrl(
|
|
1762
|
+
function getDataPortabilityUrl(_x44, _x45) {
|
|
1762
1763
|
return _ref30.apply(this, arguments);
|
|
1763
1764
|
}
|
|
1764
1765
|
|
|
@@ -1945,7 +1946,7 @@ var Como = function () {
|
|
|
1945
1946
|
}, _callee32, this);
|
|
1946
1947
|
}));
|
|
1947
1948
|
|
|
1948
|
-
function addPaymentMethod(
|
|
1949
|
+
function addPaymentMethod(_x47) {
|
|
1949
1950
|
return _ref33.apply(this, arguments);
|
|
1950
1951
|
}
|
|
1951
1952
|
|
|
@@ -1972,7 +1973,7 @@ var Como = function () {
|
|
|
1972
1973
|
}, _callee33, this);
|
|
1973
1974
|
}));
|
|
1974
1975
|
|
|
1975
|
-
function knowYourData(
|
|
1976
|
+
function knowYourData(_x48) {
|
|
1976
1977
|
return _ref34.apply(this, arguments);
|
|
1977
1978
|
}
|
|
1978
1979
|
|
|
@@ -1999,7 +2000,7 @@ var Como = function () {
|
|
|
1999
2000
|
}, _callee34, this);
|
|
2000
2001
|
}));
|
|
2001
2002
|
|
|
2002
|
-
function consentWithdraw(
|
|
2003
|
+
function consentWithdraw(_x49) {
|
|
2003
2004
|
return _ref35.apply(this, arguments);
|
|
2004
2005
|
}
|
|
2005
2006
|
|
|
@@ -2072,7 +2073,7 @@ var Como = function () {
|
|
|
2072
2073
|
}, _callee36, this);
|
|
2073
2074
|
}));
|
|
2074
2075
|
|
|
2075
|
-
function payInApp(
|
|
2076
|
+
function payInApp(_x50, _x51, _x52, _x53, _x54) {
|
|
2076
2077
|
return _ref37.apply(this, arguments);
|
|
2077
2078
|
}
|
|
2078
2079
|
|
|
@@ -2109,7 +2110,7 @@ var Como = function () {
|
|
|
2109
2110
|
}, _callee37, this);
|
|
2110
2111
|
}));
|
|
2111
2112
|
|
|
2112
|
-
function deletePayment(
|
|
2113
|
+
function deletePayment(_x55) {
|
|
2113
2114
|
return _ref38.apply(this, arguments);
|
|
2114
2115
|
}
|
|
2115
2116
|
|
|
@@ -2144,7 +2145,7 @@ var Como = function () {
|
|
|
2144
2145
|
}, _callee38, this);
|
|
2145
2146
|
}));
|
|
2146
2147
|
|
|
2147
|
-
function getMemberMessages(
|
|
2148
|
+
function getMemberMessages(_x56, _x57, _x58) {
|
|
2148
2149
|
return _ref39.apply(this, arguments);
|
|
2149
2150
|
}
|
|
2150
2151
|
|
|
@@ -2194,7 +2195,7 @@ var Como = function () {
|
|
|
2194
2195
|
}, _callee39, this);
|
|
2195
2196
|
}));
|
|
2196
2197
|
|
|
2197
|
-
function budgetTransfer(
|
|
2198
|
+
function budgetTransfer(_x59, _x60, _x61, _x62) {
|
|
2198
2199
|
return _ref40.apply(this, arguments);
|
|
2199
2200
|
}
|
|
2200
2201
|
|
|
@@ -2240,7 +2241,7 @@ var Como = function () {
|
|
|
2240
2241
|
}, _callee40, this);
|
|
2241
2242
|
}));
|
|
2242
2243
|
|
|
2243
|
-
function budgetTransferClaim(
|
|
2244
|
+
function budgetTransferClaim(_x63) {
|
|
2244
2245
|
return _ref41.apply(this, arguments);
|
|
2245
2246
|
}
|
|
2246
2247
|
|
|
@@ -2293,7 +2294,7 @@ var Como = function () {
|
|
|
2293
2294
|
}, _callee41, this);
|
|
2294
2295
|
}));
|
|
2295
2296
|
|
|
2296
|
-
function logUserAction(
|
|
2297
|
+
function logUserAction(_x64, _x65) {
|
|
2297
2298
|
return _ref42.apply(this, arguments);
|
|
2298
2299
|
}
|
|
2299
2300
|
|
|
@@ -2327,7 +2328,7 @@ var Como = function () {
|
|
|
2327
2328
|
}, _callee42, this);
|
|
2328
2329
|
}));
|
|
2329
2330
|
|
|
2330
|
-
function getPurchaseHistory(
|
|
2331
|
+
function getPurchaseHistory(_x66, _x67) {
|
|
2331
2332
|
return _ref43.apply(this, arguments);
|
|
2332
2333
|
}
|
|
2333
2334
|
|
|
@@ -228,14 +228,14 @@ exports.unsubscribeSms = function (service) {
|
|
|
228
228
|
|
|
229
229
|
exports.logIn = function (service) {
|
|
230
230
|
return function () {
|
|
231
|
-
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, identifier) {
|
|
231
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, identifier, reCaptchaToken) {
|
|
232
232
|
var params, headers, _ref14, data;
|
|
233
233
|
|
|
234
234
|
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
235
235
|
while (1) {
|
|
236
236
|
switch (_context7.prev = _context7.next) {
|
|
237
237
|
case 0:
|
|
238
|
-
params = { type: type, identifier: identifier };
|
|
238
|
+
params = { type: type, identifier: identifier, reCaptchaToken: reCaptchaToken };
|
|
239
239
|
headers = getHashHeader(params);
|
|
240
240
|
_context7.next = 4;
|
|
241
241
|
return service.post('/auth/v2/auth/logIn', params, { headers: headers });
|
|
@@ -253,7 +253,7 @@ exports.logIn = function (service) {
|
|
|
253
253
|
}, _callee7, undefined);
|
|
254
254
|
}));
|
|
255
255
|
|
|
256
|
-
return function (_x23, _x24) {
|
|
256
|
+
return function (_x23, _x24, _x25) {
|
|
257
257
|
return _ref13.apply(this, arguments);
|
|
258
258
|
};
|
|
259
259
|
}();
|
|
@@ -290,7 +290,7 @@ exports.logInVerify = function (service) {
|
|
|
290
290
|
}, _callee8, undefined);
|
|
291
291
|
}));
|
|
292
292
|
|
|
293
|
-
return function (
|
|
293
|
+
return function (_x26, _x27, _x28) {
|
|
294
294
|
return _ref15.apply(this, arguments);
|
|
295
295
|
};
|
|
296
296
|
}();
|
|
@@ -348,7 +348,7 @@ exports.refreshToken = function (service) {
|
|
|
348
348
|
}, _callee10, undefined);
|
|
349
349
|
}));
|
|
350
350
|
|
|
351
|
-
return function (
|
|
351
|
+
return function (_x29, _x30, _x31, _x32) {
|
|
352
352
|
return _ref19.apply(this, arguments);
|
|
353
353
|
};
|
|
354
354
|
}();
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -314,11 +314,12 @@ class Como {
|
|
|
314
314
|
*
|
|
315
315
|
* @param {Object} identifier an object which identifies the user by its credentials
|
|
316
316
|
* @param {string} type login type i.e PhoneNumber/Email/etc
|
|
317
|
+
* @param {reCaptchaToken} reCaptcha token for login chalenge
|
|
317
318
|
*/
|
|
318
|
-
async login(identifier, type) {
|
|
319
|
+
async login(identifier, type, reCaptchaToken) {
|
|
319
320
|
const { api } = this.comoData;
|
|
320
321
|
try {
|
|
321
|
-
const data = await api.logIn(type, identifier);
|
|
322
|
+
const data = await api.logIn(type, identifier, reCaptchaToken);
|
|
322
323
|
return data;
|
|
323
324
|
} catch (error) {
|
|
324
325
|
if (error.response && error.response.data) {
|