@como/como-client 0.7.63 → 0.7.64

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
@@ -2121,14 +2121,31 @@ var Como = function () {
2121
2121
 
2122
2122
  }, {
2123
2123
  key: 'getMemberMessages',
2124
- value: function getMemberMessages(tag, limit, offset) {
2125
- var _comoData36 = this.comoData,
2126
- api = _comoData36.api,
2127
- locationId = _comoData36.locationId,
2128
- env = _comoData36.env_params;
2124
+ value: function () {
2125
+ var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee38(tag, limit, offset) {
2126
+ var _comoData36, api, locationId, env;
2129
2127
 
2130
- return api.getMemberMessages(env.services_root, locationId, tag, limit, offset);
2131
- }
2128
+ return _regenerator2.default.wrap(function _callee38$(_context38) {
2129
+ while (1) {
2130
+ switch (_context38.prev = _context38.next) {
2131
+ case 0:
2132
+ _comoData36 = this.comoData, api = _comoData36.api, locationId = _comoData36.locationId, env = _comoData36.env_params;
2133
+ return _context38.abrupt('return', api.getMemberMessages(env.services_root, locationId, tag, limit, offset));
2134
+
2135
+ case 2:
2136
+ case 'end':
2137
+ return _context38.stop();
2138
+ }
2139
+ }
2140
+ }, _callee38, this);
2141
+ }));
2142
+
2143
+ function getMemberMessages(_x55, _x56, _x57) {
2144
+ return _ref39.apply(this, arguments);
2145
+ }
2146
+
2147
+ return getMemberMessages;
2148
+ }()
2132
2149
 
