@tap-payments/auth-jsconnect 2.0.54 → 2.0.55

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 (130) hide show
  1. package/build/@types/app.d.ts +38 -0
  2. package/build/@types/app.js +5 -0
  3. package/build/@types/form.d.ts +2 -1
  4. package/build/api/entity.d.ts +1 -0
  5. package/build/api/entity.js +8 -1
  6. package/build/api/index.d.ts +6 -1
  7. package/build/api/index.js +3 -1
  8. package/build/api/init.d.ts +16 -0
  9. package/build/api/init.js +13 -0
  10. package/build/api/lead.d.ts +4 -1
  11. package/build/app/settings.d.ts +4 -8
  12. package/build/app/settings.js +28 -19
  13. package/build/assets/locales/ar.json +5 -1
  14. package/build/assets/locales/en.json +5 -1
  15. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
  16. package/build/components/AnimationFlow/AnimationFlow.js +4 -4
  17. package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
  18. package/build/components/AnimationFlow/BottomSheet.js +23 -20
  19. package/build/components/AnimationFlow/Dialog.d.ts +4 -2
  20. package/build/components/AnimationFlow/Dialog.js +30 -7
  21. package/build/components/DatePicker/DatePicker.d.ts +2 -1
  22. package/build/components/DatePicker/DatePicker.js +9 -8
  23. package/build/components/LogoBadge/LogoBadge.js +3 -0
  24. package/build/components/SimpleList/SimpleList.d.ts +3 -1
  25. package/build/components/SimpleList/SimpleList.js +19 -2
  26. package/build/components/Slide/Slide.d.ts +1 -1
  27. package/build/constants/api.d.ts +2 -0
  28. package/build/constants/api.js +5 -1
  29. package/build/constants/app.d.ts +11 -0
  30. package/build/constants/app.js +33 -32
  31. package/build/constants/assets.d.ts +4 -0
  32. package/build/constants/assets.js +4 -0
  33. package/build/features/app/bank/bankStore.d.ts +3 -0
  34. package/build/features/app/bank/bankStore.js +33 -4
  35. package/build/features/app/brand/brandStore.d.ts +3 -2
  36. package/build/features/app/brand/brandStore.js +45 -24
  37. package/build/features/app/business/businessStore.d.ts +8 -0
  38. package/build/features/app/business/businessStore.js +166 -157
  39. package/build/features/app/connect/connectStore.js +2 -2
  40. package/build/features/app/connectExpress/connectExpressStore.js +4 -4
  41. package/build/features/app/entity/entityStore.d.ts +3 -0
  42. package/build/features/app/entity/entityStore.js +32 -3
  43. package/build/features/app/individual/individualStore.d.ts +5 -0
  44. package/build/features/app/individual/individualStore.js +76 -41
  45. package/build/features/app/tax/taxStore.d.ts +3 -0
  46. package/build/features/app/tax/taxStore.js +33 -4
  47. package/build/features/bank/Bank.js +3 -4
  48. package/build/features/bank/screens/BankDetails/BankDetails.js +9 -5
  49. package/build/features/bank/screens/Verify/Verify.js +1 -5
  50. package/build/features/brand/Brand.js +3 -4
  51. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -8
  52. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -5
  53. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +8 -8
  54. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +1 -1
  55. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
  56. package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
  57. package/build/features/brand/screens/BrandInfo/BrandInfo.js +16 -10
  58. package/build/features/brand/screens/Verify/Verify.js +7 -20
  59. package/build/features/business/Business.js +3 -4
  60. package/build/features/business/screens/Activities/ActivitiesList.d.ts +8 -8
  61. package/build/features/business/screens/Activities/ActivitiesList.js +6 -1
  62. package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
  63. package/build/features/business/screens/BusinessType/BusinessType.js +32 -8
  64. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
  65. package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
  66. package/build/features/business/screens/BusinessType/EntityName.js +6 -6
  67. package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
  68. package/build/features/business/screens/BusinessType/LicenseList.js +4 -16
  69. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
  70. package/build/features/business/screens/BusinessType/LicenseNumber.js +4 -2
  71. package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
  72. package/build/features/business/screens/Customers/CustomerLocations.d.ts +8 -8
  73. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
  74. package/build/features/business/screens/IDBOD/DOB.js +1 -1
  75. package/build/features/connect/Connect.js +3 -4
  76. package/build/features/connect/screens/Individual/Email.js +10 -18
  77. package/build/features/connect/screens/Individual/MobileNumber.js +10 -6
  78. package/build/features/connect/screens/NID/DOB.js +1 -1
  79. package/build/features/connectExpress/ConnectExpress.js +3 -4
  80. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +1 -5
  81. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
  82. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
  83. package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -2
  84. package/build/features/connectExpress/screens/NID/DOB.js +1 -1
  85. package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
  86. package/build/features/connectExpress/screens/NIDMissed/DOB.js +1 -1
  87. package/build/features/entity/Entity.js +3 -4
  88. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +8 -8
  89. package/build/features/entity/screens/EntityCapital/ActivityList.js +6 -4
  90. package/build/features/entity/screens/EntityName/EntityName.js +11 -4
  91. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -8
  92. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
  93. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
  94. package/build/features/entity/screens/Verify/Verify.js +7 -20
  95. package/build/features/individual/Individual.js +3 -4
  96. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
  97. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
  98. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
  99. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -6
  100. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
  101. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
  102. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
  103. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +17 -9
  104. package/build/features/individual/screens/Verify/Verify.js +1 -5
  105. package/build/features/password/Password.js +3 -4
  106. package/build/features/shared/Address/CountryList.d.ts +7 -7
  107. package/build/features/shared/Address/InputSelect.d.ts +7 -7
  108. package/build/features/shared/Button/FlowsButtons.js +6 -0
  109. package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
  110. package/build/features/shared/Containers/FeatureContainer.js +5 -4
  111. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  112. package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
  113. package/build/features/shared/Footer/PoweredByFooter.js +36 -0
  114. package/build/features/shared/Footer/index.d.ts +3 -2
  115. package/build/features/shared/Footer/index.js +3 -2
  116. package/build/features/shared/Input/Input.d.ts +3 -3
  117. package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
  118. package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
  119. package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
  120. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
  121. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
  122. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
  123. package/build/features/signIn/SignIn.js +3 -4
  124. package/build/features/tax/Tax.js +3 -4
  125. package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
  126. package/build/features/tax/screens/Verify/Verify.js +6 -22
  127. package/build/hooks/useAppConfig.js +5 -2
  128. package/build/utils/string.d.ts +2 -1
  129. package/build/utils/string.js +5 -0
  130. package/package.json +1 -1
