@tap-payments/auth-jsconnect 2.8.86-sandbox → 2.8.87-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/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -1
- package/build/features/app/auth/authStore.js +16 -14
- package/build/features/app/connectExpress/connectExpressStore.js +9 -8
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
|
@@ -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/";
|
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/';
|
|
@@ -366,16 +366,17 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
366
366
|
});
|
|
367
367
|
}); });
|
|
368
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
|
|
371
|
-
return __generator(this, function (
|
|
372
|
-
switch (
|
|
369
|
+
var _a, settings, auth, requestBody, data;
|
|
370
|
+
var _b, _c;
|
|
371
|
+
return __generator(this, function (_d) {
|
|
372
|
+
switch (_d.label) {
|
|
373
373
|
case 0:
|
|
374
|
-
|
|
374
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
375
375
|
requestBody = {
|
|
376
376
|
country: settings.data.businessCountry.iso2,
|
|
377
377
|
scope: settings.data.appConfig.scope,
|
|
378
378
|
lang: settings.data.language,
|
|
379
|
+
lead_id: auth.data.leadId,
|
|
379
380
|
user_credentail: {
|
|
380
381
|
identification_id: params.nid,
|
|
381
382
|
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
@@ -388,9 +389,9 @@ export var createNafathAuth = createAsyncThunk('auth/createNafathAuth', function
|
|
|
388
389
|
};
|
|
389
390
|
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
390
391
|
case 1:
|
|
391
|
-
data =
|
|
392
|
+
data = _d.sent();
|
|
392
393
|
thunkApi.dispatch(handleNextScreenStep());
|
|
393
|
-
(
|
|
394
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
394
395
|
return [2, { response: data, formData: params }];
|
|
395
396
|
}
|
|
396
397
|
});
|
|
@@ -444,17 +445,18 @@ export var verifyNafath = createAsyncThunk('auth/verifyNafath', function (params
|
|
|
444
445
|
});
|
|
445
446
|
}); });
|
|
446
447
|
export var createCivilIdAuth = createAsyncThunk('auth/createCivilAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
447
|
-
var settings, countryCode, requestBody, data;
|
|
448
|
-
var
|
|
449
|
-
return __generator(this, function (
|
|
450
|
-
switch (
|
|
448
|
+
var _a, settings, auth, countryCode, requestBody, data;
|
|
449
|
+
var _b, _c;
|
|
450
|
+
return __generator(this, function (_d) {
|
|
451
|
+
switch (_d.label) {
|
|
451
452
|
case 0:
|
|
452
|
-
|
|
453
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
453
454
|
countryCode = settings.data.businessCountry.iso2;
|
|
454
455
|
requestBody = {
|
|
455
456
|
country: settings.data.businessCountry.iso2,
|
|
456
457
|
scope: settings.data.appConfig.scope,
|
|
457
458
|
lang: settings.data.language,
|
|
459
|
+
lead_id: auth.data.leadId,
|
|
458
460
|
user_credentail: {
|
|
459
461
|
identification_id: params.civilId,
|
|
460
462
|
country_code: countryCode
|
|
@@ -466,9 +468,9 @@ export var createCivilIdAuth = createAsyncThunk('auth/createCivilAuth', function
|
|
|
466
468
|
};
|
|
467
469
|
return [4, API.authService.createAuth(requestBody)];
|
|
468
470
|
case 1:
|
|
469
|
-
data =
|
|
471
|
+
data = _d.sent();
|
|
470
472
|
thunkApi.dispatch(handleNextScreenStep());
|
|
471
|
-
(
|
|
473
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
472
474
|
return [2, { response: data, formData: params }];
|
|
473
475
|
}
|
|
474
476
|
});
|
|
@@ -310,16 +310,17 @@ export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAu
|
|
|
310
310
|
});
|
|
311
311
|
}); });
|
|
312
312
|
export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
313
|
-
var settings, requestBody, data;
|
|
314
|
-
var
|
|
315
|
-
return __generator(this, function (
|
|
316
|
-
switch (
|
|
313
|
+
var _a, settings, connectExpress, requestBody, data;
|
|
314
|
+
var _b, _c;
|
|
315
|
+
return __generator(this, function (_d) {
|
|
316
|
+
switch (_d.label) {
|
|
317
317
|
case 0:
|
|
318
|
-
|
|
318
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
319
319
|
requestBody = {
|
|
320
320
|
country: settings.data.businessCountry.iso2,
|
|
321
321
|
scope: settings.data.appConfig.scope,
|
|
322
322
|
lang: settings.data.language,
|
|
323
|
+
lead_id: connectExpress.data.leadId,
|
|
323
324
|
user_credentail: {
|
|
324
325
|
identification_id: params.nid,
|
|
325
326
|
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
@@ -332,9 +333,9 @@ export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth'
|
|
|
332
333
|
};
|
|
333
334
|
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
334
335
|
case 1:
|
|
335
|
-
data =
|
|
336
|
+
data = _d.sent();
|
|
336
337
|
thunkApi.dispatch(handleNextScreenStep());
|
|
337
|
-
(
|
|
338
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
338
339
|
return [2, { response: data, formData: __assign(__assign({}, params), { type: IDENTIFICATION_TYPE.NAFATH }) }];
|
|
339
340
|
}
|
|
340
341
|
});
|
|
@@ -769,7 +770,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
769
770
|
case 6:
|
|
770
771
|
count++;
|
|
771
772
|
return [3, 1];
|
|
772
|
-
case 7: throw new Error('
|
|
773
|
+
case 7: throw new Error('paci_verification_failed');
|
|
773
774
|
}
|
|
774
775
|
});
|
|
775
776
|
}); });
|
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_DEV_URL, CONNECT_PROD_URL } from '../constants';
|
|
3
3
|
export var sleep = function (milliseconds) {
|
|
4
4
|
if (milliseconds === void 0) { milliseconds = 1000; }
|
|
5
5
|
return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
|
|
@@ -16,7 +16,7 @@ export var setBaseUrl = function (publicKey) {
|
|
|
16
16
|
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
19
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
|
|
20
20
|
};
|
|
21
21
|
export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
22
22
|
var country = countryIso2.toLowerCase();
|
|
@@ -35,7 +35,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
|
35
35
|
window.history.replaceState({}, '', newUrl);
|
|
36
36
|
};
|
|
37
37
|
export var openConnect = function (pk, countryCode) {
|
|
38
|
-
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL :
|
|
38
|
+
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
|
|
39
39
|
if (countryCode) {
|
|
40
40
|
newUrl.pathname = "/".concat(countryCode.toLowerCase());
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.87-development",
|
|
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 development"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|