ouisys-engine 3.0.3 → 3.0.5

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 (195) hide show
  1. package/.babelrc +4 -8
  2. package/.eslintrc.js +1 -1
  3. package/.husky/pre-commit +4 -0
  4. package/.nvmrc +1 -1
  5. package/.prettierignore +2 -1
  6. package/.vscode/settings.json +1 -1
  7. package/README.md +2 -4
  8. package/dist/api/index.d.ts +5 -5
  9. package/dist/api/index.js +76 -76
  10. package/dist/common-types/AppThunk.d.ts +11 -12
  11. package/dist/common-types/IOptInFlowName.d.ts +1 -1
  12. package/dist/common-types/ITracker.js +1 -2
  13. package/dist/common-types/RemoteDataState.d.ts +4 -4
  14. package/dist/common-types/RemoteDataState.js +17 -17
  15. package/dist/flows/click2smsFlow.d.ts +2 -2
  16. package/dist/flows/moFlow.d.ts +2 -2
  17. package/dist/flows/moRedirFlow.d.ts +2 -2
  18. package/dist/flows/oneClickFlow.d.ts +2 -2
  19. package/dist/flows/pinFlow.d.ts +2 -2
  20. package/dist/flows/pinFlow.js +2 -0
  21. package/dist/flows/strategy.d.ts +8 -8
  22. package/dist/flows/ussdFlow.d.ts +2 -2
  23. package/dist/ips/tryGetIPRangeName.d.ts +1 -1
  24. package/dist/ips/tryGetIPRangeName.js +7 -5
  25. package/dist/jest.config.js +1 -1
  26. package/dist/pacman/index.d.ts +2 -2
  27. package/dist/pacman/index.js +41 -41
  28. package/dist/pacman/queryString.js +11 -9
  29. package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +19 -19
  30. package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +1 -1
  31. package/dist/reducers/click2smsFlow/index.d.ts +2 -2
  32. package/dist/reducers/click2smsFlow/index.js +24 -24
  33. package/dist/reducers/click2smsFlow/utils.d.ts +1 -1
  34. package/dist/reducers/click2smsFlow/utils.js +30 -30
  35. package/dist/reducers/moFlow/IMoConstants.d.ts +1 -1
  36. package/dist/reducers/moFlow/MoTypes.d.ts +13 -13
  37. package/dist/reducers/moFlow/index.d.ts +3 -3
  38. package/dist/reducers/moFlow/index.js +27 -27
  39. package/dist/reducers/moFlow/utils.d.ts +1 -2
  40. package/dist/reducers/moFlow/utils.js +28 -26
  41. package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +1 -1
  42. package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +13 -13
  43. package/dist/reducers/moRedirFlow/index.d.ts +3 -3
  44. package/dist/reducers/moRedirFlow/index.js +27 -27
  45. package/dist/reducers/moRedirFlow/utils.d.ts +1 -1
  46. package/dist/reducers/moRedirFlow/utils.js +17 -17
  47. package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +1 -1
  48. package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +10 -10
  49. package/dist/reducers/oneClickFlow/index.d.ts +3 -3
  50. package/dist/reducers/oneClickFlow/index.js +75 -68
  51. package/dist/reducers/oneClickFlow/utils.d.ts +2 -2
  52. package/dist/reducers/oneClickFlow/utils.js +38 -38
  53. package/dist/reducers/pinFlow/IPinConstants.d.ts +1 -1
  54. package/dist/reducers/pinFlow/PinTypes.d.ts +23 -23
  55. package/dist/reducers/pinFlow/index.d.ts +3 -3
  56. package/dist/reducers/pinFlow/index.js +76 -76
  57. package/dist/reducers/pinFlow/utils.d.ts +1 -1
  58. package/dist/reducers/pinFlow/utils.js +61 -65
  59. package/dist/reducers/strategy/IStategyActionContants.d.ts +1 -1
  60. package/dist/reducers/strategy/StrategyTypes.d.ts +56 -56
  61. package/dist/reducers/strategy/index.d.ts +2 -2
  62. package/dist/reducers/strategy/index.js +99 -99
  63. package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +2 -2
  64. package/dist/reducers/strategy/strategies/ask_mobile_number.js +78 -78
  65. package/dist/reducers/strategy/strategies/ask_operator.d.ts +2 -2
  66. package/dist/reducers/strategy/strategies/ask_operator.js +64 -68
  67. package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +2 -2
  68. package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +97 -97
  69. package/dist/reducers/strategy/strategies/header_enrichment.d.ts +2 -2
  70. package/dist/reducers/strategy/strategies/header_enrichment.js +116 -120
  71. package/dist/reducers/strategy/utils.d.ts +3 -3
  72. package/dist/reducers/strategy/utils.js +115 -111
  73. package/dist/reducers/ussdFlow/IUssdConstants.d.ts +1 -1
  74. package/dist/reducers/ussdFlow/UssdTypes.d.ts +13 -13
  75. package/dist/reducers/ussdFlow/index.d.ts +3 -3
  76. package/dist/reducers/ussdFlow/index.js +27 -27
  77. package/dist/reducers/ussdFlow/utils.d.ts +1 -2
  78. package/dist/reducers/ussdFlow/utils.js +19 -17
  79. package/dist/store/index.d.ts +8 -8
  80. package/dist/store/index.js +87 -83
  81. package/dist/store/reducers.d.ts +7 -7
  82. package/dist/store/reducers.js +4 -4
  83. package/dist/utilities/handleSubmitNumber.d.ts +7 -3
  84. package/dist/utilities/handleSubmitNumber.js +15 -18
  85. package/dist/utilities/index.d.ts +1 -1
  86. package/dist/utilities/index.js +13 -11
  87. package/dist/utilities/loadScriptInnerHtml.js +0 -1
  88. package/index.html +21 -28
  89. package/mockData/config.json +1 -1
  90. package/package.json +23 -15
  91. package/setupJest.js +1 -1
  92. package/tsconfig.json +2 -2
  93. package/dist/api/click2sms.js +0 -357
  94. package/dist/api/mo.js +0 -274
  95. package/dist/api/moRedir.js +0 -186
  96. package/dist/api/oneClick.js +0 -366
  97. package/dist/api/pin.js +0 -493
  98. package/dist/api/strategies.js +0 -704
  99. package/dist/api/ussd.js +0 -1
  100. package/dist/app/store.js +0 -35
  101. package/dist/features/strategies/categories/askMobileNumber.js +0 -395
  102. package/dist/features/strategies/categories/askOperator.js +0 -311
  103. package/dist/features/strategies/categories/detectOperatorByIp.js +0 -606
  104. package/dist/features/strategies/categories/headerEnrichment.js +0 -670
  105. package/dist/features/strategies/categories/typings/click2smsSliceTypes.js +0 -12
  106. package/dist/features/strategies/categories/typings/identifySliceTypes.js +0 -22
  107. package/dist/features/strategies/categories/typings/moFlowSliceTypes.js +0 -22
  108. package/dist/features/strategies/categories/typings/moRedirFlowSliceTypes.js +0 -21
  109. package/dist/features/strategies/categories/typings/oneClickSliceTypes.js +0 -13
  110. package/dist/features/strategies/categories/typings/pinFlowSliceTypes.js +0 -13
  111. package/dist/features/strategies/click2smsFlowSlice.js +0 -172
  112. package/dist/features/strategies/identifySlice.js +0 -455
  113. package/dist/features/strategies/moFlowSlice.js +0 -196
  114. package/dist/features/strategies/moRedirFlowSlice.js +0 -190
  115. package/dist/features/strategies/oneClickFlowSlice.js +0 -277
  116. package/dist/features/strategies/pinFlowSlice.js +0 -313
  117. package/dist/features/strategies/ussdFlowSlice.js +0 -1
  118. package/dist/flows/tpayHeFlow.d.ts +0 -7
  119. package/dist/flows/tpayHeFlow.js +0 -23
  120. package/dist/mockServer/browser.js +0 -48
  121. package/dist/mockServer/handlers.js +0 -22
  122. package/dist/mockServer/server.js +0 -48
  123. package/dist/reducers/tpayHeFlow/ITpayHeConstants.d.ts +0 -2
  124. package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +0 -1
  125. package/dist/reducers/tpayHeFlow/TpayHeTypes.d.ts +0 -114
  126. package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
  127. package/dist/reducers/tpayHeFlow/index.d.ts +0 -7
  128. package/dist/reducers/tpayHeFlow/index.js +0 -331
  129. package/dist/reducers/tpayHeFlow/utils.d.ts +0 -20
  130. package/dist/reducers/tpayHeFlow/utils.js +0 -510
  131. package/dist/test/setup.js +0 -24
  132. package/dist/test/test-utils.js +0 -51
  133. package/prettier.config.js +0 -7
  134. package/src/@types/react-tracker.d.ts +0 -16
  135. package/src/@types/redux-cli-logger.d.ts +0 -1
  136. package/src/@types/tiny-async-pool.d.ts +0 -3
  137. package/src/@types/window.d.ts +0 -74
  138. package/src/api/index.ts +0 -225
  139. package/src/common-types/AppThunk.ts +0 -19
  140. package/src/common-types/Either.ts +0 -3
  141. package/src/common-types/IError.ts +0 -5
  142. package/src/common-types/IOptInFlowName.ts +0 -1
  143. package/src/common-types/ITracker.ts +0 -10
  144. package/src/common-types/IVisitor.ts +0 -16
  145. package/src/common-types/RemoteDataState.ts +0 -88
  146. package/src/flows/click2smsFlow.ts +0 -18
  147. package/src/flows/moFlow.ts +0 -20
  148. package/src/flows/moRedirFlow.ts +0 -20
  149. package/src/flows/oneClickFlow.ts +0 -20
  150. package/src/flows/pinFlow.ts +0 -25
  151. package/src/flows/strategy.ts +0 -51
  152. package/src/flows/ussdFlow.ts +0 -20
  153. package/src/index.ts +0 -3
  154. package/src/ips/tryGetIPRangeName.ts +0 -22
  155. package/src/jest.config.js +0 -194
  156. package/src/pacman/index.ts +0 -71
  157. package/src/pacman/queryString.ts +0 -24
  158. package/src/reducers/click2smsFlow/Click2smsTypes.ts +0 -93
  159. package/src/reducers/click2smsFlow/IClick2smsConstants.ts +0 -4
  160. package/src/reducers/click2smsFlow/index.ts +0 -105
  161. package/src/reducers/click2smsFlow/utils.ts +0 -126
  162. package/src/reducers/moFlow/IMoConstants.ts +0 -7
  163. package/src/reducers/moFlow/MoTypes.ts +0 -125
  164. package/src/reducers/moFlow/index.ts +0 -150
  165. package/src/reducers/moFlow/utils.ts +0 -135
  166. package/src/reducers/moRedirFlow/IMoRedirConstants.ts +0 -7
  167. package/src/reducers/moRedirFlow/MoRedirTypes.ts +0 -99
  168. package/src/reducers/moRedirFlow/index.ts +0 -137
  169. package/src/reducers/moRedirFlow/utils.ts +0 -78
  170. package/src/reducers/oneClickFlow/IOneClickConstants.ts +0 -3
  171. package/src/reducers/oneClickFlow/OneClickTypes.ts +0 -108
  172. package/src/reducers/oneClickFlow/index.ts +0 -268
  173. package/src/reducers/oneClickFlow/utils.ts +0 -219
  174. package/src/reducers/pinFlow/IPinConstants.ts +0 -9
  175. package/src/reducers/pinFlow/PinTypes.ts +0 -190
  176. package/src/reducers/pinFlow/index.ts +0 -331
  177. package/src/reducers/pinFlow/utils.ts +0 -232
  178. package/src/reducers/strategy/IStategyActionContants.ts +0 -17
  179. package/src/reducers/strategy/StrategyTypes.ts +0 -376
  180. package/src/reducers/strategy/index.ts +0 -322
  181. package/src/reducers/strategy/strategies/ask_mobile_number.ts +0 -366
  182. package/src/reducers/strategy/strategies/ask_operator.ts +0 -195
  183. package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -414
  184. package/src/reducers/strategy/strategies/header_enrichment.ts +0 -489
  185. package/src/reducers/strategy/utils.ts +0 -357
  186. package/src/reducers/ussdFlow/IUssdConstants.ts +0 -7
  187. package/src/reducers/ussdFlow/UssdTypes.ts +0 -112
  188. package/src/reducers/ussdFlow/index.ts +0 -146
  189. package/src/reducers/ussdFlow/utils.ts +0 -88
  190. package/src/store/index.ts +0 -150
  191. package/src/store/reducers.ts +0 -37
  192. package/src/utilities/handleSubmitNumber.ts +0 -65
  193. package/src/utilities/index.ts +0 -114
  194. package/src/utilities/loadScriptInnerHtml.ts +0 -14
  195. package/src/utilities/loadScriptSrc.ts +0 -26
