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

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 (295) hide show
  1. package/build/@types/app.d.ts +50 -20
  2. package/build/@types/app.js +9 -3
  3. package/build/@types/form.d.ts +20 -12
  4. package/build/api/auth.d.ts +28 -5
  5. package/build/api/auth.js +36 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/brand.d.ts +2 -1
  8. package/build/api/brand.js +10 -1
  9. package/build/api/country.d.ts +3 -1
  10. package/build/api/country.js +3 -1
  11. package/build/api/data.d.ts +38 -7
  12. package/build/api/data.js +57 -17
  13. package/build/api/entity.d.ts +51 -5
  14. package/build/api/entity.js +39 -9
  15. package/build/api/firebase.d.ts +1 -1
  16. package/build/api/firebase.js +3 -1
  17. package/build/api/index.d.ts +44 -14
  18. package/build/api/individual.d.ts +76 -19
  19. package/build/api/individual.js +29 -2
  20. package/build/api/lead.d.ts +9 -6
  21. package/build/api/lead.js +8 -1
  22. package/build/app/rootReducer.d.ts +0 -1
  23. package/build/app/rootReducer.js +0 -2
  24. package/build/app/settings.d.ts +8 -2
  25. package/build/app/settings.js +29 -12
  26. package/build/app/store.d.ts +1 -3
  27. package/build/assets/locales/ar.json +258 -183
  28. package/build/assets/locales/en.json +190 -108
  29. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
  30. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  31. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  32. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  33. package/build/components/AnimationFlow/Dialog.d.ts +4 -1
  34. package/build/components/AnimationFlow/Dialog.js +7 -5
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  36. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  37. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  38. package/build/components/ArabicDatePicker/index.js +2 -0
  39. package/build/components/ArabicDatePicker/style.css +24 -0
  40. package/build/components/FileInput/DragAndDrop.d.ts +10 -1
  41. package/build/components/FileInput/DragAndDrop.js +108 -8
  42. package/build/components/Lottie/Lottie.d.ts +878 -0
  43. package/build/components/Lottie/Lottie.js +58 -0
  44. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  45. package/build/components/Lottie/files/success.json +425 -0
  46. package/build/components/Lottie/index.d.ts +3 -0
  47. package/build/components/Lottie/index.js +3 -0
  48. package/build/components/OTPField/OTPField.d.ts +2 -1
  49. package/build/components/OTPField/OTPField.js +2 -2
  50. package/build/components/OTPTimer/OTPTimer.js +1 -1
  51. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  52. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  53. package/build/components/ProgressBar/index.d.ts +2 -0
  54. package/build/components/ProgressBar/index.js +2 -0
  55. package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
  56. package/build/components/RadioLabel/RadioLabel.js +2 -2
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
  58. package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
  59. package/build/constants/api.d.ts +6 -0
  60. package/build/constants/api.js +14 -1
  61. package/build/constants/app.d.ts +6 -5
  62. package/build/constants/app.js +53 -28
  63. package/build/constants/assets.d.ts +14 -0
  64. package/build/constants/assets.js +16 -2
  65. package/build/constants/dummy.d.ts +1 -1
  66. package/build/constants/dummy.js +2 -2
  67. package/build/constants/validation.d.ts +10 -0
  68. package/build/constants/validation.js +11 -1
  69. package/build/features/app/auth/authStore.d.ts +30 -4
  70. package/build/features/app/auth/authStore.js +181 -21
  71. package/build/features/app/bank/bankStore.d.ts +16 -0
  72. package/build/features/app/bank/bankStore.js +86 -39
  73. package/build/features/app/business/businessStore.d.ts +22 -3
  74. package/build/features/app/business/businessStore.js +438 -296
  75. package/build/features/app/connect/connectStore.d.ts +34 -31
  76. package/build/features/app/connect/connectStore.js +427 -300
  77. package/build/features/app/entity/entityStore.d.ts +27 -7
  78. package/build/features/app/entity/entityStore.js +222 -145
  79. package/build/features/app/individual/individualStore.d.ts +18 -0
  80. package/build/features/app/individual/individualStore.js +171 -84
  81. package/build/features/app/password/passwordStore.js +1 -1
  82. package/build/features/app/tax/taxStore.js +18 -14
  83. package/build/features/auth/Auth.d.ts +3 -1
  84. package/build/features/auth/Auth.js +48 -14
  85. package/build/features/auth/screens/NID/DOB.d.ts +7 -0
  86. package/build/features/auth/screens/NID/DOB.js +47 -0
  87. package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
  88. package/build/features/auth/screens/NID/IDNumber.js +64 -0
  89. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  90. package/build/features/auth/screens/NID/NID.js +68 -0
  91. package/build/features/auth/screens/NID/TAC.d.ts +3 -0
  92. package/build/features/auth/screens/NID/TAC.js +87 -0
  93. package/build/features/auth/screens/NID/index.d.ts +3 -0
  94. package/build/features/auth/screens/NID/index.js +2 -0
  95. package/build/features/auth/screens/NID/validation.d.ts +27 -0
  96. package/build/features/auth/screens/NID/validation.js +19 -0
  97. package/build/features/auth/screens/OTP/OTP.js +8 -4
  98. package/build/features/auth/screens/OTP/OTPInput.js +9 -2
  99. package/build/features/bank/Bank.js +12 -6
  100. package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
  101. package/build/features/bank/screens/BankDetails/BankName.js +2 -1
  102. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  103. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  104. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  105. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
  106. package/build/features/business/Business.d.ts +1 -1
  107. package/build/features/business/Business.js +14 -7
  108. package/build/features/business/screens/Activities/Activities.js +16 -17
  109. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  110. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  111. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  112. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  113. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  114. package/build/features/business/screens/Activities/validation.js +0 -9
  115. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  116. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  117. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  118. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  119. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  120. package/build/features/business/screens/BusinessType/LicenseList.js +24 -7
  121. package/build/features/business/screens/BusinessType/LicenseNumber.js +14 -8
  122. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  123. package/build/features/business/screens/BusinessType/LicenseType.js +67 -0
  124. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  125. package/build/features/business/screens/BusinessType/validation.js +52 -3
  126. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  127. package/build/features/business/screens/CivilID/CivilID.js +67 -0
  128. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  129. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  130. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  131. package/build/features/business/screens/CivilID/index.js +2 -0
  132. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  133. package/build/features/business/screens/CivilID/validation.js +4 -0
  134. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  135. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  136. package/build/features/business/screens/Customers/Customers.js +15 -9
  137. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  138. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  139. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  140. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  141. package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
  142. package/build/features/business/screens/OTP/OTP.js +15 -2
  143. package/build/features/business/screens/Success/Success.js +10 -3
  144. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -10
  145. package/build/features/business/screens/Verify/Verify.js +4 -4
  146. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  147. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +159 -0
  148. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +23 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  152. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  153. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  154. package/build/features/connect/Connect.d.ts +2 -1
  155. package/build/features/connect/Connect.js +47 -12
  156. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  157. package/build/features/connect/screens/CivilID/CivilID.js +102 -0
  158. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  159. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  160. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  161. package/build/features/connect/screens/CivilID/index.js +2 -0
  162. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  163. package/build/features/connect/screens/CivilID/validation.js +4 -0
  164. package/build/features/connect/screens/Individual/Email.js +11 -3
  165. package/build/features/connect/screens/Individual/Individual.js +44 -28
  166. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  167. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  168. package/build/features/connect/screens/Merchant/Merchant.js +41 -64
  169. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +3 -1
  170. package/build/features/connect/screens/Merchant/SalesChannels.js +30 -31
  171. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  172. package/build/features/connect/screens/Merchant/SocialMedia.js +129 -109
  173. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  174. package/build/features/connect/screens/Merchant/validation.d.ts +13 -123
  175. package/build/features/connect/screens/Merchant/validation.js +108 -173
  176. package/build/features/connect/screens/Mobile/Mobile.js +33 -12
  177. package/build/features/connect/screens/NID/NID.js +5 -1
  178. package/build/features/connect/screens/OTP/OTP.js +20 -6
  179. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  180. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  181. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +23 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  186. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  187. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  188. package/build/features/entity/Entity.d.ts +1 -1
  189. package/build/features/entity/Entity.js +16 -9
  190. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +2 -1
  191. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +25 -15
  192. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +3 -0
  193. package/build/features/entity/screens/EntityInfoConfirm/Article.js +73 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +26 -7
  195. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +20 -5
  196. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +25 -4
  197. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +13 -18
  198. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +12 -51
  199. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -10
  200. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -8
  201. package/build/features/entity/screens/Verify/Verify.js +18 -5
  202. package/build/features/featuresScreens.d.ts +0 -1
  203. package/build/features/featuresScreens.js +25 -7
  204. package/build/features/individual/Individual.d.ts +1 -1
  205. package/build/features/individual/Individual.js +14 -7
  206. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +18 -25
  207. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  208. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  209. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  210. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
  211. package/build/features/individual/screens/Verify/Verify.js +18 -5
  212. package/build/features/password/Password.d.ts +1 -1
  213. package/build/features/password/Password.js +14 -7
  214. package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
  215. package/build/features/password/screens/OTP/OTP.js +15 -2
  216. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -12
  217. package/build/features/password/screens/Verify/Verify.js +16 -3
  218. package/build/features/shared/Background/Background.d.ts +4 -5
  219. package/build/features/shared/Background/Background.js +16 -5
  220. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  221. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  222. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  223. package/build/features/shared/Button/MobileButton.js +2 -2
  224. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  225. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  226. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  227. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  228. package/build/features/shared/Dialog/index.d.ts +4 -0
  229. package/build/features/shared/Dialog/index.js +4 -0
  230. package/build/features/shared/Input/Input.d.ts +1 -1
  231. package/build/features/shared/Input/Input.js +2 -2
  232. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  233. package/build/features/shared/UploadFile/UploadFile.d.ts +10 -3
  234. package/build/features/shared/UploadFile/UploadFile.js +24 -9
  235. package/build/features/signIn/SignIn.d.ts +1 -1
  236. package/build/features/signIn/SignIn.js +14 -6
  237. package/build/features/signIn/screens/Email/Email.js +4 -2
  238. package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
  239. package/build/features/signIn/screens/OTP/OTP.js +14 -1
  240. package/build/features/signIn/screens/Password/Password.js +15 -2
  241. package/build/features/tax/Tax.d.ts +1 -1
  242. package/build/features/tax/Tax.js +16 -8
  243. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -10
  244. package/build/features/tax/screens/TaxDetails/TaxDetails.js +16 -3
  245. package/build/features/tax/screens/Verify/Verify.js +16 -3
  246. package/build/hooks/index.d.ts +2 -0
  247. package/build/hooks/index.js +2 -0
  248. package/build/hooks/useAppConfig.d.ts +3 -1
  249. package/build/hooks/useAppConfig.js +4 -2
  250. package/build/hooks/useAppDispatch.d.ts +0 -1
  251. package/build/hooks/useErrorListener.js +0 -6
  252. package/build/hooks/useScreen.d.ts +3 -0
  253. package/build/hooks/useScreen.js +14 -0
  254. package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
  255. package/build/hooks/useSetFromDefaultValues.js +24 -0
  256. package/build/index.d.ts +2 -3
  257. package/build/index.js +1 -4
  258. package/build/utils/array.d.ts +49 -1
  259. package/build/utils/array.js +58 -0
  260. package/build/utils/common.d.ts +1 -0
  261. package/build/utils/common.js +3 -0
  262. package/build/utils/device.d.ts +1 -0
  263. package/build/utils/device.js +13 -0
  264. package/build/utils/html.d.ts +1 -0
  265. package/build/utils/html.js +6 -0
  266. package/build/utils/index.d.ts +1 -0
  267. package/build/utils/index.js +1 -0
  268. package/build/utils/locale.js +1 -1
  269. package/build/utils/object.d.ts +1 -0
  270. package/build/utils/object.js +12 -0
  271. package/build/utils/rsa.d.ts +2 -2
  272. package/build/utils/rsa.js +1 -1
  273. package/build/utils/string.d.ts +33 -20
  274. package/build/utils/string.js +71 -1
  275. package/build/utils/validation.d.ts +2 -0
  276. package/build/utils/validation.js +6 -0
  277. package/package.json +5 -4
  278. package/build/features/app/otp/otpStore.d.ts +0 -28
  279. package/build/features/app/otp/otpStore.js +0 -153
  280. package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
  281. package/build/features/business/screens/Activities/SalesChannels.js +0 -112
  282. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  283. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  284. package/build/features/otp/OTP.d.ts +0 -7
  285. package/build/features/otp/OTP.js +0 -58
  286. package/build/features/otp/index.d.ts +0 -0
  287. package/build/features/otp/index.js +0 -1
  288. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  289. package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
  290. package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
  291. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
  292. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  293. package/build/features/otp/screens/OTPVerify/index.js +0 -2
  294. package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
  295. package/build/features/otp/screens/OTPVerify/validation.js +0 -4
