@tap-payments/auth-jsconnect 2.12.0 → 2.12.1-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.
@@ -393,7 +393,6 @@
393
393
  "kyc_token_invalid": "May you please verify link of which you are trying to open.",
394
394
  "kyc_users_description": "Please select an authorized registered ID to approve with {{provider}}",
395
395
  "kyc_verification": "Know Your Customer (KYC)",
396
- "kyc_privacy_policy": "Privacy Policy",
397
396
  "language": "العربية",
398
397
  "license_info": "License information",
399
398
  "license_name_hint": "Enter legal name",
@@ -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)), zIndex: 2147483647 }),
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) {
@@ -14,7 +14,6 @@ export declare const ENDPOINT_PATHS: {
14
14
  PRODUCTION_BASE_URL_SA: string;
15
15
  PRODUCTION_BASE_URL_SA_DR: string;
16
16
  DEV_BASE_URL: string;
17
- BETA_BASE_URL: string;
18
17
  BUSINESS_COUNTRIES: string;
19
18
  COUNTRIES: string;
20
19
  IP: string;
@@ -3,7 +3,6 @@ var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
3
3
  var PRODUCTION_BASE_URL_SA = 'https://connect-mw.tap.com.sa/middleware';
4
4
  var PRODUCTION_BASE_URL_SA_DR = 'https://connect-mw.tap.com.sa/middleware';
5
5
  var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
6
- var BETA_BASE_URL = 'https://connect-mw.beta.tap.company/middleware';
7
6
  var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
8
7
  var API_COUNTRIES = 'https://utilities.tap.company/api/v1/country/list';
9
8
  var CURRENCY_PATH = 'https://utilities.tap.company/api/v1/currency/iso';
@@ -74,7 +73,6 @@ export var ENDPOINT_PATHS = {
74
73
  PRODUCTION_BASE_URL_SA: PRODUCTION_BASE_URL_SA,
75
74
  PRODUCTION_BASE_URL_SA_DR: PRODUCTION_BASE_URL_SA_DR,
76
75
  DEV_BASE_URL: DEV_BASE_URL,
77
- BETA_BASE_URL: BETA_BASE_URL,
78
76
  BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
79
77
  COUNTRIES: API_COUNTRIES,
80
78
  IP: IP_PATH,
@@ -1,7 +1,5 @@
1
1
  import { ScreenStepNavigation, BusinessType, POSInfo, TerminalInfo } 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";
5
3
  export declare const CONNECT_PROD_URL = "https://connect.tap.company";
6
4
  export declare const CLIENT_ORIGIN: string;
7
5
  export declare const TAP_WEBSITE = "https://www.tap.company/";
@@ -1,8 +1,6 @@
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';
6
4
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
7
5
  export var CLIENT_ORIGIN = window.location.origin;
8
6
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -1274,7 +1274,6 @@ export var individualSlice = createSlice({
1274
1274
  state.data.individualData.isAuthorized = is_authorized;
1275
1275
  })
1276
1276
  .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1277
- state.addOrRequestDetailLoading = false;
1278
1277
  state.error = action.error.message;
1279
1278
  })
1280
1279
  .addCase(getIndividualList.pending, function (state) {
@@ -27,7 +27,7 @@ export declare const verifyTokenOTP: import("@reduxjs/toolkit").AsyncThunk<{
27
27
  export declare const verifyTokenSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
28
28
  data: any;
29
29
  nextScreen: string;
30
- }, void, {}>;
30
+ }, boolean, {}>;
31
31
  export declare const verifyTokenOTPSessionExpired: import("@reduxjs/toolkit").AsyncThunk<{
32
32
  data: any;
33
33
  formData: OTPFormValues;
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  var _a;
49
49
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
- import { handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
50
+ import { handleCurrentActiveScreen, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { CONNECT_FLOWS, NAFATH_PACI_TIMEOUT_DURATION, SELECTED_POS_DEFAULT_INFO, SELECTED_TERMINAL_DEFAULT_INFO, TERMINAL_PUSH_NOTIFICATION_DURATION, TERMINAL_PUSH_NOTIFICATION_FAILED, TERMINAL_STEP_NAMES } from '../../../constants';
53
53
  import API, { setAuthSessionToGlobalHeaders } from '../../../api';
@@ -171,7 +171,7 @@ export var verifyTokenOTP = createAsyncThunk('terminal/verifyOtp', function (par
171
171
  }
172
172
  });
173
173
  }); });
174
- export var verifyTokenSessionExpired = createAsyncThunk('terminal/verifyTokenSessionExpired', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
174
+ export var verifyTokenSessionExpired = createAsyncThunk('terminal/verifyTokenSessionExpired', function (redirect, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
175
175
  var terminal, payload, data;
176
176
  return __generator(this, function (_a) {
177
177
  switch (_a.label) {
@@ -185,6 +185,8 @@ export var verifyTokenSessionExpired = createAsyncThunk('terminal/verifyTokenSes
185
185
  case 1:
186
186
  data = _a.sent();
187
187
  setAuthSessionToGlobalHeaders(data === null || data === void 0 ? void 0 : data.auth_session);
188
+ if (redirect)
189
+ thunkApi.dispatch(handleCurrentActiveScreen(CONNECT_FLOWS.terminal.otpSessionExpired));
188
190
  return [2, {
189
191
  data: data,
190
192
  nextScreen: CONNECT_FLOWS.terminal.otpSessionExpired
@@ -600,7 +602,7 @@ export var terminalSlice = createSlice({
600
602
  state.error = null;
601
603
  state.loading = false;
602
604
  var data = (action.payload || {}).data;
603
- state.data.responseData = { authData: data };
605
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: data });
604
606
  })
605
607
  .addCase(verifyTokenSessionExpired.rejected, function (state, action) {
606
608
  state.error = action.error.message;
@@ -615,7 +617,7 @@ export var terminalSlice = createSlice({
615
617
  state.error = null;
616
618
  var _a = action.payload, data = _a.data, formData = _a.formData;
617
619
  state.data.otpData = formData;
618
- state.data.responseData = { authData: data };
620
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { authData: data });
619
621
  })
620
622
  .addCase(verifyTokenOTPSessionExpired.rejected, function (state, _a) {
621
623
  var message = _a.error.message;
@@ -43,7 +43,7 @@ var OTPInput = function (_a) {
43
43
  var handleOnResendOTP = function () {
44
44
  if (otpControl.field.value)
45
45
  setValue('otp', '', { shouldValidate: true });
46
- dispatch(verifyTokenSessionExpired());
46
+ dispatch(verifyTokenSessionExpired(false));
47
47
  };
48
48
  var otpValue = otpControl.field.value;
49
49
  return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, hasError: isTokenExpired(error), onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
3
3
  import { objectHasValues } from './object';
4
4
  import { isDisasterRecoveryEnv, isSA } from './string';
5
5
  export var sleep = function (milliseconds) {
@@ -17,7 +17,7 @@ export var setBaseUrl = function (publicKey, region) {
17
17
  var isProd = publicKey.includes('pk_live');
18
18
  var _a = region.split('-'), country = _a[0], envType = _a[1];
19
19
  if (!isProd) {
20
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
20
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
21
21
  return;
22
22
  }
23
23
  if (isSA(country)) {
@@ -44,7 +44,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
44
44
  window.history.replaceState({}, '', newUrl);
45
45
  };
46
46
  export var openConnect = function (pk, countryCode) {
47
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
47
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
48
48
  if (countryCode) {
49
49
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
50
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.12.0",
3
+ "version": "2.12.1-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"
24
+ "push": "npm publish --access public --tag development"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {