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

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 (280) hide show
  1. package/build/@types/app.d.ts +57 -20
  2. package/build/@types/app.js +14 -1
  3. package/build/@types/form.d.ts +17 -10
  4. package/build/api/auth.d.ts +24 -2
  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 +28 -5
  14. package/build/api/entity.js +23 -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 +41 -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 +8 -6
  21. package/build/app/rootReducer.d.ts +1 -1
  22. package/build/app/rootReducer.js +2 -2
  23. package/build/app/settings.d.ts +8 -2
  24. package/build/app/settings.js +29 -12
  25. package/build/app/store.d.ts +3 -3
  26. package/build/assets/locales/ar.json +256 -179
  27. package/build/assets/locales/en.json +188 -104
  28. package/build/components/AnimationFlow/AnimationFlow.d.ts +5 -1
  29. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  30. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  31. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  32. package/build/components/AnimationFlow/Dialog.d.ts +5 -1
  33. package/build/components/AnimationFlow/Dialog.js +11 -5
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  36. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  37. package/build/components/ArabicDatePicker/index.js +2 -0
  38. package/build/components/ArabicDatePicker/style.css +24 -0
  39. package/build/components/FileInput/DragAndDrop.d.ts +10 -1
  40. package/build/components/FileInput/DragAndDrop.js +107 -8
  41. package/build/components/Lottie/Lottie.d.ts +878 -0
  42. package/build/components/Lottie/Lottie.js +58 -0
  43. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  44. package/build/components/Lottie/files/success.json +425 -0
  45. package/build/components/Lottie/index.d.ts +3 -0
  46. package/build/components/Lottie/index.js +3 -0
  47. package/build/components/OTPField/OTPField.d.ts +2 -1
  48. package/build/components/OTPField/OTPField.js +2 -2
  49. package/build/components/OTPTimer/OTPTimer.js +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  51. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  52. package/build/components/ProgressBar/index.d.ts +2 -0
  53. package/build/components/ProgressBar/index.js +2 -0
  54. package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
  55. package/build/components/RadioLabel/RadioLabel.js +2 -2
  56. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -4
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.js +3 -55
  58. package/build/constants/api.d.ts +6 -0
  59. package/build/constants/api.js +14 -1
  60. package/build/constants/app.d.ts +7 -5
  61. package/build/constants/app.js +55 -22
  62. package/build/constants/assets.d.ts +20 -1
  63. package/build/constants/assets.js +27 -8
  64. package/build/constants/dummy.d.ts +1 -1
  65. package/build/constants/dummy.js +2 -2
  66. package/build/constants/validation.d.ts +8 -0
  67. package/build/constants/validation.js +9 -1
  68. package/build/features/app/auth/authStore.d.ts +47 -0
  69. package/build/features/app/auth/authStore.js +265 -0
  70. package/build/features/app/bank/bankStore.d.ts +16 -0
  71. package/build/features/app/bank/bankStore.js +81 -37
  72. package/build/features/app/business/businessStore.d.ts +22 -3
  73. package/build/features/app/business/businessStore.js +430 -290
  74. package/build/features/app/connect/connectStore.d.ts +33 -30
  75. package/build/features/app/connect/connectStore.js +398 -258
  76. package/build/features/app/entity/entityStore.d.ts +5 -0
  77. package/build/features/app/entity/entityStore.js +153 -14
  78. package/build/features/app/individual/individualStore.d.ts +17 -0
  79. package/build/features/app/individual/individualStore.js +167 -83
  80. package/build/features/app/password/passwordStore.js +1 -1
  81. package/build/features/app/tax/taxStore.js +3 -2
  82. package/build/features/auth/Auth.d.ts +10 -0
  83. package/build/features/auth/Auth.js +87 -0
  84. package/build/features/auth/index.d.ts +1 -0
  85. package/build/features/auth/index.js +1 -0
  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 +67 -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.d.ts +5 -0
  99. package/build/features/auth/screens/OTP/OTP.js +76 -0
  100. package/build/features/{otp/screens/OTPVerify/Verify.d.ts → auth/screens/OTP/OTPInput.d.ts} +0 -0
  101. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/OTPInput.js +11 -7
  102. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  103. package/build/features/auth/screens/OTP/index.js +2 -0
  104. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.d.ts +0 -0
  105. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.js +0 -0
  106. package/build/features/bank/Bank.js +12 -6
  107. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  108. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  109. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  110. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  111. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  112. package/build/features/business/Business.d.ts +1 -1
  113. package/build/features/business/Business.js +14 -7
  114. package/build/features/business/screens/Activities/Activities.js +1 -6
  115. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  116. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  117. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  118. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  119. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  120. package/build/features/business/screens/Activities/validation.js +0 -9
  121. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  122. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  123. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  124. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  125. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  126. package/build/features/business/screens/BusinessType/LicenseList.js +24 -7
  127. package/build/features/business/screens/BusinessType/LicenseNumber.js +14 -8
  128. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  129. package/build/features/business/screens/BusinessType/LicenseType.js +67 -0
  130. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  131. package/build/features/business/screens/BusinessType/validation.js +50 -1
  132. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  133. package/build/features/business/screens/CivilID/CivilID.js +84 -0
  134. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  135. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  136. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  137. package/build/features/business/screens/CivilID/index.js +2 -0
  138. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  139. package/build/features/business/screens/CivilID/validation.js +4 -0
  140. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  141. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  142. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  143. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  144. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  145. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  146. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -7
  147. package/build/features/business/screens/Verify/Verify.js +4 -4
  148. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +157 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  152. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  153. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  154. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  155. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  156. package/build/features/connect/Connect.d.ts +2 -1
  157. package/build/features/connect/Connect.js +47 -12
  158. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  159. package/build/features/connect/screens/CivilID/CivilID.js +98 -0
  160. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  161. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  162. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  163. package/build/features/connect/screens/CivilID/index.js +2 -0
  164. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  165. package/build/features/connect/screens/CivilID/validation.js +4 -0
  166. package/build/features/connect/screens/Individual/Email.js +11 -3
  167. package/build/features/connect/screens/Individual/Individual.js +27 -14
  168. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  169. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  170. package/build/features/connect/screens/Merchant/Merchant.js +47 -50
  171. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +7 -0
  172. package/build/features/connect/screens/Merchant/SalesChannels.js +113 -0
  173. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  174. package/build/features/connect/screens/Merchant/SocialMedia.js +131 -66
  175. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  176. package/build/features/connect/screens/Merchant/validation.d.ts +22 -45
  177. package/build/features/connect/screens/Merchant/validation.js +117 -116
  178. package/build/features/connect/screens/Mobile/Mobile.js +31 -10
  179. package/build/features/connect/screens/NID/NID.js +2 -1
  180. package/build/features/connect/screens/OTP/OTP.js +5 -4
  181. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  186. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  187. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  188. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  189. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  190. package/build/features/entity/Entity.d.ts +1 -1
  191. package/build/features/entity/Entity.js +16 -9
  192. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  193. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +140 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +52 -2
  195. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  196. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  197. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  198. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  199. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  200. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  201. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.d.ts +0 -0
  202. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.js +8 -5
  203. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  204. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  205. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -5
  206. package/build/features/featuresScreens.d.ts +1 -1
  207. package/build/features/featuresScreens.js +31 -6
  208. package/build/features/individual/Individual.d.ts +1 -1
  209. package/build/features/individual/Individual.js +14 -7
  210. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  211. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  212. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  213. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  214. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  215. package/build/features/individual/screens/Verify/Verify.js +4 -4
  216. package/build/features/password/Password.d.ts +1 -1
  217. package/build/features/password/Password.js +14 -7
  218. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -9
  219. package/build/features/shared/Background/Background.d.ts +6 -5
  220. package/build/features/shared/Background/Background.js +16 -5
  221. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  222. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  223. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  224. package/build/features/shared/Button/MobileButton.js +2 -2
  225. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  226. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  227. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  228. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  229. package/build/features/shared/Dialog/index.d.ts +4 -0
  230. package/build/features/shared/Dialog/index.js +4 -0
  231. package/build/features/shared/Input/Input.d.ts +1 -1
  232. package/build/features/shared/Input/Input.js +2 -2
  233. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  234. package/build/features/shared/UploadFile/UploadFile.d.ts +9 -3
  235. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  236. package/build/features/signIn/SignIn.d.ts +1 -1
  237. package/build/features/signIn/SignIn.js +14 -6
  238. package/build/features/tax/Tax.d.ts +1 -1
  239. package/build/features/tax/Tax.js +16 -8
  240. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +11 -7
  241. package/build/hooks/index.d.ts +1 -0
  242. package/build/hooks/index.js +1 -0
  243. package/build/hooks/useAppConfig.d.ts +3 -1
  244. package/build/hooks/useAppConfig.js +4 -2
  245. package/build/hooks/useAppDispatch.d.ts +1 -1
  246. package/build/hooks/useErrorListener.js +0 -5
  247. package/build/hooks/useScreen.d.ts +3 -0
  248. package/build/hooks/useScreen.js +14 -0
  249. package/build/index.d.ts +3 -3
  250. package/build/index.js +5 -5
  251. package/build/utils/array.d.ts +13 -1
  252. package/build/utils/array.js +26 -0
  253. package/build/utils/common.d.ts +1 -0
  254. package/build/utils/common.js +3 -0
  255. package/build/utils/device.d.ts +1 -0
  256. package/build/utils/device.js +13 -0
  257. package/build/utils/html.d.ts +1 -0
  258. package/build/utils/html.js +6 -0
  259. package/build/utils/index.d.ts +1 -0
  260. package/build/utils/index.js +1 -0
  261. package/build/utils/locale.js +1 -1
  262. package/build/utils/object.d.ts +1 -0
  263. package/build/utils/object.js +12 -0
  264. package/build/utils/rsa.d.ts +2 -2
  265. package/build/utils/rsa.js +1 -1
  266. package/build/utils/string.d.ts +33 -20
  267. package/build/utils/string.js +71 -1
  268. package/build/utils/validation.d.ts +2 -0
  269. package/build/utils/validation.js +6 -0
  270. package/package.json +129 -128
  271. package/build/features/app/otp/otpStore.d.ts +0 -28
  272. package/build/features/app/otp/otpStore.js +0 -153
  273. package/build/features/otp/OTP.d.ts +0 -7
  274. package/build/features/otp/OTP.js +0 -55
  275. package/build/features/otp/index.d.ts +0 -0
  276. package/build/features/otp/index.js +0 -1
  277. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  278. package/build/features/otp/screens/OTPVerify/Verify.js +0 -50
  279. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  280. package/build/features/otp/screens/OTPVerify/index.js +0 -2
