ouisys-engine 2.1.28 → 2.1.32
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/reducers/moRedirFlow/index.js +13 -14
- package/dist/reducers/oneClickFlow/utils.js +2 -3
- package/dist/reducers/pinFlow/PinTypes.d.ts +1 -1
- package/dist/reducers/pinFlow/index.js +1 -1
- package/dist/reducers/pinFlow/utils.js +1 -1
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +6 -7
- package/dist/reducers/strategy/strategies/header_enrichment.js +12 -13
- package/package.json +1 -1
- package/src/reducers/moRedirFlow/index.ts +0 -1
- package/src/reducers/oneClickFlow/utils.ts +0 -1
- package/src/reducers/pinFlow/PinTypes.ts +1 -1
- package/src/reducers/pinFlow/index.ts +2 -5
- package/src/reducers/pinFlow/utils.ts +1 -1
- package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -1
- package/src/reducers/strategy/strategies/header_enrichment.ts +0 -1
|
@@ -59,13 +59,12 @@ function submitMSISDNAction(msisdn) {
|
|
|
59
59
|
currentState = store().strategy.currentState;
|
|
60
60
|
|
|
61
61
|
if (!(currentState.type === "MO_REDIR")) {
|
|
62
|
-
_context.next =
|
|
62
|
+
_context.next = 21;
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
console.log("currentState", currentState);
|
|
67
66
|
config = currentState.result.config;
|
|
68
|
-
_context.prev =
|
|
67
|
+
_context.prev = 3;
|
|
69
68
|
dispatch({
|
|
70
69
|
type: "MO_REDIR_MSISDN_SUBMIT",
|
|
71
70
|
payload: {
|
|
@@ -78,10 +77,10 @@ function submitMSISDNAction(msisdn) {
|
|
|
78
77
|
msisdn: msisdn
|
|
79
78
|
});
|
|
80
79
|
|
|
81
|
-
_context.next =
|
|
80
|
+
_context.next = 8;
|
|
82
81
|
return (0, _utils.default)(window, config, msisdn);
|
|
83
82
|
|
|
84
|
-
case
|
|
83
|
+
case 8:
|
|
85
84
|
href = _context.sent;
|
|
86
85
|
|
|
87
86
|
_strategy.tracker.advancedInFlow('tallyman.v1-mo-redir', 'msisdn-submission-success', {
|
|
@@ -97,12 +96,12 @@ function submitMSISDNAction(msisdn) {
|
|
|
97
96
|
})
|
|
98
97
|
}
|
|
99
98
|
});
|
|
100
|
-
_context.next =
|
|
99
|
+
_context.next = 19;
|
|
101
100
|
break;
|
|
102
101
|
|
|
103
|
-
case
|
|
104
|
-
_context.prev =
|
|
105
|
-
_context.t0 = _context["catch"](
|
|
102
|
+
case 13:
|
|
103
|
+
_context.prev = 13;
|
|
104
|
+
_context.t0 = _context["catch"](3);
|
|
106
105
|
console.warn(_context.t0);
|
|
107
106
|
errorType = "SEAlreadySubscribed" === _context.t0.type ? "AlreadySubscribed" : "SEInvalidMSISDN" == _context.t0.type ? "InvalidMSISDN" : "UnknownError";
|
|
108
107
|
|
|
@@ -123,11 +122,11 @@ function submitMSISDNAction(msisdn) {
|
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
124
|
|
|
126
|
-
case
|
|
127
|
-
_context.next =
|
|
125
|
+
case 19:
|
|
126
|
+
_context.next = 24;
|
|
128
127
|
break;
|
|
129
128
|
|
|
130
|
-
case
|
|
129
|
+
case 21:
|
|
131
130
|
_strategy.tracker.recedeInFlow('tallyman.v1-mo-redir', 'msisdn-submission-failure', {
|
|
132
131
|
msisdn: msisdn,
|
|
133
132
|
errorType: 'UnknownError'
|
|
@@ -145,12 +144,12 @@ function submitMSISDNAction(msisdn) {
|
|
|
145
144
|
});
|
|
146
145
|
throw "Unexpected state";
|
|
147
146
|
|
|
148
|
-
case
|
|
147
|
+
case 24:
|
|
149
148
|
case "end":
|
|
150
149
|
return _context.stop();
|
|
151
150
|
}
|
|
152
151
|
}
|
|
153
|
-
}, _callee, null, [[
|
|
152
|
+
}, _callee, null, [[3, 13]]);
|
|
154
153
|
}));
|
|
155
154
|
|
|
156
155
|
return function (_x, _x2) {
|
|
@@ -355,13 +355,12 @@ var getRedirectUrlBupperWay = /*#__PURE__*/function () {
|
|
|
355
355
|
})).join('&');
|
|
356
356
|
extraParamsQs = !extraParams ? '' : '&' + Object.keys(extraParams).map(function (k) {
|
|
357
357
|
return "".concat(k, "=").concat(extraParams[k]);
|
|
358
|
-
}).join('&');
|
|
359
|
-
console.log("extraParamsQs", extraParamsQs); // one click flow must use http not https
|
|
358
|
+
}).join('&'); // one click flow must use http not https
|
|
360
359
|
|
|
361
360
|
xcid = window.location.href.split("/")[3].split('?')[0];
|
|
362
361
|
return _context3.abrupt("return", "http://".concat(host, "/").concat(bupperizeCountry(country), "/").concat(slug, "?offer=").concat(offer, "&atmobirun=1&rockman_id=").concat(window.pac_analytics.visitor.rockmanId, "&redirPixels=").concat(window.location.host, "&x-xcid=").concat(xcid).concat(extraParamsQs, "&").concat(search, "&"));
|
|
363
362
|
|
|
364
|
-
case
|
|
363
|
+
case 12:
|
|
365
364
|
case "end":
|
|
366
365
|
return _context3.stop();
|
|
367
366
|
}
|
|
@@ -27,7 +27,7 @@ export declare type PINEntrySuccess = {
|
|
|
27
27
|
msisdn?: string;
|
|
28
28
|
isAlreadySubscribed?: boolean;
|
|
29
29
|
};
|
|
30
|
-
export declare type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState";
|
|
30
|
+
export declare type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState" | "SessionBlocked";
|
|
31
31
|
export declare type IMsisdnSumbitNextData = {
|
|
32
32
|
actualPIN: string;
|
|
33
33
|
nextAction: "submitPinAction";
|
|
@@ -400,7 +400,7 @@ function submitPinAction(msisdn, pin, extraParams) {
|
|
|
400
400
|
_context3.prev = 19;
|
|
401
401
|
_context3.t0 = _context3["catch"](2);
|
|
402
402
|
console.error(_context3.t0);
|
|
403
|
-
errorType =
|
|
403
|
+
errorType = _context3.t0.type || "UnknownError";
|
|
404
404
|
|
|
405
405
|
_strategy.tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure', {
|
|
406
406
|
msisdn: msisdn,
|
|
@@ -436,7 +436,7 @@ function _submitPIN() {
|
|
|
436
436
|
|
|
437
437
|
pinErrorTypeMap = {
|
|
438
438
|
"pin does not match": "InvalidPIN",
|
|
439
|
-
"mcp blocked": "
|
|
439
|
+
"mcp blocked": "SessionBlocked"
|
|
440
440
|
};
|
|
441
441
|
errorMessage = pinErrorTypeMap[pinResult.message];
|
|
442
442
|
pinError = new Error("Error in submitMSISDN() verify-pin action:\n".concat(errorMessage));
|
|
@@ -360,7 +360,6 @@ var click2sms_one_click_detect_operator_by_ip = function click2sms_one_click_det
|
|
|
360
360
|
case 11:
|
|
361
361
|
_.tracker.sendOptInFlowEvent("Click to sms");
|
|
362
362
|
|
|
363
|
-
console.log("defaultFlow", defaultFlow);
|
|
364
363
|
return _context3.abrupt("return", dispatch({
|
|
365
364
|
type: "IDENTIFY_FLOW_BY_IP_OPERATOR",
|
|
366
365
|
payload: {
|
|
@@ -372,12 +371,12 @@ var click2sms_one_click_detect_operator_by_ip = function click2sms_one_click_det
|
|
|
372
371
|
}
|
|
373
372
|
}));
|
|
374
373
|
|
|
375
|
-
case
|
|
376
|
-
_context3.next =
|
|
374
|
+
case 13:
|
|
375
|
+
_context3.next = 20;
|
|
377
376
|
break;
|
|
378
377
|
|
|
379
|
-
case
|
|
380
|
-
_context3.prev =
|
|
378
|
+
case 15:
|
|
379
|
+
_context3.prev = 15;
|
|
381
380
|
_context3.t1 = _context3["catch"](0);
|
|
382
381
|
console.warn(_context3.t1);
|
|
383
382
|
|
|
@@ -394,12 +393,12 @@ var click2sms_one_click_detect_operator_by_ip = function click2sms_one_click_det
|
|
|
394
393
|
}
|
|
395
394
|
});
|
|
396
395
|
|
|
397
|
-
case
|
|
396
|
+
case 20:
|
|
398
397
|
case "end":
|
|
399
398
|
return _context3.stop();
|
|
400
399
|
}
|
|
401
400
|
}
|
|
402
|
-
}, _callee3, null, [[0,
|
|
401
|
+
}, _callee3, null, [[0, 15]]);
|
|
403
402
|
}));
|
|
404
403
|
|
|
405
404
|
return function (_x3) {
|
|
@@ -106,10 +106,9 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
106
106
|
|
|
107
107
|
case 3:
|
|
108
108
|
ipRangeName = _context.sent;
|
|
109
|
-
console.log("IP ipRangeName", ipRangeName);
|
|
110
109
|
|
|
111
110
|
if (!(ipRangeName == null)) {
|
|
112
|
-
_context.next =
|
|
111
|
+
_context.next = 7;
|
|
113
112
|
break;
|
|
114
113
|
}
|
|
115
114
|
|
|
@@ -126,16 +125,16 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
126
125
|
}
|
|
127
126
|
}));
|
|
128
127
|
|
|
129
|
-
case
|
|
130
|
-
_context.next =
|
|
128
|
+
case 7:
|
|
129
|
+
_context.next = 9;
|
|
131
130
|
return (0, _utils.identifyUser)();
|
|
132
131
|
|
|
133
|
-
case
|
|
132
|
+
case 9:
|
|
134
133
|
heResult = _context.sent;
|
|
135
134
|
flowObj = defaultFlow;
|
|
136
135
|
|
|
137
136
|
if (!(heResult.msisdn !== undefined && heResult.msisdn !== "")) {
|
|
138
|
-
_context.next =
|
|
137
|
+
_context.next = 19;
|
|
139
138
|
break;
|
|
140
139
|
}
|
|
141
140
|
|
|
@@ -162,7 +161,7 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
162
161
|
}
|
|
163
162
|
}));
|
|
164
163
|
|
|
165
|
-
case
|
|
164
|
+
case 19:
|
|
166
165
|
_.tracker.sendOptInFlowEvent("Pin");
|
|
167
166
|
|
|
168
167
|
return _context.abrupt("return", dispatch({
|
|
@@ -176,12 +175,12 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
176
175
|
}
|
|
177
176
|
}));
|
|
178
177
|
|
|
179
|
-
case
|
|
180
|
-
_context.next =
|
|
178
|
+
case 21:
|
|
179
|
+
_context.next = 29;
|
|
181
180
|
break;
|
|
182
181
|
|
|
183
|
-
case
|
|
184
|
-
_context.prev =
|
|
182
|
+
case 23:
|
|
183
|
+
_context.prev = 23;
|
|
185
184
|
_context.t0 = _context["catch"](0);
|
|
186
185
|
console.warn(_context.t0);
|
|
187
186
|
|
|
@@ -202,12 +201,12 @@ var pin_header_enrichment = function pin_header_enrichment(defaultFlow) {
|
|
|
202
201
|
}
|
|
203
202
|
});
|
|
204
203
|
|
|
205
|
-
case
|
|
204
|
+
case 29:
|
|
206
205
|
case "end":
|
|
207
206
|
return _context.stop();
|
|
208
207
|
}
|
|
209
208
|
}
|
|
210
|
-
}, _callee, null, [[0,
|
|
209
|
+
}, _callee, null, [[0, 23]]);
|
|
211
210
|
}));
|
|
212
211
|
|
|
213
212
|
return function (_x) {
|
package/package.json
CHANGED
|
@@ -191,7 +191,6 @@ export const getRedirectUrlBupperWay = async(window:Window, maybeConfig: IConfig
|
|
|
191
191
|
const search = (!!s && s.length > 0 ? [s] : []).concat((queryString || []).map(([k, v]) => `${k}=${v}`)).join('&')
|
|
192
192
|
const extraParamsQs = !extraParams ? '' : '&' + Object.keys(extraParams).map(k => `${k}=${extraParams[k]}`).join('&')
|
|
193
193
|
|
|
194
|
-
console.log("extraParamsQs",extraParamsQs)
|
|
195
194
|
// one click flow must use http not https
|
|
196
195
|
const xcid = window.location.href.split("/")[3].split('?')[0];
|
|
197
196
|
return `http://${host}/${bupperizeCountry(country)}/${slug}?offer=${offer}&atmobirun=1&rockman_id=${window.pac_analytics.visitor.rockmanId}&redirPixels=${window.location.host}&x-xcid=${xcid}${extraParamsQs}&${search}&`
|
|
@@ -30,7 +30,7 @@ export type PINEntryFailure = {
|
|
|
30
30
|
error?: Error;
|
|
31
31
|
};
|
|
32
32
|
export type PINEntrySuccess = { finalUrl: string, msisdn?:string, isAlreadySubscribed?:boolean, };
|
|
33
|
-
export type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState";
|
|
33
|
+
export type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState" | "SessionBlocked";
|
|
34
34
|
|
|
35
35
|
export type IMsisdnSumbitNextData = {
|
|
36
36
|
actualPIN: string;
|
|
@@ -234,11 +234,8 @@ export function submitPinAction(msisdn:string, pin:string, extraParams?:{[key: s
|
|
|
234
234
|
} catch(ex) {
|
|
235
235
|
|
|
236
236
|
console.error(ex)
|
|
237
|
-
const errorType: PINEntryErrorTypes =
|
|
238
|
-
|
|
239
|
-
? "InvalidPIN"
|
|
240
|
-
: "UnknownError";
|
|
241
|
-
tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure',{msisdn, pin})
|
|
237
|
+
const errorType: PINEntryErrorTypes = ex.type || "UnknownError";
|
|
238
|
+
tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure',{msisdn, pin})
|
|
242
239
|
|
|
243
240
|
dispatch({
|
|
244
241
|
type: "PIN_SUBMIT_ERROR",
|
|
@@ -170,7 +170,7 @@ export async function submitPIN(window:Window, pin: string, config:IConfig, extr
|
|
|
170
170
|
if (false === pinResult.success) {
|
|
171
171
|
const pinErrorTypeMap:{[key:string]:string} = {
|
|
172
172
|
"pin does not match": "InvalidPIN",
|
|
173
|
-
"mcp blocked": "
|
|
173
|
+
"mcp blocked": "SessionBlocked"
|
|
174
174
|
}
|
|
175
175
|
const errorMessage = pinErrorTypeMap[pinResult.message as string]
|
|
176
176
|
const pinError = new Error(`Error in submitMSISDN() verify-pin action:\n${errorMessage}`) as IError & {type:string}
|
|
@@ -214,7 +214,6 @@ export const click2sms_one_click_detect_operator_by_ip = (defaultFlow:IFlow):App
|
|
|
214
214
|
default:
|
|
215
215
|
tracker.sendOptInFlowEvent("Click to sms")
|
|
216
216
|
|
|
217
|
-
console.log("defaultFlow",defaultFlow)
|
|
218
217
|
return dispatch({
|
|
219
218
|
type:"IDENTIFY_FLOW_BY_IP_OPERATOR",
|
|
220
219
|
payload:{
|
|
@@ -51,7 +51,6 @@ export const pin_header_enrichment = (defaultFlow:IFlow):AppThunk=>{
|
|
|
51
51
|
return async(dispatch)=>{
|
|
52
52
|
try{
|
|
53
53
|
let ipRangeName = await tryGetIPRangeName(window.pac_analytics.visitor);
|
|
54
|
-
console.log("IP ipRangeName", ipRangeName);
|
|
55
54
|
if (ipRangeName == null) {
|
|
56
55
|
|
|
57
56
|
tracker.sendOptInFlowEvent("Pin")
|