ouisys-engine 3.0.9 → 3.0.12

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 (32) hide show
  1. package/dist/api/index.d.ts +5 -0
  2. package/dist/api/index.js +197 -175
  3. package/dist/common-types/IError.d.ts +1 -2
  4. package/dist/common-types/RemoteDataState.d.ts +3 -3
  5. package/dist/common-types/RemoteDataState.js +13 -10
  6. package/dist/custom-hooks/useStrategyConfig.d.ts +4 -0
  7. package/dist/custom-hooks/useStrategyConfig.js +24 -0
  8. package/dist/flows/click2smsFlow.js +4 -0
  9. package/dist/flows/moFlow.js +4 -0
  10. package/dist/flows/moRedirFlow.js +4 -0
  11. package/dist/flows/oneClickFlow.js +6 -0
  12. package/dist/flows/strategy.js +3 -0
  13. package/dist/flows/ussdFlow.js +3 -0
  14. package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +1 -1
  15. package/dist/reducers/click2smsFlow/index.js +3 -3
  16. package/dist/reducers/click2smsFlow/utils.js +18 -23
  17. package/dist/reducers/moFlow/index.js +18 -28
  18. package/dist/reducers/moFlow/utils.js +3 -12
  19. package/dist/reducers/moRedirFlow/utils.js +4 -3
  20. package/dist/reducers/oneClickFlow/utils.js +8 -8
  21. package/dist/reducers/pinFlow/index.js +10 -9
  22. package/dist/reducers/pinFlow/utils.js +19 -24
  23. package/dist/reducers/strategy/StrategyTypes.d.ts +3 -2
  24. package/dist/reducers/strategy/index.js +2 -2
  25. package/dist/reducers/strategy/strategies/header_enrichment.js +44 -38
  26. package/dist/reducers/strategy/utils.d.ts +3 -3
  27. package/dist/reducers/strategy/utils.js +36 -49
  28. package/dist/reducers/ussdFlow/utils.js +4 -2
  29. package/dist/utilities/index.js +1 -1
  30. package/dist/utilities/storeEmail.d.ts +3 -0
  31. package/dist/utilities/storeEmail.js +78 -0
  32. package/package.json +3 -2
