@tap-payments/auth-jsconnect 2.0.21-test → 2.0.21

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.
Files changed (46) hide show
  1. package/build/api/availabilityServices.d.ts +1 -0
  2. package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
  3. package/build/constants/app.d.ts +5 -0
  4. package/build/constants/app.js +1 -0
  5. package/build/constants/assets.js +1 -1
  6. package/build/constants/validation.d.ts +1 -1
  7. package/build/constants/validation.js +1 -1
  8. package/build/features/app/bank/bankStore.d.ts +5 -1
  9. package/build/features/app/bank/bankStore.js +13 -12
  10. package/build/features/app/business/businessStore.d.ts +1 -3
  11. package/build/features/app/business/businessStore.js +136 -106
  12. package/build/features/app/connect/connectStore.js +9 -5
  13. package/build/features/app/individual/individualStore.d.ts +5 -1
  14. package/build/features/app/individual/individualStore.js +3 -3
  15. package/build/features/app/password/passwordStore.d.ts +10 -2
  16. package/build/features/app/password/passwordStore.js +4 -4
  17. package/build/features/app/signIn/signInStore.js +2 -2
  18. package/build/features/app/tax/taxStore.js +3 -3
  19. package/build/features/bank/screens/BankDetails/BankDetails.js +6 -2
  20. package/build/features/bank/screens/BankDetails/BankStatement.js +6 -3
  21. package/build/features/bank/screens/BankDetails/validation.js +4 -2
  22. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  23. package/build/features/bank/screens/Verify/Verify.js +2 -2
  24. package/build/features/business/screens/Activities/OperationStartDate.js +6 -0
  25. package/build/features/business/screens/Activities/SalesChannels.js +8 -4
  26. package/build/features/business/screens/Customers/CustomerLocations.js +6 -3
  27. package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -3
  28. package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
  29. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  30. package/build/features/business/screens/Verify/Verify.js +2 -2
  31. package/build/features/connect/screens/Merchant/SocialMediaCopy.d.ts +9 -0
  32. package/build/features/connect/screens/Merchant/SocialMediaCopy.js +117 -0
  33. package/build/features/connect/screens/Merchant/validationCopy.d.ts +133 -0
  34. package/build/features/connect/screens/Merchant/validationCopy.js +185 -0
  35. package/build/features/connect/screens/ThankYou/ThankYou.js +0 -6
  36. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  37. package/build/features/individual/screens/Verify/Verify.js +2 -2
  38. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  39. package/build/features/password/screens/Verify/Verify.js +2 -2
  40. package/build/features/shared/Button/Button.d.ts +2 -1
  41. package/build/features/shared/Button/Button.js +2 -2
  42. package/build/features/shared/Button/SuccessButton.js +1 -1
  43. package/build/features/shared/UploadFile/UploadFile.js +2 -3
  44. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  45. package/build/features/tax/screens/Verify/Verify.js +2 -2
  46. package/package.json +1 -1
@@ -51,7 +51,7 @@ import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { hasKey } from '../../../utils';
53
53
  import { handleNextScreenStep, handleCurrentActiveScreen } from '../../../app/settings';
54
- import { TAX_STEP_NAMES } from '../../../constants';
54
+ import { BUSINESS_FLOW_SUCCESS, TAX_STEP_NAMES } from '../../../constants';
55
55
  export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
56
  var payload, data, boardData, boardInfoData, info, hasTaxCompleted;
57
57
  var _a, _b;
@@ -90,7 +90,7 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
90
90
  _c.label = 5;
91
91
  case 5: return [2, {
92
92
  data: data,
93
- boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
93
+ boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info), entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
94
94
  token: token
95
95
  }];
96
96
  }
@@ -207,7 +207,7 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
207
207
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
208
208
  thunkApi.dispatch(handleNextScreenStep());
209
209
  return [2, {
210
- response: __assign(__assign({}, data), { flows: data === null || data === void 0 ? void 0 : data.info, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
210
+ response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info), user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant }),
211
211
  formData: params
212
212
  }];
213
213
  }
@@ -23,7 +23,7 @@ import { useForm, FormProvider } from 'react-hook-form';
23
23
  import { yupResolver } from '@hookform/resolvers/yup';
24
24
  import { useLanguage } from '../../../../hooks';
25
25
  import { styled } from '@mui/material/styles';
