ouisys-engine 3.0.10 → 3.0.13

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.
@@ -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":
@@ -113,7 +113,7 @@ function identify_user() {
113
113
  var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
114
114
  return /*#__PURE__*/function () {
115
115
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
116
- var ipRangeName, heResult, flowObj, msisdn, operator;
116
+ var ipRangeName, heResult, flowObj, msisdn;
117
117
  return _regeneratorRuntime().wrap(function _callee$(_context) {
118
118
  while (1) {
119
119
  switch (_context.prev = _context.next) {
@@ -124,10 +124,9 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
124
124
 
125
125
  case 3:
126
126
  ipRangeName = _context.sent;
127
- console.log('ipRangeName', ipRangeName);
128
127
 
129
- if (!(ipRangeName == null)) {
130
- _context.next = 8;
128
+ if (!(ipRangeName === null)) {
129
+ _context.next = 7;
131
130
  break;
132
131
  }
133
132
 
@@ -144,21 +143,20 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
144
143
  }
145
144
  }));
146
145
 
147
- case 8:
148
- _context.next = 10;
146
+ case 7:
147
+ _context.next = 9;
149
148
  return (0, _utils.identifyUser)();
150
149
 
151
- case 10:
150
+ case 9:
152
151
  heResult = _context.sent;
153
152
  flowObj = defaultFlow;
154
153
 
155
154
  if (!(heResult.msisdn !== undefined && heResult.msisdn !== '')) {
156
- _context.next = 18;
155
+ _context.next = 16;
157
156
  break;
158
157
  }
159
158
 
160
- msisdn = heResult.msisdn;
161
- operator = heResult.operator;
159
+ msisdn = heResult.msisdn; // const { operator } = heResult;
162
160
 
163
161
  _.tracker.customEvent('Flow', 'advance-auto', 'msisdn-detected', {
164
162
  msisdn: msisdn
@@ -180,7 +178,7 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
180
178
  }
181
179
  }));
182
180
 
183
- case 18:
181
+ case 16:
184
182
  _.tracker.sendOptInFlowEvent('Pin');
185
183
 
186
184
  return _context.abrupt("return", dispatch({
@@ -194,8 +192,8 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
194
192
  }
195
193
  }));
196
194
 
197
- case 22:
198
- _context.prev = 22;
195
+ case 20:
196
+ _context.prev = 20;
199
197
  _context.t0 = _context["catch"](0);
200
198
  console.warn(_context.t0);
201
199
 
@@ -216,12 +214,12 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
216
214
  }
217
215
  });
218
216
 
219
- case 28:
217
+ case 26:
220
218
  case "end":
221
219
  return _context.stop();
222
220
  }
223
221
  }
224
- }, _callee, null, [[0, 22]]);
222
+ }, _callee, null, [[0, 20]]);
225
223
  }));
226
224
 
