@como/como-client 0.7.90 → 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 +35 -38
- package/lib/services/loyalty.service.js +57 -55
- package/lib/utils/comoExternalUrlTranslator.js +1 -1
- package/package.json +1 -1
- package/src/como.js +27 -27
package/lib/como.js
CHANGED
|
@@ -434,14 +434,14 @@ var Como = function () {
|
|
|
434
434
|
key: 'getFeedbackFormData',
|
|
435
435
|
value: function () {
|
|
436
436
|
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
437
|
-
var _comoData3, locationId,
|
|
437
|
+
var _comoData3, locationId, env, api;
|
|
438
438
|
|
|
439
439
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
440
440
|
while (1) {
|
|
441
441
|
switch (_context4.prev = _context4.next) {
|
|
442
442
|
case 0:
|
|
443
|
-
_comoData3 = this.comoData, locationId = _comoData3.locationId,
|
|
444
|
-
return _context4.abrupt('return', api.getFeedbackFormData(env.zapp_root, locationId
|
|
443
|
+
_comoData3 = this.comoData, locationId = _comoData3.locationId, env = _comoData3.env_params, api = _comoData3.api;
|
|
444
|
+
return _context4.abrupt('return', api.getFeedbackFormData(env.zapp_root, locationId));
|
|
445
445
|
|
|
446
446
|
case 2:
|
|
447
447
|
case 'end':
|
|
@@ -923,14 +923,14 @@ var Como = function () {
|
|
|
923
923
|
key: 'openApp',
|
|
924
924
|
value: function () {
|
|
925
925
|
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(data) {
|
|
926
|
-
var _comoData6, api, locationId,
|
|
926
|
+
var _comoData6, api, locationId, env;
|
|
927
927
|
|
|
928
928
|
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
929
929
|
while (1) {
|
|
930
930
|
switch (_context13.prev = _context13.next) {
|
|
931
931
|
case 0:
|
|
932
|
-
_comoData6 = this.comoData, api = _comoData6.api, locationId = _comoData6.locationId,
|
|
933
|
-
return _context13.abrupt('return', api.openApp(env.zapp_root,
|
|
932
|
+
_comoData6 = this.comoData, api = _comoData6.api, locationId = _comoData6.locationId, env = _comoData6.env_params;
|
|
933
|
+
return _context13.abrupt('return', api.openApp(env.zapp_root, locationId, data));
|
|
934
934
|
|
|
935
935
|
case 2:
|
|
936
936
|
case 'end':
|
|
@@ -965,7 +965,7 @@ var Como = function () {
|
|
|
965
965
|
case 0:
|
|
966
966
|
_comoData7 = this.comoData, api = _comoData7.api, locationId = _comoData7.locationId, token = _comoData7.token, env = _comoData7.env_params;
|
|
967
967
|
_context14.prev = 1;
|
|
968
|
-
return _context14.abrupt('return', api.clientUpdateMembership(env.services_root,
|
|
968
|
+
return _context14.abrupt('return', api.clientUpdateMembership(env.services_root, locationId, pushEnable, locationEnable));
|
|
969
969
|
|
|
970
970
|
case 5:
|
|
971
971
|
_context14.prev = 5;
|
|
@@ -1276,15 +1276,15 @@ var Como = function () {
|
|
|
1276
1276
|
key: 'purchaseAsset',
|
|
1277
1277
|
value: function () {
|
|
1278
1278
|
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(itemId) {
|
|
1279
|
-
var _comoData12, env,
|
|
1279
|
+
var _comoData12, env, locationId, api, responseJson;
|
|
1280
1280
|
|
|
1281
1281
|
return _regenerator2.default.wrap(function _callee21$(_context21) {
|
|
1282
1282
|
while (1) {
|
|
1283
1283
|
switch (_context21.prev = _context21.next) {
|
|
1284
1284
|
case 0:
|
|
1285
|
-
_comoData12 = this.comoData, env = _comoData12.env_params,
|
|
1285
|
+
_comoData12 = this.comoData, env = _comoData12.env_params, locationId = _comoData12.locationId, api = _comoData12.api;
|
|
1286
1286
|
_context21.next = 3;
|
|
1287
|
-
return api.purchaseAsset(env.zapp_root, locationId,
|
|
1287
|
+
return api.purchaseAsset(env.zapp_root, locationId, itemId);
|
|
1288
1288
|
|
|
1289
1289
|
case 3:
|
|
1290
1290
|
responseJson = _context21.sent;
|
|
@@ -1557,11 +1557,10 @@ var Como = function () {
|
|
|
1557
1557
|
var _comoData20 = this.comoData,
|
|
1558
1558
|
api = _comoData20.api,
|
|
1559
1559
|
locationId = _comoData20.locationId,
|
|
1560
|
-
token = _comoData20.token,
|
|
1561
1560
|
env = _comoData20.env_params;
|
|
1562
1561
|
|
|
1563
1562
|
|
|
1564
|
-
return api.generateReferralCode(env.services_root,
|
|
1563
|
+
return api.generateReferralCode(env.services_root, locationId);
|
|
1565
1564
|
}
|
|
1566
1565
|
|
|
1567
1566
|
/**
|
|
@@ -1574,11 +1573,10 @@ var Como = function () {
|
|
|
1574
1573
|
var _comoData21 = this.comoData,
|
|
1575
1574
|
api = _comoData21.api,
|
|
1576
1575
|
locationId = _comoData21.locationId,
|
|
1577
|
-
token = _comoData21.token,
|
|
1578
1576
|
env = _comoData21.env_params;
|
|
1579
1577
|
|
|
1580
1578
|
|
|
1581
|
-
return api.verifyReferralCode(env.services_root,
|
|
1579
|
+
return api.verifyReferralCode(env.services_root, locationId, code);
|
|
1582
1580
|
}
|
|
1583
1581
|
|
|
1584
1582
|
/**
|
|
@@ -1924,23 +1922,22 @@ var Como = function () {
|
|
|
1924
1922
|
var _comoData27 = this.comoData,
|
|
1925
1923
|
api = _comoData27.api,
|
|
1926
1924
|
locationId = _comoData27.locationId,
|
|
1927
|
-
token = _comoData27.token,
|
|
1928
1925
|
env = _comoData27.env_params;
|
|
1929
1926
|
|
|
1930
|
-
return api.sendPushChannel(env.services_root, locationId,
|
|
1927
|
+
return api.sendPushChannel(env.services_root, locationId, identifier, isFirebaseProjectMigrated);
|
|
1931
1928
|
}
|
|
1932
1929
|
}, {
|
|
1933
1930
|
key: 'getRegionConfig',
|
|
1934
1931
|
value: function () {
|
|
1935
1932
|
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee31() {
|
|
1936
|
-
var _comoData28, api, locationId,
|
|
1933
|
+
var _comoData28, api, locationId, env;
|
|
1937
1934
|
|
|
1938
1935
|
return _regenerator2.default.wrap(function _callee31$(_context31) {
|
|
1939
1936
|
while (1) {
|
|
1940
1937
|
switch (_context31.prev = _context31.next) {
|
|
1941
1938
|
case 0:
|
|
1942
|
-
_comoData28 = this.comoData, api = _comoData28.api, locationId = _comoData28.locationId,
|
|
1943
|
-
return _context31.abrupt('return', api.getClientBusinessBackend(env.zapp_root,
|
|
1939
|
+
_comoData28 = this.comoData, api = _comoData28.api, locationId = _comoData28.locationId, env = _comoData28.env_params;
|
|
1940
|
+
return _context31.abrupt('return', api.getClientBusinessBackend(env.zapp_root, locationId));
|
|
1944
1941
|
|
|
1945
1942
|
case 2:
|
|
1946
1943
|
case 'end':
|
|
@@ -1967,10 +1964,9 @@ var Como = function () {
|
|
|
1967
1964
|
var _comoData29 = this.comoData,
|
|
1968
1965
|
api = _comoData29.api,
|
|
1969
1966
|
locationId = _comoData29.locationId,
|
|
1970
|
-
token = _comoData29.token,
|
|
1971
1967
|
env = _comoData29.env_params;
|
|
1972
1968
|
|
|
1973
|
-
return api.sendCouponCode(env.zapp_root, locationId,
|
|
1969
|
+
return api.sendCouponCode(env.zapp_root, locationId, code);
|
|
1974
1970
|
}
|
|
1975
1971
|
}, {
|
|
1976
1972
|
key: 'addPaymentMethod',
|
|
@@ -2003,14 +1999,14 @@ var Como = function () {
|
|
|
2003
1999
|
key: 'knowYourData',
|
|
2004
2000
|
value: function () {
|
|
2005
2001
|
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33(email) {
|
|
2006
|
-
var _comoData31, api, locationId,
|
|
2002
|
+
var _comoData31, api, locationId, env;
|
|
2007
2003
|
|
|
2008
2004
|
return _regenerator2.default.wrap(function _callee33$(_context33) {
|
|
2009
2005
|
while (1) {
|
|
2010
2006
|
switch (_context33.prev = _context33.next) {
|
|
2011
2007
|
case 0:
|
|
2012
|
-
_comoData31 = this.comoData, api = _comoData31.api, locationId = _comoData31.locationId,
|
|
2013
|
-
return _context33.abrupt('return', api.knowYourData(env.services_root, locationId,
|
|
2008
|
+
_comoData31 = this.comoData, api = _comoData31.api, locationId = _comoData31.locationId, env = _comoData31.env_params;
|
|
2009
|
+
return _context33.abrupt('return', api.knowYourData(env.services_root, locationId, email));
|
|
2014
2010
|
|
|
2015
2011
|
case 2:
|
|
2016
2012
|
case 'end':
|
|
@@ -2030,14 +2026,14 @@ var Como = function () {
|
|
|
2030
2026
|
key: 'consentWithdraw',
|
|
2031
2027
|
value: function () {
|
|
2032
2028
|
var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee34(consentData) {
|
|
2033
|
-
var _comoData32, api, locationId,
|
|
2029
|
+
var _comoData32, api, locationId, env;
|
|
2034
2030
|
|
|
2035
2031
|
return _regenerator2.default.wrap(function _callee34$(_context34) {
|
|
2036
2032
|
while (1) {
|
|
2037
2033
|
switch (_context34.prev = _context34.next) {
|
|
2038
2034
|
case 0:
|
|
2039
|
-
_comoData32 = this.comoData, api = _comoData32.api, locationId = _comoData32.locationId,
|
|
2040
|
-
return _context34.abrupt('return', api.consentWithdraw(env.services_root, locationId,
|
|
2035
|
+
_comoData32 = this.comoData, api = _comoData32.api, locationId = _comoData32.locationId, env = _comoData32.env_params;
|
|
2036
|
+
return _context34.abrupt('return', api.consentWithdraw(env.services_root, locationId, consentData));
|
|
2041
2037
|
|
|
2042
2038
|
case 2:
|
|
2043
2039
|
case 'end':
|
|
@@ -2171,6 +2167,8 @@ var Como = function () {
|
|
|
2171
2167
|
key: 'getMemberMessages',
|
|
2172
2168
|
value: function () {
|
|
2173
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
|
+
|
|
2174
2172
|
var _comoData36, api, locationId, env;
|
|
2175
2173
|
|
|
2176
2174
|
return _regenerator2.default.wrap(function _callee38$(_context38) {
|
|
@@ -2182,7 +2180,7 @@ var Como = function () {
|
|
|
2182
2180
|
return this.refreshTokenIfNeeded();
|
|
2183
2181
|
|
|
2184
2182
|
case 3:
|
|
2185
|
-
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));
|
|
2186
2184
|
|
|
2187
2185
|
case 4:
|
|
2188
2186
|
case 'end':
|
|
@@ -2242,7 +2240,7 @@ var Como = function () {
|
|
|
2242
2240
|
}, _callee39, this);
|
|
2243
2241
|
}));
|
|
2244
2242
|
|
|
2245
|
-
function budgetTransfer(
|
|
2243
|
+
function budgetTransfer(_x62, _x63, _x64, _x65) {
|
|
2246
2244
|
return _ref40.apply(this, arguments);
|
|
2247
2245
|
}
|
|
2248
2246
|
|
|
@@ -2288,7 +2286,7 @@ var Como = function () {
|
|
|
2288
2286
|
}, _callee40, this);
|
|
2289
2287
|
}));
|
|
2290
2288
|
|
|
2291
|
-
function budgetTransferClaim(
|
|
2289
|
+
function budgetTransferClaim(_x66) {
|
|
2292
2290
|
return _ref41.apply(this, arguments);
|
|
2293
2291
|
}
|
|
2294
2292
|
|
|
@@ -2308,10 +2306,9 @@ var Como = function () {
|
|
|
2308
2306
|
var _comoData41 = this.comoData,
|
|
2309
2307
|
env = _comoData41.env_params,
|
|
2310
2308
|
locationId = _comoData41.locationId,
|
|
2311
|
-
api = _comoData41.api
|
|
2312
|
-
token = _comoData41.token;
|
|
2309
|
+
api = _comoData41.api;
|
|
2313
2310
|
|
|
2314
|
-
return api.claim(env.zapp_root, locationId,
|
|
2311
|
+
return api.claim(env.zapp_root, locationId, assetKey, itemId, tag);
|
|
2315
2312
|
}
|
|
2316
2313
|
|
|
2317
2314
|
/**
|
|
@@ -2324,14 +2321,14 @@ var Como = function () {
|
|
|
2324
2321
|
key: 'logUserAction',
|
|
2325
2322
|
value: function () {
|
|
2326
2323
|
var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee41(action, logData) {
|
|
2327
|
-
var _comoData42, env, locationId, api
|
|
2324
|
+
var _comoData42, env, locationId, api;
|
|
2328
2325
|
|
|
2329
2326
|
return _regenerator2.default.wrap(function _callee41$(_context41) {
|
|
2330
2327
|
while (1) {
|
|
2331
2328
|
switch (_context41.prev = _context41.next) {
|
|
2332
2329
|
case 0:
|
|
2333
|
-
_comoData42 = this.comoData, env = _comoData42.env_params, locationId = _comoData42.locationId, api = _comoData42.api
|
|
2334
|
-
return _context41.abrupt('return', api.logUserAction(env.zapp_root, locationId,
|
|
2330
|
+
_comoData42 = this.comoData, env = _comoData42.env_params, locationId = _comoData42.locationId, api = _comoData42.api;
|
|
2331
|
+
return _context41.abrupt('return', api.logUserAction(env.zapp_root, locationId, action, logData));
|
|
2335
2332
|
|
|
2336
2333
|
case 2:
|
|
2337
2334
|
case 'end':
|
|
@@ -2341,7 +2338,7 @@ var Como = function () {
|
|
|
2341
2338
|
}, _callee41, this);
|
|
2342
2339
|
}));
|
|
2343
2340
|
|
|
2344
|
-
function logUserAction(
|
|
2341
|
+
function logUserAction(_x67, _x68) {
|
|
2345
2342
|
return _ref42.apply(this, arguments);
|
|
2346
2343
|
}
|
|
2347
2344
|
|
|
@@ -2375,7 +2372,7 @@ var Como = function () {
|
|
|
2375
2372
|
}, _callee42, this);
|
|
2376
2373
|
}));
|
|
2377
2374
|
|
|
2378
|
-
function getPurchaseHistory(
|
|
2375
|
+
function getPurchaseHistory(_x69, _x70) {
|
|
2379
2376
|
return _ref43.apply(this, arguments);
|
|
2380
2377
|
}
|
|
2381
2378
|
|
|
@@ -268,14 +268,14 @@ exports.getPaymentCode = function (service) {
|
|
|
268
268
|
|
|
269
269
|
exports.purchaseAsset = function (service) {
|
|
270
270
|
return function () {
|
|
271
|
-
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(baseUrl, locationId,
|
|
271
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(baseUrl, locationId, itemId) {
|
|
272
272
|
var url, _ref14, data;
|
|
273
273
|
|
|
274
274
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
275
275
|
while (1) {
|
|
276
276
|
switch (_context8.prev = _context8.next) {
|
|
277
277
|
case 0:
|
|
278
|
-
url = baseUrl + '/alpha/api/PurchaseAsset?InputType=json&MimeType=application/json
|
|
278
|
+
url = baseUrl + '/alpha/api/PurchaseAsset?InputType=json&MimeType=application/json';
|
|
279
279
|
_context8.next = 3;
|
|
280
280
|
return service.post(url, {
|
|
281
281
|
LocationID: locationId,
|
|
@@ -295,7 +295,7 @@ exports.purchaseAsset = function (service) {
|
|
|
295
295
|
}, _callee8, undefined);
|
|
296
296
|
}));
|
|
297
297
|
|
|
298
|
-
return function (_x18, _x19, _x20
|
|
298
|
+
return function (_x18, _x19, _x20) {
|
|
299
299
|
return _ref13.apply(this, arguments);
|
|
300
300
|
};
|
|
301
301
|
}();
|
|
@@ -333,7 +333,7 @@ exports.getLoyaltyResource = function (service) {
|
|
|
333
333
|
}, _callee9, undefined);
|
|
334
334
|
}));
|
|
335
335
|
|
|
336
|
-
return function (_x22, _x23, _x24, _x25
|
|
336
|
+
return function (_x21, _x22, _x23, _x24, _x25) {
|
|
337
337
|
return _ref15.apply(this, arguments);
|
|
338
338
|
};
|
|
339
339
|
}();
|
|
@@ -341,14 +341,14 @@ exports.getLoyaltyResource = function (service) {
|
|
|
341
341
|
|
|
342
342
|
exports.generateReferralCode = function (service) {
|
|
343
343
|
return function () {
|
|
344
|
-
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(baseUrl,
|
|
344
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(baseUrl, locationId) {
|
|
345
345
|
var url, _ref18, data;
|
|
346
346
|
|
|
347
347
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
348
348
|
while (1) {
|
|
349
349
|
switch (_context10.prev = _context10.next) {
|
|
350
350
|
case 0:
|
|
351
|
-
url = baseUrl + '/referralCode/generate?locationId=' + locationId
|
|
351
|
+
url = baseUrl + '/referralCode/generate?locationId=' + locationId;
|
|
352
352
|
_context10.next = 3;
|
|
353
353
|
return service.post(url);
|
|
354
354
|
|
|
@@ -365,7 +365,7 @@ exports.generateReferralCode = function (service) {
|
|
|
365
365
|
}, _callee10, undefined);
|
|
366
366
|
}));
|
|
367
367
|
|
|
368
|
-
return function (
|
|
368
|
+
return function (_x26, _x27) {
|
|
369
369
|
return _ref17.apply(this, arguments);
|
|
370
370
|
};
|
|
371
371
|
}();
|
|
@@ -373,14 +373,14 @@ exports.generateReferralCode = function (service) {
|
|
|
373
373
|
|
|
374
374
|
exports.verifyReferralCode = function (service) {
|
|
375
375
|
return function () {
|
|
376
|
-
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl,
|
|
376
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl, locationId, code) {
|
|
377
377
|
var url, _ref20, data;
|
|
378
378
|
|
|
379
379
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
380
380
|
while (1) {
|
|
381
381
|
switch (_context11.prev = _context11.next) {
|
|
382
382
|
case 0:
|
|
383
|
-
url = baseUrl + '/referralCode/validate?locationId=' + locationId + '&
|
|
383
|
+
url = baseUrl + '/referralCode/validate?locationId=' + locationId + '&code=' + code;
|
|
384
384
|
_context11.next = 3;
|
|
385
385
|
return service.get(url);
|
|
386
386
|
|
|
@@ -397,7 +397,7 @@ exports.verifyReferralCode = function (service) {
|
|
|
397
397
|
}, _callee11, undefined);
|
|
398
398
|
}));
|
|
399
399
|
|
|
400
|
-
return function (
|
|
400
|
+
return function (_x28, _x29, _x30) {
|
|
401
401
|
return _ref19.apply(this, arguments);
|
|
402
402
|
};
|
|
403
403
|
}();
|
|
@@ -405,7 +405,7 @@ exports.verifyReferralCode = function (service) {
|
|
|
405
405
|
|
|
406
406
|
exports.openApp = function (service) {
|
|
407
407
|
return function () {
|
|
408
|
-
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl,
|
|
408
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl, locationId, data) {
|
|
409
409
|
var dateNow, url, response;
|
|
410
410
|
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
411
411
|
while (1) {
|
|
@@ -428,7 +428,7 @@ exports.openApp = function (service) {
|
|
|
428
428
|
}, _callee12, undefined);
|
|
429
429
|
}));
|
|
430
430
|
|
|
431
|
-
return function (
|
|
431
|
+
return function (_x31, _x32, _x33) {
|
|
432
432
|
return _ref21.apply(this, arguments);
|
|
433
433
|
};
|
|
434
434
|
}();
|
|
@@ -436,13 +436,13 @@ exports.openApp = function (service) {
|
|
|
436
436
|
|
|
437
437
|
exports.clientUpdateMembership = function (service) {
|
|
438
438
|
return function () {
|
|
439
|
-
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl,
|
|
439
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl, locationId, pushEnable, locationEnable) {
|
|
440
440
|
var url, response;
|
|
441
441
|
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
442
442
|
while (1) {
|
|
443
443
|
switch (_context13.prev = _context13.next) {
|
|
444
444
|
case 0:
|
|
445
|
-
url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId
|
|
445
|
+
url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId;
|
|
446
446
|
_context13.next = 3;
|
|
447
447
|
return service.put(url, { PushNotificationEnabled: pushEnable, LocationEnabled: locationEnable });
|
|
448
448
|
|
|
@@ -458,7 +458,7 @@ exports.clientUpdateMembership = function (service) {
|
|
|
458
458
|
}, _callee13, undefined);
|
|
459
459
|
}));
|
|
460
460
|
|
|
461
|
-
return function (
|
|
461
|
+
return function (_x34, _x35, _x36, _x37) {
|
|
462
462
|
return _ref22.apply(this, arguments);
|
|
463
463
|
};
|
|
464
464
|
}();
|
|
@@ -466,14 +466,14 @@ exports.clientUpdateMembership = function (service) {
|
|
|
466
466
|
|
|
467
467
|
exports.generateTemporaryToken = function (service) {
|
|
468
468
|
return function () {
|
|
469
|
-
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId,
|
|
469
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId, timeToLive) {
|
|
470
470
|
var url, _ref24, data;
|
|
471
471
|
|
|
472
472
|
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
473
473
|
while (1) {
|
|
474
474
|
switch (_context14.prev = _context14.next) {
|
|
475
475
|
case 0:
|
|
476
|
-
url = baseUrl + '/memberships/generateToken?locationId=' + locationId
|
|
476
|
+
url = baseUrl + '/memberships/generateToken?locationId=' + locationId;
|
|
477
477
|
_context14.next = 3;
|
|
478
478
|
return service.post(url, {
|
|
479
479
|
timeToLive: timeToLive
|
|
@@ -494,7 +494,7 @@ exports.generateTemporaryToken = function (service) {
|
|
|
494
494
|
}, _callee14, undefined);
|
|
495
495
|
}));
|
|
496
496
|
|
|
497
|
-
return function (
|
|
497
|
+
return function (_x38, _x39, _x40) {
|
|
498
498
|
return _ref23.apply(this, arguments);
|
|
499
499
|
};
|
|
500
500
|
}();
|
|
@@ -502,14 +502,14 @@ exports.generateTemporaryToken = function (service) {
|
|
|
502
502
|
|
|
503
503
|
exports.getFeedbackFormData = function (service) {
|
|
504
504
|
return function () {
|
|
505
|
-
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId
|
|
505
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId) {
|
|
506
506
|
var url, _ref26, data;
|
|
507
507
|
|
|
508
508
|
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
509
509
|
while (1) {
|
|
510
510
|
switch (_context15.prev = _context15.next) {
|
|
511
511
|
case 0:
|
|
512
|
-
url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&
|
|
512
|
+
url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&MimeType=application/json';
|
|
513
513
|
_context15.next = 3;
|
|
514
514
|
return service.get(url);
|
|
515
515
|
|
|
@@ -526,7 +526,7 @@ exports.getFeedbackFormData = function (service) {
|
|
|
526
526
|
}, _callee15, undefined);
|
|
527
527
|
}));
|
|
528
528
|
|
|
529
|
-
return function (
|
|
529
|
+
return function (_x41, _x42) {
|
|
530
530
|
return _ref25.apply(this, arguments);
|
|
531
531
|
};
|
|
532
532
|
}();
|
|
@@ -534,14 +534,14 @@ exports.getFeedbackFormData = function (service) {
|
|
|
534
534
|
|
|
535
535
|
exports.sendPushChannel = function (service) {
|
|
536
536
|
return function () {
|
|
537
|
-
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, locationId,
|
|
538
|
-
var firebaseProjectMigrated = arguments.length >
|
|
537
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, locationId, identifier) {
|
|
538
|
+
var firebaseProjectMigrated = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
539
539
|
var url, response;
|
|
540
540
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
541
541
|
while (1) {
|
|
542
542
|
switch (_context16.prev = _context16.next) {
|
|
543
543
|
case 0:
|
|
544
|
-
url = baseUrl + '/push_channels?locationId=' + locationId
|
|
544
|
+
url = baseUrl + '/push_channels?locationId=' + locationId;
|
|
545
545
|
_context16.next = 3;
|
|
546
546
|
return service.post(url, {
|
|
547
547
|
type: 'fcm',
|
|
@@ -561,7 +561,7 @@ exports.sendPushChannel = function (service) {
|
|
|
561
561
|
}, _callee16, undefined);
|
|
562
562
|
}));
|
|
563
563
|
|
|
564
|
-
return function (
|
|
564
|
+
return function (_x43, _x44, _x45) {
|
|
565
565
|
return _ref27.apply(this, arguments);
|
|
566
566
|
};
|
|
567
567
|
}();
|
|
@@ -569,14 +569,14 @@ exports.sendPushChannel = function (service) {
|
|
|
569
569
|
|
|
570
570
|
exports.getClientBusinessBackend = function (service) {
|
|
571
571
|
return function () {
|
|
572
|
-
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl,
|
|
572
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl, locationId) {
|
|
573
573
|
var url, _ref29, data;
|
|
574
574
|
|
|
575
575
|
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
|
576
576
|
while (1) {
|
|
577
577
|
switch (_context17.prev = _context17.next) {
|
|
578
578
|
case 0:
|
|
579
|
-
url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&
|
|
579
|
+
url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&MimeType=application/json';
|
|
580
580
|
_context17.next = 3;
|
|
581
581
|
return service.post(url);
|
|
582
582
|
|
|
@@ -593,7 +593,7 @@ exports.getClientBusinessBackend = function (service) {
|
|
|
593
593
|
}, _callee17, undefined);
|
|
594
594
|
}));
|
|
595
595
|
|
|
596
|
-
return function (
|
|
596
|
+
return function (_x47, _x48) {
|
|
597
597
|
return _ref28.apply(this, arguments);
|
|
598
598
|
};
|
|
599
599
|
}();
|
|
@@ -601,13 +601,13 @@ exports.getClientBusinessBackend = function (service) {
|
|
|
601
601
|
|
|
602
602
|
exports.sendCouponCode = function (service) {
|
|
603
603
|
return function () {
|
|
604
|
-
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId,
|
|
604
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId, code) {
|
|
605
605
|
var url, response;
|
|
606
606
|
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
|
607
607
|
while (1) {
|
|
608
608
|
switch (_context18.prev = _context18.next) {
|
|
609
609
|
case 0:
|
|
610
|
-
url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '
|
|
610
|
+
url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '&&Code=' + code + '&InputType=json&MimeType=application/json';
|
|
611
611
|
_context18.next = 3;
|
|
612
612
|
return service.post(url);
|
|
613
613
|
|
|
@@ -623,7 +623,7 @@ exports.sendCouponCode = function (service) {
|
|
|
623
623
|
}, _callee18, undefined);
|
|
624
624
|
}));
|
|
625
625
|
|
|
626
|
-
return function (
|
|
626
|
+
return function (_x49, _x50, _x51) {
|
|
627
627
|
return _ref30.apply(this, arguments);
|
|
628
628
|
};
|
|
629
629
|
}();
|
|
@@ -631,14 +631,14 @@ exports.sendCouponCode = function (service) {
|
|
|
631
631
|
|
|
632
632
|
exports.consentWithdraw = function (service) {
|
|
633
633
|
return function () {
|
|
634
|
-
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId,
|
|
634
|
+
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId, consentData) {
|
|
635
635
|
var url, _ref32, data;
|
|
636
636
|
|
|
637
637
|
return _regenerator2.default.wrap(function _callee19$(_context19) {
|
|
638
638
|
while (1) {
|
|
639
639
|
switch (_context19.prev = _context19.next) {
|
|
640
640
|
case 0:
|
|
641
|
-
url = baseUrl + '/memberships/forgetMember?locationId=' + locationId
|
|
641
|
+
url = baseUrl + '/memberships/forgetMember?locationId=' + locationId;
|
|
642
642
|
_context19.next = 3;
|
|
643
643
|
return service.post(url, {
|
|
644
644
|
consentData: (0, _stringify2.default)(consentData)
|
|
@@ -659,7 +659,7 @@ exports.consentWithdraw = function (service) {
|
|
|
659
659
|
}, _callee19, undefined);
|
|
660
660
|
}));
|
|
661
661
|
|
|
662
|
-
return function (
|
|
662
|
+
return function (_x52, _x53, _x54) {
|
|
663
663
|
return _ref31.apply(this, arguments);
|
|
664
664
|
};
|
|
665
665
|
}();
|
|
@@ -667,14 +667,14 @@ exports.consentWithdraw = function (service) {
|
|
|
667
667
|
|
|
668
668
|
exports.knowYourData = function (service) {
|
|
669
669
|
return function () {
|
|
670
|
-
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId,
|
|
670
|
+
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId, email) {
|
|
671
671
|
var url, _ref34, data;
|
|
672
672
|
|
|
673
673
|
return _regenerator2.default.wrap(function _callee20$(_context20) {
|
|
674
674
|
while (1) {
|
|
675
675
|
switch (_context20.prev = _context20.next) {
|
|
676
676
|
case 0:
|
|
677
|
-
url = baseUrl + '/memberships/requestData?locationId=' + locationId
|
|
677
|
+
url = baseUrl + '/memberships/requestData?locationId=' + locationId;
|
|
678
678
|
_context20.next = 3;
|
|
679
679
|
return service.post(url, {
|
|
680
680
|
email: email
|
|
@@ -695,7 +695,7 @@ exports.knowYourData = function (service) {
|
|
|
695
695
|
}, _callee20, undefined);
|
|
696
696
|
}));
|
|
697
697
|
|
|
698
|
-
return function (
|
|
698
|
+
return function (_x55, _x56, _x57) {
|
|
699
699
|
return _ref33.apply(this, arguments);
|
|
700
700
|
};
|
|
701
701
|
}();
|
|
@@ -722,7 +722,7 @@ exports.addPaymentMethod = function (service) {
|
|
|
722
722
|
}, _callee21, undefined);
|
|
723
723
|
}));
|
|
724
724
|
|
|
725
|
-
return function (
|
|
725
|
+
return function (_x58, _x59, _x60, _x61) {
|
|
726
726
|
return _ref35.apply(this, arguments);
|
|
727
727
|
};
|
|
728
728
|
}();
|
|
@@ -749,7 +749,7 @@ exports.getPaymentMethods = function (service) {
|
|
|
749
749
|
}, _callee22, undefined);
|
|
750
750
|
}));
|
|
751
751
|
|
|
752
|
-
return function (
|
|
752
|
+
return function (_x62, _x63) {
|
|
753
753
|
return _ref36.apply(this, arguments);
|
|
754
754
|
};
|
|
755
755
|
}();
|
|
@@ -790,7 +790,7 @@ exports.payInApp = function (service) {
|
|
|
790
790
|
}, _callee23, undefined);
|
|
791
791
|
}));
|
|
792
792
|
|
|
793
|
-
return function (
|
|
793
|
+
return function (_x64, _x65, _x66, _x67, _x68, _x69, _x70, _x71) {
|
|
794
794
|
return _ref37.apply(this, arguments);
|
|
795
795
|
};
|
|
796
796
|
}();
|
|
@@ -820,7 +820,7 @@ exports.deletePayment = function (service) {
|
|
|
820
820
|
}, _callee24, undefined);
|
|
821
821
|
}));
|
|
822
822
|
|
|
823
|
-
return function (
|
|
823
|
+
return function (_x72, _x73, _x74, _x75) {
|
|
824
824
|
return _ref38.apply(this, arguments);
|
|
825
825
|
};
|
|
826
826
|
}();
|
|
@@ -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));
|
|
@@ -852,7 +854,7 @@ exports.getMemberMessages = function (service) {
|
|
|
852
854
|
}, _callee25, undefined);
|
|
853
855
|
}));
|
|
854
856
|
|
|
855
|
-
return function (
|
|
857
|
+
return function (_x76, _x77, _x78, _x79, _x80) {
|
|
856
858
|
return _ref39.apply(this, arguments);
|
|
857
859
|
};
|
|
858
860
|
}();
|
|
@@ -884,7 +886,7 @@ exports.markAsReadMemberMessages = function (service) {
|
|
|
884
886
|
}, _callee26, undefined);
|
|
885
887
|
}));
|
|
886
888
|
|
|
887
|
-
return function (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
978
|
+
return function (_x94, _x95) {
|
|
977
979
|
return _ref43.apply(this, arguments);
|
|
978
980
|
};
|
|
979
981
|
}();
|
|
@@ -981,13 +983,13 @@ exports.getCreditClaimData = function (service) {
|
|
|
981
983
|
|
|
982
984
|
exports.claim = function (service) {
|
|
983
985
|
return function () {
|
|
984
|
-
var _ref44 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee30(baseUrl, locationId,
|
|
986
|
+
var _ref44 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee30(baseUrl, locationId, AssetKey, ItemID, Tag) {
|
|
985
987
|
var url;
|
|
986
988
|
return _regenerator2.default.wrap(function _callee30$(_context30) {
|
|
987
989
|
while (1) {
|
|
988
990
|
switch (_context30.prev = _context30.next) {
|
|
989
991
|
case 0:
|
|
990
|
-
url = baseUrl + '/alpha/api/Claim?
|
|
992
|
+
url = baseUrl + '/alpha/api/Claim?LocationID=' + locationId + '&InputType=JSON&MimeType=application/json';
|
|
991
993
|
return _context30.abrupt('return', service.post(url, {
|
|
992
994
|
Data: {
|
|
993
995
|
AssetKey: AssetKey,
|
|
@@ -1004,7 +1006,7 @@ exports.claim = function (service) {
|
|
|
1004
1006
|
}, _callee30, undefined);
|
|
1005
1007
|
}));
|
|
1006
1008
|
|
|
1007
|
-
return function (
|
|
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 (
|
|
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 (
|
|
1069
|
+
return function (_x103, _x104, _x105) {
|
|
1068
1070
|
return _ref46.apply(this, arguments);
|
|
1069
1071
|
};
|
|
1070
1072
|
}();
|
|
@@ -1072,14 +1074,14 @@ exports.purchaseAssetAPI2 = function (service) {
|
|
|
1072
1074
|
|
|
1073
1075
|
exports.logUserAction = function (service) {
|
|
1074
1076
|
return function () {
|
|
1075
|
-
var _ref47 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33(baseUrl, locationId,
|
|
1077
|
+
var _ref47 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33(baseUrl, locationId, action, logData) {
|
|
1076
1078
|
var url, _ref48, data;
|
|
1077
1079
|
|
|
1078
1080
|
return _regenerator2.default.wrap(function _callee33$(_context33) {
|
|
1079
1081
|
while (1) {
|
|
1080
1082
|
switch (_context33.prev = _context33.next) {
|
|
1081
1083
|
case 0:
|
|
1082
|
-
url = baseUrl + '/alpha/api/AsyncLogUserAction?InputType=Json&MimeType=application
|
|
1084
|
+
url = baseUrl + '/alpha/api/AsyncLogUserAction?InputType=Json&MimeType=application';
|
|
1083
1085
|
_context33.next = 3;
|
|
1084
1086
|
return service.post(url, {
|
|
1085
1087
|
Data: logData,
|
|
@@ -1100,7 +1102,7 @@ exports.logUserAction = function (service) {
|
|
|
1100
1102
|
}, _callee33, undefined);
|
|
1101
1103
|
}));
|
|
1102
1104
|
|
|
1103
|
-
return function (
|
|
1105
|
+
return function (_x106, _x107, _x108, _x109) {
|
|
1104
1106
|
return _ref47.apply(this, arguments);
|
|
1105
1107
|
};
|
|
1106
1108
|
}();
|
|
@@ -128,7 +128,7 @@ var translateElements = function () {
|
|
|
128
128
|
case 10:
|
|
129
129
|
api = apiObjects.api, servicesRoot = apiObjects.servicesRoot;
|
|
130
130
|
_context2.next = 13;
|
|
131
|
-
return api.generateTemporaryToken(servicesRoot, locationId,
|
|
131
|
+
return api.generateTemporaryToken(servicesRoot, locationId, item.childKey);
|
|
132
132
|
|
|
133
133
|
case 13:
|
|
134
134
|
tempToken = _context2.sent;
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -213,9 +213,9 @@ class Como {
|
|
|
213
213
|
|
|
214
214
|
async getFeedbackFormData() {
|
|
215
215
|
const {
|
|
216
|
-
locationId,
|
|
216
|
+
locationId, env_params: env, api,
|
|
217
217
|
} = this.comoData;
|
|
218
|
-
return api.getFeedbackFormData(env.zapp_root, locationId
|
|
218
|
+
return api.getFeedbackFormData(env.zapp_root, locationId);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -388,10 +388,10 @@ class Como {
|
|
|
388
388
|
*/
|
|
389
389
|
async openApp(data) {
|
|
390
390
|
const {
|
|
391
|
-
api, locationId,
|
|
391
|
+
api, locationId, env_params: env,
|
|
392
392
|
} = this.comoData;
|
|
393
393
|
|
|
394
|
-
return api.openApp(env.zapp_root,
|
|
394
|
+
return api.openApp(env.zapp_root, locationId, data);
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
/**
|
|
@@ -404,7 +404,7 @@ class Como {
|
|
|
404
404
|
api, locationId, token, env_params: env,
|
|
405
405
|
} = this.comoData;
|
|
406
406
|
try{
|
|
407
|
-
return api.clientUpdateMembership(env.services_root,
|
|
407
|
+
return api.clientUpdateMembership(env.services_root, locationId, pushEnable, locationEnable);
|
|
408
408
|
}
|
|
409
409
|
catch(e){
|
|
410
410
|
console.log(`clientUpdateMembership failed, token:${token}, locationId:${locationId}, error: ${e}`);
|
|
@@ -517,9 +517,9 @@ class Como {
|
|
|
517
517
|
*/
|
|
518
518
|
async purchaseAsset(itemId) {
|
|
519
519
|
const {
|
|
520
|
-
env_params: env,
|
|
520
|
+
env_params: env, locationId, api,
|
|
521
521
|
} = this.comoData;
|
|
522
|
-
const responseJson = await api.purchaseAsset(env.zapp_root, locationId,
|
|
522
|
+
const responseJson = await api.purchaseAsset(env.zapp_root, locationId, itemId);
|
|
523
523
|
return responseJson;
|
|
524
524
|
}
|
|
525
525
|
|
|
@@ -643,10 +643,10 @@ class Como {
|
|
|
643
643
|
*/
|
|
644
644
|
generateReferralCode() {
|
|
645
645
|
const {
|
|
646
|
-
api, locationId,
|
|
646
|
+
api, locationId, env_params: env,
|
|
647
647
|
} = this.comoData;
|
|
648
648
|
|
|
649
|
-
return api.generateReferralCode(env.services_root,
|
|
649
|
+
return api.generateReferralCode(env.services_root, locationId);
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
/**
|
|
@@ -654,10 +654,10 @@ class Como {
|
|
|
654
654
|
*/
|
|
655
655
|
verifyReferralCode(code) {
|
|
656
656
|
const {
|
|
657
|
-
api, locationId,
|
|
657
|
+
api, locationId, env_params: env,
|
|
658
658
|
} = this.comoData;
|
|
659
659
|
|
|
660
|
-
return api.verifyReferralCode(env.services_root,
|
|
660
|
+
return api.verifyReferralCode(env.services_root, locationId, code);
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
/**
|
|
@@ -825,16 +825,16 @@ class Como {
|
|
|
825
825
|
*/
|
|
826
826
|
sendPushChannel(identifier, isFirebaseProjectMigrated = false) {
|
|
827
827
|
const {
|
|
828
|
-
api, locationId,
|
|
828
|
+
api, locationId, env_params: env,
|
|
829
829
|
} = this.comoData;
|
|
830
|
-
return api.sendPushChannel(env.services_root, locationId,
|
|
830
|
+
return api.sendPushChannel(env.services_root, locationId, identifier, isFirebaseProjectMigrated);
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
async getRegionConfig() {
|
|
834
834
|
const {
|
|
835
|
-
api, locationId,
|
|
835
|
+
api, locationId, env_params: env,
|
|
836
836
|
} = this.comoData;
|
|
837
|
-
return api.getClientBusinessBackend(env.zapp_root,
|
|
837
|
+
return api.getClientBusinessBackend(env.zapp_root, locationId);
|
|
838
838
|
}
|
|
839
839
|
|
|
840
840
|
/**
|
|
@@ -842,9 +842,9 @@ class Como {
|
|
|
842
842
|
*/
|
|
843
843
|
sendCouponCode(code) {
|
|
844
844
|
const {
|
|
845
|
-
api, locationId,
|
|
845
|
+
api, locationId, env_params: env,
|
|
846
846
|
} = this.comoData;
|
|
847
|
-
return api.sendCouponCode(env.zapp_root, locationId,
|
|
847
|
+
return api.sendCouponCode(env.zapp_root, locationId, code);
|
|
848
848
|
}
|
|
849
849
|
|
|
850
850
|
async addPaymentMethod(cardToken) {
|
|
@@ -856,16 +856,16 @@ class Como {
|
|
|
856
856
|
|
|
857
857
|
async knowYourData(email) {
|
|
858
858
|
const {
|
|
859
|
-
api, locationId,
|
|
859
|
+
api, locationId, env_params: env,
|
|
860
860
|
} = this.comoData;
|
|
861
|
-
return api.knowYourData(env.services_root, locationId,
|
|
861
|
+
return api.knowYourData(env.services_root, locationId, email);
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
async consentWithdraw(consentData) {
|
|
865
865
|
const {
|
|
866
|
-
api, locationId,
|
|
866
|
+
api, locationId, env_params: env,
|
|
867
867
|
} = this.comoData;
|
|
868
|
-
return api.consentWithdraw(env.services_root, locationId,
|
|
868
|
+
return api.consentWithdraw(env.services_root, locationId, consentData);
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
async getPaymentMethods() {
|
|
@@ -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
|
/**
|
|
@@ -964,9 +964,9 @@ class Como {
|
|
|
964
964
|
*/
|
|
965
965
|
claim(assetKey, itemId, tag) {
|
|
966
966
|
const {
|
|
967
|
-
env_params: env, locationId, api,
|
|
967
|
+
env_params: env, locationId, api,
|
|
968
968
|
} = this.comoData;
|
|
969
|
-
return api.claim(env.zapp_root, locationId,
|
|
969
|
+
return api.claim(env.zapp_root, locationId, assetKey, itemId, tag);
|
|
970
970
|
}
|
|
971
971
|
|
|
972
972
|
/**
|
|
@@ -976,9 +976,9 @@ class Como {
|
|
|
976
976
|
*/
|
|
977
977
|
async logUserAction(action, logData) {
|
|
978
978
|
const {
|
|
979
|
-
env_params: env, locationId, api,
|
|
979
|
+
env_params: env, locationId, api,
|
|
980
980
|
} = this.comoData;
|
|
981
|
-
return api.logUserAction(env.zapp_root, locationId,
|
|
981
|
+
return api.logUserAction(env.zapp_root, locationId, action, logData);
|
|
982
982
|
}
|
|
983
983
|
|
|
984
984
|
/**
|