26
- import { bankSelector, createBankAccount } from '../../../app/bank/bankStore';
26
+ import { bankSelector, clearError, createBankAccount } from '../../../app/bank/bankStore';
27
27
  import Form from '../../../../components/Form';
28
28
  import { handleCurrentActiveScreen } from '../../../../app/settings';
29
29
  import ConfirmPolicy from './ConfirmPolicy';
@@ -56,7 +56,11 @@ var BankDetails = function () {
56
56
  var onBack = function () {
57
57
  dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
58
58
  };
59
- var disabled = ibanChecking || !methods.formState.isValid;
59
+ var disabled = ibanChecking || !methods.formState.isValid || !!error;
60
+ React.useEffect(function () {
61
+ if (error)
62
+ dispatch(clearError());
63
+ }, [methods.formState.isValid, methods.watch('bankStatementFile')]);
60
64
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
61
65
  };
62
66
  export default BankDetails;
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { styled } from '@mui/material/styles';
3
- import { ScreenContainer } from '../../../../features/shared/Containers';
3
+ import { ScreenContainer } from '../../../shared/Containers';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useController, useFormContext } from 'react-hook-form';
6
- import UploadFile from '../../../../features/shared/UploadFile';
6
+ import { useAppSelector } from '../../../../hooks';
7
+ import { bankSelector } from '../../../app/bank/bankStore';
8
+ import UploadFile from '../../../shared/UploadFile';
7
9
  var FeatureStyled = styled(ScreenContainer)(function (_a) {
8
10
  var theme = _a.theme;
9
11
  return ({
@@ -15,6 +17,7 @@ var BankStatement = function () {
15
17
  var t = useTranslation().t;
16
18
  var control = useFormContext().control;
17
19
  var bankStatementFileControl = useController({ name: 'bankStatementFile', control: control });
20
+ var loading = useAppSelector(bankSelector).loading;
18
21
  var error = (_a = bankStatementFileControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
19
22
  var handleBankStatementChange = function (file) {
20
23
  bankStatementFileControl.field.onChange(file);
@@ -22,6 +25,6 @@ var BankStatement = function () {
22
25
  var handleReset = function () {
23
26
  bankStatementFileControl.field.onChange(null);
24
27
  };
25
- return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), dragTitle: t('drag_and_drop'), uploadTitle: t('title_upload_file'), onFileUploaded: handleBankStatementChange, isSubmitting: bankStatementFileControl.formState.isSubmitted, onReset: handleReset, error: error && t(error) }) }));
28
+ return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), dragTitle: t('drag_and_drop'), uploadTitle: t('title_upload_file'), onFileUploaded: handleBankStatementChange, isSubmitting: loading, onReset: handleReset, error: error && t(error) }) }));
26
29
  };
27
30
  export default BankStatement;
