@como/como-client 0.7.87 → 0.7.89

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
@@ -576,13 +576,14 @@ var Como = function () {
576
576
  *
577
577
  * @param {Object} form update form values
578
578
  * @param {string} reCaptchaToken
579
+ * @param {string} verification
579
580
  * @param {string} source request source
580
581
  */
581
582
 
582
583
  }, {
583
584
  key: 'updateProfile',
584
585
  value: function () {
585
- var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(form, reCaptchaToken, source) {
586
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(form, reCaptchaToken, verification, source) {
586
587
  var api, data, _error$response$data3, code, message;
587
588
 
588
589
  return _regenerator2.default.wrap(function _callee7$(_context7) {
@@ -592,7 +593,7 @@ var Como = function () {
592
593
  api = this.comoData.api;
593
594
  _context7.prev = 1;
594
595
  _context7.next = 4;
595
- return api.updateProfile(form, reCaptchaToken, source);
596
+ return api.updateProfile(form, reCaptchaToken, verification, source);
596
597
 
597
598
  case 4:
598
599
  data = _context7.sent;
@@ -621,7 +622,7 @@ var Como = function () {
621
622
  }, _callee7, this, [[1, 8]]);
622
623
  }));
623
624
 
624
- function updateProfile(_x19, _x20, _x21) {
625
+ function updateProfile(_x19, _x20, _x21, _x22) {
625
626
  return _ref7.apply(this, arguments);
626
627
  }
627
628
 
@@ -679,7 +680,7 @@ var Como = function () {
679
680
  }, _callee8, this, [[1, 8]]);
680
681
  }));
681
682
 
682
- function updateProfileVerify(_x22, _x23, _x24, _x25, _x26) {
683
+ function updateProfileVerify(_x23, _x24, _x25, _x26, _x27) {
683
684
  return _ref8.apply(this, arguments);
684
685
  }
685
686
 
@@ -735,7 +736,7 @@ var Como = function () {
735
736
  }, _callee9, this, [[1, 9]]);
736
737
  }));
737
738
 
738
- function unsubscribeSms(_x27) {
739
+ function unsubscribeSms(_x28) {
739
740
  return _ref9.apply(this, arguments);
740
741
  }
741
742
 
@@ -791,7 +792,7 @@ var Como = function () {
791
792
  }, _callee10, this, [[1, 8]]);
792
793
  }));
793
794
 
794
- function login(_x28, _x29, _x30) {
795
+ function login(_x29, _x30, _x31) {
795
796
  return _ref10.apply(this, arguments);
796
797
  }
797
798
 
@@ -864,7 +865,7 @@ var Como = function () {
864
865
  }, _callee11, this, [[1, 9]]);
865
866
  }));
866
867
 
867
- function loginVerify(_x31, _x32, _x33, _x34) {
868
+ function loginVerify(_x32, _x33, _x34, _x35) {
868
869
  return _ref11.apply(this, arguments);
869
870
  }
870
871
 
@@ -939,7 +940,7 @@ var Como = function () {
939
940
  }, _callee13, this);
940
941
  }));
941
942
 
942
- function openApp(_x36) {
943
+ function openApp(_x37) {
943
944
  return _ref14.apply(this, arguments);
944
945
  }
945
946
 
@@ -980,7 +981,7 @@ var Como = function () {
980
981
  }, _callee14, this, [[1, 5]]);
981
982
  }));
982
983
 
983
- function clientUpdateMembership(_x37, _x38) {
984
+ function clientUpdateMembership(_x38, _x39) {
984
985
  return _ref15.apply(this, arguments);
985
986
  }
986
987
 
@@ -1041,7 +1042,7 @@ var Como = function () {
1041
1042
  }, _callee15, this, [[0, 12]]);
1042
1043
  }));
1043
1044
 
1044
- function downloadMainResource(_x39) {
1045
+ function downloadMainResource(_x40) {
1045
1046
  return _ref16.apply(this, arguments);
1046
1047
  }
1047
1048
 
@@ -1259,7 +1260,7 @@ var Como = function () {
1259
1260
  }, _callee20, this);
1260
1261
  }));
1261
1262
 
1262
- function redeemAsset(_x40) {
1263
+ function redeemAsset(_x41) {
1263
1264
  return _ref21.apply(this, arguments);
1264
1265
  }
1265
1266
 
@@ -1297,7 +1298,7 @@ var Como = function () {
1297
1298
  }, _callee21, this);
1298
1299
  }));
1299
1300
 
1300
- function purchaseAsset(_x41) {
1301
+ function purchaseAsset(_x42) {
1301
1302
  return _ref22.apply(this, arguments);
1302
1303
  }
1303
1304
 
@@ -1361,7 +1362,7 @@ var Como = function () {
1361
1362
  }, _callee23, this);
1362
1363
  }));
1363
1364
 
1364
- function purchaseAssetAPI2(_x42) {
1365
+ function purchaseAssetAPI2(_x43) {
1365
1366
  return _ref24.apply(this, arguments);
1366
1367
  }
1367
1368
 
@@ -1685,7 +1686,7 @@ var Como = function () {
1685
1686
  }, _callee26, this);
1686
1687
  }));
1687
1688
 
1688
- function getRegistrationUrl(_x43) {
1689
+ function getRegistrationUrl(_x44) {
1689
1690
  return _ref27.apply(this, arguments);
1690
1691
  }
1691
1692
 
@@ -1724,7 +1725,7 @@ var Como = function () {
1724
1725
  }, _callee27, this);
1725
1726
  }));
1726
1727
 
1727
- function getProfileUrl(_x44) {
1728
+ function getProfileUrl(_x45) {
1728
1729
  return _ref28.apply(this, arguments);
1729
1730
  }
1730
1731
 
@@ -1797,7 +1798,7 @@ var Como = function () {
1797
1798
  }, _callee29, this);
1798
1799
  }));
1799
1800
 
1800
- function getDataPortabilityUrl(_x45, _x46) {
1801
+ function getDataPortabilityUrl(_x46, _x47) {
1801
1802
  return _ref30.apply(this, arguments);
1802
1803
  }
1803
1804
 
@@ -1898,6 +1899,13 @@ var Como = function () {
1898
1899
 
1899
1900
  return api.getResourceUrl(env.services_root_cdn, resourceId, namespace, version, locationId);
1900
1901
  }
1902
+ }, {
1903
+ key: 'getPurchaseReportUrl',
1904
+ value: function getPurchaseReportUrl() {
1905
+ var env = this.comoData.env_params;
1906
+
1907
+ return env.purchase_connect_base_url + '/Purchase/Report';
1908
+ }
1901
1909
  }, {
1902
1910
  key: 'getCdnUrl',
1903
1911
  value: function getCdnUrl() {
@@ -1985,7 +1993,7 @@ var Como = function () {
1985
1993
  }, _callee32, this);
1986
1994
  }));
1987
1995
 
1988
- function addPaymentMethod(_x48) {
1996
+ function addPaymentMethod(_x49) {
1989
1997
  return _ref33.apply(this, arguments);
1990
1998
  }
1991
1999
 
@@ -2012,7 +2020,7 @@ var Como = function () {
2012
2020
  }, _callee33, this);
2013
2021
  }));
2014
2022
 
2015
- function knowYourData(_x49) {
2023
+ function knowYourData(_x50) {
2016
2024
  return _ref34.apply(this, arguments);
2017
2025
  }
2018
2026
 
@@ -2039,7 +2047,7 @@ var Como = function () {
2039
2047
  }, _callee34, this);
2040
2048
  }));
2041
2049
 
2042
- function consentWithdraw(_x50) {
2050
+ function consentWithdraw(_x51) {
2043
2051
  return _ref35.apply(this, arguments);
2044
2052
  }
2045
2053
 
@@ -2112,7 +2120,7 @@ var Como = function () {
2112
2120
  }, _callee36, this);
2113
2121
  }));
2114
2122
 
2115
- function payInApp(_x51, _x52, _x53, _x54, _x55) {
2123
+ function payInApp(_x52, _x53, _x54, _x55, _x56) {
2116
2124
  return _ref37.apply(this, arguments);
2117
2125
  }
2118
2126
 
@@ -2149,7 +2157,7 @@ var Como = function () {
2149
2157
  }, _callee37, this);
2150
2158
  }));
2151
2159
 
2152
- function deletePayment(_x56) {
2160
+ function deletePayment(_x57) {
2153
2161
  return _ref38.apply(this, arguments);
2154
2162
  }
2155
2163
 
@@ -2184,7 +2192,7 @@ var Como = function () {
2184
2192
  }, _callee38, this);