227
225
  return function (_x) {
@@ -235,8 +233,7 @@ exports.pin_header_enrichment = pin_header_enrichment;
235
233
  var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrichment(defaultFlow) {
236
234
  return /*#__PURE__*/function () {
237
235
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) {
238
- var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator, _flowObj, _flowObj2;
239
-
236
+ var switchState, ipRangeName, mapIpRangeToAgency, flowObj, heResult, msisdn, subscription_url, redirect_url, operator;
240
237
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
241
238
  while (1) {
242
239
  switch (_context2.prev = _context2.next) {
@@ -268,7 +265,7 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
268
265
  });
269
266
 
270
267
  case 'pin':
271
- if (isHeaderEnrichmentSuccess == true) {
268
+ if (isHeaderEnrichmentSuccess === true) {
272
269
  _.tracker.sendOptInFlowEvent('Hybrid Pin');
273
270
  } else {
274
271
  _.tracker.sendOptInFlowEvent('Pin');
@@ -312,7 +309,7 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
312
309
  case 3:
313
310
  ipRangeName = _context2.sent;
314
311
 
315
- if (!(ipRangeName == null)) {
312
+ if (!(ipRangeName === null)) {
316
313
  _context2.next = 7;
317
314
  break;
318
315
  }
@@ -333,19 +330,22 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
333
330
 
334
331
  case 7:
335
332
  _context2.prev = 7;
336
- flowObj = (0, _utils.determineFlowByOperator)(ipRangeName.toUpperCase());
333
+ mapIpRangeToAgency = {
334
+ om_ooredoo: 'o2_ooredoo'
335
+ };
336
+ flowObj = (0, _utils.determineFlowByOperator)(mapIpRangeToAgency[ipRangeName.toUpperCase()]);
337
337
 
338
- if (!(flowObj.flow == 'oneClick')) {
339
- _context2.next = 18;
338
+ if (!(flowObj.flow === 'oneClick')) {
339
+ _context2.next = 19;
340
340
  break;
341
341
  }
342
342
 
343
- _context2.next = 12;
343
+ _context2.next = 13;
344
344
  return (0, _utils.identifyUser)({
345
345
  operator: ipRangeName
346
346
  });
347
347
 
348
- case 12:
348
+ case 13:
349
349
  heResult = _context2.sent;
350
350
  msisdn = heResult.msisdn, subscription_url = heResult.subscription_url, redirect_url = heResult.redirect_url;
351
351
  operator = heResult.operator ? heResult.operator.toUpperCase() : ipRangeName.toUpperCase();
@@ -355,28 +355,26 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
355
355
  msisdn: msisdn
356
356
  });
357
357
 
358
- _flowObj = (0, _utils.determineFlowByOperator)(operator);
359
358
  switchState({
360
- flowObj: _flowObj,
359
+ flowObj: flowObj,
361
360
  msisdn: msisdn,
362
361
  operator: operator,
363
362
  subscription_url: subscription_url,
364
363
  redirect_url: redirect_url
365
364
  });
366
365
  } else {
367
- _flowObj2 = (0, _utils.determineFlowByOperator)(operator);
368
366
  switchState({
369
- flowObj: _flowObj2,
367
+ flowObj: flowObj,
370
368
  redirect_url: redirect_url,
371
369
  subscription_url: subscription_url,
372
370
  operator: operator
373
371
  });
374
372
  }
375
373
 
376
- _context2.next = 20;
374
+ _context2.next = 21;
377
375
  break;
378
376
 
379
- case 18:
377
+ case 19:
380
378
  _.tracker.sendOptInFlowEvent('Pin');
381
379
 
382
380
  return _context2.abrupt("return", dispatch({
@@ -391,12 +389,12 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
391
389
  }
392
390
  }));
393
391
 
394
- case 20:
395
- _context2.next = 28;
392
+ case 21:
393
+ _context2.next = 29;
396
394
  break;
397
395
 
398
- case 22:
399
- _context2.prev = 22;
396
+ case 23:
397
+ _context2.prev = 23;
400
398
  _context2.t0 = _context2["catch"](7);
401
399
  console.warn(_context2.t0);
402
400
 
@@ -417,12 +415,12 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
417
415
  }
418
416
  });
419
417
 
420
- case 28:
418
+ case 29:
421
419
  case "end":
422
420
  return _context2.stop();
423
421
  }
424
422
  }
425
- }, _callee2, null, [[7, 22]]);
423
+ }, _callee2, null, [[7, 23]]);
426
424
  }));
427
425
 
