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

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 (310) 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 +21 -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 +21 -10
  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 +5 -3
  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 +5 -5
  62. package/build/constants/app.js +62 -32
  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 +182 -20
  71. package/build/features/app/bank/bankStore.d.ts +16 -0
  72. package/build/features/app/bank/bankStore.js +88 -41
  73. package/build/features/app/business/businessStore.d.ts +22 -3
  74. package/build/features/app/business/businessStore.js +445 -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 +40 -8
  78. package/build/features/app/entity/entityStore.js +389 -149
  79. package/build/features/app/individual/individualStore.d.ts +18 -0
  80. package/build/features/app/individual/individualStore.js +178 -85
  81. package/build/features/app/password/passwordStore.d.ts +1 -7
  82. package/build/features/app/password/passwordStore.js +31 -20
  83. package/build/features/app/tax/taxStore.js +23 -16
  84. package/build/features/auth/Auth.d.ts +2 -1
  85. package/build/features/auth/Auth.js +37 -9
  86. package/build/features/auth/screens/NID/DOB.d.ts +7 -0
  87. package/build/features/auth/screens/NID/DOB.js +47 -0
  88. package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
  89. package/build/features/auth/screens/NID/IDNumber.js +64 -0
  90. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  91. package/build/features/auth/screens/NID/NID.js +68 -0
  92. package/build/features/auth/screens/NID/TAC.d.ts +3 -0
  93. package/build/features/auth/screens/NID/TAC.js +87 -0
  94. package/build/features/auth/screens/NID/index.d.ts +3 -0
  95. package/build/features/auth/screens/NID/index.js +2 -0
  96. package/build/features/auth/screens/NID/validation.d.ts +27 -0
  97. package/build/features/auth/screens/NID/validation.js +19 -0
  98. package/build/features/auth/screens/OTP/OTP.js +8 -4
  99. package/build/features/auth/screens/OTP/OTPInput.js +9 -2
  100. package/build/features/bank/Bank.js +4 -4
  101. package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
  102. package/build/features/bank/screens/BankDetails/BankName.js +2 -1
  103. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  104. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  105. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  106. package/build/features/bank/screens/Success/Success.js +7 -3
  107. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
  108. package/build/features/business/Business.js +4 -4
  109. package/build/features/business/screens/Activities/Activities.js +16 -17
  110. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  111. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  112. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  113. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  114. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  115. package/build/features/business/screens/Activities/validation.js +0 -9
  116. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  117. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  118. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  119. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  120. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  121. package/build/features/business/screens/BusinessType/LicenseList.js +26 -7
  122. package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
  123. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  124. package/build/features/business/screens/BusinessType/LicenseType.js +78 -0
  125. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  126. package/build/features/business/screens/BusinessType/validation.js +52 -3
  127. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  128. package/build/features/business/screens/CivilID/CivilID.js +67 -0
  129. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  130. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  131. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  132. package/build/features/business/screens/CivilID/index.js +2 -0
  133. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  134. package/build/features/business/screens/CivilID/validation.js +4 -0
  135. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  136. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  137. package/build/features/business/screens/Customers/Customers.js +15 -9
  138. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  139. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  140. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  141. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  142. package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
  143. package/build/features/business/screens/OTP/OTP.js +15 -2
  144. package/build/features/business/screens/Success/Success.js +10 -3
  145. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -10
  146. package/build/features/business/screens/Verify/Verify.js +4 -4
  147. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  148. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +159 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +23 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  152. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  153. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  154. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  155. package/build/features/connect/Connect.d.ts +1 -0
  156. package/build/features/connect/Connect.js +38 -10
  157. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  158. package/build/features/connect/screens/CivilID/CivilID.js +102 -0
  159. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  160. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  161. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  162. package/build/features/connect/screens/CivilID/index.js +2 -0
  163. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  164. package/build/features/connect/screens/CivilID/validation.js +4 -0
  165. package/build/features/connect/screens/Individual/Email.js +11 -3
  166. package/build/features/connect/screens/Individual/Individual.js +44 -28
  167. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  168. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  169. package/build/features/connect/screens/Merchant/Merchant.js +41 -64
  170. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +3 -1
  171. package/build/features/connect/screens/Merchant/SalesChannels.js +30 -31
  172. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  173. package/build/features/connect/screens/Merchant/SocialMedia.js +129 -109
  174. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  175. package/build/features/connect/screens/Merchant/validation.d.ts +13 -123
  176. package/build/features/connect/screens/Merchant/validation.js +108 -173
  177. package/build/features/connect/screens/Mobile/Mobile.js +33 -12
  178. package/build/features/connect/screens/NID/NID.js +5 -1
  179. package/build/features/connect/screens/OTP/OTP.js +20 -6
  180. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  181. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +6 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +23 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  186. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  187. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  188. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  189. package/build/features/entity/Entity.js +6 -6
  190. package/build/features/entity/screens/Customers/CustomerLocations.d.ts +118 -0
  191. package/build/features/entity/screens/Customers/CustomerLocations.js +171 -0
  192. package/build/features/entity/screens/Customers/Customers.d.ts +5 -0
  193. package/build/features/entity/screens/Customers/Customers.js +90 -0
  194. package/build/features/entity/screens/Customers/ExpectedCustomers.d.ts +8 -0
  195. package/build/features/entity/screens/Customers/ExpectedCustomers.js +98 -0
  196. package/build/features/entity/screens/Customers/ExpectedSalesRange.d.ts +8 -0
  197. package/build/features/entity/screens/Customers/ExpectedSalesRange.js +127 -0
  198. package/build/features/entity/screens/Customers/RefundPolicy.d.ts +36 -0
  199. package/build/features/entity/screens/Customers/RefundPolicy.js +84 -0
  200. package/build/features/entity/screens/Customers/TransactionPolicy.d.ts +3 -0
  201. package/build/features/entity/screens/Customers/TransactionPolicy.js +44 -0
  202. package/build/features/entity/screens/Customers/index.d.ts +3 -0
  203. package/build/features/entity/screens/Customers/index.js +2 -0
  204. package/build/features/entity/screens/Customers/validation.d.ts +20 -0
  205. package/build/features/entity/screens/Customers/validation.js +13 -0
  206. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +2 -1
  207. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +25 -15
  208. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +3 -0
  209. package/build/features/entity/screens/EntityInfoConfirm/Article.js +73 -0
  210. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +38 -10
  211. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +20 -5
  212. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +2 -1
  213. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +34 -5
  214. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +13 -18
  215. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +75 -41
  216. package/build/features/entity/screens/EntityInfoConfirm/validation.js +76 -10
  217. package/build/features/entity/screens/Success/Success.js +7 -3
  218. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -8
  219. package/build/features/entity/screens/Verify/Verify.js +18 -5
  220. package/build/features/featuresScreens.d.ts +0 -1
  221. package/build/features/featuresScreens.js +30 -7
  222. package/build/features/individual/Individual.js +4 -4
  223. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +18 -25
  224. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  225. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  226. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  227. package/build/features/individual/screens/Success/Success.js +7 -3
  228. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -11
  229. package/build/features/individual/screens/Verify/Verify.js +18 -5
  230. package/build/features/password/Password.js +4 -4
  231. package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
  232. package/build/features/password/screens/OTP/OTP.js +15 -2
  233. package/build/features/password/screens/Success/Success.js +7 -3
  234. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -12
  235. package/build/features/password/screens/Verify/Verify.js +16 -3
  236. package/build/features/shared/Background/Background.d.ts +2 -5
  237. package/build/features/shared/Background/Background.js +7 -3
  238. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  239. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  240. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  241. package/build/features/shared/Button/MobileButton.js +2 -2
  242. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  243. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  244. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  245. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  246. package/build/features/shared/Dialog/index.d.ts +4 -0
  247. package/build/features/shared/Dialog/index.js +4 -0
  248. package/build/features/shared/Input/Input.d.ts +1 -1
  249. package/build/features/shared/Input/Input.js +2 -2
  250. package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
  251. package/build/features/shared/UploadFile/UploadFile.d.ts +10 -3
  252. package/build/features/shared/UploadFile/UploadFile.js +24 -9
  253. package/build/features/signIn/SignIn.js +4 -4
  254. package/build/features/signIn/screens/Email/Email.js +4 -2
  255. package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
  256. package/build/features/signIn/screens/OTP/OTP.js +14 -1
  257. package/build/features/signIn/screens/Password/Password.js +15 -2
  258. package/build/features/tax/Tax.js +6 -6
  259. package/build/features/tax/screens/Success/Success.js +9 -3
  260. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -10
  261. package/build/features/tax/screens/TaxDetails/TaxDetails.js +16 -3
  262. package/build/features/tax/screens/Verify/Verify.js +16 -3
  263. package/build/hooks/index.d.ts +2 -0
  264. package/build/hooks/index.js +2 -0
  265. package/build/hooks/useAppConfig.d.ts +3 -1
  266. package/build/hooks/useAppConfig.js +2 -2
  267. package/build/hooks/useAppDispatch.d.ts +0 -1
  268. package/build/hooks/useErrorListener.js +0 -6
  269. package/build/hooks/useScreen.d.ts +3 -0
  270. package/build/hooks/useScreen.js +14 -0
  271. package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
  272. package/build/hooks/useSetFromDefaultValues.js +24 -0
  273. package/build/index.d.ts +2 -3
  274. package/build/index.js +1 -4
  275. package/build/utils/array.d.ts +49 -1
  276. package/build/utils/array.js +58 -0
  277. package/build/utils/common.d.ts +1 -0
  278. package/build/utils/common.js +3 -0
  279. package/build/utils/device.d.ts +1 -0
  280. package/build/utils/device.js +13 -0
  281. package/build/utils/index.d.ts +1 -0
  282. package/build/utils/index.js +1 -0
  283. package/build/utils/locale.js +1 -1
  284. package/build/utils/object.d.ts +1 -0
  285. package/build/utils/object.js +12 -0
  286. package/build/utils/rsa.d.ts +2 -2
  287. package/build/utils/rsa.js +1 -1
  288. package/build/utils/string.d.ts +33 -20
  289. package/build/utils/string.js +71 -1
  290. package/build/utils/validation.d.ts +2 -0
  291. package/build/utils/validation.js +6 -0
  292. package/package.json +129 -128
  293. package/build/features/app/otp/otpStore.d.ts +0 -28
  294. package/build/features/app/otp/otpStore.js +0 -153
  295. package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
  296. package/build/features/business/screens/Activities/SalesChannels.js +0 -112
  297. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  298. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  299. package/build/features/otp/OTP.d.ts +0 -7
  300. package/build/features/otp/OTP.js +0 -58
  301. package/build/features/otp/index.d.ts +0 -0
  302. package/build/features/otp/index.js +0 -1
  303. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  304. package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
  305. package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
  306. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
  307. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  308. package/build/features/otp/screens/OTPVerify/index.js +0 -2
  309. package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
  310. package/build/features/otp/screens/OTPVerify/validation.js +0 -4
