@tap-payments/auth-jsconnect 2.0.22 → 2.0.23
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/@types/app.d.ts +5 -0
- package/build/@types/app.js +6 -0
- package/build/api/auth.d.ts +1 -0
- package/build/api/index.d.ts +4 -2
- package/build/api/individual.d.ts +21 -0
- package/build/api/individual.js +28 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +0 -2
- package/build/app/store.d.ts +0 -2
- package/build/assets/locales/ar.json +10 -1
- package/build/assets/locales/en.json +10 -1
- package/build/constants/app.d.ts +0 -5
- package/build/constants/app.js +0 -12
- package/build/constants/validation.d.ts +4 -0
- package/build/constants/validation.js +4 -0
- package/build/features/app/auth/authStore.d.ts +1 -0
- package/build/features/app/auth/authStore.js +5 -3
- package/build/features/app/bank/bankStore.d.ts +8 -0
- package/build/features/app/bank/bankStore.js +32 -15
- package/build/features/app/business/businessStore.js +1 -1
- package/build/features/app/connect/connectStore.d.ts +4 -2
- package/build/features/app/connect/connectStore.js +98 -97
- package/build/features/app/individual/individualStore.d.ts +17 -0
- package/build/features/app/individual/individualStore.js +141 -66
- package/build/features/app/tax/taxStore.js +1 -0
- package/build/features/auth/Auth.d.ts +1 -1
- package/build/features/auth/Auth.js +4 -3
- package/build/features/bank/Bank.js +2 -2
- package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -5
- package/build/features/business/Business.js +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +13 -6
- package/build/features/business/screens/BusinessType/EntityName.js +4 -4
- package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +1 -1
- package/build/features/connect/Connect.js +2 -2
- package/build/features/connect/screens/Individual/Individual.js +19 -16
- package/build/features/connect/screens/Merchant/Merchant.js +3 -2
- package/build/features/connect/screens/Merchant/SocialMedia.js +4 -2
- package/build/features/connect/screens/Merchant/validation.js +71 -59
- package/build/features/connect/screens/OTP/OTP.js +5 -4
- package/build/features/connect/screens/OTP/OTPInput.js +3 -2
- package/build/features/entity/Entity.js +5 -5
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -7
- package/build/features/individual/Individual.js +2 -2
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +4 -4
- package/build/features/password/Password.js +2 -2
- package/build/features/signIn/SignIn.js +3 -3
- package/build/features/tax/Tax.js +5 -5
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +1 -4
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +12 -0
- package/package.json +1 -1
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
- package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
- package/build/features/otp/screens/OTPVerify/index.js +0 -2
- package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
- package/build/features/otp/screens/OTPVerify/validation.js +0 -4
package/build/@types/app.d.ts
CHANGED
package/build/@types/app.js
CHANGED
|
@@ -27,3 +27,9 @@ export var FlowsTypes;
|
|
|
27
27
|
FlowsTypes["OTP"] = "otp";
|
|
28
28
|
FlowsTypes["AUTH"] = "auth";
|
|
29
29
|
})(FlowsTypes || (FlowsTypes = {}));
|
|
30
|
+
export var AuthForType;
|
|
31
|
+
(function (AuthForType) {
|
|
32
|
+
AuthForType["MOBILE"] = "mobile";
|
|
33
|
+
AuthForType["EMAIL"] = "email";
|
|
34
|
+
AuthForType["NATIONAL_ID"] = "national_id";
|
|
35
|
+
})(AuthForType || (AuthForType = {}));
|
package/build/api/auth.d.ts
CHANGED
package/build/api/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
|
6
6
|
import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, DocumentUpdateBody, DocumentInfo } from './entity';
|
|
7
7
|
import { CreateAccountBody } from './account';
|
|
8
8
|
import { DataElementBody } from './data';
|
|
9
|
-
import { BrandListBody, UpdateBrandBody } from './individual';
|
|
9
|
+
import { BrandListBody, UpdateBrandBody, UpdateIndividualBody } from './individual';
|
|
10
10
|
import { UpdateBoardBody } from './board';
|
|
11
11
|
declare const API: {
|
|
12
12
|
ipService: {
|
|
@@ -85,6 +85,8 @@ declare const API: {
|
|
|
85
85
|
};
|
|
86
86
|
individualService: {
|
|
87
87
|
retrieveIndividualInfo: (id: string) => Promise<any>;
|
|
88
|
+
retrieveIndividual: (id: string, type: string) => Promise<any>;
|
|
89
|
+
updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
|
|
88
90
|
};
|
|
89
91
|
boardService: {
|
|
90
92
|
retrieveBoard: (id: string) => Promise<any>;
|
|
@@ -103,6 +105,6 @@ declare const API: {
|
|
|
103
105
|
updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
|
|
104
106
|
};
|
|
105
107
|
};
|
|
106
|
-
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, VerifyAuthKitOTPBody };
|
|
108
|
+
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, VerifyAuthKitOTPBody, UpdateIndividualBody };
|
|
107
109
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
108
110
|
export default API;
|
|
@@ -62,7 +62,28 @@ export declare type UpdateSalesChannels = {
|
|
|
62
62
|
address: string;
|
|
63
63
|
}>;
|
|
64
64
|
};
|
|
65
|
+
export declare type UpdateIndividualBody = {
|
|
66
|
+
id: string;
|
|
67
|
+
type: string;
|
|
68
|
+
employer_name?: string;
|
|
69
|
+
employer_country?: string | null;
|
|
70
|
+
source_income?: Array<{
|
|
71
|
+
id?: string;
|
|
72
|
+
}>;
|
|
73
|
+
monthly_income?: {
|
|
74
|
+
id?: string;
|
|
75
|
+
};
|
|
76
|
+
is_relative_PEP?: boolean | null;
|
|
77
|
+
is_influencer?: boolean | null;
|
|
78
|
+
occupation?: {
|
|
79
|
+
id?: string;
|
|
80
|
+
};
|
|
81
|
+
step_name: string;
|
|
82
|
+
encryption_contract?: Array<string>;
|
|
83
|
+
};
|
|
65
84
|
declare const individualService: {
|
|
66
85
|
retrieveIndividualInfo: (id: string) => Promise<any>;
|
|
86
|
+
retrieveIndividual: (id: string, type: string) => Promise<any>;
|
|
87
|
+
updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
|
|
67
88
|
};
|
|
68
89
|
export { individualService };
|
package/build/api/individual.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
13
|
import { httpClient } from './axios';
|
|
3
14
|
var retrieveIndividualInfo = function (id) {
|
|
@@ -6,7 +17,23 @@ var retrieveIndividualInfo = function (id) {
|
|
|
6
17
|
url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info")
|
|
7
18
|
});
|
|
8
19
|
};
|
|
20
|
+
var retrieveIndividual = function (id, type) {
|
|
21
|
+
return httpClient({
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id)
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var updateIndividual = function (_a) {
|
|
27
|
+
var id = _a.id, type = _a.type, data = __rest(_a, ["id", "type"]);
|
|
28
|
+
return httpClient({
|
|
29
|
+
method: 'put',
|
|
30
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id),
|
|
31
|
+
data: data
|
|
32
|
+
});
|
|
33
|
+
};
|
|
9
34
|
var individualService = {
|
|
10
|
-
retrieveIndividualInfo: retrieveIndividualInfo
|
|
35
|
+
retrieveIndividualInfo: retrieveIndividualInfo,
|
|
36
|
+
retrieveIndividual: retrieveIndividual,
|
|
37
|
+
updateIndividual: updateIndividual
|
|
11
38
|
};
|
|
12
39
|
export { individualService };
|
|
@@ -8,7 +8,6 @@ declare const rootReducer: {
|
|
|
8
8
|
password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
|
|
9
9
|
signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
|
|
10
10
|
entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
|
|
11
|
-
otp: import("redux").Reducer<import("../features/app/otp/otpStore").OtpState, import("redux").AnyAction>;
|
|
12
11
|
auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
|
|
13
12
|
};
|
|
14
13
|
export default rootReducer;
|
package/build/app/rootReducer.js
CHANGED
|
@@ -7,7 +7,6 @@ import individual from '../features/app/individual/individualStore';
|
|
|
7
7
|
import password from '../features/app/password/passwordStore';
|
|
8
8
|
import signIn from '../features/app/signIn/signInStore';
|
|
9
9
|
import entity from '../features/app/entity/entityStore';
|
|
10
|
-
import otp from '../features/app/otp/otpStore';
|
|
11
10
|
import auth from '../features/app/auth/authStore';
|
|
12
11
|
var rootReducer = {
|
|
13
12
|
settings: settings,
|
|
@@ -19,7 +18,6 @@ var rootReducer = {
|
|
|
19
18
|
password: password,
|
|
20
19
|
signIn: signIn,
|
|
21
20
|
entity: entity,
|
|
22
|
-
otp: otp,
|
|
23
21
|
auth: auth
|
|
24
22
|
};
|
|
25
23
|
export default rootReducer;
|
package/build/app/store.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
9
9
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
10
10
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
11
11
|
entity: import("../features/app/entity/entityStore").EntityState;
|
|
12
|
-
otp: import("../features/app/otp/otpStore").OtpState;
|
|
13
12
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
14
13
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
15
14
|
settings: import("./settings").SettingsState;
|
|
@@ -21,7 +20,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
21
20
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
22
21
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
23
22
|
entity: import("../features/app/entity/entityStore").EntityState;
|
|
24
|
-
otp: import("../features/app/otp/otpStore").OtpState;
|
|
25
23
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
26
24
|
}, import("redux").AnyAction, undefined>]>>;
|
|
27
25
|
export declare type AppDispatch = typeof store.dispatch;
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"business_completed_button": "الانتهاء من إعداد حسابي",
|
|
57
57
|
"business_completed_description": "كان ذلك سهلا! أنت الان جاهز لاستقبال المدفوعات. ولكن نرجو منك، إضافة بيانات البنك لبدء تلقي المدفوعات.",
|
|
58
58
|
"business_completed_title": "تم تفعيل حسابك",
|
|
59
|
+
"business_flow_completed": "{{business_type}} {{license_number}}",
|
|
59
60
|
"business_start_date": "تاريخ بدء العمل",
|
|
60
61
|
"call_center_placeholder": "رقم هاتف خدمة الإتصال",
|
|
61
62
|
"category": "الفئة",
|
|
@@ -310,5 +311,13 @@
|
|
|
310
311
|
"verification_status": "الحالة",
|
|
311
312
|
"verification_status_cancelled": "ملغية",
|
|
312
313
|
"website": "موقع الكتروني",
|
|
313
|
-
"yes": "نعم"
|
|
314
|
+
"yes": "نعم",
|
|
315
|
+
"invalid_linkedin_profile_url": "يرجى التحقق من رابط ملفك الشخصي في LinkedIn",
|
|
316
|
+
"invalid_facebook_username": "يرجى التحقق من اسم مستخدم الفيسبوك",
|
|
317
|
+
"invalid_instagram_username": "يرجى التحقق من اسم مستخدم الانستغرام",
|
|
318
|
+
"invalid_twitter_username": "يرجى التحقق من اسم مستخدم تويتر",
|
|
319
|
+
"invalid_physical_store_location": "يرجى التحقق من موقع عنوان المتجر ",
|
|
320
|
+
"invalid_ios_app": "يرجى التحقق من اسم تطبيق iOS",
|
|
321
|
+
"invalid_android_app": "يرجى التحقق من اسم تطبيق Android",
|
|
322
|
+
"invalid_call_center_number": "يرجى التحقق من رقم مركز الاتصال"
|
|
314
323
|
}
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"business_completed_button": "Finish setting up my account",
|
|
58
58
|
"business_completed_description": "That was easy! You’re all set to accept payments. One last thing, add your bank details to start receiving your payouts.",
|
|
59
59
|
"business_completed_title": "Your account is active",
|
|
60
|
+
"business_flow_completed": "{{business_type}} {{license_number}}",
|
|
60
61
|
"business_start_date": "When did you start your business?",
|
|
61
62
|
"call_center": "Enter your call center number",
|
|
62
63
|
"call_center_placeholder": "Enter your call center number",
|
|
@@ -337,5 +338,13 @@
|
|
|
337
338
|
"verification_status": "Status",
|
|
338
339
|
"verification_status_cancelled": "Cancelled",
|
|
339
340
|
"website": "www.yourbusiness.com",
|
|
340
|
-
"yes": "Yes"
|
|
341
|
+
"yes": "Yes",
|
|
342
|
+
"invalid_linkedin_profile_url": "May you please verify the entered LinkedIn profile URL.",
|
|
343
|
+
"invalid_facebook_username": "May you please verify the entered Facebook username.",
|
|
344
|
+
"invalid_instagram_username": "May you please verify the entered Instagram username.",
|
|
345
|
+
"invalid_twitter_username": "May you please verify the entered Twitter username.",
|
|
346
|
+
"invalid_physical_store_location": "May you please verify the entered physical store location.",
|
|
347
|
+
"invalid_ios_app": "May you please verify the entered iOS application name.",
|
|
348
|
+
"invalid_android_app": "May you please verify the entered Android application name.",
|
|
349
|
+
"invalid_call_center_number": "May you please verify the entered call center number."
|
|
341
350
|
}
|
package/build/constants/app.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export declare const BANK_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
|
23
23
|
export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
24
24
|
export declare const SigIn_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
25
25
|
export declare const ENTITY_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
26
|
-
export declare const OTP_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
27
26
|
export declare const AUTH_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
28
27
|
export declare const DefaultDeviceInfo: {
|
|
29
28
|
source: string;
|
|
@@ -135,10 +134,6 @@ export declare const ENTITY_STEP_NAMES: {
|
|
|
135
134
|
ENTITY_INFO: string;
|
|
136
135
|
ENTITY_SUCCESS: string;
|
|
137
136
|
};
|
|
138
|
-
export declare const OTP_STEP_NAMES: {
|
|
139
|
-
PHONE_AUTH: string;
|
|
140
|
-
OTP_SUCCESS: string;
|
|
141
|
-
};
|
|
142
137
|
export declare const RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
143
138
|
export declare const ENCRYPTION_FLAG = "encryption_contract";
|
|
144
139
|
export declare const BACKEND_ENCRYPTION_FLAG = "backend_encryption_contract";
|
package/build/constants/app.js
CHANGED
|
@@ -339,14 +339,6 @@ export var ENTITY_SCREENS_NAVIGATION = [
|
|
|
339
339
|
order: 5
|
|
340
340
|
}
|
|
341
341
|
];
|
|
342
|
-
export var OTP_SCREENS_NAVIGATION = [
|
|
343
|
-
{
|
|
344
|
-
name: 'OTP_VERIFY_STEP',
|
|
345
|
-
next: '',
|
|
346
|
-
prev: '',
|
|
347
|
-
order: 1
|
|
348
|
-
}
|
|
349
|
-
];
|
|
350
342
|
export var AUTH_SCREENS_NAVIGATION = [
|
|
351
343
|
{
|
|
352
344
|
name: 'AUTH_NID_STEP',
|
|
@@ -471,10 +463,6 @@ export var ENTITY_STEP_NAMES = {
|
|
|
471
463
|
ENTITY_INFO: 'entity_info',
|
|
472
464
|
ENTITY_SUCCESS: 'entity_completed'
|
|
473
465
|
};
|
|
474
|
-
export var OTP_STEP_NAMES = {
|
|
475
|
-
PHONE_AUTH: 'otp_phone_auth',
|
|
476
|
-
OTP_SUCCESS: 'otp_completed'
|
|
477
|
-
};
|
|
478
466
|
export var RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
479
467
|
export var ENCRYPTION_FLAG = 'encryption_contract';
|
|
480
468
|
export var BACKEND_ENCRYPTION_FLAG = 'backend_encryption_contract';
|
|
@@ -15,3 +15,7 @@ export declare const REGEX_WEBSITE: RegExp;
|
|
|
15
15
|
export declare const REGEX_BENEFICIARY_NAME: RegExp;
|
|
16
16
|
export declare const REGEX_BRAND_NAME: RegExp;
|
|
17
17
|
export declare const EMAIL_MAX_LENGTH = 50;
|
|
18
|
+
export declare const LINKEDIN_URL: RegExp;
|
|
19
|
+
export declare const SOCIAL_USERNAME: RegExp;
|
|
20
|
+
export declare const DIGITS_ONLY: RegExp;
|
|
21
|
+
export declare const REGEX_PHONE_APP_NAME: RegExp;
|
|
@@ -15,3 +15,7 @@ export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63
|
|
|
15
15
|
export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z()\s])*$/g;
|
|
16
16
|
export var REGEX_BRAND_NAME = /^(([a-zA-Z0-9])+\s)*[a-zA-Z0-9]+$/;
|
|
17
17
|
export var EMAIL_MAX_LENGTH = 50;
|
|
18
|
+
export var LINKEDIN_URL = /^((http|https):\/\/)(www.linkedin.com\/)in(\/)[a-zA-Z0-9-]+$/;
|
|
19
|
+
export var SOCIAL_USERNAME = /^[a-z\d.]{5,}$/;
|
|
20
|
+
export var DIGITS_ONLY = /^\d+$/;
|
|
21
|
+
export var REGEX_PHONE_APP_NAME = /^[a-zA-Z0-9[._-]*$/;
|
|
@@ -52,20 +52,21 @@ export var retrieveLead = createAsyncThunk('retrieveLeadAuthKit', function (lead
|
|
|
52
52
|
});
|
|
53
53
|
}); });
|
|
54
54
|
export var verifyAuthOTP = createAsyncThunk('verifyAuthOTPKit', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var _a, settings, auth, _b, postUrl, verifyToken, device_token, payload, data;
|
|
55
|
+
var _a, settings, auth, _b, postUrl, verifyToken, device_token, leadId, service_name, payload, data;
|
|
56
56
|
var _c, _d, _e, _f;
|
|
57
57
|
return __generator(this, function (_g) {
|
|
58
58
|
switch (_g.label) {
|
|
59
59
|
case 0:
|
|
60
60
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
61
|
-
_b = auth.data, postUrl = _b.postUrl, verifyToken = _b.verifyToken, device_token = _b.device_token;
|
|
61
|
+
_b = auth.data, postUrl = _b.postUrl, verifyToken = _b.verifyToken, device_token = _b.device_token, leadId = _b.leadId, service_name = _b.service_name;
|
|
62
62
|
payload = {
|
|
63
63
|
auth_token: verifyToken,
|
|
64
|
+
lead_id: leadId,
|
|
64
65
|
data: params.otp,
|
|
65
66
|
post_url: postUrl,
|
|
66
67
|
auth_type: 2,
|
|
67
68
|
device_token: device_token || '',
|
|
68
|
-
service_name: '
|
|
69
|
+
service_name: service_name || 'ABSHER',
|
|
69
70
|
sign_in: false,
|
|
70
71
|
scopes: settings.data.appConfig.scope || [],
|
|
71
72
|
terms: auth.data.termAndConditionChecked ? ['general'] : [],
|
|
@@ -228,6 +229,7 @@ export var authSlice = createSlice({
|
|
|
228
229
|
state.data.nid = formData.nid;
|
|
229
230
|
state.data.termAndConditionChecked = formData.termAndConditionChecked;
|
|
230
231
|
state.data.device_token = data === null || data === void 0 ? void 0 : data.device_token;
|
|
232
|
+
state.data.service_name = data === null || data === void 0 ? void 0 : data.service_name;
|
|
231
233
|
})
|
|
232
234
|
.addCase(createAuth.rejected, function (state, action) {
|
|
233
235
|
state.loading = false;
|
|
@@ -4,6 +4,14 @@ import { CancelToken } from 'axios';
|
|
|
4
4
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
5
|
data: any;
|
|
6
6
|
boardResponse: {
|
|
7
|
+
user: any;
|
|
8
|
+
brand: any;
|
|
9
|
+
bank_account: any;
|
|
10
|
+
entity: any;
|
|
11
|
+
merchant: any;
|
|
12
|
+
name: any;
|
|
13
|
+
contact: any;
|
|
14
|
+
business: any;
|
|
7
15
|
flows: {
|
|
8
16
|
name: string;
|
|
9
17
|
status: string;
|
|
@@ -52,10 +52,10 @@ import { FlowsTypes } from '../../../@types';
|
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
|
|
53
53
|
import { BANK_STEP_NAMES, BUSINESS_FLOW_SUCCESS } from '../../../constants';
|
|
54
54
|
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var payload, data, boardInfoData, board_id, board_info_id, info, hasBankCompleted;
|
|
56
|
-
var _a;
|
|
57
|
-
return __generator(this, function (
|
|
58
|
-
switch (
|
|
55
|
+
var payload, data, boardInfoData, boardData, board_id, board_info_id, info, hasBankCompleted;
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
return __generator(this, function (_d) {
|
|
58
|
+
switch (_d.label) {
|
|
59
59
|
case 0:
|
|
60
60
|
payload = {
|
|
61
61
|
service_name: 'tap_email',
|
|
@@ -63,19 +63,19 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (t
|
|
|
63
63
|
};
|
|
64
64
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
65
65
|
case 1:
|
|
66
|
-
data = (
|
|
67
|
-
|
|
66
|
+
data = (_d.sent()).data;
|
|
67
|
+
boardData = undefined;
|
|
68
68
|
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
|
|
69
69
|
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
70
70
|
board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
|
|
71
71
|
if (!(!!board_id && !!board_info_id)) return [3, 3];
|
|
72
72
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
73
73
|
case 2:
|
|
74
|
-
boardInfoData =
|
|
75
|
-
|
|
76
|
-
case 3: return [4,
|
|
74
|
+
boardInfoData = _d.sent();
|
|
75
|
+
_d.label = 3;
|
|
76
|
+
case 3: return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
77
77
|
case 4:
|
|
78
|
-
|
|
78
|
+
boardData = _d.sent();
|
|
79
79
|
info = boardInfoData.info;
|
|
80
80
|
hasBankCompleted = ((_a = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'bank'; })) === null || _a === void 0 ? void 0 : _a.status) === 'completed';
|
|
81
81
|
if (data.step_name === BANK_STEP_NAMES.PHONE_AUTH) {
|
|
@@ -87,8 +87,22 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (t
|
|
|
87
87
|
else if (data.step_name === BANK_STEP_NAMES.BANK_INFO) {
|
|
88
88
|
thunkApi.dispatch(handleNextScreenStep('BANK_BANK_DETAILS_STEP'));
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
case 5: return [2, {
|
|
90
|
+
_d.label = 5;
|
|
91
|
+
case 5: return [2, {
|
|
92
|
+
data: data,
|
|
93
|
+
boardResponse: {
|
|
94
|
+
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
95
|
+
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
96
|
+
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
97
|
+
entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
|
|
98
|
+
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
99
|
+
name: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _b === void 0 ? void 0 : _b.name,
|
|
100
|
+
contact: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.contact,
|
|
101
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
102
|
+
flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
|
|
103
|
+
},
|
|
104
|
+
token: token
|
|
105
|
+
}];
|
|
92
106
|
}
|
|
93
107
|
});
|
|
94
108
|
}); });
|
|
@@ -151,7 +165,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBankEntityInfo', fun
|
|
|
151
165
|
case 1:
|
|
152
166
|
data = _c.sent();
|
|
153
167
|
return [2, {
|
|
154
|
-
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.name, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
|
|
168
|
+
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.name, business: data === null || data === void 0 ? void 0 : data.business, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
|
|
155
169
|
}];
|
|
156
170
|
}
|
|
157
171
|
});
|
|
@@ -305,10 +319,10 @@ export var bankSlice = createSlice({
|
|
|
305
319
|
state.customLoading = true;
|
|
306
320
|
})
|
|
307
321
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
308
|
-
var _a;
|
|
322
|
+
var _a, _b, _c, _d;
|
|
309
323
|
state.error = null;
|
|
310
324
|
state.customLoading = false;
|
|
311
|
-
var
|
|
325
|
+
var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
|
|
312
326
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
313
327
|
if (description) {
|
|
314
328
|
state.error = description;
|
|
@@ -316,6 +330,9 @@ export var bankSlice = createSlice({
|
|
|
316
330
|
}
|
|
317
331
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
|
|
318
332
|
state.data.verify.token = token;
|
|
333
|
+
state.data.bankData.bankName = (_b = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _b === void 0 ? void 0 : _b.bank_name;
|
|
334
|
+
state.data.bankData.beneficiaryName = (_c = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _c === void 0 ? void 0 : _c.beneficiary_name;
|
|
335
|
+
state.data.bankData.iban = (_d = boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.bank_account) === null || _d === void 0 ? void 0 : _d.iban;
|
|
319
336
|
})
|
|
320
337
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
321
338
|
state.error = action.error.message;
|
|
@@ -1077,7 +1077,7 @@ export var businessSlice = createSlice({
|
|
|
1077
1077
|
var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
|
|
1078
1078
|
state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
1079
1079
|
if (!!customerBase)
|
|
1080
|
-
state.data.customersData.customerLocations = [customerBase];
|
|
1080
|
+
state.data.customersData.customerLocations = [customerBase, customerBases[0]];
|
|
1081
1081
|
if (!!expectedSale)
|
|
1082
1082
|
state.data.customersData.expectedSale = expectedSale;
|
|
1083
1083
|
if (!!expectedCustomerSale)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { ResponseData, MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, BrandFormValues, FlowsTypes, ActionState, CountryCode } from '../../../@types';
|
|
2
|
+
import { ResponseData, MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, BrandFormValues, FlowsTypes, ActionState, CountryCode, AuthForType } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
4
|
export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
5
|
response: any;
|
|
@@ -24,6 +24,7 @@ export declare const verifyAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
24
24
|
leadResponse: any;
|
|
25
25
|
isNewUser: any;
|
|
26
26
|
countryCode: CountryCode;
|
|
27
|
+
userInfoMissed: boolean;
|
|
27
28
|
}, OTPFormValues, {}>;
|
|
28
29
|
interface verifyPACIParams {
|
|
29
30
|
onSuccess?: () => void | Promise<void>;
|
|
@@ -33,6 +34,7 @@ export declare const verifyPACI: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
33
34
|
leadResponse: any;
|
|
34
35
|
isNewUser: any;
|
|
35
36
|
countryCode: CountryCode;
|
|
37
|
+
userInfoMissed: boolean;
|
|
36
38
|
}, verifyPACIParams, {}>;
|
|
37
39
|
export declare const updateLeadIndividual: import("@reduxjs/toolkit").AsyncThunk<{
|
|
38
40
|
leadResponse: any;
|
|
@@ -75,7 +77,7 @@ export interface ConnectData {
|
|
|
75
77
|
};
|
|
76
78
|
civilIdData: CivilFormValues & ResponseData;
|
|
77
79
|
otpData: OTPFormValues & ResponseData & {
|
|
78
|
-
|
|
80
|
+
authFor: AuthForType;
|
|
79
81
|
};
|
|
80
82
|
individualData: IndividualFormValues & ResponseData;
|
|
81
83
|
brandData: BrandFormValues & ResponseData;
|