@como/como-client 0.7.91 → 0.7.92

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
@@ -2167,6 +2167,8 @@ var Como = function () {
2167
2167
  key: 'getMemberMessages',
2168
2168
  value: function () {
2169
2169
  var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee38(tag, limit, offset) {
2170
+ var fetchExpiredMessages = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
2171
+
2170
2172
  var _comoData36, api, locationId, env;
2171
2173
 
2172
2174
  return _regenerator2.default.wrap(function _callee38$(_context38) {
@@ -2178,7 +2180,7 @@ var Como = function () {
2178
2180
  return this.refreshTokenIfNeeded();
2179
2181
 
2180
2182
  case 3:
2181
- return _context38.abrupt('return', api.getMemberMessages(env.services_root, locationId, tag, limit, offset));
2183
+ return _context38.abrupt('return', api.getMemberMessages(env.services_root, locationId, tag, limit, offset, fetchExpiredMessages));
2182
2184
 
2183
2185
  case 4:
2184
2186
  case 'end':
@@ -2238,7 +2240,7 @@ var Como = function () {
2238
2240
  }, _callee39, this);
2239
2241
  }));
2240
2242
 
2241
- function budgetTransfer(_x61, _x62, _x63, _x64) {
2243
+ function budgetTransfer(_x62, _x63, _x64, _x65) {
2242
2244
  return _ref40.apply(this, arguments);
2243
2245
  }
2244
2246
 
@@ -2284,7 +2286,7 @@ var Como = function () {
2284
2286
  }, _callee40, this);
2285
2287
  }));
2286
2288
 
2287
- function budgetTransferClaim(_x65) {
2289
+ function budgetTransferClaim(_x66) {
2288
2290
  return _ref41.apply(this, arguments);
2289
2291
  }
2290
2292
 
@@ -2336,7 +2338,7 @@ var Como = function () {
2336
2338
  }, _callee41, this);
2337
2339
  }));
2338
2340
 
2339
- function logUserAction(_x66, _x67) {
2341
+ function logUserAction(_x67, _x68) {
2340
2342
  return _ref42.apply(this, arguments);
2341
2343
  }
2342
2344
 
@@ -2370,7 +2372,7 @@ var Como = function () {
2370
2372
  }, _callee42, this);
2371
2373
  }));
2372
2374
 
2373
- function getPurchaseHistory(_x68, _x69) {
2375
+ function getPurchaseHistory(_x69, _x70) {
2374
2376
  return _ref43.apply(this, arguments);
2375
2377
  }
2376
2378
 
@@ -829,6 +829,7 @@ exports.deletePayment = function (service) {
829
829
  exports.getMemberMessages = function (service) {
830
830
  return function () {
831
831
  var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25(baseUrl, locationId, tag, limit, offset) {
832
+ var fetchExpiredMessages = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
832
833
  var query, url;
833
834
  return _regenerator2.default.wrap(function _callee25$(_context25) {
834
835
  while (1) {
@@ -839,7 +840,8 @@ exports.getMemberMessages = function (service) {
839
840
  MimeType: 'application/json',
840
841
  tag: tag,
841
842
  limit: limit,
842
- offset: offset
843
+ offset: offset,
844
+ ignoreExpirationDate: fetchExpiredMessages
843
845
  };
844
846
  url = urlsUtils.appendQuery(baseUrl + '/memberMessages', query);
845
847
  return _context25.abrupt('return', service.get(url));
@@ -884,7 +886,7 @@ exports.markAsReadMemberMessages = function (service) {
884
886
  }, _callee26, undefined);
885
887
  }));
886
888
 
887
- return function (_x81, _x82, _x83) {
889
+ return function (_x82, _x83, _x84) {
888
890
  return _ref40.apply(this, arguments);
889
891
  };
890
892
  }();
@@ -917,7 +919,7 @@ exports.budgetTransfer = function (service) {
917
919
  }, _callee27, undefined);
918
920
  }));
919
921
 
920
- return function (_x84, _x85, _x86, _x87, _x88, _x89) {
922
+ return function (_x85, _x86, _x87, _x88, _x89, _x90) {
921
923
  return _ref41.apply(this, arguments);
922
924
  };
923
925
  }();
@@ -943,7 +945,7 @@ exports.budgetTransferClaim = function (service) {
943
945
  }, _callee28, undefined);
944
946
  }));
945
947
 
946
- return function (_x90, _x91, _x92) {
948
+ return function (_x91, _x92, _x93) {
947
949
  return _ref42.apply(this, arguments);
948
950
  };
949
951
  }();
@@ -973,7 +975,7 @@ exports.getCreditClaimData = function (service) {
973
975
  }, _callee29, undefined);
974
976
  }));
975
977
 
976
- return function (_x93, _x94) {
978
+ return function (_x94, _x95) {
977
979
  return _ref43.apply(this, arguments);
978
980
  };
979
981
  }();
@@ -1004,7 +1006,7 @@ exports.claim = function (service) {
1004
1006
  }, _callee30, undefined);
1005
1007
  }));
1006
1008
 
1007
- return function (_x95, _x96, _x97, _x98, _x99) {
1009
+ return function (_x96, _x97, _x98, _x99, _x100) {
1008
1010
  return _ref44.apply(this, arguments);
1009
1011
  };
1010
1012
  }();
@@ -1034,7 +1036,7 @@ exports.getUserPointShopDataAPI2 = function (service) {
1034
1036
  }, _callee31, undefined);
1035
1037
  }));
1036
1038
 
1037
- return function (_x100, _x101) {
1039
+ return function (_x101, _x102) {
1038
1040
  return _ref45.apply(this, arguments);
1039
1041
  };
1040
1042
  }();
@@ -1064,7 +1066,7 @@ exports.purchaseAssetAPI2 = function (service) {
1064
1066
  }, _callee32, undefined);
1065
1067
  }));
1066
1068
 
1067
- return function (_x102, _x103, _x104) {
1069
+ return function (_x103, _x104, _x105) {
1068
1070
  return _ref46.apply(this, arguments);
1069
1071
  };
1070
1072
  }();
@@ -1100,7 +1102,7 @@ exports.logUserAction = function (service) {
1100
1102
  }, _callee33, undefined);
1101
1103
  }));
1102
1104
 
1103
- return function (_x105, _x106, _x107, _x108) {
1105
+ return function (_x106, _x107, _x108, _x109) {
1104
1106
  return _ref47.apply(this, arguments);
1105
1107
  };
1106
1108
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.91",
3
+ "version": "0.7.92",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -904,12 +904,12 @@ class Como {
904
904
  /**
905
905
  * @param {string} tag for Pop-up Message Trigger (Optional param)
906
906
  */
907
- async getMemberMessages(tag, limit, offset) {
907
+ async getMemberMessages(tag, limit, offset, fetchExpiredMessages = false) {
908
908
  const {
909
909
  api, locationId, env_params: env,
910
910
  } = this.comoData;
911
911
  await this.refreshTokenIfNeeded();
912
- return api.getMemberMessages(env.services_root, locationId, tag, limit, offset);
912
+ return api.getMemberMessages(env.services_root, locationId, tag, limit, offset, fetchExpiredMessages);
913
913
  }
914
914
 
915
915
  /**