ouisys-engine 2.1.22 → 2.1.27

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.
Files changed (34) hide show
  1. package/dist/api/index.d.ts +0 -2
  2. package/dist/api/index.js +88 -164
  3. package/dist/common-types/AppThunk.d.ts +1 -2
  4. package/dist/flows/strategy.d.ts +1 -2
  5. package/dist/flows/strategy.js +1 -5
  6. package/dist/reducers/moRedirFlow/utils.js +1 -1
  7. package/dist/reducers/oneClickFlow/index.d.ts +5 -1
  8. package/dist/reducers/oneClickFlow/index.js +10 -5
  9. package/dist/reducers/oneClickFlow/utils.js +47 -19
  10. package/dist/reducers/pinFlow/utils.js +7 -12
  11. package/dist/reducers/strategy/utils.js +1 -1
  12. package/dist/store/index.d.ts +1 -2
  13. package/dist/store/reducers.d.ts +0 -2
  14. package/dist/store/reducers.js +1 -4
  15. package/dist/utilities/loadScriptInnerHtml.d.ts +2 -0
  16. package/dist/utilities/loadScriptInnerHtml.js +18 -0
  17. package/package.json +1 -1
  18. package/src/api/index.ts +4 -37
  19. package/src/common-types/AppThunk.ts +1 -2
  20. package/src/flows/strategy.ts +1 -5
  21. package/src/reducers/moRedirFlow/utils.ts +1 -1
  22. package/src/reducers/oneClickFlow/index.ts +1 -1
  23. package/src/reducers/oneClickFlow/utils.ts +77 -11
  24. package/src/reducers/pinFlow/utils.ts +2 -9
  25. package/src/reducers/strategy/utils.ts +1 -1
  26. package/src/store/index.ts +1 -2
  27. package/src/store/reducers.ts +1 -5
  28. package/src/utilities/loadScriptInnerHtml.ts +10 -0
  29. package/yarn.lock +5204 -0
  30. package/src/flows/tpayHeFlow.ts +0 -20
  31. package/src/reducers/tpayHeFlow/ITpayHeConstants.ts +0 -7
  32. package/src/reducers/tpayHeFlow/TpayHeTypes.ts +0 -135
  33. package/src/reducers/tpayHeFlow/index.ts +0 -207
  34. package/src/reducers/tpayHeFlow/utils.ts +0 -311
@@ -3,7 +3,6 @@ import { IMSISDNSubmissionResult as IMoRedirMSISDNSubmissionResult } from "../re
3
3
  import { IMSISDNSubmissionResult as IMoMSISDNSubmissionResult } from "../reducers/moFlow/MoTypes";
4
4
  import { IIdentifyResult } from "../reducers/strategy/StrategyTypes";
5
5
  import { IFetchResult } from "../reducers/click2smsFlow/Click2smsTypes";
