ouisys-engine 3.0.1 → 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.
- package/.babelrc +4 -8
- package/.eslintrc.js +1 -1
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -1
- package/.prettierignore +2 -1
- package/.vscode/settings.json +1 -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 +70 -69
- package/dist/reducers/pinFlow/IPinConstants.d.ts +1 -1
- package/dist/reducers/pinFlow/PinTypes.d.ts +24 -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 +3 -2
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +132 -74
- 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/mockData/config.json +1 -1
- package/package.json +23 -15
- package/setupJest.js +1 -1
- package/tsconfig.json +2 -2
- 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/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 -217
- package/src/reducers/pinFlow/IPinConstants.ts +0 -9
- package/src/reducers/pinFlow/PinTypes.ts +0 -189
- 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 -375
- package/src/reducers/strategy/index.ts +0 -321
- package/src/reducers/strategy/strategies/ask_mobile_number.ts +0 -316
- 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
|
@@ -46,19 +46,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
46
46
|
value: true
|
|
47
47
|
});
|
|
48
48
|
exports.default = ask_mobile_number;
|
|
49
|
-
exports.pin_mo_redir_ask_mobile_number = exports.pin_mo_ask_mobile_number = exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn = void 0;
|
|
49
|
+
exports.pin_mo_redir_ask_mobile_number = exports.pin_mo_ask_mobile_number = exports.pin_combo_ask_mobile_number = exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn = void 0;
|
|
50
50
|
exports.submitMSISDNAction = submitMSISDNAction;
|
|
51
51
|
|
|
52
52
|
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:
|
|
82
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
83
83
|
payload: {
|
|
84
|
-
type:
|
|
84
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
85
85
|
result: RDS.NothingYet(),
|
|
86
86
|
nextData: {
|
|
87
|
-
nextAction:
|
|
87
|
+
nextAction: 'submitMSISDNAction'
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
} catch (err) {
|
|
92
92
|
dispatch({
|
|
93
|
-
type:
|
|
93
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_ERROR',
|
|
94
94
|
payload: {
|
|
95
|
-
type:
|
|
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:
|
|
114
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
115
115
|
payload: {
|
|
116
|
-
type:
|
|
116
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
117
117
|
result: RDS.Loading(),
|
|
118
118
|
nextData: {
|
|
119
|
-
nextAction:
|
|
119
|
+
nextAction: 'submitMSISDNAction'
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
});
|
|
@@ -126,41 +126,45 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
126
126
|
|
|
127
127
|
case 5:
|
|
128
128
|
flowObj = _context.sent;
|
|
129
|
+
console.log('flowObj', flowObj);
|
|
129
130
|
dispatch({
|
|
130
|
-
type:
|
|
131
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
131
132
|
payload: {
|
|
132
|
-
type:
|
|
133
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
133
134
|
result: RDS.Success(flowObj),
|
|
134
135
|
nextData: _objectSpread({
|
|
135
|
-
nextAction:
|
|
136
|
+
nextAction: 'submitMSISDNAction'
|
|
136
137
|
}, flowObj.operator && {
|
|
137
138
|
operator: flowObj.operator
|
|
138
139
|
})
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
142
|
_context.t0 = strategy;
|
|
142
|
-
_context.next = _context.t0 ===
|
|
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
144
|
break;
|
|
144
145
|
|
|
145
|
-
case
|
|
146
|
+
case 11:
|
|
146
147
|
return _context.abrupt("return", dispatch(pin_mo_redir_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
147
148
|
|
|
148
|
-
case
|
|
149
|
+
case 12:
|
|
149
150
|
return _context.abrupt("return", dispatch(pin_mo_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
150
151
|
|
|
151
|
-
case
|
|
152
|
-
_context.
|
|
153
|
-
break;
|
|
152
|
+
case 13:
|
|
153
|
+
return _context.abrupt("return", dispatch(pin_combo_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
154
154
|
|
|
155
155
|
case 14:
|
|
156
|
-
_context.
|
|
156
|
+
_context.next = 21;
|
|
157
|
+
break;
|
|
158
|
+
|
|
159
|
+
case 16:
|
|
160
|
+
_context.prev = 16;
|
|
157
161
|
_context.t1 = _context["catch"](0);
|
|
158
162
|
console.warn(_context.t1);
|
|
159
|
-
errorType =
|
|
163
|
+
errorType = _context.t1.type === 'SEAlreadySubscribed' ? 'AlreadySubscribed' : _context.t1.type == 'SEInvalidMSISDN' ? 'InvalidMSISDN' : 'UnknownError';
|
|
160
164
|
dispatch({
|
|
161
|
-
type:
|
|
165
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT_ERROR',
|
|
162
166
|
payload: {
|
|
163
|
-
type:
|
|
167
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
164
168
|
result: RDS.Failure({
|
|
165
169
|
errorType: errorType,
|
|
166
170
|
error: _context.t1
|
|
@@ -168,12 +172,12 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
168
172
|
}
|
|
169
173
|
});
|
|
170
174
|
|
|
171
|
-
case
|
|
175
|
+
case 21:
|
|
172
176
|
case "end":
|
|
173
177
|
return _context.stop();
|
|
174
178
|
}
|
|
175
179
|
}
|
|
176
|
-
}, _callee, null, [[0,
|
|
180
|
+
}, _callee, null, [[0, 16]]);
|
|
177
181
|
}));
|
|
178
182
|
|
|
179
183
|
return function (_x) {
|
|
@@ -185,27 +189,27 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
185
189
|
var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn) {
|
|
186
190
|
return function (dispatch) {
|
|
187
191
|
switch (flowObj.flow) {
|
|
188
|
-
case
|
|
189
|
-
_.tracker.sendOptInFlowEvent(
|
|
192
|
+
case 'pin':
|
|
193
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
190
194
|
|
|
191
195
|
dispatch({
|
|
192
|
-
type:
|
|
196
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
193
197
|
payload: {
|
|
194
|
-
type:
|
|
198
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
195
199
|
result: RDS.Loading(),
|
|
196
200
|
nextData: _objectSpread({
|
|
197
|
-
nextAction:
|
|
201
|
+
nextAction: 'submitMSISDNAction'
|
|
198
202
|
}, flowObj.operator && {
|
|
199
203
|
operator: flowObj.operator
|
|
200
204
|
})
|
|
201
205
|
}
|
|
202
206
|
});
|
|
203
207
|
return dispatch({
|
|
204
|
-
type:
|
|
208
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
205
209
|
payload: {
|
|
206
|
-
type:
|
|
210
|
+
type: 'PIN',
|
|
207
211
|
result: _objectSpread({
|
|
208
|
-
nextAction:
|
|
212
|
+
nextAction: 'submitMSISDNAction',
|
|
209
213
|
config: flowObj.flowConfig,
|
|
210
214
|
msisdn: msisdn
|
|
211
215
|
}, flowObj.operator && {
|
|
@@ -214,15 +218,15 @@ var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn
|
|
|
214
218
|
}
|
|
215
219
|
});
|
|
216
220
|
|
|
217
|
-
case
|
|
218
|
-
_.tracker.sendOptInFlowEvent(
|
|
221
|
+
case 'mo':
|
|
222
|
+
_.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
219
223
|
|
|
220
224
|
return dispatch({
|
|
221
|
-
type:
|
|
225
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
222
226
|
payload: {
|
|
223
|
-
type:
|
|
227
|
+
type: 'MO',
|
|
224
228
|
result: _objectSpread({
|
|
225
|
-
nextAction:
|
|
229
|
+
nextAction: 'submitMSISDNAction',
|
|
226
230
|
config: flowObj.flowConfig,
|
|
227
231
|
msisdn: msisdn,
|
|
228
232
|
rockman_id: flowObj.rockman_id
|
|
@@ -233,14 +237,14 @@ var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn
|
|
|
233
237
|
});
|
|
234
238
|
|
|
235
239
|
default:
|
|
236
|
-
_.tracker.sendOptInFlowEvent(
|
|
240
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
237
241
|
|
|
238
242
|
return dispatch({
|
|
239
|
-
type:
|
|
243
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
240
244
|
payload: {
|
|
241
|
-
type:
|
|
245
|
+
type: 'PIN',
|
|
242
246
|
result: _objectSpread({
|
|
243
|
-
nextAction:
|
|
247
|
+
nextAction: 'submitMSISDNAction',
|
|
244
248
|
config: flowObj.flowConfig,
|
|
245
249
|
rockman_id: flowObj.rockman_id
|
|
246
250
|
}, flowObj.operator && {
|
|
@@ -254,28 +258,82 @@ var pin_mo_ask_mobile_number = function pin_mo_ask_mobile_number(flowObj, msisdn
|
|
|
254
258
|
|
|
255
259
|
exports.pin_mo_ask_mobile_number = pin_mo_ask_mobile_number;
|
|
256
260
|
|
|
261
|
+
var pin_combo_ask_mobile_number = function pin_combo_ask_mobile_number(flowObj, msisdn) {
|
|
262
|
+
return function (dispatch) {
|
|
263
|
+
switch (flowObj.flow) {
|
|
264
|
+
case 'pin':
|
|
265
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
266
|
+
|
|
267
|
+
dispatch({
|
|
268
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
269
|
+
payload: {
|
|
270
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
271
|
+
result: RDS.Loading(),
|
|
272
|
+
nextData: _objectSpread({
|
|
273
|
+
nextAction: 'submitMSISDNAction'
|
|
274
|
+
}, flowObj.operator && {
|
|
275
|
+
operator: flowObj.operator
|
|
276
|
+
})
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
return dispatch({
|
|
280
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
281
|
+
payload: {
|
|
282
|
+
type: 'PIN',
|
|
283
|
+
result: _objectSpread({
|
|
284
|
+
nextAction: 'submitMSISDNAction',
|
|
285
|
+
config: flowObj.flowConfig,
|
|
286
|
+
msisdn: msisdn
|
|
287
|
+
}, flowObj.operator && {
|
|
288
|
+
operator: flowObj.operator
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
default:
|
|
294
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
295
|
+
|
|
296
|
+
return dispatch({
|
|
297
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
298
|
+
payload: {
|
|
299
|
+
type: 'PIN',
|
|
300
|
+
result: _objectSpread({
|
|
301
|
+
nextAction: 'submitMSISDNAction',
|
|
302
|
+
config: flowObj.flowConfig,
|
|
303
|
+
rockman_id: flowObj.rockman_id
|
|
304
|
+
}, flowObj.operator && {
|
|
305
|
+
operator: flowObj.operator
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
exports.pin_combo_ask_mobile_number = pin_combo_ask_mobile_number;
|
|
314
|
+
|
|
257
315
|
var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flowObj, msisdn) {
|
|
258
316
|
return function (dispatch) {
|
|
259
317
|
switch (flowObj.flow) {
|
|
260
|
-
case
|
|
261
|
-
_.tracker.sendOptInFlowEvent(
|
|
318
|
+
case 'pin':
|
|
319
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
262
320
|
|
|
263
321
|
dispatch({
|
|
264
|
-
type:
|
|
322
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
265
323
|
payload: {
|
|
266
|
-
type:
|
|
324
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
267
325
|
result: RDS.Loading(),
|
|
268
326
|
nextData: {
|
|
269
|
-
nextAction:
|
|
327
|
+
nextAction: 'submitMSISDNAction'
|
|
270
328
|
}
|
|
271
329
|
}
|
|
272
330
|
});
|
|
273
331
|
return dispatch({
|
|
274
|
-
type:
|
|
332
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
275
333
|
payload: {
|
|
276
|
-
type:
|
|
334
|
+
type: 'PIN',
|
|
277
335
|
result: {
|
|
278
|
-
nextAction:
|
|
336
|
+
nextAction: 'submitMSISDNAction',
|
|
279
337
|
config: flowObj.flowConfig,
|
|
280
338
|
msisdn: msisdn,
|
|
281
339
|
rockman_id: flowObj.rockman_id
|
|
@@ -283,15 +341,15 @@ var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flo
|
|
|
283
341
|
}
|
|
284
342
|
});
|
|
285
343
|
|
|
286
|
-
case
|
|
287
|
-
_.tracker.sendOptInFlowEvent(
|
|
344
|
+
case 'moRedir':
|
|
345
|
+
_.tracker.sendOptInFlowEvent('Redirect');
|
|
288
346
|
|
|
289
347
|
return dispatch({
|
|
290
|
-
type:
|
|
348
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
291
349
|
payload: {
|
|
292
|
-
type:
|
|
350
|
+
type: 'MO_REDIR',
|
|
293
351
|
result: {
|
|
294
|
-
nextAction:
|
|
352
|
+
nextAction: 'submitMSISDNAction',
|
|
295
353
|
config: flowObj.flowConfig,
|
|
296
354
|
msisdn: msisdn,
|
|
297
355
|
rockman_id: flowObj.rockman_id
|
|
@@ -300,14 +358,14 @@ var pin_mo_redir_ask_mobile_number = function pin_mo_redir_ask_mobile_number(flo
|
|
|
300
358
|
});
|
|
301
359
|
|
|
302
360
|
default:
|
|
303
|
-
_.tracker.sendOptInFlowEvent(
|
|
361
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
304
362
|
|
|
305
363
|
return dispatch({
|
|
306
|
-
type:
|
|
364
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
307
365
|
payload: {
|
|
308
|
-
type:
|
|
366
|
+
type: 'PIN',
|
|
309
367
|
result: {
|
|
310
|
-
nextAction:
|
|
368
|
+
nextAction: 'submitMSISDNAction',
|
|
311
369
|
config: flowObj.flowConfig,
|
|
312
370
|
rockman_id: flowObj.rockman_id
|
|
313
371
|
}
|
|
@@ -322,15 +380,15 @@ exports.pin_mo_redir_ask_mobile_number = pin_mo_redir_ask_mobile_number;
|
|
|
322
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) {
|
|
323
381
|
return function (dispatch) {
|
|
324
382
|
switch (flowObj.flow) {
|
|
325
|
-
case
|
|
326
|
-
_.tracker.sendOptInFlowEvent(
|
|
383
|
+
case 'oneClick':
|
|
384
|
+
_.tracker.sendOptInFlowEvent('3G click');
|
|
327
385
|
|
|
328
386
|
return dispatch({
|
|
329
|
-
type:
|
|
387
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
330
388
|
payload: {
|
|
331
|
-
type:
|
|
389
|
+
type: 'ONE_CLICK',
|
|
332
390
|
result: {
|
|
333
|
-
nextAction:
|
|
391
|
+
nextAction: 'submitMSISDNAction',
|
|
334
392
|
config: flowObj.flowConfig,
|
|
335
393
|
msisdn: msisdn,
|
|
336
394
|
rockman_id: flowObj.rockman_id
|
|
@@ -338,15 +396,15 @@ var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin
|
|
|
338
396
|
}
|
|
339
397
|
});
|
|
340
398
|
|
|
341
|
-
case
|
|
342
|
-
_.tracker.sendOptInFlowEvent(
|
|
399
|
+
case 'mo':
|
|
400
|
+
_.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
343
401
|
|
|
344
402
|
return dispatch({
|
|
345
|
-
type:
|
|
403
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
346
404
|
payload: {
|
|
347
|
-
type:
|
|
405
|
+
type: 'MO',
|
|
348
406
|
result: {
|
|
349
|
-
nextAction:
|
|
407
|
+
nextAction: 'submitMSISDNAction',
|
|
350
408
|
config: flowObj.flowConfig,
|
|
351
409
|
msisdn: msisdn,
|
|
352
410
|
rockman_id: flowObj.rockman_id
|
|
@@ -355,14 +413,14 @@ var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin
|
|
|
355
413
|
});
|
|
356
414
|
|
|
357
415
|
default:
|
|
358
|
-
_.tracker.sendOptInFlowEvent(
|
|
416
|
+
_.tracker.sendOptInFlowEvent('Pin');
|
|
359
417
|
|
|
360
418
|
return dispatch({
|
|
361
|
-
type:
|
|
419
|
+
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
362
420
|
payload: {
|
|
363
|
-
type:
|
|
421
|
+
type: 'PIN',
|
|
364
422
|
result: {
|
|
365
|
-
nextAction:
|
|
423
|
+
nextAction: 'submitMSISDNAction',
|
|
366
424
|
config: flowObj.flowConfig,
|
|
367
425
|
rockman_id: flowObj.rockman_id
|
|
368
426
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppThunk } from
|
|
2
|
-
import { IFlow } from
|
|
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;
|