ouisys-engine 4.1.47-alpha.0 → 4.3.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.js +728 -1
- package/dist/app/store.js +20 -0
- package/dist/common-types/AppThunk.js +1 -1
- package/dist/common-types/Either.js +1 -1
- package/dist/common-types/IError.js +1 -1
- package/dist/common-types/ITracker.js +3 -1
- package/dist/common-types/IVisitor.js +1 -1
- package/dist/common-types/RemoteDataState.js +135 -1
- package/dist/features/strategies/categories/askMobileNumber.js +388 -0
- package/dist/features/strategies/categories/askOperator.js +313 -0
- package/dist/features/strategies/categories/detectOperatorByIp.js +599 -0
- package/dist/features/strategies/categories/headerEnrichment.js +665 -0
- package/dist/features/strategies/categories/singleFlows/pin.js +1 -0
- package/dist/features/strategies/identifySlice.js +355 -0
- package/dist/features/strategies/pinFlowSlice.js +338 -0
- package/dist/flows/click2smsFlow.js +19 -1
- package/dist/flows/moFlow.js +19 -1
- package/dist/flows/moRedirFlow.js +19 -1
- package/dist/flows/oneClickFlow.js +23 -1
- package/dist/flows/pinFlow.js +23 -1
- package/dist/flows/strategy.js +53 -1
- package/dist/flows/tpayHeFlow.js +23 -0
- package/dist/flows/ussdFlow.js +19 -1
- package/dist/index.js +2 -0
- package/dist/ips/tryGetIPRangeName.js +74 -1
- package/dist/mockServer/browser.js +48 -0
- package/dist/mockServer/handlers.js +22 -0
- package/dist/mockServer/server.js +48 -0
- package/dist/pacman/index.js +108 -1
- package/dist/pacman/queryString.js +45 -1
- package/dist/reducers/click2smsFlow/Click2smsTypes.js +1 -1
- package/dist/reducers/click2smsFlow/IClick2smsConstants.js +1 -1
- package/dist/reducers/click2smsFlow/index.js +183 -1
- package/dist/reducers/click2smsFlow/utils.js +357 -1
- package/dist/reducers/moFlow/IMoConstants.js +1 -1
- package/dist/reducers/moFlow/MoTypes.js +1 -1
- package/dist/reducers/moFlow/index.js +251 -1
- package/dist/reducers/moFlow/utils.js +284 -1
- package/dist/reducers/moRedirFlow/IMoRedirConstants.js +1 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.js +1 -1
- package/dist/reducers/moRedirFlow/index.js +226 -1
- package/dist/reducers/moRedirFlow/utils.js +186 -1
- package/dist/reducers/oneClickFlow/IOneClickConstants.js +1 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.js +1 -1
- package/dist/reducers/oneClickFlow/index.js +409 -1
- package/dist/reducers/oneClickFlow/utils.js +366 -1
- package/dist/reducers/pinFlow/IPinConstants.js +1 -1
- package/dist/reducers/pinFlow/PinTypes.js +1 -1
- package/dist/reducers/pinFlow/index.js +514 -1
- package/dist/reducers/pinFlow/utils.js +494 -1
- package/dist/reducers/strategy/IStategyActionContants.js +1 -1
- package/dist/reducers/strategy/StrategyTypes.js +1 -1
- package/dist/reducers/strategy/index.js +389 -1
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +403 -1
- package/dist/reducers/strategy/strategies/ask_operator.js +305 -1
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +459 -1
- package/dist/reducers/strategy/strategies/header_enrichment.js +783 -1
- package/dist/reducers/strategy/utils.js +702 -1
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +1 -0
- package/dist/reducers/tpayHeFlow/TpayHeTypes.js +1 -0
- package/dist/reducers/tpayHeFlow/index.js +331 -0
- package/dist/reducers/tpayHeFlow/utils.js +510 -0
- package/dist/reducers/ussdFlow/IUssdConstants.js +1 -1
- package/dist/reducers/ussdFlow/UssdTypes.js +1 -1
- package/dist/reducers/ussdFlow/index.js +251 -1
- package/dist/reducers/ussdFlow/utils.js +225 -1
- package/dist/store/index.js +177 -1
- package/dist/store/reducers.js +41 -1
- package/dist/test/setup.js +24 -0
- package/dist/test/test-utils.js +51 -0
- package/dist/utilities/handleSubmitNumber.js +59 -1
- package/package.json +2 -2
- package/dist/api/index.d.ts +0 -43
- package/dist/common-types/AppThunk.d.ts +0 -13
- package/dist/common-types/Either.d.ts +0 -8
- package/dist/common-types/IError.d.ts +0 -3
- package/dist/common-types/IOptInFlowName.d.ts +0 -1
- package/dist/common-types/ITracker.d.ts +0 -9
- package/dist/common-types/IVisitor.d.ts +0 -14
- package/dist/common-types/RemoteDataState.d.ts +0 -38
- package/dist/custom-hooks/useOneClickRedirectUrl.d.ts +0 -3
- package/dist/custom-hooks/useOneClickRedirectUrl.js +0 -1
- package/dist/custom-hooks/usePinEntryState.d.ts +0 -8
- package/dist/custom-hooks/usePinEntryState.js +0 -1
- package/dist/custom-hooks/useStrategyConfig.d.ts +0 -4
- package/dist/custom-hooks/useStrategyConfig.js +0 -1
- package/dist/flows/click2smsFlow.d.ts +0 -6
- package/dist/flows/creditCardFlow.d.ts +0 -6
- package/dist/flows/creditCardFlow.js +0 -1
- package/dist/flows/moFlow.d.ts +0 -6
- package/dist/flows/moRedirFlow.d.ts +0 -6
- package/dist/flows/oneClickFlow.d.ts +0 -7
- package/dist/flows/pinFlow.d.ts +0 -7
- package/dist/flows/strategy.d.ts +0 -14
- package/dist/flows/ussdFlow.d.ts +0 -6
- package/dist/index.d.ts +0 -0
- package/dist/ips/tryGetIPRangeName.d.ts +0 -2
- package/dist/jest.config.js +0 -194
- package/dist/pacman/index.d.ts +0 -6
- package/dist/pacman/queryString.d.ts +0 -3
- package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +0 -76
- package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +0 -2
- package/dist/reducers/click2smsFlow/index.d.ts +0 -5
- package/dist/reducers/click2smsFlow/utils.d.ts +0 -4
- package/dist/reducers/creditCardFlow/CreditCardTypes.d.ts +0 -79
- package/dist/reducers/creditCardFlow/CreditCardTypes.js +0 -1
- package/dist/reducers/creditCardFlow/ICreditCardConstants.d.ts +0 -2
- package/dist/reducers/creditCardFlow/ICreditCardConstants.js +0 -1
- package/dist/reducers/creditCardFlow/index.d.ts +0 -5
- package/dist/reducers/creditCardFlow/index.js +0 -1
- package/dist/reducers/creditCardFlow/utils.d.ts +0 -8
- package/dist/reducers/creditCardFlow/utils.js +0 -1
- package/dist/reducers/moFlow/IMoConstants.d.ts +0 -2
- package/dist/reducers/moFlow/MoTypes.d.ts +0 -88
- package/dist/reducers/moFlow/index.d.ts +0 -16
- package/dist/reducers/moFlow/utils.d.ts +0 -12
- package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +0 -2
- package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +0 -64
- package/dist/reducers/moRedirFlow/index.d.ts +0 -14
- package/dist/reducers/moRedirFlow/utils.d.ts +0 -10
- package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +0 -2
- package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +0 -85
- package/dist/reducers/oneClickFlow/index.d.ts +0 -13
- package/dist/reducers/oneClickFlow/utils.d.ts +0 -16
- package/dist/reducers/pinFlow/IPinConstants.d.ts +0 -2
- package/dist/reducers/pinFlow/PinTypes.d.ts +0 -156
- package/dist/reducers/pinFlow/index.d.ts +0 -19
- package/dist/reducers/pinFlow/utils.d.ts +0 -11
- package/dist/reducers/strategy/IStategyActionContants.d.ts +0 -2
- package/dist/reducers/strategy/StrategyTypes.d.ts +0 -248
- package/dist/reducers/strategy/index.d.ts +0 -13
- package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +0 -15
- package/dist/reducers/strategy/strategies/ask_operator.d.ts +0 -5
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +0 -10
- package/dist/reducers/strategy/strategies/header_enrichment.d.ts +0 -7
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.d.ts +0 -7
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.js +0 -1
- package/dist/reducers/strategy/utils.d.ts +0 -30
- package/dist/reducers/ussdFlow/IUssdConstants.d.ts +0 -2
- package/dist/reducers/ussdFlow/UssdTypes.d.ts +0 -77
- package/dist/reducers/ussdFlow/index.d.ts +0 -14
- package/dist/reducers/ussdFlow/utils.d.ts +0 -11
- package/dist/store/index.d.ts +0 -14
- package/dist/store/reducers.d.ts +0 -20
- package/dist/utilities/addEmpelloToken.d.ts +0 -4
- package/dist/utilities/addEmpelloToken.js +0 -1
- package/dist/utilities/handleSubmitNumber.d.ts +0 -21
- package/dist/utilities/index.d.ts +0 -14
- package/dist/utilities/index.js +0 -1
- package/dist/utilities/loadScriptInnerHtml.d.ts +0 -2
- package/dist/utilities/loadScriptInnerHtml.js +0 -1
- package/dist/utilities/loadScriptSrc.d.ts +0 -8
- package/dist/utilities/loadScriptSrc.js +0 -1
- package/dist/utilities/replaceUrlParam.d.ts +0 -1
- package/dist/utilities/replaceUrlParam.js +0 -1
- package/dist/utilities/storeMsisdn.d.ts +0 -3
- package/dist/utilities/storeMsisdn.js +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.filter");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.get-own-property-descriptor");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptors");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.object.keys");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.to-string");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.promise");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/web.dom-collections.for-each");
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "__esModule", {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
exports.selectOperatorAction = exports.askOperator = exports.hePinOneClickAskOperator = exports.pin = void 0;
|
|
23
|
+
|
|
24
|
+
require("regenerator-runtime/runtime");
|
|
25
|
+
|
|
26
|
+
var _toolkit = require("@reduxjs/toolkit");
|
|
27
|
+
|
|
28
|
+
var _utils = require("../../../reducers/strategy/utils");
|
|
29
|
+
|
|
30
|
+
var _identifySlice = require("../identifySlice");
|
|
31
|
+
|
|
32
|
+
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); } }
|
|
33
|
+
|
|
34
|
+
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); }); }; }
|
|
35
|
+
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
+
|
|
42
|
+
var oneClick = function oneClick(_ref) {
|
|
43
|
+
var flowObj = _ref.flowObj;
|
|
44
|
+
|
|
45
|
+
_identifySlice.tracker.sendOptInFlowEvent('3G click');
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
type: _identifySlice.StrategyStates.ONE_CLICK,
|
|
49
|
+
result: {
|
|
50
|
+
config: flowObj.flowConfig,
|
|
51
|
+
operator: flowObj.operator
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var pin = function pin(_ref2) {
|
|
57
|
+
var flowObj = _ref2.flowObj,
|
|
58
|
+
msisdn = _ref2.msisdn,
|
|
59
|
+
isHeaderEnrichmentSuccess = _ref2.isHeaderEnrichmentSuccess;
|
|
60
|
+
|
|
61
|
+
if (isHeaderEnrichmentSuccess !== true) {
|
|
62
|
+
_identifySlice.tracker.sendOptInFlowEvent('Pin');
|
|
63
|
+
} else {
|
|
64
|
+
_identifySlice.tracker.sendOptInFlowEvent('Hybrid Pin');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
type: _identifySlice.StrategyStates.PIN,
|
|
69
|
+
result: {
|
|
70
|
+
config: flowObj.flowConfig,
|
|
71
|
+
operator: flowObj.operator,
|
|
72
|
+
msisdn: msisdn,
|
|
73
|
+
isHeaderEnrichmentSuccess: isHeaderEnrichmentSuccess
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.pin = pin;
|
|
79
|
+
|
|
80
|
+
var moRedir = function moRedir(_ref3) {
|
|
81
|
+
var flowObj = _ref3.flowObj;
|
|
82
|
+
|
|
83
|
+
_identifySlice.tracker.sendOptInFlowEvent('Redirect');
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
type: _identifySlice.StrategyStates.MO_REDIR,
|
|
87
|
+
result: {
|
|
88
|
+
config: flowObj.flowConfig,
|
|
89
|
+
operator: flowObj.operator
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var click2sms = function click2sms(_ref4) {
|
|
95
|
+
var flowObj = _ref4.flowObj;
|
|
96
|
+
|
|
97
|
+
_identifySlice.tracker.sendOptInFlowEvent('Click to sms');
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
type: _identifySlice.StrategyStates.CLICK2SMS,
|
|
101
|
+
result: {
|
|
102
|
+
config: _objectSpread({
|
|
103
|
+
operators: [flowObj.operator]
|
|
104
|
+
}, flowObj.flowConfig),
|
|
105
|
+
operator: flowObj.operator
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var mo = function mo(_ref5) {
|
|
111
|
+
var flowObj = _ref5.flowObj;
|
|
112
|
+
|
|
113
|
+
_identifySlice.tracker.sendOptInFlowEvent('Msisdn to sms');
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
type: _identifySlice.StrategyStates.MO,
|
|
117
|
+
result: {
|
|
118
|
+
config: flowObj.flowConfig,
|
|
119
|
+
operator: flowObj.operator
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
var hePinOneClickAskOperator = /*#__PURE__*/function () {
|
|
125
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref6) {
|
|
126
|
+
var configs, flowObj, extraParams, strategyConfigs, defaultFlow, heResult, msisdn, _operator, isHeaderEnrichmentSuccess;
|
|
127
|
+
|
|
128
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
129
|
+
while (1) {
|
|
130
|
+
switch (_context.prev = _context.next) {
|
|
131
|
+
case 0:
|
|
132
|
+
configs = _ref6.configs, flowObj = _ref6.flowObj, extraParams = _ref6.extraParams;
|
|
133
|
+
strategyConfigs = configs.strategyConfigs;
|
|
134
|
+
defaultFlow = strategyConfigs.default;
|
|
135
|
+
_context.prev = 3;
|
|
136
|
+
_context.next = 6;
|
|
137
|
+
return (0, _utils.identifyUser)({
|
|
138
|
+
configs: configs,
|
|
139
|
+
extraParams: extraParams
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
case 6:
|
|
143
|
+
heResult = _context.sent;
|
|
144
|
+
msisdn = heResult.msisdn;
|
|
145
|
+
_operator = heResult.operator;
|
|
146
|
+
isHeaderEnrichmentSuccess = !!msisdn;
|
|
147
|
+
return _context.abrupt("return", pin({
|
|
148
|
+
flowObj: flowObj,
|
|
149
|
+
msisdn: msisdn,
|
|
150
|
+
operator: _operator,
|
|
151
|
+
isHeaderEnrichmentSuccess: isHeaderEnrichmentSuccess
|
|
152
|
+
}));
|
|
153
|
+
|
|
154
|
+
case 13:
|
|
155
|
+
_context.prev = 13;
|
|
156
|
+
_context.t0 = _context["catch"](3);
|
|
157
|
+
console.warn(_context.t0);
|
|
158
|
+
return _context.abrupt("return", pin({
|
|
159
|
+
flowObj: defaultFlow,
|
|
160
|
+
operator: operator
|
|
161
|
+
}));
|
|
162
|
+
|
|
163
|
+
case 17:
|
|
164
|
+
case "end":
|
|
165
|
+
return _context.stop();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}, _callee, null, [[3, 13]]);
|
|
169
|
+
}));
|
|
170
|
+
|
|
171
|
+
return function hePinOneClickAskOperator(_x) {
|
|
172
|
+
return _ref7.apply(this, arguments);
|
|
173
|
+
};
|
|
174
|
+
}();
|
|
175
|
+
|
|
176
|
+
exports.hePinOneClickAskOperator = hePinOneClickAskOperator;
|
|
177
|
+
|
|
178
|
+
var askOperator = /*#__PURE__*/function () {
|
|
179
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_ref8) {
|
|
180
|
+
var configs, operators;
|
|
181
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
182
|
+
while (1) {
|
|
183
|
+
switch (_context2.prev = _context2.next) {
|
|
184
|
+
case 0:
|
|
185
|
+
configs = _ref8.configs;
|
|
186
|
+
operators = (0, _utils.getOperators)({
|
|
187
|
+
configs: configs
|
|
188
|
+
});
|
|
189
|
+
return _context2.abrupt("return", {
|
|
190
|
+
type: _identifySlice.StrategyStates.IDENTIFY_FLOW_BY_OPERATOR_SELECT,
|
|
191
|
+
result: {
|
|
192
|
+
operators: operators
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
case 3:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context2.stop();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, _callee2);
|
|
202
|
+
}));
|
|
203
|
+
|
|
204
|
+
return function askOperator(_x2) {
|
|
205
|
+
return _ref9.apply(this, arguments);
|
|
206
|
+
};
|
|
207
|
+
}();
|
|
208
|
+
|
|
209
|
+
exports.askOperator = askOperator;
|
|
210
|
+
var selectOperatorAction = (0, _toolkit.createAsyncThunk)('strategy/selectOperatorAction',
|
|
211
|
+
/*#__PURE__*/
|
|
212
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
213
|
+
// @ts-ignore
|
|
214
|
+
function () {
|
|
215
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(payload, thunkApi) {
|
|
216
|
+
var configs, strategy, strategyConfigs, operator, defaultFlow, _flowObj;
|
|
217
|
+
|
|
218
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
219
|
+
while (1) {
|
|
220
|
+
switch (_context3.prev = _context3.next) {
|
|
221
|
+
case 0:
|
|
222
|
+
configs = payload.configs || (0, _utils.getConfig)();
|
|
223
|
+
strategy = configs.strategy, strategyConfigs = configs.strategyConfigs;
|
|
224
|
+
operator = payload.operator;
|
|
225
|
+
defaultFlow = strategyConfigs.default;
|
|
226
|
+
_context3.prev = 4;
|
|
227
|
+
_flowObj = (0, _utils.determineFlowByOperator)({
|
|
228
|
+
configs: configs,
|
|
229
|
+
operator: operator
|
|
230
|
+
});
|
|
231
|
+
_context3.t0 = _flowObj.flow;
|
|
232
|
+
_context3.next = _context3.t0 === 'pin' ? 9 : _context3.t0 === 'mo' ? 14 : _context3.t0 === 'moRedir' ? 15 : _context3.t0 === 'click2sms' ? 16 : _context3.t0 === 'oneClick' ? 17 : 18;
|
|
233
|
+
break;
|
|
234
|
+
|
|
235
|
+
case 9:
|
|
236
|
+
if (!(strategy === 'he-pin-one-click-ask-operator')) {
|
|
237
|
+
_context3.next = 13;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
_context3.next = 12;
|
|
242
|
+
return hePinOneClickAskOperator({
|
|
243
|
+
configs: configs,
|
|
244
|
+
flowObj: _flowObj,
|
|
245
|
+
operator: operator
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
case 12:
|
|
249
|
+
return _context3.abrupt("return", _context3.sent);
|
|
250
|
+
|
|
251
|
+
case 13:
|
|
252
|
+
return _context3.abrupt("return", pin({
|
|
253
|
+
flowObj: _flowObj,
|
|
254
|
+
operator: operator
|
|
255
|
+
}));
|
|
256
|
+
|
|
257
|
+
case 14:
|
|
258
|
+
return _context3.abrupt("return", mo({
|
|
259
|
+
flowObj: _flowObj
|
|
260
|
+
}));
|
|
261
|
+
|
|
262
|
+
case 15:
|
|
263
|
+
return _context3.abrupt("return", moRedir({
|
|
264
|
+
flowObj: _flowObj
|
|
265
|
+
}));
|
|
266
|
+
|
|
267
|
+
case 16:
|
|
268
|
+
return _context3.abrupt("return", click2sms({
|
|
269
|
+
flowObj: _flowObj
|
|
270
|
+
}));
|
|
271
|
+
|
|
272
|
+
case 17:
|
|
273
|
+
return _context3.abrupt("return", oneClick({
|
|
274
|
+
flowObj: _flowObj
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
case 18:
|
|
278
|
+
console.error('selectOperatorAction', 'Strategy not supported');
|
|
279
|
+
return _context3.abrupt("return", pin({
|
|
280
|
+
flowObj: _objectSpread(_objectSpread({}, defaultFlow), {}, {
|
|
281
|
+
operator: _flowObj.operator
|
|
282
|
+
}),
|
|
283
|
+
msisdn: internationalMSISDN
|
|
284
|
+
}));
|
|
285
|
+
|
|
286
|
+
case 20:
|
|
287
|
+
_context3.next = 26;
|
|
288
|
+
break;
|
|
289
|
+
|
|
290
|
+
case 22:
|
|
291
|
+
_context3.prev = 22;
|
|
292
|
+
_context3.t1 = _context3["catch"](4);
|
|
293
|
+
console.error('identifySuselectOperatorActionbmitMSISDNAction', JSON.stringify(_context3.t1));
|
|
294
|
+
return _context3.abrupt("return", pin({
|
|
295
|
+
flowObj: _objectSpread(_objectSpread({}, defaultFlow), {}, {
|
|
296
|
+
operator: flowObj.operator
|
|
297
|
+
}),
|
|
298
|
+
msisdn: internationalMSISDN
|
|
299
|
+
}));
|
|
300
|
+
|
|
301
|
+
case 26:
|
|
302
|
+
case "end":
|
|
303
|
+
return _context3.stop();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}, _callee3, null, [[4, 22]]);
|
|
307
|
+
}));
|
|
308
|
+
|
|
309
|
+
return function (_x3, _x4) {
|
|
310
|
+
return _ref10.apply(this, arguments);
|
|
311
|
+
};
|
|
312
|
+
}());
|
|
313
|
+
exports.selectOperatorAction = selectOperatorAction;
|