2185
2193
  }));
2186
2194
 
2187
- function getMemberMessages(_x57, _x58, _x59) {
2195
+ function getMemberMessages(_x58, _x59, _x60) {
2188
2196
  return _ref39.apply(this, arguments);
2189
2197
  }
2190
2198
 
@@ -2234,7 +2242,7 @@ var Como = function () {
2234
2242
  }, _callee39, this);
2235
2243
  }));
2236
2244
 
2237
- function budgetTransfer(_x60, _x61, _x62, _x63) {
2245
+ function budgetTransfer(_x61, _x62, _x63, _x64) {
2238
2246
  return _ref40.apply(this, arguments);
2239
2247
  }
2240
2248
 
@@ -2280,7 +2288,7 @@ var Como = function () {
2280
2288
  }, _callee40, this);
2281
2289
  }));
2282
2290
 
2283
- function budgetTransferClaim(_x64) {
2291
+ function budgetTransferClaim(_x65) {
2284
2292
  return _ref41.apply(this, arguments);
2285
2293
  }
2286
2294
 
@@ -2333,7 +2341,7 @@ var Como = function () {
2333
2341
  }, _callee41, this);
2334
2342
  }));
2335
2343
 
2336
- function logUserAction(_x65, _x66) {
2344
+ function logUserAction(_x66, _x67) {
2337
2345
  return _ref42.apply(this, arguments);
2338
2346
  }
2339
2347
 
@@ -2367,7 +2375,7 @@ var Como = function () {
2367
2375
  }, _callee42, this);
2368
2376
  }));
2369
2377
 
2370
- function getPurchaseHistory(_x67, _x68) {
2378
+ function getPurchaseHistory(_x68, _x69) {
2371
2379
  return _ref43.apply(this, arguments);
2372
2380
  }
2373
2381
 
package/lib/config/env.js CHANGED
@@ -7,7 +7,8 @@ module.exports = {
7
7
  services_root: 'loyalty-services',
8
8
  services_root_cdn: 'https://services.qa.bcomo.com',
9
9
  app_modules_root: 'https://app.qa.comosense.com/app-modules',
10
- app_modules_legacy_root: 'https://appmodules.qa.comosense.com'
10
+ app_modules_legacy_root: 'https://appmodules.qa.comosense.com',
11
+ purchase_connect_base_url: 'https://qr.qa.comosense.com'
11
12
  },
12
13
  qa: {
13
14
  gateway: 'https://app.qa.comosense.com',
@@ -15,7 +16,8 @@ module.exports = {
15
16
  services_root: 'loyalty-services',
16
17
  services_root_cdn: 'https://services.qa.bcomo.com',
17
18
  app_modules_root: 'https://app.qa.comosense.com/app-modules',
18
- app_modules_legacy_root: 'https://appmodules.qa.comosense.com'
19
+ app_modules_legacy_root: 'https://appmodules.qa.comosense.com',
20
+ purchase_connect_base_url: 'https://qr.qa.comosense.com'
19
21
  },
20
22
  prod: {
21
23
  gateway: 'https://app.comosense.com',
@@ -23,7 +25,8 @@ module.exports = {
23
25
  services_root: 'loyalty-services',
24
26
  services_root_cdn: 'https://services.prod.bcomo.com',
25
27
  app_modules_root: 'https://app.comosense.com/app-modules',
26
- app_modules_legacy_root: 'https://appmodules.comosense.com'
28
+ app_modules_legacy_root: 'https://appmodules.comosense.com',
29
+ purchase_connect_base_url: 'https://qr.comosense.com'
27
30
  },
28
31
  test: {
29
32
  gateway: 'https://app.qa.comosense.com',
@@ -31,6 +34,8 @@ module.exports = {
31
34
  services_root: 'loyalty-services',
32
35
  services_root_cdn: 'https://services.qa.bcomo.com',
33
36
  app_modules_root: 'https://app.qa.comosense.com/app-modules',
34
- app_modules_legacy_root: 'https://appmodules.qa.comosense.com'
37
+ app_modules_legacy_root: 'https://appmodules.qa.comosense.com',
38
+ app_payment_purchase: 'https://qr.qa.comosense.com/Purchase/Report',
39
+ purchase_connect_base_url: 'https://qr.qa.comosense.com'
35
40
  }
36
41
  };
@@ -132,8 +132,8 @@ exports.registerVerify = function (service) {
132
132
 
133
133
  exports.updateProfile = function (service) {
134
134
  return function () {
135
- var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(form, reCaptchaToken) {
136
- var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'App';
135
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(form, reCaptchaToken, verification) {
136
+ var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'App';
137
137
 
138
138
  var body, headers, _ref8, data;
139
139
 
@@ -141,7 +141,7 @@ exports.updateProfile = function (service) {
141
141
  while (1) {
142
142
  switch (_context4.prev = _context4.next) {
143
143
  case 0:
144
- body = { form: form, source: source, reCaptchaToken: reCaptchaToken };
144
+ body = { form: form, source: source, reCaptchaToken: reCaptchaToken, verification: verification };
145
145
  headers = getHashHeader(body);
146
146
  _context4.next = 4;
147
147
  return service.post('/auth/v1/update-profile', body, { headers: headers });
@@ -159,7 +159,7 @@ exports.updateProfile = function (service) {
159
159
  }, _callee4, undefined);
160
160
  }));
161
161
 
162
- return function (_x13, _x14) {
162
+ return function (_x13, _x14, _x15) {
163
163
  return _ref7.apply(this, arguments);
164
164
  };
165
165
  }();
@@ -194,7 +194,7 @@ exports.updateProfileVerify = function (service) {
194
194
  }, _callee5, undefined);
195
195
  }));
196
196
 
197
- return function (_x16, _x17, _x18, _x19) {
197
+ return function (_x17, _x18, _x19, _x20) {
198
198
  return _ref9.apply(this, arguments);
199
199
  };
200
200
  }();
@@ -226,7 +226,7 @@ exports.unsubscribeSms = function (service) {
226
226
  }, _callee6, undefined);
227
227
  }));
