@como/como-client 0.1.80 → 0.1.81
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 +209 -208
- package/lib/services/auth.service.js +12 -12
- package/package.json +1 -1
- package/src/como.js +3 -2
package/lib/como.js
CHANGED
|
@@ -100,42 +100,43 @@ var Como = function () {
|
|
|
100
100
|
key: 'signon',
|
|
101
101
|
value: function () {
|
|
102
102
|
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
103
|
-
var api, data, _error$response$data, code, message;
|
|
103
|
+
var _comoData2, api, credentials, _ref3, refreshToken, data, _error$response$data, code, message;
|
|
104
104
|
|
|
105
105
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
106
106
|
while (1) {
|
|
107
107
|
switch (_context2.prev = _context2.next) {
|
|
108
108
|
case 0:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
_context2.
|
|
112
|
-
|
|
109
|
+
_comoData2 = this.comoData, api = _comoData2.api, credentials = _comoData2.credentials;
|
|
110
|
+
_ref3 = credentials ? credentials : {}, refreshToken = _ref3.refreshToken;
|
|
111
|
+
_context2.prev = 2;
|
|
112
|
+
_context2.next = 5;
|
|
113
|
+
return api.signOn(this.comoData.installationId, this.comoData.locationId, refreshToken);
|
|
113
114
|
|
|
114
|
-
case
|
|
115
|
+
case 5:
|
|
115
116
|
data = _context2.sent;
|
|
116
117
|
return _context2.abrupt('return', data);
|
|
117
118
|
|
|
118
|
-
case
|
|
119
|
-
_context2.prev =
|
|
120
|
-
_context2.t0 = _context2['catch'](
|
|
119
|
+
case 9:
|
|
120
|
+
_context2.prev = 9;
|
|
121
|
+
_context2.t0 = _context2['catch'](2);
|
|
121
122
|
|
|
122
123
|
if (!(_context2.t0.response && _context2.t0.response.data)) {
|
|
123
|
-
_context2.next =
|
|
124
|
+
_context2.next = 14;
|
|
124
125
|
break;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
_error$response$data = _context2.t0.response.data, code = _error$response$data.code, message = _error$response$data.message;
|
|
128
129
|
throw new Error(code || message);
|
|
129
130
|
|
|
130
|
-
case
|
|
131
|
+
case 14:
|
|
131
132
|
throw _context2.t0;
|
|
132
133
|
|
|
133
|
-
case
|
|
134
|
+
case 15:
|
|
134
135
|
case 'end':
|
|
135
136
|
return _context2.stop();
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
|
-
}, _callee2, this, [[
|
|
139
|
+
}, _callee2, this, [[2, 9]]);
|
|
139
140
|
}));
|
|
140
141
|
|
|
141
142
|
function signon() {
|
|
@@ -162,7 +163,7 @@ var Como = function () {
|
|
|
162
163
|
}, {
|
|
163
164
|
key: 'init',
|
|
164
165
|
value: function () {
|
|
165
|
-
var
|
|
166
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(environment, credentials, refreshCallback) {
|
|
166
167
|
var _this = this;
|
|
167
168
|
|
|
168
169
|
var enableSignon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
@@ -241,7 +242,7 @@ var Como = function () {
|
|
|
241
242
|
}));
|
|
242
243
|
|
|
243
244
|
function init(_x, _x2, _x3) {
|
|
244
|
-
return
|
|
245
|
+
return _ref4.apply(this, arguments);
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
return init;
|
|
@@ -283,8 +284,8 @@ var Como = function () {
|
|
|
283
284
|
}, {
|
|
284
285
|
key: 'translateExternalUrl',
|
|
285
286
|
value: function () {
|
|
286
|
-
var
|
|
287
|
-
var legacyUrl, externalUrl,
|
|
287
|
+
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(url, gpsData, assetID, accessibilityData) {
|
|
288
|
+
var legacyUrl, externalUrl, _comoData3, api, locationId, token, env, membership, assets, locationData, apiObjects, dataToUse;
|
|
288
289
|
|
|
289
290
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
290
291
|
while (1) {
|
|
@@ -300,7 +301,7 @@ var Como = function () {
|
|
|
300
301
|
if (externalUrl && externalUrl.startsWith(legacyUrl)) {
|
|
301
302
|
externalUrl = externalUrl.replace(legacyUrl, this.comoData.env_params.app_modules_root);
|
|
302
303
|
}
|
|
303
|
-
|
|
304
|
+
_comoData3 = this.comoData, api = _comoData3.api, locationId = _comoData3.locationId, token = _comoData3.token, env = _comoData3.env_params, membership = _comoData3.membership, assets = _comoData3.assets;
|
|
304
305
|
locationData = this.comoData.mainResources && this.comoData.mainResources[resourceNames.LOCATION_DATA];
|
|
305
306
|
apiObjects = { api: api, servicesRoot: env.services_root };
|
|
306
307
|
dataToUse = {
|
|
@@ -317,7 +318,7 @@ var Como = function () {
|
|
|
317
318
|
}));
|
|
318
319
|
|
|
319
320
|
function translateExternalUrl(_x7, _x8, _x9, _x10) {
|
|
320
|
-
return
|
|
321
|
+
return _ref5.apply(this, arguments);
|
|
321
322
|
}
|
|
322
323
|
|
|
323
324
|
return translateExternalUrl;
|
|
@@ -325,14 +326,14 @@ var Como = function () {
|
|
|
325
326
|
}, {
|
|
326
327
|
key: 'getFeedbackFormData',
|
|
327
328
|
value: function () {
|
|
328
|
-
var
|
|
329
|
-
var
|
|
329
|
+
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
330
|
+
var _comoData4, locationId, token, env, api;
|
|
330
331
|
|
|
331
332
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
332
333
|
while (1) {
|
|
333
334
|
switch (_context5.prev = _context5.next) {
|
|
334
335
|
case 0:
|
|
335
|
-
|
|
336
|
+
_comoData4 = this.comoData, locationId = _comoData4.locationId, token = _comoData4.token, env = _comoData4.env_params, api = _comoData4.api;
|
|
336
337
|
return _context5.abrupt('return', api.getFeedbackFormData(env.zapp_root, locationId, token));
|
|
337
338
|
|
|
338
339
|
case 2:
|
|
@@ -344,7 +345,7 @@ var Como = function () {
|
|
|
344
345
|
}));
|
|
345
346
|
|
|
346
347
|
function getFeedbackFormData() {
|
|
347
|
-
return
|
|
348
|
+
return _ref6.apply(this, arguments);
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
return getFeedbackFormData;
|
|
@@ -361,7 +362,7 @@ var Como = function () {
|
|
|
361
362
|
}, {
|
|
362
363
|
key: 'register',
|
|
363
364
|
value: function () {
|
|
364
|
-
var
|
|
365
|
+
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(form, verification, reCaptchaToken, source) {
|
|
365
366
|
var api, data, _error$response$data2, code, message;
|
|
366
367
|
|
|
367
368
|
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
@@ -401,7 +402,7 @@ var Como = function () {
|
|
|
401
402
|
}));
|
|
402
403
|
|
|
403
404
|
function register(_x11, _x12, _x13, _x14) {
|
|
404
|
-
return
|
|
405
|
+
return _ref7.apply(this, arguments);
|
|
405
406
|
}
|
|
406
407
|
|
|
407
408
|
return register;
|
|
@@ -418,7 +419,7 @@ var Como = function () {
|
|
|
418
419
|
}, {
|
|
419
420
|
key: 'registerVerify',
|
|
420
421
|
value: function () {
|
|
421
|
-
var
|
|
422
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(verification, type, form, reCaptchaToken) {
|
|
422
423
|
var api, data, _error$response$data3, code, message;
|
|
423
424
|
|
|
424
425
|
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
@@ -458,7 +459,7 @@ var Como = function () {
|
|
|
458
459
|
}));
|
|
459
460
|
|
|
460
461
|
function registerVerify(_x15, _x16, _x17, _x18) {
|
|
461
|
-
return
|
|
462
|
+
return _ref8.apply(this, arguments);
|
|
462
463
|
}
|
|
463
464
|
|
|
464
465
|
return registerVerify;
|
|
@@ -474,7 +475,7 @@ var Como = function () {
|
|
|
474
475
|
}, {
|
|
475
476
|
key: 'updateProfile',
|
|
476
477
|
value: function () {
|
|
477
|
-
var
|
|
478
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(form, reCaptchaToken, source) {
|
|
478
479
|
var api, data, _error$response$data4, code, message;
|
|
479
480
|
|
|
480
481
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
@@ -514,7 +515,7 @@ var Como = function () {
|
|
|
514
515
|
}));
|
|
515
516
|
|
|
516
517
|
function updateProfile(_x19, _x20, _x21) {
|
|
517
|
-
return
|
|
518
|
+
return _ref9.apply(this, arguments);
|
|
518
519
|
}
|
|
519
520
|
|
|
520
521
|
return updateProfile;
|
|
@@ -532,7 +533,7 @@ var Como = function () {
|
|
|
532
533
|
}, {
|
|
533
534
|
key: 'updateProfileVerify',
|
|
534
535
|
value: function () {
|
|
535
|
-
var
|
|
536
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(verificationCode, type, form, reCaptchaToken, source) {
|
|
536
537
|
var api, data, _error$response$data5, code, message;
|
|
537
538
|
|
|
538
539
|
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
@@ -572,7 +573,7 @@ var Como = function () {
|
|
|
572
573
|
}));
|
|
573
574
|
|
|
574
575
|
function updateProfileVerify(_x22, _x23, _x24, _x25, _x26) {
|
|
575
|
-
return
|
|
576
|
+
return _ref10.apply(this, arguments);
|
|
576
577
|
}
|
|
577
578
|
|
|
578
579
|
return updateProfileVerify;
|
|
@@ -587,14 +588,14 @@ var Como = function () {
|
|
|
587
588
|
}, {
|
|
588
589
|
key: 'unsubscribeSms',
|
|
589
590
|
value: function () {
|
|
590
|
-
var
|
|
591
|
-
var
|
|
591
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(PhoneNumber) {
|
|
592
|
+
var _comoData5, api, locationId, identifier, data, _error$response$data6, code, message;
|
|
592
593
|
|
|
593
594
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
594
595
|
while (1) {
|
|
595
596
|
switch (_context10.prev = _context10.next) {
|
|
596
597
|
case 0:
|
|
597
|
-
|
|
598
|
+
_comoData5 = this.comoData, api = _comoData5.api, locationId = _comoData5.locationId;
|
|
598
599
|
_context10.prev = 1;
|
|
599
600
|
identifier = { PhoneNumber: PhoneNumber };
|
|
600
601
|
_context10.next = 5;
|
|
@@ -628,7 +629,7 @@ var Como = function () {
|
|
|
628
629
|
}));
|
|
629
630
|
|
|
630
631
|
function unsubscribeSms(_x27) {
|
|
631
|
-
return
|
|
632
|
+
return _ref11.apply(this, arguments);
|
|
632
633
|
}
|
|
633
634
|
|
|
634
635
|
return unsubscribeSms;
|
|
@@ -643,7 +644,7 @@ var Como = function () {
|
|
|
643
644
|
}, {
|
|
644
645
|
key: 'login',
|
|
645
646
|
value: function () {
|
|
646
|
-
var
|
|
647
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(identifier, type) {
|
|
647
648
|
var api, data, _error$response$data7, code, message;
|
|
648
649
|
|
|
649
650
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
@@ -683,7 +684,7 @@ var Como = function () {
|
|
|
683
684
|
}));
|
|
684
685
|
|
|
685
686
|
function login(_x28, _x29) {
|
|
686
|
-
return
|
|
687
|
+
return _ref12.apply(this, arguments);
|
|
687
688
|
}
|
|
688
689
|
|
|
689
690
|
return login;
|
|
@@ -699,8 +700,8 @@ var Como = function () {
|
|
|
699
700
|
}, {
|
|
700
701
|
key: 'loginVerify',
|
|
701
702
|
value: function () {
|
|
702
|
-
var
|
|
703
|
-
var api,
|
|
703
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(identifier, type, code) {
|
|
704
|
+
var api, _ref14, consent, _error$response$data8, errCode, message;
|
|
704
705
|
|
|
705
706
|
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
706
707
|
while (1) {
|
|
@@ -712,8 +713,8 @@ var Como = function () {
|
|
|
712
713
|
return api.logInVerify(code, type, identifier);
|
|
713
714
|
|
|
714
715
|
case 4:
|
|
715
|
-
|
|
716
|
-
consent =
|
|
716
|
+
_ref14 = _context12.sent;
|
|
717
|
+
consent = _ref14.consent;
|
|
717
718
|
|
|
718
719
|
this.comoData.consent = consent;
|
|
719
720
|
_context12.next = 17;
|
|
@@ -755,7 +756,7 @@ var Como = function () {
|
|
|
755
756
|
}));
|
|
756
757
|
|
|
757
758
|
function loginVerify(_x30, _x31, _x32) {
|
|
758
|
-
return
|
|
759
|
+
return _ref13.apply(this, arguments);
|
|
759
760
|
}
|
|
760
761
|
|
|
761
762
|
return loginVerify;
|
|
@@ -771,16 +772,16 @@ var Como = function () {
|
|
|
771
772
|
}, {
|
|
772
773
|
key: 'reloadMembership',
|
|
773
774
|
value: function () {
|
|
774
|
-
var
|
|
775
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13() {
|
|
775
776
|
var onlyAssetKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
776
777
|
|
|
777
|
-
var
|
|
778
|
+
var _comoData6, env, locationId, api, membership;
|
|
778
779
|
|
|
779
780
|
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
780
781
|
while (1) {
|
|
781
782
|
switch (_context13.prev = _context13.next) {
|
|
782
783
|
case 0:
|
|
783
|
-
|
|
784
|
+
_comoData6 = this.comoData, env = _comoData6.env_params, locationId = _comoData6.locationId, api = _comoData6.api;
|
|
784
785
|
_context13.next = 3;
|
|
785
786
|
return api.getUserAtLocation(env.zapp_root, locationId, onlyAssetKeys);
|
|
786
787
|
|
|
@@ -798,7 +799,7 @@ var Como = function () {
|
|
|
798
799
|
}));
|
|
799
800
|
|
|
800
801
|
function reloadMembership() {
|
|
801
|
-
return
|
|
802
|
+
return _ref15.apply(this, arguments);
|
|
802
803
|
}
|
|
803
804
|
|
|
804
805
|
return reloadMembership;
|
|
@@ -811,14 +812,14 @@ var Como = function () {
|
|
|
811
812
|
}, {
|
|
812
813
|
key: 'openApp',
|
|
813
814
|
value: function () {
|
|
814
|
-
var
|
|
815
|
-
var
|
|
815
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(data) {
|
|
816
|
+
var _comoData7, api, locationId, token, env;
|
|
816
817
|
|
|
817
818
|
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
818
819
|
while (1) {
|
|
819
820
|
switch (_context14.prev = _context14.next) {
|
|
820
821
|
case 0:
|
|
821
|
-
|
|
822
|
+
_comoData7 = this.comoData, api = _comoData7.api, locationId = _comoData7.locationId, token = _comoData7.token, env = _comoData7.env_params;
|
|
822
823
|
return _context14.abrupt('return', api.openApp(env.zapp_root, token, locationId, data));
|
|
823
824
|
|
|
824
825
|
case 2:
|
|
@@ -830,7 +831,7 @@ var Como = function () {
|
|
|
830
831
|
}));
|
|
831
832
|
|
|
832
833
|
function openApp(_x34) {
|
|
833
|
-
return
|
|
834
|
+
return _ref16.apply(this, arguments);
|
|
834
835
|
}
|
|
835
836
|
|
|
836
837
|
return openApp;
|
|
@@ -845,14 +846,14 @@ var Como = function () {
|
|
|
845
846
|
}, {
|
|
846
847
|
key: 'clientUpdateMembership',
|
|
847
848
|
value: function () {
|
|
848
|
-
var
|
|
849
|
-
var
|
|
849
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(pushEnable, locationEnable) {
|
|
850
|
+
var _comoData8, api, locationId, token, env;
|
|
850
851
|
|
|
851
852
|
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
852
853
|
while (1) {
|
|
853
854
|
switch (_context15.prev = _context15.next) {
|
|
854
855
|
case 0:
|
|
855
|
-
|
|
856
|
+
_comoData8 = this.comoData, api = _comoData8.api, locationId = _comoData8.locationId, token = _comoData8.token, env = _comoData8.env_params;
|
|
856
857
|
return _context15.abrupt('return', api.clientUpdateMembership(env.services_root, token, locationId, pushEnable, locationEnable));
|
|
857
858
|
|
|
858
859
|
case 2:
|
|
@@ -864,7 +865,7 @@ var Como = function () {
|
|
|
864
865
|
}));
|
|
865
866
|
|
|
866
867
|
function clientUpdateMembership(_x35, _x36) {
|
|
867
|
-
return
|
|
868
|
+
return _ref17.apply(this, arguments);
|
|
868
869
|
}
|
|
869
870
|
|
|
870
871
|
return clientUpdateMembership;
|
|
@@ -878,8 +879,8 @@ var Como = function () {
|
|
|
878
879
|
}, {
|
|
879
880
|
key: 'downloadMainResource',
|
|
880
881
|
value: function () {
|
|
881
|
-
var
|
|
882
|
-
var resource, err,
|
|
882
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(resourceId) {
|
|
883
|
+
var resource, err, _comoData9, env, api, responseJson;
|
|
883
884
|
|
|
884
885
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
885
886
|
while (1) {
|
|
@@ -896,7 +897,7 @@ var Como = function () {
|
|
|
896
897
|
throw new Error(err);
|
|
897
898
|
|
|
898
899
|
case 4:
|
|
899
|
-
|
|
900
|
+
_comoData9 = this.comoData, env = _comoData9.env_params, api = _comoData9.api;
|
|
900
901
|
_context16.next = 7;
|
|
901
902
|
return api.getLoyaltyResource(env.services_root_cdn, resource.id, 'Namespace' in resource ? resource.Namespace : 'location_' + this.comoData.locationId, resource.Version);
|
|
902
903
|
|
|
@@ -915,7 +916,7 @@ var Como = function () {
|
|
|
915
916
|
}));
|
|
916
917
|
|
|
917
918
|
function downloadMainResource(_x37) {
|
|
918
|
-
return
|
|
919
|
+
return _ref18.apply(this, arguments);
|
|
919
920
|
}
|
|
920
921
|
|
|
921
922
|
return downloadMainResource;
|
|
@@ -929,7 +930,7 @@ var Como = function () {
|
|
|
929
930
|
}, {
|
|
930
931
|
key: 'reloadLocationState',
|
|
931
932
|
value: function () {
|
|
932
|
-
var
|
|
933
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17() {
|
|
933
934
|
var api, state, mainResources;
|
|
934
935
|
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
|
935
936
|
while (1) {
|
|
@@ -960,7 +961,7 @@ var Como = function () {
|
|
|
960
961
|
}));
|
|
961
962
|
|
|
962
963
|
function reloadLocationState() {
|
|
963
|
-
return
|
|
964
|
+
return _ref19.apply(this, arguments);
|
|
964
965
|
}
|
|
965
966
|
|
|
966
967
|
return reloadLocationState;
|
|
@@ -973,14 +974,14 @@ var Como = function () {
|
|
|
973
974
|
}, {
|
|
974
975
|
key: 'getAppClientID',
|
|
975
976
|
value: function () {
|
|
976
|
-
var
|
|
977
|
-
var
|
|
977
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18() {
|
|
978
|
+
var _comoData10, env, locationId, api, responseJson;
|
|
978
979
|
|
|
979
980
|
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
|
980
981
|
while (1) {
|
|
981
982
|
switch (_context18.prev = _context18.next) {
|
|
982
983
|
case 0:
|
|
983
|
-
|
|
984
|
+
_comoData10 = this.comoData, env = _comoData10.env_params, locationId = _comoData10.locationId, api = _comoData10.api;
|
|
984
985
|
_context18.next = 3;
|
|
985
986
|
return api.getShortUserId(env.zapp_root, locationId);
|
|
986
987
|
|
|
@@ -997,7 +998,7 @@ var Como = function () {
|
|
|
997
998
|
}));
|
|
998
999
|
|
|
999
1000
|
function getAppClientID() {
|
|
1000
|
-
return
|
|
1001
|
+
return _ref20.apply(this, arguments);
|
|
1001
1002
|
}
|
|
1002
1003
|
|
|
1003
1004
|
return getAppClientID;
|
|
@@ -1010,14 +1011,14 @@ var Como = function () {
|
|
|
1010
1011
|
}, {
|
|
1011
1012
|
key: 'getPaymentCode',
|
|
1012
1013
|
value: function () {
|
|
1013
|
-
var
|
|
1014
|
-
var
|
|
1014
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19() {
|
|
1015
|
+
var _comoData11, env, locationId, api, responseJson;
|
|
1015
1016
|
|
|
1016
1017
|
return _regenerator2.default.wrap(function _callee19$(_context19) {
|
|
1017
1018
|
while (1) {
|
|
1018
1019
|
switch (_context19.prev = _context19.next) {
|
|
1019
1020
|
case 0:
|
|
1020
|
-
|
|
1021
|
+
_comoData11 = this.comoData, env = _comoData11.env_params, locationId = _comoData11.locationId, api = _comoData11.api;
|
|
1021
1022
|
_context19.next = 3;
|
|
1022
1023
|
return api.getPaymentCode(env.zapp_root, locationId);
|
|
1023
1024
|
|
|
@@ -1034,7 +1035,7 @@ var Como = function () {
|
|
|
1034
1035
|
}));
|
|
1035
1036
|
|
|
1036
1037
|
function getPaymentCode() {
|
|
1037
|
-
return
|
|
1038
|
+
return _ref21.apply(this, arguments);
|
|
1038
1039
|
}
|
|
1039
1040
|
|
|
1040
1041
|
return getPaymentCode;
|
|
@@ -1047,7 +1048,7 @@ var Como = function () {
|
|
|
1047
1048
|
}, {
|
|
1048
1049
|
key: 'logout',
|
|
1049
1050
|
value: function () {
|
|
1050
|
-
var
|
|
1051
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20() {
|
|
1051
1052
|
var api, response, _error$response$data9, errCode, message;
|
|
1052
1053
|
|
|
1053
1054
|
return _regenerator2.default.wrap(function _callee20$(_context20) {
|
|
@@ -1087,7 +1088,7 @@ var Como = function () {
|
|
|
1087
1088
|
}));
|
|
1088
1089
|
|
|
1089
1090
|
function logout() {
|
|
1090
|
-
return
|
|
1091
|
+
return _ref22.apply(this, arguments);
|
|
1091
1092
|
}
|
|
1092
1093
|
|
|
1093
1094
|
return logout;
|
|
@@ -1101,14 +1102,14 @@ var Como = function () {
|
|
|
1101
1102
|
}, {
|
|
1102
1103
|
key: 'redeemAsset',
|
|
1103
1104
|
value: function () {
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1105
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(assetKey) {
|
|
1106
|
+
var _comoData12, env, locationId, api, responseJson;
|
|
1106
1107
|
|
|
1107
1108
|
return _regenerator2.default.wrap(function _callee21$(_context21) {
|
|
1108
1109
|
while (1) {
|
|
1109
1110
|
switch (_context21.prev = _context21.next) {
|
|
1110
1111
|
case 0:
|
|
1111
|
-
|
|
1112
|
+
_comoData12 = this.comoData, env = _comoData12.env_params, locationId = _comoData12.locationId, api = _comoData12.api;
|
|
1112
1113
|
_context21.next = 3;
|
|
1113
1114
|
return api.redeemAsset(env.zapp_root, locationId, assetKey);
|
|
1114
1115
|
|
|
@@ -1125,7 +1126,7 @@ var Como = function () {
|
|
|
1125
1126
|
}));
|
|
1126
1127
|
|
|
1127
1128
|
function redeemAsset(_x38) {
|
|
1128
|
-
return
|
|
1129
|
+
return _ref23.apply(this, arguments);
|
|
1129
1130
|
}
|
|
1130
1131
|
|
|
1131
1132
|
return redeemAsset;
|
|
@@ -1139,14 +1140,14 @@ var Como = function () {
|
|
|
1139
1140
|
}, {
|
|
1140
1141
|
key: 'purchaseAsset',
|
|
1141
1142
|
value: function () {
|
|
1142
|
-
var
|
|
1143
|
-
var
|
|
1143
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(itemId) {
|
|
1144
|
+
var _comoData13, env, token, locationId, api, responseJson;
|
|
1144
1145
|
|
|
1145
1146
|
return _regenerator2.default.wrap(function _callee22$(_context22) {
|
|
1146
1147
|
while (1) {
|
|
1147
1148
|
switch (_context22.prev = _context22.next) {
|
|
1148
1149
|
case 0:
|
|
1149
|
-
|
|
1150
|
+
_comoData13 = this.comoData, env = _comoData13.env_params, token = _comoData13.token, locationId = _comoData13.locationId, api = _comoData13.api;
|
|
1150
1151
|
_context22.next = 3;
|
|
1151
1152
|
return api.purchaseAsset(env.zapp_root, locationId, token, itemId);
|
|
1152
1153
|
|
|
@@ -1163,7 +1164,7 @@ var Como = function () {
|
|
|
1163
1164
|
}));
|
|
1164
1165
|
|
|
1165
1166
|
function purchaseAsset(_x39) {
|
|
1166
|
-
return
|
|
1167
|
+
return _ref24.apply(this, arguments);
|
|
1167
1168
|
}
|
|
1168
1169
|
|
|
1169
1170
|
return purchaseAsset;
|
|
@@ -1171,14 +1172,14 @@ var Como = function () {
|
|
|
1171
1172
|
}, {
|
|
1172
1173
|
key: 'getUserPointShopDataAPI2',
|
|
1173
1174
|
value: function () {
|
|
1174
|
-
var
|
|
1175
|
-
var
|
|
1175
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee23() {
|
|
1176
|
+
var _comoData14, env, locationId, api, responseJson;
|
|
1176
1177
|
|
|
1177
1178
|
return _regenerator2.default.wrap(function _callee23$(_context23) {
|
|
1178
1179
|
while (1) {
|
|
1179
1180
|
switch (_context23.prev = _context23.next) {
|
|
1180
1181
|
case 0:
|
|
1181
|
-
|
|
1182
|
+
_comoData14 = this.comoData, env = _comoData14.env_params, locationId = _comoData14.locationId, api = _comoData14.api;
|
|
1182
1183
|
_context23.next = 3;
|
|
1183
1184
|
return api.getUserPointShopDataAPI2(env.zapp_root, locationId);
|
|
1184
1185
|
|
|
@@ -1195,7 +1196,7 @@ var Como = function () {
|
|
|
1195
1196
|
}));
|
|
1196
1197
|
|
|
1197
1198
|
function getUserPointShopDataAPI2() {
|
|
1198
|
-
return
|
|
1199
|
+
return _ref25.apply(this, arguments);
|
|
1199
1200
|
}
|
|
1200
1201
|
|
|
1201
1202
|
return getUserPointShopDataAPI2;
|
|
@@ -1203,14 +1204,14 @@ var Como = function () {
|
|
|
1203
1204
|
}, {
|
|
1204
1205
|
key: 'purchaseAssetAPI2',
|
|
1205
1206
|
value: function () {
|
|
1206
|
-
var
|
|
1207
|
-
var
|
|
1207
|
+
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee24(assetID) {
|
|
1208
|
+
var _comoData15, env, locationId, api, responseJson;
|
|
1208
1209
|
|
|
1209
1210
|
return _regenerator2.default.wrap(function _callee24$(_context24) {
|
|
1210
1211
|
while (1) {
|
|
1211
1212
|
switch (_context24.prev = _context24.next) {
|
|
1212
1213
|
case 0:
|
|
1213
|
-
|
|
1214
|
+
_comoData15 = this.comoData, env = _comoData15.env_params, locationId = _comoData15.locationId, api = _comoData15.api;
|
|
1214
1215
|
_context24.next = 3;
|
|
1215
1216
|
return api.purchaseAssetAPI2(env.zapp_root, locationId, assetID);
|
|
1216
1217
|
|
|
@@ -1227,7 +1228,7 @@ var Como = function () {
|
|
|
1227
1228
|
}));
|
|
1228
1229
|
|
|
1229
1230
|
function purchaseAssetAPI2(_x40) {
|
|
1230
|
-
return
|
|
1231
|
+
return _ref26.apply(this, arguments);
|
|
1231
1232
|
}
|
|
1232
1233
|
|
|
1233
1234
|
return purchaseAssetAPI2;
|
|
@@ -1241,14 +1242,14 @@ var Como = function () {
|
|
|
1241
1242
|
}, {
|
|
1242
1243
|
key: 'reloadAssets',
|
|
1243
1244
|
value: function () {
|
|
1244
|
-
var
|
|
1245
|
-
var
|
|
1245
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee25() {
|
|
1246
|
+
var _comoData16, env, locationId, api, responseJson;
|
|
1246
1247
|
|
|
1247
1248
|
return _regenerator2.default.wrap(function _callee25$(_context25) {
|
|
1248
1249
|
while (1) {
|
|
1249
1250
|
switch (_context25.prev = _context25.next) {
|
|
1250
1251
|
case 0:
|
|
1251
|
-
|
|
1252
|
+
_comoData16 = this.comoData, env = _comoData16.env_params, locationId = _comoData16.locationId, api = _comoData16.api;
|
|
1252
1253
|
_context25.next = 3;
|
|
1253
1254
|
return api.memberAssets(env.services_root, locationId);
|
|
1254
1255
|
|
|
@@ -1266,7 +1267,7 @@ var Como = function () {
|
|
|
1266
1267
|
}));
|
|
1267
1268
|
|
|
1268
1269
|
function reloadAssets() {
|
|
1269
|
-
return
|
|
1270
|
+
return _ref27.apply(this, arguments);
|
|
1270
1271
|
}
|
|
1271
1272
|
|
|
1272
1273
|
return reloadAssets;
|
|
@@ -1314,7 +1315,7 @@ var Como = function () {
|
|
|
1314
1315
|
}, {
|
|
1315
1316
|
key: 'downloadMainResources',
|
|
1316
1317
|
value: function () {
|
|
1317
|
-
var
|
|
1318
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee26() {
|
|
1318
1319
|
var resources, downloadMainResource, downloads;
|
|
1319
1320
|
return _regenerator2.default.wrap(function _callee26$(_context26) {
|
|
1320
1321
|
while (1) {
|
|
@@ -1338,7 +1339,7 @@ var Como = function () {
|
|
|
1338
1339
|
}));
|
|
1339
1340
|
|
|
1340
1341
|
function downloadMainResources() {
|
|
1341
|
-
return
|
|
1342
|
+
return _ref28.apply(this, arguments);
|
|
1342
1343
|
}
|
|
1343
1344
|
|
|
1344
1345
|
return downloadMainResources;
|
|
@@ -1352,9 +1353,9 @@ var Como = function () {
|
|
|
1352
1353
|
}, {
|
|
1353
1354
|
key: 'loadForm',
|
|
1354
1355
|
value: function loadForm(type) {
|
|
1355
|
-
var
|
|
1356
|
-
api =
|
|
1357
|
-
locationId =
|
|
1356
|
+
var _comoData17 = this.comoData,
|
|
1357
|
+
api = _comoData17.api,
|
|
1358
|
+
locationId = _comoData17.locationId;
|
|
1358
1359
|
|
|
1359
1360
|
|
|
1360
1361
|
return api.getForm(type, locationId);
|
|
@@ -1368,9 +1369,9 @@ var Como = function () {
|
|
|
1368
1369
|
}, {
|
|
1369
1370
|
key: 'getConfigration',
|
|
1370
1371
|
value: function getConfigration(type) {
|
|
1371
|
-
var
|
|
1372
|
-
api =
|
|
1373
|
-
locationId =
|
|
1372
|
+
var _comoData18 = this.comoData,
|
|
1373
|
+
api = _comoData18.api,
|
|
1374
|
+
locationId = _comoData18.locationId;
|
|
1374
1375
|
|
|
1375
1376
|
var locationState = this.getLocationState();
|
|
1376
1377
|
var version = null;
|
|
@@ -1389,9 +1390,9 @@ var Como = function () {
|
|
|
1389
1390
|
}, {
|
|
1390
1391
|
key: 'getResource',
|
|
1391
1392
|
value: function getResource(type) {
|
|
1392
|
-
var
|
|
1393
|
-
api =
|
|
1394
|
-
locationId =
|
|
1393
|
+
var _comoData19 = this.comoData,
|
|
1394
|
+
api = _comoData19.api,
|
|
1395
|
+
locationId = _comoData19.locationId;
|
|
1395
1396
|
|
|
1396
1397
|
return api.getResource(type, locationId);
|
|
1397
1398
|
}
|
|
@@ -1404,9 +1405,9 @@ var Como = function () {
|
|
|
1404
1405
|
}, {
|
|
1405
1406
|
key: 'getLegacyResources',
|
|
1406
1407
|
value: function getLegacyResources() {
|
|
1407
|
-
var
|
|
1408
|
-
api =
|
|
1409
|
-
locationId =
|
|
1408
|
+
var _comoData20 = this.comoData,
|
|
1409
|
+
api = _comoData20.api,
|
|
1410
|
+
locationId = _comoData20.locationId;
|
|
1410
1411
|
|
|
1411
1412
|
return api.getZappResource(locationId);
|
|
1412
1413
|
}
|
|
@@ -1418,11 +1419,11 @@ var Como = function () {
|
|
|
1418
1419
|
}, {
|
|
1419
1420
|
key: 'generateReferralCode',
|
|
1420
1421
|
value: function generateReferralCode() {
|
|
1421
|
-
var
|
|
1422
|
-
api =
|
|
1423
|
-
locationId =
|
|
1424
|
-
token =
|
|
1425
|
-
env =
|
|
1422
|
+
var _comoData21 = this.comoData,
|
|
1423
|
+
api = _comoData21.api,
|
|
1424
|
+
locationId = _comoData21.locationId,
|
|
1425
|
+
token = _comoData21.token,
|
|
1426
|
+
env = _comoData21.env_params;
|
|
1426
1427
|
|
|
1427
1428
|
|
|
1428
1429
|
return api.generateReferralCode(env.services_root, token, locationId);
|
|
@@ -1435,11 +1436,11 @@ var Como = function () {
|
|
|
1435
1436
|
}, {
|
|
1436
1437
|
key: 'verifyReferralCode',
|
|
1437
1438
|
value: function verifyReferralCode(code) {
|
|
1438
|
-
var
|
|
1439
|
-
api =
|
|
1440
|
-
locationId =
|
|
1441
|
-
token =
|
|
1442
|
-
env =
|
|
1439
|
+
var _comoData22 = this.comoData,
|
|
1440
|
+
api = _comoData22.api,
|
|
1441
|
+
locationId = _comoData22.locationId,
|
|
1442
|
+
token = _comoData22.token,
|
|
1443
|
+
env = _comoData22.env_params;
|
|
1443
1444
|
|
|
1444
1445
|
|
|
1445
1446
|
return api.verifyReferralCode(env.services_root, token, locationId, code);
|
|
@@ -1453,11 +1454,11 @@ var Como = function () {
|
|
|
1453
1454
|
}, {
|
|
1454
1455
|
key: 'getCredentials',
|
|
1455
1456
|
value: function getCredentials() {
|
|
1456
|
-
var
|
|
1457
|
-
accessToken =
|
|
1458
|
-
refreshToken =
|
|
1459
|
-
expiresIn =
|
|
1460
|
-
consent =
|
|
1457
|
+
var _comoData23 = this.comoData,
|
|
1458
|
+
accessToken = _comoData23.accessToken,
|
|
1459
|
+
refreshToken = _comoData23.refreshToken,
|
|
1460
|
+
expiresIn = _comoData23.expiresIn,
|
|
1461
|
+
consent = _comoData23.consent;
|
|
1461
1462
|
|
|
1462
1463
|
return {
|
|
1463
1464
|
accessToken: accessToken, refreshToken: refreshToken, expiresIn: expiresIn, consent: consent
|
|
@@ -1514,8 +1515,8 @@ var Como = function () {
|
|
|
1514
1515
|
}, {
|
|
1515
1516
|
key: 'getRegistrationUrl',
|
|
1516
1517
|
value: function () {
|
|
1517
|
-
var
|
|
1518
|
-
var
|
|
1518
|
+
var _ref29 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27(overrides) {
|
|
1519
|
+
var _comoData24, token, installationId, locationId, env;
|
|
1519
1520
|
|
|
1520
1521
|
return _regenerator2.default.wrap(function _callee27$(_context27) {
|
|
1521
1522
|
while (1) {
|
|
@@ -1525,7 +1526,7 @@ var Como = function () {
|
|
|
1525
1526
|
return this.refreshTokenIfNeeded();
|
|
1526
1527
|
|
|
1527
1528
|
case 2:
|
|
1528
|
-
|
|
1529
|
+
_comoData24 = this.comoData, token = _comoData24.token, installationId = _comoData24.installationId, locationId = _comoData24.locationId, env = _comoData24.env_params;
|
|
1529
1530
|
return _context27.abrupt('return', urlsUtils.appendQuery(env.app_modules_root + '/register?token=' + token + '&locationid=' + locationId, (0, _extends3.default)({}, this.getCredentials(), {
|
|
1530
1531
|
installationId: installationId,
|
|
1531
1532
|
disableSuccessScreen: 'true'
|
|
@@ -1540,7 +1541,7 @@ var Como = function () {
|
|
|
1540
1541
|
}));
|
|
1541
1542
|
|
|
1542
1543
|
function getRegistrationUrl(_x41) {
|
|
1543
|
-
return
|
|
1544
|
+
return _ref29.apply(this, arguments);
|
|
1544
1545
|
}
|
|
1545
1546
|
|
|
1546
1547
|
return getRegistrationUrl;
|
|
@@ -1553,8 +1554,8 @@ var Como = function () {
|
|
|
1553
1554
|
}, {
|
|
1554
1555
|
key: 'getProfileUrl',
|
|
1555
1556
|
value: function () {
|
|
1556
|
-
var
|
|
1557
|
-
var
|
|
1557
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee28(overrides) {
|
|
1558
|
+
var _comoData25, token, installationId, locationId, env;
|
|
1558
1559
|
|
|
1559
1560
|
return _regenerator2.default.wrap(function _callee28$(_context28) {
|
|
1560
1561
|
while (1) {
|
|
@@ -1564,7 +1565,7 @@ var Como = function () {
|
|
|
1564
1565
|
return this.refreshTokenIfNeeded();
|
|
1565
1566
|
|
|
1566
1567
|
case 2:
|
|
1567
|
-
|
|
1568
|
+
_comoData25 = this.comoData, token = _comoData25.token, installationId = _comoData25.installationId, locationId = _comoData25.locationId, env = _comoData25.env_params;
|
|
1568
1569
|
return _context28.abrupt('return', urlsUtils.appendQuery(env.app_modules_root + '/profile?token=' + token + '&locationid=' + locationId, (0, _extends3.default)({}, this.getCredentials(), {
|
|
1569
1570
|
installationId: installationId,
|
|
1570
1571
|
disableSuccessScreen: 'true'
|
|
@@ -1579,7 +1580,7 @@ var Como = function () {
|
|
|
1579
1580
|
}));
|
|
1580
1581
|
|
|
1581
1582
|
function getProfileUrl(_x42) {
|
|
1582
|
-
return
|
|
1583
|
+
return _ref30.apply(this, arguments);
|
|
1583
1584
|
}
|
|
1584
1585
|
|
|
1585
1586
|
return getProfileUrl;
|
|
@@ -1592,8 +1593,8 @@ var Como = function () {
|
|
|
1592
1593
|
}, {
|
|
1593
1594
|
key: 'getLoginUrl',
|
|
1594
1595
|
value: function () {
|
|
1595
|
-
var
|
|
1596
|
-
var
|
|
1596
|
+
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee29() {
|
|
1597
|
+
var _comoData26, token, locationId, env;
|
|
1597
1598
|
|
|
1598
1599
|
return _regenerator2.default.wrap(function _callee29$(_context29) {
|
|
1599
1600
|
while (1) {
|
|
@@ -1603,7 +1604,7 @@ var Como = function () {
|
|
|
1603
1604
|
return this.refreshTokenIfNeeded();
|
|
1604
1605
|
|
|
1605
1606
|
case 2:
|
|
1606
|
-
|
|
1607
|
+
_comoData26 = this.comoData, token = _comoData26.token, locationId = _comoData26.locationId, env = _comoData26.env_params;
|
|
1607
1608
|
return _context29.abrupt('return', env.app_modules_root + '/login?token=' + token + '&locationid=' + locationId);
|
|
1608
1609
|
|
|
1609
1610
|
case 4:
|
|
@@ -1615,7 +1616,7 @@ var Como = function () {
|
|
|
1615
1616
|
}));
|
|
1616
1617
|
|
|
1617
1618
|
function getLoginUrl() {
|
|
1618
|
-
return
|
|
1619
|
+
return _ref31.apply(this, arguments);
|
|
1619
1620
|
}
|
|
1620
1621
|
|
|
1621
1622
|
return getLoginUrl;
|
|
@@ -1628,7 +1629,7 @@ var Como = function () {
|
|
|
1628
1629
|
}, {
|
|
1629
1630
|
key: 'getDataPortabilityUrl',
|
|
1630
1631
|
value: function () {
|
|
1631
|
-
var
|
|
1632
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee30(url, overrides) {
|
|
1632
1633
|
var installationId;
|
|
1633
1634
|
return _regenerator2.default.wrap(function _callee30$(_context30) {
|
|
1634
1635
|
while (1) {
|
|
@@ -1652,7 +1653,7 @@ var Como = function () {
|
|
|
1652
1653
|
}));
|
|
1653
1654
|
|
|
1654
1655
|
function getDataPortabilityUrl(_x43, _x44) {
|
|
1655
|
-
return
|
|
1656
|
+
return _ref32.apply(this, arguments);
|
|
1656
1657
|
}
|
|
1657
1658
|
|
|
1658
1659
|
return getDataPortabilityUrl;
|
|
@@ -1665,7 +1666,7 @@ var Como = function () {
|
|
|
1665
1666
|
}, {
|
|
1666
1667
|
key: 'getAppModulesLegacyBaseUrl',
|
|
1667
1668
|
value: function () {
|
|
1668
|
-
var
|
|
1669
|
+
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee31() {
|
|
1669
1670
|
var env;
|
|
1670
1671
|
return _regenerator2.default.wrap(function _callee31$(_context31) {
|
|
1671
1672
|
while (1) {
|
|
@@ -1687,7 +1688,7 @@ var Como = function () {
|
|
|
1687
1688
|
}));
|
|
1688
1689
|
|
|
1689
1690
|
function getAppModulesLegacyBaseUrl() {
|
|
1690
|
-
return
|
|
1691
|
+
return _ref33.apply(this, arguments);
|
|
1691
1692
|
}
|
|
1692
1693
|
|
|
1693
1694
|
return getAppModulesLegacyBaseUrl;
|
|
@@ -1745,9 +1746,9 @@ var Como = function () {
|
|
|
1745
1746
|
}, {
|
|
1746
1747
|
key: 'getResourceUrl',
|
|
1747
1748
|
value: function getResourceUrl(resourceId, namespace, version) {
|
|
1748
|
-
var
|
|
1749
|
-
api =
|
|
1750
|
-
env =
|
|
1749
|
+
var _comoData27 = this.comoData,
|
|
1750
|
+
api = _comoData27.api,
|
|
1751
|
+
env = _comoData27.env_params;
|
|
1751
1752
|
|
|
1752
1753
|
return api.getResourceUrl(env.services_root_cdn, resourceId, namespace, version);
|
|
1753
1754
|
}
|
|
@@ -1766,25 +1767,25 @@ var Como = function () {
|
|
|
1766
1767
|
key: 'sendPushChannel',
|
|
1767
1768
|
value: function sendPushChannel(identifier) {
|
|
1768
1769
|
var isFirebaseProjectMigrated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1769
|
-
var
|
|
1770
|
-
api =
|
|
1771
|
-
locationId =
|
|
1772
|
-
token =
|
|
1773
|
-
env =
|
|
1770
|
+
var _comoData28 = this.comoData,
|
|
1771
|
+
api = _comoData28.api,
|
|
1772
|
+
locationId = _comoData28.locationId,
|
|
1773
|
+
token = _comoData28.token,
|
|
1774
|
+
env = _comoData28.env_params;
|
|
1774
1775
|
|
|
1775
1776
|
return api.sendPushChannel(env.services_root, locationId, token, identifier, isFirebaseProjectMigrated);
|
|
1776
1777
|
}
|
|
1777
1778
|
}, {
|
|
1778
1779
|
key: 'getRegionConfig',
|
|
1779
1780
|
value: function () {
|
|
1780
|
-
var
|
|
1781
|
-
var
|
|
1781
|
+
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee32() {
|
|
1782
|
+
var _comoData29, api, locationId, token, env;
|
|
1782
1783
|
|
|
1783
1784
|
return _regenerator2.default.wrap(function _callee32$(_context32) {
|
|
1784
1785
|
while (1) {
|
|
1785
1786
|
switch (_context32.prev = _context32.next) {
|
|
1786
1787
|
case 0:
|
|
1787
|
-
|
|
1788
|
+
_comoData29 = this.comoData, api = _comoData29.api, locationId = _comoData29.locationId, token = _comoData29.token, env = _comoData29.env_params;
|
|
1788
1789
|
return _context32.abrupt('return', api.getClientBusinessBackend(env.zapp_root, token, locationId));
|
|
1789
1790
|
|
|
1790
1791
|
case 2:
|
|
@@ -1796,7 +1797,7 @@ var Como = function () {
|
|
|
1796
1797
|
}));
|
|
1797
1798
|
|
|
1798
1799
|
function getRegionConfig() {
|
|
1799
|
-
return
|
|
1800
|
+
return _ref34.apply(this, arguments);
|
|
1800
1801
|
}
|
|
1801
1802
|
|
|
1802
1803
|
return getRegionConfig;
|
|
@@ -1809,25 +1810,25 @@ var Como = function () {
|
|
|
1809
1810
|
}, {
|
|
1810
1811
|
key: 'sendCouponCode',
|
|
1811
1812
|
value: function sendCouponCode(code) {
|
|
1812
|
-
var
|
|
1813
|
-
api =
|
|
1814
|
-
locationId =
|
|
1815
|
-
token =
|
|
1816
|
-
env =
|
|
1813
|
+
var _comoData30 = this.comoData,
|
|
1814
|
+
api = _comoData30.api,
|
|
1815
|
+
locationId = _comoData30.locationId,
|
|
1816
|
+
token = _comoData30.token,
|
|
1817
|
+
env = _comoData30.env_params;
|
|
1817
1818
|
|
|
1818
1819
|
return api.sendCouponCode(env.zapp_root, locationId, token, code);
|
|
1819
1820
|
}
|
|
1820
1821
|
}, {
|
|
1821
1822
|
key: 'addPaymentMethod',
|
|
1822
1823
|
value: function () {
|
|
1823
|
-
var
|
|
1824
|
-
var
|
|
1824
|
+
var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33(cardToken) {
|
|
1825
|
+
var _comoData31, api, locationId, token, env;
|
|
1825
1826
|
|
|
1826
1827
|
return _regenerator2.default.wrap(function _callee33$(_context33) {
|
|
1827
1828
|
while (1) {
|
|
1828
1829
|
switch (_context33.prev = _context33.next) {
|
|
1829
1830
|
case 0:
|
|
1830
|
-
|
|
1831
|
+
_comoData31 = this.comoData, api = _comoData31.api, locationId = _comoData31.locationId, token = _comoData31.token, env = _comoData31.env_params;
|
|
1831
1832
|
return _context33.abrupt('return', api.addPaymentMethod(env.services_root, locationId, token, cardToken));
|
|
1832
1833
|
|
|
1833
1834
|
case 2:
|
|
@@ -1839,7 +1840,7 @@ var Como = function () {
|
|
|
1839
1840
|
}));
|
|
1840
1841
|
|
|
1841
1842
|
function addPaymentMethod(_x46) {
|
|
1842
|
-
return
|
|
1843
|
+
return _ref35.apply(this, arguments);
|
|
1843
1844
|
}
|
|
1844
1845
|
|
|
1845
1846
|
return addPaymentMethod;
|
|
@@ -1847,14 +1848,14 @@ var Como = function () {
|
|
|
1847
1848
|
}, {
|
|
1848
1849
|
key: 'knowYourData',
|
|
1849
1850
|
value: function () {
|
|
1850
|
-
var
|
|
1851
|
-
var
|
|
1851
|
+
var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee34(email) {
|
|
1852
|
+
var _comoData32, api, locationId, token, env;
|
|
1852
1853
|
|
|
1853
1854
|
return _regenerator2.default.wrap(function _callee34$(_context34) {
|
|
1854
1855
|
while (1) {
|
|
1855
1856
|
switch (_context34.prev = _context34.next) {
|
|
1856
1857
|
case 0:
|
|
1857
|
-
|
|
1858
|
+
_comoData32 = this.comoData, api = _comoData32.api, locationId = _comoData32.locationId, token = _comoData32.token, env = _comoData32.env_params;
|
|
1858
1859
|
return _context34.abrupt('return', api.knowYourData(env.services_root, locationId, token, email));
|
|
1859
1860
|
|
|
1860
1861
|
case 2:
|
|
@@ -1866,7 +1867,7 @@ var Como = function () {
|
|
|
1866
1867
|
}));
|
|
1867
1868
|
|
|
1868
1869
|
function knowYourData(_x47) {
|
|
1869
|
-
return
|
|
1870
|
+
return _ref36.apply(this, arguments);
|
|
1870
1871
|
}
|
|
1871
1872
|
|
|
1872
1873
|
return knowYourData;
|
|
@@ -1874,14 +1875,14 @@ var Como = function () {
|
|
|
1874
1875
|
}, {
|
|
1875
1876
|
key: 'consentWithdraw',
|
|
1876
1877
|
value: function () {
|
|
1877
|
-
var
|
|
1878
|
-
var
|
|
1878
|
+
var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee35(consentData) {
|
|
1879
|
+
var _comoData33, api, locationId, token, env;
|
|
1879
1880
|
|
|
1880
1881
|
return _regenerator2.default.wrap(function _callee35$(_context35) {
|
|
1881
1882
|
while (1) {
|
|
1882
1883
|
switch (_context35.prev = _context35.next) {
|
|
1883
1884
|
case 0:
|
|
1884
|
-
|
|
1885
|
+
_comoData33 = this.comoData, api = _comoData33.api, locationId = _comoData33.locationId, token = _comoData33.token, env = _comoData33.env_params;
|
|
1885
1886
|
return _context35.abrupt('return', api.consentWithdraw(env.services_root, locationId, token, consentData));
|
|
1886
1887
|
|
|
1887
1888
|
case 2:
|
|
@@ -1893,7 +1894,7 @@ var Como = function () {
|
|
|
1893
1894
|
}));
|
|
1894
1895
|
|
|
1895
1896
|
function consentWithdraw(_x48) {
|
|
1896
|
-
return
|
|
1897
|
+
return _ref37.apply(this, arguments);
|
|
1897
1898
|
}
|
|
1898
1899
|
|
|
1899
1900
|
return consentWithdraw;
|
|
@@ -1901,14 +1902,14 @@ var Como = function () {
|
|
|
1901
1902
|
}, {
|
|
1902
1903
|
key: 'getPaymentMethods',
|
|
1903
1904
|
value: function () {
|
|
1904
|
-
var
|
|
1905
|
-
var
|
|
1905
|
+
var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee36() {
|
|
1906
|
+
var _comoData34, env, locationId, api, responseJson;
|
|
1906
1907
|
|
|
1907
1908
|
return _regenerator2.default.wrap(function _callee36$(_context36) {
|
|
1908
1909
|
while (1) {
|
|
1909
1910
|
switch (_context36.prev = _context36.next) {
|
|
1910
1911
|
case 0:
|
|
1911
|
-
|
|
1912
|
+
_comoData34 = this.comoData, env = _comoData34.env_params, locationId = _comoData34.locationId, api = _comoData34.api;
|
|
1912
1913
|
_context36.next = 3;
|
|
1913
1914
|
return api.getPaymentMethods(env.services_root, locationId);
|
|
1914
1915
|
|
|
@@ -1925,7 +1926,7 @@ var Como = function () {
|
|
|
1925
1926
|
}));
|
|
1926
1927
|
|
|
1927
1928
|
function getPaymentMethods() {
|
|
1928
|
-
return
|
|
1929
|
+
return _ref38.apply(this, arguments);
|
|
1929
1930
|
}
|
|
1930
1931
|
|
|
1931
1932
|
return getPaymentMethods;
|
|
@@ -1942,14 +1943,14 @@ var Como = function () {
|
|
|
1942
1943
|
}, {
|
|
1943
1944
|
key: 'payInApp',
|
|
1944
1945
|
value: function () {
|
|
1945
|
-
var
|
|
1946
|
-
var
|
|
1946
|
+
var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee37(amount, creditCardToken, itemName, itemNumber, membershipKey) {
|
|
1947
|
+
var _comoData35, env, token, locationId, api, responseJson;
|
|
1947
1948
|
|
|
1948
1949
|
return _regenerator2.default.wrap(function _callee37$(_context37) {
|
|
1949
1950
|
while (1) {
|
|
1950
1951
|
switch (_context37.prev = _context37.next) {
|
|
1951
1952
|
case 0:
|
|
1952
|
-
|
|
1953
|
+
_comoData35 = this.comoData, env = _comoData35.env_params, token = _comoData35.token, locationId = _comoData35.locationId, api = _comoData35.api;
|
|
1953
1954
|
_context37.next = 3;
|
|
1954
1955
|
return api.payInApp(env.services_root, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey);
|
|
1955
1956
|
|
|
@@ -1966,7 +1967,7 @@ var Como = function () {
|
|
|
1966
1967
|
}));
|
|
1967
1968
|
|
|
1968
1969
|
function payInApp(_x49, _x50, _x51, _x52, _x53) {
|
|
1969
|
-
return
|
|
1970
|
+
return _ref39.apply(this, arguments);
|
|
1970
1971
|
}
|
|
1971
1972
|
|
|
1972
1973
|
return payInApp;
|
|
@@ -1979,14 +1980,14 @@ var Como = function () {
|
|
|
1979
1980
|
}, {
|
|
1980
1981
|
key: 'deletePayment',
|
|
1981
1982
|
value: function () {
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1983
|
+
var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee38(creditCardToken) {
|
|
1984
|
+
var _comoData36, env, token, locationId, api, responseJson;
|
|
1984
1985
|
|
|
1985
1986
|
return _regenerator2.default.wrap(function _callee38$(_context38) {
|
|
1986
1987
|
while (1) {
|
|
1987
1988
|
switch (_context38.prev = _context38.next) {
|
|
1988
1989
|
case 0:
|
|
1989
|
-
|
|
1990
|
+
_comoData36 = this.comoData, env = _comoData36.env_params, token = _comoData36.token, locationId = _comoData36.locationId, api = _comoData36.api;
|
|
1990
1991
|
_context38.next = 3;
|
|
1991
1992
|
return api.deletePayment(env.services_root, locationId, token, creditCardToken);
|
|
1992
1993
|
|
|
@@ -2003,7 +2004,7 @@ var Como = function () {
|
|
|
2003
2004
|
}));
|
|
2004
2005
|
|
|
2005
2006
|
function deletePayment(_x54) {
|
|
2006
|
-
return
|
|
2007
|
+
return _ref40.apply(this, arguments);
|
|
2007
2008
|
}
|
|
2008
2009
|
|
|
2009
2010
|
return deletePayment;
|
|
@@ -2015,10 +2016,10 @@ var Como = function () {
|
|
|
2015
2016
|
}, {
|
|
2016
2017
|
key: 'getMemberMessages',
|
|
2017
2018
|
value: function getMemberMessages(tag, limit, offset) {
|
|
2018
|
-
var
|
|
2019
|
-
api =
|
|
2020
|
-
locationId =
|
|
2021
|
-
env =
|
|
2019
|
+
var _comoData37 = this.comoData,
|
|
2020
|
+
api = _comoData37.api,
|
|
2021
|
+
locationId = _comoData37.locationId,
|
|
2022
|
+
env = _comoData37.env_params;
|
|
2022
2023
|
|
|
2023
2024
|
return api.getMemberMessages(env.services_root, locationId, tag, limit, offset);
|
|
2024
2025
|
}
|
|
@@ -2030,10 +2031,10 @@ var Como = function () {
|
|
|
2030
2031
|
}, {
|
|
2031
2032
|
key: 'markAsReadMemberMessages',
|
|
2032
2033
|
value: function markAsReadMemberMessages(keysList) {
|
|
2033
|
-
var
|
|
2034
|
-
api =
|
|
2035
|
-
locationId =
|
|
2036
|
-
env =
|
|
2034
|
+
var _comoData38 = this.comoData,
|
|
2035
|
+
api = _comoData38.api,
|
|
2036
|
+
locationId = _comoData38.locationId,
|
|
2037
|
+
env = _comoData38.env_params;
|
|
2037
2038
|
|
|
2038
2039
|
return api.markAsReadMemberMessages(env.services_root, locationId, keysList);
|
|
2039
2040
|
}
|
|
@@ -2048,14 +2049,14 @@ var Como = function () {
|
|
|
2048
2049
|
}, {
|
|
2049
2050
|
key: 'budgetTransfer',
|
|
2050
2051
|
value: function () {
|
|
2051
|
-
var
|
|
2052
|
-
var
|
|
2052
|
+
var _ref41 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee39(receiver, sender, amount, wallet) {
|
|
2053
|
+
var _comoData39, api, locationId, env;
|
|
2053
2054
|
|
|
2054
2055
|
return _regenerator2.default.wrap(function _callee39$(_context39) {
|
|
2055
2056
|
while (1) {
|
|
2056
2057
|
switch (_context39.prev = _context39.next) {
|
|
2057
2058
|
case 0:
|
|
2058
|
-
|
|
2059
|
+
_comoData39 = this.comoData, api = _comoData39.api, locationId = _comoData39.locationId, env = _comoData39.env_params;
|
|
2059
2060
|
return _context39.abrupt('return', api.budgetTransfer(env.services_root, locationId, receiver, sender, amount, wallet));
|
|
2060
2061
|
|
|
2061
2062
|
case 2:
|
|
@@ -2067,7 +2068,7 @@ var Como = function () {
|
|
|
2067
2068
|
}));
|
|
2068
2069
|
|
|
2069
2070
|
function budgetTransfer(_x55, _x56, _x57, _x58) {
|
|
2070
|
-
return
|
|
2071
|
+
return _ref41.apply(this, arguments);
|
|
2071
2072
|
}
|
|
2072
2073
|
|
|
2073
2074
|
return budgetTransfer;
|
|
@@ -2080,9 +2081,9 @@ var Como = function () {
|
|
|
2080
2081
|
}, {
|
|
2081
2082
|
key: 'getCreditClaimData',
|
|
2082
2083
|
value: function getCreditClaimData(claimId) {
|
|
2083
|
-
var
|
|
2084
|
-
api =
|
|
2085
|
-
env =
|
|
2084
|
+
var _comoData40 = this.comoData,
|
|
2085
|
+
api = _comoData40.api,
|
|
2086
|
+
env = _comoData40.env_params;
|
|
2086
2087
|
|
|
2087
2088
|
return api.getCreditClaimData(env.services_root, claimId);
|
|
2088
2089
|
}
|
|
@@ -2094,14 +2095,14 @@ var Como = function () {
|
|
|
2094
2095
|
}, {
|
|
2095
2096
|
key: 'budgetTransferClaim',
|
|
2096
2097
|
value: function () {
|
|
2097
|
-
var
|
|
2098
|
-
var
|
|
2098
|
+
var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee40(claimCode) {
|
|
2099
|
+
var _comoData41, api, locationId, env;
|
|
2099
2100
|
|
|
2100
2101
|
return _regenerator2.default.wrap(function _callee40$(_context40) {
|
|
2101
2102
|
while (1) {
|
|
2102
2103
|
switch (_context40.prev = _context40.next) {
|
|
2103
2104
|
case 0:
|
|
2104
|
-
|
|
2105
|
+
_comoData41 = this.comoData, api = _comoData41.api, locationId = _comoData41.locationId, env = _comoData41.env_params;
|
|
2105
2106
|
return _context40.abrupt('return', api.budgetTransferClaim(env.services_root, locationId, claimCode));
|
|
2106
2107
|
|
|
2107
2108
|
case 2:
|
|
@@ -2113,7 +2114,7 @@ var Como = function () {
|
|
|
2113
2114
|
}));
|
|
2114
2115
|
|
|
2115
2116
|
function budgetTransferClaim(_x59) {
|
|
2116
|
-
return
|
|
2117
|
+
return _ref42.apply(this, arguments);
|
|
2117
2118
|
}
|
|
2118
2119
|
|
|
2119
2120
|
return budgetTransferClaim;
|
|
@@ -2129,11 +2130,11 @@ var Como = function () {
|
|
|
2129
2130
|
}, {
|
|
2130
2131
|
key: 'claim',
|
|
2131
2132
|
value: function claim(assetKey, itemId, tag) {
|
|
2132
|
-
var
|
|
2133
|
-
env =
|
|
2134
|
-
locationId =
|
|
2135
|
-
api =
|
|
2136
|
-
token =
|
|
2133
|
+
var _comoData42 = this.comoData,
|
|
2134
|
+
env = _comoData42.env_params,
|
|
2135
|
+
locationId = _comoData42.locationId,
|
|
2136
|
+
api = _comoData42.api,
|
|
2137
|
+
token = _comoData42.token;
|
|
2137
2138
|
|
|
2138
2139
|
return api.claim(env.zapp_root, locationId, token, assetKey, itemId, tag);
|
|
2139
2140
|
}
|
|
@@ -2147,14 +2148,14 @@ var Como = function () {
|
|
|
2147
2148
|
}, {
|
|
2148
2149
|
key: 'logUserAction',
|
|
2149
2150
|
value: function () {
|
|
2150
|
-
var
|
|
2151
|
-
var
|
|
2151
|
+
var _ref43 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee41(action, logData) {
|
|
2152
|
+
var _comoData43, env, locationId, api, token;
|
|
2152
2153
|
|
|
2153
2154
|
return _regenerator2.default.wrap(function _callee41$(_context41) {
|
|
2154
2155
|
while (1) {
|
|
2155
2156
|
switch (_context41.prev = _context41.next) {
|
|
2156
2157
|
case 0:
|
|
2157
|
-
|
|
2158
|
+
_comoData43 = this.comoData, env = _comoData43.env_params, locationId = _comoData43.locationId, api = _comoData43.api, token = _comoData43.token;
|
|
2158
2159
|
return _context41.abrupt('return', api.logUserAction(env.zapp_root, locationId, token, action, logData));
|
|
2159
2160
|
|
|
2160
2161
|
case 2:
|
|
@@ -2166,7 +2167,7 @@ var Como = function () {
|
|
|
2166
2167
|
}));
|
|
2167
2168
|
|
|
2168
2169
|
function logUserAction(_x60, _x61) {
|
|
2169
|
-
return
|
|
2170
|
+
return _ref43.apply(this, arguments);
|
|
2170
2171
|
}
|
|
2171
2172
|
|
|
2172
2173
|
return logUserAction;
|
|
@@ -2181,14 +2182,14 @@ var Como = function () {
|
|
|
2181
2182
|
}, {
|
|
2182
2183
|
key: 'getPurchaseHistory',
|
|
2183
2184
|
value: function () {
|
|
2184
|
-
var
|
|
2185
|
-
var
|
|
2185
|
+
var _ref44 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee42(limit, offset) {
|
|
2186
|
+
var _comoData44, locationId, api, membership;
|
|
2186
2187
|
|
|
2187
2188
|
return _regenerator2.default.wrap(function _callee42$(_context42) {
|
|
2188
2189
|
while (1) {
|
|
2189
2190
|
switch (_context42.prev = _context42.next) {
|
|
2190
2191
|
case 0:
|
|
2191
|
-
|
|
2192
|
+
_comoData44 = this.comoData, locationId = _comoData44.locationId, api = _comoData44.api, membership = _comoData44.membership;
|
|
2192
2193
|
return _context42.abrupt('return', api.getPurchaseHistory(locationId, membership.Key, limit, offset));
|
|
2193
2194
|
|
|
2194
2195
|
case 2:
|
|
@@ -2200,7 +2201,7 @@ var Como = function () {
|
|
|
2200
2201
|
}));
|
|
2201
2202
|
|
|
2202
2203
|
function getPurchaseHistory(_x62, _x63) {
|
|
2203
|
-
return
|
|
2204
|
+
return _ref44.apply(this, arguments);
|
|
2204
2205
|
}
|
|
2205
2206
|
|
|
2206
2207
|
return getPurchaseHistory;
|