@como/como-client 0.1.9-1.23 → 0.1.9-1.24

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 CHANGED
@@ -217,7 +217,7 @@ var Como = function () {
217
217
  _APIService$getServic = APIService.getService(gateway, installationId, getCredentials, updateCredentials, source), service = _APIService$getServic.service, refresher = _APIService$getServic.refresher, initService = _APIService$getServic.initService;
218
218
 
219
219
  this.comoData.api = service;
220
- this.comoData.InitApi = initService;
220
+ this.comoData.initApi = initService;
221
221
  this.comoData.refresher = refresher;
222
222
 
223
223
  accessToken = credentials.accessToken, refreshToken = credentials.refreshToken, expiresIn = credentials.expiresIn;
@@ -243,7 +243,7 @@ var Como = function () {
243
243
 
244
244
  _context3.prev = 23;
245
245
  _context3.next = 26;
246
- return this.comoData.InitApi.signOn(source);
246
+ return this.comoData.initApi.signOn(installationId, locationId, refreshToken, source);
247
247
 
248
248
  case 26:
249
249
  data = _context3.sent;
@@ -271,7 +271,7 @@ var Como = function () {
271
271
 
272
272
  _context3.prev = 37;
273
273
  _context3.next = 40;
274
- return this.comoData.InitApi.refreshToken(installationId, refreshToken);
274
+ return this.comoData.initApi.refreshToken(installationId, refreshToken);
275
275
 
276
276
  case 40:
277
277
  _data = _context3.sent;
@@ -297,7 +297,7 @@ var Como = function () {
297
297
 
298
298
  _context3.prev = 49;
299
299
  _context3.next = 52;
300
- return this.comoData.InitApi.signOn(source);
300
+ return this.comoData.initApi.signOn(installationId, locationId, refreshToken, source);
301
301
 
302
302
  case 52:
303
303
  _data2 = _context3.sent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.1.91.23",
3
+ "version": "0.1.91.24",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -97,7 +97,7 @@ class Como {
97
97
  const { service, refresher, initService } = APIService
98
98
  .getService(gateway, installationId, getCredentials, updateCredentials, source);
99
99
  this.comoData.api = service;
100
- this.comoData.InitApi = initService;
100
+ this.comoData.initApi = initService;
101
101
  this.comoData.refresher = refresher;
102
102
 
103
103
  const { accessToken, refreshToken, expiresIn } = credentials;
@@ -110,7 +110,7 @@ class Como {
110
110
  }
111
111
  if(credsNotExist){
112
112
  try{
113
- const data = await this.comoData.InitApi.signOn(source);
113
+ const data = await this.comoData.initApi.signOn(installationId, locationId, refreshToken, source);
114
114
  updateCredentials(data, true);
115
115
  }catch(e){
116
116
  //TODO: need to parse error
@@ -123,7 +123,7 @@ class Como {
123
123
  let refreshFailed = false;
124
124
  if(isExpired){
125
125
  try{
126
- const data = await this.comoData.InitApi.refreshToken(installationId, refreshToken);
126
+ const data = await this.comoData.initApi.refreshToken(installationId, refreshToken);
127
127
  updateCredentials(data, true);
128
128
  }catch(e){
129
129
  console.log(`Failed to refresh token, installationId:${installationId}, locationId:${locationId}, source:${source}`);
@@ -134,7 +134,7 @@ class Como {
134
134
  }
135
135
  if(refreshFailed){
136
136
  try{
137
- const data = await this.comoData.InitApi.signOn(source);
137
+ const data = await this.comoData.initApi.signOn(installationId, locationId, refreshToken, source);
138
138
  updateCredentials(data, true);
139
139
  }
140
140
  catch(e){