428
426
  return function (_x2) {
@@ -436,8 +434,7 @@ exports.he_pin_one_click_header_enrichment = he_pin_one_click_header_enrichment;
436
434
  var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_header_enrichment(defaultFlow) {
437
435
  return /*#__PURE__*/function () {
438
436
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) {
439
- var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator, _flowObj3, _flowObj4;
440
-
437
+ var switchState, ipRangeName, flowObj, heResult, msisdn, subscription_url, redirect_url, operator;
441
438
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
442
439
  while (1) {
443
440
  switch (_context3.prev = _context3.next) {
@@ -509,7 +506,7 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
509
506
  case 3:
510
507
  ipRangeName = _context3.sent;
511
508
 
512
- if (!(ipRangeName == null)) {
509
+ if (!(ipRangeName === null)) {
513
510
  _context3.next = 7;
514
511
  break;
515
512
  }
@@ -532,7 +529,7 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
532
529
  _context3.prev = 7;
533
530
  flowObj = (0, _utils.determineFlowByOperator)(ipRangeName.toUpperCase());
534
531
 
535
- if (!(flowObj.flow == 'oneClick')) {
532
+ if (!(flowObj.flow === 'oneClick')) {
536
533
  _context3.next = 18;
537
534
  break;
538
535
  }
@@ -550,20 +547,20 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
550
547
  if (msisdn && msisdn !== '') {
551
548
  _.tracker.customEvent('Flow', 'advance-auto', 'msisdn-detected', {
552
549
  msisdn: msisdn
553
- });
550
+ }); // const flowObj = determineFlowByOperator(operator);
551
+
554
552
 
555
- _flowObj3 = (0, _utils.determineFlowByOperator)(operator);
556
553
  switchState({
557
- flowObj: _flowObj3,
554
+ flowObj: flowObj,
558
555
  msisdn: msisdn,
559
556
  operator: operator,
560
557
  subscription_url: subscription_url,
561
558
  redirect_url: redirect_url
562
559
  });
563
560
  } else {
564
- _flowObj4 = (0, _utils.determineFlowByOperator)(operator);
561
+ // const flowObj = determineFlowByOperator(operator);
565
562
  switchState({
566
- flowObj: _flowObj4,
563
+ flowObj: flowObj,
567
564
  redirect_url: redirect_url,
568
565
  subscription_url: subscription_url,
569
566
  operator: operator
@@ -633,7 +630,7 @@ exports.he_mo_redir_one_click_header_enrichment = he_mo_redir_one_click_header_e
633
630
  var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichment(defaultFlow) {
634
631
  return /*#__PURE__*/function () {
635
632
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch) {
636
- var switchState, heResult, msisdn, operator, flowObj, _flowObj5, _flowObj6, _flowObj7;
633
+ var switchState, heResult, msisdn, operator, flowObj, _flowObj, _flowObj2, _flowObj3;
637
634
 
638
635
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
639
636
  while (1) {
@@ -662,7 +659,7 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
662
659
  });
663
660
 
664
661
  case 'pin':
665
- if (isHeaderEnrichmentSuccess == true) {
662
+ if (isHeaderEnrichmentSuccess === true) {
666
663
  _.tracker.sendOptInFlowEvent('Hybrid Pin');
667
664
  } else {
668
665
  _.tracker.sendOptInFlowEvent('Pin');
@@ -734,8 +731,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
734
731
  return (0, _utils.determineFlowByOperatorFromIp)();
735
732
 
736
733
  case 16:
737
- _flowObj5 = _context4.sent;
738
- switchState(_flowObj5, msisdn);
734
+ _flowObj = _context4.sent;
735
+ switchState(_flowObj, msisdn);
739
736
 
740
737
  case 18:
741
738
  _context4.next = 24;
@@ -746,8 +743,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
746
743
  return (0, _utils.determineFlowByOperatorFromIp)();
747
744
 
748
745
  case 22:
749
- _flowObj6 = _context4.sent;
750
- switchState(_flowObj6);
746
+ _flowObj2 = _context4.sent;
747
+ switchState(_flowObj2);
751
748
 
752
749
  case 24:
753
750
  _context4.next = 42;
@@ -767,8 +764,8 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
767
764
  return (0, _utils.determineFlowByOperatorFromIp)();
768
765
 
769
766
  case 33:
770
- _flowObj7 = _context4.sent;
771
- switchState(_flowObj7);
767
+ _flowObj3 = _context4.sent;
768
+ switchState(_flowObj3);
772
769
  _context4.next = 42;
773
770
  break;
774
771
 
@@ -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;