@tap-payments/auth-jsconnect 2.8.65-development → 2.8.68-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.
- package/build/@types/form.d.ts +1 -1
- package/build/api/auth.d.ts +13 -0
- package/build/api/index.d.ts +2 -2
- package/build/api/lead.d.ts +6 -0
- package/build/assets/locales/ar.json +10 -1
- package/build/assets/locales/en.json +10 -1
- package/build/constants/app.d.ts +1 -0
- package/build/constants/app.js +35 -12
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +2 -0
- package/build/features/app/auth/authStore.d.ts +5 -15
- package/build/features/app/auth/authStore.js +58 -113
- package/build/features/app/business/businessStore.d.ts +16 -11
- package/build/features/app/business/businessStore.js +58 -44
- package/build/features/app/connect/connectStore.d.ts +19 -12
- package/build/features/app/connect/connectStore.js +151 -82
- package/build/features/app/connectExpress/connectExpressStore.d.ts +10 -33
- package/build/features/app/connectExpress/connectExpressStore.js +156 -251
- package/build/features/app/individual/individualStore.js +4 -1
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +2 -2
- package/build/features/auth/screens/NID/IDNumber.js +1 -1
- package/build/features/auth/screens/NID/NID.js +4 -10
- package/build/features/auth/screens/NID/validation.d.ts +0 -3
- package/build/features/auth/screens/NID/validation.js +0 -1
- package/build/features/auth/screens/OTP/OTP.js +1 -5
- package/build/features/auth/screens/OTP/OTPInput.js +2 -13
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → auth/screens/VerifyNafath/VerifyNafath.d.ts} +2 -2
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +34 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +34 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/screens/Mobile/Mobile.js +2 -2
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +5 -11
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +34 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +34 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -2
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +4 -9
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +5 -13
- package/build/features/connectExpress/screens/OTP/OTPInput.js +3 -11
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +34 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/featuresScreens.js +21 -6
- package/build/features/shared/Button/NafathButton.d.ts +7 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +13 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +13 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/theme/palette.js +2 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/package.json +1 -1
- package/build/features/auth/screens/NID/DOB.d.ts +0 -6
- package/build/features/auth/screens/NID/DOB.js +0 -47
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPInput.js +0 -49
- package/build/features/business/screens/OTP/index.d.ts +0 -3
- package/build/features/business/screens/OTP/index.js +0 -2
- package/build/features/business/screens/OTP/validation.d.ts +0 -8
- package/build/features/business/screens/OTP/validation.js +0 -4
- package/build/features/connect/screens/NID/DOB.d.ts +0 -5
- package/build/features/connect/screens/NID/DOB.js +0 -47
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -88
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -56
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +0 -8
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
- package/build/features/connectExpress/screens/NID/DOB.d.ts +0 -6
- package/build/features/connectExpress/screens/NID/DOB.js +0 -47
- package/build/features/shared/Button/AbsherButton.d.ts +0 -7
package/build/@types/form.d.ts
CHANGED
package/build/api/auth.d.ts
CHANGED
|
@@ -30,6 +30,19 @@ 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
|
+
};
|
|
33
46
|
export type VerifyAuthBody = {
|
|
34
47
|
auth_token: string;
|
|
35
48
|
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 } from './auth';
|
|
3
|
+
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody, ConfigBody, CreateNafathAuthBody } 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, CreateNafathAuthBody };
|
|
165
165
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
166
166
|
export default API;
|
package/build/api/lead.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ 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;
|
|
69
75
|
};
|
|
70
76
|
export type LeadVerifyBody = {
|
|
71
77
|
verify_token: string;
|
|
@@ -610,5 +610,14 @@
|
|
|
610
610
|
"year": "السنة",
|
|
611
611
|
"yes": "نعم",
|
|
612
612
|
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
613
|
-
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
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"
|
|
614
623
|
}
|
|
@@ -637,5 +637,14 @@
|
|
|
637
637
|
"website_label": "Website",
|
|
638
638
|
"year": "Year",
|
|
639
639
|
"yes": "Yes",
|
|
640
|
-
"your_brand_details": "Your brand details"
|
|
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"
|
|
641
650
|
}
|
package/build/constants/app.d.ts
CHANGED
package/build/constants/app.js
CHANGED
|
@@ -22,7 +22,7 @@ export var BACKGROUND_ID = 'auth-js-connect-background';
|
|
|
22
22
|
export var CONNECT_SCREENS_NAVIGATION = [
|
|
23
23
|
{
|
|
24
24
|
name: 'CONNECT_NID_STEP',
|
|
25
|
-
next: '
|
|
25
|
+
next: 'CONNECT_VERIFY_NAFATH_STEP',
|
|
26
26
|
prev: 'CONNECT_MOBILE_STEP',
|
|
27
27
|
order: 1
|
|
28
28
|
},
|
|
@@ -56,6 +56,12 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
56
56
|
prev: 'CONNECT_CIVIL_ID_STEP',
|
|
57
57
|
order: 2
|
|
58
58
|
},
|
|
59
|
+
{
|
|
60
|
+
name: 'CONNECT_VERIFY_NAFATH_STEP',
|
|
61
|
+
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
62
|
+
prev: 'CONNECT_NID_STEP',
|
|
63
|
+
order: 2
|
|
64
|
+
},
|
|
59
65
|
{
|
|
60
66
|
name: 'CONNECT_OTP_STEP',
|
|
61
67
|
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
@@ -90,7 +96,7 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
90
96
|
export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
91
97
|
{
|
|
92
98
|
name: 'CONNECT_EXPRESS_NID_STEP',
|
|
93
|
-
next: '
|
|
99
|
+
next: 'CONNECT_EXPRESS_VERIFY_NAFATH_STEP',
|
|
94
100
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
95
101
|
order: 1
|
|
96
102
|
},
|
|
@@ -118,6 +124,16 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
118
124
|
prev: '',
|
|
119
125
|
order: 1
|
|
120
126
|
},
|
|
127
|
+
{
|
|
128
|
+
name: 'CONNECT_EXPRESS_VERIFY_NAFATH_STEP',
|
|
129
|
+
next: [
|
|
130
|
+
'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
131
|
+
'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
132
|
+
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
133
|
+
],
|
|
134
|
+
prev: 'CONNECT_EXPRESS_NID_STEP',
|
|
135
|
+
order: 2
|
|
136
|
+
},
|
|
121
137
|
{
|
|
122
138
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
123
139
|
next: [
|
|
@@ -137,7 +153,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
137
153
|
'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
138
154
|
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
139
155
|
],
|
|
140
|
-
prev:
|
|
156
|
+
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
141
157
|
order: 2
|
|
142
158
|
},
|
|
143
159
|
{
|
|
@@ -148,7 +164,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
148
164
|
},
|
|
149
165
|
{
|
|
150
166
|
name: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
151
|
-
next: ['
|
|
167
|
+
next: ['CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP', 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP'],
|
|
152
168
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
153
169
|
order: 3
|
|
154
170
|
},
|
|
@@ -171,15 +187,15 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
171
187
|
order: 4
|
|
172
188
|
},
|
|
173
189
|
{
|
|
174
|
-
name: '
|
|
190
|
+
name: 'CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP',
|
|
175
191
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
176
|
-
prev: '
|
|
192
|
+
prev: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
177
193
|
order: 4
|
|
178
194
|
},
|
|
179
195
|
{
|
|
180
|
-
name: '
|
|
196
|
+
name: 'CONNECT_EXPRESS_VERIFY_PACI_IDENTITY_STEP',
|
|
181
197
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
182
|
-
prev: '
|
|
198
|
+
prev: 'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
183
199
|
order: 4
|
|
184
200
|
},
|
|
185
201
|
{
|
|
@@ -234,7 +250,7 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
234
250
|
},
|
|
235
251
|
{
|
|
236
252
|
name: 'AUTH_NID_STEP',
|
|
237
|
-
next: '
|
|
253
|
+
next: 'AUTH_NAFATH_VERIFY_STEP',
|
|
238
254
|
prev: 'AUTH_SWITCH_STEP',
|
|
239
255
|
order: 1
|
|
240
256
|
},
|
|
@@ -274,6 +290,12 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
274
290
|
prev: ['AUTH_MOBILE_STEP', 'AUTH_NID_STEP', 'AUTH_EMAIL_STEP', 'AUTH_PASSWORD_STEP'],
|
|
275
291
|
order: 2
|
|
276
292
|
},
|
|
293
|
+
{
|
|
294
|
+
name: 'AUTH_NAFATH_VERIFY_STEP',
|
|
295
|
+
next: 'AUTH_PREPARING_DATA_STEP',
|
|
296
|
+
prev: 'AUTH_NID_STEP',
|
|
297
|
+
order: 2
|
|
298
|
+
},
|
|
277
299
|
{
|
|
278
300
|
name: 'AUTH_PASSWORD_STEP',
|
|
279
301
|
next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_OTP_STEP'],
|
|
@@ -365,7 +387,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
365
387
|
},
|
|
366
388
|
{
|
|
367
389
|
name: 'BUSINESS_IDBOD_STEP',
|
|
368
|
-
next: ['
|
|
390
|
+
next: ['BUSINESS_VERIFY_NAFATH_STEP', 'BUSINESS_BUSINESS_TYPE_STEP'],
|
|
369
391
|
prev: '',
|
|
370
392
|
order: 2
|
|
371
393
|
},
|
|
@@ -376,7 +398,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
376
398
|
order: 3
|
|
377
399
|
},
|
|
378
400
|
{
|
|
379
|
-
name: '
|
|
401
|
+
name: 'BUSINESS_VERIFY_NAFATH_STEP',
|
|
380
402
|
next: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
381
403
|
prev: 'BUSINESS_IDBOD_STEP',
|
|
382
404
|
order: 3
|
|
@@ -842,7 +864,8 @@ export var SERVICE_NAME = {
|
|
|
842
864
|
};
|
|
843
865
|
export var IDENTIFICATION_TYPE = {
|
|
844
866
|
NID: 'national_id',
|
|
845
|
-
IQAMA: 'iqamah'
|
|
867
|
+
IQAMA: 'iqamah',
|
|
868
|
+
NAFATH: 'nafath'
|
|
846
869
|
};
|
|
847
870
|
export var CONNECT_STEP_NAMES = {
|
|
848
871
|
CREATE_AUTH_MOBILE: 'connect_create_auth_mobile',
|
|
@@ -41,6 +41,8 @@ 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',
|
|
44
46
|
EXPRESS_ERROR_ICON: ICONS_FULL_PATH + '/EXPRESS_error_icon' + '.svg',
|
|
45
47
|
TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
|
|
46
48
|
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 createNafathAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
109
109
|
response: any;
|
|
110
110
|
formData: NIDFormValues;
|
|
111
111
|
}, NIDFormValues, {
|
|
@@ -118,20 +118,10 @@ export declare const createNIDAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
118
118
|
fulfilledMeta?: unknown;
|
|
119
119
|
rejectedMeta?: unknown;
|
|
120
120
|
}>;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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, {
|
|
121
|
+
interface verifyNafathParams {
|
|
122
|
+
onSuccess?: () => void;
|
|
123
|
+
}
|
|
124
|
+
export declare const verifyNafath: import("@reduxjs/toolkit").AsyncThunk<any, verifyNafathParams, {
|
|
135
125
|
state?: unknown;
|
|
136
126
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
137
127
|
extra?: unknown;
|
|
@@ -365,123 +365,76 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
}); });
|
|
368
|
-
export var
|
|
369
|
-
var
|
|
370
|
-
var
|
|
371
|
-
return __generator(this, function (
|
|
372
|
-
switch (
|
|
368
|
+
export var createNafathAuth = createAsyncThunk('auth/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
369
|
+
var settings, requestBody, data;
|
|
370
|
+
var _a, _b;
|
|
371
|
+
return __generator(this, function (_c) {
|
|
372
|
+
switch (_c.label) {
|
|
373
373
|
case 0:
|
|
374
|
-
|
|
375
|
-
dob = params.dob, nid = params.nid;
|
|
376
|
-
nidType = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
377
|
-
countryCode = settings.data.businessCountry.iso2;
|
|
374
|
+
settings = thunkApi.getState().settings;
|
|
378
375
|
requestBody = {
|
|
379
|
-
country:
|
|
376
|
+
country: settings.data.businessCountry.iso2,
|
|
380
377
|
scope: settings.data.appConfig.scope,
|
|
381
378
|
lang: settings.data.language,
|
|
382
|
-
lead_id: auth.data.leadId,
|
|
383
379
|
user_credentail: {
|
|
384
|
-
identification_id: nid,
|
|
385
|
-
identification_id_type:
|
|
386
|
-
|
|
387
|
-
country_code: countryCode
|
|
380
|
+
identification_id: params.nid,
|
|
381
|
+
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
382
|
+
country_code: settings.data.businessCountry.iso2
|
|
388
383
|
},
|
|
389
384
|
sign_in: false,
|
|
390
385
|
is_lead: true,
|
|
391
386
|
step_name: AUTH_STEP_NAMES.CREATE_AUTH_NID,
|
|
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
|
-
]
|
|
387
|
+
encryption_contract: ['user_credentail.country_code', 'user_credentail.identification_id', 'user_credentail.identification_id_type']
|
|
398
388
|
};
|
|
399
|
-
return [4, API.authService.
|
|
389
|
+
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
400
390
|
case 1:
|
|
401
|
-
data =
|
|
391
|
+
data = _c.sent();
|
|
402
392
|
thunkApi.dispatch(handleNextScreenStep());
|
|
403
|
-
(
|
|
393
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody);
|
|
404
394
|
return [2, { response: data, formData: params }];
|
|
405
395
|
}
|
|
406
396
|
});
|
|
407
397
|
}); });
|
|
408
|
-
export var
|
|
409
|
-
var _a, settings, auth,
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
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) {
|
|
398
|
+
export var verifyNafath = createAsyncThunk('auth/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
399
|
+
var _a, settings, auth, authResponse, expiry, scope, interval, maxCalls, count, data, isSuccess;
|
|
400
|
+
var _b, _c, _d;
|
|
401
|
+
return __generator(this, function (_e) {
|
|
402
|
+
switch (_e.label) {
|
|
450
403
|
case 0:
|
|
451
404
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
if (!auth_token)
|
|
455
|
-
throw new Error('Auth token is missing');
|
|
405
|
+
authResponse = (auth.data.responseData || {}).authResponse;
|
|
406
|
+
expiry = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.expiry) || 120;
|
|
456
407
|
scope = settings.data.appConfig.scope;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
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)];
|
|
408
|
+
interval = 3;
|
|
409
|
+
maxCalls = Math.floor(expiry / interval);
|
|
410
|
+
count = 1;
|
|
411
|
+
_e.label = 1;
|
|
469
412
|
case 1:
|
|
470
|
-
|
|
471
|
-
if (
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
if (
|
|
479
|
-
|
|
413
|
+
if (!(count <= maxCalls)) return [3, 5];
|
|
414
|
+
if (thunkApi.signal.aborted) {
|
|
415
|
+
return [3, 5];
|
|
416
|
+
}
|
|
417
|
+
return [4, API.authService.getVerifyAuth(authResponse === null || authResponse === void 0 ? void 0 : authResponse.auth_token)];
|
|
418
|
+
case 2:
|
|
419
|
+
data = _e.sent();
|
|
420
|
+
isSuccess = ((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'completed';
|
|
421
|
+
if (isSuccess) {
|
|
422
|
+
if (scope === 'merchant') {
|
|
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')); });
|
|
480
428
|
return [2, data];
|
|
481
429
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
430
|
+
return [4, sleep(interval * 1000)];
|
|
431
|
+
case 3:
|
|
432
|
+
_e.sent();
|
|
433
|
+
_e.label = 4;
|
|
434
|
+
case 4:
|
|
435
|
+
count++;
|
|
436
|
+
return [3, 1];
|
|
437
|
+
case 5: throw new Error('nafath_verification_failed');
|
|
485
438
|
}
|
|
486
439
|
});
|
|
487
440
|
}); });
|
|
@@ -996,44 +949,36 @@ export var authSlice = createSlice({
|
|
|
996
949
|
state.loading = false;
|
|
997
950
|
state.error = action.error.message;
|
|
998
951
|
})
|
|
999
|
-
.addCase(
|
|
952
|
+
.addCase(createNafathAuth.pending, function (state) {
|
|
1000
953
|
state.loading = true;
|
|
1001
954
|
state.error = null;
|
|
1002
955
|
})
|
|
1003
|
-
.addCase(
|
|
956
|
+
.addCase(createNafathAuth.fulfilled, function (state, action) {
|
|
1004
957
|
state.loading = false;
|
|
1005
958
|
state.data.nidData = action.payload.formData;
|
|
1006
959
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1007
960
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
1008
961
|
})
|
|
1009
|
-
.addCase(
|
|
962
|
+
.addCase(createNafathAuth.rejected, function (state, action) {
|
|
1010
963
|
state.loading = false;
|
|
1011
964
|
state.error = action.error.message;
|
|
1012
965
|
})
|
|
1013
|
-
.addCase(
|
|
1014
|
-
state.error = null;
|
|
1015
|
-
})
|
|
1016
|
-
.addCase(resendNIDAuthOTP.fulfilled, function (state, action) {
|
|
1017
|
-
state.data.nidData = action.payload.formData;
|
|
1018
|
-
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1019
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
1020
|
-
})
|
|
1021
|
-
.addCase(resendNIDAuthOTP.rejected, function (state, action) {
|
|
1022
|
-
state.error = action.error.message;
|
|
1023
|
-
})
|
|
1024
|
-
.addCase(verifyNIDOtp.pending, function (state) {
|
|
966
|
+
.addCase(verifyNafath.pending, function (state) {
|
|
1025
967
|
state.loading = true;
|
|
1026
968
|
state.error = null;
|
|
1027
969
|
})
|
|
1028
|
-
.addCase(
|
|
970
|
+
.addCase(verifyNafath.fulfilled, function (state, action) {
|
|
1029
971
|
var _a;
|
|
1030
972
|
state.loading = false;
|
|
1031
973
|
var data = action.payload;
|
|
1032
974
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data) });
|
|
1033
975
|
})
|
|
1034
|
-
.addCase(
|
|
976
|
+
.addCase(verifyNafath.rejected, function (state, action) {
|
|
1035
977
|
state.loading = false;
|
|
1036
|
-
|
|
978
|
+
var error = action.error.message;
|
|
979
|
+
if (error !== 'Aborted') {
|
|
980
|
+
state.error = error;
|
|
981
|
+
}
|
|
1037
982
|
})
|
|
1038
983
|
.addCase(createCivilIdAuth.pending, function (state) {
|
|
1039
984
|
state.loading = true;
|
|
@@ -57,6 +57,21 @@ 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
|
+
}>;
|
|
60
75
|
interface verifyPACIParams {
|
|
61
76
|
onSuccess?: () => void;
|
|
62
77
|
}
|
|
@@ -90,7 +105,7 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
90
105
|
formData: {
|
|
91
106
|
type: string;
|
|
92
107
|
nid: string;
|
|
93
|
-
dob
|
|
108
|
+
dob?: any;
|
|
94
109
|
termAndConditionChecked?: boolean | undefined;
|
|
95
110
|
};
|
|
96
111
|
}, NIDFormValues, {
|
|
@@ -103,16 +118,6 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
103
118
|
fulfilledMeta?: unknown;
|
|
104
119
|
rejectedMeta?: unknown;
|
|
105
120
|
}>;
|
|
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
|
-
}>;
|
|
116
121
|
export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
117
122
|
leadId: string;
|
|
118
123
|
}, {
|