@@ -42,31 +42,38 @@ export interface FeatureScreenStep {
42
42
  name: string;
43
43
  }
44
44
  export declare enum SocialMediaTypes {
45
- WEB = "website",
45
+ WEB = "sales_channel_1AGV4422123Ymmu7oe10p573",
46
46
  INSTAGRAM = "instagram",
47
47
  TWITTER = "twitter",
48
- SOCIAL = "social",
48
+ SOCIAL = "social media",
49
49
  PHYSICAL_STORE = "physical store",
50
50
  CALL_CENTER = "call center",
51
- APP = "app",
51
+ APP = "mobile app",
52
52
  APPLE_STORE = "apple store",
53
53
  PLAY_STORE = "play store"
54
54
  }
55
55
  export interface CustomerLocation {
56
56
  id: string;
57
- name_ar: string;
58
- name_en: string;
57
+ code: string;
58
+ name: {
59
+ ar: string;
60
+ en: string;
61
+ };
59
62
  }
60
63
  export interface ExpectedCustomer extends CustomerLocation {
61
64
  }
62
65
  export interface ExpectedSaleRange {
63
66
  id: string;
64
- name_ar: string;
65
- name_en: string;
67
+ name: {
68
+ ar: string;
69
+ en: string;
70
+ };
66
71
  sub?: Array<{
67
72
  id: string;
68
- name_ar: string;
69
- name_en: string;
73
+ name: {
74
+ ar: string;
75
+ en: string;
76
+ };
70
77
  }>;
71
78
  }