6
- import { ITpayConsentResult } from "../reducers/TpayHeFlow/TpayHeTypes";
7
6
  export interface ITallyman {
8
7
  identify: (host: string, slug: string, country: string, msisdn: string, device: string, offer: number, rockmanId: string) => Promise<IIdentifyResult>;
9
8
  triggerPin: (host: string, country: string, slug: string, device: string, offer: number, msisdn: string, rockmanId: string, extraParamsQs: string, search: string, uniqid?: string) => Promise<IMSISDNSubmissionResult>;
@@ -14,7 +13,6 @@ export interface ITallyman {
14
13
  redirect: (host: string, slug: string, country: string, msisdn: string, device: string, offer: number, rockmanId: string, ip_range_name: string, search: string, extraParamsQs: string) => Promise<IMoRedirMSISDNSubmissionResult>;
15
14
  ussd: (host: string, slug: string, country: string, msisdn: string, device: string, offer: number, rockmanId: string, search: string, extraParamsQs: string) => Promise<IMoMSISDNSubmissionResult>;
16
15
  oc2sms: (host: string, country: string, slug: string, offer: number, rockmanId: string, keyword: string, operator: string, search: string) => Promise<IFetchResult>;
17
- tpayConsentConfig: (host: string, country: string, slug: string, device: string, offer: number, rockmanId: string, search: string) => Promise<ITpayConsentResult>;
18
16
  mcpShield: (host: string, country: string, slug: string, device: string, offer: number, rockmanId: string, operator?: string, uniqid?: string) => Promise<IMcpShieldResult>;
19
17
  }
20
18
  export declare const MockTallyman: ITallyman;
package/dist/api/index.js CHANGED
@@ -101,7 +101,7 @@ var MockTallyman = {
101
101
  return _context3.abrupt("return", {
102
102
  success: true,
103
103
  rockman_id: "000",
104
- product_url: "https://www.yahoo.com/",
104
+ product_url: "/mock-product-url",
105
105
  async: false
106
106
  });
107
107
 
@@ -130,7 +130,7 @@ var MockTallyman = {
130
130
  return _context4.abrupt("return", {
131
131
  success: true,
132
132
  rockman_id: "000",
133
- product_url: "https://www.yahoo.com/",
133
+ product_url: "/mock-product-url",
134
134
  msisdn: "000"
135
135
  });
136
136
 
@@ -159,7 +159,7 @@ var MockTallyman = {
159
159
  return _context5.abrupt("return", {
160
160
  success: true,
161
161
  rockman_id: "000",
162
- product_url: "https://www.yahoo.com/",
162
+ product_url: "/mock-product-url",
163
163
  msisdn: "000"
164
164
  });
165
165
 
@@ -188,7 +188,7 @@ var MockTallyman = {
188
188
  return _context6.abrupt("return", {
189
189
  success: true,
190
190
  rockman_id: "000",
191
- redirect_url: "https://www.yahoo.com/"
191
+ redirect_url: "/mock-product-url"
192
192
  });
193
193
 
194
194
  case 3:
@@ -293,8 +293,8 @@ var MockTallyman = {
293
293
 
294
294
  return oc2sms;
295
295
  }(),
296
- tpayConsentConfig: function () {
297
- var _tpayConsentConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(host, country, slug, device, offer, rockmanId, search) {
296
+ mcpShield: function () {
297
+ var _mcpShield = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(host, country, slug, device, offer, rockmanId, operator) {
298
298
  return regeneratorRuntime.wrap(function _callee10$(_context10) {
299
299
  while (1) {
300
300
  switch (_context10.prev = _context10.next) {
@@ -302,25 +302,10 @@ var MockTallyman = {
302
302
  console.log("MockTallyman");
303
303
  sleep(2000);
304
304
  return _context10.abrupt("return", {
305
- "prodSku": "gamelords",
306
- "lang": "ar",
307
- "country": "eg",
308
- "subscription_url": "http:\/\/de.tallymans.com\/tallyman\/v1\/?action=one-click-subscribe&device=smart&slug=tpay-he-vidflixz&country=eg&offerId=1&rockman_id=13643b4780fb40bb8adf2feb2a400d7f&",
309
- "config": {
310
- "product_url": "http:\/\/de.tallymans.com\/#\/?uid=fdf098fcc6",
311
- "subscription_plan_id": 829,
312
- "public": "HFyenUyCJCxl1QTgtVCA",
313
- "private": "vazlmVhGFyxKLOav6DvW",
314
- "flow": "consent",
315
- "catalog_name": {
316
- "60201": "gamelords_org",
317
- "60202": "gamelords_vdf",
318
- "60203": "gamelords_etst"
319
- }
320
- },
321
- "redirectUrl": "http:\/\/de.tallymans.com\/eg\/animal-game?country=eg&handle=animal-game&offer=1&device=smart&_extracted=957ad26679cd47a09d4efe28d4a4af72&operator=#operator#&msisdnSubmitted=Y&network_type=mobile_data&atmobirun=true&force_mcb_page=true&skipTrigger=true",
322
- "rid": "957ad26679cd47a09d4efe28d4a4af72",
323
- "success": true
305
+ "source": "**********some very long text**********",
306
+ "uniqid": "a26e7c3983a9cebd469601d695c7dbc4",
307
+ "success": true,
308
+ "rockman_id": "d66ac1a3ee6d40c289c23322ecd9aa79"
324
309
  });
325
310
 
326
311
  case 3:
@@ -331,28 +316,34 @@ var MockTallyman = {
331
316
  }, _callee10);
332
317
  }));
333
318
 
334
- function tpayConsentConfig(_x74, _x75, _x76, _x77, _x78, _x79, _x80) {
335
- return _tpayConsentConfig.apply(this, arguments);
319
+ function mcpShield(_x74, _x75, _x76, _x77, _x78, _x79, _x80) {
320
+ return _mcpShield.apply(this, arguments);
336
321
  }
337
322
 
338
- return tpayConsentConfig;
339
- }(),
340
- mcpShield: function () {
341
- var _mcpShield = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(host, country, slug, device, offer, rockmanId, operator) {
323
+ return mcpShield;
324
+ }()
325
+ };
326
+ exports.MockTallyman = MockTallyman;
327
+ var RealTallyman = {
328
+ identify: function () {
329
+ var _identify2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(host, slug, country, msisdn, device, offer, rockmanId) {
330
+ var isDMB, newHost;
342
331
  return regeneratorRuntime.wrap(function _callee11$(_context11) {
343
332
  while (1) {
344
333
  switch (_context11.prev = _context11.next) {
345
334
  case 0:
346
- console.log("MockTallyman");
347
- sleep(2000);
348
- return _context11.abrupt("return", {
349
- "source": "**********some very long text**********",
350
- "uniqid": "a26e7c3983a9cebd469601d695c7dbc4",
351
- "success": true,
352
- "rockman_id": "d66ac1a3ee6d40c289c23322ecd9aa79"
335
+ console.log("RealTallyman");
336
+ isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
337
+ newHost = isDMB ? "de.tallymans.com" : host;
338
+ _context11.next = 5;
339
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=identify&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
340
+ return x.json();
353
341
  });
354
342
 
355
- case 3:
343
+ case 5:
344
+ return _context11.abrupt("return", _context11.sent);
345
+
346
+ case 6:
356
347
  case "end":
357
348
  return _context11.stop();
358
349
  }
@@ -360,17 +351,14 @@ var MockTallyman = {
360
351
  }, _callee11);
361
352
  }));
362
353
 
363
- function mcpShield(_x81, _x82, _x83, _x84, _x85, _x86, _x87) {
364
- return _mcpShield.apply(this, arguments);
354
+ function identify(_x81, _x82, _x83, _x84, _x85, _x86, _x87) {
355
+ return _identify2.apply(this, arguments);
365
356
  }
366
357
 
367
- return mcpShield;
368
- }()
369
- };
370
- exports.MockTallyman = MockTallyman;
371
- var RealTallyman = {
372
- identify: function () {
373
- var _identify2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(host, slug, country, msisdn, device, offer, rockmanId) {
358
+ return identify;
359
+ }(),
360
+ triggerPin: function () {
361
+ var _triggerPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid) {
374
362
  var isDMB, newHost;
375
363
  return regeneratorRuntime.wrap(function _callee12$(_context12) {
376
364
  while (1) {
@@ -380,7 +368,7 @@ var RealTallyman = {
380
368
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
381
369
  newHost = isDMB ? "de.tallymans.com" : host;
382
370
  _context12.next = 5;
383
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=identify&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
371
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&msisdn=").concat(msisdn, "&rockman_id=").concat(rockmanId).concat(uniqid).concat(extraParamsQs, "&").concat(search)).then(function (x) {
384
372
  return x.json();
385
373
  });
386
374
 
@@ -395,14 +383,14 @@ var RealTallyman = {
395
383
  }, _callee12);
396
384
  }));
397
385
 
398
- function identify(_x88, _x89, _x90, _x91, _x92, _x93, _x94) {
399
- return _identify2.apply(this, arguments);
386
+ function triggerPin(_x88, _x89, _x90, _x91, _x92, _x93, _x94, _x95, _x96, _x97) {
387
+ return _triggerPin2.apply(this, arguments);
400
388
  }
401
389
 
402
- return identify;
390
+ return triggerPin;
403
391
  }(),
404
- triggerPin: function () {
405
- var _triggerPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid) {
392
+ verifyPin: function () {
393
+ var _verifyPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(host, country, slug, device, offer, rockmanId, pin, extraParamsQs, uniqid, evinaTid) {
406
394
  var isDMB, newHost;
407
395
  return regeneratorRuntime.wrap(function _callee13$(_context13) {
408
396
  while (1) {
@@ -412,7 +400,7 @@ var RealTallyman = {
412
400
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
413
401
  newHost = isDMB ? "de.tallymans.com" : host;
414
402
  _context13.next = 5;
415
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&msisdn=").concat(msisdn, "&rockman_id=").concat(rockmanId).concat(uniqid).concat(extraParamsQs, "&").concat(search)).then(function (x) {
403
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=verify-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&pin=").concat(pin).concat(uniqid, "&sam_evina_tid=").concat(evinaTid).concat(extraParamsQs)).then(function (x) {
416
404
  return x.json();
417
405
  });
418
406
 
@@ -427,14 +415,14 @@ var RealTallyman = {
427
415
  }, _callee13);
428
416
  }));
429
417
 
430
- function triggerPin(_x95, _x96, _x97, _x98, _x99, _x100, _x101, _x102, _x103, _x104) {
431
- return _triggerPin2.apply(this, arguments);
418
+ function verifyPin(_x98, _x99, _x100, _x101, _x102, _x103, _x104, _x105, _x106, _x107) {
419
+ return _verifyPin2.apply(this, arguments);
432
420
  }
433
421
 
434
- return triggerPin;
422
+ return verifyPin;
435
423
  }(),
436
- verifyPin: function () {
437
- var _verifyPin2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(host, country, slug, device, offer, rockmanId, pin, extraParamsQs, uniqid, evinaTid) {
424
+ checkSubscription: function () {
425
+ var _checkSubscription2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(host, country, slug, device, offer, rockmanId, pin, extraParamsQs) {
438
426
  var isDMB, newHost;
439
427
  return regeneratorRuntime.wrap(function _callee14$(_context14) {
440
428
  while (1) {
@@ -444,7 +432,7 @@ var RealTallyman = {
444
432
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
445
433
  newHost = isDMB ? "de.tallymans.com" : host;
446
434
  _context14.next = 5;
447
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=verify-pin&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&pin=").concat(pin).concat(uniqid, "&sam_evina_tid=").concat(evinaTid).concat(extraParamsQs)).then(function (x) {
435
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
448
436
  return x.json();
449
437
  });
450
438
 
@@ -459,14 +447,14 @@ var RealTallyman = {
459
447
  }, _callee14);
460
448
  }));
461
449
 
462
- function verifyPin(_x105, _x106, _x107, _x108, _x109, _x110, _x111, _x112, _x113, _x114) {
463
- return _verifyPin2.apply(this, arguments);
450
+ function checkSubscription(_x108, _x109, _x110, _x111, _x112, _x113, _x114, _x115) {
451
+ return _checkSubscription2.apply(this, arguments);
464
452
  }
465
453
 
466
- return verifyPin;
454
+ return checkSubscription;
467
455
  }(),
468
- checkSubscription: function () {
469
- var _checkSubscription2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(host, country, slug, device, offer, rockmanId, pin, extraParamsQs) {
456
+ checkSubscriptionByRockmanIdOnly: function () {
457
+ var _checkSubscriptionByRockmanIdOnly2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(host, rockmanId) {
470
458
  var isDMB, newHost;
471
459
  return regeneratorRuntime.wrap(function _callee15$(_context15) {
472
460
  while (1) {
@@ -476,7 +464,7 @@ var RealTallyman = {
476
464
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
477
465
  newHost = isDMB ? "de.tallymans.com" : host;
478
466
  _context15.next = 5;
479
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&country=").concat(bupperizeCountry(country), "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId)).then(function (x) {
467
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&rockman_id=").concat(rockmanId)).then(function (x) {
480
468
  return x.json();
481
469
  });
482
470
 
@@ -491,14 +479,14 @@ var RealTallyman = {
491
479
  }, _callee15);
492
480
  }));
493
481
 
494
- function checkSubscription(_x115, _x116, _x117, _x118, _x119, _x120, _x121, _x122) {
495
- return _checkSubscription2.apply(this, arguments);
482
+ function checkSubscriptionByRockmanIdOnly(_x116, _x117) {
483
+ return _checkSubscriptionByRockmanIdOnly2.apply(this, arguments);
496
484
  }
497
485
 
498
- return checkSubscription;
486
+ return checkSubscriptionByRockmanIdOnly;
499
487
  }(),
500
- checkSubscriptionByRockmanIdOnly: function () {
501
- var _checkSubscriptionByRockmanIdOnly2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(host, rockmanId) {
488
+ redirect: function () {
489
+ var _redirect2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(host, slug, country, msisdn, device, offer, rockmanId, ip_range_name, search, extraParamsQs) {
502
490
  var isDMB, newHost;
503
491
  return regeneratorRuntime.wrap(function _callee16$(_context16) {
504
492
  while (1) {
@@ -508,7 +496,7 @@ var RealTallyman = {
508
496
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
509
497
  newHost = isDMB ? "de.tallymans.com" : host;
510
498
  _context16.next = 5;
511
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=check-subscription&rockman_id=").concat(rockmanId)).then(function (x) {
499
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=redirect&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&network_type=").concat(!ip_range_name ? "wifi" : "", "&").concat(search).concat(extraParamsQs)).then(function (x) {
512
500
  return x.json();
513
501
  });
514
502
 
@@ -523,14 +511,14 @@ var RealTallyman = {
523
511
  }, _callee16);
524
512
  }));
525
513
 
526
- function checkSubscriptionByRockmanIdOnly(_x123, _x124) {
527
- return _checkSubscriptionByRockmanIdOnly2.apply(this, arguments);
514
+ function redirect(_x118, _x119, _x120, _x121, _x122, _x123, _x124, _x125, _x126, _x127) {
515
+ return _redirect2.apply(this, arguments);
528
516
  }
529
517
 
530
- return checkSubscriptionByRockmanIdOnly;
518
+ return redirect;
531
519
  }(),
532
- redirect: function () {
533
- var _redirect2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(host, slug, country, msisdn, device, offer, rockmanId, ip_range_name, search, extraParamsQs) {
520
+ triggerMessage: function () {
521
+ var _triggerMessage2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
534
522
  var isDMB, newHost;
535
523
  return regeneratorRuntime.wrap(function _callee17$(_context17) {
536
524
  while (1) {
@@ -540,7 +528,7 @@ var RealTallyman = {
540
528
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
541
529
  newHost = isDMB ? "de.tallymans.com" : host;
542
530
  _context17.next = 5;
543
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=redirect&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&network_type=").concat(!ip_range_name ? "wifi" : "", "&").concat(search).concat(extraParamsQs)).then(function (x) {
531
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-message&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
544
532
  return x.json();
545
533
  });
546
534
 
@@ -555,14 +543,14 @@ var RealTallyman = {
555
543
  }, _callee17);
556
544
  }));
557
545
 
558
- function redirect(_x125, _x126, _x127, _x128, _x129, _x130, _x131, _x132, _x133, _x134) {
559
- return _redirect2.apply(this, arguments);
546
+ function triggerMessage(_x128, _x129, _x130, _x131, _x132, _x133, _x134, _x135, _x136) {
547
+ return _triggerMessage2.apply(this, arguments);
560
548
  }
561
549
 
562
- return redirect;
550
+ return triggerMessage;
563
551
  }(),
564
- triggerMessage: function () {
565
- var _triggerMessage2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
552
+ ussd: function () {
553
+ var _ussd2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
566
554
  var isDMB, newHost;
567
555
  return regeneratorRuntime.wrap(function _callee18$(_context18) {
568
556
  while (1) {
@@ -572,7 +560,7 @@ var RealTallyman = {
572
560
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
573
561
  newHost = isDMB ? "de.tallymans.com" : host;
574
562
  _context18.next = 5;
575
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=trigger-message&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
563
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=ussd&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
576
564
  return x.json();
577
565
  });
578
566
 
@@ -587,14 +575,14 @@ var RealTallyman = {
587
575
  }, _callee18);
588
576
  }));
589
577
 
590
- function triggerMessage(_x135, _x136, _x137, _x138, _x139, _x140, _x141, _x142, _x143) {
591
- return _triggerMessage2.apply(this, arguments);
578
+ function ussd(_x137, _x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145) {
579
+ return _ussd2.apply(this, arguments);
592
580
  }
593
581
 
594
- return triggerMessage;
582
+ return ussd;
595
583
  }(),
596
- ussd: function () {
597
- var _ussd2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(host, slug, country, msisdn, device, offer, rockmanId, search, extraParamsQs) {
584
+ oc2sms: function () {
585
+ var _oc2sms2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(host, country, slug, offer, rockmanId, keyword, operator, search) {
598
586
  var isDMB, newHost;
599
587
  return regeneratorRuntime.wrap(function _callee19$(_context19) {
600
588
  while (1) {
@@ -604,7 +592,7 @@ var RealTallyman = {
604
592
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
605
593
  newHost = isDMB ? "de.tallymans.com" : host;
606
594
  _context19.next = 5;
607
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=ussd&slug=").concat(slug, "&country=").concat(country, "&msisdn=").concat(msisdn, "&device=").concat(device, "&offerId=").concat(offer, "&rockman_id=").concat(rockmanId, "&").concat(search).concat(extraParamsQs)).then(function (x) {
595
+ return fetch("https://".concat(newHost, "/tallyman/v1/?action=oc2sms&country=").concat(country, "&slug=").concat(slug, "&offerId=").concat(offer).concat(!!keyword ? '&keyword=' + keyword : '', "&device=smart&rockman_id=").concat(rockmanId).concat(!!operator ? '&operator=' + operator : '', "&").concat(search)).then(function (x) {
608
596
  return x.json();
609
597
  });
610
598
 
@@ -619,82 +607,18 @@ var RealTallyman = {
619
607
  }, _callee19);
620
608
  }));
621
609
 
622
- function ussd(_x144, _x145, _x146, _x147, _x148, _x149, _x150, _x151, _x152) {
623
- return _ussd2.apply(this, arguments);
624
- }
625
-
626
- return ussd;
627
- }(),
628
- oc2sms: function () {
629
- var _oc2sms2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(host, country, slug, offer, rockmanId, keyword, operator, search) {
630
- var isDMB, newHost;
631
- return regeneratorRuntime.wrap(function _callee20$(_context20) {
632
- while (1) {
633
- switch (_context20.prev = _context20.next) {
634
- case 0:
635
- console.log("RealTallyman");
636
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
637
- newHost = isDMB ? "de.tallymans.com" : host;
638
- _context20.next = 5;
639
- return fetch("https://".concat(newHost, "/tallyman/v1/?action=oc2sms&country=").concat(country, "&slug=").concat(slug, "&offerId=").concat(offer).concat(!!keyword ? '&keyword=' + keyword : '', "&device=smart&rockman_id=").concat(rockmanId).concat(!!operator ? '&operator=' + operator : '', "&").concat(search)).then(function (x) {
640
- return x.json();
641
- });
642
-
643
- case 5:
644
- return _context20.abrupt("return", _context20.sent);
645
-
646
- case 6:
647
- case "end":
648
- return _context20.stop();
649
- }
650
- }
651
- }, _callee20);
652
- }));
653
-
654
- function oc2sms(_x153, _x154, _x155, _x156, _x157, _x158, _x159, _x160) {
610
+ function oc2sms(_x146, _x147, _x148, _x149, _x150, _x151, _x152, _x153) {
655
611
  return _oc2sms2.apply(this, arguments);
656
612
  }
657
613
 
658
614
  return oc2sms;
659
615
  }(),
660
- tpayConsentConfig: function () {
661
- var _tpayConsentConfig2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21(host, country, slug, device, offer, rockmanId, search) {
662
- var isDMB, newHost;
663
- return regeneratorRuntime.wrap(function _callee21$(_context21) {
664
- while (1) {
665
- switch (_context21.prev = _context21.next) {
666
- case 0:
667
- console.log("RealTallyman");
668
- isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
669
- newHost = isDMB ? "de.tallymans.com" : host;
670
- _context21.next = 5;
671
- return fetch("https://".concat(newHost, "/tallyman/helper/?action=tpay-consent-config&country=").concat(country, "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&device=smart&rockman_id=").concat(rockmanId, "&").concat(search)).then(function (x) {
672
- return x.json();
673
- });
674
-
675
- case 5:
676
- return _context21.abrupt("return", _context21.sent);
677
-
678
- case 6:
679
- case "end":
680
- return _context21.stop();
681
- }
682
- }
683
- }, _callee21);
684
- }));
685
-
686
- function tpayConsentConfig(_x161, _x162, _x163, _x164, _x165, _x166, _x167) {
687
- return _tpayConsentConfig2.apply(this, arguments);
688
- }
689
-
690
- return tpayConsentConfig;
691
- }(),
692
616
  mcpShield: function () {
693
- var _mcpShield2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22(host, country, slug, device, offer, rockmanId, operator, uniqid) {
617
+ var _mcpShield2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(host, country, slug, device, offer, rockmanId, operator, uniqid) {
694
618
  var isDMB, newHost, pageUrl, ipAdd, userIp;
695
- return regeneratorRuntime.wrap(function _callee22$(_context22) {
619
+ return regeneratorRuntime.wrap(function _callee20$(_context20) {
696
620
  while (1) {
697
- switch (_context22.prev = _context22.next) {
621
+ switch (_context20.prev = _context20.next) {
698
622
  case 0:
699
623
  console.log("RealTallyman");
700
624
  isDMB = window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
@@ -702,23 +626,23 @@ var RealTallyman = {
702
626
  pageUrl = window.location.href;
703
627
  ipAdd = window.pac_analytics.visitor.ip;
704
628
  userIp = ipAdd ? "&client_ip=".concat(ipAdd) : '';
705
- _context22.next = 8;
629
+ _context20.next = 8;
706
630
  return fetch("https://".concat(newHost, "/tallyman/v1/?action=mcp-shield&country=").concat(country, "&slug=").concat(slug, "&device=").concat(device, "&offerId=").concat(offer, "&operator=").concat(operator || '', "&rockman_id=").concat(rockmanId, "&client_lpu=").concat(pageUrl).concat(userIp).concat(uniqid || '')).then(function (x) {
707
631
  return x.json();
708
632
  });
709
633
 
710
634
  case 8:
711
- return _context22.abrupt("return", _context22.sent);
635
+ return _context20.abrupt("return", _context20.sent);
712
636
 
713
637
  case 9:
714
638
  case "end":
715
- return _context22.stop();
639
+ return _context20.stop();
716
640
  }
717
641
  }
718
- }, _callee22);
642
+ }, _callee20);
719
643
  }));
720
644
 
721
- function mcpShield(_x168, _x169, _x170, _x171, _x172, _x173, _x174, _x175) {
645
+ function mcpShield(_x154, _x155, _x156, _x157, _x158, _x159, _x160, _x161) {
722
646
  return _mcpShield2.apply(this, arguments);
723
647
  }
724
648
 
@@ -8,7 +8,6 @@ import IMoRedirConstants from "../reducers/moRedirFlow/IMoRedirConstants";
8
8
  import IOneClickConstants from "../reducers/oneClickFlow/IOneClickConstants";
9
9
  import IClick2smsConstants from "../reducers/click2smsFlow/IClick2smsConstants";
10
10
  import IUssdConstants from "../reducers/ussdFlow/IUssdConstants";
11
- import ITpayHeConstants from "../reducers/tpayHeFlow/ITpayHeConstants";
12
- declare type IAllActionConstants = IStategyActionContants | IPinConstants | IMoConstants | IMoRedirConstants | IOneClickConstants | IClick2smsConstants | IUssdConstants | ITpayHeConstants;
11
+ declare type IAllActionConstants = IStategyActionContants | IPinConstants | IMoConstants | IMoRedirConstants | IOneClickConstants | IClick2smsConstants | IUssdConstants;
13
12
  export declare type AppThunk<ReturnType = void> = ThunkAction<ReturnType, IApplicationState, unknown, Action<IAllActionConstants>>;
14
13
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as RDS from "../common-types/RemoteDataState";
2
2
  import { OPERATORSelectFlowIdentifySuccess, IStrategyCurrentState, IIdenyifyFlowByMsisdnSumbitNextData, IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess, IdentifyFlowOptionsResult } from '../reducers/strategy/StrategyTypes';
3
- declare function strategy<R>({ identifyFlowByOperatorSelect, identifyFlowByMsisdn, pinFlow, moFlow, moRedirFlow, oneClickFlow, click2smsFlow, ussdFlow, tpayHeFlow }: {
3
+ declare function strategy<R>({ identifyFlowByOperatorSelect, identifyFlowByMsisdn, pinFlow, moFlow, moRedirFlow, oneClickFlow, click2smsFlow, ussdFlow }: {
4
4
  identifyFlowByOperatorSelect: (data: OPERATORSelectFlowIdentifySuccess) => R;
5
5
  identifyFlowByMsisdn: (rds: RDS.RemoteDataState<IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess>, nextData: IIdenyifyFlowByMsisdnSumbitNextData) => R;
6
6
  pinFlow: (data: IdentifyFlowOptionsResult<"submitMSISDNAction">) => R;
@@ -9,6 +9,5 @@ declare function strategy<R>({ identifyFlowByOperatorSelect, identifyFlowByMsisd
9
9
  oneClickFlow: (data: IdentifyFlowOptionsResult<"getRedirectUrlAction">) => R;
10
10
  click2smsFlow: (data: IdentifyFlowOptionsResult<"loadOc2sms">) => R;
11
11
  ussdFlow: (data: IdentifyFlowOptionsResult<"submitMSISDNAction">) => R;
12
- tpayHeFlow: (data: IdentifyFlowOptionsResult<"loadTpayAction">) => R;
13
12
  }): (state: IStrategyCurrentState) => R;
14
13
  export default strategy;
@@ -13,8 +13,7 @@ function strategy(_ref) {
13
13
  moRedirFlow = _ref.moRedirFlow,
14
14
  oneClickFlow = _ref.oneClickFlow,
15
15
  click2smsFlow = _ref.click2smsFlow,
16
- ussdFlow = _ref.ussdFlow,
17
- tpayHeFlow = _ref.tpayHeFlow;
16
+ ussdFlow = _ref.ussdFlow;
18
17
  return function (state) {
19
18
  switch (state.type) {
20
19
  case 'IDENTIFY_FLOW_BY_OPERATOR_SELECT':
@@ -40,9 +39,6 @@ function strategy(_ref) {
40
39
 
41
40
  case 'USSD':
42
41
  return ussdFlow(state.result);
43
-
44
- case 'TPAY_HE':
45
- return tpayHeFlow(state.result);
46
42
  }
47
43
  };
48
44
  }
@@ -169,7 +169,7 @@ var mockedMSISDNEntrySuccess = {
169
169
  currentState: {
170
170
  type: "MSISDNEntry",
171
171
  result: RDS.Success({
172
- href: 'https://www.yahoo.com/'
172
+ href: '/mock-product-url'
173
173
  })
174
174
  }
175
175
  };
@@ -1,7 +1,11 @@
1
1
  import { IOneClickFlowReducerState, IOneClickActions, IOneClickFlowActionMaps, ILinkExtraParams, IMockOneClickFlowStates } from "./OneClickTypes";
2
2
  import { AppThunk } from "../../common-types/AppThunk";
3
3
  import { IHash } from "../strategy/StrategyTypes";
4
- export declare function getRedirectUrlAction(extraParams?: ILinkExtraParams, autoRedirect?: boolean, isGetRedirectBupperWay?: boolean): AppThunk;
4
+ export declare function getRedirectUrlAction({ extraParams, autoRedirect, isGetRedirectBupperWay }: {
5
+ extraParams?: ILinkExtraParams;
6
+ autoRedirect?: boolean;
7
+ isGetRedirectBupperWay?: boolean;
8
+ }): AppThunk;
5
9
  export declare function subscribeUrlAction(autoRedirect?: boolean, extraParams?: IHash): AppThunk;
6
10
  export declare function mockOneClickFlow(mockState: IMockOneClickFlowStates): AppThunk;
7
11
  export declare const OneClickFlowActionMaps: IOneClickFlowActionMaps;
@@ -64,9 +64,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
64
64
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
65
65
 
66
66
  //ACTION CREATORS
67
- function getRedirectUrlAction(extraParams, autoRedirect, isGetRedirectBupperWay) {
67
+ function getRedirectUrlAction(_ref) {
68
+ var extraParams = _ref.extraParams,
69
+ _ref$autoRedirect = _ref.autoRedirect,
70
+ autoRedirect = _ref$autoRedirect === void 0 ? false : _ref$autoRedirect,
71
+ _ref$isGetRedirectBup = _ref.isGetRedirectBupperWay,
72
+ isGetRedirectBupperWay = _ref$isGetRedirectBup === void 0 ? false : _ref$isGetRedirectBup;
68
73
  return /*#__PURE__*/function () {
69
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch, store) {
74
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch, store) {
70
75
  var currentState, _currentState$result, config, subscription_url, redirect_url, redirectUrl, _yield$getRedirectUrl, _redirect_url;
71
76
 
72
77
  return regeneratorRuntime.wrap(function _callee$(_context) {
@@ -241,14 +246,14 @@ function getRedirectUrlAction(extraParams, autoRedirect, isGetRedirectBupperWay)
241
246
  }));
242
247
 
243
248
  return function (_x, _x2) {
244
- return _ref.apply(this, arguments);
249
+ return _ref2.apply(this, arguments);
245
250
  };
246
251
  }();
247
252
  }
248
253
 
249
254
  function subscribeUrlAction(autoRedirect, extraParams) {
250
255
  return /*#__PURE__*/function () {
251
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch, store) {
256
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch, store) {
252
257
  var currentState, subscription_url, product_url, errorType;
253
258
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
254
259
  while (1) {
@@ -356,7 +361,7 @@ function subscribeUrlAction(autoRedirect, extraParams) {
356
361
  }));
357
362
 
358
363
  return function (_x3, _x4) {
359
- return _ref2.apply(this, arguments);
364
+ return _ref3.apply(this, arguments);
360
365
  };
361
366
  }();
362
367
  }