ouisys-engine 2.1.26 → 2.1.27
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.
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { IOneClickFlowReducerState, IOneClickActions, IOneClickFlowActionMaps, ILinkExtraParams, IMockOneClickFlowStates } from "./OneClickTypes";
|
|
2
2
|
import { AppThunk } from "../../common-types/AppThunk";
|
|
3
3
|
import { IHash } from "../strategy/StrategyTypes";
|
|
4
|
-
export declare function getRedirectUrlAction(extraParams
|
|
4
|
+
export declare function getRedirectUrlAction({ extraParams, autoRedirect, isGetRedirectBupperWay }: {
|
|
5
|
+
extraParams?: ILinkExtraParams;
|
|
6
|
+
autoRedirect?: boolean;
|
|
7
|
+
isGetRedirectBupperWay?: boolean;
|
|
8
|
+
}): AppThunk;
|
|
5
9
|
export declare function subscribeUrlAction(autoRedirect?: boolean, extraParams?: IHash): AppThunk;
|
|
6
10
|
export declare function mockOneClickFlow(mockState: IMockOneClickFlowStates): AppThunk;
|
|
7
11
|
export declare const OneClickFlowActionMaps: IOneClickFlowActionMaps;
|
|
@@ -64,9 +64,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
64
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
65
|
|
|
66
66
|
//ACTION CREATORS
|
|
67
|
-
function getRedirectUrlAction(
|
|
67
|
+
function getRedirectUrlAction(_ref) {
|
|
68
|
+
var extraParams = _ref.extraParams,
|
|
69
|
+
_ref$autoRedirect = _ref.autoRedirect,
|
|
70
|
+
autoRedirect = _ref$autoRedirect === void 0 ? false : _ref$autoRedirect,
|
|
71
|
+
_ref$isGetRedirectBup = _ref.isGetRedirectBupperWay,
|
|
72
|
+
isGetRedirectBupperWay = _ref$isGetRedirectBup === void 0 ? false : _ref$isGetRedirectBup;
|
|
68
73
|
return /*#__PURE__*/function () {
|
|
69
|
-
var
|
|
74
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch, store) {
|
|
70
75
|
var currentState, _currentState$result, config, subscription_url, redirect_url, redirectUrl, _yield$getRedirectUrl, _redirect_url;
|
|
71
76
|
|
|
72
77
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -241,14 +246,14 @@ function getRedirectUrlAction(extraParams, autoRedirect, isGetRedirectBupperWay)
|
|
|
241
246
|
}));
|
|
242
247
|
|
|
243
248
|
return function (_x, _x2) {
|
|
244
|
-
return
|
|
249
|
+
return _ref2.apply(this, arguments);
|
|
245
250
|
};
|
|
246
251
|
}();
|
|
247
252
|
}
|
|
248
253
|
|
|
249
254
|
function subscribeUrlAction(autoRedirect, extraParams) {
|
|
250
255
|
return /*#__PURE__*/function () {
|
|
251
|
-
var
|
|
256
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch, store) {
|
|
252
257
|
var currentState, subscription_url, product_url, errorType;
|
|
253
258
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
254
259
|
while (1) {
|
|
@@ -356,7 +361,7 @@ function subscribeUrlAction(autoRedirect, extraParams) {
|
|
|
356
361
|
}));
|
|
357
362
|
|
|
358
363
|
return function (_x3, _x4) {
|
|
359
|
-
return
|
|
364
|
+
return _ref3.apply(this, arguments);
|
|
360
365
|
};
|
|
361
366
|
}();
|
|
362
367
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ import { IHash } from "../strategy/StrategyTypes";
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
//ACTION CREATORS
|
|
14
|
-
export function getRedirectUrlAction(extraParams?:ILinkExtraParams, autoRedirect?:boolean, isGetRedirectBupperWay?:boolean):AppThunk{
|
|
14
|
+
export function getRedirectUrlAction({extraParams, autoRedirect = false, isGetRedirectBupperWay = false}:{extraParams?:ILinkExtraParams, autoRedirect?:boolean, isGetRedirectBupperWay?:boolean}):AppThunk{
|
|
15
15
|
|
|
16
16
|
return async (dispatch, store)=>{
|
|
17
17
|
const {currentState} = store().strategy
|