@@ -1,3 +1,14 @@
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
+ };
1
12
  var __rest = (this && this.__rest) || function (s, e) {
2
13
  var t = {};
3
14
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -22,6 +33,20 @@ var updateEntityInfo = function (_a, config) {
22
33
  var id = _a.id, data = __rest(_a, ["id"]);
23
34
  return instance.put("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id), data, config);
24
35
  };
36
+ var retrieveEntity = function (entity_id) {
37
+ return httpClient({
38
+ method: 'get',
39
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(entity_id)
40
+ });
41
+ };
42
+ var updateEntity = function (_a) {
43
+ var id = _a.id, data = __rest(_a, ["id"]);
44
+ return httpClient({
45
+ method: 'put',
46
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id),
47
+ data: data
48
+ });
49
+ };
25
50
  var createBankAccount = function (data, config) {
26
51
  return instance.put("".concat(ENDPOINT_PATHS.BANK), data, config);
27
52
  };
@@ -31,19 +56,21 @@ var retrieveBankAccount = function (id) {
31
56
  url: "".concat(ENDPOINT_PATHS.BANK, "/").concat(id)
32
57
  });
33
58
  };
34
- var uploadFileInfo = function (data) {
35
- return httpClient({
36
- method: 'post',
37
- url: "".concat(ENDPOINT_PATHS.FILES_PATH),
38
- data: data,
39
- headers: { 'Content-Type': 'multipart/form-data' }
40
- });
59
+ var uploadFileInfo = function (data, config) {
60
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
41
61
  };
42
62
  var updateIndividualInfo = function (_a) {
43
63
  var id = _a.id, data = __rest(_a, ["id"]);
44
64
  return httpClient({
45
65
  method: 'put',
46
- url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(id, "/info"),
66
+ url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info"),
67
+ data: data
68
+ });
69
+ };
70
+ var updateDocumentInfo = function (data) {
71
+ return httpClient({
72
+ method: 'post',
73
+ url: "".concat(ENDPOINT_PATHS.DOCUMENT),
47
74
  data: data
48
75
  });
49
76
  };
@@ -54,6 +81,9 @@ var entityService = {
54
81
  retrieveBankAccount: retrieveBankAccount,
55
82
  retrieveEntityInfo: retrieveEntityInfo,
56
83
  updateIndividualInfo: updateIndividualInfo,
57
- uploadFileInfo: uploadFileInfo
84
+ uploadFileInfo: uploadFileInfo,
85
+ updateDocumentInfo: updateDocumentInfo,
86
+ retrieveEntity: retrieveEntity,
87
+ updateEntity: updateEntity
58
88
  };
59
89
  export { entityService };
@@ -1,4 +1,4 @@
1
1
  declare const firebaseService: {
2
- getLocale: () => Promise<any>;
2
+ getLocale: (disableLocale?: boolean) => Promise<any>;
3
3
  };
4
4
  export { firebaseService };
@@ -1,6 +1,8 @@
1
1
  import { ENDPOINT_PATHS } from '../constants';
2
2
  import { httpClient } from './axios';
3
- var getLocale = function () {
3
+ var getLocale = function (disableLocale) {
4
+ if (disableLocale)
5
+ return Promise.resolve(null);
4
6
  return httpClient({
5
7
  method: 'get',
6
8
  url: ENDPOINT_PATHS.FIREBASE_URL
@@ -1,11 +1,12 @@
1
1
  import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
2
2
  import { ValidateOperatorBody } from './operator';
3
- import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody } from './auth';
3
+ import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthKitOTPBody } from './auth';
4
4
  import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
5
5
  import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
6
- import { EntityInfoBody, EntityBankUpdateBody } from './entity';
6
+ import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo } from './entity';
7
7
  import { CreateAccountBody } from './account';
8
- import { BrandListBody, UpdateBrandBody } from './individual';
8
+ import { DataElementBody } from './data';
9
+ import { BrandListBody, UpdateBrandBody, UpdateIndividualBody } from './individual';
9
10
  import { UpdateBoardBody } from './board';
10
11
  declare const API: {
11
12
  ipService: {
@@ -15,12 +16,18 @@ declare const API: {
15
16
  validateOperator: (body: ValidateOperatorBody) => Promise<any>;
16
17
  };
17
18
  countryService: {
18
- getCountries: () => Promise<any>;
19
+ getCountries: (disableCountries?: boolean | undefined) => Promise<any> | {
20
+ list: never[];
21
+ };
19
22
  };
20
23
  authService: {
21
24
  createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
22
25
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
23
26
  createPassword: (data: CreatePasswordBody) => Promise<any>;
27
+ verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
28
+ getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
29
+ getTokenVerify: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
30
+ createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
24
31
  };
25
32
  leadService: {
26
33
  createLead: (data: CreateLeadBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -29,6 +36,7 @@ declare const API: {
29
36
  verifyLeadToken: (data: LeadVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
30
37
  verifyLeadOTP: (data: LeadOTPVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
31
38
  retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
39
+ retrieveLeadIdentity: (leadId: string) => Promise<any>;
32
40
  };
33
41
  entityService: {
34
42
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -37,7 +45,10 @@ declare const API: {
37
45
  retrieveBankAccount: (id: string) => Promise<any>;
38
46
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
39
47
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
40
- uploadFileInfo: (data: import("./entity").UploadFileBody) => Promise<any>;
48
+ uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
49
+ updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
50
+ retrieveEntity: (entity_id: string) => Promise<any>;
51
+ updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
41
52
  };
42
53
  availabilityServices: {
43
54
  checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -45,22 +56,40 @@ declare const API: {
45
56
  checkIbanBank: (data: import("./availabilityServices").CheckIBanBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
46
57
  };
47
58
  firebaseService: {
48
- getLocale: () => Promise<any>;
59
+ getLocale: (disableLocale?: boolean | undefined) => Promise<any>;
49
60
  };
50
61
  accountService: {
51
62
  createAccount: (data: CreateAccountBody) => Promise<any>;
52
63
  };
53
64
  dataService: {
54
- getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
55
- getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
56
- getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
57
- getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
58
- getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
59
- getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
60
- getOccupation: () => Promise<any>;
65
+ getChannelsOfServices: (data: {
66
+ page: number;
67
+ }) => Promise<any>;
68
+ getCustomerBases: (data: {
69
+ page: number;
70
+ }) => Promise<any>;
71
+ getExpectedSales: (data: {
72
+ page: number;
73
+ }) => Promise<any>;
74
+ getExpectedCustomerSales: (data: {
75
+ page: number;
76
+ }) => Promise<any>;
77
+ getSourceOfIncome: (data: {
78
+ page: number;
79
+ }) => Promise<any>;
80
+ getMonthlyIncome: (data: {
81
+ page: number;
82
+ country_code: string[];
83
+ }) => Promise<any>;
84
+ getOccupation: (data: {
85
+ page: number;
86
+ }) => Promise<any>;
87
+ getActivities: (config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
61
88
  };
62
89
  individualService: {
63
90
  retrieveIndividualInfo: (id: string) => Promise<any>;
91
+ retrieveIndividual: (id: string, type: string) => Promise<any>;
92
+ updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
64
93
  };
65
94
  boardService: {
66
95
  retrieveBoard: (id: string) => Promise<any>;
@@ -76,8 +105,9 @@ declare const API: {
76
105
  retrieveBrand: (id: string) => Promise<any>;
77
106
  getBrandList: (data: BrandListBody) => Promise<any>;
78
107
  updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
108
+ updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
79
109
  };
80
110
  };
81
- export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody };
111
+ export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthKitOTPBody, UpdateIndividualBody };
82
112
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
83
113
  export default API;
@@ -3,30 +3,87 @@ export declare type BrandListBody = {
3
3
  };
4
4
  export declare type UpdateBrandBody = {
5
5
  id: string;
6
- brand: {
7
- activities?: Array<string>;
8
- business_operation_start_at?: string;
9
- channel_services?: Array<string>;
10
- physical_store_available?: boolean;
11
- monthly_sales_range?: string;
12
- customers_served_monthly?: number;
13
- customers_base?: Array<string>;
14
- vat_id?: string;
15
- agree_chargeback?: boolean;
16
- agree_refund?: boolean;
17
- employer_name?: string;
18
- employer_country?: string | null;
19
- source_income?: Array<string | undefined>;
20
- actual_income?: string;
21
- is_relative_PEP?: boolean | null;
22
- is_influencer?: boolean | null;
23
- is_vat_acknowledged?: boolean;
24
- occupation?: string;
6
+ name?: {
7
+ en: string;
8
+ ar: string;
9
+ };
10
+ sectors?: Array<{
11
+ id: string;
12
+ }>;
13
+ website?: string;
14
+ social?: Array<string>;
15
+ logo?: string;
16
+ content?: {
17
+ tag_line?: {
18
+ en: string;
19
+ ar: string;
20
+ zh: string;
21
+ };
22
+ about?: {
23
+ en: string;
24
+ ar: string;
25
+ zh: string;
26
+ };
27
+ };
28
+ activities?: Array<{
29
+ id: string;
30
+ }>;
31
+ channel_services?: Array<{
32
+ id: string;
33
+ address: string;
34
+ sub?: Array<{
35
+ id: string;
36
+ address: string;
37
+ }>;
38
+ }>;
39
+ operations?: {
40
+ start_date?: string;
41
+ sales?: {
42
+ id: string;
43
+ period: string;
44
+ currency?: string;
45
+ };
46
+ customer_base?: {
47
+ id: string;
48
+ period: string;
49
+ locations?: Array<{
50
+ id: string;
51
+ }>;
52
+ };
53
+ };
54
+ term?: Array<string>;
55
+ step_name?: string;
56
+ encryption_contract?: Array<string>;
57
+ };
58
+ export declare type UpdateSalesChannels = {
59
+ id?: string;
60
+ channel_services: Array<{
61
+ id: string;
62
+ address: string;
63
+ }>;
64
+ };
65
+ export declare type UpdateIndividualBody = {
66
+ id: string;
67
+ type: string;
68
+ employer_name?: string;
69
+ employer_country?: string | null;
70
+ source_income?: Array<{
71
+ id?: string;
72
+ }>;
73
+ monthly_income?: {
74
+ id?: string;
75
+ };
76
+ is_relative_PEP?: boolean | null;
77
+ is_influencer?: boolean | null;
78
+ occupation?: {
79
+ id?: string;
25
80
  };
26
81
  step_name: string;
27
82
  encryption_contract?: Array<string>;
28
83
  };
29
84
  declare const individualService: {
30
85
  retrieveIndividualInfo: (id: string) => Promise<any>;
86
+ retrieveIndividual: (id: string, type: string) => Promise<any>;
87
+ updateIndividual: ({ id, type, ...data }: UpdateIndividualBody) => Promise<any>;
31
88
  };
32
89
  export { individualService };
@@ -1,12 +1,39 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { ENDPOINT_PATHS } from '../constants';
2
13
  import { httpClient } from './axios';
3
14
  var retrieveIndividualInfo = function (id) {
4
15
  return httpClient({
5
16
  method: 'get',
6
- url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(id, "/info")
17
+ url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info")
18
+ });
19
+ };
20
+ var retrieveIndividual = function (id, type) {
21
+ return httpClient({
22
+ method: 'get',
23
+ url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id)
24
+ });
25
+ };
26
+ var updateIndividual = function (_a) {
27
+ var id = _a.id, type = _a.type, data = __rest(_a, ["id", "type"]);
28
+ return httpClient({
29
+ method: 'put',
30
+ url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(type, "/").concat(id),
31
+ data: data
7
32
  });
8
33
  };
9
34
  var individualService = {
10
- retrieveIndividualInfo: retrieveIndividualInfo
35
+ retrieveIndividualInfo: retrieveIndividualInfo,
36
+ retrieveIndividual: retrieveIndividual,
37
+ updateIndividual: updateIndividual
11
38
  };
12
39
  export { individualService };
@@ -42,7 +42,7 @@ export declare type UpdateLeadBody = {
42
42
  name?: Name;
43
43
  contact?: Contact;
44
44
  send_invite?: boolean;
45
- business_name?: BusinessName;
45
+ business?: BusinessName;
46
46
  business_type?: string;
47
47
  country_code?: string;
48
48
  brand?: BrandInfo;
@@ -75,11 +75,13 @@ export declare type CreateLeadBody = {
75
75
  };
76
76
  export declare type LeadIdentityUpdateBody = {
77
77
  id: string;
78
- country_code: string;
79
- identification_id: string;
80
- identification_id_type: string;
81
- date_of_birth: string;
82
- step_name: string;
78
+ identification: {
79
+ id: string;
80
+ issued_country_code: string;
81
+ type: string;
82
+ };
83
+ date_of_birth?: string;
84
+ step_name?: string;
83
85
  encryption_contract: Array<string>;
84
86
  };
85
87
  declare const leadService: {
@@ -89,5 +91,6 @@ declare const leadService: {
89
91
  verifyLeadToken: (data: LeadVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
90
92
  verifyLeadOTP: (data: LeadOTPVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
91
93
  retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
94
+ retrieveLeadIdentity: (leadId: string) => Promise<any>;
92
95
  };
93
96
  export { leadService };
package/build/api/lead.js CHANGED
@@ -34,12 +34,19 @@ var verifyLeadOTP = function (data, config) {
34
34
  var retrieveEntityList = function (leadId) {
35
35
  return instance.get("".concat(ENDPOINT_PATHS.RETRIEVE_ENTITY_LIST, "/").concat(leadId));
36
36
  };
37
+ var retrieveLeadIdentity = function (leadId) {
38
+ return httpClient({
39
+ method: 'get',
40
+ url: "".concat(ENDPOINT_PATHS.LEAD, "/").concat(leadId, "/identity")
41
+ });
42
+ };
37
43
  var leadService = {
38
44
  createLead: createLead,
39
45
  updateLead: updateLead,
40
46
  retrieveLead: retrieveLead,
41
47
  verifyLeadToken: verifyLeadToken,
42
48
  verifyLeadOTP: verifyLeadOTP,
43
- retrieveEntityList: retrieveEntityList
49
+ retrieveEntityList: retrieveEntityList,
50
+ retrieveLeadIdentity: retrieveLeadIdentity
44
51
  };
45
52
  export { leadService };
@@ -8,7 +8,6 @@ declare const rootReducer: {
8
8
  password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
9
9
  signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
10
10
  entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
11
- otp: import("redux").Reducer<import("../features/app/otp/otpStore").OtpState, import("redux").AnyAction>;
12
11
  auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
13
12
  };
14
13
  export default rootReducer;
@@ -7,7 +7,6 @@ import individual from '../features/app/individual/individualStore';
7
7
  import password from '../features/app/password/passwordStore';
8
8
  import signIn from '../features/app/signIn/signInStore';
9
9
  import entity from '../features/app/entity/entityStore';
10
- import otp from '../features/app/otp/otpStore';
11
10
  import auth from '../features/app/auth/authStore';
12
11
  var rootReducer = {
13
12
  settings: settings,
@@ -19,7 +18,6 @@ var rootReducer = {
19
18
  password: password,
20
19
  signIn: signIn,
21
20
  entity: entity,
22
- otp: otp,
23
21
  auth: auth
24
22
  };
25
23
  export default rootReducer;
@@ -5,7 +5,11 @@ export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk
5
5
  businessCountry: CountryCode;
6
6
  locale: any;
7
7
  deviceInfo: DeviceInfo;
8
- }, void, {}>;
8
+ isValidOperator: boolean;
9
+ }, {
10
+ disableCountries?: boolean | undefined;
11
+ disableLocale?: boolean | undefined;
12
+ }, {}>;
9
13
  export interface SettingsData {
10
14
  skin: ThemeMode;
11
15
  language: LanguageMode;
@@ -17,6 +21,7 @@ export interface SettingsData {
17
21
  isTapOrigin: boolean;
18
22
  businessCountry: CountryCode;
19
23
  countries: Array<CountryCode>;
24
+ isValidOperator: boolean;
20
25
  }
21
26
  export interface SettingsState extends SharedState<SettingsData> {
22
27
  }
@@ -30,8 +35,9 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
30
35
  handlePrevScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
31
36
  handleActiveFlowScreens: (state: SettingsState, action: ActionState<Array<ScreenStepNavigation>>) => void;
32
37
  handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
38
+ handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
33
39
  }, "settings">;
34
- export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
40
+ export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
35
41
  declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
36
42
  export default _default;
37
43
  export declare const settingsSelector: (state: RootState) => SettingsState;
@@ -47,24 +47,25 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  var _a;
49
49
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
- import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString } from '../utils';
51
- import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
50
+ import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, removeElement } from '../utils';
51
+ import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS, DIALOG_ID, BACKGROUND_ID } from '../constants';
52
52
  import i18n from '../i18n';
53
53
  import { updateLocale } from '../utils/locale';
54
54
  import API, { setAxiosGlobalHeaders } from '../api';
55
- export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
- var settings, _a, appConfig, language, _b, client, device, os, _c, visitorId, _d, ip, latitude, longitude, locale, list, operatorData, deviceInfo, countries, businessCountry;
55
+ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
+ var settings, _a, appConfig, language, _b, client, device, os, disableCountries, disableLocale, _c, visitorId, _d, ip, latitude, longitude, locale, list, operatorData, deviceInfo, operatorStatus, isValidOperator, countries, businessCountry;
57
57
  return __generator(this, function (_e) {
58
58
  switch (_e.label) {
59
59
  case 0:
60
60
  settings = thunkApi.getState().settings;
61
61
  _a = settings.data, appConfig = _a.appConfig, language = _a.language;
62
62
  _b = getBrowserInfo(), client = _b.client, device = _b.device, os = _b.os;
63
+ disableCountries = params.disableCountries, disableLocale = params.disableLocale;
63
64
  return [4, Promise.all([
64
65
  getFingerPrint(),
65
66
  API.ipService.getIP(),
66
- API.firebaseService.getLocale(),
67
- API.countryService.getCountries()
67
+ API.firebaseService.getLocale(disableLocale),
68
+ API.countryService.getCountries(disableCountries)
68
69
  ])];
69
70
  case 1:
70
71
  _c = _e.sent(), visitorId = _c[0].visitorId, _d = _c[1], ip = _d.ip, latitude = _d.latitude, longitude = _d.longitude, locale = _c[2], list = _c[3].list;
@@ -109,10 +110,11 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
109
110
  setAxiosGlobalHeaders(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(appConfig.publicKey), mdn: encryptString(window.location.origin) }));
110
111
  return [4, API.operatorService.validateOperator(operatorData)];
111
112
  case 2:
112
- _e.sent();
113
+ operatorStatus = _e.sent();
114
+ isValidOperator = operatorStatus === 'valid';
113
115
  countries = sortCountries(list);
114
116
  businessCountry = findCountryByIso2(countries, appConfig.businessCountryCode) || defaultCountry;
115
- return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo }];
117
+ return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, isValidOperator: isValidOperator }];
116
118
  }
117
119
  });
118
120
  }); });
@@ -129,7 +131,8 @@ var initialState = {
129
131
  deviceInfo: DefaultDeviceInfo,
130
132
  appConfig: {},
131
133
  businessCountry: defaultCountry,
132
- countries: []
134
+ countries: [],
135
+ isValidOperator: false
133
136
  }
134
137
  };
