ouisys-engine 3.0.3 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +4 -8
- package/.eslintrc.js +1 -1
- package/.nvmrc +1 -1
- package/.prettierignore +2 -1
- package/README.md +2 -4
- package/dist/api/index.d.ts +5 -5
- package/dist/api/index.js +76 -76
- package/dist/common-types/AppThunk.d.ts +11 -12
- package/dist/common-types/IOptInFlowName.d.ts +1 -1
- package/dist/common-types/ITracker.js +1 -2
- package/dist/common-types/RemoteDataState.d.ts +4 -4
- package/dist/common-types/RemoteDataState.js +17 -17
- package/dist/flows/click2smsFlow.d.ts +2 -2
- package/dist/flows/moFlow.d.ts +2 -2
- package/dist/flows/moRedirFlow.d.ts +2 -2
- package/dist/flows/oneClickFlow.d.ts +2 -2
- package/dist/flows/pinFlow.d.ts +2 -2
- package/dist/flows/pinFlow.js +2 -0
- package/dist/flows/strategy.d.ts +8 -8
- package/dist/flows/ussdFlow.d.ts +2 -2
- package/dist/ips/tryGetIPRangeName.d.ts +1 -1
- package/dist/ips/tryGetIPRangeName.js +7 -5
- package/dist/jest.config.js +1 -1
- package/dist/pacman/index.d.ts +2 -2
- package/dist/pacman/index.js +41 -41
- package/dist/pacman/queryString.js +11 -9
- package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +19 -19
- package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +1 -1
- package/dist/reducers/click2smsFlow/index.d.ts +2 -2
- package/dist/reducers/click2smsFlow/index.js +24 -24
- package/dist/reducers/click2smsFlow/utils.d.ts +1 -1
- package/dist/reducers/click2smsFlow/utils.js +30 -30
- package/dist/reducers/moFlow/IMoConstants.d.ts +1 -1
- package/dist/reducers/moFlow/MoTypes.d.ts +13 -13
- package/dist/reducers/moFlow/index.d.ts +3 -3
- package/dist/reducers/moFlow/index.js +27 -27
- package/dist/reducers/moFlow/utils.d.ts +1 -2
- package/dist/reducers/moFlow/utils.js +28 -26
- package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +1 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +13 -13
- package/dist/reducers/moRedirFlow/index.d.ts +3 -3
- package/dist/reducers/moRedirFlow/index.js +27 -27
- package/dist/reducers/moRedirFlow/utils.d.ts +1 -1
- package/dist/reducers/moRedirFlow/utils.js +17 -17
- package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +1 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +10 -10
- package/dist/reducers/oneClickFlow/index.d.ts +3 -3
- package/dist/reducers/oneClickFlow/index.js +75 -68
- package/dist/reducers/oneClickFlow/utils.d.ts +2 -2
- package/dist/reducers/oneClickFlow/utils.js +38 -38
- package/dist/reducers/pinFlow/IPinConstants.d.ts +1 -1
- package/dist/reducers/pinFlow/PinTypes.d.ts +23 -23
- package/dist/reducers/pinFlow/index.d.ts +3 -3
- package/dist/reducers/pinFlow/index.js +76 -76
- package/dist/reducers/pinFlow/utils.d.ts +1 -1
- package/dist/reducers/pinFlow/utils.js +61 -65
- package/dist/reducers/strategy/IStategyActionContants.d.ts +1 -1
- package/dist/reducers/strategy/StrategyTypes.d.ts +56 -56
- package/dist/reducers/strategy/index.d.ts +2 -2
- package/dist/reducers/strategy/index.js +99 -99
- package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +2 -2
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +78 -78
- package/dist/reducers/strategy/strategies/ask_operator.d.ts +2 -2
- package/dist/reducers/strategy/strategies/ask_operator.js +64 -68
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +2 -2
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +97 -97
- package/dist/reducers/strategy/strategies/header_enrichment.d.ts +2 -2
- package/dist/reducers/strategy/strategies/header_enrichment.js +116 -120
- package/dist/reducers/strategy/utils.d.ts +3 -3
- package/dist/reducers/strategy/utils.js +115 -111
- package/dist/reducers/ussdFlow/IUssdConstants.d.ts +1 -1
- package/dist/reducers/ussdFlow/UssdTypes.d.ts +13 -13
- package/dist/reducers/ussdFlow/index.d.ts +3 -3
- package/dist/reducers/ussdFlow/index.js +27 -27
- package/dist/reducers/ussdFlow/utils.d.ts +1 -2
- package/dist/reducers/ussdFlow/utils.js +19 -17
- package/dist/store/index.d.ts +8 -8
- package/dist/store/index.js +87 -83
- package/dist/store/reducers.d.ts +7 -7
- package/dist/store/reducers.js +4 -4
- package/dist/utilities/handleSubmitNumber.d.ts +7 -3
- package/dist/utilities/handleSubmitNumber.js +15 -18
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +13 -11
- package/dist/utilities/loadScriptInnerHtml.js +0 -1
- package/index.html +21 -28
- package/package.json +23 -15
- package/setupJest.js +1 -1
- package/tsconfig.json +2 -2
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/ouisys-engine.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.vscode/settings.json +0 -6
- package/dist/api/click2sms.js +0 -357
- package/dist/api/mo.js +0 -274
- package/dist/api/moRedir.js +0 -186
- package/dist/api/oneClick.js +0 -366
- package/dist/api/pin.js +0 -493
- package/dist/api/strategies.js +0 -704
- package/dist/api/ussd.js +0 -1
- package/dist/app/store.js +0 -35
- package/dist/features/strategies/categories/askMobileNumber.js +0 -395
- package/dist/features/strategies/categories/askOperator.js +0 -311
- package/dist/features/strategies/categories/detectOperatorByIp.js +0 -606
- package/dist/features/strategies/categories/headerEnrichment.js +0 -670
- package/dist/features/strategies/categories/typings/click2smsSliceTypes.js +0 -12
- package/dist/features/strategies/categories/typings/identifySliceTypes.js +0 -22
- package/dist/features/strategies/categories/typings/moFlowSliceTypes.js +0 -22
- package/dist/features/strategies/categories/typings/moRedirFlowSliceTypes.js +0 -21
- package/dist/features/strategies/categories/typings/oneClickSliceTypes.js +0 -13
- package/dist/features/strategies/categories/typings/pinFlowSliceTypes.js +0 -13
- package/dist/features/strategies/click2smsFlowSlice.js +0 -172
- package/dist/features/strategies/identifySlice.js +0 -455
- package/dist/features/strategies/moFlowSlice.js +0 -196
- package/dist/features/strategies/moRedirFlowSlice.js +0 -190
- package/dist/features/strategies/oneClickFlowSlice.js +0 -277
- package/dist/features/strategies/pinFlowSlice.js +0 -313
- package/dist/features/strategies/ussdFlowSlice.js +0 -1
- package/dist/flows/tpayHeFlow.d.ts +0 -7
- package/dist/flows/tpayHeFlow.js +0 -23
- package/dist/mockServer/browser.js +0 -48
- package/dist/mockServer/handlers.js +0 -22
- package/dist/mockServer/server.js +0 -48
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.d.ts +0 -2
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +0 -1
- package/dist/reducers/tpayHeFlow/TpayHeTypes.d.ts +0 -114
- package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
- package/dist/reducers/tpayHeFlow/index.d.ts +0 -7
- package/dist/reducers/tpayHeFlow/index.js +0 -331
- package/dist/reducers/tpayHeFlow/utils.d.ts +0 -20
- package/dist/reducers/tpayHeFlow/utils.js +0 -510
- package/dist/test/setup.js +0 -24
- package/dist/test/test-utils.js +0 -51
- package/mockData/config.json +0 -28
- package/prettier.config.js +0 -7
- package/src/@types/react-tracker.d.ts +0 -16
- package/src/@types/redux-cli-logger.d.ts +0 -1
- package/src/@types/tiny-async-pool.d.ts +0 -3
- package/src/@types/window.d.ts +0 -74
- package/src/api/index.ts +0 -225
- package/src/common-types/AppThunk.ts +0 -19
- package/src/common-types/Either.ts +0 -3
- package/src/common-types/IError.ts +0 -5
- package/src/common-types/IOptInFlowName.ts +0 -1
- package/src/common-types/ITracker.ts +0 -10
- package/src/common-types/IVisitor.ts +0 -16
- package/src/common-types/RemoteDataState.ts +0 -88
- package/src/flows/click2smsFlow.ts +0 -18
- package/src/flows/moFlow.ts +0 -20
- package/src/flows/moRedirFlow.ts +0 -20
- package/src/flows/oneClickFlow.ts +0 -20
- package/src/flows/pinFlow.ts +0 -25
- package/src/flows/strategy.ts +0 -51
- package/src/flows/ussdFlow.ts +0 -20
- package/src/index.ts +0 -3
- package/src/ips/tryGetIPRangeName.ts +0 -22
- package/src/jest.config.js +0 -194
- package/src/pacman/index.ts +0 -71
- package/src/pacman/queryString.ts +0 -24
- package/src/reducers/click2smsFlow/Click2smsTypes.ts +0 -93
- package/src/reducers/click2smsFlow/IClick2smsConstants.ts +0 -4
- package/src/reducers/click2smsFlow/index.ts +0 -105
- package/src/reducers/click2smsFlow/utils.ts +0 -126
- package/src/reducers/moFlow/IMoConstants.ts +0 -7
- package/src/reducers/moFlow/MoTypes.ts +0 -125
- package/src/reducers/moFlow/index.ts +0 -150
- package/src/reducers/moFlow/utils.ts +0 -135
- package/src/reducers/moRedirFlow/IMoRedirConstants.ts +0 -7
- package/src/reducers/moRedirFlow/MoRedirTypes.ts +0 -99
- package/src/reducers/moRedirFlow/index.ts +0 -137
- package/src/reducers/moRedirFlow/utils.ts +0 -78
- package/src/reducers/oneClickFlow/IOneClickConstants.ts +0 -3
- package/src/reducers/oneClickFlow/OneClickTypes.ts +0 -108
- package/src/reducers/oneClickFlow/index.ts +0 -268
- package/src/reducers/oneClickFlow/utils.ts +0 -219
- package/src/reducers/pinFlow/IPinConstants.ts +0 -9
- package/src/reducers/pinFlow/PinTypes.ts +0 -190
- package/src/reducers/pinFlow/index.ts +0 -331
- package/src/reducers/pinFlow/utils.ts +0 -232
- package/src/reducers/strategy/IStategyActionContants.ts +0 -17
- package/src/reducers/strategy/StrategyTypes.ts +0 -376
- package/src/reducers/strategy/index.ts +0 -322
- package/src/reducers/strategy/strategies/ask_mobile_number.ts +0 -366
- package/src/reducers/strategy/strategies/ask_operator.ts +0 -195
- package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -414
- package/src/reducers/strategy/strategies/header_enrichment.ts +0 -489
- package/src/reducers/strategy/utils.ts +0 -357
- package/src/reducers/ussdFlow/IUssdConstants.ts +0 -7
- package/src/reducers/ussdFlow/UssdTypes.ts +0 -112
- package/src/reducers/ussdFlow/index.ts +0 -146
- package/src/reducers/ussdFlow/utils.ts +0 -88
- package/src/store/index.ts +0 -150
- package/src/store/reducers.ts +0 -37
- package/src/utilities/handleSubmitNumber.ts +0 -65
- package/src/utilities/index.ts +0 -114
- package/src/utilities/loadScriptInnerHtml.ts +0 -14
- package/src/utilities/loadScriptSrc.ts +0 -26
|
@@ -48,14 +48,14 @@ require("core-js/modules/es.regexp.to-string.js");
|
|
|
48
48
|
|
|
49
49
|
require("core-js/modules/es.promise.js");
|
|
50
50
|
|
|
51
|
-
var RDS = _interopRequireWildcard(require("../../../common-types/RemoteDataState"));
|
|
52
|
-
|
|
53
|
-
var _utils = require("../utils");
|
|
54
|
-
|
|
55
51
|
var _ = require("..");
|
|
56
52
|
|
|
53
|
+
var RDS = _interopRequireWildcard(require("../../../common-types/RemoteDataState"));
|
|
54
|
+
|
|
57
55
|
var _tryGetIPRangeName = _interopRequireDefault(require("../../../ips/tryGetIPRangeName"));
|
|
58
56
|
|
|
57
|
+
var _utils = require("../utils");
|
|
58
|
+
|
|
59
59
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
60
60
|
|
|
61
61
|
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); }
|
|
@@ -72,9 +72,9 @@ function identify_user() {
|
|
|
72
72
|
return function (dispatch) {
|
|
73
73
|
try {
|
|
74
74
|
dispatch({
|
|
75
|
-
type:
|
|
75
|
+
type: 'HE_IDENTIFY',
|
|
76
76
|
payload: {
|
|
77
|
-
type:
|
|
77
|
+
type: 'HE_IDENTIFY',
|
|
78
78
|
result: RDS.Loading()
|
|
79
79
|
}
|
|
80
80
|
});
|
|
@@ -86,23 +86,23 @@ function identify_user() {
|
|
|
86
86
|
var defaultFlow = strategyConfigs.default;
|
|
87
87
|
|
|
88
88
|
switch (strategy) {
|
|
89
|
-
case
|
|
89
|
+
case 'pin-header-enrichment':
|
|
90
90
|
return dispatch(pin_header_enrichment(defaultFlow));
|
|
91
91
|
|
|
92
|
-
case
|
|
92
|
+
case 'he-pin-mo-redir-header-enrichment':
|
|
93
93
|
return dispatch(he_pin_mo_redir_header_enrichment(defaultFlow));
|
|
94
94
|
|
|
95
|
-
case
|
|
95
|
+
case 'he-pin-one-click-header-enrichment':
|
|
96
96
|
return dispatch(he_pin_one_click_header_enrichment(defaultFlow));
|
|
97
97
|
|
|
98
|
-
case
|
|
98
|
+
case 'he-mo-redir-one-click-header-enrichment':
|
|
99
99
|
return dispatch(he_mo_redir_one_click_header_enrichment(defaultFlow));
|
|
100
100
|
}
|
|
101
101
|
} catch (err) {
|
|
102
102
|
dispatch({
|
|
103
|
-
type:
|
|
103
|
+
type: 'HE_IDENTIFY',
|
|
104
104
|
payload: {
|
|
105
|
-
type:
|
|
105
|
+
type: 'HE_IDENTIFY',
|
|
106
106
|
result: RDS.Failure(err)
|
|
107
107
|
}
|
|
108
108
|
});
|
|
@@ -124,21 +124,21 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
124
124
|
|
|
125
125
|
case 3:
|
|
126
126
|
ipRangeName = _context.sent;
|
|
127
|
-
console.log(
|
|
127
|
+
console.log('ipRangeName', ipRangeName);
|
|
128
128
|
|
|
129
129
|
if (!(ipRangeName == null)) {
|
|
130
130
|
_context.next = 8;
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
_.tracker.sendOptInFlowEvent(
|
|
134
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
135
135
|
|
|
136
136
|
return _context.abrupt("return", dispatch({
|
|
137
|
-
type:
|
|
137
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
138
138
|
payload: {
|
|
139
|
-
type:
|
|
139
|
+
type: 'PIN',
|
|
140
140
|
result: {
|
|
141
|
-
nextAction:
|
|
141
|
+
nextAction: 'submitMSISDNAction',
|
|
142
142
|
config: defaultFlow.flowConfig
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -152,8 +152,8 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
152
152
|
heResult = _context.sent;
|
|
153
153
|
flowObj = defaultFlow;
|
|
154
154
|
|
|
155
|
-
if (!(heResult.msisdn !== undefined && heResult.msisdn !==
|
|
156
|
-
_context.next =
|
|
155
|
+
if (!(heResult.msisdn !== undefined && heResult.msisdn !== '')) {
|
|
156
|
+
_context.next = 18;
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -164,14 +164,14 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
164
164
|
msisdn: msisdn
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
-
_.tracker.sendOptInFlowEvent(
|
|
167
|
+
_.tracker.sendOptInFlowEvent('Hybrid Pin');
|
|
168
168
|
|
|
169
169
|
return _context.abrupt("return", dispatch({
|
|
170
|
-
type:
|
|
170
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
171
171
|
payload: {
|
|
172
|
-
type:
|
|
172
|
+
type: 'PIN',
|
|
173
173
|
result: {
|
|
174
|
-
nextAction:
|
|
174
|
+
nextAction: 'submitMSISDNAction',
|
|
175
175
|
config: flowObj.flowConfig,
|
|
176
176
|
msisdn: msisdn,
|
|
177
177
|
rockman_id: flowObj.rockman_id,
|
|
@@ -180,26 +180,22 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
180
180
|
}
|
|
181
181
|
}));
|
|
182
182
|
|
|
183
|
-
case
|
|
184
|
-
_.tracker.sendOptInFlowEvent(
|
|
183
|
+
case 18:
|
|
184
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
185
185
|
|
|
186
186
|
return _context.abrupt("return", dispatch({
|
|
187
|
-
type:
|
|
187
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
188
188
|
payload: {
|
|
189
|
-
type:
|
|
189
|
+
type: 'PIN',
|
|
190
190
|
result: {
|
|
191
|
-
nextAction:
|
|
191
|
+
nextAction: 'submitMSISDNAction',
|
|
192
192
|
config: flowObj.flowConfig
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
}));
|
|
196
196
|
|
|
197
197
|
case 22:
|
|
198
|
-
_context.
|
|
199
|
-
break;
|
|
200
|
-
|
|
201
|
-
case 24:
|
|
202
|
-
_context.prev = 24;
|
|
198
|
+
_context.prev = 22;
|
|
203
199
|
_context.t0 = _context["catch"](0);
|
|
204
200
|
console.warn(_context.t0);
|
|
205
201
|
|
|
@@ -207,25 +203,25 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
207
203
|
errorType: _context.t0.toString()
|
|
208
204
|
});
|
|
209
205
|
|
|
210
|
-
_.tracker.sendOptInFlowEvent(
|
|
206
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
211
207
|
|
|
212
208
|
dispatch({
|
|
213
|
-
type:
|
|
209
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
214
210
|
payload: {
|
|
215
|
-
type:
|
|
211
|
+
type: 'PIN',
|
|
216
212
|
result: {
|
|
217
|
-
nextAction:
|
|
213
|
+
nextAction: 'submitMSISDNAction',
|
|
218
214
|
config: defaultFlow.flowConfig
|
|
219
215
|
}
|
|
220
216
|
}
|
|
221
217
|
});
|
|
222
218
|
|
|
223
|
-
case
|
|
219
|
+
case 28:
|
|
224
220
|
case "end":
|
|
225
221
|
return _context.stop();
|
|
226
222
|
}
|
|
227
223
|
}
|
|
228
|
-
}, _callee, null, [[0,
|
|
224
|
+
}, _callee, null, [[0, 22]]);
|
|
229
225
|
}));
|
|
230
226
|
|
|
231
227
|
return function (_x) {
|
|
@@ -251,18 +247,18 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
251
247
|
operator = _ref3.operator,
|
|
252
248
|
subscription_url = _ref3.subscription_url,
|
|
253
249
|
redirect_url = _ref3.redirect_url;
|
|
254
|
-
var isHeaderEnrichmentSuccess = msisdn !== undefined && msisdn !==
|
|
250
|
+
var isHeaderEnrichmentSuccess = !!(msisdn !== undefined && msisdn !== '');
|
|
255
251
|
|
|
256
252
|
switch (flowObj.flow) {
|
|
257
|
-
case
|
|
258
|
-
_.tracker.sendOptInFlowEvent(
|
|
253
|
+
case 'oneClick':
|
|
254
|
+
_.tracker.sendOptInFlowEvent('3G click');
|
|
259
255
|
|
|
260
256
|
return dispatch({
|
|
261
|
-
type:
|
|
257
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
262
258
|
payload: {
|
|
263
|
-
type:
|
|
259
|
+
type: 'ONE_CLICK',
|
|
264
260
|
result: {
|
|
265
|
-
nextAction:
|
|
261
|
+
nextAction: 'getRedirectUrlAction',
|
|
266
262
|
config: flowObj.flowConfig,
|
|
267
263
|
operator: flowObj.operator,
|
|
268
264
|
subscription_url: subscription_url || null,
|
|
@@ -271,19 +267,19 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
271
267
|
}
|
|
272
268
|
});
|
|
273
269
|
|
|
274
|
-
case
|
|
270
|
+
case 'pin':
|
|
275
271
|
if (isHeaderEnrichmentSuccess == true) {
|
|
276
|
-
_.tracker.sendOptInFlowEvent(
|
|
272
|
+
_.tracker.sendOptInFlowEvent('Hybrid Pin');
|
|
277
273
|
} else {
|
|
278
|
-
_.tracker.sendOptInFlowEvent(
|
|
274
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
279
275
|
}
|
|
280
276
|
|
|
281
277
|
return dispatch({
|
|
282
|
-
type:
|
|
278
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
283
279
|
payload: {
|
|
284
|
-
type:
|
|
280
|
+
type: 'PIN',
|
|
285
281
|
result: {
|
|
286
|
-
nextAction:
|
|
282
|
+
nextAction: 'submitMSISDNAction',
|
|
287
283
|
config: flowObj.flowConfig,
|
|
288
284
|
msisdn: msisdn,
|
|
289
285
|
rockman_id: flowObj.rockman_id,
|
|
@@ -294,14 +290,14 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
294
290
|
});
|
|
295
291
|
|
|
296
292
|
default:
|
|
297
|
-
_.tracker.sendOptInFlowEvent(
|
|
293
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
298
294
|
|
|
299
295
|
return dispatch({
|
|
300
|
-
type:
|
|
296
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
301
297
|
payload: {
|
|
302
|
-
type:
|
|
298
|
+
type: 'PIN',
|
|
303
299
|
result: {
|
|
304
|
-
nextAction:
|
|
300
|
+
nextAction: 'submitMSISDNAction',
|
|
305
301
|
config: defaultFlow.flowConfig,
|
|
306
302
|
rockman_id: defaultFlow.rockman_id
|
|
307
303
|
}
|
|
@@ -321,14 +317,14 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
321
317
|
break;
|
|
322
318
|
}
|
|
323
319
|
|
|
324
|
-
_.tracker.sendOptInFlowEvent(
|
|
320
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
325
321
|
|
|
326
322
|
return _context2.abrupt("return", dispatch({
|
|
327
|
-
type:
|
|
323
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
328
324
|
payload: {
|
|
329
|
-
type:
|
|
325
|
+
type: 'PIN',
|
|
330
326
|
result: {
|
|
331
|
-
nextAction:
|
|
327
|
+
nextAction: 'submitMSISDNAction',
|
|
332
328
|
config: defaultFlow.flowConfig,
|
|
333
329
|
rockman_id: defaultFlow.rockman_id
|
|
334
330
|
}
|
|
@@ -339,7 +335,7 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
339
335
|
_context2.prev = 7;
|
|
340
336
|
flowObj = (0, _utils.determineFlowByOperator)(ipRangeName.toUpperCase());
|
|
341
337
|
|
|
342
|
-
if (!(flowObj.flow ==
|
|
338
|
+
if (!(flowObj.flow == 'oneClick')) {
|
|
343
339
|
_context2.next = 18;
|
|
344
340
|
break;
|
|
345
341
|
}
|
|
@@ -354,7 +350,7 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
354
350
|
msisdn = heResult.msisdn, subscription_url = heResult.subscription_url, redirect_url = heResult.redirect_url;
|
|
355
351
|
operator = heResult.operator ? heResult.operator.toUpperCase() : ipRangeName.toUpperCase();
|
|
356
352
|
|
|
357
|
-
if (msisdn && msisdn !==
|
|
353
|
+
if (msisdn && msisdn !== '') {
|
|
358
354
|
_.tracker.customEvent('Flow', 'advance-auto', 'msisdn-detected', {
|
|
359
355
|
msisdn: msisdn
|
|
360
356
|
});
|
|
@@ -381,14 +377,14 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
381
377
|
break;
|
|
382
378
|
|
|
383
379
|
case 18:
|
|
384
|
-
_.tracker.sendOptInFlowEvent(
|
|
380
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
385
381
|
|
|
386
382
|
return _context2.abrupt("return", dispatch({
|
|
387
|
-
type:
|
|
383
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
388
384
|
payload: {
|
|
389
|
-
type:
|
|
385
|
+
type: 'PIN',
|
|
390
386
|
result: {
|
|
391
|
-
nextAction:
|
|
387
|
+
nextAction: 'submitMSISDNAction',
|
|
392
388
|
config: defaultFlow.flowConfig,
|
|
393
389
|
rockman_id: defaultFlow.rockman_id
|
|
394
390
|
}
|
|
@@ -408,14 +404,14 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
|
|
|
408
404
|
errorType: _context2.t0.toString()
|
|
409
405
|
});
|
|
410
406
|
|
|
411
|
-
_.tracker.sendOptInFlowEvent(
|
|
407
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
412
408
|
|
|
413
409
|
dispatch({
|
|
414
|
-
type:
|
|
410
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
415
411
|
payload: {
|
|
416
|
-
type:
|
|
412
|
+
type: 'PIN',
|
|
417
413
|
result: {
|
|
418
|
-
nextAction:
|
|
414
|
+
nextAction: 'submitMSISDNAction',
|
|
419
415
|
config: defaultFlow.flowConfig
|
|
420
416
|
}
|
|
421
417
|
}
|
|
@@ -452,18 +448,18 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
452
448
|
operator = _ref5.operator,
|
|
453
449
|
subscription_url = _ref5.subscription_url,
|
|
454
450
|
redirect_url = _ref5.redirect_url;
|
|
455
|
-
var isHeaderEnrichmentSuccess = msisdn !== undefined && msisdn !==
|
|
451
|
+
var isHeaderEnrichmentSuccess = !!(msisdn !== undefined && msisdn !== '');
|
|
456
452
|
|
|
457
453
|
switch (flowObj.flow) {
|
|
458
|
-
case
|
|
459
|
-
_.tracker.sendOptInFlowEvent(
|
|
454
|
+
case 'oneClick':
|
|
455
|
+
_.tracker.sendOptInFlowEvent('3G click');
|
|
460
456
|
|
|
461
457
|
return dispatch({
|
|
462
|
-
type:
|
|
458
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
463
459
|
payload: {
|
|
464
|
-
type:
|
|
460
|
+
type: 'ONE_CLICK',
|
|
465
461
|
result: {
|
|
466
|
-
nextAction:
|
|
462
|
+
nextAction: 'getRedirectUrlAction',
|
|
467
463
|
config: flowObj.flowConfig,
|
|
468
464
|
operator: flowObj.operator,
|
|
469
465
|
subscription_url: subscription_url || null,
|
|
@@ -472,15 +468,15 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
472
468
|
}
|
|
473
469
|
});
|
|
474
470
|
|
|
475
|
-
case
|
|
476
|
-
_.tracker.sendOptInFlowEvent(
|
|
471
|
+
case 'moRedir':
|
|
472
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
477
473
|
|
|
478
474
|
return dispatch({
|
|
479
|
-
type:
|
|
475
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
480
476
|
payload: {
|
|
481
|
-
type:
|
|
477
|
+
type: 'MO_REDIR',
|
|
482
478
|
result: {
|
|
483
|
-
nextAction:
|
|
479
|
+
nextAction: 'submitMSISDNAction',
|
|
484
480
|
config: flowObj.flowConfig,
|
|
485
481
|
msisdn: msisdn,
|
|
486
482
|
rockman_id: flowObj.rockman_id,
|
|
@@ -491,14 +487,14 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
491
487
|
});
|
|
492
488
|
|
|
493
489
|
default:
|
|
494
|
-
_.tracker.sendOptInFlowEvent(
|
|
490
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
495
491
|
|
|
496
492
|
return dispatch({
|
|
497
|
-
type:
|
|
493
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
498
494
|
payload: {
|
|
499
|
-
type:
|
|
495
|
+
type: 'MO_REDIR',
|
|
500
496
|
result: {
|
|
501
|
-
nextAction:
|
|
497
|
+
nextAction: 'submitMSISDNAction',
|
|
502
498
|
config: defaultFlow.flowConfig,
|
|
503
499
|
rockman_id: defaultFlow.rockman_id
|
|
504
500
|
}
|
|
@@ -518,14 +514,14 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
518
514
|
break;
|
|
519
515
|
}
|
|
520
516
|
|
|
521
|
-
_.tracker.sendOptInFlowEvent(
|
|
517
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
522
518
|
|
|
523
519
|
return _context3.abrupt("return", dispatch({
|
|
524
|
-
type:
|
|
520
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
525
521
|
payload: {
|
|
526
|
-
type:
|
|
522
|
+
type: 'MO_REDIR',
|
|
527
523
|
result: {
|
|
528
|
-
nextAction:
|
|
524
|
+
nextAction: 'submitMSISDNAction',
|
|
529
525
|
config: defaultFlow.flowConfig,
|
|
530
526
|
rockman_id: defaultFlow.rockman_id
|
|
531
527
|
}
|
|
@@ -536,7 +532,7 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
536
532
|
_context3.prev = 7;
|
|
537
533
|
flowObj = (0, _utils.determineFlowByOperator)(ipRangeName.toUpperCase());
|
|
538
534
|
|
|
539
|
-
if (!(flowObj.flow ==
|
|
535
|
+
if (!(flowObj.flow == 'oneClick')) {
|
|
540
536
|
_context3.next = 18;
|
|
541
537
|
break;
|
|
542
538
|
}
|
|
@@ -551,7 +547,7 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
551
547
|
msisdn = heResult.msisdn, subscription_url = heResult.subscription_url, redirect_url = heResult.redirect_url;
|
|
552
548
|
operator = heResult.operator ? heResult.operator.toUpperCase() : ipRangeName.toUpperCase();
|
|
553
549
|
|
|
554
|
-
if (msisdn && msisdn !==
|
|
550
|
+
if (msisdn && msisdn !== '') {
|
|
555
551
|
_.tracker.customEvent('Flow', 'advance-auto', 'msisdn-detected', {
|
|
556
552
|
msisdn: msisdn
|
|
557
553
|
});
|
|
@@ -578,14 +574,14 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
578
574
|
break;
|
|
579
575
|
|
|
580
576
|
case 18:
|
|
581
|
-
_.tracker.sendOptInFlowEvent(
|
|
577
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
582
578
|
|
|
583
579
|
return _context3.abrupt("return", dispatch({
|
|
584
|
-
type:
|
|
580
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
585
581
|
payload: {
|
|
586
|
-
type:
|
|
582
|
+
type: 'MO_REDIR',
|
|
587
583
|
result: {
|
|
588
|
-
nextAction:
|
|
584
|
+
nextAction: 'submitMSISDNAction',
|
|
589
585
|
config: defaultFlow.flowConfig,
|
|
590
586
|
rockman_id: defaultFlow.rockman_id
|
|
591
587
|
}
|
|
@@ -605,14 +601,14 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
|
|
|
605
601
|
errorType: _context3.t0.toString()
|
|
606
602
|
});
|
|
607
603
|
|
|
608
|
-
_.tracker.sendOptInFlowEvent(
|
|
604
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
609
605
|
|
|
610
606
|
dispatch({
|
|
611
|
-
type:
|
|
607
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
612
608
|
payload: {
|
|
613
|
-
type:
|
|
609
|
+
type: 'MO_REDIR',
|
|
614
610
|
result: {
|
|
615
|
-
nextAction:
|
|
611
|
+
nextAction: 'submitMSISDNAction',
|
|
616
612
|
config: defaultFlow.flowConfig
|
|
617
613
|
}
|
|
618
614
|
}
|
|
@@ -644,18 +640,18 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
644
640
|
switch (_context4.prev = _context4.next) {
|
|
645
641
|
case 0:
|
|
646
642
|
switchState = function switchState(flowObj, msisdn, operator) {
|
|
647
|
-
var isHeaderEnrichmentSuccess = msisdn !== undefined && msisdn !==
|
|
643
|
+
var isHeaderEnrichmentSuccess = !!(msisdn !== undefined && msisdn !== '');
|
|
648
644
|
|
|
649
645
|
switch (flowObj.flow) {
|
|
650
|
-
case
|
|
651
|
-
_.tracker.sendOptInFlowEvent(
|
|
646
|
+
case 'moRedir':
|
|
647
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
652
648
|
|
|
653
649
|
return dispatch({
|
|
654
|
-
type:
|
|
650
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
655
651
|
payload: {
|
|
656
|
-
type:
|
|
652
|
+
type: 'MO_REDIR',
|
|
657
653
|
result: {
|
|
658
|
-
nextAction:
|
|
654
|
+
nextAction: 'submitMSISDNAction',
|
|
659
655
|
config: flowObj.flowConfig,
|
|
660
656
|
msisdn: msisdn,
|
|
661
657
|
rockman_id: flowObj.rockman_id,
|
|
@@ -665,19 +661,19 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
665
661
|
}
|
|
666
662
|
});
|
|
667
663
|
|
|
668
|
-
case
|
|
664
|
+
case 'pin':
|
|
669
665
|
if (isHeaderEnrichmentSuccess == true) {
|
|
670
|
-
_.tracker.sendOptInFlowEvent(
|
|
666
|
+
_.tracker.sendOptInFlowEvent('Hybrid Pin');
|
|
671
667
|
} else {
|
|
672
|
-
_.tracker.sendOptInFlowEvent(
|
|
668
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
673
669
|
}
|
|
674
670
|
|
|
675
671
|
return dispatch({
|
|
676
|
-
type:
|
|
672
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
677
673
|
payload: {
|
|
678
|
-
type:
|
|
674
|
+
type: 'PIN',
|
|
679
675
|
result: {
|
|
680
|
-
nextAction:
|
|
676
|
+
nextAction: 'submitMSISDNAction',
|
|
681
677
|
config: flowObj.flowConfig,
|
|
682
678
|
msisdn: msisdn,
|
|
683
679
|
rockman_id: flowObj.rockman_id,
|
|
@@ -688,14 +684,14 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
688
684
|
});
|
|
689
685
|
|
|
690
686
|
default:
|
|
691
|
-
_.tracker.sendOptInFlowEvent(
|
|
687
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
692
688
|
|
|
693
689
|
return dispatch({
|
|
694
|
-
type:
|
|
690
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
695
691
|
payload: {
|
|
696
|
-
type:
|
|
692
|
+
type: 'PIN',
|
|
697
693
|
result: {
|
|
698
|
-
nextAction:
|
|
694
|
+
nextAction: 'submitMSISDNAction',
|
|
699
695
|
config: defaultFlow.flowConfig,
|
|
700
696
|
rockman_id: defaultFlow.rockman_id
|
|
701
697
|
}
|
|
@@ -711,7 +707,7 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
711
707
|
case 4:
|
|
712
708
|
heResult = _context4.sent;
|
|
713
709
|
|
|
714
|
-
if (!(heResult.msisdn !== undefined && heResult.msisdn !==
|
|
710
|
+
if (!(heResult.msisdn !== undefined && heResult.msisdn !== '')) {
|
|
715
711
|
_context4.next = 20;
|
|
716
712
|
break;
|
|
717
713
|
}
|
|
@@ -723,7 +719,7 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
723
719
|
msisdn: msisdn
|
|
724
720
|
});
|
|
725
721
|
|
|
726
|
-
if (!(!!operator && operator !==
|
|
722
|
+
if (!(!!operator && operator !== '')) {
|
|
727
723
|
_context4.next = 14;
|
|
728
724
|
break;
|
|
729
725
|
}
|
|
@@ -781,14 +777,14 @@ var he_pin_mo_redir_header_enrichment = function he_pin_mo_redir_header_enrichme
|
|
|
781
777
|
_context4.t1 = _context4["catch"](30);
|
|
782
778
|
console.warn(_context4.t1);
|
|
783
779
|
|
|
784
|
-
_.tracker.sendOptInFlowEvent(
|
|
780
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
785
781
|
|
|
786
782
|
dispatch({
|
|
787
|
-
type:
|
|
783
|
+
type: 'IDENTIFY_FLOW_BY_HE',
|
|
788
784
|
payload: {
|
|
789
|
-
type:
|
|
785
|
+
type: 'PIN',
|
|
790
786
|
result: {
|
|
791
|
-
nextAction:
|
|
787
|
+
nextAction: 'submitMSISDNAction',
|
|
792
788
|
config: defaultFlow.flowConfig
|
|
793
789
|
}
|
|
794
790
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ILinkExtraParams } from
|
|
3
|
-
import
|
|
1
|
+
import Either from '../../common-types/Either';
|
|
2
|
+
import { ILinkExtraParams } from '../oneClickFlow/OneClickTypes';
|
|
3
|
+
import { IConfig, IFlow, IStrategy, IStrategyReducerState } from './StrategyTypes';
|
|
4
4
|
export declare const wait: (ms: number) => Promise<unknown>;
|
|
5
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>;
|