@@ -1,4 +1,4 @@
1
- import { REGEX_BENEFICIARY_NAME, VALID_FILE_FORMATS } from '../../../../constants';
1
+ import { REGEX_BENEFICIARY_NAME, MAX_FILE_SIZE, VALID_FILE_FORMATS } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var BankValidation = yup.object().shape({
4
4
  iban: yup
@@ -18,7 +18,9 @@ export var BankValidation = yup.object().shape({
18
18
  .test({
19
19
  test: function (value) {
20
20
  if (!!value)
21
- return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) ? true : this.createError({ message: 'alert_file_upload' });
21
+ return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE
22
+ ? true
23
+ : this.createError({ message: 'alert_file_upload' });
22
24
  return true;
23
25
  }
24
26
  })
@@ -67,7 +67,7 @@ var SuccessWithFlowButtons = function () {
67
67
  if (flows === void 0) { flows = []; }
68
68
  var images = ICONS_NAMES;
69
69
  var mappedFlows = flows
70
- .filter(function (item) { return item.name; })
70
+ .filter(function (item) { return item === null || item === void 0 ? void 0 : item.name; })
71
71
  .map(function (_a) {
72
72
  var name = _a.name, url = _a.url, status = _a.status;
73
73
  var type = status === 'completed' ? 'completed' : 'pending';
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -5,13 +5,19 @@ import { useController, useFormContext } from 'react-hook-form';
5
5
  import DatePicker from '../../../../components/DatePicker';
6
6
  import { ScreenContainer } from '../../../shared/Containers';
7
7
  import { MandatoryStyled } from './SalesChannels';
8
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
9
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
8
10
  var OperationStartDate = function (_a) {
9
11
  var _b;
10
12
  var onDateClicked = _a.onDateClicked;
11
13
  var t = useTranslation().t;
14
+ var dispatch = useAppDispatch();
12
15
  var control = useFormContext().control;
16
+ var error = useAppSelector(businessSelector).error;
13
17
  var oDateControl = useController({ control: control, name: 'operationStartDate' });
14
18
  var handleOperationStartDateChange = function (data) {
19
+ if (error)
20
+ dispatch(clearError());
15
21
  oDateControl.field.onChange(data);
16
22
  };
17
23
  var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
@@ -24,9 +24,9 @@ import Box from '@mui/material/Box';
24
24
  import { alpha, styled } from '@mui/material/styles';
25
25
  import { useTranslation } from 'react-i18next';
26
26
  import { useController, useFormContext } from 'react-hook-form';
27
- import { useLanguage, useAppSelector } from '../../../../hooks';
27
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
28
28
  import Text from '../../../../components/Text';
29
- import { businessSelector } from '../../../app/business/businessStore';
29
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
30
30
  import CheckBox from '../../../../components/CheckBox';
31
31
  import Warning from '../../../../components/Warning';
32
32
  import Collapse from '../../../../components/Collapse';
@@ -79,11 +79,13 @@ var SalesChannels = function () {
79
79
  var t = useTranslation().t;
80
80
  var isAr = useLanguage().isAr;
81
81
  var control = useFormContext().control;
82
+ var dispatch = useAppDispatch();
82
83
  var channelsControl = useController({ name: 'salesChannels', control: control });
83
84
  var channelsChecked = channelsControl.field.value;
84
85
  var warningMessage = (_a = channelsControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
85
- var data = useAppSelector(businessSelector).data;
86
+ var _c = useAppSelector(businessSelector), data = _c.data, error = _c.error;
86
87
  var channelList = (data.businessTypeData.responseBody || {}).channelList;
88
+ var salesChannels = (data.activitiesData || {}).salesChannels;
87
89
  React.useEffect(function () {
88
90
  if ((channelList === null || channelList === void 0 ? void 0 : channelList.length) > 0) {
89
91
  setChannelsMenuList(channelList);
@@ -98,11 +100,13 @@ var SalesChannels = function () {
98
100
  return;
99
101
  }
100
102
  channelsControl.field.onChange(__spreadArray(__spreadArray([], channelsChecked, true), [selected], false));
103
+ if (error)
104
+ dispatch(clearError());
101
105
  };
102
106
  var getSelectedChannelsFlag = function (item) {
103
107
  if (channelsChecked)
104
108
  return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
105
109
  };
106
- return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name_ar : channel.name_en, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
110
+ return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, disabled: (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.find(function (c) { return c.id === (channel === null || channel === void 0 ? void 0 : channel.id); })) ? true : false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name_ar : channel.name_en, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
107
111
  };
108
112
  export default SalesChannels;
@@ -33,8 +33,8 @@ import ExpandIcon from '../../../../components/ExpandIcon';
33
33
  import Input from '../../../../components/Input';
34
34
  import SimpleList from '../../../../components/SimpleList';
35
35
  import { ScreenContainer } from '../../../shared/Containers';
36
- import { useLanguage, useAppSelector } from '../../../../hooks';
37
- import { businessSelector } from '../../../app/business/businessStore';
36
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
37
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
38
38
  export var InputLabelStyled = styled(Text)(function (_a) {
39
39
  var theme = _a.theme;
40
40
  return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
@@ -78,8 +78,9 @@ var customerLocations = function (_a) {
78
78
  var t = useTranslation().t;
79
79
  var isAr = useLanguage().isAr;
80
80
  var control = useFormContext().control;
81
+ var dispatch = useAppDispatch();
81
82
  var customerLocationsControl = useController({ name: 'customerLocations', control: control });
82
- var data = useAppSelector(businessSelector).data;
83
+ var _d = useAppSelector(businessSelector), data = _d.data, error = _d.error;
83
84
  var activitiesData = data.activitiesData;
84
85
  var response = activitiesData.responseBody;
85
86
  var onOpenList = function (event) {
@@ -106,6 +107,8 @@ var customerLocations = function (_a) {
106
107
  var onSelectItem = function (customerLocations) {
107
108
  onCloseList();
108
109
  var remaining = customerLocationsList.filter(function (location) { return location.id <= customerLocations.id; });
110
+ if (error)
111
+ dispatch(clearError());
109
112
  customerLocationsControl.field.onChange(remaining);
110
113
  };
111
114
  var customerLocationsValue = customerLocationsControl.field.value;
@@ -26,13 +26,13 @@ import Box from '@mui/material/Box';
26
26
  import { styled } from '@mui/material/styles';
27
27
  import { useTranslation } from 'react-i18next';
28
28
  import { useController, useFormContext } from 'react-hook-form';
29
- import { useLanguage, useAppSelector } from '../../../../hooks';
29
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
30
30
  import SimpleList from '../../../../components/SimpleList';
31
31
  import Collapse from '../../../../components/Collapse';
32
32
  import ExpandIcon from '../../../../components/ExpandIcon';
33
33
  import { ScreenContainer } from '../../../shared/Containers';
34
34
  import { CheckIconStyled, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
35
- import { businessSelector } from '../../../app/business/businessStore';
35
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
36
36
  var ListItemContainer = styled(Box)(function (_a) {
37
37
  var theme = _a.theme;
38
38
  return ({
@@ -49,9 +49,10 @@ var ExpectedCustomers = function (_a) {
49
49
  var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
50
50
  var t = useTranslation().t;
51
51
  var isAr = useLanguage().isAr;
52
+ var dispatch = useAppDispatch();
52
53
  var control = useFormContext().control;
53
54
  var expectedCustomerControl = useController({ name: 'expectedCustomer', control: control });
54
- var data = useAppSelector(businessSelector).data;
55
+ var _d = useAppSelector(businessSelector), data = _d.data, error = _d.error;
55
56
  var activitiesData = data.activitiesData;
56
57
  var response = activitiesData.responseBody;
57
58
  var onOpenList = function (event) {
@@ -72,6 +73,8 @@ var ExpectedCustomers = function (_a) {
72
73
  }, [response === null || response === void 0 ? void 0 : response.expectedCustomerSales]);
73
74
  var onSelectItem = function (expectedCustomers) {
74
75
  expectedCustomerControl.field.onChange(expectedCustomers);
76
+ if (error)
77
+ dispatch(clearError());
75
78
  onCloseList();
76
79
  };
77
80
  var expectedCustomersValue = expectedCustomerControl.field.value;
@@ -15,11 +15,11 @@ import Box from '@mui/material/Box';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { useTranslation } from 'react-i18next';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
- import { useLanguage, useAppSelector } from '../../../../hooks';
18
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
19
19
  import SimpleList from '../../../../components/SimpleList';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import ExpandIcon from '../../../../components/ExpandIcon';
22
- import { businessSelector } from '../../../../features/app/business/businessStore';
22
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
23
23
  import { isExist } from '../../../../utils';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
25
25
  import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
@@ -51,8 +51,9 @@ var ExpectedSalesRange = function (_a) {
51
51
  var t = useTranslation().t;
52
52
  var isAr = useLanguage().isAr;
53
53
  var control = useFormContext().control;
54
+ var dispatch = useAppDispatch();
54
55
  var expectedSaleControl = useController({ name: 'expectedSale', control: control });
55
- var data = useAppSelector(businessSelector).data;
56
+ var _e = useAppSelector(businessSelector), data = _e.data, error = _e.error;
56
57
  var activitiesData = data.activitiesData;
57
58
  var expectedSales = (activitiesData.responseBody || {}).expectedSales;
58
59
  var expectedSalesRangeValue = expectedSaleControl.field.value;
@@ -81,6 +82,8 @@ var ExpectedSalesRange = function (_a) {
81
82
  }, [expectedSales]);
82
83
  var onSelectItem = function (expectedSalesRange) {
83
84
  handleCloseMainMenu();
85
+ if (error)
86
+ dispatch(clearError());
84
87
  expectedSaleControl.field.onChange(expectedSalesRange);
85
88
  };
86
89
  React.useEffect(function () {
@@ -67,7 +67,7 @@ var SuccessWithFlowButtons = function () {
67
67
  if (flows === void 0) { flows = []; }
68
68
  var images = ICONS_NAMES;
69
69
  var mappedFlows = flows
70
- .filter(function (item) { return item.name; })
70
+ .filter(function (item) { return item === null || item === void 0 ? void 0 : item.name; })
71
71
  .map(function (_a) {
72
72
  var name = _a.name, url = _a.url, status = _a.status;
73
73
  var type = status === 'completed' ? 'completed' : 'pending';
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error && methods.formState.isValid)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { Theme, SxProps } from '@mui/material/styles';
3
+ interface SocialMediaProps {
4
+ show: boolean;
5
+ sx?: SxProps<Theme>;
6
+ isNewUser: boolean;
7
+ }
8
+ declare const _default: React.MemoExoticComponent<({ show, sx, isNewUser }: SocialMediaProps) => JSX.Element>;
9
+ export default _default;
@@ -0,0 +1,117 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import { styled, alpha } from '@mui/material/styles';
17
+ import ClearIcon from '@mui/icons-material/Clear';
18
+ import { SocialMediaTypes } from '../../../../@types';
19
+ import Input from '../../../../components/Input';
20
+ import Text from '../../../../components/Text';
21
+ import Collapse from '../../../../components/Collapse';
22
+ import SocialMediaGroup from '../../../../components/SocialMediaGroup';
23
+ import { ScreenContainer } from '../../../shared/Containers';
24
+ import CheckIcon from '../../../shared/CheckIcon';
25
+ import { useAppSelector } from '../../../../hooks';
26
+ import { connectSelector } from '../../../app/connect/connectStore';
27
+ var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
28
+ var theme = _a.theme, defaultValue = _a.defaultValue;
29
+ return ({
30
+ borderTop: "1px solid ".concat(alpha(theme.palette.divider, 0.8)),
31
+ borderBottom: !defaultValue ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : ''
32
+ });
33
+ });
34
+ var InputStyled = styled(Input)(function (_a) {
35
+ var theme = _a.theme;
36
+ return ({
37
+ padding: theme.spacing(0, 2, 0, 0),
38
+ paddingInlineEnd: theme.spacing(2),
39
+ input: {
40
+ paddingInlineStart: theme.spacing(0),
41
+ textTransform: 'lowercase'
42
+ }
43
+ });
44
+ });
45
+ var TextStyled = styled(Text)(function (_a) {
46
+ var theme = _a.theme;
47
+ return ({
48
+ padding: theme.spacing(0, 0, 0, 1.5)
49
+ });
50
+ });
51
+ var ClearIconStyled = styled(ClearIcon)(function (_a) {
52
+ var theme = _a.theme;
53
+ return ({
54
+ width: theme.spacing(2),
55
+ height: theme.spacing(2),
56
+ cursor: 'pointer',
57
+ color: alpha(theme.palette.text.primary, 0.4)
58
+ });
59
+ });
60
+ var SocialMedia = function (_a) {
61
+ var _b, _c, _d, _e;
62
+ var show = _a.show, sx = _a.sx, isNewUser = _a.isNewUser;
63
+ var _f = React.useState(SocialMediaTypes.WEB), socialMediaType = _f[0], setSocialMediaType = _f[1];
64
+ var t = useTranslation().t;
65
+ var _g = useFormContext(), control = _g.control, setValue = _g.setValue, watch = _g.watch;
66
+ var linksControl = useController({ control: control, name: 'links' });
67
+ var links = linksControl.field.value;
68
+ var brandName = watch('brandName');
69
+ var data = useAppSelector(connectSelector).data;
70
+ var brandList = ((_b = data.brandData.responseBody) === null || _b === void 0 ? void 0 : _b.brands) || [];
71
+ var handleChange = function (_a) {
72
+ var _b;
73
+ var target = _a.target;
74
+ linksControl.field.onChange(__assign(__assign({}, links), (_b = {}, _b[socialMediaType] = target.value, _b)));
75
+ };
76
+ var handleClear = function () {
77
+ var _a;
78
+ linksControl.field.onChange(__assign(__assign({}, links), (_a = {}, _a[socialMediaType] = '', _a)));
79
+ };
80
+ var handleBlueWebsite = function () {
81
+ if (!!links.website) {
82
+ var website = links.website;
83
+ var isWebHasPrefix = !!website.includes('www.');
84
+ var isWebHasSuffix = !!website.includes('.com');
85
+ if (!isWebHasPrefix)
86
+ website = "www.".concat(website);
87
+ if (!isWebHasSuffix)
88
+ website = "".concat(website, ".com");
89
+ setValue('links', __assign(__assign({}, links), { website: website }), { shouldValidate: true });
90
+ }
91
+ };
92
+ React.useEffect(function () {
93
+ if (!!brandName) {
94
+ var website = "www.".concat(brandName.replaceAll(' ', '-'), ".com");
95
+ setValue('links', __assign(__assign({}, links), { website: website }), { shouldValidate: true });
96
+ }
97
+ if (!brandName && isNewUser === false && (brandList === null || brandList === void 0 ? void 0 : brandList.length) > 0) {
98
+ var website = "other.com";
99
+ setValue('links', __assign(__assign({}, links), { website: website }), { shouldValidate: true });
100
+ }
101
+ if (!brandName && isNewUser === true) {
102
+ var website = '';
103
+ setValue('links', __assign(__assign({}, links), { website: website }));
104
+ }
105
+ }, [brandName]);
106
+ var websiteValue = links.website || '';
107
+ var twitterValue = links.twitter || '';
108
+ var instagramValue = links.instagram || '';
109
+ var errors = linksControl.fieldState.error;
110
+ var websiteError = (_c = errors === null || errors === void 0 ? void 0 : errors.website) === null || _c === void 0 ? void 0 : _c.message;
111
+ var twitterError = (_d = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _d === void 0 ? void 0 : _d.message;
112
+ var instagramError = (_e = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _e === void 0 ? void 0 : _e.message;
113
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: __assign({ mt: 3, mb: 3, direction: 'ltr' }, sx) }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
114
+ setSocialMediaType(value);
115
+ } }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, onBlur: function () { return handleBlueWebsite(); }, startAdornment: _jsx(TextStyled, { children: "https://" }), placeholder: t('signup_website_placeholder'), warningType: 'alert', warningMessage: websiteError && t(websiteError), endAdornment: !websiteError && websiteValue ? _jsx(CheckIcon, {}) : websiteValue && _jsx(ClearIconStyled, { onClick: handleClear }) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, { children: "@" }), placeholder: t('signup_twitter_placeholder'), warningType: 'alert', warningMessage: twitterError && t(twitterError), endAdornment: !twitterError && twitterValue ? _jsx(CheckIcon, {}) : twitterValue && _jsx(ClearIconStyled, { onClick: handleClear }) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, { children: "@" }), placeholder: t('signup_instagram_placeholder'), warningType: 'alert', warningMessage: instagramError && t(instagramError), endAdornment: !instagramError && instagramValue ? (_jsx(CheckIcon, {})) : (instagramValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) }))] })) })));
116
+ };
117
+ export default React.memo(SocialMedia);
@@ -0,0 +1,133 @@
1
+ import * as yup from 'yup';
2
+ export declare enum ValidationOptions {
3
+ NEW_USER = "NEW_USER",
4
+ EXISTING_USER_WITH_EXIST_BRAND = "EXISTING_USER_WITH_EXIST_BRAND",
5
+ EXISTING_USER_WITH_OTHER_BRAND = "EXISTING_USER_WITH_OTHER_BRAND"
6
+ }
7
+ export declare const MerchantValidationSchema: (userType: ValidationOptions) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
8
+ brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
9
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
10
+ salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
11
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
12
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
13
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
14
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
15
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
16
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
17
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
19
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
20
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
21
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
+ }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
23
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
24
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
+ }>>[] | undefined>;
27
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
28
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
30
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
31
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
32
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
33
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
34
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
35
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
36
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
37
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
38
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
39
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
40
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
41
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
42
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
43
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
44
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
45
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
46
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
47
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
48
+ }>>>;
49
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
50
+ brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
51
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
52
+ salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
53
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
54
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
55
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
56
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
57
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
59
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
61
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
62
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
63
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
+ }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
65
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
66
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
67
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
68
+ }>>[] | undefined>;
69
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
70
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
71
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
72
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
73
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
74
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
75
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
76
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
77
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
78
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
79
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
80
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
81
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
82
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
83
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
84
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
85
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
86
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
87
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
88
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
89
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
90
+ }>>>;
91
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
92
+ brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
93
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
94
+ salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
95
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
97
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
98
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
99
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
101
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
102
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
103
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
105
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
106
+ }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
107
+ id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
108
+ name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
109
+ name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
110
+ }>>[] | undefined>;
111
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
112
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
113
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
114
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
115
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
116
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
117
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
118
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
119
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
120
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
121
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
122
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
123
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
124
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
125
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
126
+ website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
127
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
128
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
129
+ app: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
130
+ call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
131
+ physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
132
+ }>>>;
133
+ }>>>;