@tap-payments/auth-jsconnect 2.9.4-development → 2.9.5-beta
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/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -0
- package/build/constants/app.js +2 -0
- package/build/features/app/auth/authStore.js +17 -12
- package/build/features/app/connect/connectStore.js +13 -9
- package/build/features/app/connectExpress/connectExpressStore.js +18 -13
- package/build/features/app/individual/individualStore.js +1 -0
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -43
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -4
- package/build/utils/common.js +4 -4
- package/package.json +2 -2
- package/build/features/app/kyc/kycStore.d.ts +0 -121
- package/build/features/app/kyc/kycStore.js +0 -401
- package/build/features/kyc/KYC.d.ts +0 -10
- package/build/features/kyc/KYC.js +0 -99
- package/build/features/kyc/index.d.ts +0 -1
- package/build/features/kyc/index.js +0 -1
- package/build/features/kyc/screens/Loading/Loading.d.ts +0 -4
- package/build/features/kyc/screens/Loading/Loading.js +0 -10
- package/build/features/kyc/screens/Loading/index.d.ts +0 -2
- package/build/features/kyc/screens/Loading/index.js +0 -2
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/kyc/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/kyc/screens/OperatorError/index.d.ts +0 -2
- package/build/features/kyc/screens/OperatorError/index.js +0 -2
- package/build/features/kyc/screens/Success/Success.d.ts +0 -5
- package/build/features/kyc/screens/Success/Success.js +0 -19
- package/build/features/kyc/screens/Success/index.d.ts +0 -2
- package/build/features/kyc/screens/Success/index.js +0 -2
- package/build/features/kyc/screens/Terms/Header.d.ts +0 -6
- package/build/features/kyc/screens/Terms/Header.js +0 -36
- package/build/features/kyc/screens/Terms/Terms.d.ts +0 -4
- package/build/features/kyc/screens/Terms/Terms.js +0 -72
- package/build/features/kyc/screens/Terms/index.d.ts +0 -2
- package/build/features/kyc/screens/Terms/index.js +0 -2
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +0 -5
- package/build/features/kyc/screens/TokenError/TokenError.js +0 -9
- package/build/features/kyc/screens/TokenError/index.d.ts +0 -2
- package/build/features/kyc/screens/TokenError/index.js +0 -2
- package/build/features/kyc/screens/Users/Users.d.ts +0 -3
- package/build/features/kyc/screens/Users/Users.js +0 -76
- package/build/features/kyc/screens/Users/index.d.ts +0 -2
- package/build/features/kyc/screens/Users/index.js +0 -2
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +0 -45
- package/build/features/kyc/screens/VerifyNafath/index.d.ts +0 -3
- package/build/features/kyc/screens/VerifyNafath/index.js +0 -2
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +0 -5
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +0 -44
- package/build/features/kyc/screens/VerifyPaci/index.d.ts +0 -3
- package/build/features/kyc/screens/VerifyPaci/index.js +0 -2
|
@@ -12,6 +12,5 @@ declare const rootReducer: {
|
|
|
12
12
|
connectExpress: import("redux").Reducer<import("../features/app/connectExpress/connectExpressStore").ConnectExpressState, import("redux").AnyAction>;
|
|
13
13
|
auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
|
|
14
14
|
board: import("redux").Reducer<import("../features/app/board/boardStore").BoardState, import("redux").AnyAction>;
|
|
15
|
-
kyc: import("redux").Reducer<import("../features/app/kyc/kycStore").KYCDataState, import("redux").AnyAction>;
|
|
16
15
|
};
|
|
17
16
|
export default rootReducer;
|
package/build/app/rootReducer.js
CHANGED
|
@@ -11,7 +11,6 @@ import brand from '../features/app/brand/brandStore';
|
|
|
11
11
|
import connectExpress from '../features/app/connectExpress/connectExpressStore';
|
|
12
12
|
import board from '../features/app/board/boardStore';
|
|
13
13
|
import auth from '../features/app/auth/authStore';
|
|
14
|
-
import kyc from '../features/app/kyc/kycStore';
|
|
15
14
|
var rootReducer = {
|
|
16
15
|
settings: settings,
|
|
17
16
|
connect: connect,
|
|
@@ -25,7 +24,6 @@ var rootReducer = {
|
|
|
25
24
|
brand: brand,
|
|
26
25
|
connectExpress: connectExpress,
|
|
27
26
|
auth: auth,
|
|
28
|
-
board: board
|
|
29
|
-
kyc: kyc
|
|
27
|
+
board: board
|
|
30
28
|
};
|
|
31
29
|
export default rootReducer;
|
package/build/app/store.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export declare const store: import("@reduxjs/toolkit/dist/configureStore").Toolk
|
|
|
13
13
|
connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
|
|
14
14
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
15
15
|
board: import("../features/app/board/boardStore").BoardState;
|
|
16
|
-
kyc: import("../features/app/kyc/kycStore").KYCDataState;
|
|
17
16
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
18
17
|
settings: import("./settings").SettingsState;
|
|
19
18
|
connect: import("../features/app/connect/connectStore").ConnectState;
|
|
@@ -28,7 +27,6 @@ export declare const store: import("@reduxjs/toolkit/dist/configureStore").Toolk
|
|
|
28
27
|
connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
|
|
29
28
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
30
29
|
board: import("../features/app/board/boardStore").BoardState;
|
|
31
|
-
kyc: import("../features/app/kyc/kycStore").KYCDataState;
|
|
32
30
|
}, import("redux").AnyAction, undefined>]>>;
|
|
33
31
|
export type AppDispatch = typeof store.dispatch;
|
|
34
32
|
export type RootState = ReturnType<typeof store.getState>;
|
|
@@ -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/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var SANDBOX_BASE_URL = 'https://connect-mw.sandbox.tap.company/middleware';
|
|
2
2
|
var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
|
|
3
3
|
var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
|
|
4
|
+
var BETA_BASE_URL = 'https://connect-mw.beta.tap.company/middleware';
|
|
4
5
|
var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
|
|
5
6
|
var API_COUNTRIES = 'https://utilities.tap.company/api/v1/country/list';
|
|
6
7
|
var CURRENCY_PATH = 'https://utilities.tap.company/api/v1/currency/iso';
|
|
@@ -69,6 +70,7 @@ export var ENDPOINT_PATHS = {
|
|
|
69
70
|
SANDBOX_BASE_URL: SANDBOX_BASE_URL,
|
|
70
71
|
PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
|
|
71
72
|
DEV_BASE_URL: DEV_BASE_URL,
|
|
73
|
+
BETA_BASE_URL: BETA_BASE_URL,
|
|
72
74
|
BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
|
|
73
75
|
COUNTRIES: API_COUNTRIES,
|
|
74
76
|
IP: IP_PATH,
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company";
|
|
3
5
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
4
6
|
export declare const CLIENT_ORIGIN: string;
|
|
5
7
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
package/build/constants/app.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
import { CONNECT_FLOWS } from './flows';
|
|
3
3
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
4
|
+
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
5
|
+
export var CONNECT_BETA_URL = 'https://connect.beta.tap.company';
|
|
4
6
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
5
7
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
6
8
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -114,19 +114,21 @@ export var retrieveLeadIdentityByIdAsync = createAsyncThunk('auth/retrieveLeadId
|
|
|
114
114
|
});
|
|
115
115
|
}); });
|
|
116
116
|
export var createMobileAuth = createAsyncThunk('auth/createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
-
var _a, settings, auth, requestBody, data;
|
|
118
|
-
var _b, _c;
|
|
119
|
-
return __generator(this, function (
|
|
120
|
-
switch (
|
|
117
|
+
var _a, settings, auth, isStartWithZero, mobileNumber, requestBody, data;
|
|
118
|
+
var _b, _c, _d;
|
|
119
|
+
return __generator(this, function (_e) {
|
|
120
|
+
switch (_e.label) {
|
|
121
121
|
case 0:
|
|
122
122
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
123
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
124
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
123
125
|
requestBody = {
|
|
124
126
|
country: settings.data.businessCountry.iso2,
|
|
125
127
|
scope: settings.data.appConfig.scope,
|
|
126
128
|
lang: settings.data.language,
|
|
127
129
|
lead_id: auth.data.leadId,
|
|
128
130
|
user_credentail: {
|
|
129
|
-
phone:
|
|
131
|
+
phone: mobileNumber || '',
|
|
130
132
|
code: params.countryCode.idd_prefix.toString()
|
|
131
133
|
},
|
|
132
134
|
sign_in: false,
|
|
@@ -136,26 +138,29 @@ export var createMobileAuth = createAsyncThunk('auth/createMobileAuth', function
|
|
|
136
138
|
};
|
|
137
139
|
return [4, API.authService.createAuth(requestBody)];
|
|
138
140
|
case 1:
|
|
139
|
-
data =
|
|
141
|
+
data = _e.sent();
|
|
140
142
|
thunkApi.dispatch(handleNextScreenStep());
|
|
141
|
-
(
|
|
143
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
142
144
|
return [2, { response: data, formData: params }];
|
|
143
145
|
}
|
|
144
146
|
});
|
|
145
147
|
}); });
|
|
146
148
|
export var resendMobileAuthOTP = createAsyncThunk('auth/resendMobileAuthOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
|
-
var _a, settings, auth, requestBody, data;
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
var _a, settings, auth, isStartWithZero, mobileNumber, requestBody, data;
|
|
150
|
+
var _b;
|
|
151
|
+
return __generator(this, function (_c) {
|
|
152
|
+
switch (_c.label) {
|
|
150
153
|
case 0:
|
|
151
154
|
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
155
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
156
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
152
157
|
requestBody = {
|
|
153
158
|
country: settings.data.businessCountry.iso2,
|
|
154
159
|
scope: settings.data.appConfig.scope,
|
|
155
160
|
lang: settings.data.language,
|
|
156
161
|
lead_id: auth.data.leadId,
|
|
157
162
|
user_credentail: {
|
|
158
|
-
phone:
|
|
163
|
+
phone: mobileNumber,
|
|
159
164
|
code: params.countryCode.idd_prefix.toString()
|
|
160
165
|
},
|
|
161
166
|
sign_in: false,
|
|
@@ -165,7 +170,7 @@ export var resendMobileAuthOTP = createAsyncThunk('auth/resendMobileAuthOTP', fu
|
|
|
165
170
|
};
|
|
166
171
|
return [4, API.authService.createAuth(requestBody)];
|
|
167
172
|
case 1:
|
|
168
|
-
data =
|
|
173
|
+
data = _c.sent();
|
|
169
174
|
return [2, { response: data, formData: params }];
|
|
170
175
|
}
|
|
171
176
|
});
|
|
@@ -91,18 +91,20 @@ export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCount
|
|
|
91
91
|
});
|
|
92
92
|
}); });
|
|
93
93
|
export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
-
var settings, requestBody, data;
|
|
95
|
-
var _a, _b;
|
|
96
|
-
return __generator(this, function (
|
|
97
|
-
switch (
|
|
94
|
+
var settings, isStartWithZero, mobileNumber, requestBody, data;
|
|
95
|
+
var _a, _b, _c;
|
|
96
|
+
return __generator(this, function (_d) {
|
|
97
|
+
switch (_d.label) {
|
|
98
98
|
case 0:
|
|
99
99
|
settings = thunkApi.getState().settings;
|
|
100
|
+
isStartWithZero = (_a = params.mobile) === null || _a === void 0 ? void 0 : _a.startsWith('0');
|
|
101
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
100
102
|
requestBody = {
|
|
101
103
|
country: settings.data.businessCountry.iso2,
|
|
102
104
|
scope: settings.data.appConfig.scope,
|
|
103
105
|
lang: settings.data.language,
|
|
104
106
|
user_credentail: {
|
|
105
|
-
phone:
|
|
107
|
+
phone: mobileNumber || '',
|
|
106
108
|
code: params.countryCode.idd_prefix.toString()
|
|
107
109
|
},
|
|
108
110
|
sign_in: false,
|
|
@@ -112,9 +114,9 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
|
|
|
112
114
|
};
|
|
113
115
|
return [4, API.authService.createAuth(requestBody)];
|
|
114
116
|
case 1:
|
|
115
|
-
data =
|
|
117
|
+
data = _d.sent();
|
|
116
118
|
thunkApi.dispatch(handleNextScreenStep());
|
|
117
|
-
(
|
|
119
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
118
120
|
return [2, { response: data, formData: params }];
|
|
119
121
|
}
|
|
120
122
|
});
|
|
@@ -149,18 +151,20 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
149
151
|
});
|
|
150
152
|
}); });
|
|
151
153
|
export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
-
var _a, settings, connect, _b, mobile, countryCode, requestBody;
|
|
154
|
+
var _a, settings, connect, _b, mobile, countryCode, isStartWithZero, mobileNumber, requestBody;
|
|
153
155
|
return __generator(this, function (_c) {
|
|
154
156
|
switch (_c.label) {
|
|
155
157
|
case 0:
|
|
156
158
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
157
159
|
_b = connect.data.mobileData, mobile = _b.mobile, countryCode = _b.countryCode;
|
|
160
|
+
isStartWithZero = mobile === null || mobile === void 0 ? void 0 : mobile.startsWith('0');
|
|
161
|
+
mobileNumber = isStartWithZero ? mobile.slice(1) : mobile;
|
|
158
162
|
requestBody = {
|
|
159
163
|
country: settings.data.businessCountry.iso2,
|
|
160
164
|
scope: settings.data.appConfig.scope,
|
|
161
165
|
lang: settings.data.language,
|
|
162
166
|
user_credentail: {
|
|
163
|
-
phone:
|
|
167
|
+
phone: mobileNumber || '',
|
|
164
168
|
code: countryCode.idd_prefix.toString()
|
|
165
169
|
},
|
|
166
170
|
sign_in: false,
|
|
@@ -253,19 +253,21 @@ export var getMerchantListAsync = createAsyncThunk('connectExpress/getMerchantLi
|
|
|
253
253
|
});
|
|
254
254
|
});
|
|
255
255
|
export var createMobileAuthAsync = createAsyncThunk('connectExpress/createMobileAuthAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
256
|
-
var _a, settings, connectExpress, requestBody, data;
|
|
257
|
-
var _b, _c;
|
|
258
|
-
return __generator(this, function (
|
|
259
|
-
switch (
|
|
256
|
+
var _a, settings, connectExpress, isStartWithZero, mobileNumber, requestBody, data;
|
|
257
|
+
var _b, _c, _d;
|
|
258
|
+
return __generator(this, function (_e) {
|
|
259
|
+
switch (_e.label) {
|
|
260
260
|
case 0:
|
|
261
261
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
262
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
263
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
262
264
|
requestBody = {
|
|
263
265
|
country: settings.data.businessCountry.iso2,
|
|
264
266
|
scope: settings.data.appConfig.scope,
|
|
265
267
|
lang: settings.data.language,
|
|
266
268
|
lead_id: connectExpress.data.leadId,
|
|
267
269
|
user_credentail: {
|
|
268
|
-
phone:
|
|
270
|
+
phone: mobileNumber,
|
|
269
271
|
code: params.countryCode.idd_prefix.toString()
|
|
270
272
|
},
|
|
271
273
|
sign_in: false,
|
|
@@ -275,26 +277,29 @@ export var createMobileAuthAsync = createAsyncThunk('connectExpress/createMobile
|
|
|
275
277
|
};
|
|
276
278
|
return [4, API.authService.createExpressAuth(requestBody)];
|
|
277
279
|
case 1:
|
|
278
|
-
data =
|
|
280
|
+
data = _e.sent();
|
|
279
281
|
thunkApi.dispatch(handleNextScreenStep());
|
|
280
|
-
(
|
|
282
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
281
283
|
return [2, { response: data, formData: params }];
|
|
282
284
|
}
|
|
283
285
|
});
|
|
284
286
|
}); });
|
|
285
287
|
export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAuthOTPExpress', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
286
|
-
var _a, settings, connectExpress, requestBody, data;
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
var _a, settings, connectExpress, isStartWithZero, mobileNumber, requestBody, data;
|
|
289
|
+
var _b;
|
|
290
|
+
return __generator(this, function (_c) {
|
|
291
|
+
switch (_c.label) {
|
|
289
292
|
case 0:
|
|
290
293
|
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
294
|
+
isStartWithZero = (_b = params.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
295
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
291
296
|
requestBody = {
|
|
292
297
|
country: settings.data.businessCountry.iso2,
|
|
293
298
|
scope: settings.data.appConfig.scope,
|
|
294
299
|
lang: settings.data.language,
|
|
295
300
|
lead_id: connectExpress.data.leadId,
|
|
296
301
|
user_credentail: {
|
|
297
|
-
phone:
|
|
302
|
+
phone: mobileNumber,
|
|
298
303
|
code: params.countryCode.idd_prefix.toString()
|
|
299
304
|
},
|
|
300
305
|
sign_in: false,
|
|
@@ -304,7 +309,7 @@ export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAu
|
|
|
304
309
|
};
|
|
305
310
|
return [4, API.authService.createExpressAuth(requestBody)];
|
|
306
311
|
case 1:
|
|
307
|
-
data =
|
|
312
|
+
data = _c.sent();
|
|
308
313
|
return [2, { response: data, formData: params }];
|
|
309
314
|
}
|
|
310
315
|
});
|
|
@@ -778,7 +783,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
778
783
|
case 6:
|
|
779
784
|
count++;
|
|
780
785
|
return [3, 1];
|
|
781
|
-
case 7: throw new Error('
|
|
786
|
+
case 7: throw new Error('nafath_verification_failed');
|
|
782
787
|
}
|
|
783
788
|
});
|
|
784
789
|
}); });
|
|
@@ -1184,6 +1184,7 @@ export var individualSlice = createSlice({
|
|
|
1184
1184
|
state.data.individualData.isAuthorized = is_authorized;
|
|
1185
1185
|
})
|
|
1186
1186
|
.addCase(retrieveIndividualInfo.rejected, function (state, action) {
|
|
1187
|
+
state.addOrRequestDetailLoading = false;
|
|
1187
1188
|
state.error = action.error.message;
|
|
1188
1189
|
})
|
|
1189
1190
|
.addCase(getIndividualList.pending, function (state) {
|
|
@@ -56,19 +56,21 @@ var redirection = function (type) {
|
|
|
56
56
|
return handleNextScreenStep('SIGIN_OTP_STEP');
|
|
57
57
|
};
|
|
58
58
|
export var createMobileAuth = createAsyncThunk('signIn/createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var settings, requestBody, data;
|
|
60
|
-
var _a, _b, _c, _d;
|
|
61
|
-
return __generator(this, function (
|
|
62
|
-
switch (
|
|
59
|
+
var settings, isStartWithZero, mobileNumber, requestBody, data;
|
|
60
|
+
var _a, _b, _c, _d, _e;
|
|
61
|
+
return __generator(this, function (_f) {
|
|
62
|
+
switch (_f.label) {
|
|
63
63
|
case 0:
|
|
64
64
|
settings = thunkApi.getState().settings;
|
|
65
|
+
isStartWithZero = (_a = params.mobile) === null || _a === void 0 ? void 0 : _a.startsWith('0');
|
|
66
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
65
67
|
requestBody = {
|
|
66
68
|
country: settings.data.businessCountry.iso2,
|
|
67
69
|
scope: settings.data.appConfig.scope,
|
|
68
70
|
lang: settings.data.language,
|
|
69
71
|
user_credentail: {
|
|
70
|
-
phone:
|
|
71
|
-
code: (
|
|
72
|
+
phone: mobileNumber || '',
|
|
73
|
+
code: (_c = (_b = params.countryCode) === null || _b === void 0 ? void 0 : _b.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString()
|
|
72
74
|
},
|
|
73
75
|
sign_in: true,
|
|
74
76
|
step_name: SignIn_STEP_NAMES.CREATE_AUTH_MOBILE,
|
|
@@ -76,28 +78,30 @@ export var createMobileAuth = createAsyncThunk('signIn/createMobileAuth', functi
|
|
|
76
78
|
};
|
|
77
79
|
return [4, API.authService.createAuth(requestBody)];
|
|
78
80
|
case 1:
|
|
79
|
-
data =
|
|
81
|
+
data = _f.sent();
|
|
80
82
|
thunkApi.dispatch(redirection(data === null || data === void 0 ? void 0 : data.auth_type));
|
|
81
|
-
(
|
|
83
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
82
84
|
return [2, { data: data, formData: params }];
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
}); });
|
|
86
88
|
export var resendOTPMobile = createAsyncThunk('signIn/resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
-
var _a, settings, signIn, authData, requestBody, data;
|
|
88
|
-
var _b, _c;
|
|
89
|
-
return __generator(this, function (
|
|
90
|
-
switch (
|
|
89
|
+
var _a, settings, signIn, authData, isStartWithZero, mobileNumber, requestBody, data;
|
|
90
|
+
var _b, _c, _d, _e;
|
|
91
|
+
return __generator(this, function (_f) {
|
|
92
|
+
switch (_f.label) {
|
|
91
93
|
case 0:
|
|
92
94
|
_a = thunkApi.getState(), settings = _a.settings, signIn = _a.signIn;
|
|
93
95
|
authData = signIn.data.auth;
|
|
96
|
+
isStartWithZero = (_b = authData.mobile) === null || _b === void 0 ? void 0 : _b.startsWith('0');
|
|
97
|
+
mobileNumber = isStartWithZero ? (_c = authData.mobile) === null || _c === void 0 ? void 0 : _c.slice(1) : authData.mobile;
|
|
94
98
|
requestBody = {
|
|
95
99
|
country: settings.data.businessCountry.iso2,
|
|
96
100
|
scope: settings.data.appConfig.scope,
|
|
97
101
|
lang: settings.data.language,
|
|
98
102
|
user_credentail: {
|
|
99
|
-
phone:
|
|
100
|
-
code: ((
|
|
103
|
+
phone: mobileNumber || '',
|
|
104
|
+
code: ((_e = (_d = authData.countryCode) === null || _d === void 0 ? void 0 : _d.idd_prefix) === null || _e === void 0 ? void 0 : _e.toString()) || ''
|
|
101
105
|
},
|
|
102
106
|
sign_in: true,
|
|
103
107
|
step_name: SignIn_STEP_NAMES.CREATE_AUTH_MOBILE,
|
|
@@ -105,7 +109,7 @@ export var resendOTPMobile = createAsyncThunk('signIn/resendOTPMobile', function
|
|
|
105
109
|
};
|
|
106
110
|
return [4, API.authService.createAuth(requestBody)];
|
|
107
111
|
case 1:
|
|
108
|
-
data =
|
|
112
|
+
data = _f.sent();
|
|
109
113
|
return [2, data];
|
|
110
114
|
}
|
|
111
115
|
});
|
|
@@ -11,4 +11,3 @@ export declare const signInFeatureScreens: Array<FeatureScreenStep>;
|
|
|
11
11
|
export declare const entityFeatureScreens: Array<FeatureScreenStep>;
|
|
12
12
|
export declare const brandFeatureScreens: Array<FeatureScreenStep>;
|
|
13
13
|
export declare const boardFeatureScreens: Array<FeatureScreenStep>;
|
|
14
|
-
export declare const kycFeatureScreens: Array<FeatureScreenStep>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CONNECT_FLOWS } from '../constants';
|
|
2
1
|
import BusinessCountry from './connect/screens/BusinessCountry/BusinessCountry';
|
|
3
2
|
import MobileScreen from './connect/screens/Mobile';
|
|
4
3
|
import NIDScreen from './connect/screens/NID';
|
|
@@ -127,14 +126,6 @@ import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
|
127
126
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
128
127
|
import BoardDataLoadingPage from './board/screens/PrepareDataLoading';
|
|
129
128
|
import BoardOperatorError from './board/screens/OperatorError';
|
|
130
|
-
import KycLoadingPage from './kyc/screens/Loading';
|
|
131
|
-
import KycTokenErrorPage from './kyc/screens/TokenError';
|
|
132
|
-
import KycVerifyNafathPage from './kyc/screens/VerifyNafath';
|
|
133
|
-
import KycVerifyPaciPage from './kyc/screens/VerifyPaci';
|
|
134
|
-
import KycOperatorErrorPage from './kyc/screens/OperatorError';
|
|
135
|
-
import KycSuccessPage from './kyc/screens/Success';
|
|
136
|
-
import KycTermsPage from './kyc/screens/Terms';
|
|
137
|
-
import KycUsersPage from './kyc/screens/Users';
|
|
138
129
|
export var connectFeatureScreens = [
|
|
139
130
|
{
|
|
140
131
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -641,37 +632,3 @@ export var boardFeatureScreens = [
|
|
|
641
632
|
element: BoardOperatorError
|
|
642
633
|
}
|
|
643
634
|
];
|
|
644
|
-
export var kycFeatureScreens = [
|
|
645
|
-
{
|
|
646
|
-
name: CONNECT_FLOWS.kyc.loadingData,
|
|
647
|
-
element: KycLoadingPage
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
name: CONNECT_FLOWS.kyc.tokenError,
|
|
651
|
-
element: KycTokenErrorPage
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
name: CONNECT_FLOWS.kyc.terms,
|
|
655
|
-
element: KycTermsPage
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: CONNECT_FLOWS.kyc.users,
|
|
659
|
-
element: KycUsersPage
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
name: CONNECT_FLOWS.kyc.operatorError,
|
|
663
|
-
element: KycOperatorErrorPage
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
name: CONNECT_FLOWS.kyc.verifyPACI,
|
|
667
|
-
element: KycVerifyPaciPage
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
name: CONNECT_FLOWS.kyc.verifyNafath,
|
|
671
|
-
element: KycVerifyNafathPage
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
name: CONNECT_FLOWS.kyc.success,
|
|
675
|
-
element: KycSuccessPage
|
|
676
|
-
}
|
|
677
|
-
];
|
|
@@ -12,5 +12,4 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
|
12
12
|
connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
|
|
13
13
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
14
14
|
board: import("../features/app/board/boardStore").BoardState;
|
|
15
|
-
kyc: import("../features/app/kyc/kycStore").KYCDataState;
|
|
16
15
|
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
package/build/index.d.ts
CHANGED
|
@@ -12,6 +12,5 @@ import { SignInElement, SignInLibProps } from './features/signIn';
|
|
|
12
12
|
import { EntityElement, EntityLibProps } from './features/entity';
|
|
13
13
|
import { BrandElement, BrandLibProps } from './features/brand';
|
|
14
14
|
import { BoardLibProps, BoardElement } from './features/board';
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
|
|
15
|
+
export type { ConnectLibProps, ConnectExpressLibProps, AuthLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps, BoardLibProps };
|
|
16
|
+
export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement };
|
package/build/index.js
CHANGED
|
@@ -12,8 +12,7 @@ import { SignInElement, renderSignInLib } from './features/signIn';
|
|
|
12
12
|
import { EntityElement, renderEntityLib } from './features/entity';
|
|
13
13
|
import { BrandElement, renderBrandLib } from './features/brand';
|
|
14
14
|
import { BoardElement, renderBoardLib } from './features/board';
|
|
15
|
-
|
|
16
|
-
export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
|
|
15
|
+
export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement };
|
|
17
16
|
window['TapAuth'] = {
|
|
18
17
|
renderConnectLib: renderConnectLib,
|
|
19
18
|
renderConnectExpressLib: renderConnectExpressLib,
|
|
@@ -26,7 +25,6 @@ window['TapAuth'] = {
|
|
|
26
25
|
renderEntityLib: renderEntityLib,
|
|
27
26
|
renderBrandLib: renderBrandLib,
|
|
28
27
|
renderSignInLib: renderSignInLib,
|
|
29
|
-
renderBoardLib: renderBoardLib
|
|
30
|
-
renderKYCLib: renderKYCLib
|
|
28
|
+
renderBoardLib: renderBoardLib
|
|
31
29
|
};
|
|
32
30
|
console.log("TapAuth version: ".concat(require('../package.json').version));
|
package/build/utils/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axiosInstance } from '../api';
|
|
2
|
-
import { ENDPOINT_PATHS,
|
|
2
|
+
import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_BETA_URL } from '../constants';
|
|
3
3
|
import { objectHasValues } from './object';
|
|
4
4
|
export var sleep = function (milliseconds) {
|
|
5
5
|
if (milliseconds === void 0) { milliseconds = 1000; }
|
|
@@ -14,10 +14,10 @@ export var dangerousMessage = function (message, callBack) {
|
|
|
14
14
|
export var setBaseUrl = function (publicKey) {
|
|
15
15
|
var isProd = publicKey.includes('pk_live');
|
|
16
16
|
if (isProd) {
|
|
17
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
17
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.BETA_BASE_URL;
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
20
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
|
|
21
21
|
};
|
|
22
22
|
export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
23
23
|
var country = countryIso2.toLowerCase();
|
|
@@ -36,7 +36,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
|
36
36
|
window.history.replaceState({}, '', newUrl);
|
|
37
37
|
};
|
|
38
38
|
export var openConnect = function (pk, countryCode) {
|
|
39
|
-
var newUrl = new URL(pk.includes('pk_live') ?
|
|
39
|
+
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_BETA_URL : CONNECT_SANDBOX_URL);
|
|
40
40
|
if (countryCode) {
|
|
41
41
|
newUrl.pathname = "/".concat(countryCode.toLowerCase());
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.5-beta",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
22
|
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
23
|
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public --tag
|
|
24
|
+
"push": "npm publish --access public --tag beta"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|