@tap-payments/auth-jsconnect 2.8.75-sandbox → 2.8.76-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/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +35 -13
- 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/theme/palette.js +2 -1
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
- 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
|
}
|
|
@@ -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)) }),
|
|
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,6 +1,5 @@
|
|
|
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";
|
|
4
3
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
5
4
|
export declare const CLIENT_ORIGIN: string;
|
|
6
5
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
|
@@ -82,6 +81,7 @@ export declare const SERVICE_NAME: {
|
|
|
82
81
|
export declare const IDENTIFICATION_TYPE: {
|
|
83
82
|
NID: string;
|
|
84
83
|
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,6 +1,5 @@
|
|
|
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';
|
|
4
3
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
5
4
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
6
5
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -24,7 +23,7 @@ export var BACKGROUND_ID = 'auth-js-connect-background';
|
|
|
24
23
|
export var CONNECT_SCREENS_NAVIGATION = [
|
|
25
24
|
{
|
|
26
25
|
name: 'CONNECT_NID_STEP',
|
|
27
|
-
next: '
|
|
26
|
+
next: 'CONNECT_VERIFY_NAFATH_STEP',
|
|
28
27
|
prev: 'CONNECT_MOBILE_STEP',
|
|
29
28
|
order: 1
|
|
30
29
|
},
|
|
@@ -58,6 +57,12 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
58
57
|
prev: 'CONNECT_CIVIL_ID_STEP',
|
|
59
58
|
order: 2
|
|
60
59
|
},
|
|
60
|
+
{
|
|
61
|
+
name: 'CONNECT_VERIFY_NAFATH_STEP',
|
|
62
|
+
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
63
|
+
prev: 'CONNECT_NID_STEP',
|
|
64
|
+
order: 2
|
|
65
|
+
},
|
|
61
66
|
{
|
|
62
67
|
name: 'CONNECT_OTP_STEP',
|
|
63
68
|
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
@@ -92,7 +97,7 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
92
97
|
export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
93
98
|
{
|
|
94
99
|
name: 'CONNECT_EXPRESS_NID_STEP',
|
|
95
|
-
next: '
|
|
100
|
+
next: 'CONNECT_EXPRESS_VERIFY_NAFATH_STEP',
|
|
96
101
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
97
102
|
order: 1
|
|
98
103
|
},
|
|
@@ -120,6 +125,16 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
120
125
|
prev: '',
|
|
121
126
|
order: 1
|
|
122
127
|
},
|
|
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
|
+
},
|
|
123
138
|
{
|
|
124
139
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
125
140
|
next: [
|
|
@@ -139,7 +154,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
139
154
|
'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
140
155
|
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
141
156
|
],
|
|
142
|
-
prev:
|
|
157
|
+
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
143
158
|
order: 2
|
|
144
159
|
},
|
|
145
160
|
{
|
|
@@ -150,7 +165,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
150
165
|
},
|
|
151
166
|
{
|
|
152
167
|
name: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
153
|
-
next: ['
|
|
168
|
+
next: ['CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP', 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP'],
|
|
154
169
|
prev: 'CONNECT_EXPRESS_MOBILE_STEP',
|
|
155
170
|
order: 3
|
|
156
171
|
},
|
|
@@ -173,15 +188,15 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
173
188
|
order: 4
|
|
174
189
|
},
|
|
175
190
|
{
|
|
176
|
-
name: '
|
|
191
|
+
name: 'CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP',
|
|
177
192
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
178
|
-
prev: '
|
|
193
|
+
prev: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
179
194
|
order: 4
|
|
180
195
|
},
|
|
181
196
|
{
|
|
182
|
-
name: '
|
|
197
|
+
name: 'CONNECT_EXPRESS_VERIFY_PACI_IDENTITY_STEP',
|
|
183
198
|
next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
|
|
184
|
-
prev: '
|
|
199
|
+
prev: 'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
185
200
|
order: 4
|
|
186
201
|
},
|
|
187
202
|
{
|
|
@@ -236,7 +251,7 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
236
251
|
},
|
|
237
252
|
{
|
|
238
253
|
name: 'AUTH_NID_STEP',
|
|
239
|
-
next: '
|
|
254
|
+
next: 'AUTH_NAFATH_VERIFY_STEP',
|
|
240
255
|
prev: 'AUTH_SWITCH_STEP',
|
|
241
256
|
order: 1
|
|
242
257
|
},
|
|
@@ -276,6 +291,12 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
276
291
|
prev: ['AUTH_MOBILE_STEP', 'AUTH_NID_STEP', 'AUTH_EMAIL_STEP', 'AUTH_PASSWORD_STEP'],
|
|
277
292
|
order: 2
|
|
278
293
|
},
|
|
294
|
+
{
|
|
295
|
+
name: 'AUTH_NAFATH_VERIFY_STEP',
|
|
296
|
+
next: 'AUTH_PREPARING_DATA_STEP',
|
|
297
|
+
prev: 'AUTH_NID_STEP',
|
|
298
|
+
order: 2
|
|
299
|
+
},
|
|
279
300
|
{
|
|
280
301
|
name: 'AUTH_PASSWORD_STEP',
|
|
281
302
|
next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_OTP_STEP'],
|
|
@@ -367,7 +388,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
367
388
|
},
|
|
368
389
|
{
|
|
369
390
|
name: 'BUSINESS_IDBOD_STEP',
|
|
370
|
-
next: ['
|
|
391
|
+
next: ['BUSINESS_VERIFY_NAFATH_STEP', 'BUSINESS_BUSINESS_TYPE_STEP'],
|
|
371
392
|
prev: '',
|
|
372
393
|
order: 2
|
|
373
394
|
},
|
|
@@ -378,7 +399,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
378
399
|
order: 3
|
|
379
400
|
},
|
|
380
401
|
{
|
|
381
|
-
name: '
|
|
402
|
+
name: 'BUSINESS_VERIFY_NAFATH_STEP',
|
|
382
403
|
next: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
383
404
|
prev: 'BUSINESS_IDBOD_STEP',
|
|
384
405
|
order: 3
|
|
@@ -850,7 +871,8 @@ export var SERVICE_NAME = {
|
|
|
850
871
|
};
|
|
851
872
|
export var IDENTIFICATION_TYPE = {
|
|
852
873
|
NID: 'national_id',
|
|
853
|
-
IQAMA: 'iqamah'
|
|
874
|
+
IQAMA: 'iqamah',
|
|
875
|
+
NAFATH: 'nafath'
|
|
854
876
|
};
|
|
855
877
|
export var CONNECT_STEP_NAMES = {
|
|
856
878
|
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()) === 'success';
|
|
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
|
}); });
|
|
@@ -999,44 +952,36 @@ export var authSlice = createSlice({
|
|
|
999
952
|
state.loading = false;
|
|
1000
953
|
state.error = action.error.message;
|
|
1001
954
|
})
|
|
1002
|
-
.addCase(
|
|
955
|
+
.addCase(createNafathAuth.pending, function (state) {
|
|
1003
956
|
state.loading = true;
|
|
1004
957
|
state.error = null;
|
|
1005
958
|
})
|
|
1006
|
-
.addCase(
|
|
959
|
+
.addCase(createNafathAuth.fulfilled, function (state, action) {
|
|
1007
960
|
state.loading = false;
|
|
1008
961
|
state.data.nidData = action.payload.formData;
|
|
1009
962
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1010
963
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: action.payload.response });
|
|
1011
964
|
})
|
|
1012
|
-
.addCase(
|
|
965
|
+
.addCase(createNafathAuth.rejected, function (state, action) {
|
|
1013
966
|
state.loading = false;
|
|
1014
967
|
state.error = action.error.message;
|
|
1015
968
|
})
|
|
1016
|
-
.addCase(
|
|
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) {
|
|
969
|
+
.addCase(verifyNafath.pending, function (state) {
|
|
1028
970
|
state.loading = true;
|
|
1029
971
|
state.error = null;
|
|
1030
972
|
})
|
|
1031
|
-
.addCase(
|
|
973
|
+
.addCase(verifyNafath.fulfilled, function (state, action) {
|
|
1032
974
|
var _a;
|
|
1033
975
|
state.loading = false;
|
|
1034
976
|
var data = action.payload;
|
|
1035
977
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authResponse: __assign(__assign({}, (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.authResponse), data) });
|
|
1036
978
|
})
|
|
1037
|
-
.addCase(
|
|
979
|
+
.addCase(verifyNafath.rejected, function (state, action) {
|
|
1038
980
|
state.loading = false;
|
|
1039
|
-
|
|
981
|
+
var error = action.error.message;
|
|
982
|
+
if (error !== 'Aborted') {
|
|
983
|
+
state.error = error;
|
|
984
|
+
}
|
|
1040
985
|
})
|
|
1041
986
|
.addCase(createCivilIdAuth.pending, function (state) {
|
|
1042
987
|
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
|
}, {
|