Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@como/como-client

Package Overview
Dependencies
Maintainers
0
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@como/como-client - npm Package Compare versions

Comparing version 0.7.92 to 0.7.93

135

lib/services/auth.service.js

@@ -203,6 +203,6 @@ "use strict";

exports.unsubscribeSms = function (service) {
exports.updateLanguage = function (service) {
return function () {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(locationId, identifier) {
var body, _ref12, data;
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(language) {
var body, headers, _ref12, data;

@@ -213,7 +213,8 @@ return _regenerator2.default.wrap(function _callee6$(_context6) {

case 0:
body = { locationId: locationId, identifier: identifier };
_context6.next = 3;
return service.post('/auth/v1/update-profile/unsubscribeSms', body);
body = { language: language };
headers = getHashHeader(body);
_context6.next = 4;
return service.post('/auth/v1/update-profile/language', body, { headers: headers });
case 3:
case 4:
_ref12 = _context6.sent;

@@ -223,3 +224,3 @@ data = _ref12.data;

case 6:
case 7:
case "end":

@@ -232,3 +233,3 @@ return _context6.stop();

return function (_x22, _x23) {
return function (_x22) {
return _ref11.apply(this, arguments);

@@ -239,6 +240,6 @@ };

exports.logIn = function (service) {
exports.unsubscribeSms = function (service) {
return function () {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, identifier, reCaptchaToken) {
var params, headers, _ref14, data;
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(locationId, identifier) {
var body, _ref14, data;

@@ -249,8 +250,7 @@ return _regenerator2.default.wrap(function _callee7$(_context7) {

case 0:
params = { type: type, identifier: identifier, reCaptchaToken: reCaptchaToken };
headers = getHashHeader(params);
_context7.next = 4;
return service.post('/auth/v2/auth/logIn', params, { headers: headers });
body = { locationId: locationId, identifier: identifier };
_context7.next = 3;
return service.post('/auth/v1/update-profile/unsubscribeSms', body);
case 4:
case 3:
_ref14 = _context7.sent;

@@ -260,3 +260,3 @@ data = _ref14.data;

case 7:
case 6:
case "end":

@@ -269,3 +269,3 @@ return _context7.stop();

return function (_x24, _x25, _x26) {
return function (_x23, _x24) {
return _ref13.apply(this, arguments);

@@ -276,5 +276,5 @@ };

exports.logInVerify = function (service) {
exports.logIn = function (service) {
return function () {
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(code, type, identifier, reCaptchaToken) {
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(type, identifier, reCaptchaToken) {
var params, headers, _ref16, data;

@@ -286,11 +286,6 @@

case 0:
params = {
identifier: identifier,
code: code,
type: type,
reCaptchaToken: reCaptchaToken
};
params = { type: type, identifier: identifier, reCaptchaToken: reCaptchaToken };
headers = getHashHeader(params);
_context8.next = 4;
return service.post('/auth/v2/auth/logInVerify', params, { headers: headers });
return service.post('/auth/v2/auth/logIn', params, { headers: headers });

@@ -310,3 +305,3 @@ case 4:

return function (_x27, _x28, _x29, _x30) {
return function (_x25, _x26, _x27) {
return _ref15.apply(this, arguments);

@@ -317,24 +312,62 @@ };

exports.logInVerify = function (service) {
return function () {
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(code, type, identifier, reCaptchaToken) {
var params, headers, _ref18, data;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
case 0:
params = {
identifier: identifier,
code: code,
type: type,
reCaptchaToken: reCaptchaToken
};
headers = getHashHeader(params);
_context9.next = 4;
return service.post('/auth/v2/auth/logInVerify', params, { headers: headers });
case 4:
_ref18 = _context9.sent;
data = _ref18.data;
return _context9.abrupt("return", data);
case 7:
case "end":
return _context9.stop();
}
}
}, _callee9, undefined);
}));
return function (_x28, _x29, _x30, _x31) {
return _ref17.apply(this, arguments);
};
}();
};
exports.logOut = function (service) {
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
var _ref18, data;
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
var _ref20, data;
return _regenerator2.default.wrap(function _callee9$(_context9) {
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
switch (_context9.prev = _context9.next) {
switch (_context10.prev = _context10.next) {
case 0:
_context9.next = 2;
_context10.next = 2;
return service.post('/auth/v1/auth/logOut');
case 2:
_ref18 = _context9.sent;
data = _ref18.data;
return _context9.abrupt("return", data);
_ref20 = _context10.sent;
data = _ref20.data;
return _context10.abrupt("return", data);
case 5:
case "end":
return _context9.stop();
return _context10.stop();
}
}
}, _callee9, undefined);
}, _callee10, undefined);
}));

@@ -345,31 +378,31 @@ };

return function () {
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(uid, token, locationId, source) {
var params, headers, _ref20, data;
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(uid, token, locationId, source) {
var params, headers, _ref22, data;
return _regenerator2.default.wrap(function _callee10$(_context10) {
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
switch (_context10.prev = _context10.next) {
switch (_context11.prev = _context11.next) {
case 0:
params = { uid: uid, refreshToken: token, locationId: locationId, source: source };
headers = getHashHeader(params);
_context10.next = 4;
_context11.next = 4;
return service.post('/auth/v2/auth/refresh-token', params, { headers: headers });
case 4:
_ref20 = _context10.sent;
data = _ref20.data;
return _context10.abrupt("return", data);
_ref22 = _context11.sent;
data = _ref22.data;
return _context11.abrupt("return", data);
case 7:
case "end":
return _context10.stop();
return _context11.stop();
}
}
}, _callee10, undefined);
}, _callee11, undefined);
}));
return function (_x31, _x32, _x33, _x34) {
return _ref19.apply(this, arguments);
return function (_x32, _x33, _x34, _x35) {
return _ref21.apply(this, arguments);
};
}();
};
{
"name": "@como/como-client",
"version": "0.7.92",
"version": "0.7.93",
"description": "Client module for Como's loaylty API",

@@ -5,0 +5,0 @@ "main": "src/como.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc