@como/como-client 0.1.80 → 0.1.81

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.
@@ -12,16 +12,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
 
13
13
  exports.signOn = function (service) {
14
14
  return function () {
15
- var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(deviceId, locationId) {
15
+ var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(deviceId, locationId, refreshToken) {
16
16
  var params, _ref2, data;
17
17
 
18
18
  return _regenerator2.default.wrap(function _callee$(_context) {
19
19
  while (1) {
20
20
  switch (_context.prev = _context.next) {
21
21
  case 0:
22
- params = { deviceId: deviceId, locationId: locationId };
22
+ params = { deviceId: deviceId, locationId: locationId, refreshToken: refreshToken };
23
23
  _context.next = 3;
24
- return service.post('/auth/v1/auth/signOn', params);
24
+ return service.post('/auth/v2/auth/signOn', params);
25
25
 
26
26
  case 3:
27
27
  _ref2 = _context.sent;
@@ -36,7 +36,7 @@ exports.signOn = function (service) {
36
36
  }, _callee, undefined);
37
37
  }));
38
38
 
39
- return function (_x, _x2) {
39
+ return function (_x, _x2, _x3) {
40
40
  return _ref.apply(this, arguments);
41
41
  };
42
42
  }();
@@ -69,7 +69,7 @@ exports.register = function (service) {
69
69
  }, _callee2, undefined);
70
70
  }));
71
71
 
72
- return function (_x3, _x4, _x5) {
72
+ return function (_x4, _x5, _x6) {
73
73
  return _ref3.apply(this, arguments);
74
74
  };
75
75
  }();
@@ -101,7 +101,7 @@ exports.registerVerify = function (service) {
101
101
  }, _callee3, undefined);
102
102
  }));
103
103
 
104
- return function (_x7, _x8, _x9, _x10) {
104
+ return function (_x8, _x9, _x10, _x11) {
105
105
  return _ref5.apply(this, arguments);
106
106
  };
107
107
  }();
@@ -134,7 +134,7 @@ exports.updateProfile = function (service) {
134
134
  }, _callee4, undefined);
135
135
  }));
136
136
 
137
- return function (_x11, _x12) {
137
+ return function (_x12, _x13) {
138
138
  return _ref7.apply(this, arguments);
139
139
  };
140
140
  }();
@@ -168,7 +168,7 @@ exports.updateProfileVerify = function (service) {
168
168
  }, _callee5, undefined);
169
169
  }));
170
170
 
171
- return function (_x14, _x15, _x16, _x17) {
171
+ return function (_x15, _x16, _x17, _x18) {
172
172
  return _ref9.apply(this, arguments);
173
173
  };
174
174
  }();
@@ -200,7 +200,7 @@ exports.unsubscribeSms = function (service) {
200
200
  }, _callee6, undefined);
201
201
  }));
202
202
 
203
- return function (_x19, _x20) {
203
+ return function (_x20, _x21) {
204
204
  return _ref11.apply(this, arguments);
205
205
  };
206
206
  }();
@@ -232,7 +232,7 @@ exports.logIn = function (service) {
232
232
  }, _callee7, undefined);
233
233
  }));
234
234
 
235
- return function (_x21, _x22) {
235
+ return function (_x22, _x23) {
236
236
  return _ref13.apply(this, arguments);
237
237
  };
238
238
  }();
@@ -268,7 +268,7 @@ exports.logInVerify = function (service) {
268
268
  }, _callee8, undefined);
269
269
  }));
270
270
 
271
- return function (_x23, _x24, _x25) {
271
+ return function (_x24, _x25, _x26) {
272
272
  return _ref15.apply(this, arguments);
273
273
  };
274
274
  }();
@@ -325,7 +325,7 @@ exports.refreshToken = function (service) {
325
325
  }, _callee10, undefined);
326
326
  }));
327
327
 
328
- return function (_x26, _x27) {
328
+ return function (_x27, _x28) {
329
329
  return _ref19.apply(this, arguments);
330
330
  };
331
331
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -35,9 +35,10 @@ class Como {
35
35
  * Requires init.
36
36
  */
37
37
  async signon() {
38
- const { api } = this.comoData;
38
+ const { api,credentials } = this.comoData;
39
+ const { refreshToken } = credentials ? credentials : {};
39
40
  try {
40
- const data = await api.signOn(this.comoData.installationId, this.comoData.locationId);
41
+ const data = await api.signOn(this.comoData.installationId, this.comoData.locationId, refreshToken);
41
42
  return data;
42
43
  } catch (error) {
43
44
  if (error.response && error.response.data) {