@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
@@ -5,6 +5,7 @@ export declare type CheckEmailBody = {
5
5
  };
6
6
  export declare type CheckBrandBody = {
7
7
  profile_name: string;
8
+ country_code: string;
8
9
  encryption_contract: Array<string>;
9
10
  };
10
11
  export declare type CheckIBanBody = {
@@ -64,8 +64,8 @@ var InstagramIconStyled = styled(Icon, {
64
64
  })(function (_a) {
65
65
  var theme = _a.theme, isActive = _a.isActive;
66
66
  return ({
67
- width: isActive ? '100%' : theme.spacing(5.5),
68
- height: isActive ? '100%' : theme.spacing(5.5)
67
+ width: isActive ? '100%' : theme.spacing(2.5),
68
+ height: isActive ? '100%' : theme.spacing(2.5)
69
69
  });
70
70
  });
71
71
  var SocialMediaGroupComponent = function (_a) {
@@ -150,3 +150,8 @@ export declare const PASSWORD_OPERATION_TYPE: {
150
150
  SET_PASSWORD: string;
151
151
  RESET_PASSWORD: string;
152
152
  };
153
+ export declare const BUSINESS_FLOW_SUCCESS: {
154
+ name: string;
155
+ status: string;
156
+ url: string;
157
+ }[];
@@ -410,3 +410,4 @@ export var PASSWORD_OPERATION_TYPE = {
410
410
  SET_PASSWORD: 'set_password',
411
411
  RESET_PASSWORD: 'reset_password'
412
412
  };
413
+ export var BUSINESS_FLOW_SUCCESS = [{ name: 'business', status: 'completed', url: '' }];
@@ -19,7 +19,7 @@ export var ICONS_NAMES = {
19
19
  WEB_ACTIVE_ICON: ICONS_FULL_PATH + '/web-active' + ICONS_EXTENSION,
20
20
  TWITTER_ICON: ICONS_FULL_PATH + '/twitter' + ICONS_EXTENSION,
21
21
  TWITTER_ACTIVE_ICON: ICONS_FULL_PATH + '/twitter-active' + ICONS_EXTENSION,
22
- INSTAGRAM_ICON: ICONS_FULL_PATH + '/Insta' + ICONS_EXTENSION,
22
+ INSTAGRAM_ICON: ICONS_FULL_PATH + '/insta' + ICONS_EXTENSION,
23
23
  FL_ICON: ICONS_FULL_PATH + '/fl' + ICONS_EXTENSION,
24
24
  FL_ACTIVE_ICON: ICONS_FULL_PATH + '/fl_active' + ICONS_EXTENSION,
25
25
  CR_ICON: ICONS_FULL_PATH + '/cr' + ICONS_EXTENSION,
@@ -5,7 +5,7 @@ export declare const MAX_IBAN_VALUE = 34;
5
5
  export declare const FL_NUMBER_LENGTH = 8;
6
6
  export declare const CR_NUMBER_LENGTH = 10;
7
7
  export declare const SAUDI_NUMBER_LENGTH = 9;
8
- export declare const MAX_FILE_SIZE = 1000000;
8
+ export declare const MAX_FILE_SIZE = 5000000;
9
9
  export declare const VALID_FILE_FORMATS: string[];
10
10
  export declare const REGEX_FULL_NAME: RegExp;
11
11
  export declare const REGEX_WEBSITE: RegExp;
@@ -5,7 +5,7 @@ export var MAX_IBAN_VALUE = 34;
5
5
  export var FL_NUMBER_LENGTH = 8;
6
6
  export var CR_NUMBER_LENGTH = 10;
7
7
  export var SAUDI_NUMBER_LENGTH = 9;
8
- export var MAX_FILE_SIZE = 1000000;
8
+ export var MAX_FILE_SIZE = 5000000;
9
9
  export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'];
10
10
  export var REGEX_FULL_NAME = /^([a-zA-Z]{2,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,})$/g;
11
11
  export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
@@ -4,7 +4,11 @@ import { CancelToken } from 'axios';
4
4
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
5
5
  data: any;
6
6
  boardResponse: {
7
- flows: any;
7
+ flows: {
8
+ name: string;
9
+ status: string;
10
+ url: string;
11
+ }[];
8
12
  };
9
13
  token: string;
10
14
  }, string, {}>;
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
- import { BANK_STEP_NAMES } from '../../../constants';
53
+ import { BANK_STEP_NAMES, BUSINESS_FLOW_SUCCESS } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var payload, data, boardInfoData, board_id, board_info_id, info, hasBankCompleted;
56
56
  var _a;
@@ -88,7 +88,7 @@ export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (t
88
88
  thunkApi.dispatch(handleNextScreenStep('BANK_BANK_DETAILS_STEP'));
89
89
  }
90
90
  _b.label = 5;
91
- case 5: return [2, { data: data, boardResponse: { flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info }, token: token }];
91
+ case 5: return [2, { data: data, boardResponse: { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) }, token: token }];
92
92
  }
