ouisys-engine 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +4 -8
- package/.eslintrc.js +1 -1
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -1
- package/.prettierignore +2 -1
- package/.vscode/settings.json +1 -1
- package/README.md +2 -4
- package/dist/api/index.d.ts +5 -5
- package/dist/api/index.js +76 -76
- package/dist/common-types/AppThunk.d.ts +11 -12
- package/dist/common-types/IOptInFlowName.d.ts +1 -1
- package/dist/common-types/ITracker.js +1 -2
- package/dist/common-types/RemoteDataState.d.ts +4 -4
- package/dist/common-types/RemoteDataState.js +17 -17
- package/dist/flows/click2smsFlow.d.ts +2 -2
- package/dist/flows/moFlow.d.ts +2 -2
- package/dist/flows/moRedirFlow.d.ts +2 -2
- package/dist/flows/oneClickFlow.d.ts +2 -2
- package/dist/flows/pinFlow.d.ts +2 -2
- package/dist/flows/pinFlow.js +2 -0
- package/dist/flows/strategy.d.ts +8 -8
- package/dist/flows/ussdFlow.d.ts +2 -2
- package/dist/ips/tryGetIPRangeName.d.ts +1 -1
- package/dist/ips/tryGetIPRangeName.js +7 -5
- package/dist/jest.config.js +1 -1
- package/dist/pacman/index.d.ts +2 -2
- package/dist/pacman/index.js +41 -41
- package/dist/pacman/queryString.js +11 -9
- package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +19 -19
- package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +1 -1
- package/dist/reducers/click2smsFlow/index.d.ts +2 -2
- package/dist/reducers/click2smsFlow/index.js +24 -24
- package/dist/reducers/click2smsFlow/utils.d.ts +1 -1
- package/dist/reducers/click2smsFlow/utils.js +30 -30
- package/dist/reducers/moFlow/IMoConstants.d.ts +1 -1
- package/dist/reducers/moFlow/MoTypes.d.ts +13 -13
- package/dist/reducers/moFlow/index.d.ts +3 -3
- package/dist/reducers/moFlow/index.js +27 -27
- package/dist/reducers/moFlow/utils.d.ts +1 -2
- package/dist/reducers/moFlow/utils.js +28 -26
- package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +1 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +13 -13
- package/dist/reducers/moRedirFlow/index.d.ts +3 -3
- package/dist/reducers/moRedirFlow/index.js +27 -27
- package/dist/reducers/moRedirFlow/utils.d.ts +1 -1
- package/dist/reducers/moRedirFlow/utils.js +17 -17
- package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +1 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +10 -10
- package/dist/reducers/oneClickFlow/index.d.ts +3 -3
- package/dist/reducers/oneClickFlow/index.js +75 -68
- package/dist/reducers/oneClickFlow/utils.d.ts +2 -2
- package/dist/reducers/oneClickFlow/utils.js +38 -38
- package/dist/reducers/pinFlow/IPinConstants.d.ts +1 -1
- package/dist/reducers/pinFlow/PinTypes.d.ts +23 -23
- package/dist/reducers/pinFlow/index.d.ts +3 -3
- package/dist/reducers/pinFlow/index.js +76 -76
- package/dist/reducers/pinFlow/utils.d.ts +1 -1
- package/dist/reducers/pinFlow/utils.js +61 -65
- package/dist/reducers/strategy/IStategyActionContants.d.ts +1 -1
- package/dist/reducers/strategy/StrategyTypes.d.ts +56 -56
- package/dist/reducers/strategy/index.d.ts +2 -2
- package/dist/reducers/strategy/index.js +99 -99
- package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +2 -2
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +78 -78
- package/dist/reducers/strategy/strategies/ask_operator.d.ts +2 -2
- package/dist/reducers/strategy/strategies/ask_operator.js +64 -68
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +2 -2
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +97 -97
- package/dist/reducers/strategy/strategies/header_enrichment.d.ts +2 -2
- package/dist/reducers/strategy/strategies/header_enrichment.js +116 -120
- package/dist/reducers/strategy/utils.d.ts +3 -3
- package/dist/reducers/strategy/utils.js +115 -111
- package/dist/reducers/ussdFlow/IUssdConstants.d.ts +1 -1
- package/dist/reducers/ussdFlow/UssdTypes.d.ts +13 -13
- package/dist/reducers/ussdFlow/index.d.ts +3 -3
- package/dist/reducers/ussdFlow/index.js +27 -27
- package/dist/reducers/ussdFlow/utils.d.ts +1 -2
- package/dist/reducers/ussdFlow/utils.js +19 -17
- package/dist/store/index.d.ts +8 -8
- package/dist/store/index.js +87 -83
- package/dist/store/reducers.d.ts +7 -7
- package/dist/store/reducers.js +4 -4
- package/dist/utilities/handleSubmitNumber.d.ts +7 -3
- package/dist/utilities/handleSubmitNumber.js +15 -18
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +13 -11
- package/dist/utilities/loadScriptInnerHtml.js +0 -1
- package/index.html +21 -28
- package/mockData/config.json +1 -1
- package/package.json +23 -15
- package/setupJest.js +1 -1
- package/tsconfig.json +2 -2
- package/dist/api/click2sms.js +0 -357
- package/dist/api/mo.js +0 -274
- package/dist/api/moRedir.js +0 -186
- package/dist/api/oneClick.js +0 -366
- package/dist/api/pin.js +0 -493
- package/dist/api/strategies.js +0 -704
- package/dist/api/ussd.js +0 -1
- package/dist/app/store.js +0 -35
- package/dist/features/strategies/categories/askMobileNumber.js +0 -395
- package/dist/features/strategies/categories/askOperator.js +0 -311
- package/dist/features/strategies/categories/detectOperatorByIp.js +0 -606
- package/dist/features/strategies/categories/headerEnrichment.js +0 -670
- package/dist/features/strategies/categories/typings/click2smsSliceTypes.js +0 -12
- package/dist/features/strategies/categories/typings/identifySliceTypes.js +0 -22
- package/dist/features/strategies/categories/typings/moFlowSliceTypes.js +0 -22
- package/dist/features/strategies/categories/typings/moRedirFlowSliceTypes.js +0 -21
- package/dist/features/strategies/categories/typings/oneClickSliceTypes.js +0 -13
- package/dist/features/strategies/categories/typings/pinFlowSliceTypes.js +0 -13
- package/dist/features/strategies/click2smsFlowSlice.js +0 -172
- package/dist/features/strategies/identifySlice.js +0 -455
- package/dist/features/strategies/moFlowSlice.js +0 -196
- package/dist/features/strategies/moRedirFlowSlice.js +0 -190
- package/dist/features/strategies/oneClickFlowSlice.js +0 -277
- package/dist/features/strategies/pinFlowSlice.js +0 -313
- package/dist/features/strategies/ussdFlowSlice.js +0 -1
- package/dist/flows/tpayHeFlow.d.ts +0 -7
- package/dist/flows/tpayHeFlow.js +0 -23
- package/dist/mockServer/browser.js +0 -48
- package/dist/mockServer/handlers.js +0 -22
- package/dist/mockServer/server.js +0 -48
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.d.ts +0 -2
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +0 -1
- package/dist/reducers/tpayHeFlow/TpayHeTypes.d.ts +0 -114
- package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
- package/dist/reducers/tpayHeFlow/index.d.ts +0 -7
- package/dist/reducers/tpayHeFlow/index.js +0 -331
- package/dist/reducers/tpayHeFlow/utils.d.ts +0 -20
- package/dist/reducers/tpayHeFlow/utils.js +0 -510
- package/dist/test/setup.js +0 -24
- package/dist/test/test-utils.js +0 -51
- package/prettier.config.js +0 -7
- package/src/@types/react-tracker.d.ts +0 -16
- package/src/@types/redux-cli-logger.d.ts +0 -1
- package/src/@types/tiny-async-pool.d.ts +0 -3
- package/src/@types/window.d.ts +0 -74
- package/src/api/index.ts +0 -225
- package/src/common-types/AppThunk.ts +0 -19
- package/src/common-types/Either.ts +0 -3
- package/src/common-types/IError.ts +0 -5
- package/src/common-types/IOptInFlowName.ts +0 -1
- package/src/common-types/ITracker.ts +0 -10
- package/src/common-types/IVisitor.ts +0 -16
- package/src/common-types/RemoteDataState.ts +0 -88
- package/src/flows/click2smsFlow.ts +0 -18
- package/src/flows/moFlow.ts +0 -20
- package/src/flows/moRedirFlow.ts +0 -20
- package/src/flows/oneClickFlow.ts +0 -20
- package/src/flows/pinFlow.ts +0 -25
- package/src/flows/strategy.ts +0 -51
- package/src/flows/ussdFlow.ts +0 -20
- package/src/index.ts +0 -3
- package/src/ips/tryGetIPRangeName.ts +0 -22
- package/src/jest.config.js +0 -194
- package/src/pacman/index.ts +0 -71
- package/src/pacman/queryString.ts +0 -24
- package/src/reducers/click2smsFlow/Click2smsTypes.ts +0 -93
- package/src/reducers/click2smsFlow/IClick2smsConstants.ts +0 -4
- package/src/reducers/click2smsFlow/index.ts +0 -105
- package/src/reducers/click2smsFlow/utils.ts +0 -126
- package/src/reducers/moFlow/IMoConstants.ts +0 -7
- package/src/reducers/moFlow/MoTypes.ts +0 -125
- package/src/reducers/moFlow/index.ts +0 -150
- package/src/reducers/moFlow/utils.ts +0 -135
- package/src/reducers/moRedirFlow/IMoRedirConstants.ts +0 -7
- package/src/reducers/moRedirFlow/MoRedirTypes.ts +0 -99
- package/src/reducers/moRedirFlow/index.ts +0 -137
- package/src/reducers/moRedirFlow/utils.ts +0 -78
- package/src/reducers/oneClickFlow/IOneClickConstants.ts +0 -3
- package/src/reducers/oneClickFlow/OneClickTypes.ts +0 -108
- package/src/reducers/oneClickFlow/index.ts +0 -268
- package/src/reducers/oneClickFlow/utils.ts +0 -219
- package/src/reducers/pinFlow/IPinConstants.ts +0 -9
- package/src/reducers/pinFlow/PinTypes.ts +0 -190
- package/src/reducers/pinFlow/index.ts +0 -331
- package/src/reducers/pinFlow/utils.ts +0 -232
- package/src/reducers/strategy/IStategyActionContants.ts +0 -17
- package/src/reducers/strategy/StrategyTypes.ts +0 -376
- package/src/reducers/strategy/index.ts +0 -322
- package/src/reducers/strategy/strategies/ask_mobile_number.ts +0 -366
- package/src/reducers/strategy/strategies/ask_operator.ts +0 -195
- package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -414
- package/src/reducers/strategy/strategies/header_enrichment.ts +0 -489
- package/src/reducers/strategy/utils.ts +0 -357
- package/src/reducers/ussdFlow/IUssdConstants.ts +0 -7
- package/src/reducers/ussdFlow/UssdTypes.ts +0 -112
- package/src/reducers/ussdFlow/index.ts +0 -146
- package/src/reducers/ussdFlow/utils.ts +0 -88
- package/src/store/index.ts +0 -150
- package/src/store/reducers.ts +0 -37
- package/src/utilities/handleSubmitNumber.ts +0 -65
- package/src/utilities/index.ts +0 -114
- package/src/utilities/loadScriptInnerHtml.ts +0 -14
- package/src/utilities/loadScriptSrc.ts +0 -26
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MoStates = exports.MSISDNEntryErrorTypes = void 0;
|
|
7
|
-
var MoStates;
|
|
8
|
-
exports.MoStates = MoStates;
|
|
9
|
-
|
|
10
|
-
(function (MoStates) {
|
|
11
|
-
MoStates["MSISDNEntry"] = "MSISDNEntry";
|
|
12
|
-
})(MoStates || (exports.MoStates = MoStates = {}));
|
|
13
|
-
|
|
14
|
-
var MSISDNEntryErrorTypes; // export type MSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN';
|
|
15
|
-
|
|
16
|
-
exports.MSISDNEntryErrorTypes = MSISDNEntryErrorTypes;
|
|
17
|
-
|
|
18
|
-
(function (MSISDNEntryErrorTypes) {
|
|
19
|
-
MSISDNEntryErrorTypes["AlreadySubscribed"] = "AlreadySubscribed";
|
|
20
|
-
MSISDNEntryErrorTypes["UnknownError"] = "UnknownError";
|
|
21
|
-
MSISDNEntryErrorTypes["InvalidMSISDN"] = "InvalidMSISDN";
|
|
22
|
-
})(MSISDNEntryErrorTypes || (exports.MSISDNEntryErrorTypes = MSISDNEntryErrorTypes = {}));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MoRedirStates = exports.MSISDNEntryErrorTypes = void 0;
|
|
7
|
-
var MoRedirStates;
|
|
8
|
-
exports.MoRedirStates = MoRedirStates;
|
|
9
|
-
|
|
10
|
-
(function (MoRedirStates) {
|
|
11
|
-
MoRedirStates["MSISDNEntry"] = "MSISDNEntry";
|
|
12
|
-
})(MoRedirStates || (exports.MoRedirStates = MoRedirStates = {}));
|
|
13
|
-
|
|
14
|
-
var MSISDNEntryErrorTypes;
|
|
15
|
-
exports.MSISDNEntryErrorTypes = MSISDNEntryErrorTypes;
|
|
16
|
-
|
|
17
|
-
(function (MSISDNEntryErrorTypes) {
|
|
18
|
-
MSISDNEntryErrorTypes["AlreadySubscribed"] = "AlreadySubscribed";
|
|
19
|
-
MSISDNEntryErrorTypes["UnknownError"] = "UnknownError";
|
|
20
|
-
MSISDNEntryErrorTypes["InvalidMSISDN"] = "InvalidMSISDN";
|
|
21
|
-
})(MSISDNEntryErrorTypes || (exports.MSISDNEntryErrorTypes = MSISDNEntryErrorTypes = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.OneClickStates = void 0;
|
|
7
|
-
var OneClickStates;
|
|
8
|
-
exports.OneClickStates = OneClickStates;
|
|
9
|
-
|
|
10
|
-
(function (OneClickStates) {
|
|
11
|
-
OneClickStates["GET_REDIRECT_URL"] = "GET_REDIRECT_URL";
|
|
12
|
-
OneClickStates["SUBCRIBE_AJAX"] = "SUBCRIBE_AJAX";
|
|
13
|
-
})(OneClickStates || (exports.OneClickStates = OneClickStates = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PinStates = void 0;
|
|
7
|
-
var PinStates;
|
|
8
|
-
exports.PinStates = PinStates;
|
|
9
|
-
|
|
10
|
-
(function (PinStates) {
|
|
11
|
-
PinStates["MSISDNEntry"] = "MSISDNEntry";
|
|
12
|
-
PinStates["PINEntry"] = "PINEntry";
|
|
13
|
-
})(PinStates || (exports.PinStates = PinStates = {}));
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
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); }
|
|
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.filter");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.array.iterator");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.object.get-own-property-descriptors");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.object.keys");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.object.to-string");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/es.promise");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/es.regexp.to-string");
|
|
26
|
-
|
|
27
|
-
require("core-js/modules/es.string.iterator");
|
|
28
|
-
|
|
29
|
-
require("core-js/modules/es.weak-map");
|
|
30
|
-
|
|
31
|
-
require("core-js/modules/web.dom-collections.for-each");
|
|
32
|
-
|
|
33
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
34
|
-
|
|
35
|
-
Object.defineProperty(exports, "__esModule", {
|
|
36
|
-
value: true
|
|
37
|
-
});
|
|
38
|
-
exports.loadOc2smsAction = exports.default = void 0;
|
|
39
|
-
|
|
40
|
-
require("regenerator-runtime/runtime");
|
|
41
|
-
|
|
42
|
-
var _toolkit = require("@reduxjs/toolkit");
|
|
43
|
-
|
|
44
|
-
var _click2sms = _interopRequireDefault(require("../../api/click2sms"));
|
|
45
|
-
|
|
46
|
-
var RDS = _interopRequireWildcard(require("../../common-types/RemoteDataState"));
|
|
47
|
-
|
|
48
|
-
var _click2smsSliceTypes = require("./categories/typings/click2smsSliceTypes");
|
|
49
|
-
|
|
50
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
|
-
|
|
52
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
|
-
|
|
54
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
|
-
|
|
56
|
-
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; }
|
|
57
|
-
|
|
58
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var 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; }
|
|
59
|
-
|
|
60
|
-
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; }
|
|
61
|
-
|
|
62
|
-
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); } }
|
|
63
|
-
|
|
64
|
-
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); }); }; }
|
|
65
|
-
|
|
66
|
-
var loadOc2smsAction = (0, _toolkit.createAsyncThunk)('click2smsFlow/loadOc2smsAction',
|
|
67
|
-
/*#__PURE__*/
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
function () {
|
|
71
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(payload, thunkApi) {
|
|
72
|
-
var strategyState, currentState, maybeConfig, x;
|
|
73
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
74
|
-
while (1) {
|
|
75
|
-
switch (_context.prev = _context.next) {
|
|
76
|
-
case 0:
|
|
77
|
-
strategyState = thunkApi.getState().strategy.currentState;
|
|
78
|
-
currentState = thunkApi.getState().moFlow.currentState; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
79
|
-
// @ts-ignore
|
|
80
|
-
|
|
81
|
-
maybeConfig = strategyState.nextData.config || payload.configs;
|
|
82
|
-
|
|
83
|
-
if (!(!!maybeConfig && maybeConfig.tag === 'keywordAndShortCode')) {
|
|
84
|
-
_context.next = 5;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return _context.abrupt("return", {
|
|
89
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
90
|
-
result: _objectSpread({
|
|
91
|
-
type: 'SingleSubmissionResult'
|
|
92
|
-
}, maybeConfig)
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
case 5:
|
|
96
|
-
if (!(!!maybeConfig && maybeConfig.tag !== 'keyword' || !maybeConfig)) {
|
|
97
|
-
_context.next = 16;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
_context.prev = 6;
|
|
102
|
-
_context.next = 9;
|
|
103
|
-
return (0, _click2sms.default)(window, maybeConfig);
|
|
104
|
-
|
|
105
|
-
case 9:
|
|
106
|
-
x = _context.sent;
|
|
107
|
-
return _context.abrupt("return", {
|
|
108
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
109
|
-
result: x
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
case 13:
|
|
113
|
-
_context.prev = 13;
|
|
114
|
-
_context.t0 = _context["catch"](6);
|
|
115
|
-
return _context.abrupt("return", thunkApi.rejectWithValue(_objectSpread(_objectSpread({}, currentState), {}, {
|
|
116
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
117
|
-
result: _context.t0.toString()
|
|
118
|
-
})));
|
|
119
|
-
|
|
120
|
-
case 16:
|
|
121
|
-
case "end":
|
|
122
|
-
return _context.stop();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}, _callee, null, [[6, 13]]);
|
|
126
|
-
}));
|
|
127
|
-
|
|
128
|
-
return function (_x, _x2) {
|
|
129
|
-
return _ref.apply(this, arguments);
|
|
130
|
-
};
|
|
131
|
-
}());
|
|
132
|
-
exports.loadOc2smsAction = loadOc2smsAction;
|
|
133
|
-
|
|
134
|
-
var handleLoadOc2smsAction = function handleLoadOc2smsAction(builder) {
|
|
135
|
-
builder.addCase(loadOc2smsAction.pending, function (state) {
|
|
136
|
-
state.currentState = {
|
|
137
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
138
|
-
result: RDS.Loading()
|
|
139
|
-
};
|
|
140
|
-
});
|
|
141
|
-
builder.addCase(loadOc2smsAction.fulfilled, function (state, _ref2) {
|
|
142
|
-
var payload = _ref2.payload;
|
|
143
|
-
state.currentState = {
|
|
144
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
145
|
-
result: RDS.Success(payload.result)
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
builder.addCase(loadOc2smsAction.rejected, function (state, _ref3) {
|
|
149
|
-
var payload = _ref3.payload;
|
|
150
|
-
state.currentState = {
|
|
151
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
152
|
-
result: RDS.Failure(payload.result)
|
|
153
|
-
};
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
var initialState = {
|
|
158
|
-
currentState: {
|
|
159
|
-
type: _click2smsSliceTypes.Click2smsStates.LOAD_OC2SMS,
|
|
160
|
-
result: RDS.NothingYet()
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
var click2smsFlowSlice = (0, _toolkit.createSlice)({
|
|
164
|
-
name: 'click2smsFlow',
|
|
165
|
-
initialState: initialState,
|
|
166
|
-
reducers: {},
|
|
167
|
-
extraReducers: function extraReducers(builder) {
|
|
168
|
-
handleLoadOc2smsAction(builder);
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
var _default = click2smsFlowSlice.reducer;
|
|
172
|
-
exports.default = _default;
|