@tap-payments/auth-jsconnect 2.8.62-development → 2.8.63-development
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.
|
@@ -18,5 +18,5 @@ export default function ThemeProvider(_a) {
|
|
|
18
18
|
if (!theme) {
|
|
19
19
|
return _jsx(Fragment, {});
|
|
20
20
|
}
|
|
21
|
-
return (_jsx(ScopedCssBaseline, { children: _jsx(MUIThemeProvider, __assign({ theme: theme }, { children: children })) }));
|
|
21
|
+
return (_jsx(ScopedCssBaseline, __assign({ sx: { background: 'inherit' } }, { children: _jsx(MUIThemeProvider, __assign({ theme: theme }, { children: children })) })));
|
|
22
22
|
}
|
|
@@ -7,6 +7,7 @@ interface verifyLeadTokenProps {
|
|
|
7
7
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
8
|
data: any;
|
|
9
9
|
token: string;
|
|
10
|
+
flows: any;
|
|
10
11
|
}, verifyLeadTokenProps, {
|
|
11
12
|
state?: unknown;
|
|
12
13
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -49,6 +50,7 @@ export declare const verifyPasswordLeadOTP: import("@reduxjs/toolkit").AsyncThun
|
|
|
49
50
|
formData: {
|
|
50
51
|
otp: string;
|
|
51
52
|
};
|
|
53
|
+
flows: any;
|
|
52
54
|
}, OTPFormValues, {
|
|
53
55
|
state?: unknown;
|
|
54
56
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -55,7 +55,7 @@ import { retrieveIndividualData, sleep } from '../../../utils';
|
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data, _b, config, board_info_password_status, country_code, board_id, countryIso2, publicKey, data_1;
|
|
58
|
+
var payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, data_1, flows, data_2;
|
|
59
59
|
var _c, _d;
|
|
60
60
|
return __generator(this, function (_e) {
|
|
61
61
|
switch (_e.label) {
|
|
@@ -72,7 +72,7 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
|
|
|
72
72
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
73
73
|
if (isInternally)
|
|
74
74
|
data.step_name = PASSWORD_STEP_NAMES.PASSWORD_INFO;
|
|
75
|
-
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.
|
|
75
|
+
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
|
|
76
76
|
countryIso2 = country_code;
|
|
77
77
|
if (countryIso2)
|
|
78
78
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
@@ -87,16 +87,27 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
|
|
|
87
87
|
thunkApi.dispatch(handleSetCountryByIso2(data_1.entity.country));
|
|
88
88
|
_e.label = 3;
|
|
89
89
|
case 3:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
flows = [];
|
|
91
|
+
if (!(data.step_name === PASSWORD_STEP_NAMES.PHONE_AUTH)) return [3, 4];
|
|
92
|
+
thunkApi.dispatch(handleCurrentActiveScreen('PASSWORD_VERIFY_STEP'));
|
|
93
|
+
return [3, 7];
|
|
94
|
+
case 4:
|
|
95
|
+
if (!(board_info_password_status === 'completed')) return [3, 6];
|
|
96
|
+
return [4, Promise.all([
|
|
97
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
98
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
|
|
99
|
+
])];
|
|
100
|
+
case 5:
|
|
101
|
+
data_2 = (_e.sent())[0];
|
|
102
|
+
flows = (data_2 === null || data_2 === void 0 ? void 0 : data_2.info) || [];
|
|
103
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
104
|
+
return [3, 7];
|
|
105
|
+
case 6:
|
|
106
|
+
if (data.step_name === PASSWORD_STEP_NAMES.PASSWORD_INFO) {
|
|
97
107
|
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
98
108
|
}
|
|
99
|
-
|
|
109
|
+
_e.label = 7;
|
|
110
|
+
case 7: return [2, { data: data, token: token, flows: flows }];
|
|
100
111
|
}
|
|
101
112
|
});
|
|
102
113
|
});
|
|
@@ -144,7 +155,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails
|
|
|
144
155
|
});
|
|
145
156
|
});
|
|
146
157
|
export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
|
-
var _a, password, settings, responseBody, payload, data, _b, config, board_info_password_status, country_code, board_id, countryIso2, publicKey,
|
|
158
|
+
var _a, password, settings, responseBody, payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, flows, data_3, data_4;
|
|
148
159
|
var _c, _d, _e, _f, _g;
|
|
149
160
|
return __generator(this, function (_h) {
|
|
150
161
|
switch (_h.label) {
|
|
@@ -163,7 +174,7 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
|
|
|
163
174
|
data = (_h.sent()).data;
|
|
164
175
|
if ((_d = data === null || data === void 0 ? void 0 : data.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
165
176
|
throw new Error(data.errors[0].description);
|
|
166
|
-
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.
|
|
177
|
+
_b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
|
|
167
178
|
countryIso2 = country_code;
|
|
168
179
|
if (countryIso2)
|
|
169
180
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
@@ -171,21 +182,29 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
|
|
|
171
182
|
if (publicKey)
|
|
172
183
|
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
173
184
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return [
|
|
185
|
+
flows = [];
|
|
186
|
+
if (!(board_info_password_status === 'completed')) return [3, 3];
|
|
187
|
+
return [4, Promise.all([
|
|
188
|
+
API.boardService.retrieveBoardInfoStatus(board_id),
|
|
189
|
+
thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
|
|
190
|
+
])];
|
|
177
191
|
case 2:
|
|
178
|
-
|
|
179
|
-
|
|
192
|
+
data_3 = (_h.sent())[0];
|
|
193
|
+
flows = (data_3 === null || data_3 === void 0 ? void 0 : data_3.info) || [];
|
|
194
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
195
|
+
return [3, 6];
|
|
180
196
|
case 3:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
thunkApi.dispatch(handleSetCountryByIso2(data_2.entity.country));
|
|
184
|
-
_h.label = 4;
|
|
197
|
+
if (!!country_code) return [3, 5];
|
|
198
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
185
199
|
case 4:
|
|
186
|
-
|
|
200
|
+
data_4 = _h.sent();
|
|
201
|
+
if ((_g = data_4 === null || data_4 === void 0 ? void 0 : data_4.entity) === null || _g === void 0 ? void 0 : _g.country)
|
|
202
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_4.entity.country));
|
|
187
203
|
_h.label = 5;
|
|
188
|
-
case 5:
|
|
204
|
+
case 5:
|
|
205
|
+
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
206
|
+
_h.label = 6;
|
|
207
|
+
case 6: return [2, { data: data, formData: __assign({}, params), flows: flows }];
|
|
189
208
|
}
|
|
190
209
|
});
|
|
191
210
|
}); });
|
|
@@ -270,7 +289,7 @@ export var retrieveBoardStatus = createAsyncThunk('password/retrieveBoardStatus'
|
|
|
270
289
|
});
|
|
271
290
|
}); });
|
|
272
291
|
export var verifyOperationToken = createAsyncThunk('verifyOperationToken', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
273
|
-
var token, boardId, boardInfoId, userId, userType, payload, data, countryIso2, publicKey,
|
|
292
|
+
var token, boardId, boardInfoId, userId, userType, payload, data, countryIso2, publicKey, data_5;
|
|
274
293
|
var _a, _b, _c;
|
|
275
294
|
return __generator(this, function (_d) {
|
|
276
295
|
switch (_d.label) {
|
|
@@ -294,9 +313,9 @@ export var verifyOperationToken = createAsyncThunk('verifyOperationToken', funct
|
|
|
294
313
|
if (!!(data === null || data === void 0 ? void 0 : data.country)) return [3, 3];
|
|
295
314
|
return [4, API.boardService.retrieveBoardDetails(boardId)];
|
|
296
315
|
case 2:
|
|
297
|
-
|
|
298
|
-
if ((_c =
|
|
299
|
-
thunkApi.dispatch(handleSetCountryByIso2(
|
|
316
|
+
data_5 = _d.sent();
|
|
317
|
+
if ((_c = data_5 === null || data_5 === void 0 ? void 0 : data_5.entity) === null || _c === void 0 ? void 0 : _c.country)
|
|
318
|
+
thunkApi.dispatch(handleSetCountryByIso2(data_5.entity.country));
|
|
300
319
|
_d.label = 3;
|
|
301
320
|
case 3:
|
|
302
321
|
thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
|
|
@@ -441,8 +460,10 @@ export var passwordSlice = createSlice({
|
|
|
441
460
|
state.data.verify.operationType = PASSWORD_OPERATION_TYPE.SET_PASSWORD;
|
|
442
461
|
state.error = null;
|
|
443
462
|
state.customLoading = false;
|
|
444
|
-
var _a = action.payload, data = _a.data, token = _a.token;
|
|
445
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id })
|
|
463
|
+
var _a = action.payload, data = _a.data, token = _a.token, flows = _a.flows;
|
|
464
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
|
|
465
|
+
flows: flows
|
|
466
|
+
}));
|
|
446
467
|
state.data.verify.token = token;
|
|
447
468
|
})
|
|
448
469
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
@@ -477,10 +498,12 @@ export var passwordSlice = createSlice({
|
|
|
477
498
|
.addCase(verifyPasswordLeadOTP.fulfilled, function (state, action) {
|
|
478
499
|
state.loading = false;
|
|
479
500
|
state.error = null;
|
|
480
|
-
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
501
|
+
var _a = action.payload, data = _a.data, formData = _a.formData, flows = _a.flows;
|
|
481
502
|
state.data.otpData = formData;
|
|
482
503
|
state.data.otpData.responseBody = data;
|
|
483
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id })
|
|
504
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
|
|
505
|
+
flows: flows
|
|
506
|
+
}));
|
|
484
507
|
})
|
|
485
508
|
.addCase(verifyPasswordLeadOTP.rejected, function (state, action) {
|
|
486
509
|
state.loading = false;
|