93
93
  });
94
94
  }); });
@@ -158,9 +158,9 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBankEntityInfo', fun
158
158
  }); });
159
159
  export var createBankAccount = createAsyncThunk('createBankAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
160
160
  var _a, settings, bank, iban, beneficiaryName, bank_name, fileResponse, uploadPayload, requestBody, data;
161
- var _b, _c, _d, _e, _f, _g, _h;
162
- return __generator(this, function (_j) {
163
- switch (_j.label) {
161
+ var _b, _c, _d, _e, _f, _g, _h, _j;
162
+ return __generator(this, function (_k) {
163
+ switch (_k.label) {
164
164
  case 0:
165
165
  _a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
166
166
  iban = params.iban;
@@ -176,11 +176,11 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
176
176
  if (!params.bankStatementFile) return [3, 2];
177
177
  return [4, API.entityService.uploadFileInfo(uploadPayload)];
178
178
  case 1:
179
- fileResponse = _j.sent();
180
- _j.label = 2;
179
+ fileResponse = _k.sent();
180
+ _k.label = 2;
181
181
  case 2:
182
182
  requestBody = {
183
- wallet_id: (_f = (_e = (_d = (_c = bank.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.merchant) === null || _e === void 0 ? void 0 : _e.wallet) === null || _f === void 0 ? void 0 : _f.id,
183
+ wallet_id: (_g = (_f = (_e = (_d = (_c = bank.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.business) === null || _d === void 0 ? void 0 : _d.entity) === null || _e === void 0 ? void 0 : _e.merchant) === null || _f === void 0 ? void 0 : _f.wallet) === null || _g === void 0 ? void 0 : _g.id,
184
184
  bank_account: {
185
185
  iban: iban,
186
186
  beneficiary_name: beneficiaryName,
@@ -193,10 +193,10 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
193
193
  };
194
194
  return [4, API.entityService.createBankAccount(requestBody)];
195
195
  case 3:
196
- data = (_j.sent()).data;
196
+ data = (_k.sent()).data;
197
197
  if (!data.errors) {
198
198
  thunkApi.dispatch(handleNextScreenStep());
199
- (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
199
+ (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, requestBody);
200
200
  }
201
201
  return [2, { data: data, formData: params }];
202
202
  }
@@ -213,10 +213,10 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
213
213
  iban_number: iban,
214
214
  encryption_contract: ['iban_number']
215
215
  };
216
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
216
217
  return [4, API.availabilityServices.checkIbanBank(payload, { cancelToken: cancelToken })];
217
218
  case 1:
218
219
  data = (_b.sent()).data;
219
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
220
220
  return [2, { data: data }];
221
221
  }
222
222
  });
@@ -246,7 +246,7 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', funct
246
246
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
247
247
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
248
248
  thunkApi.dispatch(handleNextScreenStep());
249
- return [2, { response: __assign(__assign({}, data), { flows: data === null || data === void 0 ? void 0 : data.info }), formData: params }];
249
+ return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info) }), formData: params }];
250
250
  }
251
251
  });
252
252
  }); });
@@ -399,6 +399,7 @@ export var bankSlice = createSlice({
399
399
  state.data.bankData.responseBody = data;
400
400
  })
401
401
  .addCase(createBankAccount.rejected, function (state, action) {
402
+ state.loading = false;
402
403
  state.error = action.error.message;
403
404
  })
404
405
  .addCase(checkIbanBank.pending, function (state) {
@@ -37,10 +37,8 @@ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk
37
37
  export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThunk<{
38
38
  data: any;
39
39
  formData: BusinessTypeFormValues;
40
+ accountData: any;
40
41
  }, BusinessTypeFormValues, {}>;
41
- export declare const createAccount: import("@reduxjs/toolkit").AsyncThunk<{
42
- data: any;
43
- }, void, {}>;
44
42
  export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
45
43
  data: any;
46
44
  formData: {