@@ -132,7 +132,7 @@ function submitMSISDNAction(msisdn, extraParams) {
132
132
 
133
133
  case 11:
134
134
  msisdnSubmissionResult = _context.sent;
135
- operator = msisdnSubmissionResult.type == 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.operator : '';
135
+ operator = msisdnSubmissionResult.type === 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.operator : '';
136
136
  dispatch({
137
137
  type: 'PIN_FLOW_MSISDN_SUBMIT',
138
138
  payload: _objectSpread(_objectSpread({}, pinFlowCurrentState), {}, {
@@ -151,11 +151,11 @@ function submitMSISDNAction(msisdn, extraParams) {
151
151
  type: 'PINEntry',
152
152
  result: RDS.NothingYet(),
153
153
  data: {
154
- actualPIN: msisdnSubmissionResult.type == 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.pin : null,
154
+ actualPIN: msisdnSubmissionResult.type === 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.pin : null,
155
155
  nextAction: 'submitPinAction',
156
156
  msisdn: msisdn,
157
157
  operator: operator,
158
- pinMaxLength: operator != '' && pinMaxLengthByOp[operator] ? pinMaxLengthByOp[operator] : null
158
+ pinMaxLength: operator !== '' && pinMaxLengthByOp[operator] ? pinMaxLengthByOp[operator] : null
159
159
  }
160
160
  })
161
161
  });
@@ -166,7 +166,8 @@ function submitMSISDNAction(msisdn, extraParams) {
166
166
  _context.prev = 18;
167
167
  _context.t0 = _context["catch"](6);
168
168
  console.warn(_context.t0);
169
- errorType = _context.t0.type === 'AlreadySubscribed' ? 'AlreadySubscribed' : _context.t0.type === 'InvalidMSISDN' ? 'InvalidMSISDN' : 'UnknownError';
169
+ errorType = // eslint-disable-next-line no-nested-ternary
170
+ _context.t0.type === 'AlreadySubscribed' ? 'AlreadySubscribed' : _context.t0.type === 'InvalidMSISDN' ? 'InvalidMSISDN' : 'UnknownError';
170
171
 
171
172
  _strategy.tracker.recedeInFlow('tallyman.v1-pin', 'msisdn-submission-failure', {
172
173
  msisdn: msisdn,
@@ -206,7 +207,7 @@ function submitMSISDNAction(msisdn, extraParams) {
206
207
  errorType: 'UnexpectedState'
207
208
  });
208
209
 
209
- throw 'Unexpected state';
210
+ throw new Error('Unexpected state');
210
211
 
211
212
  case 29:
212
213
  case "end":
@@ -279,7 +280,7 @@ function reSubmitMSISDNAction(msisdn, extraParams) {
279
280
  type: 'PINEntry',
280
281
  result: RDS.NothingYet(),
281
282
  data: {
282
- actualPIN: msisdnSubmissionResult.type == 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.pin : null,
283
+ actualPIN: msisdnSubmissionResult.type === 'SingleMSISDNSubmissionResult' ? msisdnSubmissionResult.pin : null,
283
284
  nextAction: 'submitPinAction',
284
285
  msisdn: msisdn
285
286
  }
@@ -332,7 +333,7 @@ function reSubmitMSISDNAction(msisdn, extraParams) {
332
333
  errorType: 'UnexpectedState'
333
334
  });
334
335
 
335
- throw 'Unexpected state';
336
+ throw new Error('Unexpected state');
336
337
 
337
338
  case 26:
338
339
  case "end":
@@ -418,7 +419,7 @@ function submitPinAction(msisdn, pin, extraParams) {
418
419
  })
419
420
  })
420
421
  });
421
- throw 'Unexpected state';
422
+ throw new Error('Unexpected state');
422
423
 
423
424
  case 17:
424
425
  _context3.next = 25;
@@ -482,7 +483,7 @@ function mockPinFlow(mockState) {
482
483
  });
483
484
 
484
485
  default:
485
- throw 'Mock Flow not supported';
486
+ throw new Error('Mock Flow not supported');
486
487
  }
487
488
  }
488
489
  };
@@ -94,7 +94,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
94
94
 
95
95
  function submitMSISDN(_x, _x2, _x3, _x4) {
96
96
  return _submitMSISDN.apply(this, arguments);
97
- }
97
+ } // const bupperizeCountry = (c: string) => (c === 'gb' ? 'uk' : c);
98
+
98
99
 
