ouisys-engine 4.3.0-alpha.0 → 4.5.0-alpha.0
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/dist/@types/window.d.js +1 -1
- package/dist/api/index.d.ts +43 -0
- package/dist/api/index.js +1 -728
- package/dist/common-types/AppThunk.d.ts +13 -0
- package/dist/common-types/AppThunk.js +1 -1
- package/dist/common-types/Either.d.ts +8 -0
- package/dist/common-types/Either.js +1 -1
- package/dist/common-types/IError.d.ts +3 -0
- package/dist/common-types/IError.js +1 -1
- package/dist/common-types/IOptInFlowName.d.ts +1 -0
- package/dist/common-types/ITracker.d.ts +9 -0
- package/dist/common-types/ITracker.js +1 -3
- package/dist/common-types/IVisitor.d.ts +14 -0
- package/dist/common-types/IVisitor.js +1 -1
- package/dist/common-types/RemoteDataState.d.ts +38 -0
- package/dist/common-types/RemoteDataState.js +1 -135
- package/dist/custom-hooks/useOneClickRedirectUrl.d.ts +3 -0
- package/dist/custom-hooks/useOneClickRedirectUrl.js +1 -0
- package/dist/custom-hooks/usePinEntryState.d.ts +8 -0
- package/dist/custom-hooks/usePinEntryState.js +1 -0
- package/dist/custom-hooks/useStrategyConfig.d.ts +4 -0
- package/dist/custom-hooks/useStrategyConfig.js +1 -0
- package/dist/flows/click2smsFlow.d.ts +6 -0
- package/dist/flows/click2smsFlow.js +1 -19
- package/dist/flows/creditCardFlow.d.ts +6 -0
- package/dist/flows/creditCardFlow.js +1 -0
- package/dist/flows/moFlow.d.ts +6 -0
- package/dist/flows/moFlow.js +1 -19
- package/dist/flows/moRedirFlow.d.ts +6 -0
- package/dist/flows/moRedirFlow.js +1 -19
- package/dist/flows/oneClickFlow.d.ts +7 -0
- package/dist/flows/oneClickFlow.js +1 -23
- package/dist/flows/pinFlow.d.ts +7 -0
- package/dist/flows/pinFlow.js +1 -23
- package/dist/flows/strategy.d.ts +14 -0
- package/dist/flows/strategy.js +1 -53
- package/dist/flows/ussdFlow.d.ts +6 -0
- package/dist/flows/ussdFlow.js +1 -19
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -2
- package/dist/ips/tryGetIPRangeName.d.ts +2 -0
- package/dist/ips/tryGetIPRangeName.js +1 -74
- package/dist/jest.config.js +194 -0
- package/dist/pacman/index.d.ts +6 -0
- package/dist/pacman/index.js +1 -108
- package/dist/pacman/queryString.d.ts +3 -0
- package/dist/pacman/queryString.js +1 -45
- package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +76 -0
- package/dist/reducers/click2smsFlow/Click2smsTypes.js +1 -1
- package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +2 -0
- package/dist/reducers/click2smsFlow/IClick2smsConstants.js +1 -1
- package/dist/reducers/click2smsFlow/index.d.ts +5 -0
- package/dist/reducers/click2smsFlow/index.js +1 -183
- package/dist/reducers/click2smsFlow/utils.d.ts +4 -0
- package/dist/reducers/click2smsFlow/utils.js +1 -357
- package/dist/reducers/creditCardFlow/CreditCardTypes.d.ts +79 -0
- package/dist/reducers/creditCardFlow/CreditCardTypes.js +1 -0
- package/dist/reducers/creditCardFlow/ICreditCardConstants.d.ts +2 -0
- package/dist/reducers/creditCardFlow/ICreditCardConstants.js +1 -0
- package/dist/reducers/creditCardFlow/index.d.ts +5 -0
- package/dist/reducers/creditCardFlow/index.js +1 -0
- package/dist/reducers/creditCardFlow/utils.d.ts +8 -0
- package/dist/reducers/creditCardFlow/utils.js +1 -0
- package/dist/reducers/moFlow/IMoConstants.d.ts +2 -0
- package/dist/reducers/moFlow/IMoConstants.js +1 -1
- package/dist/reducers/moFlow/MoTypes.d.ts +88 -0
- package/dist/reducers/moFlow/MoTypes.js +1 -1
- package/dist/reducers/moFlow/index.d.ts +16 -0
- package/dist/reducers/moFlow/index.js +1 -251
- package/dist/reducers/moFlow/utils.d.ts +12 -0
- package/dist/reducers/moFlow/utils.js +1 -284
- package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +2 -0
- package/dist/reducers/moRedirFlow/IMoRedirConstants.js +1 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +64 -0
- package/dist/reducers/moRedirFlow/MoRedirTypes.js +1 -1
- package/dist/reducers/moRedirFlow/index.d.ts +14 -0
- package/dist/reducers/moRedirFlow/index.js +1 -226
- package/dist/reducers/moRedirFlow/utils.d.ts +10 -0
- package/dist/reducers/moRedirFlow/utils.js +1 -186
- package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +2 -0
- package/dist/reducers/oneClickFlow/IOneClickConstants.js +1 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +85 -0
- package/dist/reducers/oneClickFlow/OneClickTypes.js +1 -1
- package/dist/reducers/oneClickFlow/index.d.ts +13 -0
- package/dist/reducers/oneClickFlow/index.js +1 -409
- package/dist/reducers/oneClickFlow/utils.d.ts +16 -0
- package/dist/reducers/oneClickFlow/utils.js +1 -366
- package/dist/reducers/pinFlow/IPinConstants.d.ts +2 -0
- package/dist/reducers/pinFlow/IPinConstants.js +1 -1
- package/dist/reducers/pinFlow/PinTypes.d.ts +156 -0
- package/dist/reducers/pinFlow/PinTypes.js +1 -1
- package/dist/reducers/pinFlow/index.d.ts +19 -0
- package/dist/reducers/pinFlow/index.js +1 -514
- package/dist/reducers/pinFlow/utils.d.ts +11 -0
- package/dist/reducers/pinFlow/utils.js +1 -494
- package/dist/reducers/strategy/IStategyActionContants.d.ts +2 -0
- package/dist/reducers/strategy/IStategyActionContants.js +1 -1
- package/dist/reducers/strategy/StrategyTypes.d.ts +248 -0
- package/dist/reducers/strategy/StrategyTypes.js +1 -1
- package/dist/reducers/strategy/index.d.ts +13 -0
- package/dist/reducers/strategy/index.js +1 -389
- package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +15 -0
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +1 -403
- package/dist/reducers/strategy/strategies/ask_operator.d.ts +5 -0
- package/dist/reducers/strategy/strategies/ask_operator.js +1 -305
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +10 -0
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +1 -459
- package/dist/reducers/strategy/strategies/header_enrichment.d.ts +7 -0
- package/dist/reducers/strategy/strategies/header_enrichment.js +1 -783
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.d.ts +2 -0
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.js +1 -0
- package/dist/reducers/strategy/utils.d.ts +30 -0
- package/dist/reducers/strategy/utils.js +1 -702
- package/dist/reducers/ussdFlow/IUssdConstants.d.ts +2 -0
- package/dist/reducers/ussdFlow/IUssdConstants.js +1 -1
- package/dist/reducers/ussdFlow/UssdTypes.d.ts +77 -0
- package/dist/reducers/ussdFlow/UssdTypes.js +1 -1
- package/dist/reducers/ussdFlow/index.d.ts +14 -0
- package/dist/reducers/ussdFlow/index.js +1 -251
- package/dist/reducers/ussdFlow/utils.d.ts +11 -0
- package/dist/reducers/ussdFlow/utils.js +1 -225
- package/dist/store/index.d.ts +14 -0
- package/dist/store/index.js +1 -177
- package/dist/store/reducers.d.ts +20 -0
- package/dist/store/reducers.js +1 -41
- package/dist/utilities/addEmpelloToken.d.ts +4 -0
- package/dist/utilities/addEmpelloToken.js +1 -0
- package/dist/utilities/handleSubmitNumber.d.ts +21 -0
- package/dist/utilities/handleSubmitNumber.js +1 -59
- package/dist/utilities/index.d.ts +14 -0
- package/dist/utilities/index.js +1 -0
- package/dist/utilities/loadScriptInnerHtml.d.ts +2 -0
- package/dist/utilities/loadScriptInnerHtml.js +1 -0
- package/dist/utilities/loadScriptSrc.d.ts +8 -0
- package/dist/utilities/loadScriptSrc.js +1 -0
- package/dist/utilities/replaceUrlParam.d.ts +1 -0
- package/dist/utilities/replaceUrlParam.js +1 -0
- package/dist/utilities/storeMsisdn.d.ts +3 -0
- package/dist/utilities/storeMsisdn.js +1 -0
- package/package.json +1 -1
- package/dist/app/store.js +0 -20
- package/dist/features/strategies/categories/askMobileNumber.js +0 -388
- package/dist/features/strategies/categories/askOperator.js +0 -313
- package/dist/features/strategies/categories/detectOperatorByIp.js +0 -599
- package/dist/features/strategies/categories/headerEnrichment.js +0 -665
- package/dist/features/strategies/categories/singleFlows/pin.js +0 -1
- package/dist/features/strategies/identifySlice.js +0 -355
- package/dist/features/strategies/pinFlowSlice.js +0 -338
- 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.js +0 -1
- package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
- package/dist/reducers/tpayHeFlow/index.js +0 -331
- package/dist/reducers/tpayHeFlow/utils.js +0 -510
- package/dist/test/setup.js +0 -24
- package/dist/test/test-utils.js +0 -51
|
@@ -1,459 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.symbol");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.symbol.description");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.symbol.iterator");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.array.iterator");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.get-own-property-descriptor");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.to-string");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.promise");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.string.iterator");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.weak-map");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(exports, "__esModule", {
|
|
26
|
-
value: true
|
|
27
|
-
});
|
|
28
|
-
exports.default = detect_operator_by_ip;
|
|
29
|
-
exports.mo_redir_one_click_detect_operator_by_ip = exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn = exports.pin_one_click_detect_operator_by_ip = exports.pin_mo_detect_operator_by_ip = void 0;
|
|
30
|
-
|
|
31
|
-
require("regenerator-runtime/runtime");
|
|
32
|
-
|
|
33
|
-
var _ = require("..");
|
|
34
|
-
|
|
35
|
-
var RDS = _interopRequireWildcard(require("../../../common-types/RemoteDataState"));
|
|
36
|
-
|
|
37
|
-
var _utils = require("../utils");
|
|
38
|
-
|
|
39
|
-
var _ask_mobile_number = _interopRequireDefault(require("./ask_mobile_number"));
|
|
40
|
-
|
|
41
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
|
-
|
|
43
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
44
|
-
|
|
45
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
46
|
-
|
|
47
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
48
|
-
|
|
49
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
50
|
-
|
|
51
|
-
function detect_operator_by_ip() {
|
|
52
|
-
return function (dispatch) {
|
|
53
|
-
try {
|
|
54
|
-
dispatch({
|
|
55
|
-
type: 'DETECT_OPERATOR_BY_IP',
|
|
56
|
-
payload: {
|
|
57
|
-
type: 'DETECT_OPERATOR_BY_IP',
|
|
58
|
-
result: RDS.Loading()
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
var _getConfig = (0, _utils.getConfig)(),
|
|
63
|
-
strategy = _getConfig.strategy,
|
|
64
|
-
strategyConfigs = _getConfig.strategyConfigs;
|
|
65
|
-
|
|
66
|
-
var defaultFlow = strategyConfigs.default;
|
|
67
|
-
|
|
68
|
-
switch (strategy) {
|
|
69
|
-
case 'pin-one-click-detect-operator-by-ip':
|
|
70
|
-
return dispatch(pin_one_click_detect_operator_by_ip(defaultFlow));
|
|
71
|
-
|
|
72
|
-
case 'one-click-mo-pin-detect-operator-by-ip-or-msisdn':
|
|
73
|
-
return dispatch(one_click_mo_pin_detect_operator_by_ip_or_msisdn(defaultFlow));
|
|
74
|
-
|
|
75
|
-
case 'mo-redir-one-click-detect-operator-by-ip':
|
|
76
|
-
return dispatch(mo_redir_one_click_detect_operator_by_ip(defaultFlow));
|
|
77
|
-
|
|
78
|
-
case 'mo-one-click-detect-operator-by-ip':
|
|
79
|
-
return dispatch(mo_one_click_detect_operator_by_ip(defaultFlow));
|
|
80
|
-
|
|
81
|
-
case 'click2sms-one-click-detect-operator-by-ip':
|
|
82
|
-
return dispatch(click2sms_one_click_detect_operator_by_ip(defaultFlow));
|
|
83
|
-
|
|
84
|
-
case 'pin-mo-detect-operator-by-ip':
|
|
85
|
-
return dispatch(pin_mo_detect_operator_by_ip(defaultFlow));
|
|
86
|
-
}
|
|
87
|
-
} catch (err) {
|
|
88
|
-
dispatch({
|
|
89
|
-
type: 'DETECT_OPERATOR_BY_IP',
|
|
90
|
-
payload: {
|
|
91
|
-
type: 'DETECT_OPERATOR_BY_IP',
|
|
92
|
-
result: RDS.Failure(err)
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var pin_mo_detect_operator_by_ip = function pin_mo_detect_operator_by_ip(defaultFlow) {
|
|
100
|
-
return /*#__PURE__*/function () {
|
|
101
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) {
|
|
102
|
-
var flowObj;
|
|
103
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
104
|
-
while (1) {
|
|
105
|
-
switch (_context.prev = _context.next) {
|
|
106
|
-
case 0:
|
|
107
|
-
_context.prev = 0;
|
|
108
|
-
_context.next = 3;
|
|
109
|
-
return (0, _utils.determineFlowByOperatorFromIp)();
|
|
110
|
-
|
|
111
|
-
case 3:
|
|
112
|
-
flowObj = _context.sent;
|
|
113
|
-
_context.t0 = flowObj.flow;
|
|
114
|
-
_context.next = _context.t0 === 'mo' ? 7 : _context.t0 === 'pin' ? 9 : 10;
|
|
115
|
-
break;
|
|
116
|
-
|
|
117
|
-
case 7:
|
|
118
|
-
_.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
119
|
-
|
|
120
|
-
return _context.abrupt("return", dispatch({
|
|
121
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
122
|
-
payload: {
|
|
123
|
-
type: 'MO',
|
|
124
|
-
result: {
|
|
125
|
-
nextAction: 'submitMSISDNAction',
|
|
126
|
-
config: flowObj.flowConfig,
|
|
127
|
-
operator: flowObj.operator
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}));
|
|
131
|
-
|
|
132
|
-
case 9:
|
|
133
|
-
return _context.abrupt("return", dispatch({
|
|
134
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
135
|
-
payload: {
|
|
136
|
-
type: 'PIN',
|
|
137
|
-
result: {
|
|
138
|
-
nextAction: 'submitMSISDNAction',
|
|
139
|
-
config: flowObj.flowConfig
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}));
|
|
143
|
-
|
|
144
|
-
case 10:
|
|
145
|
-
_.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
146
|
-
|
|
147
|
-
return _context.abrupt("return", dispatch({
|
|
148
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
149
|
-
payload: {
|
|
150
|
-
type: defaultFlow.flow.toUpperCase(),
|
|
151
|
-
result: {
|
|
152
|
-
nextAction: 'submitMSISDNAction',
|
|
153
|
-
config: defaultFlow.flowConfig
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}));
|
|
157
|
-
|
|
158
|
-
case 12:
|
|
159
|
-
_context.next = 19;
|
|
160
|
-
break;
|
|
161
|
-
|
|
162
|
-
case 14:
|
|
163
|
-
_context.prev = 14;
|
|
164
|
-
_context.t1 = _context["catch"](0);
|
|
165
|
-
console.warn(_context.t1);
|
|
166
|
-
|
|
167
|
-
_.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
168
|
-
|
|
169
|
-
dispatch({
|
|
170
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
171
|
-
payload: {
|
|
172
|
-
type: defaultFlow.flow.toUpperCase(),
|
|
173
|
-
result: {
|
|
174
|
-
nextAction: 'submitMSISDNAction',
|
|
175
|
-
config: defaultFlow.flowConfig
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
case 19:
|
|
181
|
-
case "end":
|
|
182
|
-
return _context.stop();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}, _callee, null, [[0, 14]]);
|
|
186
|
-
}));
|
|
187
|
-
|
|
188
|
-
return function (_x) {
|
|
189
|
-
return _ref.apply(this, arguments);
|
|
190
|
-
};
|
|
191
|
-
}();
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
exports.pin_mo_detect_operator_by_ip = pin_mo_detect_operator_by_ip;
|
|
195
|
-
|
|
196
|
-
var pin_one_click_detect_operator_by_ip = function pin_one_click_detect_operator_by_ip(defaultFlow) {
|
|
197
|
-
return /*#__PURE__*/function () {
|
|
198
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch) {
|
|
199
|
-
var flowObj;
|
|
200
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
201
|
-
while (1) {
|
|
202
|
-
switch (_context2.prev = _context2.next) {
|
|
203
|
-
case 0:
|
|
204
|
-
_context2.prev = 0;
|
|
205
|
-
_context2.next = 3;
|
|
206
|
-
return (0, _utils.determineFlowByOperatorFromIp)();
|
|
207
|
-
|
|
208
|
-
case 3:
|
|
209
|
-
flowObj = _context2.sent;
|
|
210
|
-
_context2.t0 = flowObj.flow;
|
|
211
|
-
_context2.next = _context2.t0 === 'pin' ? 7 : _context2.t0 === 'oneClick' ? 8 : 9;
|
|
212
|
-
break;
|
|
213
|
-
|
|
214
|
-
case 7:
|
|
215
|
-
return _context2.abrupt("return", dispatch({
|
|
216
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
217
|
-
payload: {
|
|
218
|
-
type: 'PIN',
|
|
219
|
-
result: {
|
|
220
|
-
nextAction: 'submitMSISDNAction',
|
|
221
|
-
config: flowObj.flowConfig
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}));
|
|
225
|
-
|
|
226
|
-
case 8:
|
|
227
|
-
return _context2.abrupt("return", dispatch({
|
|
228
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
229
|
-
payload: {
|
|
230
|
-
type: 'ONE_CLICK',
|
|
231
|
-
result: {
|
|
232
|
-
nextAction: 'getRedirectUrlAction',
|
|
233
|
-
config: flowObj.flowConfig,
|
|
234
|
-
operator: flowObj.operator
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}));
|
|
238
|
-
|
|
239
|
-
case 9:
|
|
240
|
-
return _context2.abrupt("return", dispatch({
|
|
241
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
242
|
-
payload: {
|
|
243
|
-
type: 'PIN',
|
|
244
|
-
result: {
|
|
245
|
-
nextAction: 'submitMSISDNAction',
|
|
246
|
-
config: defaultFlow.flowConfig
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}));
|
|
250
|
-
|
|
251
|
-
case 10:
|
|
252
|
-
_context2.next = 17;
|
|
253
|
-
break;
|
|
254
|
-
|
|
255
|
-
case 12:
|
|
256
|
-
_context2.prev = 12;
|
|
257
|
-
_context2.t1 = _context2["catch"](0);
|
|
258
|
-
console.warn(_context2.t1);
|
|
259
|
-
console.log('defaultFlow', defaultFlow);
|
|
260
|
-
dispatch({
|
|
261
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
262
|
-
payload: {
|
|
263
|
-
type: 'PIN',
|
|
264
|
-
result: {
|
|
265
|
-
nextAction: 'submitMSISDNAction',
|
|
266
|
-
config: defaultFlow.flowConfig
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
case 17:
|
|
272
|
-
case "end":
|
|
273
|
-
return _context2.stop();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}, _callee2, null, [[0, 12]]);
|
|
277
|
-
}));
|
|
278
|
-
|
|
279
|
-
return function (_x2) {
|
|
280
|
-
return _ref2.apply(this, arguments);
|
|
281
|
-
};
|
|
282
|
-
}();
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
exports.pin_one_click_detect_operator_by_ip = pin_one_click_detect_operator_by_ip;
|
|
286
|
-
|
|
287
|
-
var one_click_mo_pin_detect_operator_by_ip_or_msisdn = function one_click_mo_pin_detect_operator_by_ip_or_msisdn(defaultFlow) {
|
|
288
|
-
return /*#__PURE__*/function () {
|
|
289
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(dispatch) {
|
|
290
|
-
var flowObj;
|
|
291
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
292
|
-
while (1) {
|
|
293
|
-
switch (_context3.prev = _context3.next) {
|
|
294
|
-
case 0:
|
|
295
|
-
_context3.prev = 0;
|
|
296
|
-
_context3.next = 3;
|
|
297
|
-
return (0, _utils.determineFlowByOperatorFromIp)();
|
|
298
|
-
|
|
299
|
-
case 3:
|
|
300
|
-
flowObj = _context3.sent;
|
|
301
|
-
_context3.t0 = flowObj.flow;
|
|
302
|
-
_context3.next = _context3.t0 === 'pin' ? 7 : _context3.t0 === 'oneClick' ? 8 : 9;
|
|
303
|
-
break;
|
|
304
|
-
|
|
305
|
-
case 7:
|
|
306
|
-
return _context3.abrupt("return", dispatch({
|
|
307
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
308
|
-
payload: {
|
|
309
|
-
type: 'PIN',
|
|
310
|
-
result: {
|
|
311
|
-
nextAction: 'submitMSISDNAction',
|
|
312
|
-
config: flowObj.flowConfig,
|
|
313
|
-
operator: flowObj.operator
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}));
|
|
317
|
-
|
|
318
|
-
case 8:
|
|
319
|
-
return _context3.abrupt("return", dispatch({
|
|
320
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
321
|
-
payload: {
|
|
322
|
-
type: 'MO_REDIR',
|
|
323
|
-
result: {
|
|
324
|
-
nextAction: 'submitMSISDNAction',
|
|
325
|
-
config: flowObj.flowConfig,
|
|
326
|
-
operator: flowObj.operator
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}));
|
|
330
|
-
|
|
331
|
-
case 9:
|
|
332
|
-
return _context3.abrupt("return", dispatch({
|
|
333
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
334
|
-
payload: {
|
|
335
|
-
type: 'PIN',
|
|
336
|
-
result: {
|
|
337
|
-
nextAction: 'submitMSISDNAction',
|
|
338
|
-
config: flowObj.flowConfig
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}));
|
|
342
|
-
|
|
343
|
-
case 10:
|
|
344
|
-
_context3.next = 16;
|
|
345
|
-
break;
|
|
346
|
-
|
|
347
|
-
case 12:
|
|
348
|
-
_context3.prev = 12;
|
|
349
|
-
_context3.t1 = _context3["catch"](0);
|
|
350
|
-
console.warn(_context3.t1);
|
|
351
|
-
dispatch((0, _ask_mobile_number.default)());
|
|
352
|
-
|
|
353
|
-
case 16:
|
|
354
|
-
case "end":
|
|
355
|
-
return _context3.stop();
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}, _callee3, null, [[0, 12]]);
|
|
359
|
-
}));
|
|
360
|
-
|
|
361
|
-
return function (_x3) {
|
|
362
|
-
return _ref3.apply(this, arguments);
|
|
363
|
-
};
|
|
364
|
-
}();
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn = one_click_mo_pin_detect_operator_by_ip_or_msisdn;
|
|
368
|
-
|
|
369
|
-
var mo_redir_one_click_detect_operator_by_ip = function mo_redir_one_click_detect_operator_by_ip(defaultFlow) {
|
|
370
|
-
return /*#__PURE__*/function () {
|
|
371
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(dispatch) {
|
|
372
|
-
var flowObj;
|
|
373
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
374
|
-
while (1) {
|
|
375
|
-
switch (_context4.prev = _context4.next) {
|
|
376
|
-
case 0:
|
|
377
|
-
_context4.prev = 0;
|
|
378
|
-
_context4.next = 3;
|
|
379
|
-
return (0, _utils.determineFlowByOperatorFromIp)();
|
|
380
|
-
|
|
381
|
-
case 3:
|
|
382
|
-
flowObj = _context4.sent;
|
|
383
|
-
_context4.t0 = flowObj.flow;
|
|
384
|
-
_context4.next = _context4.t0 === 'moRedir' ? 7 : _context4.t0 === 'oneClick' ? 8 : 9;
|
|
385
|
-
break;
|
|
386
|
-
|
|
387
|
-
case 7:
|
|
388
|
-
return _context4.abrupt("return", dispatch({
|
|
389
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
390
|
-
payload: {
|
|
391
|
-
type: 'MO_REDIR',
|
|
392
|
-
result: {
|
|
393
|
-
nextAction: 'submitMSISDNAction',
|
|
394
|
-
config: flowObj.flowConfig,
|
|
395
|
-
operator: flowObj.operator
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}));
|
|
399
|
-
|
|
400
|
-
case 8:
|
|
401
|
-
return _context4.abrupt("return", dispatch({
|
|
402
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
403
|
-
payload: {
|
|
404
|
-
type: 'ONE_CLICK',
|
|
405
|
-
result: {
|
|
406
|
-
nextAction: 'getRedirectUrlAction',
|
|
407
|
-
config: flowObj.flowConfig,
|
|
408
|
-
operator: flowObj.operator
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}));
|
|
412
|
-
|
|
413
|
-
case 9:
|
|
414
|
-
return _context4.abrupt("return", dispatch({
|
|
415
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
416
|
-
payload: {
|
|
417
|
-
type: 'MO_REDIR',
|
|
418
|
-
result: {
|
|
419
|
-
nextAction: 'submitMSISDNAction',
|
|
420
|
-
config: defaultFlow.flowConfig
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}));
|
|
424
|
-
|
|
425
|
-
case 10:
|
|
426
|
-
_context4.next = 16;
|
|
427
|
-
break;
|
|
428
|
-
|
|
429
|
-
case 12:
|
|
430
|
-
_context4.prev = 12;
|
|
431
|
-
_context4.t1 = _context4["catch"](0);
|
|
432
|
-
console.warn(_context4.t1); // console.log("defaul", defaultFlow.flowConfig)
|
|
433
|
-
|
|
434
|
-
return _context4.abrupt("return", dispatch({
|
|
435
|
-
type: 'IDENTIFY_FLOW_BY_IP_OPERATOR',
|
|
436
|
-
payload: {
|
|
437
|
-
type: 'MO_REDIR',
|
|
438
|
-
result: {
|
|
439
|
-
nextAction: 'submitMSISDNAction',
|
|
440
|
-
config: defaultFlow.flowConfig
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}));
|
|
444
|
-
|
|
445
|
-
case 16:
|
|
446
|
-
case "end":
|
|
447
|
-
return _context4.stop();
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}, _callee4, null, [[0, 12]]);
|
|
451
|
-
}));
|
|
452
|
-
|
|
453
|
-
return function (_x4) {
|
|
454
|
-
return _ref4.apply(this, arguments);
|
|
455
|
-
};
|
|
456
|
-
}();
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
exports.mo_redir_one_click_detect_operator_by_ip = mo_redir_one_click_detect_operator_by_ip;
|
|
1
|
+
"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.weak-map.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.click2sms_one_click_detect_operator_by_ip=void 0,exports.default=detect_operator_by_ip,exports.pin_one_click_detect_operator_by_ip=exports.pin_mo_detect_operator_by_ip=exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn=exports.mo_redir_one_click_detect_operator_by_ip=exports.mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn=exports.mo_one_click_detect_operator_by_ip=void 0,require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js");var _2=require(".."),RDS=_interopRequireWildcard(require("../../../common-types/RemoteDataState")),_utils=require("../utils"),_ask_mobile_number=_interopRequireDefault(require("./ask_mobile_number"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!=key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _regeneratorRuntime(){"use strict";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){define(prototype,method,function(arg){return this._invoke(method,arg)})})}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==_typeof(value)&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):PromiseImpl.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},function(error){return invoke("throw",error,resolve,reject)})}reject(record.arg)}var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl(function(resolve,reject){invoke(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=void 0),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}exports.wrap=wrap;var ContinueSentinel={},IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,function(){return this});var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);return GeneratorFunction.prototype=GeneratorFunctionPrototype,define(Gp,"constructor",GeneratorFunctionPrototype),define(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,toStringTagSymbol,"GeneratorFunction"),exports.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name))},exports.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,define(genFun,toStringTagSymbol,"GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun},exports.awrap=function(arg){return{__await:arg}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,asyncIteratorSymbol,function(){return this}),exports.AsyncIterator=AsyncIterator,exports.async=function(innerFn,outerFn,self,tryLocsList,PromiseImpl){void 0===PromiseImpl&&(PromiseImpl=Promise);var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList),PromiseImpl);return exports.isGeneratorFunction(outerFn)?iter:iter.next().then(function(result){return result.done?result.value:iter.next()})},defineIteratorMethods(Gp),define(Gp,toStringTagSymbol,"Generator"),define(Gp,iteratorSymbol,function(){return this}),define(Gp,"toString",function(){return"[object Generator]"}),exports.keys=function(object){var keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next}return next.done=!0,next}},exports.values=values,Context.prototype={constructor:Context,reset:function reset(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=void 0)},stop:function stop(){this.done=!0;var rootRecord=this.tryEntries[0].completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval},dispatchException:function dispatchException(exception){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=void 0),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(!hasCatch){if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}}},abrupt:function abrupt(type,arg){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record)},complete:function complete(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel},finish:function finish(finallyLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel},catch:function _catch(tryLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}function detect_operator_by_ip(){return function(dispatch){try{dispatch({type:"DETECT_OPERATOR_BY_IP",payload:{type:"DETECT_OPERATOR_BY_IP",result:RDS.Loading()}});var _getConfig=(0,_utils.getConfig)(),strategy=_getConfig.strategy,strategyConfigs=_getConfig.strategyConfigs,defaultFlow=strategyConfigs.default;switch(strategy){case"pin-one-click-detect-operator-by-ip":return dispatch(pin_one_click_detect_operator_by_ip(defaultFlow));case"one-click-mo-pin-detect-operator-by-ip-or-msisdn":return dispatch(one_click_mo_pin_detect_operator_by_ip_or_msisdn(defaultFlow));case"mo-redir-one-click-detect-operator-by-ip":return dispatch(mo_redir_one_click_detect_operator_by_ip(defaultFlow));case"mo-one-click-detect-operator-by-ip":return dispatch(mo_one_click_detect_operator_by_ip(defaultFlow));case"click2sms-one-click-detect-operator-by-ip":return dispatch(click2sms_one_click_detect_operator_by_ip(defaultFlow));case"pin-mo-detect-operator-by-ip":return dispatch(pin_mo_detect_operator_by_ip(defaultFlow));case"mo-redir-mo-click2sms-one-click-detect-operator-by-ip-or-msisdn":return dispatch(mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn(defaultFlow));}}catch(err){dispatch({type:"DETECT_OPERATOR_BY_IP",payload:{type:"DETECT_OPERATOR_BY_IP",result:RDS.Failure(err)}})}}}var pin_mo_detect_operator_by_ip=function(defaultFlow){return function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee$(_context){for(;1;)switch(_context.prev=_context.next){case 0:return _context.prev=0,_context.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context.sent,_context.t0=flowObj.flow,_context.next="mo"===_context.t0?7:"pin"===_context.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Msisdn to sms"),_context.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("Pin"),_context.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig}}}));case 11:return _2.tracker.sendOptInFlowEvent("Msisdn to sms"),_context.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:defaultFlow.flow.toUpperCase(),result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}}));case 13:_context.next=20;break;case 15:_context.prev=15,_context.t1=_context["catch"](0),console.warn(_context.t1),_2.tracker.sendOptInFlowEvent("Msisdn to sms"),dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:defaultFlow.flow.toUpperCase(),result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}});case 20:case"end":return _context.stop();}},_callee,null,[[0,15]])}));return function(_x){return _ref.apply(this,arguments)}}()};exports.pin_mo_detect_operator_by_ip=pin_mo_detect_operator_by_ip;var mo_one_click_detect_operator_by_ip=function mo_one_click_detect_operator_by_ip(defaultFlow){return function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee2$(_context2){for(;1;)switch(_context2.prev=_context2.next){case 0:return _context2.prev=0,_context2.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context2.sent,_context2.t0=flowObj.flow,_context2.next="mo"===_context2.t0?7:"oneClick"===_context2.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Msisdn to sms"),_context2.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context2.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Msisdn to sms"),_context2.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}}));case 13:_context2.next=20;break;case 15:_context2.prev=15,_context2.t1=_context2["catch"](0),console.warn(_context2.t1),_2.tracker.sendOptInFlowEvent("Msisdn to sms"),dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}});case 20:case"end":return _context2.stop();}},_callee2,null,[[0,15]])}));return function(_x2){return _ref2.apply(this,arguments)}}()};exports.mo_one_click_detect_operator_by_ip=mo_one_click_detect_operator_by_ip;var click2sms_one_click_detect_operator_by_ip=function click2sms_one_click_detect_operator_by_ip(defaultFlow){return function(){var _ref3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee3$(_context3){for(;1;)switch(_context3.prev=_context3.next){case 0:return _context3.prev=0,_context3.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context3.sent,_context3.t0=flowObj.flow,_context3.next="click2sms"===_context3.t0?7:"oneClick"===_context3.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Click to sms"),_context3.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"CLICK2SMS",result:{nextAction:"loadOc2sms",config:_objectSpread({operators:[flowObj.operator]},flowObj.flowConfig),operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context3.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Click to sms"),_context3.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"CLICK2SMS",result:{nextAction:"loadOc2sms",config:defaultFlow.flowConfig}}}));case 13:_context3.next=20;break;case 15:_context3.prev=15,_context3.t1=_context3["catch"](0),console.warn(_context3.t1),_2.tracker.sendOptInFlowEvent("Click to sms"),dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"CLICK2SMS",result:{nextAction:"loadOc2sms",config:defaultFlow.flowConfig}}});case 20:case"end":return _context3.stop();}},_callee3,null,[[0,15]])}));return function(_x3){return _ref3.apply(this,arguments)}}()};exports.click2sms_one_click_detect_operator_by_ip=click2sms_one_click_detect_operator_by_ip;var pin_one_click_detect_operator_by_ip=function pin_one_click_detect_operator_by_ip(defaultFlow){return function(){var _ref4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee4$(_context4){for(;1;)switch(_context4.prev=_context4.next){case 0:return _context4.prev=0,_context4.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context4.sent,_context4.t0=flowObj.flow,_context4.next="pin"===_context4.t0?7:"oneClick"===_context4.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Pin"),_context4.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context4.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Pin"),_context4.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}}));case 13:_context4.next=20;break;case 15:_context4.prev=15,_context4.t1=_context4["catch"](0),console.warn(_context4.t1),_2.tracker.sendOptInFlowEvent("Pin"),dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}});case 20:case"end":return _context4.stop();}},_callee4,null,[[0,15]])}));return function(_x4){return _ref4.apply(this,arguments)}}()};exports.pin_one_click_detect_operator_by_ip=pin_one_click_detect_operator_by_ip;var one_click_mo_pin_detect_operator_by_ip_or_msisdn=function one_click_mo_pin_detect_operator_by_ip_or_msisdn(_){return function(){var _ref5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee5$(_context5){for(;1;)switch(_context5.prev=_context5.next){case 0:return _context5.prev=0,_context5.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context5.sent,_context5.t0=flowObj.flow,_context5.next="pin"===_context5.t0?7:"oneClick"===_context5.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Pin"),_context5.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context5.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Pin"),_context5.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"PIN",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig}}}));case 13:_context5.next=19;break;case 15:_context5.prev=15,_context5.t1=_context5["catch"](0),console.warn(_context5.t1),dispatch((0,_ask_mobile_number.default)());case 19:case"end":return _context5.stop();}},_callee5,null,[[0,15]])}));return function(_x5){return _ref5.apply(this,arguments)}}()};exports.one_click_mo_pin_detect_operator_by_ip_or_msisdn=one_click_mo_pin_detect_operator_by_ip_or_msisdn;var mo_redir_one_click_detect_operator_by_ip=function mo_redir_one_click_detect_operator_by_ip(defaultFlow){return function(){var _ref6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee6$(_context6){for(;1;)switch(_context6.prev=_context6.next){case 0:return _context6.prev=0,_context6.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context6.sent,_context6.t0=flowObj.flow,_context6.next="moRedir"===_context6.t0?7:"oneClick"===_context6.t0?9:11;break;case 7:return _2.tracker.sendOptInFlowEvent("Redirect"),_context6.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO_REDIR",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context6.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Redirect"),_context6.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO_REDIR",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}}));case 13:_context6.next=20;break;case 15:return _context6.prev=15,_context6.t1=_context6["catch"](0),console.warn(_context6.t1),_2.tracker.sendOptInFlowEvent("Redirect"),_context6.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO_REDIR",result:{nextAction:"submitMSISDNAction",config:defaultFlow.flowConfig}}}));case 20:case"end":return _context6.stop();}},_callee6,null,[[0,15]])}));return function(_x6){return _ref6.apply(this,arguments)}}()};exports.mo_redir_one_click_detect_operator_by_ip=mo_redir_one_click_detect_operator_by_ip;var mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn=function mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn(_defaultFlow){return function(){var _ref7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(dispatch){var flowObj;return _regeneratorRuntime().wrap(function _callee7$(_context7){for(;1;)switch(_context7.prev=_context7.next){case 0:return _context7.prev=0,_context7.next=3,(0,_utils.determineFlowByOperatorFromIp)();case 3:flowObj=_context7.sent,_context7.t0=flowObj.flow,_context7.next="moRedir"===_context7.t0?7:"oneClick"===_context7.t0?9:"click2sms"===_context7.t0?11:13;break;case 7:return _2.tracker.sendOptInFlowEvent("Redirect"),_context7.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"MO_REDIR",result:{nextAction:"submitMSISDNAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 9:return _2.tracker.sendOptInFlowEvent("3G click"),_context7.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"ONE_CLICK",result:{nextAction:"getRedirectUrlAction",config:flowObj.flowConfig,operator:flowObj.operator}}}));case 11:return _2.tracker.sendOptInFlowEvent("Click to sms"),_context7.abrupt("return",dispatch({type:"IDENTIFY_FLOW_BY_IP_OPERATOR",payload:{type:"CLICK2SMS",result:{config:_objectSpread({operators:[flowObj.operator]},flowObj.flowConfig),operator:flowObj.operator}}}));case 13:dispatch((0,_ask_mobile_number.default)());case 14:_context7.next=20;break;case 16:_context7.prev=16,_context7.t1=_context7["catch"](0),console.warn(_context7.t1),dispatch((0,_ask_mobile_number.default)());case 20:case"end":return _context7.stop();}},_callee7,null,[[0,16]])}));return function(_x7){return _ref7.apply(this,arguments)}}()};exports.mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn=mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
+
import { IFlow } from '../StrategyTypes';
|
|
3
|
+
export default function identify_user(): AppThunk;
|
|
4
|
+
export declare const pin_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
5
|
+
export declare const he_pin_one_click_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
6
|
+
export declare const he_mo_redir_one_click_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
7
|
+
export declare const he_pin_mo_redir_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|