@transfergratis/react-native-sdk 0.1.3 → 0.1.5

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 (308) hide show
  1. package/android/.idea/caches/deviceStreaming.xml +860 -0
  2. package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -0
  4. package/android/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
  5. package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  6. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  7. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
  8. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  9. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +51 -48
  10. package/android/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-transfergratis-react-native-sdk.jar +0 -0
  11. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -0
  12. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  13. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  14. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  15. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  16. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  17. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  18. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  19. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  20. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  21. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  22. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  23. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  24. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  25. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  51. package/android/build/outputs/aar/transfergratis-react-native-sdk-debug.aar +0 -0
  52. package/android/build/outputs/logs/manifest-merger-debug-report.txt +27 -23
  53. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
  54. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
  55. package/android/build.gradle +1 -5
  56. package/android/src/main/AndroidManifest.xml +1 -0
  57. package/build/api/axios.d.ts +30 -0
  58. package/build/api/axios.d.ts.map +1 -0
  59. package/build/api/axios.js +92 -0
  60. package/build/api/axios.js.map +1 -0
  61. package/build/components/EnhancedCameraView.d.ts +1 -41
  62. package/build/components/EnhancedCameraView.d.ts.map +1 -1
  63. package/build/components/EnhancedCameraView.js +76 -35
  64. package/build/components/EnhancedCameraView.js.map +1 -1
  65. package/build/components/EnhancedCameraView.web.d.ts +1 -41
  66. package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
  67. package/build/components/EnhancedCameraView.web.js +28 -4
  68. package/build/components/EnhancedCameraView.web.js.map +1 -1
  69. package/build/components/KYCElements/CountrySelectionTemplate.d.ts +2 -2
  70. package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
  71. package/build/components/KYCElements/CountrySelectionTemplate.js +71 -114
  72. package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
  73. package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
  74. package/build/components/KYCElements/FileUploadTemplate.js +7 -3
  75. package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
  76. package/build/components/KYCElements/IDCardCapture.d.ts +7 -2
  77. package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
  78. package/build/components/KYCElements/IDCardCapture.js +253 -104
  79. package/build/components/KYCElements/IDCardCapture.js.map +1 -1
  80. package/build/components/KYCElements/InitializationStep.d.ts +5 -0
  81. package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
  82. package/build/components/KYCElements/InitializationStep.js +41 -0
  83. package/build/components/KYCElements/InitializationStep.js.map +1 -0
  84. package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
  85. package/build/components/KYCElements/LocationCaptureTemplate.js +15 -13
  86. package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
  87. package/build/components/KYCElements/OrientationVideoCapture.d.ts +2 -2
  88. package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -1
  89. package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
  90. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +2 -2
  91. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -1
  92. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
  93. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +2 -2
  94. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -1
  95. package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
  96. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
  97. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
  98. package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
  99. package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
  100. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +6 -2
  101. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
  102. package/build/components/KYCElements/SelfieCaptureTemplate.js +105 -35
  103. package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
  104. package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
  105. package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
  106. package/build/components/KYCElements/VerificationProgressTemplate.js +93 -0
  107. package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
  108. package/build/components/OverLay/IdCard.d.ts +1 -1
  109. package/build/components/OverLay/IdCard.d.ts.map +1 -1
  110. package/build/components/OverLay/IdCard.js +10 -6
  111. package/build/components/OverLay/IdCard.js.map +1 -1
  112. package/build/components/OverLay/SelfieOverlay.d.ts +1 -1
  113. package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -1
  114. package/build/components/OverLay/SelfieOverlay.js +5 -4
  115. package/build/components/OverLay/SelfieOverlay.js.map +1 -1
  116. package/build/components/OverLay/type.d.ts +71 -1
  117. package/build/components/OverLay/type.d.ts.map +1 -1
  118. package/build/components/OverLay/type.js.map +1 -1
  119. package/build/components/TemplateKYCExample.d.ts.map +1 -1
  120. package/build/components/TemplateKYCExample.js +72 -197
  121. package/build/components/TemplateKYCExample.js.map +1 -1
  122. package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
  123. package/build/components/TemplateKYCFlowRefactored.js +63 -39
  124. package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
  125. package/build/components/VisionCameraView.js +1 -1
  126. package/build/components/VisionCameraView.js.map +1 -1
  127. package/build/components/example/OrientationVideoExample.d.ts.map +1 -1
  128. package/build/components/example/OrientationVideoExample.js +1 -5
  129. package/build/components/example/OrientationVideoExample.js.map +1 -1
  130. package/build/components/ui/Button.js +1 -1
  131. package/build/components/ui/Button.js.map +1 -1
  132. package/build/config/countriesData.d.ts +3 -0
  133. package/build/config/countriesData.d.ts.map +1 -0
  134. package/build/config/countriesData.js +79 -0
  135. package/build/config/countriesData.js.map +1 -0
  136. package/build/config/region_mapping.d.ts +3 -0
  137. package/build/config/region_mapping.d.ts.map +1 -0
  138. package/build/config/region_mapping.js +687 -0
  139. package/build/config/region_mapping.js.map +1 -0
  140. package/build/hooks/useI18n.d.ts +11 -0
  141. package/build/hooks/useI18n.d.ts.map +1 -0
  142. package/build/hooks/useI18n.js +37 -0
  143. package/build/hooks/useI18n.js.map +1 -0
  144. package/build/hooks/useOrientationVideo.d.ts +1 -2
  145. package/build/hooks/useOrientationVideo.d.ts.map +1 -1
  146. package/build/hooks/useOrientationVideo.js +2 -1
  147. package/build/hooks/useOrientationVideo.js.map +1 -1
  148. package/build/hooks/useRealtimeVerifier.d.ts +28 -0
  149. package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
  150. package/build/hooks/useRealtimeVerifier.js +91 -0
  151. package/build/hooks/useRealtimeVerifier.js.map +1 -0
  152. package/build/hooks/useTemplateKYCFlow.d.ts +1 -0
  153. package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
  154. package/build/hooks/useTemplateKYCFlow.js +337 -38
  155. package/build/hooks/useTemplateKYCFlow.js.map +1 -1
  156. package/build/i18n/en/index.d.ts +168 -0
  157. package/build/i18n/en/index.d.ts.map +1 -0
  158. package/build/i18n/en/index.js +195 -0
  159. package/build/i18n/en/index.js.map +1 -0
  160. package/build/i18n/fr/index.d.ts +168 -0
  161. package/build/i18n/fr/index.d.ts.map +1 -0
  162. package/build/i18n/fr/index.js +194 -0
  163. package/build/i18n/fr/index.js.map +1 -0
  164. package/build/i18n/index.d.ts +10 -0
  165. package/build/i18n/index.d.ts.map +1 -0
  166. package/build/i18n/index.js +56 -0
  167. package/build/i18n/index.js.map +1 -0
  168. package/build/i18n/types.d.ts +153 -0
  169. package/build/i18n/types.d.ts.map +1 -0
  170. package/build/i18n/types.js +3 -0
  171. package/build/i18n/types.js.map +1 -0
  172. package/build/i18n/usage-example.d.ts +4 -0
  173. package/build/i18n/usage-example.d.ts.map +1 -0
  174. package/build/i18n/usage-example.js +189 -0
  175. package/build/i18n/usage-example.js.map +1 -0
  176. package/build/modules/api/CardAuthentification.d.ts +22 -0
  177. package/build/modules/api/CardAuthentification.d.ts.map +1 -0
  178. package/build/modules/api/CardAuthentification.js +107 -0
  179. package/build/modules/api/CardAuthentification.js.map +1 -0
  180. package/build/modules/api/KYCService.d.ts +57 -1
  181. package/build/modules/api/KYCService.d.ts.map +1 -1
  182. package/build/modules/api/KYCService.js +348 -27
  183. package/build/modules/api/KYCService.js.map +1 -1
  184. package/build/modules/api/SelfieVerification.d.ts +3 -0
  185. package/build/modules/api/SelfieVerification.d.ts.map +1 -0
  186. package/build/modules/api/SelfieVerification.js +9 -0
  187. package/build/modules/api/SelfieVerification.js.map +1 -0
  188. package/build/modules/api/backendApi.d.ts +2 -0
  189. package/build/modules/api/backendApi.d.ts.map +1 -0
  190. package/build/modules/api/backendApi.js +6 -0
  191. package/build/modules/api/backendApi.js.map +1 -0
  192. package/build/modules/api/types.d.ts +20 -0
  193. package/build/modules/api/types.d.ts.map +1 -0
  194. package/build/modules/api/types.js +2 -0
  195. package/build/modules/api/types.js.map +1 -0
  196. package/build/modules/camera/VisionCameraModule.d.ts +1 -1
  197. package/build/modules/camera/VisionCameraModule.d.ts.map +1 -1
  198. package/build/modules/camera/VisionCameraModule.js +8 -2
  199. package/build/modules/camera/VisionCameraModule.js.map +1 -1
  200. package/build/types/KYC.types.d.ts +59 -7
  201. package/build/types/KYC.types.d.ts.map +1 -1
  202. package/build/types/KYC.types.js +9 -1
  203. package/build/types/KYC.types.js.map +1 -1
  204. package/build/utils/cropByObb.d.ts +11 -0
  205. package/build/utils/cropByObb.d.ts.map +1 -0
  206. package/build/utils/cropByObb.js +78 -0
  207. package/build/utils/cropByObb.js.map +1 -0
  208. package/build/utils/get-document-type-info.d.ts +13 -0
  209. package/build/utils/get-document-type-info.d.ts.map +1 -0
  210. package/build/utils/get-document-type-info.js +59 -0
  211. package/build/utils/get-document-type-info.js.map +1 -0
  212. package/build/utils/pathToBase64.d.ts +3 -0
  213. package/build/utils/pathToBase64.d.ts.map +1 -0
  214. package/build/utils/pathToBase64.js +47 -0
  215. package/build/utils/pathToBase64.js.map +1 -0
  216. package/build/utils/remove-duplicate.d.ts +2 -0
  217. package/build/utils/remove-duplicate.d.ts.map +1 -0
  218. package/build/utils/remove-duplicate.js +4 -0
  219. package/build/utils/remove-duplicate.js.map +1 -0
  220. package/package.json +3 -1
  221. package/src/api/axios.ts +144 -0
  222. package/src/components/EnhancedCameraView.tsx +96 -78
  223. package/src/components/EnhancedCameraView.web.tsx +41 -40
  224. package/src/components/KYCElements/CountrySelectionTemplate.tsx +104 -136
  225. package/src/components/KYCElements/FileUploadTemplate.tsx +14 -8
  226. package/src/components/KYCElements/IDCardCapture.tsx +311 -115
  227. package/src/components/KYCElements/InitializationStep.tsx +53 -0
  228. package/src/components/KYCElements/LocationCaptureTemplate.tsx +17 -15
  229. package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
  230. package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
  231. package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
  232. package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
  233. package/src/components/KYCElements/SelfieCaptureTemplate.tsx +140 -53
  234. package/src/components/KYCElements/VerificationProgressTemplate.tsx +123 -0
  235. package/src/components/OverLay/IdCard.tsx +17 -9
  236. package/src/components/OverLay/SelfieOverlay.tsx +6 -5
  237. package/src/components/OverLay/type.ts +64 -2
  238. package/src/components/TemplateKYCExample.tsx +76 -197
  239. package/src/components/TemplateKYCFlowRefactored.tsx +74 -46
  240. package/src/components/VisionCameraView.tsx +1 -1
  241. package/src/components/example/OrientationVideoExample.tsx +3 -7
  242. package/src/components/ui/Button.tsx +1 -1
  243. package/src/config/countriesData.ts +84 -0
  244. package/src/config/region_mapping.ts +688 -0
  245. package/src/hooks/useI18n.ts +53 -0
  246. package/src/hooks/useOrientationVideo.ts +2 -2
  247. package/src/hooks/useRealtimeVerifier.ts +128 -0
  248. package/src/hooks/useTemplateKYCFlow.tsx +375 -53
  249. package/src/i18n/README.md +288 -0
  250. package/src/i18n/en/index.ts +206 -0
  251. package/src/i18n/fr/index.ts +205 -0
  252. package/src/i18n/index.ts +65 -0
  253. package/src/i18n/types.ts +172 -0
  254. package/src/i18n/usage-example.tsx +202 -0
  255. package/src/modules/api/CardAuthentification.ts +114 -0
  256. package/src/modules/api/KYCService.ts +403 -30
  257. package/src/modules/api/SelfieVerification.ts +11 -0
  258. package/src/modules/api/backendApi.ts +8 -0
  259. package/src/modules/api/types.ts +24 -0
  260. package/src/modules/camera/VisionCameraModule.ts +16 -7
  261. package/src/types/KYC.types.ts +83 -14
  262. package/src/utils/cropByObb.ts +99 -0
  263. package/src/utils/get-document-type-info.ts +62 -0
  264. package/src/utils/pathToBase64.ts +47 -0
  265. package/src/utils/remove-duplicate.ts +3 -0
  266. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/results.bin +0 -1
  267. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/BuildConfig.dex +0 -0
  268. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.dex +0 -0
  269. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.dex +0 -0
  270. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.dex +0 -0
  271. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.dex +0 -0
  272. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.dex +0 -0
  273. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.dex +0 -0
  274. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.dex +0 -0
  275. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.dex +0 -0
  276. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
  277. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
  278. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
  279. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
  280. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.dex +0 -0
  281. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.dex +0 -0
  282. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.dex +0 -0
  283. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule.dex +0 -0
  284. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkView.dex +0 -0
  285. package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  286. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/BuildConfig.class +0 -0
  287. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
  288. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
  289. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
  290. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
  291. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
  292. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
  293. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
  294. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
  295. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  296. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  297. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  298. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  299. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  300. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
  301. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
  302. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
  303. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
  304. package/android/build/tmp/kotlin-classes/debug/META-INF/transfergratis-sdk_debug.kotlin_module +0 -0
  305. package/src/types/nativewind.d.ts +0 -2
  306. /package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/results.bin +0 -0
  307. /package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/{transfergratis-sdk_debug.kotlin_module → transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
  308. /package/android/build/{intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/transfergratis-sdk_debug.kotlin_module → tmp/kotlin-classes/debug/META-INF/transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
@@ -0,0 +1,53 @@
1
+ import { useCallback, useEffect, useState } from 'react';
2
+ import { setLocale, getCurrentLocale, getAvailableLocales, translate, translatePlural } from '../i18n';
3
+
4
+ export interface UseI18nReturn {
5
+ t: (key: string, options?: any) => string;
6
+ tPlural: (key: string, count: number, options?: any) => string;
7
+ locale: string;
8
+ setLocale: (locale: string) => void;
9
+ availableLocales: string[];
10
+ isRTL: boolean;
11
+ }
12
+
13
+ export const useI18n = (): UseI18nReturn => {
14
+ const [locale, setCurrentLocale] = useState(getCurrentLocale());
15
+ const [isRTL, setIsRTL] = useState(false);
16
+
17
+ // Update locale state when i18n locale changes
18
+ useEffect(() => {
19
+ const updateLocale = () => {
20
+ setCurrentLocale(getCurrentLocale());
21
+ // Check if current locale is RTL (Arabic, Hebrew, etc.)
22
+ setIsRTL(['ar', 'he', 'fa', 'ur'].includes(getCurrentLocale()));
23
+ };
24
+
25
+ // Listen for locale changes (if i18n supports events)
26
+ updateLocale();
27
+ }, []);
28
+
29
+ const handleSetLocale = useCallback((newLocale: string) => {
30
+ setLocale(newLocale);
31
+ setCurrentLocale(newLocale);
32
+ setIsRTL(['ar', 'he', 'fa', 'ur'].includes(newLocale));
33
+ }, []);
34
+
35
+ const t = useCallback((key: string, options?: any) => {
36
+ return translate(key, options);
37
+ }, [locale]);
38
+
39
+ const tPlural = useCallback((key: string, count: number, options?: any) => {
40
+ return translatePlural(key, count, options);
41
+ }, [locale]);
42
+
43
+ return {
44
+ t,
45
+ tPlural,
46
+ locale,
47
+ setLocale: handleSetLocale,
48
+ availableLocales: getAvailableLocales(),
49
+ isRTL,
50
+ };
51
+ };
52
+
53
+ export default useI18n;
@@ -6,7 +6,7 @@ import {
6
6
  OrientationVideoResult,
7
7
  OrientationType
8
8
  } from '../types/KYC.types';
9
- import KYCService from '../modules/api/KYCService';
9
+ import kycService from '../modules/api/KYCService';
10
10
 
11
11
  export interface UseOrientationVideoReturn {
12
12
  state: OrientationVideoState;
@@ -15,7 +15,7 @@ export interface UseOrientationVideoReturn {
15
15
  }
16
16
 
17
17
  export const useOrientationVideo = (
18
- kycService: KYCService,
18
+
19
19
  config?: Partial<OrientationVideoConfig>
20
20
  ): UseOrientationVideoReturn => {
21
21
  const defaultConfig: OrientationVideoConfig = {
@@ -0,0 +1,128 @@
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+
3
+ export type CaptureFunction = () => Promise<{ success: boolean; uri?: string; error?: string }>;
4
+ export type VerifyFunction = (uri: string) => Promise<boolean>;
5
+
6
+ export interface RealtimeVerifierConfig {
7
+ intervalMs?: number; // default 5000
8
+ maxAttempts?: number; // default Infinity
9
+ stopOnError?: boolean; // default false
10
+ }
11
+
12
+ export interface RealtimeVerifierState {
13
+ isRunning: boolean;
14
+ attempts: number;
15
+ lastError?: string | null;
16
+ verifiedUri?: string | null;
17
+ }
18
+
19
+ export interface RealtimeVerifierControls {
20
+ start: () => void;
21
+ stop: () => void;
22
+ reset: () => void;
23
+ }
24
+
25
+ export function useRealtimeVerifier(
26
+ capture: CaptureFunction,
27
+ verify: VerifyFunction,
28
+ config?: RealtimeVerifierConfig,
29
+ ): { state: RealtimeVerifierState; controls: RealtimeVerifierControls } {
30
+ const { intervalMs = 5000, maxAttempts = Number.POSITIVE_INFINITY, stopOnError = false } = config || {};
31
+
32
+ const [state, setState] = useState<RealtimeVerifierState>({
33
+ isRunning: false,
34
+ attempts: 0,
35
+ lastError: null,
36
+ verifiedUri: null,
37
+ });
38
+
39
+ const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);
40
+ const runningRef = useRef<boolean>(false);
41
+ const attemptsRef = useRef<number>(0);
42
+
43
+ const tick = useCallback(async () => {
44
+ if (!runningRef.current) return;
45
+ if (attemptsRef.current >= maxAttempts) {
46
+ runningRef.current = false;
47
+ if (timerRef.current) {
48
+ clearInterval(timerRef.current);
49
+ timerRef.current = null;
50
+ }
51
+ setState(prev => ({ ...prev, isRunning: false }));
52
+ return;
53
+ }
54
+
55
+ attemptsRef.current += 1;
56
+ setState(prev => ({ ...prev, attempts: attemptsRef.current }));
57
+
58
+ try {
59
+ const captureResult = await capture();
60
+ if (!captureResult.success || !captureResult.uri) {
61
+ if (stopOnError) {
62
+ throw new Error(captureResult.error || 'Capture failed');
63
+ }
64
+ setState(prev => ({ ...prev, lastError: captureResult.error || 'Capture failed' }));
65
+ return;
66
+ }
67
+
68
+ const ok = await verify(captureResult.uri);
69
+ if (ok) {
70
+ runningRef.current = false;
71
+ if (timerRef.current) {
72
+ clearInterval(timerRef.current);
73
+ timerRef.current = null;
74
+ }
75
+ setState(prev => ({ ...prev, isRunning: false, verifiedUri: captureResult.uri, lastError: null }));
76
+ }
77
+ } catch (err: any) {
78
+ const message = err?.message || 'Unknown error';
79
+ if (stopOnError) {
80
+ runningRef.current = false;
81
+ if (timerRef.current) {
82
+ clearInterval(timerRef.current);
83
+ timerRef.current = null;
84
+ }
85
+ setState(prev => ({ ...prev, isRunning: false, lastError: message }));
86
+ return;
87
+ }
88
+ setState(prev => ({ ...prev, lastError: message }));
89
+ }
90
+ }, [capture, verify, maxAttempts, stopOnError]);
91
+
92
+ const start = useCallback(() => {
93
+ if (runningRef.current) return;
94
+ runningRef.current = true;
95
+ setState(prev => ({ ...prev, isRunning: true, lastError: null }));
96
+ // Fire immediately, then every interval
97
+ tick();
98
+ timerRef.current = setInterval(tick, intervalMs);
99
+ }, [intervalMs, tick]);
100
+
101
+ const stop = useCallback(() => {
102
+ runningRef.current = false;
103
+ if (timerRef.current) {
104
+ clearInterval(timerRef.current);
105
+ timerRef.current = null;
106
+ }
107
+ setState(prev => ({ ...prev, isRunning: false }));
108
+ }, []);
109
+
110
+ const reset = useCallback(() => {
111
+ attemptsRef.current = 0;
112
+ setState({ isRunning: false, attempts: 0, lastError: null, verifiedUri: null });
113
+ }, []);
114
+
115
+ useEffect(() => {
116
+ return () => {
117
+ if (timerRef.current) {
118
+ clearInterval(timerRef.current);
119
+ }
120
+ };
121
+ }, []);
122
+
123
+ return { state, controls: { start, stop, reset } };
124
+ }
125
+
126
+ export default useRealtimeVerifier;
127
+
128
+