@como/como-client 0.1.292 → 0.1.991

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.
@@ -1,5 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ var _stringify = require('babel-runtime/core-js/json/stringify');
4
+
5
+ var _stringify2 = _interopRequireDefault(_stringify);
6
+
3
7
  var _regenerator = require('babel-runtime/regenerator');
4
8
 
5
9
  var _regenerator2 = _interopRequireDefault(_regenerator);
@@ -138,7 +142,7 @@ exports.memberAssets = function (service) {
138
142
  switch (_context4.prev = _context4.next) {
139
143
  case 0:
140
144
  archivedText = archived ? 'OnlyArchived' : 'OnlyUnarchived';
141
- url = baseUrl + '/memberAssets?requestKind=' + archivedText + '&locationId=' + locationId;
145
+ url = baseUrl + '/memberAssets?requestKind=' + archivedText + '&locationId=' + locationId + '&limit=500';
142
146
  _context4.next = 4;
143
147
  return service.get(url);
144
148
 
@@ -369,22 +373,23 @@ exports.generateReferralCode = function (service) {
369
373
  }();
370
374
  };
371
375
 
372
- exports.openApp = function (service) {
376
+ exports.verifyReferralCode = function (service) {
373
377
  return function () {
374
- var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl, token, locationId, data) {
375
- var dateNow, url, response;
378
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(baseUrl, token, locationId, code) {
379
+ var url, _ref20, data;
380
+
376
381
  return _regenerator2.default.wrap(function _callee11$(_context11) {
377
382
  while (1) {
378
383
  switch (_context11.prev = _context11.next) {
379
384
  case 0:
380
- dateNow = moment();
381
- url = baseUrl + '/alpha/api/OpenApp?InputType=json&locationId=' + locationId + '&token=' + token + '&Action=openedclub&TimeStamp=' + dateNow;
382
- _context11.next = 4;
383
- return service.post(url, { LocationID: locationId, Data: data });
385
+ url = baseUrl + '/referralCode/validate?locationId=' + locationId + '&token=' + token + '&code=' + code;
386
+ _context11.next = 3;
387
+ return service.get(url);
384
388
 
385
- case 4:
386
- response = _context11.sent;
387
- return _context11.abrupt('return', response);
389
+ case 3:
390
+ _ref20 = _context11.sent;
391
+ data = _ref20.data;
392
+ return _context11.abrupt('return', data);
388
393
 
389
394
  case 6:
390
395
  case 'end':
@@ -400,23 +405,24 @@ exports.openApp = function (service) {
400
405
  }();
401
406
  };
402
407
 
403
- exports.clientUpdateMembership = function (service) {
408
+ exports.openApp = function (service) {
404
409
  return function () {
405
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl, token, locationId, pushEnable, locationEnable) {
406
- var url, response;
410
+ var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(baseUrl, token, locationId, data) {
411
+ var dateNow, url, response;
407
412
  return _regenerator2.default.wrap(function _callee12$(_context12) {
408
413
  while (1) {
409
414
  switch (_context12.prev = _context12.next) {
410
415
  case 0:
411
- url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId + '&token=' + token;
412
- _context12.next = 3;
413
- return service.put(url, { PushNotificationEnabled: pushEnable, LocationEnabled: locationEnable });
416
+ dateNow = moment();
417
+ url = baseUrl + '/alpha/api/OpenApp?InputType=json&locationId=' + locationId + '&token=' + token + '&Action=openedclub&TimeStamp=' + dateNow;
418
+ _context12.next = 4;
419
+ return service.post(url, { LocationID: locationId, Data: data });
414
420
 
415
- case 3:
421
+ case 4:
416
422
  response = _context12.sent;
417
423
  return _context12.abrupt('return', response);
418
424
 
419
- case 5:
425
+ case 6:
420
426
  case 'end':
421
427
  return _context12.stop();
422
428
  }
@@ -424,35 +430,29 @@ exports.clientUpdateMembership = function (service) {
424
430
  }, _callee12, undefined);
425
431
  }));
426
432
 
427
- return function (_x33, _x34, _x35, _x36, _x37) {
428
- return _ref20.apply(this, arguments);
433
+ return function (_x33, _x34, _x35, _x36) {
434
+ return _ref21.apply(this, arguments);
429
435
  };
430
436
  }();
431
437
  };
432
438
 
433
- exports.generateTemporaryToken = function (service) {
439
+ exports.clientUpdateMembership = function (service) {
434
440
  return function () {
435
- var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl, locationId, token, timeToLive) {
436
- var url, _ref22, data;
437
-
441
+ var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(baseUrl, token, locationId, pushEnable, locationEnable) {
442
+ var url, response;
438
443
  return _regenerator2.default.wrap(function _callee13$(_context13) {
439
444
  while (1) {
440
445
  switch (_context13.prev = _context13.next) {
441
446
  case 0:
442
- url = baseUrl + '/memberships/generateToken?locationId=' + locationId + '&token=' + token;
447
+ url = baseUrl + '/memberships/clientUpdateMembership?locationId=' + locationId + '&token=' + token;
443
448
  _context13.next = 3;
444
- return service.post(url, {
445
- timeToLive: timeToLive
446
- }, {
447
- headers: { 'Content-Type': 'application/json' }
448
- });
449
+ return service.put(url, { PushNotificationEnabled: pushEnable, LocationEnabled: locationEnable });
449
450
 
450
451
  case 3:
451
- _ref22 = _context13.sent;
452
- data = _ref22.data;
453
- return _context13.abrupt('return', data);
452
+ response = _context13.sent;
453
+ return _context13.abrupt('return', response);
454
454
 
455
- case 6:
455
+ case 5:
456
456
  case 'end':
457
457
  return _context13.stop();
458
458
  }
@@ -460,24 +460,28 @@ exports.generateTemporaryToken = function (service) {
460
460
  }, _callee13, undefined);
461
461
  }));
462
462
 
463
- return function (_x38, _x39, _x40, _x41) {
464
- return _ref21.apply(this, arguments);
463
+ return function (_x37, _x38, _x39, _x40, _x41) {
464
+ return _ref22.apply(this, arguments);
465
465
  };
466
466
  }();
467
467
  };
468
468
 
469
- exports.getFeedbackFormData = function (service) {
469
+ exports.generateTemporaryToken = function (service) {
470
470
  return function () {
471
- var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId, token) {
471
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(baseUrl, locationId, token, timeToLive) {
472
472
  var url, _ref24, data;
473
473
 
474
474
  return _regenerator2.default.wrap(function _callee14$(_context14) {
475
475
  while (1) {
476
476
  switch (_context14.prev = _context14.next) {
477
477
  case 0:
478
- url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json';
478
+ url = baseUrl + '/memberships/generateToken?locationId=' + locationId + '&token=' + token;
479
479
  _context14.next = 3;
480
- return service.get(url);
480
+ return service.post(url, {
481
+ timeToLive: timeToLive
482
+ }, {
483
+ headers: { 'Content-Type': 'application/json' }
484
+ });
481
485
 
482
486
  case 3:
483
487
  _ref24 = _context14.sent;
@@ -492,32 +496,31 @@ exports.getFeedbackFormData = function (service) {
492
496
  }, _callee14, undefined);
493
497
  }));
494
498
 
495
- return function (_x42, _x43, _x44) {
499
+ return function (_x42, _x43, _x44, _x45) {
496
500
  return _ref23.apply(this, arguments);
497
501
  };
498
502
  }();
499
503
  };
500
504
 
501
- exports.sendPushChannel = function (service) {
505
+ exports.getFeedbackFormData = function (service) {
502
506
  return function () {
503
- var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId, token, identifier) {
504
- var url, response;
507
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(baseUrl, locationId, token) {
508
+ var url, _ref26, data;
509
+
505
510
  return _regenerator2.default.wrap(function _callee15$(_context15) {
506
511
  while (1) {
507
512
  switch (_context15.prev = _context15.next) {
508
513
  case 0:
509
- url = baseUrl + '/push_channels?locationId=' + locationId + '&token=' + token;
514
+ url = baseUrl + '/alpha/api/SendFeedback?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json';
510
515
  _context15.next = 3;
511
- return service.post(url, {
512
- type: 'fcm',
513
- identifier: identifier
514
- });
516
+ return service.get(url);
515
517
 
516
518
  case 3:
517
- response = _context15.sent;
518
- return _context15.abrupt('return', response);
519
+ _ref26 = _context15.sent;
520
+ data = _ref26.data;
521
+ return _context15.abrupt('return', data);
519
522
 
520
- case 5:
523
+ case 6:
521
524
  case 'end':
522
525
  return _context15.stop();
523
526
  }
@@ -525,31 +528,34 @@ exports.sendPushChannel = function (service) {
525
528
  }, _callee15, undefined);
526
529
  }));
527
530
 
528
- return function (_x45, _x46, _x47, _x48) {
531
+ return function (_x46, _x47, _x48) {
529
532
  return _ref25.apply(this, arguments);
530
533
  };
531
534
  }();
532
535
  };
533
536
 
534
- exports.getClientBusinessBackend = function (service) {
537
+ exports.sendPushChannel = function (service) {
535
538
  return function () {
536
- var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, token, locationId) {
537
- var url, _ref27, data;
538
-
539
+ var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(baseUrl, locationId, token, identifier) {
540
+ var firebaseProjectMigrated = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
541
+ var url, response;
539
542
  return _regenerator2.default.wrap(function _callee16$(_context16) {
540
543
  while (1) {
541
544
  switch (_context16.prev = _context16.next) {
542
545
  case 0:
543
- url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json';
546
+ url = baseUrl + '/push_channels?locationId=' + locationId + '&token=' + token;
544
547
  _context16.next = 3;
545
- return service.post(url);
548
+ return service.post(url, {
549
+ type: 'fcm',
550
+ identifier: identifier,
551
+ firebaseProjectMigrated: firebaseProjectMigrated
552
+ });
546
553
 
547
554
  case 3:
548
- _ref27 = _context16.sent;
549
- data = _ref27.data;
550
- return _context16.abrupt('return', data);
555
+ response = _context16.sent;
556
+ return _context16.abrupt('return', response);
551
557
 
552
- case 6:
558
+ case 5:
553
559
  case 'end':
554
560
  return _context16.stop();
555
561
  }
@@ -557,29 +563,31 @@ exports.getClientBusinessBackend = function (service) {
557
563
  }, _callee16, undefined);
558
564
  }));
559
565
 
560
- return function (_x49, _x50, _x51) {
561
- return _ref26.apply(this, arguments);
566
+ return function (_x49, _x50, _x51, _x52) {
567
+ return _ref27.apply(this, arguments);
562
568
  };
563
569
  }();
564
570
  };
565
571
 
566
- exports.sendCouponCode = function (service) {
572
+ exports.getClientBusinessBackend = function (service) {
567
573
  return function () {
568
- var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl, locationId, token, code) {
569
- var url, response;
574
+ var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(baseUrl, token, locationId) {
575
+ var url, _ref29, data;
576
+
570
577
  return _regenerator2.default.wrap(function _callee17$(_context17) {
571
578
  while (1) {
572
579
  switch (_context17.prev = _context17.next) {
573
580
  case 0:
574
- url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '&Token=' + token + '&Code=' + code + '&InputType=json&MimeType=application/json';
581
+ url = baseUrl + '/alpha/api/ClientGetBusinessBackend?LocationID=' + locationId + '&Token=' + token + '&MimeType=application/json';
575
582
  _context17.next = 3;
576
583
  return service.post(url);
577
584
 
578
585
  case 3:
579
- response = _context17.sent;
580
- return _context17.abrupt('return', response);
586
+ _ref29 = _context17.sent;
587
+ data = _ref29.data;
588
+ return _context17.abrupt('return', data);
581
589
 
582
- case 5:
590
+ case 6:
583
591
  case 'end':
584
592
  return _context17.stop();
585
593
  }
@@ -587,20 +595,122 @@ exports.sendCouponCode = function (service) {
587
595
  }, _callee17, undefined);
588
596
  }));
589
597
 
590
- return function (_x52, _x53, _x54, _x55) {
598
+ return function (_x54, _x55, _x56) {
591
599
  return _ref28.apply(this, arguments);
592
600
  };
593
601
  }();
594
602
  };
595
603
 
596
- exports.addPaymentMethod = function (service) {
604
+ exports.sendCouponCode = function (service) {
597
605
  return function () {
598
- var _ref29 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId, token, cardToken) {
606
+ var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(baseUrl, locationId, token, code) {
607
+ var url, response;
599
608
  return _regenerator2.default.wrap(function _callee18$(_context18) {
600
609
  while (1) {
601
610
  switch (_context18.prev = _context18.next) {
602
611
  case 0:
603
- return _context18.abrupt('return', service({
612
+ url = baseUrl + '/alpha/api/DoCodeBasedAction?LocationID=' + locationId + '&Token=' + token + '&Code=' + code + '&InputType=json&MimeType=application/json';
613
+ _context18.next = 3;
614
+ return service.post(url);
615
+
616
+ case 3:
617
+ response = _context18.sent;
618
+ return _context18.abrupt('return', response);
619
+
620
+ case 5:
621
+ case 'end':
622
+ return _context18.stop();
623
+ }
624
+ }
625
+ }, _callee18, undefined);
626
+ }));
627
+
628
+ return function (_x57, _x58, _x59, _x60) {
629
+ return _ref30.apply(this, arguments);
630
+ };
631
+ }();
632
+ };
633
+
634
+ exports.consentWithdraw = function (service) {
635
+ return function () {
636
+ var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId, token, consentData) {
637
+ var url, _ref32, data;
638
+
639
+ return _regenerator2.default.wrap(function _callee19$(_context19) {
640
+ while (1) {
641
+ switch (_context19.prev = _context19.next) {
642
+ case 0:
643
+ url = baseUrl + '/memberships/forgetMember?locationId=' + locationId + '&token=' + token;
644
+ _context19.next = 3;
645
+ return service.post(url, {
646
+ consentData: (0, _stringify2.default)(consentData)
647
+ }, {
648
+ headers: { 'Content-Type': 'application/json' }
649
+ });
650
+
651
+ case 3:
652
+ _ref32 = _context19.sent;
653
+ data = _ref32.data;
654
+ return _context19.abrupt('return', data);
655
+
656
+ case 6:
657
+ case 'end':
658
+ return _context19.stop();
659
+ }
660
+ }
661
+ }, _callee19, undefined);
662
+ }));
663
+
664
+ return function (_x61, _x62, _x63, _x64) {
665
+ return _ref31.apply(this, arguments);
666
+ };
667
+ }();
668
+ };
669
+
670
+ exports.knowYourData = function (service) {
671
+ return function () {
672
+ var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId, token, email) {
673
+ var url, _ref34, data;
674
+
675
+ return _regenerator2.default.wrap(function _callee20$(_context20) {
676
+ while (1) {
677
+ switch (_context20.prev = _context20.next) {
678
+ case 0:
679
+ url = baseUrl + '/memberships/requestData?locationId=' + locationId + '&token=' + token;
680
+ _context20.next = 3;
681
+ return service.post(url, {
682
+ email: email
683
+ }, {
684
+ headers: { 'Content-Type': 'application/json' }
685
+ });
686
+
687
+ case 3:
688
+ _ref34 = _context20.sent;
689
+ data = _ref34.data;
690
+ return _context20.abrupt('return', data);
691
+
692
+ case 6:
693
+ case 'end':
694
+ return _context20.stop();
695
+ }
696
+ }
697
+ }, _callee20, undefined);
698
+ }));
699
+
700
+ return function (_x65, _x66, _x67, _x68) {
701
+ return _ref33.apply(this, arguments);
702
+ };
703
+ }();
704
+ };
705
+
706
+ exports.addPaymentMethod = function (service) {
707
+ return function () {
708
+ var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(baseUrl, locationId, token, cardToken) {
709
+ return _regenerator2.default.wrap(function _callee21$(_context21) {
710
+ while (1) {
711
+ switch (_context21.prev = _context21.next) {
712
+ case 0:
713
+ return _context21.abrupt('return', service({
604
714
  method: 'post',
605
715
  url: baseUrl + '/payments/v2/methods/' + cardToken + '?locationId=' + locationId,
606
716
  timeout: 5000 // Wait for 5 seconds
@@ -608,26 +718,26 @@ exports.addPaymentMethod = function (service) {
608
718
 
609
719
  case 1:
610
720
  case 'end':
611
- return _context18.stop();
721
+ return _context21.stop();
612
722
  }
613
723
  }
614
- }, _callee18, undefined);
724
+ }, _callee21, undefined);
615
725
  }));
616
726
 
617
- return function (_x56, _x57, _x58, _x59) {
618
- return _ref29.apply(this, arguments);
727
+ return function (_x69, _x70, _x71, _x72) {
728
+ return _ref35.apply(this, arguments);
619
729
  };
620
730
  }();
621
731
  };
622
732
 
623
733
  exports.getPaymentMethods = function (service) {
624
734
  return function () {
625
- var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(baseUrl, locationId) {
626
- return _regenerator2.default.wrap(function _callee19$(_context19) {
735
+ var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(baseUrl, locationId) {
736
+ return _regenerator2.default.wrap(function _callee22$(_context22) {
627
737
  while (1) {
628
- switch (_context19.prev = _context19.next) {
738
+ switch (_context22.prev = _context22.next) {
629
739
  case 0:
630
- return _context19.abrupt('return', service({
740
+ return _context22.abrupt('return', service({
631
741
  method: 'get',
632
742
  url: baseUrl + '/payments/v2/methods?locationId=' + locationId + '&InputType=json&MimeType=application/json',
633
743
  timeout: 5000 // Wait for 5 seconds
@@ -635,26 +745,26 @@ exports.getPaymentMethods = function (service) {
635
745
 
636
746
  case 1:
637
747
  case 'end':
638
- return _context19.stop();
748
+ return _context22.stop();
639
749
  }
640
750
  }
641
- }, _callee19, undefined);
751
+ }, _callee22, undefined);
642
752
  }));
643
753
 
644
- return function (_x60, _x61) {
645
- return _ref30.apply(this, arguments);
754
+ return function (_x73, _x74) {
755
+ return _ref36.apply(this, arguments);
646
756
  };
647
757
  }();
648
758
  };
649
759
 
650
760
  exports.payInApp = function (service) {
651
761
  return function () {
652
- var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(baseUrl, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey) {
653
- return _regenerator2.default.wrap(function _callee20$(_context20) {
762
+ var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee23(baseUrl, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey) {
763
+ return _regenerator2.default.wrap(function _callee23$(_context23) {
654
764
  while (1) {
655
- switch (_context20.prev = _context20.next) {
765
+ switch (_context23.prev = _context23.next) {
656
766
  case 0:
657
- return _context20.abrupt('return', service({
767
+ return _context23.abrupt('return', service({
658
768
  method: 'post',
659
769
  url: baseUrl + '/payments/v2/payments/charge?locationId=' + locationId,
660
770
  timeout: 5000, // Wait for 5 seconds
@@ -676,55 +786,55 @@ exports.payInApp = function (service) {
676
786
 
677
787
  case 1:
678
788
  case 'end':
679
- return _context20.stop();
789
+ return _context23.stop();
680
790
  }
681
791
  }
682
- }, _callee20, undefined);
792
+ }, _callee23, undefined);
683
793
  }));
684
794
 
685
- return function (_x62, _x63, _x64, _x65, _x66, _x67, _x68, _x69) {
686
- return _ref31.apply(this, arguments);
795
+ return function (_x75, _x76, _x77, _x78, _x79, _x80, _x81, _x82) {
796
+ return _ref37.apply(this, arguments);
687
797
  };
688
798
  }();
689
799
  };
690
800
 
691
801
  exports.deletePayment = function (service) {
692
802
  return function () {
693
- var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(baseUrl, locationId, token, creditCardToken) {
803
+ var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee24(baseUrl, locationId, token, creditCardToken) {
694
804
  var url, response;
695
- return _regenerator2.default.wrap(function _callee21$(_context21) {
805
+ return _regenerator2.default.wrap(function _callee24$(_context24) {
696
806
  while (1) {
697
- switch (_context21.prev = _context21.next) {
807
+ switch (_context24.prev = _context24.next) {
698
808
  case 0:
699
809
  url = baseUrl + '/payments/v2/methods/' + creditCardToken + '?locationId=' + locationId;
700
- _context21.next = 3;
810
+ _context24.next = 3;
701
811
  return service.delete(url);
702
812
 
703
813
  case 3:
704
- response = _context21.sent;
705
- return _context21.abrupt('return', response);
814
+ response = _context24.sent;
815
+ return _context24.abrupt('return', response);
706
816
 
707
817
  case 5:
708
818
  case 'end':
709
- return _context21.stop();
819
+ return _context24.stop();
710
820
  }
711
821
  }
712
- }, _callee21, undefined);
822
+ }, _callee24, undefined);
713
823
  }));
714
824
 
715
- return function (_x70, _x71, _x72, _x73) {
716
- return _ref32.apply(this, arguments);
825
+ return function (_x83, _x84, _x85, _x86) {
826
+ return _ref38.apply(this, arguments);
717
827
  };
718
828
  }();
719
829
  };
720
830
 
721
831
  exports.getMemberMessages = function (service) {
722
832
  return function () {
723
- var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(baseUrl, locationId, tag, limit, offset) {
833
+ var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25(baseUrl, locationId, tag, limit, offset) {
724
834
  var query, url;
725
- return _regenerator2.default.wrap(function _callee22$(_context22) {
835
+ return _regenerator2.default.wrap(function _callee25$(_context25) {
726
836
  while (1) {
727
- switch (_context22.prev = _context22.next) {
837
+ switch (_context25.prev = _context25.next) {
728
838
  case 0:
729
839
  query = {
730
840
  locationId: locationId,
@@ -734,62 +844,62 @@ exports.getMemberMessages = function (service) {
734
844
  offset: offset
735
845
  };
736
846
  url = urlsUtils.appendQuery(baseUrl + '/memberMessages', query);
737
- return _context22.abrupt('return', service.get(url));
847
+ return _context25.abrupt('return', service.get(url));
738
848
 
739
849
  case 3:
740
850
  case 'end':
741
- return _context22.stop();
851
+ return _context25.stop();
742
852
  }
743
853
  }
744
- }, _callee22, undefined);
854
+ }, _callee25, undefined);
745
855
  }));
746
856
 
747
- return function (_x74, _x75, _x76, _x77, _x78) {
748
- return _ref33.apply(this, arguments);
857
+ return function (_x87, _x88, _x89, _x90, _x91) {
858
+ return _ref39.apply(this, arguments);
749
859
  };
750
860
  }();
751
861
  };
752
862
 
753
863
  exports.markAsReadMemberMessages = function (service) {
754
864
  return function () {
755
- var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee23(baseUrl, locationId, keysList) {
865
+ var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee26(baseUrl, locationId, keysList) {
756
866
  var url, response;
757
- return _regenerator2.default.wrap(function _callee23$(_context23) {
867
+ return _regenerator2.default.wrap(function _callee26$(_context26) {
758
868
  while (1) {
759
- switch (_context23.prev = _context23.next) {
869
+ switch (_context26.prev = _context26.next) {
760
870
  case 0:
761
871
  url = baseUrl + '/memberMessages/markAsRead/v2?locationId=' + locationId;
762
- _context23.next = 3;
872
+ _context26.next = 3;
763
873
  return service.put(url, {
764
874
  keys: keysList
765
875
  });
766
876
 
767
877
  case 3:
768
- response = _context23.sent;
769
- return _context23.abrupt('return', response);
878
+ response = _context26.sent;
879
+ return _context26.abrupt('return', response);
770
880
 
771
881
  case 5:
772
882
  case 'end':
773
- return _context23.stop();
883
+ return _context26.stop();
774
884
  }
775
885
  }
776
- }, _callee23, undefined);
886
+ }, _callee26, undefined);
777
887
  }));
778
888
 
779
- return function (_x79, _x80, _x81) {
780
- return _ref34.apply(this, arguments);
889
+ return function (_x92, _x93, _x94) {
890
+ return _ref40.apply(this, arguments);
781
891
  };
782
892
  }();
783
893
  };
784
894
 
785
895
  exports.budgetTransfer = function (service) {
786
896
  return function () {
787
- var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee24(baseUrl, locationId, receiver, sender, amount, wallet) {
788
- return _regenerator2.default.wrap(function _callee24$(_context24) {
897
+ var _ref41 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27(baseUrl, locationId, receiver, sender, amount, wallet) {
898
+ return _regenerator2.default.wrap(function _callee27$(_context27) {
789
899
  while (1) {
790
- switch (_context24.prev = _context24.next) {
900
+ switch (_context27.prev = _context27.next) {
791
901
  case 0:
792
- return _context24.abrupt('return', service({
902
+ return _context27.abrupt('return', service({
793
903
  method: 'post',
794
904
  url: baseUrl + '/budgetTransfer?locationId=' + locationId,
795
905
  timeout: 5000, // Wait for 5 seconds
@@ -803,25 +913,25 @@ exports.budgetTransfer = function (service) {
803
913
 
804
914
  case 1:
805
915
  case 'end':
806
- return _context24.stop();
916
+ return _context27.stop();
807
917
  }
808
918
  }
809
- }, _callee24, undefined);
919
+ }, _callee27, undefined);
810
920
  }));
811
921
 
812
- return function (_x82, _x83, _x84, _x85, _x86, _x87) {
813
- return _ref35.apply(this, arguments);
922
+ return function (_x95, _x96, _x97, _x98, _x99, _x100) {
923
+ return _ref41.apply(this, arguments);
814
924
  };
815
925
  }();
816
926
  };
817
927
  exports.budgetTransferClaim = function (service) {
818
928
  return function () {
819
- var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25(baseUrl, locationId, claimCode) {
820
- return _regenerator2.default.wrap(function _callee25$(_context25) {
929
+ var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee28(baseUrl, locationId, claimCode) {
930
+ return _regenerator2.default.wrap(function _callee28$(_context28) {
821
931
  while (1) {
822
- switch (_context25.prev = _context25.next) {
932
+ switch (_context28.prev = _context28.next) {
823
933
  case 0:
824
- return _context25.abrupt('return', service({
934
+ return _context28.abrupt('return', service({
825
935
  method: 'post',
826
936
  url: baseUrl + '/budgetTransfer/' + claimCode + '/claim?locationId=' + locationId,
827
937
  timeout: 5000 // Wait for 5 seconds
@@ -829,58 +939,58 @@ exports.budgetTransferClaim = function (service) {
829
939
 
830
940
  case 1:
831
941
  case 'end':
832
- return _context25.stop();
942
+ return _context28.stop();
833
943
  }
834
944
  }
835
- }, _callee25, undefined);
945
+ }, _callee28, undefined);
836
946
  }));
837
947
 
838
- return function (_x88, _x89, _x90) {
839
- return _ref36.apply(this, arguments);
948
+ return function (_x101, _x102, _x103) {
949
+ return _ref42.apply(this, arguments);
840
950
  };
841
951
  }();
842
952
  };
843
953
 
844
954
  exports.getCreditClaimData = function (service) {
845
955
  return function () {
846
- var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee26(baseUrl, claimId) {
956
+ var _ref43 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee29(baseUrl, claimId) {
847
957
  var url, response;
848
- return _regenerator2.default.wrap(function _callee26$(_context26) {
958
+ return _regenerator2.default.wrap(function _callee29$(_context29) {
849
959
  while (1) {
850
- switch (_context26.prev = _context26.next) {
960
+ switch (_context29.prev = _context29.next) {
851
961
  case 0:
852
962
  url = baseUrl + '/budgetTransfer/' + claimId;
853
- _context26.next = 3;
963
+ _context29.next = 3;
854
964
  return service.get(url);
855
965
 
856
966
  case 3:
857
- response = _context26.sent;
858
- return _context26.abrupt('return', response);
967
+ response = _context29.sent;
968
+ return _context29.abrupt('return', response);
859
969
 
860
970
  case 5:
861
971
  case 'end':
862
- return _context26.stop();
972
+ return _context29.stop();
863
973
  }
864
974
  }
865
- }, _callee26, undefined);
975
+ }, _callee29, undefined);
866
976
  }));
867
977
 
868
- return function (_x91, _x92) {
869
- return _ref37.apply(this, arguments);
978
+ return function (_x104, _x105) {
979
+ return _ref43.apply(this, arguments);
870
980
  };
871
981
  }();
872
982
  };
873
983
 
874
984
  exports.claim = function (service) {
875
985
  return function () {
876
- var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27(baseUrl, locationId, token, AssetKey, ItemID, Tag) {
986
+ var _ref44 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee30(baseUrl, locationId, token, AssetKey, ItemID, Tag) {
877
987
  var url;
878
- return _regenerator2.default.wrap(function _callee27$(_context27) {
988
+ return _regenerator2.default.wrap(function _callee30$(_context30) {
879
989
  while (1) {
880
- switch (_context27.prev = _context27.next) {
990
+ switch (_context30.prev = _context30.next) {
881
991
  case 0:
882
992
  url = baseUrl + '/alpha/api/Claim?Token=' + token + '&LocationID=' + locationId + '&InputType=JSON&MimeType=application/json';
883
- return _context27.abrupt('return', service.post(url, {
993
+ return _context30.abrupt('return', service.post(url, {
884
994
  Data: {
885
995
  AssetKey: AssetKey,
886
996
  ItemID: ItemID,
@@ -890,14 +1000,110 @@ exports.claim = function (service) {
890
1000
 
891
1001
  case 2:
892
1002
  case 'end':
893
- return _context27.stop();
1003
+ return _context30.stop();
894
1004
  }
895
1005
  }
896
- }, _callee27, undefined);
1006
+ }, _callee30, undefined);
897
1007
  }));
898
1008
 
899
- return function (_x93, _x94, _x95, _x96, _x97, _x98) {
900
- return _ref38.apply(this, arguments);
1009
+ return function (_x106, _x107, _x108, _x109, _x110, _x111) {
1010
+ return _ref44.apply(this, arguments);
1011
+ };
1012
+ }();
1013
+ };
1014
+
1015
+ exports.getUserPointShopDataAPI2 = function (service) {
1016
+ return function () {
1017
+ var _ref45 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee31(baseUrl, locationId) {
1018
+ var url, response;
1019
+ return _regenerator2.default.wrap(function _callee31$(_context31) {
1020
+ while (1) {
1021
+ switch (_context31.prev = _context31.next) {
1022
+ case 0:
1023
+ url = baseUrl + '/api/pointShop/member?locationId=' + locationId;
1024
+ _context31.next = 3;
1025
+ return service.get(url);
1026
+
1027
+ case 3:
1028
+ response = _context31.sent;
1029
+ return _context31.abrupt('return', response);
1030
+
1031
+ case 5:
1032
+ case 'end':
1033
+ return _context31.stop();
1034
+ }
1035
+ }
1036
+ }, _callee31, undefined);
1037
+ }));
1038
+
1039
+ return function (_x112, _x113) {
1040
+ return _ref45.apply(this, arguments);
1041
+ };
1042
+ }();
1043
+ };
1044
+
1045
+ exports.purchaseAssetAPI2 = function (service) {
1046
+ return function () {
1047
+ var _ref46 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee32(baseUrl, locationId, assetID) {
1048
+ var url, response;
1049
+ return _regenerator2.default.wrap(function _callee32$(_context32) {
1050
+ while (1) {
1051
+ switch (_context32.prev = _context32.next) {
1052
+ case 0:
1053
+ url = baseUrl + '/api/pointShop/purchase/' + assetID + '?locationId=' + locationId;
1054
+ _context32.next = 3;
1055
+ return service.post(url);
1056
+
1057
+ case 3:
1058
+ response = _context32.sent;
1059
+ return _context32.abrupt('return', response);
1060
+
1061
+ case 5:
1062
+ case 'end':
1063
+ return _context32.stop();
1064
+ }
1065
+ }
1066
+ }, _callee32, undefined);
1067
+ }));
1068
+
1069
+ return function (_x114, _x115, _x116) {
1070
+ return _ref46.apply(this, arguments);
1071
+ };
1072
+ }();
1073
+ };
1074
+
1075
+ exports.logUserAction = function (service) {
1076
+ return function () {
1077
+ var _ref47 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33(baseUrl, locationId, token, action, logData) {
1078
+ var url, _ref48, data;
1079
+
1080
+ return _regenerator2.default.wrap(function _callee33$(_context33) {
1081
+ while (1) {
1082
+ switch (_context33.prev = _context33.next) {
1083
+ case 0:
1084
+ url = baseUrl + '/alpha/api/AsyncLogUserAction?InputType=Json&MimeType=application&Token=' + token;
1085
+ _context33.next = 3;
1086
+ return service.post(url, {
1087
+ Data: logData,
1088
+ BusinessID: locationId,
1089
+ Action: action
1090
+ });
1091
+
1092
+ case 3:
1093
+ _ref48 = _context33.sent;
1094
+ data = _ref48.data;
1095
+ return _context33.abrupt('return', data);
1096
+
1097
+ case 6:
1098
+ case 'end':
1099
+ return _context33.stop();
1100
+ }
1101
+ }
1102
+ }, _callee33, undefined);
1103
+ }));
1104
+
1105
+ return function (_x117, _x118, _x119, _x120, _x121) {
1106
+ return _ref47.apply(this, arguments);
901
1107
  };
902
1108
  }();
903
1109
  };