@tap-payments/auth-jsconnect 2.8.75-development → 2.8.75-sandbox
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/form.d.ts +1 -1
- package/build/api/auth.d.ts +0 -13
- package/build/api/index.d.ts +2 -2
- package/build/api/lead.d.ts +0 -6
- package/build/assets/locales/ar.json +1 -10
- package/build/assets/locales/en.json +1 -10
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +13 -35
- package/build/constants/assets.d.ts +0 -2
- package/build/constants/assets.js +0 -2
- package/build/features/app/auth/authStore.d.ts +15 -5
- package/build/features/app/auth/authStore.js +113 -58
- package/build/features/app/business/businessStore.d.ts +11 -16
- package/build/features/app/business/businessStore.js +44 -58
- package/build/features/app/connect/connectStore.d.ts +12 -19
- package/build/features/app/connect/connectStore.js +82 -151
- package/build/features/app/connectExpress/connectExpressStore.d.ts +33 -10
- package/build/features/app/connectExpress/connectExpressStore.js +251 -156
- package/build/features/app/individual/individualStore.js +1 -4
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +2 -2
- package/build/features/auth/screens/NID/DOB.d.ts +6 -0
- package/build/features/auth/screens/NID/DOB.js +47 -0
- package/build/features/auth/screens/NID/IDNumber.js +1 -1
- package/build/features/auth/screens/NID/NID.js +10 -4
- package/build/features/auth/screens/NID/validation.d.ts +3 -0
- package/build/features/auth/screens/NID/validation.js +1 -0
- package/build/features/auth/screens/OTP/OTP.js +5 -1
- package/build/features/auth/screens/OTP/OTPInput.js +13 -2
- package/build/features/business/screens/OTP/OTP.d.ts +8 -0
- package/build/features/business/screens/OTP/OTP.js +90 -0
- package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/business/screens/OTP/OTPInput.js +49 -0
- package/build/features/business/screens/OTP/index.d.ts +3 -0
- package/build/features/business/screens/OTP/index.js +2 -0
- package/build/features/business/screens/OTP/validation.d.ts +8 -0
- package/build/features/business/screens/OTP/validation.js +4 -0
- package/build/features/connect/screens/Mobile/Mobile.js +2 -2
- package/build/features/connect/screens/NID/DOB.d.ts +5 -0
- package/build/features/connect/screens/NID/DOB.js +47 -0
- package/build/features/connect/screens/NID/IDNumber.d.ts +0 -1
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +11 -5
- package/build/features/connect/screens/NID/validation.d.ts +3 -0
- package/build/features/connect/screens/NID/validation.js +1 -0
- package/build/features/connect/screens/OTP/OTPInput.js +11 -3
- package/build/features/{auth/screens/VerifyNafath/VerifyNafath.d.ts → connectExpress/screens/IdentityOTP/OTP.d.ts} +2 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +88 -0
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +56 -0
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityOTP/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -2
- package/build/features/connectExpress/screens/NID/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/DOB.js +47 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +0 -1
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +9 -4
- package/build/features/connectExpress/screens/NID/validation.d.ts +3 -0
- package/build/features/connectExpress/screens/NID/validation.js +2 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +13 -5
- package/build/features/connectExpress/screens/OTP/OTPInput.js +11 -3
- package/build/features/featuresScreens.js +6 -21
- package/build/features/shared/Button/AbsherButton.d.ts +7 -0
- package/build/features/shared/Button/{NafathButton.js → AbsherButton.js} +3 -13
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/theme/palette.js +1 -2
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +0 -34
- package/build/features/auth/screens/VerifyNafath/index.d.ts +0 -3
- package/build/features/auth/screens/VerifyNafath/index.js +0 -2
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +0 -34
- package/build/features/business/screens/VerifyNafath/index.d.ts +0 -3
- package/build/features/business/screens/VerifyNafath/index.js +0 -2
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +0 -34
- package/build/features/connect/screens/VerifyNafath/index.d.ts +0 -3
- package/build/features/connect/screens/VerifyNafath/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +0 -5
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +0 -34
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +0 -2
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +0 -34
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +0 -3
- package/build/features/connectExpress/screens/VerifyNafath/index.js +0 -2
- package/build/features/shared/Button/NafathButton.d.ts +0 -7
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +0 -13
- package/build/features/shared/NafathVerification/NafathVerification.js +0 -92
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +0 -8
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +0 -53
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +0 -5
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +0 -8
- package/build/features/shared/NafathVerification/index.d.ts +0 -2
- package/build/features/shared/NafathVerification/index.js +0 -2
package/build/@types/form.d.ts
CHANGED
package/build/api/auth.d.ts
CHANGED
|
@@ -30,19 +30,6 @@ export type CreateAuthBody = {
|
|
|
30
30
|
lang?: LanguageMode;
|
|
31
31
|
lead_id?: string;
|
|
32
32
|
};
|
|
33
|
-
export type CreateNafathAuthBody = {
|
|
34
|
-
country: string;
|
|
35
|
-
scope: string;
|
|
36
|
-
user_credentail: IDCredential;
|
|
37
|
-
auth_type?: number;
|
|
38
|
-
email_url?: string;
|
|
39
|
-
sign_in?: boolean;
|
|
40
|
-
is_lead?: boolean;
|
|
41
|
-
step_name?: string;
|
|
42
|
-
encryption_contract: Array<string>;
|
|
43
|
-
lang?: LanguageMode;
|
|
44
|
-
lead_id?: string;
|
|
45
|
-
};
|
|
46
33
|
export type VerifyAuthBody = {
|
|
47
34
|
auth_token: string;
|
|
48
35
|
auth_type: number;
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
|
|
2
2
|
import { ValidateOperatorBody, ConfirmBody } from './operator';
|
|
3
|
-
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody, ConfigBody
|
|
3
|
+
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody, ConfigBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody, ExpressLeadVerifyBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
6
|
import { EntityInfoBody, EntityBankUpdateBody, BankDocumentInfo, UpdateEntityBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, UpdateEntityAOAFileBody, RemoveEntityActivity, MerchantListBody, CreateEntityBody } from './entity';
|
|
@@ -161,6 +161,6 @@ declare const API: {
|
|
|
161
161
|
getInitialData: (body: InitBody) => Promise<any>;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
|
-
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody
|
|
164
|
+
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody };
|
|
165
165
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
166
166
|
export default API;
|
package/build/api/lead.d.ts
CHANGED
|
@@ -66,12 +66,6 @@ export type UpdateLeadBody = {
|
|
|
66
66
|
type: string;
|
|
67
67
|
team: string;
|
|
68
68
|
};
|
|
69
|
-
identification?: {
|
|
70
|
-
id?: string;
|
|
71
|
-
issued_country_code?: string;
|
|
72
|
-
type?: string;
|
|
73
|
-
};
|
|
74
|
-
date_of_birth?: string;
|
|
75
69
|
};
|
|
76
70
|
export type LeadVerifyBody = {
|
|
77
71
|
verify_token: string;
|
|
@@ -610,14 +610,5 @@
|
|
|
610
610
|
"year": "السنة",
|
|
611
611
|
"yes": "نعم",
|
|
612
612
|
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
613
|
-
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
614
|
-
"nafath_verification_title_wait": "Authenticate with NAFATH app",
|
|
615
|
-
"nafath_verification_title_check": "Authenticate with NAFATH app",
|
|
616
|
-
"nafath_verification_description_wait": "Please go to your NAFATH app and enter the above request number to authenticate.",
|
|
617
|
-
"nafath_verification_description_check": "Please go to your NAFATH app and enter the above request number to authenticate.",
|
|
618
|
-
"open_nafath_app": "Open NAFATH app",
|
|
619
|
-
"nafath_verification_title_error": "We cannot confirm your authentication",
|
|
620
|
-
"nafath_verification_description_error": "Please try again",
|
|
621
|
-
"nafath_verification_redirection_message": "You will be redirected now",
|
|
622
|
-
"nafath_button_label": "Continue with Nafath"
|
|
613
|
+
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
623
614
|
}
|
|
@@ -637,14 +637,5 @@
|
|
|
637
637
|
"website_label": "Website",
|
|
638
638
|
"year": "Year",
|
|
639
639
|
"yes": "Yes",
|
|
640
|
-
"your_brand_details": "Your brand details"
|
|
641
|
-
"nafath_verification_title_wait": "Authenticate with NAFATH app",
|
|
642
|
-
"nafath_verification_title_check": "Authenticate with NAFATH app",
|
|
643
|
-
"nafath_verification_description_wait": "Please go to your NAFATH app and enter the above request number to authenticate.",
|
|
644
|
-
"nafath_verification_description_check": "Please go to your NAFATH app and enter the above request number to authenticate.",
|
|
645
|
-
"open_nafath_app": "Open NAFATH app",
|
|
646
|
-
"nafath_verification_title_error": "We cannot confirm your authentication",
|
|
647
|
-
"nafath_verification_description_error": "Please try again",
|
|
648
|
-
"nafath_verification_redirection_message": "You will be redirected now",
|
|
649
|
-
"nafath_button_label": "Continue with Nafath"
|
|
640
|
+
"your_brand_details": "Your brand details"
|
|
650
641
|
}
|
|
@@ -33,7 +33,7 @@ var StyledTooltip = styled(function (_a) {
|
|
|
33
33
|
var _b;
|
|
34
34
|
var theme = _a.theme;
|
|
35
35
|
return (_b = {},
|
|
36
|
-
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) }),
|
|
36
|
+
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)), zIndex: 2147483647 }),
|
|
37
37
|
_b);
|
|
38
38
|
});
|
|
39
39
|
var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
|
+
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
3
4
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
4
5
|
export declare const CLIENT_ORIGIN: string;
|
|
5
6
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
@@ -81,7 +82,6 @@ export declare const SERVICE_NAME: {
|
|
|
81
82
|
export declare const IDENTIFICATION_TYPE: {
|
|
82
83
|
NID: string;
|
|
83
84
|
IQAMA: string;
|
|
84
|
-
NAFATH: string;
|
|
85
85
|
};
|
|
86
86
|
export declare const CONNECT_STEP_NAMES: {
|
|
87
87
|
CREATE_AUTH_MOBILE: string;
|
package/build/constants/app.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
3
|
+
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
3
4
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
4
5
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
5
6
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -23,7 +24,7 @@ export var BACKGROUND_ID = 'auth-js-connect-background';
|
|
|
23
24
|
export var CONNECT_SCREENS_NAVIGATION = [
|
|
24
25
|
{
|
|
25
26
|
name: 'CONNECT_NID_STEP',
|
|
26
|
-
next: '
|
|
27
|
+
next: 'CONNECT_OTP_STEP',
|
|
27
28
|
prev: 'CONNECT_MOBILE_STEP',
|
|
28
29
|
order: 1
|
|
29
30
|
},
|
|
@@ -57,12 +58,6 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
57
58
|
prev: 'CONNECT_CIVIL_ID_STEP',
|
|
58
59
|
order: 2
|
|
59
60
|
},
|
|
60
|
-
{
|
|
61
|
-
name: 'CONNECT_VERIFY_NAFATH_STEP',
|
|
62
|
-
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
63
|
-
prev: 'CONNECT_NID_STEP',
|
|
64
|
-
order: 2
|
|
65
|
-
},
|
|
66
61
|
{
|
|
67
62
|
name: 'CONNECT_OTP_STEP',
|
|
68
63
|
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
@@ -97,7 +92,7 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
97
92
|
export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
98
93
|
{
|
|
99
94
|
name: 'CONNECT_EXPRESS_NID_STEP',
|
|
100
|
-
next: '
|
|
95
|
+
next: 'CONNECT_EXPRESS_OTP_STEP',
|
|
101
96
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
102
97
|
order: 1
|
|
103
98
|
},
|
|
@@ -125,16 +120,6 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
125
120
|
prev: '',
|
|
126
121
|
order: 1
|
|
127
122
|
},
|
|
128
|
-
{
|
|
129
|
-
name: 'CONNECT_EXPRESS_VERIFY_NAFATH_STEP',
|
|
130
|
-
next: [
|
|
131
|
-
'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
132
|
-
'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
133
|
-
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
134
|
-
],
|
|
135
|
-
prev: 'CONNECT_EXPRESS_NID_STEP',
|
|
136
|
-
order: 2
|
|
137
|
-
},
|
|
138
123
|
{
|
|
139
124
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
140
125
|
next: [
|
|
@@ -154,7 +139,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
154
139
|
'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
155
140
|
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
156
141
|
],
|
|
157
|
-
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
142
|
+
prev: ['CONNECT_EXPRESS_MOBILE_STEP', 'CONNECT_EXPRESS_NID_STEP'],
|
|
158
143
|
order: 2
|
|
159
144
|
},
|
|
160
145
|
{
|
|
@@ -165,7 +150,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
165
150
|
},
|
|
166
151
|
{
|
|
167
152
|
name: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
168
|
-
next: ['
|
|
153
|
+
next: ['CONNECT_EXPRESS_OTP_IDENTITY_STEP', 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP'],
|
|
169
154
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
170
155
|
order: 3
|
|
171
156
|
},
|
|
@@ -188,15 +173,15 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
188
173
|
order: 4
|
|
189
174
|
},
|
|
190
175
|
{
|
|
191
|
-
name: '
|
|
176
|
+
name: 'CONNECT_EXPRESS_VERIFY_PACI_IDENTITY_STEP',
|
|
192
177
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
193
|
-
prev: '
|
|
178
|
+
prev: 'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
194
179
|
order: 4
|
|
195
180
|
},
|
|
196
181
|
{
|
|
197
|
-
name: '
|
|
182
|
+
name: 'CONNECT_EXPRESS_OTP_IDENTITY_STEP',
|
|
198
183
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
199
|
-
prev: '
|
|
184
|
+
prev: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
200
185
|
order: 4
|
|
201
186
|
},
|
|
202
187
|
{
|
|
@@ -251,7 +236,7 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
251
236
|
},
|
|
252
237
|
{
|
|
253
238
|
name: 'AUTH_NID_STEP',
|
|
254
|
-
next: '
|
|
239
|
+
next: 'AUTH_OTP_STEP',
|
|
255
240
|
prev: 'AUTH_SWITCH_STEP',
|
|
256
241
|
order: 1
|
|
257
242
|
},
|
|
@@ -291,12 +276,6 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
291
276
|
prev: ['AUTH_MOBILE_STEP', 'AUTH_NID_STEP', 'AUTH_EMAIL_STEP', 'AUTH_PASSWORD_STEP'],
|
|
292
277
|
order: 2
|
|
293
278
|
},
|
|
294
|
-
{
|
|
295
|
-
name: 'AUTH_NAFATH_VERIFY_STEP',
|
|
296
|
-
next: 'AUTH_PREPARING_DATA_STEP',
|
|
297
|
-
prev: 'AUTH_NID_STEP',
|
|
298
|
-
order: 2
|
|
299
|
-
},
|
|
300
279
|
{
|
|
301
280
|
name: 'AUTH_PASSWORD_STEP',
|
|
302
281
|
next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_OTP_STEP'],
|
|
@@ -388,7 +367,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
388
367
|
},
|
|
389
368
|
{
|
|
390
369
|
name: 'BUSINESS_IDBOD_STEP',
|
|
391
|
-
next: ['
|
|
370
|
+
next: ['BUSINESS_OTP_STEP', 'BUSINESS_BUSINESS_TYPE_STEP'],
|
|
392
371
|
prev: '',
|
|
393
372
|
order: 2
|
|
394
373
|
},
|
|
@@ -399,7 +378,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
399
378
|
order: 3
|
|
400
379
|
},
|
|
401
380
|
{
|
|
402
|
-
name: '
|
|
381
|
+
name: 'BUSINESS_OTP_STEP',
|
|
403
382
|
next: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
404
383
|
prev: 'BUSINESS_IDBOD_STEP',
|
|
405
384
|
order: 3
|
|
@@ -871,8 +850,7 @@ export var SERVICE_NAME = {
|
|
|
871
850
|
};
|
|
872
851
|
export var IDENTIFICATION_TYPE = {
|
|
873
852
|
NID: 'national_id',
|
|
874
|
-
IQAMA: 'iqamah'
|
|
875
|
-
NAFATH: 'nafath'
|
|
853
|
+
IQAMA: 'iqamah'
|
|
876
854
|
};
|
|
877
855
|
export var CONNECT_STEP_NAMES = {
|
|
878
856
|
CREATE_AUTH_MOBILE: 'connect_create_auth_mobile',
|
|
@@ -41,8 +41,6 @@ export var ICONS_NAMES = {
|
|
|
41
41
|
TAP_LOGO_TEXT_AR: ICONS_FULL_PATH + '/tap-white-text-ar' + ICONS_EXTENSION,
|
|
42
42
|
TAP_LOGO_TEXT_EN: ICONS_FULL_PATH + '/tap-white-text-en' + ICONS_EXTENSION,
|
|
43
43
|
PACI_VERIFY_ICON: ICONS_FULL_PATH + '/PACI_verify_icon' + '.png',
|
|
44
|
-
NAFATH_LOGO: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_button_logo.svg',
|
|
45
|
-
NAFATH_VERIFY_ICON: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_logo.svg',
|
|
46
44
|
EXPRESS_ERROR_ICON: ICONS_FULL_PATH + '/EXPRESS_error_icon' + '.svg',
|
|
47
45
|
TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
|
|
48
46
|
TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
|
|
@@ -105,7 +105,7 @@ export declare const verifyEmailOtp: import("@reduxjs/toolkit").AsyncThunk<any,
|
|
|
105
105
|
fulfilledMeta?: unknown;
|
|
106
106
|
rejectedMeta?: unknown;
|
|
107
107
|
}>;
|
|
108
|
-
export declare const
|
|
108
|
+
export declare const createNIDAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
109
109
|
response: any;
|
|
110
110
|
formData: NIDFormValues;
|
|
111
111
|
}, NIDFormValues, {
|
|
@@ -118,10 +118,20 @@ export declare const createNafathAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
118
118
|
fulfilledMeta?: unknown;
|
|
119
119
|
rejectedMeta?: unknown;
|
|
120
120
|
}>;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
export declare const resendNIDAuthOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
122
|
+
response: any;
|
|
123
|
+
formData: NIDFormValues;
|
|
124
|
+
}, NIDFormValues, {
|
|
125
|
+
state?: unknown;
|
|
126
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
127
|
+
extra?: unknown;
|
|
128
|
+
rejectValue?: unknown;
|
|
129
|
+
serializedErrorType?: unknown;
|
|
130
|
+
pendingMeta?: unknown;
|
|
131
|
+
fulfilledMeta?: unknown;
|
|
132
|
+
rejectedMeta?: unknown;
|
|
133
|
+
}>;
|
|
134
|
+
export declare const verifyNIDOtp: import("@reduxjs/toolkit").AsyncThunk<any, OTPFormValues, {
|
|
125
135
|
state?: unknown;
|
|
126
136
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
127
137
|
extra?: unknown;
|
|
@@ -365,76 +365,123 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
}); });
|
|
368
|
-
export var
|
|
369
|
-
var settings, requestBody, data;
|
|
370
|
-
var
|
|
371
|
-
return __generator(this, function (
|
|
372
|
-
switch (
|
|
368
|
+
export var createNIDAuth = createAsyncThunk('auth/createNIDAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
369
|
+
var _a, settings, auth, dob, nid, nidType, countryCode, requestBody, data;
|
|
370
|
+
var _b, _c;
|
|
371
|
+
return __generator(this, function (_d) {
|
|
372
|
+
switch (_d.label) {
|
|
373
373
|
case 0:
|
|
374
|
-
|
|
374
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
375
|
+
dob = params.dob, nid = params.nid;
|
|
376
|
+
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
377
|
+
countryCode = settings.data.businessCountry.iso2;
|
|
375
378
|
requestBody = {
|
|
376
|
-
country:
|
|
379
|
+
country: countryCode,
|
|
377
380
|
scope: settings.data.appConfig.scope,
|
|
378
381
|
lang: settings.data.language,
|
|
382
|
+
lead_id: auth.data.leadId,
|
|
379
383
|
user_credentail: {
|
|
380
|
-
identification_id:
|
|
381
|
-
identification_id_type:
|
|
382
|
-
|
|
384
|
+
identification_id: nid,
|
|
385
|
+
identification_id_type: nidType,
|
|
386
|
+
date_of_birth: dob,
|
|
387
|
+
country_code: countryCode
|
|
383
388
|
},
|
|
384
389
|
sign_in: false,
|
|
385
390
|
is_lead: true,
|
|
386
391
|
step_name: AUTH_STEP_NAMES.CREATE_AUTH_NID,
|
|
387
|
-
encryption_contract: [
|
|
392
|
+
encryption_contract: [
|
|
393
|
+
'user_credentail.country_code',
|
|
394
|
+
'user_credentail.identification_id',
|
|
395
|
+
'user_credentail.identification_id_type',
|
|
396
|
+
'user_credentail.date_of_birth'
|
|
397
|
+
]
|
|
388
398
|
};
|
|
389
|
-
return [4, API.authService.
|
|
399
|
+
return [4, API.authService.createAuth(requestBody)];
|
|
390
400
|
case 1:
|
|
391
|
-
data =
|
|
401
|
+
data = _d.sent();
|
|
392
402
|
thunkApi.dispatch(handleNextScreenStep());
|
|
393
|
-
(
|
|
403
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
394
404
|
return [2, { response: data, formData: params }];
|
|
395
405
|
}
|
|
396
406
|
});
|
|
397
407
|
}); });
|
|
398
|
-
export var
|
|
399
|
-
var _a, settings, auth,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
switch (_e.label) {
|
|
408
|
+
export var resendNIDAuthOTP = createAsyncThunk('auth/resendNIDAuthOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
409
|
+
var _a, settings, auth, dob, nid, nidType, countryCode, requestBody, data;
|
|
410
|
+
return __generator(this, function (_b) {
|
|
411
|
+
switch (_b.label) {
|
|
403
412
|
case 0:
|
|
404
413
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
405
|
-
|
|
406
|
-
|
|
414
|
+
dob = params.dob, nid = params.nid;
|
|
415
|
+
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
416
|
+
countryCode = settings.data.businessCountry.iso2;
|
|
417
|
+
requestBody = {
|
|
418
|
+
country: countryCode,
|
|
419
|
+
scope: settings.data.appConfig.scope,
|
|
420
|
+
lang: settings.data.language,
|
|
421
|
+
lead_id: auth.data.leadId,
|
|
422
|
+
user_credentail: {
|
|
423
|
+
identification_id: nid,
|
|
424
|
+
identification_id_type: nidType,
|
|
425
|
+
date_of_birth: dob,
|
|
426
|
+
country_code: countryCode
|
|
427
|
+
},
|
|
428
|
+
sign_in: false,
|
|
429
|
+
is_lead: true,
|
|
430
|
+
step_name: AUTH_STEP_NAMES.CREATE_AUTH_NID,
|
|
431
|
+
encryption_contract: [
|
|
432
|
+
'user_credentail.country_code',
|
|
433
|
+
'user_credentail.identification_id',
|
|
434
|
+
'user_credentail.identification_id_type',
|
|
435
|
+
'user_credentail.date_of_birth'
|
|
436
|
+
]
|
|
437
|
+
};
|
|
438
|
+
return [4, API.authService.createAuth(requestBody)];
|
|
439
|
+
case 1:
|
|
440
|
+
data = _b.sent();
|
|
441
|
+
return [2, { response: data, formData: params }];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
}); });
|
|
445
|
+
export var verifyNIDOtp = createAsyncThunk('auth/verifyNIDOtp', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
446
|
+
var _a, settings, auth, _b, responseData, leadId, _c, auth_token, device_token, service_name, auth_type, sign_in, scope, payload, data;
|
|
447
|
+
var _d, _e, _f, _g;
|
|
448
|
+
return __generator(this, function (_h) {
|
|
449
|
+
switch (_h.label) {
|
|
450
|
+
case 0:
|
|
451
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
452
|
+
_b = auth.data || {}, responseData = _b.responseData, leadId = _b.leadId;
|
|
453
|
+
_c = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.authResponse) !== null && _d !== void 0 ? _d : {}, auth_token = _c.auth_token, device_token = _c.device_token, service_name = _c.service_name, auth_type = _c.auth_type, sign_in = _c.sign_in;
|
|
454
|
+
if (!auth_token)
|
|
455
|
+
throw new Error('Auth token is missing');
|
|
407
456
|
scope = settings.data.appConfig.scope;
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
457
|
+
payload = {
|
|
458
|
+
auth_token: auth_token,
|
|
459
|
+
lead_id: leadId,
|
|
460
|
+
data: params.otp,
|
|
461
|
+
auth_type: auth_type,
|
|
462
|
+
device_token: device_token,
|
|
463
|
+
service_name: service_name || 'ABSHER',
|
|
464
|
+
sign_in: sign_in,
|
|
465
|
+
step_name: AUTH_STEP_NAMES.VERIFY_AUTH_NID,
|
|
466
|
+
encryption_contract: ['data']
|
|
467
|
+
};
|
|
468
|
+
return [4, API.authService.verifyAuth(payload)];
|
|
412
469
|
case 1:
|
|
413
|
-
|
|
414
|
-
if (
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
if (
|
|
422
|
-
|
|
423
|
-
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
424
|
-
return [2, data];
|
|
425
|
-
}
|
|
426
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
427
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_PREPARING_DATA_STEP')); });
|
|
470
|
+
data = (_h.sent()).data;
|
|
471
|
+
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
472
|
+
throw new Error(data.errors[0].description);
|
|
473
|
+
sendCustomEventToGTM({
|
|
474
|
+
event: 'Send Event',
|
|
475
|
+
event_category: 'User Registration Flow',
|
|
476
|
+
event_action: 'First OTP Success'
|
|
477
|
+
});
|
|
478
|
+
if (scope === 'merchant') {
|
|
479
|
+
openConnect(settings.data.appConfig.publicKey, settings.data.businessCountry.iso2);
|
|
428
480
|
return [2, data];
|
|
429
481
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
_e.label = 4;
|
|
434
|
-
case 4:
|
|
435
|
-
count++;
|
|
436
|
-
return [3, 1];
|
|
437
|
-
case 5: throw new Error('nafath_verification_failed');
|
|
482
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
483
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('AUTH_PREPARING_DATA_STEP')); });
|
|
484
|
+
return [2, data];
|
|
438
485
|
}
|
|
439
486
|
});
|
|
440
487
|
}); });
|
|
@@ -952,36 +999,44 @@ export var authSlice = createSlice({
|
|
|
952
999
|
state.loading = false;
|
|
953
1000
|
state.error = action.error.message;
|
|
954
1001
|
})
|
|
955
|
-
.addCase(
|
|
1002
|
+
.addCase(createNIDAuth.pending, function (state) {
|
|
956
1003
|
state.loading = true;
|
|
957
1004
|
state.error = null;
|
|
958
1005
|
})
|
|
959
|
-
.addCase(
|
|
1006
|
+
.addCase(createNIDAuth.fulfilled, function (state, action) {
|
|
960
1007
|
state.loading = false;
|
|
961
1008
|
state.data.nidData = action.payload.formData;
|
|
962
1009
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
963
1010
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
964
1011
|
})
|
|
965
|
-
.addCase(
|
|
1012
|
+
.addCase(createNIDAuth.rejected, function (state, action) {
|
|
966
1013
|
state.loading = false;
|
|
967
1014
|
state.error = action.error.message;
|
|
968
1015
|
})
|
|
969
|
-
.addCase(
|
|
1016
|
+
.addCase(resendNIDAuthOTP.pending, function (state) {
|
|
1017
|
+
state.error = null;
|
|
1018
|
+
})
|
|
1019
|
+
.addCase(resendNIDAuthOTP.fulfilled, function (state, action) {
|
|
1020
|
+
state.data.nidData = action.payload.formData;
|
|
1021
|
+
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1022
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
1023
|
+
})
|
|
1024
|
+
.addCase(resendNIDAuthOTP.rejected, function (state, action) {
|
|
1025
|
+
state.error = action.error.message;
|
|
1026
|
+
})
|
|
1027
|
+
.addCase(verifyNIDOtp.pending, function (state) {
|
|
970
1028
|
state.loading = true;
|
|
971
1029
|
state.error = null;
|
|
972
1030
|
})
|
|
973
|
-
.addCase(
|
|
1031
|
+
.addCase(verifyNIDOtp.fulfilled, function (state, action) {
|
|
974
1032
|
var _a;
|
|
975
1033
|
state.loading = false;
|
|
976
1034
|
var data = action.payload;
|
|
977
1035
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data) });
|
|
978
1036
|
})
|
|
979
|
-
.addCase(
|
|
1037
|
+
.addCase(verifyNIDOtp.rejected, function (state, action) {
|
|
980
1038
|
state.loading = false;
|
|
981
|
-
|
|
982
|
-
if (error !== 'Aborted') {
|
|
983
|
-
state.error = error;
|
|
984
|
-
}
|
|
1039
|
+
state.error = action.error.message;
|
|
985
1040
|
})
|
|
986
1041
|
.addCase(createCivilIdAuth.pending, function (state) {
|
|
987
1042
|
state.loading = true;
|
|
@@ -57,21 +57,6 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
57
57
|
fulfilledMeta?: unknown;
|
|
58
58
|
rejectedMeta?: unknown;
|
|
59
59
|
}>;
|
|
60
|
-
interface verifyNafathParams {
|
|
61
|
-
onSuccess?: () => void;
|
|
62
|
-
}
|
|
63
|
-
export declare const verifyNafath: import("@reduxjs/toolkit").AsyncThunk<{
|
|
64
|
-
response: any;
|
|
65
|
-
}, verifyNafathParams, {
|
|
66
|
-
state?: unknown;
|
|
67
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
68
|
-
extra?: unknown;
|
|
69
|
-
rejectValue?: unknown;
|
|
70
|
-
serializedErrorType?: unknown;
|
|
71
|
-
pendingMeta?: unknown;
|
|
72
|
-
fulfilledMeta?: unknown;
|
|
73
|
-
rejectedMeta?: unknown;
|
|
74
|
-
}>;
|
|
75
60
|
interface verifyPACIParams {
|
|
76
61
|
onSuccess?: () => void;
|
|
77
62
|
}
|
|
@@ -105,7 +90,7 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
105
90
|
formData: {
|
|
106
91
|
type: string;
|
|
107
92
|
nid: string;
|
|
108
|
-
dob
|
|
93
|
+
dob: string;
|
|
109
94
|
termAndConditionChecked?: boolean | undefined;
|
|
110
95
|
};
|
|
111
96
|
}, NIDFormValues, {
|
|
@@ -118,6 +103,16 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
118
103
|
fulfilledMeta?: unknown;
|
|
119
104
|
rejectedMeta?: unknown;
|
|
120
105
|
}>;
|
|
106
|
+
export declare const resendOTPLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
107
|
+
state?: unknown;
|
|
108
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
109
|
+
extra?: unknown;
|
|
110
|
+
rejectValue?: unknown;
|
|
111
|
+
serializedErrorType?: unknown;
|
|
112
|
+
pendingMeta?: unknown;
|
|
113
|
+
fulfilledMeta?: unknown;
|
|
114
|
+
rejectedMeta?: unknown;
|
|
115
|
+
}>;
|
|
121
116
|
export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
122
117
|
leadId: string;
|
|
123
118
|
}, {
|