72
79
  export declare enum BusinessType {
@@ -84,25 +91,44 @@ export interface License {
84
91
  type: string;
85
92
  }
86
93
  export interface Activity {
87
- ar: string;
88
- en: string;
94
+ id: string;
95
+ name: {
96
+ ar: string;
97
+ en: string;
98
+ };
89
99
  }
90
- export interface SalesChannel {
100
+ export interface SubSaleChannel {
91
101
  id: string;
92
- name_ar: string;
93
- name_en: string;
102
+ code: string;
103
+ name?: {
104
+ ar: string;
105
+ en: string;
106
+ };
107
+ address?: string;
108
+ logo?: string;
109
+ }
110
+ export interface SaleChannel extends SubSaleChannel {
111
+ sub?: Array<SubSaleChannel>;
94
112
  }
95
113
  export interface SourceOfIncome {
96
114
  id: string;
97
- name_ar: string;
98
- name_en: string;
115
+ name: {
116
+ ar: string;
117
+ en: string;
118
+ };
99
119
  }
100
120
  export interface Occupation {
101
121
  id: string;
102
- name_ar: string;
103
- name_en: string;
122
+ name: {
123
+ ar: string;
124
+ en: string;
125
+ };
104
126
  }
105
127
  export interface MonthlyIncome extends SourceOfIncome {
128
+ range: {
129
+ ar: string;
130
+ en: string;
131
+ };
106
132
  }
107
133
  export interface AppInfo {
108
134
  name: string;
@@ -184,8 +210,7 @@ export declare type BrandInfo = {
184
210
  ar: string;
185
211
  en: string;
186
212
  };
187
- website: string;
188
- social: Array<string>;
213
+ channel_services: SaleChannel[];
189
214
  };
190
215
  export declare enum FlowsTypes {
191
216
  CONNECT = "connect",
@@ -203,4 +228,9 @@ export declare type FlowInfo = {
203
228
  status: string;
204
229
  url: string;
205
230
  };
231
+ export declare enum AuthForType {
232
+ MOBILE = "mobile",
233
+ EMAIL = "email",
234
+ NATIONAL_ID = "national_id"
235
+ }
206
236
  export {};
@@ -1,12 +1,12 @@
1
1
  export var SocialMediaTypes;
2
2
  (function (SocialMediaTypes) {
3
- SocialMediaTypes["WEB"] = "website";
3
+ SocialMediaTypes["WEB"] = "sales_channel_1AGV4422123Ymmu7oe10p573";
4
4
  SocialMediaTypes["INSTAGRAM"] = "instagram";
5
5
  SocialMediaTypes["TWITTER"] = "twitter";
6
- SocialMediaTypes["SOCIAL"] = "social";
6
+ SocialMediaTypes["SOCIAL"] = "social media";
7
7
  SocialMediaTypes["PHYSICAL_STORE"] = "physical store";
8
8
  SocialMediaTypes["CALL_CENTER"] = "call center";
9
- SocialMediaTypes["APP"] = "app";
9
+ SocialMediaTypes["APP"] = "mobile app";
10
10
  SocialMediaTypes["APPLE_STORE"] = "apple store";
11
11
  SocialMediaTypes["PLAY_STORE"] = "play store";
12
12
  })(SocialMediaTypes || (SocialMediaTypes = {}));
@@ -27,3 +27,9 @@ export var FlowsTypes;
27
27
  FlowsTypes["OTP"] = "otp";
28
28
  FlowsTypes["AUTH"] = "auth";
29
29
  })(FlowsTypes || (FlowsTypes = {}));
30
+ export var AuthForType;
31
+ (function (AuthForType) {
32
+ AuthForType["MOBILE"] = "mobile";
33
+ AuthForType["EMAIL"] = "email";
34
+ AuthForType["NATIONAL_ID"] = "national_id";
35
+ })(AuthForType || (AuthForType = {}));
@@ -1,4 +1,4 @@
1
- import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SalesChannel, SourceOfIncome } from './app';
1
+ import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, SourceOfIncome } from './app';
2
2
  export declare type MobileFormValues = {
3
3
  mobile: string | null;
4
4
  countryCode: CountryCode;
@@ -16,6 +16,14 @@ export declare type NIDFormValues = {
16
16
  nid: string;
17
17
  dob: string;
18
18
  };
19
+ export declare type IDFormValues = {
20
+ nid: string;
21
+ dob: string;
22
+ termAndConditionChecked: boolean;
23
+ };
24
+ export declare type CivilFormValues = {
25
+ civilId: string;
26
+ };
19
27
  export declare type IndividualFormValues = {
20
28
  name: string;
21
29
  email: string;
@@ -24,22 +32,20 @@ export declare type IndividualFormValues = {
24
32
  };
25
33
  export declare type BrandFormValues = {
26
34
  brandName: string;
27
- salesChannels: Array<SalesChannel>;
28
- links: {
29
- website: string;
30
- twitter: string;
31
- instagram: string;
32
- };
35
+ salesChannels: Array<SaleChannel>;
33
36
  termAndConditionChecked: boolean;
34
37
  selectedBrandItem: BrandInfo;
35
38
  };
36
39
  export declare type BusinessTypeFormValues = {
37
40
  licenseNumber: string;
41
+ entityLegalName?: string;
38
42
  selectedLicense?: License;
43
+ certificateId?: string;
44
+ certificateFile?: File;
45
+ uploading?: boolean;
39
46
  };
40
47
  export declare type ActivitiesFormValues = {
41
48
  activities: Array<Activity> | undefined;
42
- salesChannels: Array<SalesChannel>;
43
49
  operationStartDate: string;
44
50
  };
45
51
  export declare type CustomersFormValues = {
@@ -76,9 +82,12 @@ export declare type PasswordCreateFormValues = {
76
82
  confirmPassword: string;
77
83
  };
78
84
  export declare type EntityFormValues = {
79
- licenseNumber?: string;
80
- licenseName?: string;
81
- activities?: Array<Activity>;
82
- salesChannels?: Array<SalesChannel>;
85
+ licenseNumber: string;
86
+ licenseName: string;
87
+ licenseType: string;
88
+ activities: Array<Activity>;
83
89
  operationStartDate: string;
90
+ uploading?: boolean;
91
+ articleId?: string;
92
+ articleFile?: File;
84
93
  };
@@ -8,19 +8,25 @@ export declare type EmailCredential = {
8
8
  email: string;
9
9
  };
10
10
  export declare type IDCredential = {
11
- country_code: string;
11
+ country_code?: string;
12
+ identification_id: string;
13
+ identification_id_type?: string;
14
+ date_of_birth?: string;
15
+ };
16
+ export declare type CivilID = {
12
17
  identification_id: string;
13
- identification_id_type: string;
14
- date_of_birth: string;
18
+ country_code: string;
15
19
  };
16
20
  export declare type CreateAuthBody = {
17
- user_credentail: MobileCredential | EmailCredential | IDCredential;
21
+ user_credentail: MobileCredential | EmailCredential | IDCredential | CivilID;
18
22
  auth_type?: number;
19
23
  email_url?: string;
20
24
  sign_in?: boolean;
25
+ is_lead?: boolean;
21
26
  step_name?: string;
22
27
  encryption_contract: Array<string>;
23
28
  lang?: LanguageMode;
29
+ lead_id?: string;
24
30
  };
25
31
  export declare type VerifyAuthBody = {
26
32
  auth_token: string;
@@ -29,7 +35,7 @@ export declare type VerifyAuthBody = {
29
35
  device_token: string;
30
36
  step_name: string;
31
37
  service_name: string;
32
- new_user: boolean;
38
+ new_user?: boolean;
33
39
  sign_in: boolean;
34
40
  encryption_contract: Array<string>;
35
41
  remember_me?: boolean;
@@ -56,9 +62,26 @@ export declare type CreatePasswordBody = {
56
62
  step_name: string;
57
63
  encryption_contract: Array<string>;
58
64
  };
65
+ export declare type VerifyAuthKitOTPBody = {
66
+ auth_token?: string;
67
+ lead_id?: string;
68
+ data: string;
69
+ auth_type: number;
70
+ service_name: string;
71
+ sign_in: boolean;
72
+ device_token: string;
73
+ post_url: string;
74
+ scopes?: Array<string>;
75
+ terms: Array<string>;
76
+ encryption_contract: Array<string>;
77
+ };
59
78
  declare const authService: {
60
79
  createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
61
80
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
62
81
  createPassword: (data: CreatePasswordBody) => Promise<any>;
82
+ verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
83
+ getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
84
+ getTokenVerify: (token: string, config?: AxiosRequestConfig) => Promise<any>;
85
+ createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
63
86
  };
64
87
  export { authService };
package/build/api/auth.js CHANGED
@@ -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
  import instance, { httpClient } from './axios';
2
13
  import { ENDPOINT_PATHS } from '../constants';
3
14
  var createAuth = function (data, config) {
@@ -13,9 +24,33 @@ var createPassword = function (data) {
13
24
  data: data
14
25
  });
15
26
  };
27
+ var getVerifyAuth = function (token, config) {
28
+ return httpClient(__assign({ method: 'get', url: "".concat(ENDPOINT_PATHS.AUTH, "/").concat(token) }, config));
29
+ };
30
+ var getTokenVerify = function (token, config) {
31
+ return httpClient(__assign({ method: 'get', url: "".concat(ENDPOINT_PATHS.TOKEN_VERIFY, "/").concat(token) }, config));
32
+ };
33
+ var verifyAuthKitOTP = function (data) {
34
+ return httpClient({
35
+ method: 'put',
36
+ url: "".concat(ENDPOINT_PATHS.VERIFY_AUTH_OTP),
37
+ data: data
38
+ });
39
+ };
40
+ var createAuthKitNID = function (data) {
41
+ return httpClient({
42
+ method: 'post',
43
+ url: "".concat(ENDPOINT_PATHS.CREATE_AUTH_NID),
44
+ data: data
45
+ });
46
+ };
16
47
  var authService = {
17
48
  createAuth: createAuth,
18
49
  verifyAuth: verifyAuth,
19
- createPassword: createPassword
50
+ createPassword: createPassword,
51
+ verifyAuthKitOTP: verifyAuthKitOTP,
52
+ getVerifyAuth: getVerifyAuth,
53
+ getTokenVerify: getTokenVerify,
54
+ createAuthKitNID: createAuthKitNID
20
55
  };
21
56
  export { authService };
@@ -91,8 +91,8 @@ export var httpClient = function (config) { return __awaiter(void 0, void 0, voi
91
91
  case 1:
92
92
  data = (_c.sent()).data;
93
93
  _a = (data.errors || [{}])[0], description = _a.description, error = _a.error;
94
- if (description || error) {
95
- throw new Error(description, error);
94
+ if (description || error || (data === null || data === void 0 ? void 0 : data.status) === 'fail') {
95
+ throw new Error(description || error || (data === null || data === void 0 ? void 0 : data.message));
96
96
  }
97
97
  return [2, data];
98
98
  case 2:
@@ -1,7 +1,8 @@
1
- import { BrandListBody, UpdateBrandBody } from '../api/individual';
1
+ import { BrandListBody, UpdateBrandBody, UpdateSalesChannels } from '../api/individual';
2
2
  declare const brandService: {
3
3
  retrieveBrand: (id: string) => Promise<any>;
4
4
  getBrandList: (data: BrandListBody) => Promise<any>;
5
5
  updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
6
+ updateBrandSales: ({ id, ...data }: UpdateSalesChannels) => void;
6
7
  };
7
8
  export { brandService };
@@ -32,9 +32,18 @@ var updateBrandInfo = function (_a) {
32
32
  data: data
33
33
  });
34
34
  };
35
+ var updateBrandSales = function (_a) {
36
+ var id = _a.id, data = __rest(_a, ["id"]);
37
+ httpClient({
38
+ method: 'put',
39
+ url: "".concat(ENDPOINT_PATHS.BRAND_SALES_CHANNELS, "/").concat(id),
40
+ data: data
41
+ });
42
+ };
35
43
  var brandService = {
36
44
  retrieveBrand: retrieveBrand,
37
45
  getBrandList: getBrandList,
38
- updateBrandInfo: updateBrandInfo
46
+ updateBrandInfo: updateBrandInfo,
47
+ updateBrandSales: updateBrandSales
39
48
  };
40
49
  export { brandService };
@@ -1,4 +1,6 @@
1
1
  declare const countryService: {
2
- getCountries: () => Promise<any>;
2
+ getCountries: (disableCountries?: boolean) => Promise<any> | {
3
+ list: never[];
4
+ };
3
5
  };
4
6
  export { countryService };
@@ -1,6 +1,8 @@
1
1
  import { httpClient } from './axios';
2
2
  import { ENDPOINT_PATHS } from '../constants';
3
- var getCountries = function () {
3
+ var getCountries = function (disableCountries) {
4
+ if (disableCountries)
5
+ return { list: [] };
4
6
  return httpClient({
5
7
  method: 'post',
6
8
  url: ENDPOINT_PATHS.COUNTRIES
@@ -1,10 +1,41 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ declare type GetOccupationBody = {
3
+ page: number;
4
+ };
5
+ declare type GetMonthlyIncomeBody = {
6
+ page: number;
7
+ country_code: Array<string>;
8
+ };
9
+ export declare type DataElementBody = {
10
+ id: string;
11
+ name: {
12
+ en: string;
13
+ ar: string;
14
+ };
15
+ };
16
+ declare type GetCustomerBasesBody = {
17
+ page: number;
18
+ };
19
+ declare type GetExpectedSalesBody = {
20
+ page: number;
21
+ };
22
+ declare type GetExpectedCustomerSalesBody = {
23
+ page: number;
24
+ };
25
+ declare type GetSourceOfIncomeBody = {
26
+ page: number;
27
+ };
28
+ declare type GetChannelsOfServicesBody = {
29
+ page: number;
30
+ };
1
31
  declare const dataService: {
2
- getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
3
- getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
4
- getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
5
- getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
6
- getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
7
- getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
8
- getOccupation: () => Promise<any>;
32
+ getChannelsOfServices: (data: GetChannelsOfServicesBody) => Promise<any>;
33
+ getCustomerBases: (data: GetCustomerBasesBody) => Promise<any>;
34
+ getExpectedSales: (data: GetExpectedSalesBody) => Promise<any>;
35
+ getExpectedCustomerSales: (data: GetExpectedCustomerSalesBody) => Promise<any>;
36
+ getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
37
+ getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
38
+ getOccupation: (data: GetOccupationBody) => Promise<any>;
39
+ getActivities: (config?: AxiosRequestConfig) => Promise<any>;
9
40
  };
10
41
  export { dataService };
package/build/api/data.js CHANGED
@@ -1,29 +1,68 @@
1
- import instance, { httpClient } from './axios';
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 { httpClient } from './axios';
2
13
  import { ENDPOINT_PATHS } from '../constants';
3
- var getChannelsOfServices = function () {
4
- return instance.get("".concat(ENDPOINT_PATHS.CHANNEL));
14
+ var getChannelsOfServices = function (data) {
15
+ return httpClient({
16
+ method: 'post',
17
+ url: "".concat(ENDPOINT_PATHS.CHANNEL),
18
+ data: data
19
+ });
5
20
  };
6
- var getCustomerBases = function () {
7
- return instance.get("".concat(ENDPOINT_PATHS.CUSTOMER_BASES));
21
+ var getCustomerBases = function (data) {
22
+ return httpClient({
23
+ method: 'post',
24
+ url: "".concat(ENDPOINT_PATHS.CUSTOMER_BASES),
25
+ data: data
26
+ });
8
27
  };
9
- var getExpectedSales = function () {
10
- return instance.get("".concat(ENDPOINT_PATHS.SALES));
28
+ var getExpectedSales = function (data) {
29
+ return httpClient({
30
+ method: 'post',
31
+ url: "".concat(ENDPOINT_PATHS.SALES),
32
+ data: data
33
+ });
11
34
  };
12
- var getExpectedCustomerSales = function () {
13
- return instance.get("".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS));
35
+ var getExpectedCustomerSales = function (data) {
36
+ return httpClient({
37
+ method: 'post',
38
+ url: "".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS),
39
+ data: data
40
+ });
14
41
  };
15
- var getSourceOfIncome = function () {
16
- return instance.get("".concat(ENDPOINT_PATHS.SOURCE_INCOME));
42
+ var getSourceOfIncome = function (data) {
43
+ return httpClient({
44
+ method: 'post',
45
+ url: "".concat(ENDPOINT_PATHS.SOURCE_INCOME),
46
+ data: data
47
+ });
17
48
  };
18
- var getMonthlyIncome = function (countryCode) {
19
- return instance.get("".concat(ENDPOINT_PATHS.MONTHLY_INCOME, "/").concat(countryCode));
49
+ var getMonthlyIncome = function (data) {
50
+ return httpClient({
51
+ method: 'post',
52
+ url: "".concat(ENDPOINT_PATHS.MONTHLY_INCOME),
53
+ data: data
54
+ });
20
55
  };
21
- var getOccupation = function () {
56
+ var getOccupation = function (data) {
22
57
  return httpClient({
23
- method: 'get',
24
- url: "".concat(ENDPOINT_PATHS.OCCUPATION)
58
+ method: 'post',
59
+ url: "".concat(ENDPOINT_PATHS.OCCUPATION),
60
+ data: data
25
61
  });
26
62
  };
63
+ var getActivities = function (config) {
64
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.RETRIEVE_ACTIVITIES_LIST_PATH) }, config));
65
+ };
27
66
  var dataService = {
28
67
  getChannelsOfServices: getChannelsOfServices,
29
68
  getCustomerBases: getCustomerBases,
@@ -31,6 +70,7 @@ var dataService = {
31
70
  getExpectedCustomerSales: getExpectedCustomerSales,
32
71
  getSourceOfIncome: getSourceOfIncome,
33
72
  getMonthlyIncome: getMonthlyIncome,
34
- getOccupation: getOccupation
73
+ getOccupation: getOccupation,
74
+ getActivities: getActivities
35
75
  };
36
76
  export { dataService };
@@ -2,7 +2,9 @@ import { AxiosRequestConfig } from 'axios';
2
2
  export declare type EntityInfoBody = {
3
3
  id: string;
4
4
  lead_id?: string;
5
- activities?: Array<string>;
5
+ activities?: Array<{
6
+ id: string;
7
+ }>;
6
8
  license_name?: string;
7
9
  license_number?: string;
8
10
  business_operation_start_at?: string;
@@ -16,12 +18,18 @@ export declare type EntityInfoBody = {
16
18
  agree_refund?: boolean;
17
19
  employer_name?: string;
18
20
  employer_country?: string | null;
19
- source_income?: Array<string | undefined>;
20
- actual_income?: string;
21
+ source_income?: Array<{
22
+ id?: string;
23
+ }>;
24
+ monthly_income?: {
25
+ id?: string;
26
+ };
21
27
  is_relative_PEP?: boolean | null;
22
28
  is_influencer?: boolean | null;
23
29
  is_vat_acknowledged?: boolean;
24
- occupation?: string;
30
+ occupation?: {
31
+ id?: string;
32
+ };
25
33
  step_name: string;
26
34
  encryption_contract?: Array<string>;
27
35
  };
@@ -44,6 +52,41 @@ export declare type UploadFileBody = {
44
52
  file?: File;
45
53
  title: string | undefined;
46
54
  purpose: string;
55
+ type?: string;
56
+ };
57
+ export declare type UpdateEntityBody = {
58
+ id: string;
59
+ license?: {
60
+ type?: string;
61
+ number?: string;
62
+ additional_info?: {
63
+ unified_number: string;
64
+ };
65
+ issuing_date?: number;
66
+ expiry_date?: string;
67
+ };
68
+ activities?: Array<{
69
+ id: string;
70
+ action: string;
71
+ }>;
72
+ legal_name: {
73
+ ar: string;
74
+ en: string;
75
+ };
76
+ AOA_file_id?: string;
77
+ encryption_contract?: Array<string>;
78
+ };
79
+ export declare type DocumentInfo = {
80
+ type?: string;
81
+ number?: string;
82
+ issuing_country?: string;
83
+ issuing_date?: string;
84
+ expiry_date?: string;
85
+ images: Array<string>;
86
+ };
87
+ export declare type DocumentUpdateBody = {
88
+ entity_id: boolean;
89
+ documents: Array<DocumentInfo>;
47
90
  };
48
91
  declare const entityService: {
49
92
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -52,6 +95,9 @@ declare const entityService: {
52
95
  retrieveBankAccount: (id: string) => Promise<any>;
53
96
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
54
97
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
55
- uploadFileInfo: (data: UploadFileBody) => Promise<any>;
98
+ uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
99
+ updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
100
+ retrieveEntity: (entity_id: string) => Promise<any>;
101
+ updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
56
102
  };
57
103
  export { entityService };