228
228
 
229
- return function (_x21, _x22) {
229
+ return function (_x22, _x23) {
230
230
  return _ref11.apply(this, arguments);
231
231
  };
232
232
  }();
@@ -259,7 +259,7 @@ exports.logIn = function (service) {
259
259
  }, _callee7, undefined);
260
260
  }));
261
261
 
262
- return function (_x23, _x24, _x25) {
262
+ return function (_x24, _x25, _x26) {
263
263
  return _ref13.apply(this, arguments);
264
264
  };
265
265
  }();
@@ -297,7 +297,7 @@ exports.logInVerify = function (service) {
297
297
  }, _callee8, undefined);
298
298
  }));
299
299
 
300
- return function (_x26, _x27, _x28, _x29) {
300
+ return function (_x27, _x28, _x29, _x30) {
301
301
  return _ref15.apply(this, arguments);
302
302
  };
303
303
  }();
@@ -355,7 +355,7 @@ exports.refreshToken = function (service) {
355
355
  }, _callee10, undefined);
356
356
  }));
357
357
 
358
- return function (_x30, _x31, _x32, _x33) {
358
+ return function (_x31, _x32, _x33, _x34) {
359
359
  return _ref19.apply(this, arguments);
360
360
  };
361
361
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.87",
3
+ "version": "0.7.89",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {
package/src/como.js CHANGED
@@ -264,12 +264,13 @@ class Como {
264
264
  *
265
265
  * @param {Object} form update form values
266
266
  * @param {string} reCaptchaToken
267
+ * @param {string} verification
267
268
  * @param {string} source request source
268
269
  */
269
- async updateProfile(form, reCaptchaToken, source) {
270
+ async updateProfile(form, reCaptchaToken, verification, source) {
270
271
  const { api } = this.comoData;
271
272
  try {
272
- const data = await api.updateProfile(form, reCaptchaToken, source);
273
+ const data = await api.updateProfile(form, reCaptchaToken, verification, source);
273
274
  return data;
274
275
  } catch (error) {
275
276
  if (error.response && error.response.data) {
@@ -809,6 +810,11 @@ class Como {
809
810
  return api.getResourceUrl(env.services_root_cdn, resourceId, namespace, version, locationId);
810
811
  }
811
812
 
813
+ getPurchaseReportUrl() {
814
+ const { env_params: env } = this.comoData;
815
+ return `${env.purchase_connect_base_url}/Purchase/Report`;
816
+ }
817
+
812
818
  getCdnUrl() {
813
819
  return this.comoData.env_params.services_root_cdn;
814
820
  }