@tap-payments/auth-jsconnect 2.6.28-test → 2.6.30-test
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/build/api/index.d.ts +1 -1
- package/build/api/lead.d.ts +1 -1
- package/build/api/lead.js +3 -3
- package/build/features/app/board/boardStore.js +9 -9
- package/build/features/board/Board.d.ts +1 -0
- package/build/features/board/Board.js +2 -2
- package/build/features/entity/screens/EntityName/EntityName.js +1 -1
- package/package.json +1 -1
package/build/api/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare const API: {
|
|
|
53
53
|
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
54
54
|
updateLeadExpress: ({ id, ...data }: UpdateLeadBody) => Promise<any>;
|
|
55
55
|
verifyExpressLeadToken: (data: ExpressLeadVerifyBody) => Promise<any>;
|
|
56
|
-
|
|
56
|
+
createVerifyTokenByBoardId: (boardId: string) => Promise<any>;
|
|
57
57
|
};
|
|
58
58
|
entityService: {
|
|
59
59
|
createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
package/build/api/lead.d.ts
CHANGED
|
@@ -105,6 +105,6 @@ declare const leadService: {
|
|
|
105
105
|
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
106
106
|
updateLeadExpress: ({ id, ...data }: UpdateLeadBody) => Promise<any>;
|
|
107
107
|
verifyExpressLeadToken: (data: ExpressLeadVerifyBody) => Promise<any>;
|
|
108
|
-
|
|
108
|
+
createVerifyTokenByBoardId: (boardId: string) => Promise<any>;
|
|
109
109
|
};
|
|
110
110
|
export { leadService };
|
package/build/api/lead.js
CHANGED
|
@@ -97,14 +97,14 @@ var retrieveLeadIdentity = function (leadId) {
|
|
|
97
97
|
url: "".concat(ENDPOINT_PATHS.LEAD, "/").concat(leadId, "/identity")
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
var
|
|
100
|
+
var createVerifyTokenByBoardId = function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
101
101
|
return __generator(this, function (_a) {
|
|
102
102
|
return [2, httpClient({
|
|
103
103
|
method: 'post',
|
|
104
104
|
url: "".concat(ENDPOINT_PATHS.CREATE_TOKEN_PATH),
|
|
105
105
|
data: {
|
|
106
106
|
service_name: 'tap_email',
|
|
107
|
-
|
|
107
|
+
board_id: boardId
|
|
108
108
|
}
|
|
109
109
|
})];
|
|
110
110
|
});
|
|
@@ -120,6 +120,6 @@ var leadService = {
|
|
|
120
120
|
retrieveLeadIdentity: retrieveLeadIdentity,
|
|
121
121
|
updateLeadExpress: updateLeadExpress,
|
|
122
122
|
verifyExpressLeadToken: verifyExpressLeadToken,
|
|
123
|
-
|
|
123
|
+
createVerifyTokenByBoardId: createVerifyTokenByBoardId
|
|
124
124
|
};
|
|
125
125
|
export { leadService };
|
|
@@ -52,39 +52,39 @@ import { FlowsTypes } from '../../../@types';
|
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
|
|
53
53
|
import { BOARD_STEP_STEPS } from '../../../constants';
|
|
54
54
|
import { sleep } from '../../../utils';
|
|
55
|
-
export var createVerifyTokenBy = createAsyncThunk('board/
|
|
55
|
+
export var createVerifyTokenBy = createAsyncThunk('board/createVerifyTokenByBoardId', function (boardId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var settings, data, step_name;
|
|
57
57
|
var _a, _b;
|
|
58
58
|
return __generator(this, function (_c) {
|
|
59
59
|
switch (_c.label) {
|
|
60
60
|
case 0:
|
|
61
61
|
settings = thunkApi.getState().settings;
|
|
62
|
-
return [4, API.leadService.
|
|
62
|
+
return [4, API.leadService.createVerifyTokenByBoardId(boardId)];
|
|
63
63
|
case 1:
|
|
64
64
|
data = _c.sent();
|
|
65
65
|
step_name = data.step_name;
|
|
66
66
|
if (step_name == BOARD_STEP_STEPS.PHONE_AUTH) {
|
|
67
67
|
sleep(0).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('BOARD_VERIFY_STEP')); });
|
|
68
|
-
return [2, __assign(
|
|
68
|
+
return [2, __assign({}, data)];
|
|
69
69
|
}
|
|
70
70
|
return [4, thunkApi.dispatch(retrieveBoardDetails(data.id))];
|
|
71
71
|
case 2:
|
|
72
72
|
_c.sent();
|
|
73
|
-
(_b = (_a = settings.data.appConfig).onFlowCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, { boardId: data.id, boardInfoId: data.board_info_id
|
|
73
|
+
(_b = (_a = settings.data.appConfig).onFlowCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, { boardId: data.id, boardInfoId: data.board_info_id });
|
|
74
74
|
sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP')); });
|
|
75
|
-
return [2, __assign(
|
|
75
|
+
return [2, __assign({}, data)];
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}); });
|
|
79
79
|
export var resendOTP = createAsyncThunk('board/resendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
-
var board,
|
|
80
|
+
var board, boardId, data;
|
|
81
81
|
var _a, _b;
|
|
82
82
|
return __generator(this, function (_c) {
|
|
83
83
|
switch (_c.label) {
|
|
84
84
|
case 0:
|
|
85
85
|
board = thunkApi.getState().board;
|
|
86
|
-
|
|
87
|
-
return [4, API.leadService.
|
|
86
|
+
boardId = (_b = (_a = board.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '';
|
|
87
|
+
return [4, API.leadService.createVerifyTokenByBoardId(boardId)];
|
|
88
88
|
case 1:
|
|
89
89
|
data = _c.sent();
|
|
90
90
|
return [2, { data: data }];
|
|
@@ -115,7 +115,7 @@ export var verifyBoardLeadOTP = createAsyncThunk('board/verifyBoardLeadOTP', fun
|
|
|
115
115
|
case 2:
|
|
116
116
|
_g.sent();
|
|
117
117
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
118
|
-
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { boardId: responseBody === null || responseBody === void 0 ? void 0 : responseBody.id, boardInfoId: responseBody === null || responseBody === void 0 ? void 0 : responseBody.board_info_id
|
|
118
|
+
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { boardId: responseBody === null || responseBody === void 0 ? void 0 : responseBody.id, boardInfoId: responseBody === null || responseBody === void 0 ? void 0 : responseBody.board_info_id });
|
|
119
119
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('BOARD_SUCCESS_FLOWS_BUTTONS_STEP')); });
|
|
120
120
|
return [2, { data: data, formData: params }];
|
|
121
121
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface BoardLibProps extends LibConfig {
|
|
4
4
|
configToken: string;
|
|
5
|
+
boardId: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function BoardElement(props: BoardLibProps): JSX.Element;
|
|
7
8
|
export declare function renderBoardLib(config: BoardLibProps, elementId: string): {
|
|
@@ -36,7 +36,7 @@ import { boardFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { createVerifyTokenBy, boardSelector } from '../../features/app/board/boardStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Board = memo(function (_a) {
|
|
39
|
-
var configToken = _a.configToken, props = __rest(_a, ["configToken"]);
|
|
39
|
+
var configToken = _a.configToken, boardId = _a.boardId, props = __rest(_a, ["configToken", "boardId"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
41
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
42
42
|
var _c = useAppSelector(boardSelector), customLoading = _c.customLoading, loading = _c.loading, bankError = _c.error;
|
|
@@ -53,7 +53,7 @@ var Board = memo(function (_a) {
|
|
|
53
53
|
React.useEffect(function () {
|
|
54
54
|
if (data.isValidOperator && props.open && !settingLoading) {
|
|
55
55
|
console.log('data', data);
|
|
56
|
-
dispatch(createVerifyTokenBy(
|
|
56
|
+
dispatch(createVerifyTokenBy(boardId));
|
|
57
57
|
}
|
|
58
58
|
}, [data.isValidOperator, settingLoading]);
|
|
59
59
|
var initialLoading = settingLoading || customLoading;
|
|
@@ -139,6 +139,6 @@ var EntityName = function (_a) {
|
|
|
139
139
|
var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
|
|
140
140
|
var showLicenseNumber = isKWCountry ? isCR : true;
|
|
141
141
|
var showUnifiedNumber = isSACountry ? isCR : false;
|
|
142
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']), isVerified: isLegalNameVerified }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); }, isVerified: isEntityTypeVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'], isVerified: isLicenseNumberVerified }), _jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'], isVerified: isUnifiedNumberVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'], isVerified: isIssuingDateVerified }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'], isVerified: isExpiryDateVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: isSACountry
|
|
142
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']), isVerified: isLegalNameVerified }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); }, isVerified: isEntityTypeVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'], isVerified: isLicenseNumberVerified }), _jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'], isVerified: isUnifiedNumberVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'], isVerified: isIssuingDateVerified }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'], isVerified: isExpiryDateVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: isSACountry ? false : !isKWCountry || isCR, readOnly: readOnly['certificateId'] || noneEditable['documents'] }), _jsx(Article, { defaultFile: defaultArticleFile, show: !isSACountry, readOnly: readOnly['articleId'] || noneEditable['AOA_file_id'], isVerified: isArticleIdVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
143
143
|
};
|
|
144
144
|
export default EntityName;
|