@@ -42,25 +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
- TWITTER = "twitter"
47
+ TWITTER = "twitter",
48
+ SOCIAL = "social media",
49
+ PHYSICAL_STORE = "physical store",
50
+ CALL_CENTER = "call center",
51
+ APP = "mobile app",
52
+ APPLE_STORE = "apple store",
53
+ PLAY_STORE = "play store"
48
54
  }
49
55
  export interface CustomerLocation {
50
56
  id: string;
51
- name_ar: string;
52
- name_en: string;
57
+ code: string;
58
+ name: {
59
+ ar: string;
60
+ en: string;
61
+ };
53
62
  }
54
63
  export interface ExpectedCustomer extends CustomerLocation {
55
64
  }
56
65
  export interface ExpectedSaleRange {
57
66
  id: string;
58
- name_ar: string;
59
- name_en: string;
67
+ name: {
68
+ ar: string;
69
+ en: string;
70
+ };
60
71
  sub?: Array<{
61
72
  id: string;
62
- name_ar: string;
63
- name_en: string;
73
+ name: {
74
+ ar: string;
75
+ en: string;
76
+ };
64
77
  }>;
65
78
  }
66
79
  export declare enum BusinessType {
@@ -78,25 +91,44 @@ export interface License {
78
91
  type: string;
79
92
  }
80
93
  export interface Activity {
81
- ar: string;
82
- en: string;
94
+ id: string;
95
+ name: {
96
+ ar: string;
97
+ en: string;
98
+ };
83
99
  }
84
- export interface SalesChannel {
100
+ export interface SubSaleChannel {
85
101
  id: string;
86
- name_ar: string;
87
- 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>;
88
112
  }
89
113
  export interface SourceOfIncome {
90
114
  id: string;
91
- name_ar: string;
92
- name_en: string;
115
+ name: {
116
+ ar: string;
117
+ en: string;
118
+ };
93
119
  }
94
120
  export interface Occupation {
95
121
  id: string;
96
- name_ar: string;
97
- name_en: string;
122
+ name: {
123
+ ar: string;
124
+ en: string;
125
+ };
98
126
  }
99
127
  export interface MonthlyIncome extends SourceOfIncome {
128
+ range: {
129
+ ar: string;
130
+ en: string;
131
+ };
100
132
  }
101
133
  export interface AppInfo {
102
134
  name: string;
@@ -178,8 +210,7 @@ export declare type BrandInfo = {
178
210
  ar: string;
179
211
  en: string;
180
212
  };
181
- website: string;
182
- social: Array<string>;
213
+ channel_services: SaleChannel[];
183
214
  };
184
215
  export declare enum FlowsTypes {
185
216
  CONNECT = "connect",
@@ -189,11 +220,17 @@ export declare enum FlowsTypes {
189
220
  PASSWORD = "password",
190
221
  TAX = "tax",
191
222
  ENTITY = "entity",
192
- OTP = "otp"
223
+ OTP = "otp",
224
+ AUTH = "auth"
193
225
  }
194
226
  export declare type FlowInfo = {
195
227
  name: string;
196
228
  status: string;
197
229
  url: string;
198
230
  };
231
+ export declare enum AuthForType {
232
+ MOBILE = "mobile",
233
+ EMAIL = "email",
234
+ NATIONAL_ID = "national_id"
235
+ }
199
236
  export {};
@@ -1,8 +1,14 @@
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 media";
7
+ SocialMediaTypes["PHYSICAL_STORE"] = "physical store";
8
+ SocialMediaTypes["CALL_CENTER"] = "call center";
9
+ SocialMediaTypes["APP"] = "mobile app";
10
+ SocialMediaTypes["APPLE_STORE"] = "apple store";
11
+ SocialMediaTypes["PLAY_STORE"] = "play store";
6
12
  })(SocialMediaTypes || (SocialMediaTypes = {}));
7
13
  export var BusinessType;
8
14
  (function (BusinessType) {
@@ -19,4 +25,11 @@ export var FlowsTypes;
19
25
  FlowsTypes["TAX"] = "tax";
20
26
  FlowsTypes["ENTITY"] = "entity";
21
27
  FlowsTypes["OTP"] = "otp";
28
+ FlowsTypes["AUTH"] = "auth";
22
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,21 +32,20 @@ export declare type IndividualFormValues = {
24
32
  };
25
33
  export declare type BrandFormValues = {
26
34
  brandName: string;
27
- links: {
28
- website: string;
29
- twitter: string;
30
- instagram: string;
31
- };
35
+ salesChannels: Array<SaleChannel>;
32
36
  termAndConditionChecked: boolean;
33
37
  selectedBrandItem: BrandInfo;
34
38
  };
35
39
  export declare type BusinessTypeFormValues = {
36
40
  licenseNumber: string;
41
+ entityLegalName?: string;
37
42
  selectedLicense?: License;
43
+ certificateId?: string;
44
+ certificateFile?: File;
45
+ uploading?: boolean;
38
46
  };
39
47
  export declare type ActivitiesFormValues = {
40
48
  activities: Array<Activity> | undefined;
41
- salesChannels: Array<SalesChannel>;
42
49
  operationStartDate: string;
43
50
  };
44
51
  export declare type CustomersFormValues = {
@@ -75,9 +82,9 @@ export declare type PasswordCreateFormValues = {
75
82
  confirmPassword: string;
76
83
  };
77
84
  export declare type EntityFormValues = {
78
- licenseNumber: string;
79
- licenseName: string;
85
+ licenseNumber?: string;
86
+ licenseName?: string;
80
87
  activities?: Array<Activity>;
81
- salesChannels: Array<SalesChannel>;
88
+ salesChannels?: Array<SaleChannel>;
82
89
  operationStartDate: string;
83
90
  };
@@ -13,11 +13,16 @@ export declare type IDCredential = {
13
13
  identification_id_type: string;
14
14
  date_of_birth: string;
15
15
  };
16
+ export declare type CivilID = {
17
+ identification_id: string;
18
+ country_code: string;
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,7 +34,7 @@ export declare type VerifyAuthBody = {
29
34
  device_token: string;
30
35
  step_name: string;
31
36
  service_name: string;
32
- new_user: boolean;
37
+ new_user?: boolean;
33
38
  sign_in: boolean;
34
39
  encryption_contract: Array<string>;
35
40
  remember_me?: boolean;
@@ -56,9 +61,26 @@ export declare type CreatePasswordBody = {
56
61
  step_name: string;
57
62
  encryption_contract: Array<string>;
58
63
  };
64
+ export declare type VerifyAuthKitOTPBody = {
65
+ auth_token?: string;
66
+ lead_id?: string;
67
+ data: string;
68
+ auth_type: number;
69
+ service_name: string;
70
+ sign_in: boolean;
71
+ device_token: string;
72
+ post_url: string;
73
+ scopes?: Array<string>;
74
+ terms: Array<string>;
75
+ encryption_contract: Array<string>;
76
+ };
59
77
  declare const authService: {
60
78
  createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
61
79
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
62
80
  createPassword: (data: CreatePasswordBody) => Promise<any>;
81
+ verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
82
+ getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
83
+ getTokenVerify: (token: string, config?: AxiosRequestConfig) => Promise<any>;
84
+ createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
63
85
  };
64
86
  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,11 @@ 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
+ }>;
8
+ license_name?: string;
9
+ license_number?: string;
6
10
  business_operation_start_at?: string;
7
11
  channel_services?: Array<string>;
8
12
  physical_store_available?: boolean;
@@ -14,12 +18,18 @@ export declare type EntityInfoBody = {
14
18
  agree_refund?: boolean;
15
19
  employer_name?: string;
16
20
  employer_country?: string | null;
17
- source_income?: Array<string | undefined>;
18
- actual_income?: string;
21
+ source_income?: Array<{
22
+ id?: string;
23
+ }>;
24
+ monthly_income?: {
25
+ id?: string;
26
+ };
19
27
  is_relative_PEP?: boolean | null;
20
28
  is_influencer?: boolean | null;
21
29
  is_vat_acknowledged?: boolean;
22
- occupation?: string;
30
+ occupation?: {
31
+ id?: string;
32
+ };
23
33
  step_name: string;
24
34
  encryption_contract?: Array<string>;
25
35
  };
@@ -43,6 +53,18 @@ export declare type UploadFileBody = {
43
53
  title: string | undefined;
44
54
  purpose: string;
45
55
  };
56
+ export declare type DocumentInfo = {
57
+ type?: string;
58
+ number?: string;
59
+ issuing_country?: string;
60
+ issuing_date?: string;
61
+ expiry_date?: string;
62
+ images: Array<string>;
63
+ };
64
+ export declare type DocumentUpdateBody = {
65
+ entity_id: boolean;
66
+ documents: Array<DocumentInfo>;
67
+ };
46
68
  declare const entityService: {
47
69
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
48
70
  updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -50,6 +72,7 @@ declare const entityService: {
50
72
  retrieveBankAccount: (id: string) => Promise<any>;
51
73
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
52
74
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
53
- uploadFileInfo: (data: UploadFileBody) => Promise<any>;
75
+ uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
76
+ updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
54
77
  };
55
78
  export { entityService };
@@ -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)
@@ -31,19 +42,21 @@ var retrieveBankAccount = function (id) {
31
42
  url: "".concat(ENDPOINT_PATHS.BANK, "/").concat(id)
32
43
  });
33
44
  };
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
- });
45
+ var uploadFileInfo = function (data, config) {
46
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
41
47
  };
42
48
  var updateIndividualInfo = function (_a) {
43
49
  var id = _a.id, data = __rest(_a, ["id"]);
44
50
  return httpClient({
45
51
  method: 'put',
46
- url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(id, "/info"),
52
+ url: "".concat(ENDPOINT_PATHS.USER, "/").concat(id, "/info"),
53
+ data: data
54
+ });
55
+ };
56
+ var updateDocumentInfo = function (data) {
57
+ return httpClient({
58
+ method: 'post',
59
+ url: "".concat(ENDPOINT_PATHS.DOCUMENT),
47
60
  data: data
48
61
  });
49
62
  };
@@ -54,6 +67,7 @@ var entityService = {
54
67
  retrieveBankAccount: retrieveBankAccount,
55
68
  retrieveEntityInfo: retrieveEntityInfo,
56
69
  updateIndividualInfo: updateIndividualInfo,
57
- uploadFileInfo: uploadFileInfo
70
+ uploadFileInfo: uploadFileInfo,
71
+ updateDocumentInfo: updateDocumentInfo
58
72
  };
59
73
  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