@como/como-client 0.7.81 → 0.7.82

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
@@ -174,7 +174,8 @@ var Como = function () {
174
174
  installationId: installationId,
175
175
  locationId: locationId,
176
176
  source: source,
177
- env_params: (0, _extends3.default)({}, INITIAL_COMO_DATA.env[environmentId])
177
+ env_params: (0, _extends3.default)({}, INITIAL_COMO_DATA.env[environmentId]),
178
+ tempTokenData: {}
178
179
  });
179
180
 
180
181
  updateCredentials = function updateCredentials(creds) {
@@ -407,7 +408,9 @@ var Como = function () {
407
408
  case 11:
408
409
  translatedData = _context3.sent;
409
410
 
410
- this.comoData.tempTokenData = translatedData.tempTokenData || {};
411
+ if (translatedData.tempTokenData.TemporaryToken) {
412
+ this.comoData.tempTokenData[translatedData.tempTokenData.TemporaryToken] = translatedData.tempTokenData.ExpirationDate;
413
+ }
411
414
  return _context3.abrupt('return', translatedData);
412
415
 
413
416
  case 14:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.81",
3
+ "version": "0.7.82",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -84,6 +84,7 @@ class Como {
84
84
  env_params: {
85
85
  ...INITIAL_COMO_DATA.env[environmentId],
86
86
  },
87
+ tempTokenData: {},
87
88
  };
88
89
 
89
90
  const updateCredentials = (creds, isNew = false) => {
@@ -201,7 +202,9 @@ class Como {
201
202
  locationId, token, membership, locationData, assets, gpsData, assetID, accessibilityData,
202
203
  };
203
204
  const translatedData = await comoExternalUrlTranslator.translateUrl(externalUrl, apiObjects, dataToUse);
204
- this.comoData.tempTokenData = translatedData.tempTokenData || {};
205
+ if (translatedData.tempTokenData.TemporaryToken) {
206
+ this.comoData.tempTokenData[translatedData.tempTokenData.TemporaryToken] = translatedData.tempTokenData.ExpirationDate;
207
+ }
205
208
  return translatedData;
206
209
  }
207
210