@@ -60,13 +60,13 @@ var _a;
60
60
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
61
61
  import API from '../../../api';
62
62
  import { FlowsTypes } from '../../../@types';
63
- import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
63
+ import { handleNextScreenStep, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
64
64
  import { BRAND_STEP_NAMES } from '../../../constants';
65
65
  import { hasNoneEditableValue, isKW, isTwitter, isWebsite, mapSalesChannel, sleep } from '../../../utils';
66
66
  export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (_a, thunkApi) {
67
67
  var token = _a.token, isInternally = _a.isInternally;
68
68
  return __awaiter(void 0, void 0, void 0, function () {
69
- var payload, data, countryIso2, board_id, segmentsList, salesChannels, teamSizeList, boardInfoData, boardData;
69
+ var payload, data, countryIso2, board_id, segmentsList, salesChannels, teamSizeList, boardData;
70
70
  var _b, _c, _d;
71
71
  return __generator(this, function (_e) {
72
72
  switch (_e.label) {
@@ -91,12 +91,9 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
91
91
  boardData = undefined;
92
92
  if (isInternally)
93
93
  data.step_name = BRAND_STEP_NAMES.BRAND_INFO;
94
- if (!(data.step_name !== BRAND_STEP_NAMES.PHONE_AUTH || isInternally)) return [3, 7];
95
- return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
96
- case 2:
97
- boardInfoData = _e.sent();
94
+ if (!(data.step_name !== BRAND_STEP_NAMES.PHONE_AUTH || isInternally)) return [3, 6];
98
95
  return [4, API.boardService.retrieveBoardDetails(board_id)];
99
- case 3:
96
+ case 2:
100
97
  boardData = _e.sent();
101
98
  if (!countryIso2) {
102
99
  countryIso2 = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.country;
@@ -104,17 +101,17 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
104
101
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
105
102
  }
106
103
  return [4, API.dataService.getSegments({ page: 0 })];
107
- case 4:
104
+ case 3:
108
105
  segmentsList = _e.sent();
109
106
  return [4, API.dataService.getChannelsOfServices({ page: 0 })];
110
- case 5:
107
+ case 4:
111
108
  salesChannels = _e.sent();
112
109
  return [4, API.dataService.getTeamSize({ page: 0 })];
113
- case 6:
110
+ case 5:
114
111
  teamSizeList = _e.sent();
115
112
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('BRAND_INFO_STEP')); });
116
- _e.label = 7;
117
- case 7: return [2, {
113
+ _e.label = 6;
114
+ case 6: return [2, {
118
115
  data: data,
119
116
  boardResponse: {
120
117
  user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
@@ -125,8 +122,7 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
125
122
  name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
126
123
  contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
127
124
  individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
128
- business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
129
- flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
125
+ business: boardData === null || boardData === void 0 ? void 0 : boardData.business
130
126
  },
131
127
  salesChannels: salesChannels,
132
128
  segmentsList: segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.list,
@@ -155,7 +151,7 @@ export var resendOTP = createAsyncThunk('brandResendOTP', function (params, thun
155
151
  });
156
152
  }); });
157
153
  export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
158
- var _a, brand, settings, responseBody, payload, data, board_id, boardInfoData, boardData, segmentsList, salesChannels, teamSizeList;
154
+ var _a, brand, settings, responseBody, payload, data, board_id, boardData, segmentsList, salesChannels, teamSizeList;
159
155
  var _b, _c, _d, _e, _f, _g;
160
156
  return __generator(this, function (_h) {
161
157
  switch (_h.label) {
@@ -178,21 +174,18 @@ export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function
178
174
  if (!board_id) {
179
175
  throw new Error('Internal server error');
180
176
  }
181
- return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
182
- case 2:
183
- boardInfoData = _h.sent();
184
177
  return [4, API.boardService.retrieveBoardDetails(board_id)];
185
- case 3:
178
+ case 2:
186
179
  boardData = _h.sent();
187
180
  (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
188
181
  return [4, API.dataService.getSegments({ page: 0 })];
189
- case 4:
182
+ case 3:
190
183
  segmentsList = _h.sent();
191
184
  return [4, API.dataService.getChannelsOfServices({ page: 0 })];
192
- case 5:
185
+ case 4:
193
186
  salesChannels = _h.sent();
194
187
  return [4, API.dataService.getTeamSize({ page: 0 })];
195
- case 6:
188
+ case 5:
196
189
  teamSizeList = _h.sent();
197
190
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('BRAND_INFO_STEP')); });
198
191
  return [2, {
@@ -206,8 +199,7 @@ export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function
206
199
  name: (_f = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _f === void 0 ? void 0 : _f.names,
207
200
  contact: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.contact,
208
201
  individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
209
- business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
210
- flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
202
+ business: boardData === null || boardData === void 0 ? void 0 : boardData.business
211
203
  },
212
204
  salesChannels: salesChannels,
213
205
  segmentsList: segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.list,
@@ -217,6 +209,21 @@ export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function
217
209
  }
218
210
  });
219
211
  }); });
