@tap-payments/auth-jsconnect 2.0.79-test → 2.0.80-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/entity.d.ts +13 -0
- package/build/api/entity.js +9 -1
- package/build/api/index.d.ts +3 -2
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +3 -1
- package/build/features/app/business/businessStore.d.ts +1 -0
- package/build/features/app/business/businessStore.js +13 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +3 -1
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +1 -1
- package/build/features/connect/Connect.js +1 -1
- package/package.json +1 -1
package/build/api/entity.d.ts
CHANGED
|
@@ -53,6 +53,18 @@ export declare type UploadFileBody = {
|
|
|
53
53
|
title: string | undefined;
|
|
54
54
|
purpose: string;
|
|
55
55
|
};
|
|
56
|
+
export declare type DocumentInfo = {
|
|
57
|
+
type?: string;
|
|
58
|
+
number?: string;
|
|
59
|
+
issuing_country?: string;
|
|
60
|
+
issuing_date?: string;
|
|
61
|
+
expiry_date?: string;
|
|
62
|
+
images: Array<string>;
|
|
63
|
+
};
|
|
64
|
+
export declare type DocumentUpdateBody = {
|
|
65
|
+
entity_id: boolean;
|
|
66
|
+
documents: Array<DocumentInfo>;
|
|
67
|
+
};
|
|
56
68
|
declare const entityService: {
|
|
57
69
|
createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
58
70
|
updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -61,5 +73,6 @@ declare const entityService: {
|
|
|
61
73
|
retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
62
74
|
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
63
75
|
uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
76
|
+
updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
|
|
64
77
|
};
|
|
65
78
|
export { entityService };
|
package/build/api/entity.js
CHANGED
|
@@ -53,6 +53,13 @@ var updateIndividualInfo = function (_a) {
|
|
|
53
53
|
data: data
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
+
var updateDocumentInfo = function (data) {
|
|
57
|
+
return httpClient({
|
|
58
|
+
method: 'post',
|
|
59
|
+
url: "".concat(ENDPOINT_PATHS.DOCUMENT),
|
|
60
|
+
data: data
|
|
61
|
+
});
|
|
62
|
+
};
|
|
56
63
|
var entityService = {
|
|
57
64
|
createEntityInfo: createEntityInfo,
|
|
58
65
|
updateEntityInfo: updateEntityInfo,
|
|
@@ -60,6 +67,7 @@ var entityService = {
|
|
|
60
67
|
retrieveBankAccount: retrieveBankAccount,
|
|
61
68
|
retrieveEntityInfo: retrieveEntityInfo,
|
|
62
69
|
updateIndividualInfo: updateIndividualInfo,
|
|
63
|
-
uploadFileInfo: uploadFileInfo
|
|
70
|
+
uploadFileInfo: uploadFileInfo,
|
|
71
|
+
updateDocumentInfo: updateDocumentInfo
|
|
64
72
|
};
|
|
65
73
|
export { entityService };
|
package/build/api/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ValidateOperatorBody } from './operator';
|
|
|
3
3
|
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
|
-
import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody } from './entity';
|
|
6
|
+
import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, DocumentUpdateBody, DocumentInfo } from './entity';
|
|
7
7
|
import { CreateAccountBody } from './account';
|
|
8
8
|
import { DataElementBody } from './data';
|
|
9
9
|
import { BrandListBody, UpdateBrandBody } from './individual';
|
|
@@ -42,6 +42,7 @@ declare const API: {
|
|
|
42
42
|
retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
43
|
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
44
44
|
uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
45
|
+
updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
|
|
45
46
|
};
|
|
46
47
|
availabilityServices: {
|
|
47
48
|
checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -99,6 +100,6 @@ declare const API: {
|
|
|
99
100
|
updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
|
|
100
101
|
};
|
|
101
102
|
};
|
|
102
|
-
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody };
|
|
103
|
+
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, DocumentUpdateBody, DocumentInfo };
|
|
103
104
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
104
105
|
export default API;
|
package/build/constants/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -35,6 +35,7 @@ var RETRIEVE_USER_INFO_PATH = '/user';
|
|
|
35
35
|
var BOARD_PATH = '/board';
|
|
36
36
|
var CONNECT_PATH = '/connect';
|
|
37
37
|
var VERIFY_AUTH_OTP_PATH = "".concat(CONNECT_PATH, "/lead/verify");
|
|
38
|
+
var DOCUMENT_PATH = '/document';
|
|
38
39
|
export var ENDPOINT_PATHS = {
|
|
39
40
|
SANDBOX_BASE_URL: SANDBOX_BASE_URL,
|
|
40
41
|
PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
|
|
@@ -71,5 +72,6 @@ export var ENDPOINT_PATHS = {
|
|
|
71
72
|
BRAND: BRAND_PATH,
|
|
72
73
|
BRAND_SALES_CHANNELS: BRAND_SALES_CHANNELS,
|
|
73
74
|
VERIFY_AUTH_OTP: VERIFY_AUTH_OTP_PATH,
|
|
74
|
-
RETRIEVE_ACTIVITIES_LIST_PATH: RETRIEVE_ACTIVITIES_LIST_PATH
|
|
75
|
+
RETRIEVE_ACTIVITIES_LIST_PATH: RETRIEVE_ACTIVITIES_LIST_PATH,
|
|
76
|
+
DOCUMENT: DOCUMENT_PATH
|
|
75
77
|
};
|
|
@@ -47,6 +47,7 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
|
|
|
47
47
|
data: any;
|
|
48
48
|
formData: BusinessTypeFormValues;
|
|
49
49
|
accountData: any;
|
|
50
|
+
documentData: any;
|
|
50
51
|
}, BusinessTypeFormValues, {}>;
|
|
51
52
|
interface UploadLicenseCertificateParams {
|
|
52
53
|
file: File;
|
|
@@ -413,7 +413,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
413
413
|
});
|
|
414
414
|
}); });
|
|
415
415
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
416
|
-
var _a, settings, business, payload, data, entity_activities, list, accountBody, accountData;
|
|
416
|
+
var _a, settings, business, payload, data, entity_activities, list, accountBody, accountData, documentBody, documentData;
|
|
417
417
|
var _b, _c, _d, _e, _f, _g;
|
|
418
418
|
return __generator(this, function (_h) {
|
|
419
419
|
switch (_h.label) {
|
|
@@ -452,9 +452,20 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
452
452
|
return [4, API.accountService.createAccount(accountBody)];
|
|
453
453
|
case 4:
|
|
454
454
|
accountData = _h.sent();
|
|
455
|
+
documentBody = {
|
|
456
|
+
entity_id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
|
|
457
|
+
documents: [
|
|
458
|
+
{
|
|
459
|
+
images: !!params.certificateFile ? [business.data.businessTypeData.certificateId || ''] : []
|
|
460
|
+
}
|
|
461
|
+
]
|
|
462
|
+
};
|
|
463
|
+
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
464
|
+
case 5:
|
|
465
|
+
documentData = _h.sent();
|
|
455
466
|
thunkApi.dispatch(handleNextScreenStep());
|
|
456
467
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
457
|
-
return [2, { data: data, formData: params, accountData: accountData }];
|
|
468
|
+
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData }];
|
|
458
469
|
}
|
|
459
470
|
});
|
|
460
471
|
}); });
|
|
@@ -46,7 +46,9 @@ var BusinessType = function (_a) {
|
|
|
46
46
|
var dataValues = {
|
|
47
47
|
selectedLicense: data.selectedLicense,
|
|
48
48
|
licenseNumber: data.licenseNumber,
|
|
49
|
-
entityLegalName: data.entityLegalName
|
|
49
|
+
entityLegalName: data.entityLegalName,
|
|
50
|
+
certificateId: data.certificateId,
|
|
51
|
+
certificateFile: data.certificateFile
|
|
50
52
|
};
|
|
51
53
|
dispatch(updateLeadBusinessType(dataValues));
|
|
52
54
|
};
|
|
@@ -71,6 +71,6 @@ var LicenseCertificate = function (_a) {
|
|
|
71
71
|
if ((certificateFileControl.formState.isValid || !!certificateValue) && error != 'file_upload_error')
|
|
72
72
|
clearErrors();
|
|
73
73
|
}, [certificateFileControl.formState.isValid, certificateValue]);
|
|
74
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('
|
|
74
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isFileUploaded: !uploading && !!certificateValue, isSubmitting: loading, isUploading: uploading, progress: progress, onReset: handleReset, error: error && t(error) }) }) })));
|
|
75
75
|
};
|
|
76
76
|
export default LicenseCertificate;
|
|
@@ -49,7 +49,7 @@ var Connect = memo(function (_a) {
|
|
|
49
49
|
var _a;
|
|
50
50
|
if (!settingLoading) {
|
|
51
51
|
if (isKW((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2))
|
|
52
|
-
dispatch(handleCurrentActiveScreen('
|
|
52
|
+
dispatch(handleCurrentActiveScreen('CONNECT_MOBILE_STEP'));
|
|
53
53
|
}
|
|
54
54
|
}, [settingLoading]);
|
|
55
55
|
React.useEffect(function () {
|