135
138
  export var settingsSlice = createSlice({
@@ -141,6 +144,12 @@ export var settingsSlice = createSlice({
141
144
  },
142
145
  handleOpen: function (state, action) {
143
146
  state.data.open = action.payload;
147
+ if (action.payload === false) {
148
+ setTimeout(function () {
149
+ removeElement(DIALOG_ID);
150
+ removeElement(BACKGROUND_ID);
151
+ }, 1000);
152
+ }
144
153
  },
145
154
  handleSkin: function (state, action) {
146
155
  state.data.skin = action.payload;
@@ -214,6 +223,10 @@ export var settingsSlice = createSlice({
214
223
  if (typeof open !== 'boolean')
215
224
  throw new Error('Open is required');
216
225
  state.data.appConfig = action.payload;
226
+ },
227
+ handleSetCountryByIso2: function (state, action) {
228
+ var country = findCountryByIso2(state.data.countries, action.payload);
229
+ state.data.businessCountry = country || defaultCountry;
217
230
  }
218
231
  },
219
232
  extraReducers: function (builder) {
@@ -222,12 +235,16 @@ export var settingsSlice = createSlice({
222
235
  state.error = null;
223
236
  });
224
237
  builder.addCase(fetchAppSettingsSync.fulfilled, function (state, action) {
225
- var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo;
238
+ var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo, isValidOperator = _a.isValidOperator;
226
239
  state.data.countries = countries;
227
240
  state.data.businessCountry = businessCountry;
228
241
  state.data.deviceInfo = deviceInfo;
229
- updateLocale(locale, businessCountry.iso2);
242
+ state.data.isValidOperator = isValidOperator;
243
+ if (locale)
244
+ updateLocale(locale, businessCountry.iso2);
230
245
  state.loading = false;
246
+ if (state.data.appConfig.onReady)
247
+ state.data.appConfig.onReady();
231
248
  });
232
249
  builder.addCase(fetchAppSettingsSync.rejected, function (state, action) {
233
250
  state.loading = false;
@@ -235,6 +252,6 @@ export var settingsSlice = createSlice({
235
252
  });
236
253
  }
237
254
  });
238
- export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleIsTapOrigin = _a.handleIsTapOrigin;
255
+ export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin;
239
256
  export default settingsSlice.reducer;
240
257
  export var settingsSelector = function (state) { return state.settings; };
@@ -9,9 +9,8 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
9
9
  password: import("../features/app/password/passwordStore").PasswordState;
10
10
  signIn: import("../features/app/signIn/signInStore").SignInState;
11
11
  entity: import("../features/app/entity/entityStore").EntityState;
12
- otp: import("../features/app/otp/otpStore").OtpState;
13
12
  auth: import("../features/app/auth/authStore").AuthState;
14
- }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
13
+ }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
15
14
  settings: import("./settings").SettingsState;
16
15
  connect: import("../features/app/connect/connectStore").ConnectState;
17
16
  business: import("../features/app/business/businessStore").BusinessState;
@@ -21,7 +20,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
21
20
  password: import("../features/app/password/passwordStore").PasswordState;
22
21
  signIn: import("../features/app/signIn/signInStore").SignInState;
23
22
  entity: import("../features/app/entity/entityStore").EntityState;
24
- otp: import("../features/app/otp/otpStore").OtpState;
25
23
  auth: import("../features/app/auth/authStore").AuthState;
26
24
  }, import("redux").AnyAction, undefined>]>>;
27
25
  export declare type AppDispatch = typeof store.dispatch;