212
+ export var retrieveBoardStatus = createAsyncThunk('brand/retrieveBoardStatus', function (parmas, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
213
+ var brand, board_id, data;
214
+ return __generator(this, function (_a) {
215
+ switch (_a.label) {
216
+ case 0:
217
+ brand = thunkApi.getState().brand;
218
+ board_id = (brand.data.verify.responseBody || {}).board_id;
219
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
220
+ case 1:
221
+ data = _a.sent();
222
+ thunkApi.dispatch(handlePrevScreenStep());
223
+ return [2, { flows: (data === null || data === void 0 ? void 0 : data.info) || [] }];
224
+ }
225
+ });
226
+ }); });
220
227
  export var retrieveBoardDetails = createAsyncThunk('brandRetrieveBrandInfo', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
221
228
  var data;
222
229
  var _a, _b;
@@ -672,6 +679,20 @@ export var brandSlice = createSlice({
672
679
  .addCase(retrieveBoardDetails.rejected, function (state, action) {
673
680
  state.error = action.error.message;
674
681
  state.loading = false;
682
+ })
683
+ .addCase(retrieveBoardStatus.pending, function (state) {
684
+ state.error = null;
685
+ state.loading = true;
686
+ })
687
+ .addCase(retrieveBoardStatus.fulfilled, function (state, action) {
688
+ state.error = null;
689
+ state.loading = false;
690
+ var flows = action.payload.flows;
691
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
692
+ })
693
+ .addCase(retrieveBoardStatus.rejected, function (state, action) {
694
+ state.error = action.error.message;
695
+ state.loading = false;
675
696
  })
676
697
  .addCase(updateBoardSuccess.fulfilled, function (state, action) {
677
698
  var _a;
@@ -50,6 +50,14 @@ export declare const resendOTPLeadIdentity: import("@reduxjs/toolkit").AsyncThun
50
50
  export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
51
51
  leadId: string;
52
52
  }, {}>;
53
+ export declare const retrieveAllEntityList: import("@reduxjs/toolkit").AsyncThunk<{
54
+ data: any;
55
+ businessCountryCode: string;
56
+ entityId: string;
57
+ }, {
58
+ businessId: string;
59
+ entityId: string;
60
+ }, {}>;
53
61
  export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
54
62
  data: any;
55
63
  }, string, {}>;