@@ -53,12 +53,12 @@ require("core-js/modules/es.object.to-string.js");
53
53
 
54
54
  require("core-js/modules/es.promise.js");
55
55
 
56
+ var _ = require("..");
57
+
56
58
  var RDS = _interopRequireWildcard(require("../../../common-types/RemoteDataState"));
57
59
 
58
60
  var _utils = require("../utils");
59
61
 
60
- var _ = require("..");
61
-
62
62
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
63
63
 
64
64
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -79,20 +79,20 @@ function ask_mobile_number() {
79
79
  return function (dispatch) {
80
80
  try {
81
81
  dispatch({
82
- type: "IDENTIFY_FLOW_BY_MSISDN",
82
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
83
83
  payload: {
84
- type: "IDENTIFY_FLOW_BY_MSISDN",
84
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
85
85
  result: RDS.NothingYet(),
86
86
  nextData: {
87
- nextAction: "submitMSISDNAction"
87
+ nextAction: 'submitMSISDNAction'
88
88
  }
89
89
  }
90
90
  });
91
91
  } catch (err) {
92
92
  dispatch({
93
- type: "IDENTIFY_FLOW_BY_MSISDN_ERROR",
93
+ type: 'IDENTIFY_FLOW_BY_MSISDN_ERROR',
94
94
  payload: {
95
- type: "IDENTIFY_FLOW_BY_MSISDN",
95
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
96
96
  result: RDS.Failure(err)
97
97
  }
98
98
  });
@@ -111,12 +111,12 @@ function submitMSISDNAction(internationalMSISDN) {
111
111
  case 0:
112
112
  _context.prev = 0;
113
113
  dispatch({
114
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
114
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
115
115
  payload: {
116
- type: "IDENTIFY_FLOW_BY_MSISDN",
116
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
117
117
  result: RDS.Loading(),
118
118
  nextData: {
119
- nextAction: "submitMSISDNAction"
119
+ nextAction: 'submitMSISDNAction'
120
120
  }
121
121
  }
122
122
  });
@@ -126,21 +126,21 @@ function submitMSISDNAction(internationalMSISDN) {
126
126
 
127
127
  case 5:
128
128
  flowObj = _context.sent;
129
- console.log("flowObj", flowObj);
129
+ console.log('flowObj', flowObj);
130
130
  dispatch({
131
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
131
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
132
132
  payload: {
133
- type: "IDENTIFY_FLOW_BY_MSISDN",
133
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
134
134
  result: RDS.Success(flowObj),
135
135
  nextData: _objectSpread({
136
- nextAction: "submitMSISDNAction"
136
+ nextAction: 'submitMSISDNAction'
137
137
  }, flowObj.operator && {
138
138
  operator: flowObj.operator
139
139
  })
140
140
  }
141
141
  });
142
142
  _context.t0 = strategy;
143
- _context.next = _context.t0 === "pin-mo-redir-ask-mobile-number" ? 11 : _context.t0 === "pin-mo-ask-mobile-number" ? 12 : _context.t0 === "pin-combo-ask-mobile-number" ? 13 : 14;
143
+ _context.next = _context.t0 === 'pin-mo-redir-ask-mobile-number' ? 11 : _context.t0 === 'pin-mo-ask-mobile-number' ? 12 : _context.t0 === 'pin-combo-ask-mobile-number' ? 13 : 14;
144
144
  break;
145
145
 
146
146
  case 11:
@@ -160,11 +160,11 @@ function submitMSISDNAction(internationalMSISDN) {
160
160
  _context.prev = 16;
161
161
  _context.t1 = _context["catch"](0);
162
162
  console.warn(_context.t1);
163
- errorType = "SEAlreadySubscribed" === _context.t1.type ? "AlreadySubscribed" : "SEInvalidMSISDN" == _context.t1.type ? "InvalidMSISDN" : "UnknownError";
163
+ errorType = _context.t1.type === 'SEAlreadySubscribed' ? 'AlreadySubscribed' : _context.t1.type == 'SEInvalidMSISDN' ? 'InvalidMSISDN' : 'UnknownError';
164
164
  dispatch({
165
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT_ERROR",
165
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT_ERROR',
166
166
  payload: {
167
- type: "IDENTIFY_FLOW_BY_MSISDN",
167
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
168
168
  result: RDS.Failure({
169
169
  errorType: errorType,
170
170
  error: _context.t1
@@ -189,27 +189,27 @@ function submitMSISDNAction(internationalMSISDN) {
189
189
  var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn) {
190
190
  return function (dispatch) {
191
191
  switch (flowObj.flow) {
192
- case "pin":
193
- _.tracker.sendOptInFlowEvent("Pin");
192
+ case 'pin':
193
+ _.tracker.sendOptInFlowEvent('Pin');
194
194
 
195
195
  dispatch({
196
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
196
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
197
197
  payload: {
198
- type: "IDENTIFY_FLOW_BY_MSISDN",
198
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
199
199
  result: RDS.Loading(),
200
200
  nextData: _objectSpread({
201
- nextAction: "submitMSISDNAction"
201
+ nextAction: 'submitMSISDNAction'
202
202
  }, flowObj.operator && {
203
203
  operator: flowObj.operator
204
204
  })
205
205
  }
206
206
  });
207
207
  return dispatch({
208
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
208
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
209
209
  payload: {
210
- type: "PIN",
210
+ type: 'PIN',
211
211
  result: _objectSpread({
212
- nextAction: "submitMSISDNAction",
212
+ nextAction: 'submitMSISDNAction',
213
213
  config: flowObj.flowConfig,
214
214
  msisdn: msisdn
215
215
  }, flowObj.operator && {
@@ -218,15 +218,15 @@ var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn
218
218
  }
219
219
  });
220
220
 
221
- case "mo":
222
- _.tracker.sendOptInFlowEvent("Msisdn to sms");
221
+ case 'mo':
222
+ _.tracker.sendOptInFlowEvent('Msisdn to sms');
223
223
 
224
224
  return dispatch({
225
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
225
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
226
226
  payload: {
227
- type: "MO",
227
+ type: 'MO',
228
228
  result: _objectSpread({
229
- nextAction: "submitMSISDNAction",
229
+ nextAction: 'submitMSISDNAction',
230
230
  config: flowObj.flowConfig,
231
231
  msisdn: msisdn,
232
232
  rockman_id: flowObj.rockman_id
@@ -237,14 +237,14 @@ var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn
237
237
  });
238
238
 
239
239
  default:
240
- _.tracker.sendOptInFlowEvent("Pin");
240
+ _.tracker.sendOptInFlowEvent('Pin');
241
241
 
242
242
  return dispatch({
243
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
243
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
244
244
  payload: {
245
- type: "PIN",
245
+ type: 'PIN',
246
246
  result: _objectSpread({
247
- nextAction: "submitMSISDNAction",
247
+ nextAction: 'submitMSISDNAction',
248
248
  config: flowObj.flowConfig,
249
249
  rockman_id: flowObj.rockman_id
250
250
  }, flowObj.operator && {
@@ -261,27 +261,27 @@ exports.pin_mo_ask_mobile_number = pin_mo_ask_mobile_number;
261
261
  var pin_combo_ask_mobile_number = function pin_combo_ask_mobile_number(flowObj, msisdn) {
262
262
  return function (dispatch) {
263
263
  switch (flowObj.flow) {
264
- case "pin":
265
- _.tracker.sendOptInFlowEvent("Pin");
264
+ case 'pin':
265
+ _.tracker.sendOptInFlowEvent('Pin');
266
266
 
267
267
  dispatch({
268
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
268
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
269
269
  payload: {
270
- type: "IDENTIFY_FLOW_BY_MSISDN",
270
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
271
271
  result: RDS.Loading(),
272
272
  nextData: _objectSpread({
273
- nextAction: "submitMSISDNAction"
273
+ nextAction: 'submitMSISDNAction'
274
274
  }, flowObj.operator && {
275
275
  operator: flowObj.operator
276
276
  })
277
277
  }
278
278
  });
279
279
  return dispatch({
280
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
280
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
281
281
  payload: {
282
- type: "PIN",
282
+ type: 'PIN',
283
283
  result: _objectSpread({
284
- nextAction: "submitMSISDNAction",
284
+ nextAction: 'submitMSISDNAction',
285
285
  config: flowObj.flowConfig,
286
286
  msisdn: msisdn
287
287
  }, flowObj.operator && {
@@ -291,14 +291,14 @@ var pin_combo_ask_mobile_number = function pin_combo_ask_mobile_number(flowObj,
291
291
  });
292
292
 
293
293
  default:
294
- _.tracker.sendOptInFlowEvent("Pin");
294
+ _.tracker.sendOptInFlowEvent('Pin');
295
295
 
296
296
  return dispatch({
297
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
297
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
298
298
  payload: {
299
- type: "PIN",
299
+ type: 'PIN',
300
300
  result: _objectSpread({
301
- nextAction: "submitMSISDNAction",
301
+ nextAction: 'submitMSISDNAction',
302
302
  config: flowObj.flowConfig,
303
303
  rockman_id: flowObj.rockman_id
304
304
  }, flowObj.operator && {
@@ -315,25 +315,25 @@ exports.pin_combo_ask_mobile_number = pin_combo_ask_mobile_number;
315
315
  var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flowObj, msisdn) {
316
316
  return function (dispatch) {
317
317
  switch (flowObj.flow) {
318
- case "pin":
319
- _.tracker.sendOptInFlowEvent("Pin");
318
+ case 'pin':
319
+ _.tracker.sendOptInFlowEvent('Pin');
320
320
 
321
321
  dispatch({
322
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
322
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
323
323
  payload: {
324
- type: "IDENTIFY_FLOW_BY_MSISDN",
324
+ type: 'IDENTIFY_FLOW_BY_MSISDN',
325
325
  result: RDS.Loading(),
326
326
  nextData: {
327
- nextAction: "submitMSISDNAction"
327
+ nextAction: 'submitMSISDNAction'
328
328
  }
329
329
  }
330
330
  });
331
331
  return dispatch({
332
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
332
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
333
333
  payload: {
334
- type: "PIN",
334
+ type: 'PIN',
335
335
  result: {
336
- nextAction: "submitMSISDNAction",
336
+ nextAction: 'submitMSISDNAction',
337
337
  config: flowObj.flowConfig,
338
338
  msisdn: msisdn,
339
339
  rockman_id: flowObj.rockman_id
@@ -341,15 +341,15 @@ var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flo
341
341
  }
342
342
  });
343
343
 
344
- case "moRedir":
345
- _.tracker.sendOptInFlowEvent("Redirect");
344
+ case 'moRedir':
345
+ _.tracker.sendOptInFlowEvent('Redirect');
346
346
 
347
347
  return dispatch({
348
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
348
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
349
349
  payload: {
350
- type: "MO_REDIR",
350
+ type: 'MO_REDIR',
351
351
  result: {
352
- nextAction: "submitMSISDNAction",
352
+ nextAction: 'submitMSISDNAction',
353
353
  config: flowObj.flowConfig,
354
354
  msisdn: msisdn,
355
355
  rockman_id: flowObj.rockman_id
@@ -358,14 +358,14 @@ var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flo
358
358
  });
359
359
 
360
360
  default:
361
- _.tracker.sendOptInFlowEvent("Pin");
361
+ _.tracker.sendOptInFlowEvent('Pin');
362
362
 
363
363
  return dispatch({
364
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
364
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
365
365
  payload: {
366
- type: "PIN",
366
+ type: 'PIN',
367
367
  result: {
368
- nextAction: "submitMSISDNAction",
368
+ nextAction: 'submitMSISDNAction',
369
369
  config: flowObj.flowConfig,
370
370
  rockman_id: flowObj.rockman_id
371
371
  }
@@ -380,15 +380,15 @@ exports.pin_mo_redir_ask_mobile_number = pin_mo_redir_ask_mobile_number;
380
380
  var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin_detect_operator_by_ip_or_msisdn(flowObj, msisdn) {
381
381
  return function (dispatch) {
382
382
  switch (flowObj.flow) {
383
- case "oneClick":
384
- _.tracker.sendOptInFlowEvent("3G click");
383
+ case 'oneClick':
384
+ _.tracker.sendOptInFlowEvent('3G click');
385
385
 
386
386
  return dispatch({
387
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
387
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
388
388
  payload: {
389
- type: "ONE_CLICK",
389
+ type: 'ONE_CLICK',
390
390
  result: {
391
- nextAction: "submitMSISDNAction",
391
+ nextAction: 'submitMSISDNAction',
392
392
  config: flowObj.flowConfig,
393
393
  msisdn: msisdn,
394
394
  rockman_id: flowObj.rockman_id
@@ -396,15 +396,15 @@ var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin
396
396
  }
397
397
  });
398
398
 
399
- case "mo":
400
- _.tracker.sendOptInFlowEvent("Msisdn to sms");
399
+ case 'mo':
400
+ _.tracker.sendOptInFlowEvent('Msisdn to sms');
401
401
 
402
402
  return dispatch({
403
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
403
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
404
404
  payload: {
405
- type: "MO",
405
+ type: 'MO',
406
406
  result: {
407
- nextAction: "submitMSISDNAction",
407
+ nextAction: 'submitMSISDNAction',
408
408
  config: flowObj.flowConfig,
409
409
  msisdn: msisdn,
410
410
  rockman_id: flowObj.rockman_id
@@ -413,14 +413,14 @@ var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin
413
413
  });
414
414
 
415
415
  default:
416
- _.tracker.sendOptInFlowEvent("Pin");
416
+ _.tracker.sendOptInFlowEvent('Pin');
417
417
 
418
418
  return dispatch({
419
- type: "IDENTIFY_FLOW_BY_MSISDN_SUBMIT",
419
+ type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
420
420
  payload: {
421
- type: "PIN",
421
+ type: 'PIN',
422
422
  result: {
423
- nextAction: "submitMSISDNAction",
423
+ nextAction: 'submitMSISDNAction',
424
424
  config: flowObj.flowConfig,
425
425
  rockman_id: flowObj.rockman_id
426
426
  }
@@ -1,5 +1,5 @@
1
- import { AppThunk } from "../../../common-types/AppThunk";
2
- import { IFlow } from "../StrategyTypes";
1
+ import { AppThunk } from '../../../common-types/AppThunk';
2
+ import { IFlow } from '../StrategyTypes';
3
3
  export default function ask_operator(): AppThunk;
4
4
  export declare const he_pin_one_click_ask_operator: (flowObj: IFlow) => AppThunk;
5
5
  export declare function selectOperator(operator: string): AppThunk;
@@ -53,12 +53,12 @@ require("core-js/modules/es.object.to-string.js");
53
53
 
54
54
  require("core-js/modules/es.promise.js");
55
55
 
56
+ var _ = require("..");
57
+
56
58
  var RDS = _interopRequireWildcard(require("../../../common-types/RemoteDataState"));
57
59
 
58
60
  var _utils = require("../utils");
59
61
 
60
- var _ = require("..");
61
-
62
62
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
63
63
 
64
64
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -86,20 +86,20 @@ function ask_operator() {
86
86
  try {
87
87
  operators = (0, _utils.getOperators)();
88
88
  dispatch({
89
- type: "IDENTIFY_FLOW_BY_OPERATOR_SELECT",
89
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT',
90
90
  payload: {
91
- type: "IDENTIFY_FLOW_BY_OPERATOR_SELECT",
91
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT',
92
92
  result: {
93
93
  operators: operators,
94
- nextAction: "selectOperator"
94
+ nextAction: 'selectOperator'
95
95
  }
96
96
  }
97
97
  });
98
98
  } catch (err) {
99
99
  dispatch({
100
- type: "IDENTIFY_FLOW_BY_OPERATOR_SELECT",
100
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT',
101
101
  payload: {
102
- type: "IDENTIFY_FLOW_BY_OPERATOR_SELECT",
102
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT',
103
103
  result: RDS.Failure(err)
104
104
  }
105
105
  });
@@ -129,9 +129,9 @@ var he_pin_one_click_ask_operator = function he_pin_one_click_ask_operator(flowO
129
129
  case 0:
130
130
  _context2.prev = 0;
131
131
  dispatch({
132
- type: "OPERATOR_SELECT",
132
+ type: 'OPERATOR_SELECT',
133
133
  payload: {
134
- type: "PIN",
134
+ type: 'PIN',
135
135
  result: RDS.Loading()
136
136
  }
137
137
  });
@@ -141,22 +141,22 @@ var he_pin_one_click_ask_operator = function he_pin_one_click_ask_operator(flowO
141
141
  case 4:
142
142
  heResult = _context2.sent;
143
143
 
144
- if (!(heResult.msisdn !== undefined && heResult.msisdn !== "")) {
145
- _context2.next = 12;
144
+ if (!(heResult.msisdn !== undefined && heResult.msisdn !== '')) {
145
+ _context2.next = 10;
146
146
  break;
147
147
  }
148
148
 
149
149
  msisdn = heResult.msisdn;
150
150
  operator = heResult.operator;
151
151
 
152
- _.tracker.sendOptInFlowEvent("Hybrid Pin");
152
+ _.tracker.sendOptInFlowEvent('Hybrid Pin');
153
153
 
154
154
  return _context2.abrupt("return", dispatch({
155
- type: "OPERATOR_SELECT",
155
+ type: 'OPERATOR_SELECT',
156
156
  payload: {
157
- type: "PIN",
157
+ type: 'PIN',
158
158
  result: {
159
- nextAction: "submitMSISDNAction",
159
+ nextAction: 'submitMSISDNAction',
160
160
  config: flowObj.flowConfig,
161
161
  msisdn: msisdn,
162
162
  rockman_id: flowObj.rockman_id,
@@ -165,48 +165,44 @@ var he_pin_one_click_ask_operator = function he_pin_one_click_ask_operator(flowO
165
165
  }
166
166
  }));
167
167
 
168
- case 12:
169
- _.tracker.sendOptInFlowEvent("Pin");
168
+ case 10:
169
+ _.tracker.sendOptInFlowEvent('Pin');
170
170
 
171
171
  return _context2.abrupt("return", dispatch({
172
- type: "OPERATOR_SELECT",
172
+ type: 'OPERATOR_SELECT',
173
173
  payload: {
174
- type: "PIN",
174
+ type: 'PIN',
175
175
  result: {
176
- nextAction: "submitMSISDNAction",
176
+ nextAction: 'submitMSISDNAction',
177
177
  config: flowObj.flowConfig
178
178
  }
179
179
  }
180
180
  }));
181
181
 
182
182
  case 14:
183
- _context2.next = 21;
184
- break;
185
-
186
- case 16:
187
- _context2.prev = 16;
183
+ _context2.prev = 14;
188
184
  _context2.t0 = _context2["catch"](0);
189
185
  console.warn(_context2.t0);
190
186
 
191
- _.tracker.sendOptInFlowEvent("Pin");
187
+ _.tracker.sendOptInFlowEvent('Pin');
192
188
 
193
189
  dispatch({
194
- type: "OPERATOR_SELECT",
190
+ type: 'OPERATOR_SELECT',
195
191
  payload: {
196
- type: "PIN",
192
+ type: 'PIN',
197
193
  result: {
198
- nextAction: "submitMSISDNAction",
194
+ nextAction: 'submitMSISDNAction',
199
195
  config: flowObj.flowConfig
200
196
  }
201
197
  }
202
198
  });
203
199
 
204
- case 21:
200
+ case 19:
205
201
  case "end":
206
202
  return _context2.stop();
207
203
  }
208
204
  }
209
- }, _callee2, null, [[0, 16]]);
205
+ }, _callee2, null, [[0, 14]]);
210
206
  }));
211
207
 
212
208
  return function (_x2) {
@@ -227,49 +223,49 @@ function selectOperator(operator) {
227
223
  strategyConfigs = _getConfig.strategyConfigs;
228
224
 
229
225
  switch (flowObj.flow) {
230
- case "pin":
231
- if (strategy === "he-pin-one-click-ask-operator") {
226
+ case 'pin':
227
+ if (strategy === 'he-pin-one-click-ask-operator') {
232
228
  return dispatch(he_pin_one_click_ask_operator(flowObj));
233
- } else {
234
- _.tracker.sendOptInFlowEvent("Pin");
235
-
236
- return dispatch({
237
- type: "OPERATOR_SELECT",
238
- payload: {
239
- type: "PIN",
240
- result: {
241
- nextAction: "submitMSISDNAction",
242
- config: flowObj.flowConfig,
243
- operator: operator
244
- }
245
- }
246
- });
247
229
  }
248
230
 
249
- case "mo":
250
- _.tracker.sendOptInFlowEvent("Msisdn to sms");
231
+ _.tracker.sendOptInFlowEvent('Pin');
232
+
233
+ return dispatch({
234
+ type: 'OPERATOR_SELECT',
235
+ payload: {
236
+ type: 'PIN',
237
+ result: {
238
+ nextAction: 'submitMSISDNAction',
239
+ config: flowObj.flowConfig,
240
+ operator: operator
241
+ }
242
+ }
243
+ });
244
+
245
+ case 'mo':
246
+ _.tracker.sendOptInFlowEvent('Msisdn to sms');
251
247
 
252
248
  return dispatch({
253
- type: "OPERATOR_SELECT",
249
+ type: 'OPERATOR_SELECT',
254
250
  payload: {
255
- type: "MO",
251
+ type: 'MO',
256
252
  result: {
257
- nextAction: "submitMSISDNAction",
253
+ nextAction: 'submitMSISDNAction',
258
254
  config: flowObj.flowConfig,
259
255
  operator: operator
260
256
  }
261
257
  }
262
258
  });
263
259
 
264
- case "click2sms":
265
- _.tracker.sendOptInFlowEvent("Click to sms");
260
+ case 'click2sms':
261
+ _.tracker.sendOptInFlowEvent('Click to sms');
266
262
 
267
263
  return dispatch({
268
- type: "OPERATOR_SELECT",
264
+ type: 'OPERATOR_SELECT',
269
265
  payload: {
270
- type: "CLICK2SMS",
266
+ type: 'CLICK2SMS',
271
267
  result: {
272
- nextAction: "loadOc2sms",
268
+ nextAction: 'loadOc2sms',
273
269
  config: _objectSpread({
274
270
  operators: [operator]
275
271
  }, flowObj.flowConfig),
@@ -278,15 +274,15 @@ function selectOperator(operator) {
278
274
  }
279
275
  });
280
276
 
281
- case "oneClick":
282
- _.tracker.sendOptInFlowEvent("3G click");
277
+ case 'oneClick':
278
+ _.tracker.sendOptInFlowEvent('3G click');
283
279
 
284
280
  return dispatch({
285
- type: "OPERATOR_SELECT",
281
+ type: 'OPERATOR_SELECT',
286
282
  payload: {
287
- type: "ONE_CLICK",
283
+ type: 'ONE_CLICK',
288
284
  result: {
289
- nextAction: "getRedirectUrlAction",
285
+ nextAction: 'getRedirectUrlAction',
290
286
  config: flowObj.flowConfig,
291
287
  operator: operator,
292
288
  autoRedirect: true
@@ -295,24 +291,24 @@ function selectOperator(operator) {
295
291
  });
296
292
 
297
293
  default:
298
- _.tracker.sendOptInFlowEvent("Pin");
294
+ _.tracker.sendOptInFlowEvent('Pin');
299
295
 
300
296
  return dispatch({
301
- type: "OPERATOR_SELECT",
297
+ type: 'OPERATOR_SELECT',
302
298
  payload: {
303
- type: "PIN",
299
+ type: 'PIN',
304
300
  result: RDS.NothingYet()
305
301
  }
306
302
  });
307
303
  }
308
304
  } catch (ex) {
309
- _.tracker.sendOptInFlowEvent("Pin");
305
+ _.tracker.sendOptInFlowEvent('Pin');
310
306
 
311
307
  console.log(ex);
312
308
  dispatch({
313
- type: "OPERATOR_SELECT",
309
+ type: 'OPERATOR_SELECT',
314
310
  payload: {
315
- type: "PIN",
311
+ type: 'PIN',
316
312
  result: RDS.NothingYet()
317
313
  }
318
314
  });
@@ -1,5 +1,5 @@
1
- import { AppThunk } from "../../../common-types/AppThunk";
2
- import { IFlow } from "../StrategyTypes";
1
+ import { AppThunk } from '../../../common-types/AppThunk';
2
+ import { IFlow } from '../StrategyTypes';
3
3
  export default function detect_operator_by_ip(): AppThunk;
4
4
  export declare const pin_mo_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
5
5
  export declare const mo_one_click_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;