99
100
  function _submitMSISDN() {
100
101
  _submitMSISDN = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(window, maybeConfig, internationalMSISDN, extraParams) {
@@ -107,7 +108,7 @@ function _submitMSISDN() {
107
108
  offer: window.pac_analytics.visitor.offer
108
109
  }, maybeConfig || {});
109
110
 
110
- if (!(config.automaticallySubmitAllOperators == true && !!config.operators && config.operators.length > 0)) {
111
+ if (!(config.automaticallySubmitAllOperators === true && !!config.operators && config.operators.length > 0)) {
111
112
  _context.next = 3;
112
113
  break;
113
114
  }
@@ -127,11 +128,7 @@ function _submitMSISDN() {
127
128
  return _submitMSISDN.apply(this, arguments);
128
129
  }
129
130
 
130
- var bupperizeCountry = function bupperizeCountry(c) {
131
- return c == 'gb' ? 'uk' : c;
132
- };
133
-
134
- var uniqidResult = '';
131
+ var uniqidResult = ''; // eslint-disable-next-line consistent-return
135
132
 
136
133
  function loadMcpShield(_x5, _x6) {
137
134
  return _loadMcpShield.apply(this, arguments);
@@ -154,7 +151,7 @@ function _loadMcpShield() {
154
151
  case 6:
155
152
  mcpShieldResult = _context2.sent;
156
153
 
157
- if (!(mcpShieldResult.success == false)) {
154
+ if (!(mcpShieldResult.success === false)) {
158
155
  _context2.next = 11;
159
156
  break;
160
157
  }
@@ -218,7 +215,7 @@ function _submitMSISDNOnce() {
218
215
  'kuwait-agency-mix-yourspot-riddles': 'kuwait-agency-mix-yourspot-riddles'
219
216
  };
220
217
 
221
- if (!(config.country.toLowerCase() == 'k2' && supportedSlugs[config.slug])) {
218
+ if (!(config.country.toLowerCase() === 'k2' && supportedSlugs[config.slug])) {
222
219
  _context3.next = 12;
223
220
  break;
224
221
  }
@@ -229,7 +226,7 @@ function _submitMSISDNOnce() {
229
226
  case 10:
230
227
  identifiedUser = _context3.sent;
231
228
 
232
- if (identifiedUser.operator && identifiedUser.operator == 'K2_ZAIN') {
229
+ if (identifiedUser.operator && identifiedUser.operator === 'K2_ZAIN') {
233
230
  window.hostCountry = 'KW';
234
231
  window.hostSlug = 'kw-mt2-hosted-flow-mobfun';
235
232
  config.country = window.hostCountry;
@@ -238,11 +235,11 @@ function _submitMSISDNOnce() {
238
235
 
239
236
  case 12:
240
237
  slug = config.slug, country = config.country, device = config.device, offer = config.offer, host = config.host;
241
- search = window.location.search.indexOf('redirect-back=1') == -1 ? window.location.search.substr(1) || '' : '';
238
+ search = window.location.search.indexOf('redirect-back=1') === -1 ? window.location.search.substr(1) || '' : '';
242
239
  extraParamsQs = !extraParams ? '' : "&".concat(Object.keys(extraParams).map(function (k) {
243
240
  return "".concat(k, "=").concat(extraParams[k]);
244
241
  }).join('&'));
245
- uniqid = !!uniqidResult && uniqidResult != '' ? "&mcpUniqid=".concat(uniqidResult) : '';
242
+ uniqid = !!uniqidResult && uniqidResult !== '' ? "&mcpUniqid=".concat(uniqidResult) : '';
246
243
  _context3.next = 18;
247
244
  return window.tallymanApi.triggerPin(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid);
248
245
 
@@ -255,7 +252,7 @@ function _submitMSISDNOnce() {
255
252
  }
256
253
 
257
254
  error = new Error("Error in submitMSISDN() trigger-pin action:\n".concat(result.message));
258
- error.type = result.message == 'ALREADY SUBSCRIBED' ? 'AlreadySubscribed' : 'InvalidMSISDN';
255
+ error.type = result.message === 'ALREADY SUBSCRIBED' ? 'AlreadySubscribed' : 'InvalidMSISDN';
259
256
  error.productUrl = result.product_url ? result.product_url : '';
260
257
  console.error(error);
261
258
  throw error;
@@ -270,7 +267,7 @@ function _submitMSISDNOnce() {
270
267
  }
271
268
  };
272
269
 
273
- if (!(country && result.operator && (kwCodesWithMcpShied[country.toLowerCase()] && kwCodesWithMcpShied[country.toLowerCase()][result.operator.toLowerCase()] || country.toLowerCase() == 'iq'))) {
270
+ if (!(country && result.operator && (kwCodesWithMcpShied[country.toLowerCase()] && kwCodesWithMcpShied[country.toLowerCase()][result.operator.toLowerCase()] || country.toLowerCase() === 'iq'))) {
274
271
  _context3.next = 39;
275
272
  break;
276
273
  }
@@ -282,7 +279,7 @@ function _submitMSISDNOnce() {
282
279
  case 32:
283
280
  mcpShieldResult = _context3.sent;
284
281
 
285
- if (mcpShieldResult.success == false) {
282
+ if (mcpShieldResult.success === false) {
286
283
  console.warn(mcpShieldResult.message);
287
284
  } else {
288
285
  (0, _loadScriptInnerHtml.default)(mcpShieldResult.source);
@@ -368,11 +365,11 @@ function _submitMSISDNForMultipleOperators() {
368
365
  results = _context5.sent;
369
366
  // @ts-ignore
370
367
  alreadySubscribed = results.find(function (r) {
371
- return r.type == 'left' && r.value.type == 'AlreadySubscribed';
368
+ return r.type === 'left' && r.value.type === 'AlreadySubscribed';
372
369
  });
373
370
 
374
371
  if (!results.every(function (r) {
375
- return r.type == 'left';
372
+ return r.type === 'left';
376
373
  })) {
377
374
  _context5.next = 8;
378
375
  break;
@@ -437,7 +434,7 @@ function _submitPIN() {
437
434
  throw emptyPinError;
438
435
 
439
436
  case 9:
440
- uniqid = uniqidResult != '' ? "&mcpUniqid=".concat(uniqidResult) : '';
437
+ uniqid = uniqidResult !== '' ? "&mcpUniqid=".concat(uniqidResult) : '';
441
438
  evinaTid = typeof window !== 'undefined' && window.tid ? window.tid : '';
442
439
  _context6.next = 13;
443
440
  return window.tallymanApi.verifyPin(host, country, slug, device, offer, rockmanId, pin, extraParamsQs, uniqid, evinaTid);
@@ -482,7 +479,7 @@ function _submitPIN() {
482
479
  break;
483
480
  }
484
481
 
485
- isAlreadySubscribed = pinResult.message == 'ALREADY SUBSCRIBED';
482
+ isAlreadySubscribed = pinResult.message === 'ALREADY SUBSCRIBED';
486
483
  return _context6.abrupt("return", {
487
484
  productUrl: checkResult.product_url || null,
488
485
  isAlreadySubscribed: isAlreadySubscribed
@@ -494,7 +491,7 @@ function _submitPIN() {
494
491
  throw _pinError;
495
492
 
496
493
  case 35:
497
- _isAlreadySubscribed = pinResult.message == 'ALREADY SUBSCRIBED';
494
+ _isAlreadySubscribed = pinResult.message === 'ALREADY SUBSCRIBED';
498
495
  return _context6.abrupt("return", {
499
496
  productUrl: pinResult.product_url || null,
500
497
  isAlreadySubscribed: _isAlreadySubscribed
@@ -513,9 +510,7 @@ function _submitPIN() {
513
510
  var mockedPINState = {
514
511
  currentState: {
515
512
  type: 'PINEntry',
516
- result: RDS.NothingYet({
517
- finalUrl: ''
518
- }),
513
+ result: RDS.NothingYet(),
519
514
  data: {
520
515
  actualPIN: '',
521
516
  nextAction: 'submitPinAction',
@@ -528,7 +523,7 @@ var mockedCompletedState = {
528
523
  currentState: {
529
524
  type: 'PINEntry',
530
525
  result: RDS.Success({
531
- finalUrl: '/mock-product-url'
526
+ finalUrl: 'https://google.com'
532
527
  }),
533
528
  data: {
534
529
  actualPIN: '',
@@ -26,6 +26,7 @@ export declare type IConfig = {
26
26
  device?: 'smart' | 'feature';
27
27
  automaticallySubmitAllOperators?: boolean;
28
28
  operators?: string[];
29
+ service?: string;
29
30
  };
30
31
  export declare type ISupportedFlows = 'pin' | 'mo' | 'oneClick' | 'click2sms' | 'moRedir' | 'ussd' | 'tpayHe';
31
32
  export declare type IFlow = {
@@ -54,7 +55,7 @@ export interface IHash {
54
55
  export declare type IDENTIFYMSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN';
55
56
  export declare type IDENTIFYMSISDNEntryFailure = {
56
57
  errorType: IDENTIFYMSISDNEntryErrorTypes;
57
- error: any;
58
+ error: unknown;
58
59
  };
59
60
  export declare type IdentifyFlowOptionsResult<F> = {
60
61
  config: IConfig;
@@ -156,7 +157,7 @@ export declare type IStrategyActions = {
156
157
  payload: IIdentifyFlowByHePayload;
157
158
  } | {
158
159
  type: 'MOCK_STRATEGY_STATE';
159
- payload: any;
160
+ payload: unknown;
160
161
  };
161
162
  export declare type IStrategyCurrentState = {
162
163
  type: 'IDENTIFY_STRATEGY';
@@ -152,7 +152,7 @@ function mockStrategyStateByUrlParam() {
152
152
  break;
153
153
 
154
154
  default:
155
- throw 'Mock Flow not supported';
155
+ throw new Error('Mock Flow not supported');
156
156
  }
157
157
  }
158
158
  };
@@ -306,7 +306,7 @@ function identifyStrategy() {
306
306
  }));
307
307
 
308
308
  case 31:
309
- throw 'Strategy not supported';
309
+ throw new Error('Strategy not supported');
310
310
 
311
311
  case 32:
312
312
  case "end":
@@ -235,19 +235,22 @@ exports.pin_header_enrichment = pin_header_enrichment;
235
235
  var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrichment(defaultFlow) {
236
236
  return /*#__PURE__*/function () {
237
237
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) {
238
- var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator, _flowObj, _flowObj2;
239
-
238
+ var switchState, ipRangeName, mapIpRangeToAgency, flowObj, heResult, msisdn, subscription_url, redirect_url, operator;
240
239
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
241
240
  while (1) {
242
241
  switch (_context2.prev = _context2.next) {
243
242
  case 0:
243
+ console.log('here');
244
+
244
245
  switchState = function switchState(_ref3) {
245
246
  var flowObj = _ref3.flowObj,
246
247
  msisdn = _ref3.msisdn,
247
248
  operator = _ref3.operator,
248
249
  subscription_url = _ref3.subscription_url,
249
250
  redirect_url = _ref3.redirect_url;
250
- var isHeaderEnrichmentSuccess = !!(msisdn !== undefined && msisdn !== '');
251
+ var isHeaderEnrichmentSuccess = !!(msisdn !== undefined && msisdn !== ''); // eslint-disable-next-line no-console
252
+
253
+ console.log('isHeaderEnrichmentSuccess', isHeaderEnrichmentSuccess);
251
254
 
252
255
  switch (flowObj.flow) {
253
256
  case 'oneClick':
@@ -306,14 +309,14 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
306
309
  }
307
310
  };
308
311
 
309
- _context2.next = 3;
312
+ _context2.next = 4;
310
313
  return (0, _tryGetIPRangeName.default)(window.pac_analytics.visitor);
311
314
 
312
- case 3:
315
+ case 4:
313
316
  ipRangeName = _context2.sent;
314
317
 
315
318
  if (!(ipRangeName == null)) {
316
- _context2.next = 7;
319
+ _context2.next = 8;
317
320
  break;
318
321
  }
319
322
 
@@ -331,21 +334,26 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
331
334
  }
332
335
  }));
333
336
 
334
- case 7:
335
- _context2.prev = 7;
336
- flowObj = (0, _utils.determineFlowByOperator)(ipRangeName.toUpperCase());
337
+ case 8:
338
+ _context2.prev = 8;
339
+ mapIpRangeToAgency = {
340
+ om_ooredoo: 'o2_ooredoo'
341
+ };
342
+ flowObj = (0, _utils.determineFlowByOperator)(mapIpRangeToAgency[ipRangeName.toUpperCase()]); // eslint-disable-next-line no-console
337
343
 
338
- if (!(flowObj.flow == 'oneClick')) {
339
- _context2.next = 18;
344
+ console.log('flowObj', flowObj);
345
+
346
+ if (!(flowObj.flow === 'oneClick')) {
347
+ _context2.next = 21;
340
348
  break;
341
349
  }
342
350
 
343
- _context2.next = 12;
351
+ _context2.next = 15;
344
352
  return (0, _utils.identifyUser)({
345
353
  operator: ipRangeName
346
354
  });
347
355
 
348
- case 12:
356
+ case 15:
349
357
  heResult = _context2.sent;
350
358
  msisdn = heResult.msisdn, subscription_url = heResult.subscription_url, redirect_url = heResult.redirect_url;
351
359
  operator = heResult.operator ? heResult.operator.toUpperCase() : ipRangeName.toUpperCase();
@@ -355,28 +363,26 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
355
363
  msisdn: msisdn
356
364
  });
357
365
 
358
- _flowObj = (0, _utils.determineFlowByOperator)(operator);
359
366
  switchState({
360
- flowObj: _flowObj,
367
+ flowObj: flowObj,
361
368
  msisdn: msisdn,
362
369
  operator: operator,
363
370
  subscription_url: subscription_url,
364
371
  redirect_url: redirect_url
365
372
  });
366
373
  } else {
367
- _flowObj2 = (0, _utils.determineFlowByOperator)(operator);
368
374
  switchState({
369
- flowObj: _flowObj2,
375
+ flowObj: flowObj,
370
376
  redirect_url: redirect_url,
371
377
  subscription_url: subscription_url,
372
378
  operator: operator
373
379
  });
374
380
  }
375
381
 
376
- _context2.next = 20;
382
+ _context2.next = 23;
377
383
  break;
378
384
 
379
- case 18:
385
+ case 21:
380
386
  _.tracker.sendOptInFlowEvent('Pin');
381
387
 
382
388
  return _context2.abrupt("return", dispatch({
@@ -391,13 +397,13 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
391
397
  }
392
398
  }));
393
399
 
394
- case 20:
395
- _context2.next = 28;
400
+ case 23:
401
+ _context2.next = 31;
396
402
  break;
397
403
 
398
- case 22:
399
- _context2.prev = 22;
400
- _context2.t0 = _context2["catch"](7);
404
+ case 25:
405
+ _context2.prev = 25;
406
+ _context2.t0 = _context2["catch"](8);
401
407
  console.warn(_context2.t0);
402
408
 
403
409
  _.tracker.customEvent('Flow', 'advance-auto', 'msisdn-detection-failure', {
@@ -417,12 +423,12 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
417
423
  }
418
424
  });
419
425
 
420
- case 28:
426
+ case 31:
421
427
  case "end":
422
428
  return _context2.stop();
423
429
  }
424
430
  }
425
- }, _callee2, null, [[7, 22]]);
431
+ }, _callee2, null, [[8, 25]]);
426
432
  }));
427
433
 
428
434
  return function (_x2) {
@@ -436,7 +442,7 @@ exports.he_pin_one_click_header_enrichment = he_pin_one_click_header_enrichment;
436
442
  var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_header_enrichment(defaultFlow) {
437
443
  return /*#__PURE__*/function () {
438
444
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) {
439
- var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator, _flowObj3, _flowObj4;
445
+ var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator, _flowObj, _flowObj2;
440
446
 
441
447
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
442
448
  while (1) {
@@ -552,18 +558,18 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
552
558
  msisdn: msisdn
553
559
  });
554
560
 
555
- _flowObj3 = (0, _utils.determineFlowByOperator)(operator);
561
+ _flowObj = (0, _utils.determineFlowByOperator)(operator);
556
562
  switchState({
557
- flowObj: _flowObj3,
563
+ flowObj: _flowObj,
558
564
  msisdn: msisdn,
559
565
  operator: operator,
560
566
  subscription_url: subscription_url,
561
567
  redirect_url: redirect_url
562
568
  });
563
569
  } else {
564
- _flowObj4 = (0, _utils.determineFlowByOperator)(operator);
570
+ _flowObj2 = (0, _utils.determineFlowByOperator)(operator);
565
571
  switchState({
566
- flowObj: _flowObj4,
572
+ flowObj: _flowObj2,
567
573
  redirect_url: redirect_url,
568
574
  subscription_url: subscription_url,
569
575
  operator: operator
@@ -633,7 +639,7 @@ exports.he_mo_redir_one_click_header_enrichment = he_mo_redir_one_click_header_e
633
639
  var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichment(defaultFlow) {
634
640
  return /*#__PURE__*/function () {
635
641
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch) {
636
- var switchState, heResult, msisdn, operator, flowObj, _flowObj5, _flowObj6, _flowObj7;
642
+ var switchState, heResult, msisdn, operator, flowObj, _flowObj3, _flowObj4, _flowObj5;
637
643
 
638
644
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
639
645
  while (1) {
@@ -734,8 +740,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
734
740
  return (0, _utils.determineFlowByOperatorFromIp)();
735
741
 
736
742
  case 16:
737
- _flowObj5 = _context4.sent;
738
- switchState(_flowObj5, msisdn);
743
+ _flowObj3 = _context4.sent;
744
+ switchState(_flowObj3, msisdn);
739
745
 
740
746
  case 18:
741
747
  _context4.next = 24;
@@ -746,8 +752,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
746
752
  return (0, _utils.determineFlowByOperatorFromIp)();
747
753
 
748
754
  case 22:
749
- _flowObj6 = _context4.sent;
750
- switchState(_flowObj6);
755
+ _flowObj4 = _context4.sent;
756
+ switchState(_flowObj4);
751
757
 
752
758
  case 24:
753
759
  _context4.next = 42;
@@ -767,8 +773,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
767
773
  return (0, _utils.determineFlowByOperatorFromIp)();
768
774
 
769
775
  case 33:
770
- _flowObj7 = _context4.sent;
771
- switchState(_flowObj7);
776
+ _flowObj5 = _context4.sent;
777
+ switchState(_flowObj5);
772
778
  _context4.next = 42;
773
779
  break;
774
780
 
@@ -2,14 +2,14 @@ import Either from '../../common-types/Either';
2
2
  import { ILinkExtraParams } from '../oneClickFlow/OneClickTypes';
3
3
  import { IConfig, IFlow, IStrategy, IStrategyReducerState } from './StrategyTypes';
4
4
  export declare const wait: (ms: number) => Promise<unknown>;
5
- export declare const loop: <I extends {}, R extends {}>(f: () => Promise<R>, max: number, stop: (r: R) => boolean, i: number) => Promise<R>;
5
+ export declare const loop: <_I extends {}, R extends {}>(f: () => Promise<R>, max: number, stop: (r: R) => boolean, i: number) => Promise<R>;
6
6
  export declare function right<L, R>(r: R): Either<L, R>;
7
7
  export declare function left<L, R>(l: L): Either<L, R>;
8
8
  export declare const getConfig: () => IStrategy;
9
9
  export declare const searchToObject: () => {};
10
10
  export declare function determineFlowByMsidn(internationalMSISDN: string): Promise<IFlow>;
11
11
  export declare function determineFlowByOperator(operator: string): IFlow;
12
- export declare function determineFlowByOperatorFromIp(isStrict?: boolean): Promise<IFlow>;
12
+ export declare function determineFlowByOperatorFromIp(): Promise<IFlow>;
13
13
  export declare function getOperators(): Array<string>;
14
14
  export declare const identifyUser: (extraParams?: ILinkExtraParams) => Promise<{
15
15
  msisdn: string;
@@ -18,7 +18,7 @@ export declare const identifyUser: (extraParams?: ILinkExtraParams) => Promise<{
18
18
  redirect_url?: string;
19
19
  action?: () => Promise<string>;
20
20
  }>;
21
- export declare const subscribe: (url: string) => Promise<string>;
21
+ export declare const subscribe: (_url: string) => Promise<string>;
22
22
  export declare function mockConfig(flow: string): IConfig;
23
23
  export declare const mockedPinFlow: IStrategyReducerState;
24
24
  export declare const mockedMoFlow: IStrategyReducerState;