ouisys-engine 3.0.20 → 3.0.21
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.
|
@@ -106,7 +106,7 @@ function ask_mobile_number(payload) {
|
|
|
106
106
|
function submitMSISDNAction(internationalMSISDN) {
|
|
107
107
|
return /*#__PURE__*/function () {
|
|
108
108
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch, store) {
|
|
109
|
-
var _state$strategy
|
|
109
|
+
var _state$strategy;
|
|
110
110
|
|
|
111
111
|
var state, strategyState, nextData, _getConfig, strategy, flowObj, errorType;
|
|
112
112
|
|
|
@@ -117,13 +117,9 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
117
117
|
state = store();
|
|
118
118
|
strategyState = state === null || state === void 0 ? void 0 : (_state$strategy = state.strategy) === null || _state$strategy === void 0 ? void 0 : _state$strategy.currentState; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
119
119
|
// @ts-ignore
|
|
120
|
-
// eslint-disable-next-line no-console
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
nextData = strategyState === null || strategyState === void 0 ? void 0 : (_strategyState$result = strategyState.result) === null || _strategyState$result === void 0 ? void 0 : _strategyState$result.nextData;
|
|
126
|
-
_context.prev = 4;
|
|
121
|
+
nextData = strategyState === null || strategyState === void 0 ? void 0 : strategyState.nextData;
|
|
122
|
+
_context.prev = 3;
|
|
127
123
|
dispatch({
|
|
128
124
|
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
129
125
|
payload: {
|
|
@@ -135,46 +131,46 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
135
131
|
}
|
|
136
132
|
});
|
|
137
133
|
_getConfig = (0, _utils.getConfig)(), strategy = _getConfig.strategy;
|
|
138
|
-
_context.next =
|
|
134
|
+
_context.next = 8;
|
|
139
135
|
return (0, _utils.determineFlowByMsidn)(internationalMSISDN);
|
|
140
136
|
|
|
141
|
-
case
|
|
137
|
+
case 8:
|
|
142
138
|
flowObj = _context.sent;
|
|
143
139
|
dispatch({
|
|
144
140
|
type: 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT',
|
|
145
141
|
payload: {
|
|
146
142
|
type: 'IDENTIFY_FLOW_BY_MSISDN',
|
|
147
143
|
result: RDS.Success(flowObj),
|
|
148
|
-
nextData: _objectSpread({
|
|
144
|
+
nextData: _objectSpread(_objectSpread({
|
|
149
145
|
nextAction: 'submitMSISDNAction'
|
|
150
146
|
}, flowObj.operator && {
|
|
151
147
|
operator: flowObj.operator
|
|
152
|
-
})
|
|
148
|
+
}), nextData)
|
|
153
149
|
}
|
|
154
150
|
});
|
|
155
151
|
_context.t0 = strategy;
|
|
156
|
-
_context.next = _context.t0 === 'pin-mo-redir-ask-mobile-number' ?
|
|
152
|
+
_context.next = _context.t0 === 'pin-mo-redir-ask-mobile-number' ? 13 : _context.t0 === 'pin-mo-ask-mobile-number' ? 14 : _context.t0 === 'pin-combo-ask-mobile-number' ? 15 : _context.t0 === 'header-enrichment-script' ? 16 : 17;
|
|
157
153
|
break;
|
|
158
154
|
|
|
159
|
-
case
|
|
155
|
+
case 13:
|
|
160
156
|
return _context.abrupt("return", dispatch(pin_mo_redir_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
161
157
|
|
|
162
|
-
case
|
|
158
|
+
case 14:
|
|
163
159
|
return _context.abrupt("return", dispatch(pin_mo_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
164
160
|
|
|
165
|
-
case
|
|
161
|
+
case 15:
|
|
166
162
|
return _context.abrupt("return", dispatch(pin_combo_ask_mobile_number(flowObj, internationalMSISDN)));
|
|
167
163
|
|
|
168
|
-
case
|
|
164
|
+
case 16:
|
|
169
165
|
return _context.abrupt("return", dispatch(header_enrichment_script(flowObj, internationalMSISDN, (nextData === null || nextData === void 0 ? void 0 : nextData.isHeaderEnrichmentSuccess) || false)));
|
|
170
166
|
|
|
171
|
-
case
|
|
172
|
-
_context.next =
|
|
167
|
+
case 17:
|
|
168
|
+
_context.next = 24;
|
|
173
169
|
break;
|
|
174
170
|
|
|
175
|
-
case
|
|
176
|
-
_context.prev =
|
|
177
|
-
_context.t1 = _context["catch"](
|
|
171
|
+
case 19:
|
|
172
|
+
_context.prev = 19;
|
|
173
|
+
_context.t1 = _context["catch"](3);
|
|
178
174
|
console.warn(_context.t1);
|
|
179
175
|
errorType = _context.t1.type === 'SEAlreadySubscribed' ? 'AlreadySubscribed' : _context.t1.type === 'SEInvalidMSISDN' ? 'InvalidMSISDN' : 'UnknownError';
|
|
180
176
|
dispatch({
|
|
@@ -188,12 +184,12 @@ function submitMSISDNAction(internationalMSISDN) {
|
|
|
188
184
|
}
|
|
189
185
|
});
|
|
190
186
|
|
|
191
|
-
case
|
|
187
|
+
case 24:
|
|
192
188
|
case "end":
|
|
193
189
|
return _context.stop();
|
|
194
190
|
}
|
|
195
191
|
}
|
|
196
|
-
}, _callee, null, [[
|
|
192
|
+
}, _callee, null, [[3, 19]]);
|
|
197
193
|
}));
|
|
198
194
|
|
|
199
195
|
return function (_x, _x2) {
|
|
@@ -2,12 +2,13 @@ import { Action } from 'redux';
|
|
|
2
2
|
import { ThunkDispatch } from 'redux-thunk';
|
|
3
3
|
import { AppThunk, IAllActionConstants } from '../common-types/AppThunk';
|
|
4
4
|
import { IApplicationState } from '../store/reducers';
|
|
5
|
-
export declare const handleAutoSubmitMsisdn: ({ msisdnValue, dispatch, submitMSISDNAction, isHeaderEnrichmentSuccess, setMsisdnValue }: {
|
|
5
|
+
export declare const handleAutoSubmitMsisdn: ({ msisdnValue, dispatch, submitMSISDNAction, isHeaderEnrichmentSuccess, setMsisdnValue, isHeaderEnrichmentAutoSubmit }: {
|
|
6
6
|
msisdnValue: string;
|
|
7
7
|
dispatch: ThunkDispatch<IApplicationState, unknown, Action<IAllActionConstants>>;
|
|
8
8
|
submitMSISDNAction: (msisdnValue: string) => AppThunk;
|
|
9
9
|
isHeaderEnrichmentSuccess: boolean;
|
|
10
10
|
setMsisdnValue: (msisdnValue: string) => void;
|
|
11
|
+
isHeaderEnrichmentAutoSubmit?: boolean;
|
|
11
12
|
}) => void;
|
|
12
13
|
export declare const handleFormSubmit: ({ isHeaderEnrichmentSuccess, setInternationalNumber, onEnd, internationalNumber }: {
|
|
13
14
|
isHeaderEnrichmentSuccess: boolean;
|
|
@@ -22,9 +22,10 @@ var handleAutoSubmitMsisdn = function handleAutoSubmitMsisdn(_ref) {
|
|
|
22
22
|
dispatch = _ref.dispatch,
|
|
23
23
|
submitMSISDNAction = _ref.submitMSISDNAction,
|
|
24
24
|
isHeaderEnrichmentSuccess = _ref.isHeaderEnrichmentSuccess,
|
|
25
|
-
setMsisdnValue = _ref.setMsisdnValue
|
|
25
|
+
setMsisdnValue = _ref.setMsisdnValue,
|
|
26
|
+
isHeaderEnrichmentAutoSubmit = _ref.isHeaderEnrichmentAutoSubmit;
|
|
26
27
|
|
|
27
|
-
if (msisdnValue && msisdnValue.length > 3 && isHeaderEnrichmentSuccess === false) {
|
|
28
|
+
if (msisdnValue && msisdnValue.length > 3 && (isHeaderEnrichmentSuccess === false || isHeaderEnrichmentSuccess === true && isHeaderEnrichmentAutoSubmit === true)) {
|
|
28
29
|
var pn = new _awesomePhonenumber.default("+".concat(msisdnValue), process.env.country.toUpperCase());
|
|
29
30
|
|
|
30
31
|
if (pn.isValid()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ouisys-engine",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"directories": "dist dev-tools",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@types/mocha": "^9.1.1",
|
|
48
48
|
"@types/node": "^18.0.3",
|
|
49
49
|
"@types/node-fetch": "^2.6.2",
|
|
50
|
-
"@types/ramda": "
|
|
50
|
+
"@types/ramda": "0.28.15",
|
|
51
51
|
"@types/react": "^18.0.15",
|
|
52
52
|
"@types/react-dom": "^18.0.6",
|
|
53
53
|
"@types/react-redux": "^7.1.24",
|
package/tsconfig.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"outDir": "./dist",
|
|
4
4
|
"sourceMap": true,
|
|
5
5
|
"noImplicitAny": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
6
7
|
"module": "commonjs",
|
|
7
8
|
"target": "es5",
|
|
8
9
|
"jsx": "react",
|
|
@@ -17,5 +18,11 @@
|
|
|
17
18
|
"typeRoots": ["node_modules/@types", "src/@types"]
|
|
18
19
|
},
|
|
19
20
|
"include": ["src/**/*", "dev-tools/**/*"],
|
|
20
|
-
"exclude": [
|
|
21
|
+
"exclude": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
"./node_modules",
|
|
24
|
+
"./node_modules/*",
|
|
25
|
+
"./node_modules/@types/node/index.d.ts",
|
|
26
|
+
"webpack/**/*"
|
|
27
|
+
]
|
|
21
28
|
}
|