2133
2150
  /**
2134
2151
  * @param {string} keysList keys of the messages to mark as read
@@ -2155,26 +2172,26 @@ var Como = function () {
2155
2172
  }, {
2156
2173
  key: 'budgetTransfer',
2157
2174
  value: function () {
2158
- var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee38(receiver, sender, amount, wallet) {
2175
+ var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee39(receiver, sender, amount, wallet) {
2159
2176
  var _comoData38, api, locationId, env;
2160
2177
 
2161
- return _regenerator2.default.wrap(function _callee38$(_context38) {
2178
+ return _regenerator2.default.wrap(function _callee39$(_context39) {
2162
2179
  while (1) {
2163
- switch (_context38.prev = _context38.next) {
2180
+ switch (_context39.prev = _context39.next) {
2164
2181
  case 0:
2165
2182
  _comoData38 = this.comoData, api = _comoData38.api, locationId = _comoData38.locationId, env = _comoData38.env_params;
2166
- return _context38.abrupt('return', api.budgetTransfer(env.services_root, locationId, receiver, sender, amount, wallet));
2183
+ return _context39.abrupt('return', api.budgetTransfer(env.services_root, locationId, receiver, sender, amount, wallet));
2167
2184
 
2168
2185
  case 2:
2169
2186
  case 'end':
2170
- return _context38.stop();
2187
+ return _context39.stop();
2171
2188
  }
2172
2189
  }
2173
- }, _callee38, this);
2190
+ }, _callee39, this);
2174
2191
  }));
2175
2192
 
2176
- function budgetTransfer(_x55, _x56, _x57, _x58) {
2177
- return _ref39.apply(this, arguments);
2193
+ function budgetTransfer(_x58, _x59, _x60, _x61) {
2194
+ return _ref40.apply(this, arguments);
2178
2195
  }
2179
2196
 
2180
2197
  return budgetTransfer;
@@ -2201,26 +2218,26 @@ var Como = function () {
2201
2218
  }, {
2202
2219
  key: 'budgetTransferClaim',
2203
2220
  value: function () {
2204
- var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee39(claimCode) {
2221
+ var _ref41 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee40(claimCode) {
2205
2222
  var _comoData40, api, locationId, env;
2206
2223
 
2207
- return _regenerator2.default.wrap(function _callee39$(_context39) {
2224
+ return _regenerator2.default.wrap(function _callee40$(_context40) {
2208
2225
  while (1) {
2209
- switch (_context39.prev = _context39.next) {
2226
+ switch (_context40.prev = _context40.next) {
2210
2227
  case 0:
2211
2228
  _comoData40 = this.comoData, api = _comoData40.api, locationId = _comoData40.locationId, env = _comoData40.env_params;
2212
- return _context39.abrupt('return', api.budgetTransferClaim(env.services_root, locationId, claimCode));
2229
+ return _context40.abrupt('return', api.budgetTransferClaim(env.services_root, locationId, claimCode));
2213
2230
 
2214
2231
  case 2:
2215
2232
  case 'end':
2216
- return _context39.stop();
2233
+ return _context40.stop();
2217
2234
  }
2218
2235
  }
2219
- }, _callee39, this);
2236
+ }, _callee40, this);
2220
2237
  }));
2221
2238
 
2222
- function budgetTransferClaim(_x59) {
2223
- return _ref40.apply(this, arguments);
2239
+ function budgetTransferClaim(_x62) {
2240
+ return _ref41.apply(this, arguments);
2224
2241
  }
2225
2242
 
2226
2243
  return budgetTransferClaim;
@@ -2254,26 +2271,26 @@ var Como = function () {
2254
2271
  }, {
2255
2272
  key: 'logUserAction',
2256
2273
  value: function () {
2257
- var _ref41 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee40(action, logData) {
2274
+ var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee41(action, logData) {
2258
2275
  var _comoData42, env, locationId, api, token;
2259
2276
 
2260
- return _regenerator2.default.wrap(function _callee40$(_context40) {
2277
+ return _regenerator2.default.wrap(function _callee41$(_context41) {
2261
2278
  while (1) {
2262
- switch (_context40.prev = _context40.next) {
2279
+ switch (_context41.prev = _context41.next) {
2263
2280
  case 0:
2264
2281
  _comoData42 = this.comoData, env = _comoData42.env_params, locationId = _comoData42.locationId, api = _comoData42.api, token = _comoData42.token;
2265
- return _context40.abrupt('return', api.logUserAction(env.zapp_root, locationId, token, action, logData));
2282
+ return _context41.abrupt('return', api.logUserAction(env.zapp_root, locationId, token, action, logData));
2266
2283
 
2267
2284
  case 2:
2268
2285
  case 'end':
2269
- return _context40.stop();
2286
+ return _context41.stop();
2270
2287
  }
2271
2288
  }
2272
- }, _callee40, this);
2289
+ }, _callee41, this);
2273
2290
  }));
2274
2291
 
2275
- function logUserAction(_x60, _x61) {
2276
- return _ref41.apply(this, arguments);
2292
+ function logUserAction(_x63, _x64) {
2293
+ return _ref42.apply(this, arguments);
2277
2294
  }
2278
2295
 
2279
2296
  return logUserAction;
@@ -2288,26 +2305,26 @@ var Como = function () {
2288
2305
  }, {
2289
2306
  key: 'getPurchaseHistory',
2290
2307
  value: function () {
2291
- var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee41(limit, offset) {
2308
+ var _ref43 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee42(limit, offset) {
2292
2309
  var _comoData43, locationId, api, membership;
2293
2310
 
2294
- return _regenerator2.default.wrap(function _callee41$(_context41) {
2311
+ return _regenerator2.default.wrap(function _callee42$(_context42) {
2295
2312
  while (1) {
2296
- switch (_context41.prev = _context41.next) {
2313
+ switch (_context42.prev = _context42.next) {
2297
2314
  case 0:
2298
2315
  _comoData43 = this.comoData, locationId = _comoData43.locationId, api = _comoData43.api, membership = _comoData43.membership;
2299
- return _context41.abrupt('return', api.getPurchaseHistory(locationId, membership.Key, limit, offset));
2316
+ return _context42.abrupt('return', api.getPurchaseHistory(locationId, membership.Key, limit, offset));
2300
2317
 
2301
2318
  case 2:
2302
2319
  case 'end':
2303
- return _context41.stop();
2320
+ return _context42.stop();
2304
2321
  }
2305
2322
  }
2306
- }, _callee41, this);
2323
+ }, _callee42, this);
2307
2324
  }));
2308
2325
 
2309
- function getPurchaseHistory(_x62, _x63) {
2310
- return _ref42.apply(this, arguments);
2326
+ function getPurchaseHistory(_x65, _x66) {
2327
+ return _ref43.apply(this, arguments);
2311
2328
  }
2312
2329
 
2313
2330
  return getPurchaseHistory;
@@ -22,7 +22,7 @@ var moment = require('moment-timezone');
22
22
  * @param {string} expires date format
23
23
  */
24
24
  var isExpired = function isExpired(expires) {
25
- return moment(expires).isBefore(moment());
25
+ return moment(expires).subtract(20, 'seconds').isBefore(moment());
26
26
  };
27
27
 
28
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.63",
3
+ "version": "0.7.64",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -873,7 +873,7 @@ class Como {
873
873
  /**
874
874
  * @param {string} tag for Pop-up Message Trigger (Optional param)
875
875
  */
876
- getMemberMessages(tag, limit, offset) {
876
+ async getMemberMessages(tag, limit, offset) {
877
877
  const {
878
878
  api, locationId, env_params: env,
879
879
  } = this.comoData;