@sanctum-key/react-native-sdk 1.0.0

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 (708) hide show
  1. package/README.md +278 -0
  2. package/android/build/.transforms/f62cb96b2d1f78ca96ab35932dd530dc/results.bin +1 -0
  3. package/android/build/.transforms/f62cb96b2d1f78ca96ab35932dd530dc/transformed/classes/classes_dex/classes.dex +0 -0
  4. package/android/build/generated/source/buildConfig/debug/kyc/transfergratis/com/BuildConfig.java +10 -0
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +69 -0
  6. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  7. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  8. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  9. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  10. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  11. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -0
  12. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_file_paths.xml.flat +0 -0
  13. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  14. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  15. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  16. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  17. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  18. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/transfergratis-react-native-sdk_debug.kotlin_module +0 -0
  19. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class +0 -0
  20. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
  21. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +110 -0
  22. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +69 -0
  23. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  24. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  25. package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/file_paths.xml +15 -0
  26. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  27. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +2 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  109. package/android/build/outputs/logs/manifest-merger-debug-report.txt +101 -0
  110. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  111. package/android/build/tmp/kotlin-classes/debug/META-INF/transfergratis-react-native-sdk_debug.kotlin_module +0 -0
  112. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
  113. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
  114. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
  115. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
  116. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
  117. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
  118. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
  119. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
  120. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  121. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  122. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  123. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  124. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  125. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
  126. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
  127. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
  128. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
  129. package/android/build.gradle +43 -0
  130. package/android/src/main/AndroidManifest.xml +49 -0
  131. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +131 -0
  132. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +161 -0
  133. package/android/src/main/res/xml/file_paths.xml +15 -0
  134. package/build/App.d.ts +3 -0
  135. package/build/App.d.ts.map +1 -0
  136. package/build/App.js +9 -0
  137. package/build/App.js.map +1 -0
  138. package/build/TransfergratisSdk.types.d.ts +32 -0
  139. package/build/TransfergratisSdk.types.d.ts.map +1 -0
  140. package/build/TransfergratisSdk.types.js +2 -0
  141. package/build/TransfergratisSdk.types.js.map +1 -0
  142. package/build/TransfergratisSdkModule.d.ts +21 -0
  143. package/build/TransfergratisSdkModule.d.ts.map +1 -0
  144. package/build/TransfergratisSdkModule.js +4 -0
  145. package/build/TransfergratisSdkModule.js.map +1 -0
  146. package/build/TransfergratisSdkModule.web.d.ts +20 -0
  147. package/build/TransfergratisSdkModule.web.d.ts.map +1 -0
  148. package/build/TransfergratisSdkModule.web.js +25 -0
  149. package/build/TransfergratisSdkModule.web.js.map +1 -0
  150. package/build/TransfergratisSdkView.d.ts +4 -0
  151. package/build/TransfergratisSdkView.d.ts.map +1 -0
  152. package/build/TransfergratisSdkView.js +7 -0
  153. package/build/TransfergratisSdkView.js.map +1 -0
  154. package/build/TransfergratisSdkView.web.d.ts +4 -0
  155. package/build/TransfergratisSdkView.web.d.ts.map +1 -0
  156. package/build/TransfergratisSdkView.web.js +11 -0
  157. package/build/TransfergratisSdkView.web.js.map +1 -0
  158. package/build/api/axios.d.ts +30 -0
  159. package/build/api/axios.d.ts.map +1 -0
  160. package/build/api/axios.js +92 -0
  161. package/build/api/axios.js.map +1 -0
  162. package/build/components/Camera/index.d.ts +2 -0
  163. package/build/components/Camera/index.d.ts.map +1 -0
  164. package/build/components/Camera/index.js +2 -0
  165. package/build/components/Camera/index.js.map +1 -0
  166. package/build/components/Camera/index.web.d.ts +2 -0
  167. package/build/components/Camera/index.web.d.ts.map +1 -0
  168. package/build/components/Camera/index.web.js +2 -0
  169. package/build/components/Camera/index.web.js.map +1 -0
  170. package/build/components/Camera/types.d.ts +2 -0
  171. package/build/components/Camera/types.d.ts.map +1 -0
  172. package/build/components/Camera/types.js +2 -0
  173. package/build/components/Camera/types.js.map +1 -0
  174. package/build/components/ConfigurableKYCFlow.d.ts +11 -0
  175. package/build/components/ConfigurableKYCFlow.d.ts.map +1 -0
  176. package/build/components/ConfigurableKYCFlow.js +257 -0
  177. package/build/components/ConfigurableKYCFlow.js.map +1 -0
  178. package/build/components/CustomCameraExample.d.ts +10 -0
  179. package/build/components/CustomCameraExample.d.ts.map +1 -0
  180. package/build/components/CustomCameraExample.js +232 -0
  181. package/build/components/CustomCameraExample.js.map +1 -0
  182. package/build/components/EnhancedCameraView.d.ts +4 -0
  183. package/build/components/EnhancedCameraView.d.ts.map +1 -0
  184. package/build/components/EnhancedCameraView.js +393 -0
  185. package/build/components/EnhancedCameraView.js.map +1 -0
  186. package/build/components/EnhancedCameraView.web.d.ts +4 -0
  187. package/build/components/EnhancedCameraView.web.d.ts.map +1 -0
  188. package/build/components/EnhancedCameraView.web.js +499 -0
  189. package/build/components/EnhancedCameraView.web.js.map +1 -0
  190. package/build/components/FileUpload.d.ts +13 -0
  191. package/build/components/FileUpload.d.ts.map +1 -0
  192. package/build/components/FileUpload.js +216 -0
  193. package/build/components/FileUpload.js.map +1 -0
  194. package/build/components/KYCElementRenderer.d.ts +14 -0
  195. package/build/components/KYCElementRenderer.d.ts.map +1 -0
  196. package/build/components/KYCElementRenderer.js +31 -0
  197. package/build/components/KYCElementRenderer.js.map +1 -0
  198. package/build/components/KYCElements/AdditionalDocumentsTemplate.d.ts +12 -0
  199. package/build/components/KYCElements/AdditionalDocumentsTemplate.d.ts.map +1 -0
  200. package/build/components/KYCElements/AdditionalDocumentsTemplate.js +283 -0
  201. package/build/components/KYCElements/AdditionalDocumentsTemplate.js.map +1 -0
  202. package/build/components/KYCElements/CameraCapture.d.ts +11 -0
  203. package/build/components/KYCElements/CameraCapture.d.ts.map +1 -0
  204. package/build/components/KYCElements/CameraCapture.js +219 -0
  205. package/build/components/KYCElements/CameraCapture.js.map +1 -0
  206. package/build/components/KYCElements/CompletionStep.d.ts +10 -0
  207. package/build/components/KYCElements/CompletionStep.d.ts.map +1 -0
  208. package/build/components/KYCElements/CompletionStep.js +147 -0
  209. package/build/components/KYCElements/CompletionStep.js.map +1 -0
  210. package/build/components/KYCElements/CountrySelection.d.ts +11 -0
  211. package/build/components/KYCElements/CountrySelection.d.ts.map +1 -0
  212. package/build/components/KYCElements/CountrySelection.js +147 -0
  213. package/build/components/KYCElements/CountrySelection.js.map +1 -0
  214. package/build/components/KYCElements/CountrySelectionTemplate.d.ts +15 -0
  215. package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -0
  216. package/build/components/KYCElements/CountrySelectionTemplate.js +438 -0
  217. package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -0
  218. package/build/components/KYCElements/DocumentTypeSelection.d.ts +11 -0
  219. package/build/components/KYCElements/DocumentTypeSelection.d.ts.map +1 -0
  220. package/build/components/KYCElements/DocumentTypeSelection.js +143 -0
  221. package/build/components/KYCElements/DocumentTypeSelection.js.map +1 -0
  222. package/build/components/KYCElements/EmailVerificationTemplate.d.ts +12 -0
  223. package/build/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -0
  224. package/build/components/KYCElements/EmailVerificationTemplate.js +212 -0
  225. package/build/components/KYCElements/EmailVerificationTemplate.js.map +1 -0
  226. package/build/components/KYCElements/FileUpload.d.ts +11 -0
  227. package/build/components/KYCElements/FileUpload.d.ts.map +1 -0
  228. package/build/components/KYCElements/FileUpload.js +268 -0
  229. package/build/components/KYCElements/FileUpload.js.map +1 -0
  230. package/build/components/KYCElements/FileUploadTemplate.d.ts +12 -0
  231. package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -0
  232. package/build/components/KYCElements/FileUploadTemplate.js +331 -0
  233. package/build/components/KYCElements/FileUploadTemplate.js.map +1 -0
  234. package/build/components/KYCElements/IDCardCapture.d.ts +19 -0
  235. package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -0
  236. package/build/components/KYCElements/IDCardCapture.js +877 -0
  237. package/build/components/KYCElements/IDCardCapture.js.map +1 -0
  238. package/build/components/KYCElements/InitializationStep.d.ts +5 -0
  239. package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
  240. package/build/components/KYCElements/InitializationStep.js +41 -0
  241. package/build/components/KYCElements/InitializationStep.js.map +1 -0
  242. package/build/components/KYCElements/LocationCaptureTemplate.d.ts +20 -0
  243. package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -0
  244. package/build/components/KYCElements/LocationCaptureTemplate.js +318 -0
  245. package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -0
  246. package/build/components/KYCElements/OrientationVideoCapture.d.ts +14 -0
  247. package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -0
  248. package/build/components/KYCElements/OrientationVideoCapture.js +534 -0
  249. package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -0
  250. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +14 -0
  251. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -0
  252. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js +504 -0
  253. package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -0
  254. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +14 -0
  255. package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -0
  256. package/build/components/KYCElements/OrientationVideoCaptureFinal.js +430 -0
  257. package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -0
  258. package/build/components/KYCElements/PersonalInformationTemplate.d.ts +12 -0
  259. package/build/components/KYCElements/PersonalInformationTemplate.d.ts.map +1 -0
  260. package/build/components/KYCElements/PersonalInformationTemplate.js +120 -0
  261. package/build/components/KYCElements/PersonalInformationTemplate.js.map +1 -0
  262. package/build/components/KYCElements/PhoneVerificationTemplate.d.ts +12 -0
  263. package/build/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -0
  264. package/build/components/KYCElements/PhoneVerificationTemplate.js +185 -0
  265. package/build/components/KYCElements/PhoneVerificationTemplate.js.map +1 -0
  266. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
  267. package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
  268. package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
  269. package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
  270. package/build/components/KYCElements/SelfieCapture.d.ts +11 -0
  271. package/build/components/KYCElements/SelfieCapture.d.ts.map +1 -0
  272. package/build/components/KYCElements/SelfieCapture.js +236 -0
  273. package/build/components/KYCElements/SelfieCapture.js.map +1 -0
  274. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +16 -0
  275. package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -0
  276. package/build/components/KYCElements/SelfieCaptureTemplate.js +568 -0
  277. package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -0
  278. package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
  279. package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
  280. package/build/components/KYCElements/VerificationProgressTemplate.js +195 -0
  281. package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
  282. package/build/components/KYCElements/VerificationStep.d.ts +10 -0
  283. package/build/components/KYCElements/VerificationStep.d.ts.map +1 -0
  284. package/build/components/KYCElements/VerificationStep.js +199 -0
  285. package/build/components/KYCElements/VerificationStep.js.map +1 -0
  286. package/build/components/KYCElements/WelcomeTemplate.d.ts +12 -0
  287. package/build/components/KYCElements/WelcomeTemplate.d.ts.map +1 -0
  288. package/build/components/KYCElements/WelcomeTemplate.js +244 -0
  289. package/build/components/KYCElements/WelcomeTemplate.js.map +1 -0
  290. package/build/components/KYCExample.d.ts +3 -0
  291. package/build/components/KYCExample.d.ts.map +1 -0
  292. package/build/components/KYCExample.js +247 -0
  293. package/build/components/KYCExample.js.map +1 -0
  294. package/build/components/KYCFlow.d.ts +3 -0
  295. package/build/components/KYCFlow.d.ts.map +1 -0
  296. package/build/components/KYCFlow.js +308 -0
  297. package/build/components/KYCFlow.js.map +1 -0
  298. package/build/components/NativeCameraView.d.ts +11 -0
  299. package/build/components/NativeCameraView.d.ts.map +1 -0
  300. package/build/components/NativeCameraView.js +27 -0
  301. package/build/components/NativeCameraView.js.map +1 -0
  302. package/build/components/OverLay/IdCard.d.ts +4 -0
  303. package/build/components/OverLay/IdCard.d.ts.map +1 -0
  304. package/build/components/OverLay/IdCard.js +185 -0
  305. package/build/components/OverLay/IdCard.js.map +1 -0
  306. package/build/components/OverLay/SelfieOverlay.d.ts +4 -0
  307. package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -0
  308. package/build/components/OverLay/SelfieOverlay.js +169 -0
  309. package/build/components/OverLay/SelfieOverlay.js.map +1 -0
  310. package/build/components/OverLay/StepOverlay.d.ts +9 -0
  311. package/build/components/OverLay/StepOverlay.d.ts.map +1 -0
  312. package/build/components/OverLay/StepOverlay.js +53 -0
  313. package/build/components/OverLay/StepOverlay.js.map +1 -0
  314. package/build/components/OverLay/type.d.ts +98 -0
  315. package/build/components/OverLay/type.d.ts.map +1 -0
  316. package/build/components/OverLay/type.js +2 -0
  317. package/build/components/OverLay/type.js.map +1 -0
  318. package/build/components/ProgressIndicator.d.ts +8 -0
  319. package/build/components/ProgressIndicator.d.ts.map +1 -0
  320. package/build/components/ProgressIndicator.js +48 -0
  321. package/build/components/ProgressIndicator.js.map +1 -0
  322. package/build/components/SelfieCapture.d.ts +3 -0
  323. package/build/components/SelfieCapture.d.ts.map +1 -0
  324. package/build/components/SelfieCapture.js +197 -0
  325. package/build/components/SelfieCapture.js.map +1 -0
  326. package/build/components/SimpleExample.d.ts +3 -0
  327. package/build/components/SimpleExample.d.ts.map +1 -0
  328. package/build/components/SimpleExample.js +89 -0
  329. package/build/components/SimpleExample.js.map +1 -0
  330. package/build/components/Svgs/GpsIcon.d.ts +3 -0
  331. package/build/components/Svgs/GpsIcon.d.ts.map +1 -0
  332. package/build/components/Svgs/GpsIcon.js +9 -0
  333. package/build/components/Svgs/GpsIcon.js.map +1 -0
  334. package/build/components/Svgs/Schield.d.ts +3 -0
  335. package/build/components/Svgs/Schield.d.ts.map +1 -0
  336. package/build/components/Svgs/Schield.js +22 -0
  337. package/build/components/Svgs/Schield.js.map +1 -0
  338. package/build/components/Svgs/directionArrow.gif +0 -0
  339. package/build/components/Svgs/frontSelfieIcon.d.ts +3 -0
  340. package/build/components/Svgs/frontSelfieIcon.d.ts.map +1 -0
  341. package/build/components/Svgs/frontSelfieIcon.js +11 -0
  342. package/build/components/Svgs/frontSelfieIcon.js.map +1 -0
  343. package/build/components/Svgs/scanningLine.d.ts +9 -0
  344. package/build/components/Svgs/scanningLine.d.ts.map +1 -0
  345. package/build/components/Svgs/scanningLine.js +61 -0
  346. package/build/components/Svgs/scanningLine.js.map +1 -0
  347. package/build/components/Svgs/sideSelfieIcon.d.ts +3 -0
  348. package/build/components/Svgs/sideSelfieIcon.d.ts.map +1 -0
  349. package/build/components/Svgs/sideSelfieIcon.js +9 -0
  350. package/build/components/Svgs/sideSelfieIcon.js.map +1 -0
  351. package/build/components/TemplateKYCExample.d.ts +22 -0
  352. package/build/components/TemplateKYCExample.d.ts.map +1 -0
  353. package/build/components/TemplateKYCExample.js +155 -0
  354. package/build/components/TemplateKYCExample.js.map +1 -0
  355. package/build/components/TemplateKYCFlowRefactored.d.ts +26 -0
  356. package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -0
  357. package/build/components/TemplateKYCFlowRefactored.js +359 -0
  358. package/build/components/TemplateKYCFlowRefactored.js.map +1 -0
  359. package/build/components/VisionCameraView.d.ts +22 -0
  360. package/build/components/VisionCameraView.d.ts.map +1 -0
  361. package/build/components/VisionCameraView.js +142 -0
  362. package/build/components/VisionCameraView.js.map +1 -0
  363. package/build/components/example/CameraCaptureEx.d.ts +4 -0
  364. package/build/components/example/CameraCaptureEx.d.ts.map +1 -0
  365. package/build/components/example/CameraCaptureEx.js +219 -0
  366. package/build/components/example/CameraCaptureEx.js.map +1 -0
  367. package/build/components/example/CameraCaptureExAdvanced.d.ts +3 -0
  368. package/build/components/example/CameraCaptureExAdvanced.d.ts.map +1 -0
  369. package/build/components/example/CameraCaptureExAdvanced.js +229 -0
  370. package/build/components/example/CameraCaptureExAdvanced.js.map +1 -0
  371. package/build/components/example/CameraCaptureExScan.d.ts +3 -0
  372. package/build/components/example/CameraCaptureExScan.d.ts.map +1 -0
  373. package/build/components/example/CameraCaptureExScan.js +213 -0
  374. package/build/components/example/CameraCaptureExScan.js.map +1 -0
  375. package/build/components/example/CameraCaptureExSimple.d.ts +3 -0
  376. package/build/components/example/CameraCaptureExSimple.d.ts.map +1 -0
  377. package/build/components/example/CameraCaptureExSimple.js +138 -0
  378. package/build/components/example/CameraCaptureExSimple.js.map +1 -0
  379. package/build/components/example/DynamicTemplateExample.d.ts +10 -0
  380. package/build/components/example/DynamicTemplateExample.d.ts.map +1 -0
  381. package/build/components/example/DynamicTemplateExample.js +241 -0
  382. package/build/components/example/DynamicTemplateExample.js.map +1 -0
  383. package/build/components/example/OrientationVideoExample.d.ts +4 -0
  384. package/build/components/example/OrientationVideoExample.d.ts.map +1 -0
  385. package/build/components/example/OrientationVideoExample.js +325 -0
  386. package/build/components/example/OrientationVideoExample.js.map +1 -0
  387. package/build/components/example/SelfieCaptureEx.d.ts +4 -0
  388. package/build/components/example/SelfieCaptureEx.d.ts.map +1 -0
  389. package/build/components/example/SelfieCaptureEx.js +238 -0
  390. package/build/components/example/SelfieCaptureEx.js.map +1 -0
  391. package/build/components/ui/Button.d.ts +37 -0
  392. package/build/components/ui/Button.d.ts.map +1 -0
  393. package/build/components/ui/Button.js +194 -0
  394. package/build/components/ui/Button.js.map +1 -0
  395. package/build/components/ui/ButtonExample.d.ts +4 -0
  396. package/build/components/ui/ButtonExample.d.ts.map +1 -0
  397. package/build/components/ui/ButtonExample.js +209 -0
  398. package/build/components/ui/ButtonExample.js.map +1 -0
  399. package/build/components/ui/ButtonStyles.d.ts +521 -0
  400. package/build/components/ui/ButtonStyles.d.ts.map +1 -0
  401. package/build/components/ui/ButtonStyles.js +429 -0
  402. package/build/components/ui/ButtonStyles.js.map +1 -0
  403. package/build/config/KYCConfig.d.ts +14 -0
  404. package/build/config/KYCConfig.d.ts.map +1 -0
  405. package/build/config/KYCConfig.js +26 -0
  406. package/build/config/KYCConfig.js.map +1 -0
  407. package/build/config/KYCConfigs.d.ts +7 -0
  408. package/build/config/KYCConfigs.d.ts.map +1 -0
  409. package/build/config/KYCConfigs.js +516 -0
  410. package/build/config/KYCConfigs.js.map +1 -0
  411. package/build/config/allowedDomains.d.ts +30 -0
  412. package/build/config/allowedDomains.d.ts.map +1 -0
  413. package/build/config/allowedDomains.js +112 -0
  414. package/build/config/allowedDomains.js.map +1 -0
  415. package/build/config/countriesData.d.ts +3 -0
  416. package/build/config/countriesData.d.ts.map +1 -0
  417. package/build/config/countriesData.js +80 -0
  418. package/build/config/countriesData.js.map +1 -0
  419. package/build/config/region_mapping.d.ts +3 -0
  420. package/build/config/region_mapping.d.ts.map +1 -0
  421. package/build/config/region_mapping.js +736 -0
  422. package/build/config/region_mapping.js.map +1 -0
  423. package/build/hooks/useI18n.d.ts +11 -0
  424. package/build/hooks/useI18n.d.ts.map +1 -0
  425. package/build/hooks/useI18n.js +37 -0
  426. package/build/hooks/useI18n.js.map +1 -0
  427. package/build/hooks/useKYC.d.ts +15 -0
  428. package/build/hooks/useKYC.d.ts.map +1 -0
  429. package/build/hooks/useKYC.js +103 -0
  430. package/build/hooks/useKYC.js.map +1 -0
  431. package/build/hooks/useKYCFlow.d.ts +3 -0
  432. package/build/hooks/useKYCFlow.d.ts.map +1 -0
  433. package/build/hooks/useKYCFlow.js +221 -0
  434. package/build/hooks/useKYCFlow.js.map +1 -0
  435. package/build/hooks/useLocation.d.ts +32 -0
  436. package/build/hooks/useLocation.d.ts.map +1 -0
  437. package/build/hooks/useLocation.js +165 -0
  438. package/build/hooks/useLocation.js.map +1 -0
  439. package/build/hooks/useOrientationVideo.d.ts +10 -0
  440. package/build/hooks/useOrientationVideo.d.ts.map +1 -0
  441. package/build/hooks/useOrientationVideo.js +118 -0
  442. package/build/hooks/useOrientationVideo.js.map +1 -0
  443. package/build/hooks/useRealtimeVerifier.d.ts +28 -0
  444. package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
  445. package/build/hooks/useRealtimeVerifier.js +91 -0
  446. package/build/hooks/useRealtimeVerifier.js.map +1 -0
  447. package/build/hooks/useTemplateKYCFlow.d.ts +48 -0
  448. package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -0
  449. package/build/hooks/useTemplateKYCFlow.js +910 -0
  450. package/build/hooks/useTemplateKYCFlow.js.map +1 -0
  451. package/build/hooks/useTemplateLoader.d.ts +14 -0
  452. package/build/hooks/useTemplateLoader.d.ts.map +1 -0
  453. package/build/hooks/useTemplateLoader.js +85 -0
  454. package/build/hooks/useTemplateLoader.js.map +1 -0
  455. package/build/i18n/en/index.d.ts +233 -0
  456. package/build/i18n/en/index.d.ts.map +1 -0
  457. package/build/i18n/en/index.js +261 -0
  458. package/build/i18n/en/index.js.map +1 -0
  459. package/build/i18n/fr/index.d.ts +219 -0
  460. package/build/i18n/fr/index.d.ts.map +1 -0
  461. package/build/i18n/fr/index.js +246 -0
  462. package/build/i18n/fr/index.js.map +1 -0
  463. package/build/i18n/index.d.ts +10 -0
  464. package/build/i18n/index.d.ts.map +1 -0
  465. package/build/i18n/index.js +56 -0
  466. package/build/i18n/index.js.map +1 -0
  467. package/build/i18n/types.d.ts +162 -0
  468. package/build/i18n/types.d.ts.map +1 -0
  469. package/build/i18n/types.js +3 -0
  470. package/build/i18n/types.js.map +1 -0
  471. package/build/i18n/usage-example.d.ts +4 -0
  472. package/build/i18n/usage-example.d.ts.map +1 -0
  473. package/build/i18n/usage-example.js +189 -0
  474. package/build/i18n/usage-example.js.map +1 -0
  475. package/build/index.d.ts +11 -0
  476. package/build/index.d.ts.map +1 -0
  477. package/build/index.js +17 -0
  478. package/build/index.js.map +1 -0
  479. package/build/modules/api/CardAuthentification.d.ts +72 -0
  480. package/build/modules/api/CardAuthentification.d.ts.map +1 -0
  481. package/build/modules/api/CardAuthentification.js +487 -0
  482. package/build/modules/api/CardAuthentification.js.map +1 -0
  483. package/build/modules/api/KYCService.d.ts +116 -0
  484. package/build/modules/api/KYCService.d.ts.map +1 -0
  485. package/build/modules/api/KYCService.js +526 -0
  486. package/build/modules/api/KYCService.js.map +1 -0
  487. package/build/modules/api/SelfieVerification.d.ts +5 -0
  488. package/build/modules/api/SelfieVerification.d.ts.map +1 -0
  489. package/build/modules/api/SelfieVerification.js +25 -0
  490. package/build/modules/api/SelfieVerification.js.map +1 -0
  491. package/build/modules/api/TemplateService.d.ts +44 -0
  492. package/build/modules/api/TemplateService.d.ts.map +1 -0
  493. package/build/modules/api/TemplateService.js +146 -0
  494. package/build/modules/api/TemplateService.js.map +1 -0
  495. package/build/modules/api/backendApi.d.ts +2 -0
  496. package/build/modules/api/backendApi.d.ts.map +1 -0
  497. package/build/modules/api/backendApi.js +6 -0
  498. package/build/modules/api/backendApi.js.map +1 -0
  499. package/build/modules/api/types.d.ts +53 -0
  500. package/build/modules/api/types.d.ts.map +1 -0
  501. package/build/modules/api/types.js +2 -0
  502. package/build/modules/api/types.js.map +1 -0
  503. package/build/modules/camera/NativeCameraModule.d.ts +52 -0
  504. package/build/modules/camera/NativeCameraModule.d.ts.map +1 -0
  505. package/build/modules/camera/NativeCameraModule.js +149 -0
  506. package/build/modules/camera/NativeCameraModule.js.map +1 -0
  507. package/build/modules/camera/UnifiedCameraModule.d.ts +70 -0
  508. package/build/modules/camera/UnifiedCameraModule.d.ts.map +1 -0
  509. package/build/modules/camera/UnifiedCameraModule.js +125 -0
  510. package/build/modules/camera/UnifiedCameraModule.js.map +1 -0
  511. package/build/modules/camera/VisionCameraModule.d.ts +62 -0
  512. package/build/modules/camera/VisionCameraModule.d.ts.map +1 -0
  513. package/build/modules/camera/VisionCameraModule.js +313 -0
  514. package/build/modules/camera/VisionCameraModule.js.map +1 -0
  515. package/build/modules/camera/VisionCameraModule.web.d.ts +145 -0
  516. package/build/modules/camera/VisionCameraModule.web.d.ts.map +1 -0
  517. package/build/modules/camera/VisionCameraModule.web.js +589 -0
  518. package/build/modules/camera/VisionCameraModule.web.js.map +1 -0
  519. package/build/modules/camera/index.d.ts +5 -0
  520. package/build/modules/camera/index.d.ts.map +1 -0
  521. package/build/modules/camera/index.js +4 -0
  522. package/build/modules/camera/index.js.map +1 -0
  523. package/build/stores/kycStore.d.ts +55 -0
  524. package/build/stores/kycStore.d.ts.map +1 -0
  525. package/build/stores/kycStore.js +98 -0
  526. package/build/stores/kycStore.js.map +1 -0
  527. package/build/types/KYC.types.d.ts +643 -0
  528. package/build/types/KYC.types.d.ts.map +1 -0
  529. package/build/types/KYC.types.js +25 -0
  530. package/build/types/KYC.types.js.map +1 -0
  531. package/build/types/env.types.d.ts +13 -0
  532. package/build/types/env.types.d.ts.map +1 -0
  533. package/build/types/env.types.js +2 -0
  534. package/build/types/env.types.js.map +1 -0
  535. package/build/utils/cropByObb.d.ts +37 -0
  536. package/build/utils/cropByObb.d.ts.map +1 -0
  537. package/build/utils/cropByObb.js +215 -0
  538. package/build/utils/cropByObb.js.map +1 -0
  539. package/build/utils/deviceDetection.d.ts +6 -0
  540. package/build/utils/deviceDetection.d.ts.map +1 -0
  541. package/build/utils/deviceDetection.js +12 -0
  542. package/build/utils/deviceDetection.js.map +1 -0
  543. package/build/utils/get-document-type-info.d.ts +13 -0
  544. package/build/utils/get-document-type-info.d.ts.map +1 -0
  545. package/build/utils/get-document-type-info.js +59 -0
  546. package/build/utils/get-document-type-info.js.map +1 -0
  547. package/build/utils/logger.d.ts +12 -0
  548. package/build/utils/logger.d.ts.map +1 -0
  549. package/build/utils/logger.js +45 -0
  550. package/build/utils/logger.js.map +1 -0
  551. package/build/utils/pathToBase64.d.ts +3 -0
  552. package/build/utils/pathToBase64.d.ts.map +1 -0
  553. package/build/utils/pathToBase64.js +65 -0
  554. package/build/utils/pathToBase64.js.map +1 -0
  555. package/build/utils/platformAlert.d.ts +20 -0
  556. package/build/utils/platformAlert.d.ts.map +1 -0
  557. package/build/utils/platformAlert.js +67 -0
  558. package/build/utils/platformAlert.js.map +1 -0
  559. package/build/utils/remove-duplicate.d.ts +2 -0
  560. package/build/utils/remove-duplicate.d.ts.map +1 -0
  561. package/build/utils/remove-duplicate.js +4 -0
  562. package/build/utils/remove-duplicate.js.map +1 -0
  563. package/build/utils/template-transformer.d.ts +10 -0
  564. package/build/utils/template-transformer.d.ts.map +1 -0
  565. package/build/utils/template-transformer.js +365 -0
  566. package/build/utils/template-transformer.js.map +1 -0
  567. package/build/web/WebKYCEntry.d.ts +9 -0
  568. package/build/web/WebKYCEntry.d.ts.map +1 -0
  569. package/build/web/WebKYCEntry.js +288 -0
  570. package/build/web/WebKYCEntry.js.map +1 -0
  571. package/build/web/index.d.ts +2 -0
  572. package/build/web/index.d.ts.map +1 -0
  573. package/build/web/index.js +2 -0
  574. package/build/web/index.js.map +1 -0
  575. package/expo-module.config.json +9 -0
  576. package/ios/TransfergratisSdk.podspec +31 -0
  577. package/ios/TransfergratisSdkModule.swift +409 -0
  578. package/package.json +71 -0
  579. package/plugin/build/index.d.ts +5 -0
  580. package/plugin/build/index.js +12 -0
  581. package/plugin/build/withLocation.d.ts +9 -0
  582. package/plugin/build/withLocation.js +77 -0
  583. package/plugin/build/withRemovePermissions.d.ts +3 -0
  584. package/plugin/build/withRemovePermissions.js +67 -0
  585. package/plugin/build/withVisionCamera.d.ts +8 -0
  586. package/plugin/build/withVisionCamera.js +68 -0
  587. package/plugin/src/index.ts +5 -0
  588. package/plugin/src/withLocation.ts +109 -0
  589. package/plugin/src/withRemovePermissions.js +85 -0
  590. package/plugin/src/withRemovePermissions.ts +83 -0
  591. package/plugin/src/withVisionCamera.js +88 -0
  592. package/plugin/src/withVisionCamera.ts +97 -0
  593. package/plugin/tsconfig.json +17 -0
  594. package/plugin/tsconfig.tsbuildinfo +1 -0
  595. package/plugin.js +19 -0
  596. package/src/App.tsx +9 -0
  597. package/src/TransfergratisSdk.types.ts +30 -0
  598. package/src/TransfergratisSdkModule.ts +16 -0
  599. package/src/TransfergratisSdkModule.web.ts +31 -0
  600. package/src/TransfergratisSdkView.tsx +11 -0
  601. package/src/TransfergratisSdkView.web.tsx +15 -0
  602. package/src/api/axios.ts +144 -0
  603. package/src/components/Camera/index.tsx +0 -0
  604. package/src/components/Camera/index.web.tsx +0 -0
  605. package/src/components/Camera/types.ts +0 -0
  606. package/src/components/ConfigurableKYCFlow.tsx +334 -0
  607. package/src/components/CustomCameraExample.tsx +274 -0
  608. package/src/components/EnhancedCameraView.tsx +482 -0
  609. package/src/components/EnhancedCameraView.web.tsx +597 -0
  610. package/src/components/FileUpload.tsx +249 -0
  611. package/src/components/KYCElementRenderer.tsx +106 -0
  612. package/src/components/KYCElements/AdditionalDocumentsTemplate.tsx +346 -0
  613. package/src/components/KYCElements/CameraCapture.tsx +268 -0
  614. package/src/components/KYCElements/CompletionStep.tsx +161 -0
  615. package/src/components/KYCElements/CountrySelection.tsx +177 -0
  616. package/src/components/KYCElements/CountrySelectionTemplate.tsx +526 -0
  617. package/src/components/KYCElements/DocumentTypeSelection.tsx +173 -0
  618. package/src/components/KYCElements/EmailVerificationTemplate.tsx +278 -0
  619. package/src/components/KYCElements/FileUpload.tsx +318 -0
  620. package/src/components/KYCElements/FileUploadTemplate.tsx +395 -0
  621. package/src/components/KYCElements/IDCardCapture.tsx +1053 -0
  622. package/src/components/KYCElements/InitializationStep.tsx +53 -0
  623. package/src/components/KYCElements/LocationCaptureTemplate.tsx +378 -0
  624. package/src/components/KYCElements/OrientationVideoCapture.tsx +649 -0
  625. package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +616 -0
  626. package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +534 -0
  627. package/src/components/KYCElements/PersonalInformationTemplate.tsx +158 -0
  628. package/src/components/KYCElements/PhoneVerificationTemplate.tsx +253 -0
  629. package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
  630. package/src/components/KYCElements/SelfieCapture.tsx +284 -0
  631. package/src/components/KYCElements/SelfieCaptureTemplate.tsx +662 -0
  632. package/src/components/KYCElements/VerificationProgressTemplate.tsx +247 -0
  633. package/src/components/KYCElements/VerificationStep.tsx +234 -0
  634. package/src/components/KYCElements/WelcomeTemplate.tsx +290 -0
  635. package/src/components/KYCExample.tsx +297 -0
  636. package/src/components/KYCFlow.tsx +377 -0
  637. package/src/components/NativeCameraView.tsx +47 -0
  638. package/src/components/OverLay/IdCard.tsx +277 -0
  639. package/src/components/OverLay/SelfieOverlay.tsx +211 -0
  640. package/src/components/OverLay/StepOverlay.tsx +64 -0
  641. package/src/components/OverLay/type.ts +91 -0
  642. package/src/components/ProgressIndicator.tsx +62 -0
  643. package/src/components/SelfieCapture.tsx +244 -0
  644. package/src/components/SimpleExample.tsx +92 -0
  645. package/src/components/Svgs/GpsIcon.tsx +12 -0
  646. package/src/components/Svgs/Schield.tsx +26 -0
  647. package/src/components/Svgs/directionArrow.gif +0 -0
  648. package/src/components/Svgs/frontSelfieIcon.tsx +13 -0
  649. package/src/components/Svgs/scanningLine.tsx +88 -0
  650. package/src/components/Svgs/sideSelfieIcon.tsx +10 -0
  651. package/src/components/TemplateKYCExample.tsx +194 -0
  652. package/src/components/TemplateKYCFlowRefactored.tsx +473 -0
  653. package/src/components/VisionCameraView.tsx +197 -0
  654. package/src/components/example/CameraCaptureEx.tsx +335 -0
  655. package/src/components/example/CameraCaptureExAdvanced.tsx +357 -0
  656. package/src/components/example/CameraCaptureExScan.tsx +336 -0
  657. package/src/components/example/CameraCaptureExSimple.tsx +215 -0
  658. package/src/components/example/DynamicTemplateExample.tsx +289 -0
  659. package/src/components/example/OrientationVideoExample.tsx +380 -0
  660. package/src/components/example/SelfieCaptureEx.tsx +358 -0
  661. package/src/components/ui/Button.tsx +328 -0
  662. package/src/components/ui/ButtonExample.tsx +318 -0
  663. package/src/components/ui/ButtonStyles.ts +465 -0
  664. package/src/config/KYCConfig.ts +34 -0
  665. package/src/config/KYCConfigs.ts +528 -0
  666. package/src/config/allowedDomains.ts +133 -0
  667. package/src/config/countriesData.ts +85 -0
  668. package/src/config/region_mapping.json +735 -0
  669. package/src/config/region_mapping.ts +737 -0
  670. package/src/hooks/useI18n.ts +53 -0
  671. package/src/hooks/useKYC.ts +131 -0
  672. package/src/hooks/useKYCFlow.ts +248 -0
  673. package/src/hooks/useLocation.ts +221 -0
  674. package/src/hooks/useOrientationVideo.ts +149 -0
  675. package/src/hooks/useRealtimeVerifier.ts +128 -0
  676. package/src/hooks/useTemplateKYCFlow.tsx +1051 -0
  677. package/src/hooks/useTemplateLoader.ts +102 -0
  678. package/src/i18n/README.md +288 -0
  679. package/src/i18n/en/index.ts +275 -0
  680. package/src/i18n/fr/index.ts +260 -0
  681. package/src/i18n/index.ts +65 -0
  682. package/src/i18n/types.ts +182 -0
  683. package/src/i18n/usage-example.tsx +202 -0
  684. package/src/index.ts +25 -0
  685. package/src/modules/api/CardAuthentification.ts +589 -0
  686. package/src/modules/api/KYCService.ts +666 -0
  687. package/src/modules/api/SelfieVerification.ts +33 -0
  688. package/src/modules/api/TemplateService.ts +168 -0
  689. package/src/modules/api/backendApi.ts +8 -0
  690. package/src/modules/api/types.ts +59 -0
  691. package/src/modules/camera/NativeCameraModule.ts +170 -0
  692. package/src/modules/camera/UnifiedCameraModule.ts +160 -0
  693. package/src/modules/camera/VisionCameraModule.ts +334 -0
  694. package/src/modules/camera/VisionCameraModule.web.ts +679 -0
  695. package/src/modules/camera/index.ts +6 -0
  696. package/src/stores/kycStore.ts +161 -0
  697. package/src/types/KYC.types.ts +837 -0
  698. package/src/types/env.types.ts +13 -0
  699. package/src/utils/cropByObb.ts +254 -0
  700. package/src/utils/deviceDetection.ts +11 -0
  701. package/src/utils/get-document-type-info.ts +62 -0
  702. package/src/utils/logger.ts +48 -0
  703. package/src/utils/pathToBase64.ts +63 -0
  704. package/src/utils/platformAlert.ts +86 -0
  705. package/src/utils/remove-duplicate.ts +3 -0
  706. package/src/utils/template-transformer.ts +445 -0
  707. package/src/web/WebKYCEntry.tsx +375 -0
  708. package/src/web/index.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KYCService.js","sourceRoot":"","sources":["../../../src/modules/api/KYCService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0B,6BAA6B,EAA4B,MAAM,uBAAuB,CAAC;AAIxH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC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AE3C,IAAI,cAAc,EAAE,CAAC;YACnB,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACvG,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9F,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE;IACzC,OAAO,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO;QAClC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM;QAC5B,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK;QAC3B,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC;AACzB,CAAC,CAAA","sourcesContent":["import axios from 'axios';\nimport { GovernmentDocumentType, GovernmentDocumentTypeShorted, OrientationVideoResponse } from '../../types/KYC.types';\nimport { CheckTemplateTypeResponse, ExtractMrzTextResponse } from '../../components/OverLay/type';\nimport { SessionResponse, VerificationResult, VerificationSessionRequest } from './types';\nimport { KycEnvironment } from '../../types/env.types';\nimport { logger } from '../../utils/logger';\nimport { Platform } from 'react-native';\nimport KYCConfig from '../../config/KYCConfig';\n\nconst appendFileToFormData = async (formData: FormData, key: string, uri: string, name: string = 'file.jpg', type: string = 'image/jpeg') => {\n if (Platform.OS === 'web') {\n const response = await fetch(uri);\n const blob = await response.blob();\n formData.append(key, blob, name);\n } else {\n formData.append(key, { uri, type, name } as any);\n }\n};\n\n\nexport interface KYCRequest {\n userId: string;\n documentImage: string;\n selfieImage: string;\n documentType: 'passport' | 'id_card' | 'drivers_license';\n}\n\nexport interface KYCResponse {\n success: boolean;\n verificationId: string;\n status: 'pending' | 'approved' | 'rejected';\n message?: string;\n}\n\nexport interface FaceDetectionRequest {\n selfieImage: string;\n documentImage: string;\n}\n\nexport interface FaceDetectionResponse {\n match: boolean;\n confidence: number;\n message: string;\n}\n\nexport interface SelfieVideoResponse {\n orientation_direction: \"center\" | \"left\" | \"right\",\n turn_score: number;\n bbox: number[];\n capture: boolean;\n instruction: string;\n error: string;\n}\n\n\nexport class KYCService {\n private baseURL: string;\n private apiKey: string;\n // Additional service base URLs (fixed as per current infra)\n private faceServiceURL = 'https://kyc-engine.transfergratis.net:8000';\n private textExtractionServiceURL = 'https://kyc-engine.transfergratis.net:8006';\n private mrzServiceURL = 'https://kyc-engine.transfergratis.net:8002';\n private barcodeServiceURL = 'https://kyc-engine.transfergratis.net:8000';\n private orientationServiceURL = 'http://18.188.180.154:8080';\n\n constructor(baseURL: string, apiKey: string) {\n this.baseURL = baseURL;\n this.apiKey = apiKey;\n }\n\n private getHeaders() {\n return {\n 'Authorization': `Bearer ${this.apiKey}`,\n 'Content-Type': 'application/json',\n };\n }\n\n async submitKYC(data: KYCRequest): Promise<KYCResponse> {\n try {\n const response = await axios.post(\n `${this.baseURL}/kyc/submit`,\n data,\n { headers: this.getHeaders() }\n );\n return response.data;\n } catch (error) {\n logger.error('Error submitting KYC:', error);\n throw error;\n }\n }\n\n async detectFace(data: FaceDetectionRequest): Promise<FaceDetectionResponse> {\n try {\n const response = await axios.post(\n `${this.baseURL}/ai/face-detection`,\n data,\n { headers: this.getHeaders() }\n );\n return response.data;\n } catch (error) {\n logger.error('Error detecting face:', error);\n throw error;\n }\n }\n\n async validateDocument(documentImage: string, documentType: string): Promise<any> {\n try {\n const response = await axios.post(\n `${this.baseURL}/ai/document-validation`,\n { documentImage, documentType },\n { headers: this.getHeaders() }\n );\n return response.data;\n } catch (error) {\n logger.error('Error validating document:', error);\n throw error;\n }\n }\n\n async getKYCStatus(verificationId: string): Promise<KYCResponse> {\n try {\n const response = await axios.get(\n `${this.baseURL}/kyc/status/${verificationId}`,\n { headers: this.getHeaders() }\n );\n return response.data;\n } catch (error) {\n logger.error('Error getting KYC status:', error);\n throw error;\n }\n }\n\n async processSelfieOrientationPicture(videoFile: string, token: string): Promise<SelfieVideoResponse[]> {\n try {\n const formData = new FormData();\n await appendFileToFormData(formData, 'file', videoFile, 'selfie_picture.jpg', 'image/jpeg');\n\n const response = await axios.post<SelfieVideoResponse[]>(\n `${this.faceServiceURL}/detect_face_orientation/`,\n formData,\n {\n timeout: 20000,\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },\n }\n );\n return response.data;\n } catch (error) {\n logger.error('Error processing selfie orientation:', error);\n throw error;\n }\n }\n\n async processOrientationVideo(videoFile: string, env: KycEnvironment = 'PRODUCTION'): Promise<OrientationVideoResponse> {\n try {\n // SANDBOX mode: skip AI verification and return mock response\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI orientation video processing\");\n logger.log(\"SANDBOX mode: Returning mock orientation video response\");\n return {\n success: true,\n data: {\n center: { captured: true, frame: 10 },\n left: { captured: true, frame: 30 },\n right: { captured: true, frame: 50 }\n },\n message: 'SANDBOX: Orientation video processed successfully (mocked)'\n };\n }\n\n // Create FormData for multipart/form-data request\n const formData = new FormData();\n await appendFileToFormData(formData, 'file', videoFile, 'orientation_video.mp4', 'video/mp4');\n\n\n const response = await axios.post(\n `${this.orientationServiceURL}/process_orientation_video_stream/`,\n formData,\n {\n // Let axios set the proper multipart boundary header automatically\n timeout: 90000,\n }\n );\n\n return {\n success: true,\n data: response.data,\n message: 'Orientation video processed successfully'\n };\n } catch (error: any) {\n logger.error('Error processing orientation video:', JSON.stringify(error, null, 2));\n\n // Handle specific error cases\n if (error.response?.status === 503) {\n return {\n success: false,\n error: {\n code: 'SERVICE_UNAVAILABLE',\n message: 'Service not ready, model not initialized.',\n details: error.response.data\n },\n message: 'Service temporarily unavailable'\n };\n }\n\n return {\n success: false,\n error: {\n code: 'PROCESSING_ERROR',\n message: error.response?.data?.detail || error.message || 'Unknown error occurred',\n details: error.response?.data\n },\n message: 'Failed to process orientation video'\n };\n }\n }\n\n // STEP 1 - ID CARD VALIDATION\n async detectFaceOnId(idCardImageUri: string, token: string, docType: string, env: KycEnvironment = 'PRODUCTION'): Promise<{ result: boolean, detail: any[] }> {\n // SANDBOX mode\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI face detection on ID\");\n logger.log(\"SANDBOX mode: Returning mock face detection response\");\n return {\n result: true,\n detail: [{ confidence: 0.95, bbox: [50, 50, 200, 200] }],\n card_obb: { x: 50, y: 50, width: 200, height: 200 }\n } as any;\n }\n\n const formData = new FormData();\n // Defaulting to photo since we don't pass postfix here currently, but making the name generic\n await appendFileToFormData(formData, 'file', idCardImageUri, 'id_card_photo.jpg', 'image/jpeg');\n\n logger.log('detectFaceOnId formData', JSON.stringify(formData, null, 2));\n\n const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType];\n logger.log('detectFaceOnId docTypeShorted', docTypeShorted);\n try {\n const res = await axios.post(`${this.faceServiceURL}/detect_face/?doc_type=${docTypeShorted}`, formData,\n {\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },\n timeout: 20000\n });\n logger.log('detectFaceOnId res', JSON.stringify(res.data, null, 2));\n\n if (res.data?.result) return res.data;\n throw new Error(res.data?.detail || 'detect_face failed');\n } catch (error) {\n logger.error('Error detecting face on id:', JSON.stringify(error));\n throw error;\n }\n }\n\n //check templatetemplate_type\n async checkTemplateType(params: { fileUri: string; docType: string; docRegion: string; token: string; postfix: string }, env: KycEnvironment = 'PRODUCTION'): Promise<any> {\n // SANDBOX mode\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI template type check\");\n logger.log(\"SANDBOX mode: Returning mock template type response\");\n const { docType, docRegion, postfix } = params;\n return {\n template_path: `templates/${docType}_${docRegion}_${postfix}.jpg`,\n card_obb: { x: 50, y: 50, width: 200, height: 200 }\n };\n }\n\n const { fileUri, docType, docRegion, token, postfix } = params;\n const formData = new FormData();\n \n // ✅ FIX: Dynamically assign the postfix to the filename\n await appendFileToFormData(formData, 'file', fileUri, `id_card_${postfix}.jpg`, 'image/jpeg');\n\n const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType];\n const url = `${this.mrzServiceURL}/get_template_version/?doc_type=${encodeURIComponent(docTypeShorted)}&doc_region=${encodeURIComponent(docRegion)}&postfix=${postfix}`;\n\n logger.log('checkTemplateType params', this.mrzServiceURL, JSON.stringify({ fileUri, docTypeShorted, docRegion, token, postfix, url }, null, 2));\n try {\n const res = await axios.post<CheckTemplateTypeResponse>(url, formData, {\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },\n timeout: 60000,\n });\n logger.log('checkTemplateType res', JSON.stringify(res.data, null, 2));\n return res.data;\n } catch (e: any) {\n logger.error('Error checking template type:', JSON.stringify(e));\n throw e;\n }\n\n }\n\n async extractDocumentInformation(params: { fileUri: string; docType: string; docRegion: string; token: string; postfix?: string }): Promise<any> {\n const { fileUri, docType, docRegion, token, postfix = 'front' } = params;\n const formData = new FormData();\n \n // ✅ FIX: Dynamic filename\n await appendFileToFormData(formData, 'file', fileUri, `id_card_${postfix}.jpg`, 'image/jpeg');\n\n const url = `${this.textExtractionServiceURL}/extract_doc_information/?doc_type=${encodeURIComponent(docType)}&doc_region=${encodeURIComponent(docRegion)}`;\n const attempt = async () => {\n const res = await axios.post(url, formData, {\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },\n timeout: 60000,\n });\n logger.log('extractDocumentInformation res', JSON.stringify(truncateFields(res)));\n\n if (res.data?.detail) throw new Error(res.data.detail);\n return res.data;\n };\n try {\n return await attempt();\n } catch (e) {\n logger.error('Error extracting document information:', JSON.stringify(truncateFields(e)));\n throw e;\n }\n }\n\n // STEP 2 - barcode extraction\n async extractBarcode(params: { fileUri: string; token: string; postfix?: string }, env: KycEnvironment = 'PRODUCTION'): Promise<any> {\n // SANDBOX mode\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI barcode extraction\");\n logger.log(\"SANDBOX mode: Returning mock barcode response\");\n return {\n barcode_data: 'SANDBOX_MOCK_BARCODE_DATA',\n card_obb: { x: 50, y: 50, width: 200, height: 200 }\n };\n }\n\n const { fileUri, token, postfix = 'back' } = params;\n const formData = new FormData();\n \n // ✅ FIX: Dynamic filename\n await appendFileToFormData(formData, 'file', fileUri, `id_card_${postfix}.jpg`, 'image/jpeg');\n\n const url = `${this.barcodeServiceURL}/decode_barcode/`;\n const attempt = async () => {\n try {\n const res = await axios.post(url, formData, {\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },\n timeout: 60000,\n });\n logger.log('extractBarcode res', JSON.stringify(res.data, null, 2));\n if (Object.keys(res.data).length === 0) throw new Error('No data found');\n return res.data;\n } catch (e: any) {\n throw new Error(e?.message || 'Erreur de détection du barcode');\n }\n };\n try {\n return await attempt();\n } catch (e) {\n logger.error('Error extracting Barcode text:', JSON.stringify(e));\n throw e;\n }\n }\n\n // STEP 3 - MRZ TEXT EXTRACTION\n async extractMrzText(\n params: { \n fileUri: string; \n docType: string; \n docRegion: string; \n postfix?: string; \n token: string; \n template_path: string; \n mrz_type?: string; \n }, \n env: KycEnvironment = 'PRODUCTION'\n ): Promise<any> {\n // SANDBOX mode\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI MRZ extraction\");\n logger.log(\"SANDBOX mode: Returning mock MRZ response\");\n const { docType, docRegion, postfix = 'back', mrz_type } = params;\n return {\n success: true,\n parsed_data: {\n status: 'success',\n document_type: docType,\n mrz_type: mrz_type || 'TD1',\n doc_region: docRegion,\n postfix: postfix\n },\n card_obb: { x: 50, y: 50, width: 200, height: 200 }\n };\n }\n\n const { fileUri, docType, docRegion, postfix = 'back', token, template_path, mrz_type } = params;\n const formData = new FormData();\n \n // ✅ Dynamic filename to prevent passports from crashing (since their MRZ is on the front)\n await appendFileToFormData(formData, 'file', fileUri, `id_card_${postfix}.jpg`, 'image/jpeg');\n\n const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType] || docType;\n logger.log(\"docTypeShorted\", docTypeShorted, docRegion, postfix);\n\n let url = `${this.mrzServiceURL}/extract_mrz_text/?doc_type=${encodeURIComponent(docTypeShorted)}&doc_region=${encodeURIComponent(docRegion)}&postfix=${encodeURIComponent(postfix)}&template_path=${encodeURIComponent(template_path)}`;\n \n if (mrz_type && mrz_type.trim() !== '') {\n url += `&mrz_type=${encodeURIComponent(mrz_type)}`;\n }\n \n logger.log(\"url\", url);\n\n const attempt = async () => {\n try {\n const res = await axios.post<ExtractMrzTextResponse>(url, formData, {\n headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}` },\n // Note: Reduced timeout to 10000ms (10s) based on our earlier network fix to prevent infinite hanging!\n timeout: 10000, \n });\n \n logger.log('extractMrzText res', JSON.stringify(res.data, null, 2));\n \n if (Object.keys(res.data).length === 0) throw new Error('No data found');\n if (res.data?.success === false) throw new Error(res.data.parsed_data?.status || 'Échec de l\\'extraction MRZ');\n \n return res.data;\n } catch (e: any) {\n throw new Error(e?.message || 'Erreur de détection du MRZ');\n }\n };\n\n try {\n return await attempt();\n } catch (e) {\n logger.error('Error extracting MRZ text:', JSON.stringify(errorMessage(e), null, 2));\n throw e;\n }\n }\n\n // STEP 2 - SELFIE VALIDATION\n async recognizeFace(params: { idPhotoUri: string; selfiePhotoUri: string }, env: KycEnvironment = 'PRODUCTION'): Promise<{ is_match: boolean; similarity: number; id_bbox?: number[]; selfie_bbox?: number[] }> {\n // SANDBOX mode\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI face recognition\");\n logger.log(\"SANDBOX mode: Returning mock face recognition response\");\n return {\n is_match: true,\n similarity: 0.95,\n id_bbox: [50, 50, 200, 200],\n selfie_bbox: [50, 50, 200, 200]\n };\n }\n\n const { idPhotoUri, selfiePhotoUri } = params;\n const formData = new FormData();\n await appendFileToFormData(formData, 'id_photo', idPhotoUri, 'id_card_photo.jpg', 'image/jpeg');\n await appendFileToFormData(formData, 'selfie_photo', selfiePhotoUri, 'selfie_final.jpg', 'image/jpeg');\n\n const res = await axios.post(`${this.faceServiceURL}/recognize_face/`, formData, { timeout: 45000 });\n if (res.data?.detail) throw new Error(res.data.detail);\n return res.data;\n }\n\n // HEALTH CHECKS\n async healthFaceDetection(): Promise<any> {\n const res = await axios.get(`${this.faceServiceURL}/health`);\n return res.data;\n }\n\n async healthTextExtraction(): Promise<any> {\n const res = await axios.get(`${this.textExtractionServiceURL}/health`);\n return res.data;\n }\n\n async healthMrzService(): Promise<any> {\n const res = await axios.get(`${this.mrzServiceURL}/health`);\n return res.data;\n }\n\n async healthOrientationService(): Promise<any> {\n const res = await axios.get(`${this.orientationServiceURL}/health`);\n return res.data;\n }\n\n async newSession({ token, apiKey }: { token?: string, apiKey?: string }): Promise<SessionResponse> {\n try {\n const data = {\n \"status\": \"PENDING\",\n \"metadata\": {},\n }\n const res = await axios.post<SessionResponse>(`${KYCConfig.getBackendUrl()}/verification/sessions/`,\n data, {\n headers: {\n 'Content-Type': 'application/json',\n ...(apiKey ? { 'Authorization': `ApiKey ${apiKey}` } : { 'Authorization': `Bearer ${token}` })\n }\n });\n return res.data;\n } catch (error: any) {\n logger.error('Error creating session:', JSON.stringify(errorMessage(error), null, 2));\n\n // Extract backend error message if available\n const backendMessage = errorMessage(error);\n\n if (backendMessage) {\n logger.error('Backend error message:', JSON.stringify(truncateFields(backendMessage), null, 2));\n throw new Error(`Backend error: ${JSON.stringify(truncateFields(backendMessage))}`);\n }\n\n throw error;\n }\n }\n\n async verificationSession(payload: VerificationSessionRequest): Promise<any> {\n console.log('apiKey in verificationSession', payload.apiKey);\n try {\n const { session_id, step, data, templateId, action, apiKey } = payload;\n const token = apiKey ? undefined : await authentification();\n const payloadData = {\n action: action,\n data: {\n step,\n templateId,\n ...(action === \"location_permission\" ? { permissionGranted: true, } : {}),\n ...data,\n },\n ...({ session_id: session_id }),\n timestamp: new Date().toISOString()\n }\n const url = `${KYCConfig.getBackendUrl()}/verification/api/kyc/sessions/${session_id}/steps/${step}/`;\n\n const logPayload = truncateFields({ payloadData, session_id, step });\n logger.log('verificationSession payload',\n JSON.stringify(truncateFields({ logPayload, token: token ?? \"-\", path: url, apiKey }),\n null, 2))\n\n const res = await axios.post<SessionResponse>(url,\n payloadData,\n {\n headers: {\n 'Content-Type': 'application/json',\n ...(apiKey ? { 'Authorization': `ApiKey ${apiKey}` } : { 'Authorization': `Bearer ${token}` })\n }\n });\n logger.log('verificationSession res', JSON.stringify(truncateFields(res.data), null, 2));\n return res.data;\n\n } catch (error) {\n logger.error('Error validating component:', JSON.stringify(error, null, 2));\n throw new Error(errorMessage(error));\n }\n }\n\n /** Send email verification code. POST /api/v1/accounts/email/send/ */\n async sendEmailVerificationCode(\n email: string,\n auth?: { apiKey?: string; token?: string }\n ): Promise<unknown> {\n const url = `${KYCConfig.getBackendUrl()}/accounts/email/send/`;\n const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());\n const res = await axios.post(\n url,\n { email },\n {\n headers: {\n 'Content-Type': 'application/json',\n ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),\n },\n }\n );\n return res.data;\n }\n\n /** Verify email with OTP. POST /api/v1/accounts/email/verify/ */\n async verifyEmailCode(\n otp: string,\n auth?: { apiKey?: string; token?: string }\n ): Promise<unknown> {\n const url = `${KYCConfig.getBackendUrl()}/accounts/email/verify/`;\n const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());\n const res = await axios.post(\n url,\n { otp },\n {\n headers: {\n 'Content-Type': 'application/json',\n ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),\n },\n }\n );\n return res.data;\n }\n\n async getVerificationResult(session_id: string): Promise<VerificationResult> {\n try {\n const token = await authentification();\n const url = `${KYCConfig.getBackendUrl()}/verification/api/kyc/result/?session_id=${session_id}`;\n const res = await axios.get<VerificationResult>(url,\n { headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` } });\n logger.log('getVerificationResult res', JSON.stringify(truncateFields(res.data), null, 2));\n return res.data;\n } catch (error) {\n logger.error('Error getting verification result:', JSON.stringify(errorMessage(error), null, 2));\n throw error;\n }\n }\n}\n\nconst kycService = new KYCService(\"\", \"\");\nexport default kycService;\n\n// Pour éviter d'afficher des champs trop longs, on tronque les valeurs longues dans le log\nexport function truncateFields(obj: any, maxLength = 420): any {\n if (typeof obj !== 'object' || obj === null) return obj;\n if (Array.isArray(obj)) return obj.map(item => truncateFields(item, maxLength));\n const truncated: any = {};\n for (const key in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n const value = obj[key];\n if (typeof value === 'string' && value.length > maxLength) {\n truncated[key] = value.slice(0, maxLength) + '... [truncated]';\n } else if (typeof value === 'object' && value !== null) {\n truncated[key] = truncateFields(value, maxLength);\n } else {\n truncated[key] = value;\n }\n }\n return truncated;\n}\n\nexport const authentification = async () => {\n try {\n logger.log('authentification params', 'kyc_frontend', 'ZCW4mGaJXWR0UuI40lM1pHNQmYLw2xvX');\n const params = new URLSearchParams();\n params.append('client_id', 'kyc_frontend');\n params.append('client_secret', 'ZCW4mGaJXWR0UuI40lM1pHNQmYLw2xvX');\n params.append('grant_type', 'client_credentials');\n const res = await axios.post(`https://keycloak.transfergratis.net/realms/kyc/protocol/openid-connect/token`,\n params,\n {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n }\n );\n logger.log('authentification res', JSON.stringify(truncateFields(res.data)));\n return res.data.access_token;\n } catch (error: any) {\n logger.error('Error authentifying:', {\n message: error.message,\n status: error.response?.status,\n statusText: error.response?.statusText,\n data: error.response?.data,\n url: error.config?.url,\n method: error.config?.method\n });\n\n const backendMessage = errorMessage(error);\n\n if (backendMessage) {\n logger.error('Backend authentication error:', JSON.stringify(truncateFields(backendMessage), null, 2));\n throw new Error(`Authentication failed: ${JSON.stringify(truncateFields(backendMessage))}`);\n }\n\n throw error;\n }\n}\n\nexport const errorMessage = (error: any) => {\n return error.response?.data?.message ||\n error.response?.data?.detail ||\n error.response?.data?.error ||\n error.response?.data;\n}"]}
@@ -0,0 +1,5 @@
1
+ import { SelfieVideoResponse } from "./KYCService";
2
+ import { KycEnvironment } from "../../types/env.types";
3
+ declare const selfieVerification: (selfieImage: string, env?: KycEnvironment) => Promise<SelfieVideoResponse[]>;
4
+ export default selfieVerification;
5
+ //# sourceMappingURL=SelfieVerification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelfieVerification.d.ts","sourceRoot":"","sources":["../../../src/modules/api/SelfieVerification.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAoB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEjF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,QAAA,MAAM,kBAAkB,GAAU,aAAa,MAAM,EAAE,MAAK,cAA6B,KAAG,OAAO,CAAC,mBAAmB,EAAE,CAuBxH,CAAA;AAKD,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import kycService, { authentification } from "./KYCService";
2
+ const selfieVerification = async (selfieImage, env = 'PRODUCTION') => {
3
+ // In SANDBOX mode, skip AI verification and return a mock success response
4
+ if (env === 'SANDBOX') {
5
+ console.log("SANDBOX mode: Skipping AI verification for selfie");
6
+ // Return a mock response that simulates successful verification
7
+ // This allows the flow to continue without actual AI processing
8
+ const mockResponse = [{
9
+ orientation_direction: "center",
10
+ turn_score: 1.0,
11
+ bbox: [0, 0, 100, 100],
12
+ capture: true,
13
+ instruction: "SANDBOX: AI verification skipped",
14
+ error: ""
15
+ }];
16
+ return mockResponse;
17
+ }
18
+ // PRODUCTION mode: perform actual AI verification
19
+ const token = await authentification();
20
+ const response = await kycService.processSelfieOrientationPicture(selfieImage, token);
21
+ console.log("selfieVerification response", JSON.stringify(response, null, 2));
22
+ return response;
23
+ };
24
+ export default selfieVerification;
25
+ //# sourceMappingURL=SelfieVerification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelfieVerification.js","sourceRoot":"","sources":["../../../src/modules/api/SelfieVerification.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAuB,MAAM,cAAc,CAAC;AAIjF,MAAM,kBAAkB,GAAG,KAAK,EAAE,WAAmB,EAAE,MAAsB,YAAY,EAAkC,EAAE;IACzH,2EAA2E;IAC3E,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;QACjE,gEAAgE;QAChE,gEAAgE;QAEhE,MAAM,YAAY,GAA0B,CAAC;gBACzC,qBAAqB,EAAE,QAAQ;gBAC/B,UAAU,EAAE,GAAG;gBACf,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;gBACtB,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,kCAAkC;gBAC/C,KAAK,EAAE,EAAE;aACZ,CAAC,CAAC;QACH,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,kDAAkD;IAClD,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;IACvC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,+BAA+B,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9E,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAA;AAKD,eAAe,kBAAkB,CAAC","sourcesContent":["import kycService, { authentification, SelfieVideoResponse } from \"./KYCService\";\n\nimport { KycEnvironment } from \"../../types/env.types\";\n\nconst selfieVerification = async (selfieImage: string, env: KycEnvironment = 'PRODUCTION'): Promise<SelfieVideoResponse[]> => {\n // In SANDBOX mode, skip AI verification and return a mock success response\n if (env === 'SANDBOX') {\n console.log(\"SANDBOX mode: Skipping AI verification for selfie\");\n // Return a mock response that simulates successful verification\n // This allows the flow to continue without actual AI processing\n \n const mockResponse: SelfieVideoResponse[] = [{\n orientation_direction: \"center\",\n turn_score: 1.0,\n bbox: [0, 0, 100, 100],\n capture: true,\n instruction: \"SANDBOX: AI verification skipped\",\n error: \"\"\n }];\n return mockResponse;\n }\n\n // PRODUCTION mode: perform actual AI verification\n const token = await authentification();\n const response = await kycService.processSelfieOrientationPicture(selfieImage, token);\n console.log(\"selfieVerification response\", JSON.stringify(response, null, 2));\n return response;\n}\n\n\n\n\nexport default selfieVerification;"]}
@@ -0,0 +1,44 @@
1
+ import { BackendKYCTemplate } from '../../types/KYC.types';
2
+ export declare class TemplateServiceClass {
3
+ private cache;
4
+ private cacheTimeout;
5
+ /**
6
+ * Get headers for API requests
7
+ */
8
+ private getHeaders;
9
+ /**
10
+ * Fetch a template from the backend API
11
+ * @param templateId - The ID of the template to fetch
12
+ * @param apiKey - Optional API key for authentication
13
+ * @param token - Optional Bearer token for authentication
14
+ * @param useCache - Whether to use cached version if available (default: true)
15
+ * @returns The backend template
16
+ */
17
+ fetchTemplate(templateId: string, apiKey?: string, token?: string, useCache?: boolean): Promise<BackendKYCTemplate>;
18
+ /**
19
+ * Clear the template cache
20
+ * @param templateId - Optional template ID to clear. If not provided, clears all cache.
21
+ */
22
+ clearCache(templateId?: string): void;
23
+ /**
24
+ * Get cached template if available
25
+ * @param templateId - The template ID
26
+ * @returns The cached template or null if not found/expired
27
+ */
28
+ getCachedTemplate(templateId: string): BackendKYCTemplate | null;
29
+ /**
30
+ * Fetch list of available templates (optional feature)
31
+ * @param apiKey - Optional API key for authentication
32
+ * @param token - Optional Bearer token for authentication
33
+ * @returns Array of template metadata
34
+ */
35
+ fetchTemplateList(apiKey?: string, token?: string): Promise<Array<{
36
+ id: string;
37
+ name: Record<string, string>;
38
+ version?: string;
39
+ status?: string;
40
+ }>>;
41
+ }
42
+ declare const templateService: TemplateServiceClass;
43
+ export default templateService;
44
+ //# sourceMappingURL=TemplateService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateService.d.ts","sourceRoot":"","sources":["../../../src/modules/api/TemplateService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAKhF,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,KAAK,CAA+E;IAC5F,OAAO,CAAC,YAAY,CAAiB;IAErC;;OAEG;IACH,OAAO,CAAC,UAAU;IAclB;;;;;;;OAOG;IACG,aAAa,CACjB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;IAiE9B;;;OAGG;IACH,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;IAUrC;;;;OAIG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI;IAahE;;;;;OAKG;IACG,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAiB1J;AAGD,QAAA,MAAM,eAAe,sBAA6B,CAAC;AACnD,eAAe,eAAe,CAAC"}
@@ -0,0 +1,146 @@
1
+ import axios from 'axios';
2
+ import { logger } from '../../utils/logger';
3
+ import { errorMessage } from './KYCService';
4
+ import KYCConfig from '../../config/KYCConfig';
5
+ export class TemplateServiceClass {
6
+ cache = new Map();
7
+ cacheTimeout = 5 * 60 * 1000; // 5 minutes
8
+ /**
9
+ * Get headers for API requests
10
+ */
11
+ getHeaders(apiKey, token) {
12
+ const headers = {
13
+ 'Content-Type': 'application/json',
14
+ };
15
+ if (apiKey) {
16
+ headers['Authorization'] = `ApiKey ${apiKey}`;
17
+ }
18
+ else if (token) {
19
+ headers['Authorization'] = `Bearer ${token}`;
20
+ }
21
+ return headers;
22
+ }
23
+ /**
24
+ * Fetch a template from the backend API
25
+ * @param templateId - The ID of the template to fetch
26
+ * @param apiKey - Optional API key for authentication
27
+ * @param token - Optional Bearer token for authentication
28
+ * @param useCache - Whether to use cached version if available (default: true)
29
+ * @returns The backend template
30
+ */
31
+ async fetchTemplate(templateId, apiKey, token, useCache = true) {
32
+ // Check cache first
33
+ if (useCache) {
34
+ const cached = this.cache.get(templateId);
35
+ if (cached) {
36
+ const age = Date.now() - cached.timestamp;
37
+ if (age < this.cacheTimeout) {
38
+ logger.log(`Template ${templateId} loaded from cache`);
39
+ return cached.template;
40
+ }
41
+ else {
42
+ // Cache expired, remove it
43
+ this.cache.delete(templateId);
44
+ }
45
+ }
46
+ }
47
+ try {
48
+ const url = `${KYCConfig.getBackendUrl()}/templates/kyc/template/${templateId}/`;
49
+ logger.log(templateId);
50
+ logger.log(`Fetching template from: ${url} with apiKey: ${apiKey} and token: ${token}`, {
51
+ headers: this.getHeaders(apiKey, token)
52
+ });
53
+ const response = await axios.get(url, {
54
+ headers: this.getHeaders(apiKey, token),
55
+ timeout: 30000, // 30 seconds timeout
56
+ });
57
+ const template = response.data;
58
+ // Validate template structure
59
+ if (!template.id || !template.name || !Array.isArray(template.components)) {
60
+ throw new Error('Invalid template structure received from API');
61
+ }
62
+ // Store in cache
63
+ this.cache.set(templateId, {
64
+ template,
65
+ timestamp: Date.now(),
66
+ });
67
+ logger.log(`Template ${templateId} fetched successfully`);
68
+ return template;
69
+ }
70
+ catch (error) {
71
+ logger.error(`Error fetching template ${templateId}:`, JSON.stringify(errorMessage(error), null, 2));
72
+ // Extract backend error message if available
73
+ const backendMessage = errorMessage(error);
74
+ if (error.response?.status === 404) {
75
+ throw new Error(`Template not found: ${templateId}`);
76
+ }
77
+ if (error.response?.status === 401 || error.response?.status === 403) {
78
+ throw new Error(`Unauthorized: Invalid API key or token`);
79
+ }
80
+ if (backendMessage) {
81
+ throw new Error(`Failed to fetch template: ${JSON.stringify(backendMessage)}`);
82
+ }
83
+ throw new Error(`Failed to fetch template: ${error.message || 'Unknown error'}`);
84
+ }
85
+ }
86
+ /**
87
+ * Clear the template cache
88
+ * @param templateId - Optional template ID to clear. If not provided, clears all cache.
89
+ */
90
+ clearCache(templateId) {
91
+ if (templateId) {
92
+ this.cache.delete(templateId);
93
+ logger.log(`Cache cleared for template: ${templateId}`);
94
+ }
95
+ else {
96
+ this.cache.clear();
97
+ logger.log('All template cache cleared');
98
+ }
99
+ }
100
+ /**
101
+ * Get cached template if available
102
+ * @param templateId - The template ID
103
+ * @returns The cached template or null if not found/expired
104
+ */
105
+ getCachedTemplate(templateId) {
106
+ const cached = this.cache.get(templateId);
107
+ if (cached) {
108
+ const age = Date.now() - cached.timestamp;
109
+ if (age < this.cacheTimeout) {
110
+ return cached.template;
111
+ }
112
+ else {
113
+ this.cache.delete(templateId);
114
+ }
115
+ }
116
+ return null;
117
+ }
118
+ /**
119
+ * Fetch list of available templates (optional feature)
120
+ * @param apiKey - Optional API key for authentication
121
+ * @param token - Optional Bearer token for authentication
122
+ * @returns Array of template metadata
123
+ */
124
+ async fetchTemplateList(apiKey, token) {
125
+ try {
126
+ const url = `${KYCConfig.getBackendUrl()}/templates/kyc/templates`;
127
+ logger.log(`Fetching template list from: ${url}`);
128
+ const response = await axios.get(url, {
129
+ headers: this.getHeaders(apiKey, token),
130
+ timeout: 30000,
131
+ });
132
+ logger.log(`Fetched ${response.data.length} templates`);
133
+ return response.data;
134
+ }
135
+ catch (error) {
136
+ logger.error('Error fetching template list:', JSON.stringify(errorMessage(error), null, 2));
137
+ throw new Error(`Failed to fetch template list: ${error.message || 'Unknown error'}`);
138
+ }
139
+ }
140
+ }
141
+ // Export singleton instance as default
142
+ const templateService = new TemplateServiceClass();
143
+ export default templateService;
144
+ // Also export the class for advanced usage
145
+ // export { TemplateServiceClass };
146
+ //# sourceMappingURL=TemplateService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateService.js","sourceRoot":"","sources":["../../../src/modules/api/TemplateService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,MAAM,OAAO,oBAAoB;IACvB,KAAK,GAAqE,IAAI,GAAG,EAAE,CAAC;IACpF,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;IAElD;;OAEG;IACK,UAAU,CAAC,MAAe,EAAE,KAAc;QAChD,MAAM,OAAO,GAA2B;YACtC,cAAc,EAAE,kBAAkB;SACnC,CAAC;QAEF,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,MAAM,EAAE,CAAC;QAChD,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,KAAK,EAAE,CAAC;QAC/C,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,MAAe,EACf,KAAc,EACd,WAAoB,IAAI;QAExB,oBAAoB;QACpB,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC1C,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EA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,kCAAkC,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF;AAED,uCAAuC;AACvC,MAAM,eAAe,GAAG,IAAI,oBAAoB,EAAE,CAAC;AACnD,eAAe,eAAe,CAAC;AAE/B,2CAA2C;AAC3C,mCAAmC","sourcesContent":["import axios from 'axios';\nimport { BackendKYCTemplate, TemplateAPIResponse } from '../../types/KYC.types';\nimport { logger } from '../../utils/logger';\nimport { errorMessage } from './KYCService';\nimport KYCConfig from '../../config/KYCConfig';\n\nexport class TemplateServiceClass {\n private cache: Map<string, { template: BackendKYCTemplate; timestamp: number }> = new Map();\n private cacheTimeout = 5 * 60 * 1000; // 5 minutes\n\n /**\n * Get headers for API requests\n */\n private getHeaders(apiKey?: string, token?: string) {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n\n if (apiKey) {\n headers['Authorization'] = `ApiKey ${apiKey}`;\n } else if (token) {\n headers['Authorization'] = `Bearer ${token}`;\n }\n\n return headers;\n }\n\n /**\n * Fetch a template from the backend API\n * @param templateId - The ID of the template to fetch\n * @param apiKey - Optional API key for authentication\n * @param token - Optional Bearer token for authentication\n * @param useCache - Whether to use cached version if available (default: true)\n * @returns The backend template\n */\n async fetchTemplate(\n templateId: string,\n apiKey?: string,\n token?: string,\n useCache: boolean = true\n ): Promise<BackendKYCTemplate> {\n // Check cache first\n if (useCache) {\n const cached = this.cache.get(templateId);\n if (cached) {\n const age = Date.now() - cached.timestamp;\n if (age < this.cacheTimeout) {\n logger.log(`Template ${templateId} loaded from cache`);\n return cached.template;\n } else {\n // Cache expired, remove it\n this.cache.delete(templateId);\n }\n }\n }\n\n try {\n const url = `${KYCConfig.getBackendUrl()}/templates/kyc/template/${templateId}/`;\n logger.log(templateId)\n logger.log(`Fetching template from: ${url} with apiKey: ${apiKey} and token: ${token}`, {\n headers: this.getHeaders(apiKey, token)\n });\n\n const response = await axios.get<TemplateAPIResponse>(url, {\n headers: this.getHeaders(apiKey, token),\n timeout: 30000, // 30 seconds timeout\n });\n\n const template: BackendKYCTemplate = response.data;\n\n // Validate template structure\n if (!template.id || !template.name || !Array.isArray(template.components)) {\n throw new Error('Invalid template structure received from API');\n }\n\n // Store in cache\n this.cache.set(templateId, {\n template,\n timestamp: Date.now(),\n });\n\n logger.log(`Template ${templateId} fetched successfully`);\n return template;\n } catch (error: any) {\n logger.error(`Error fetching template ${templateId}:`, JSON.stringify(errorMessage(error), null, 2));\n\n // Extract backend error message if available\n const backendMessage = errorMessage(error);\n\n if (error.response?.status === 404) {\n throw new Error(`Template not found: ${templateId}`);\n }\n\n if (error.response?.status === 401 || error.response?.status === 403) {\n throw new Error(`Unauthorized: Invalid API key or token`);\n }\n\n if (backendMessage) {\n throw new Error(`Failed to fetch template: ${JSON.stringify(backendMessage)}`);\n }\n\n throw new Error(`Failed to fetch template: ${error.message || 'Unknown error'}`);\n }\n }\n\n /**\n * Clear the template cache\n * @param templateId - Optional template ID to clear. If not provided, clears all cache.\n */\n clearCache(templateId?: string): void {\n if (templateId) {\n this.cache.delete(templateId);\n logger.log(`Cache cleared for template: ${templateId}`);\n } else {\n this.cache.clear();\n logger.log('All template cache cleared');\n }\n }\n\n /**\n * Get cached template if available\n * @param templateId - The template ID\n * @returns The cached template or null if not found/expired\n */\n getCachedTemplate(templateId: string): BackendKYCTemplate | null {\n const cached = this.cache.get(templateId);\n if (cached) {\n const age = Date.now() - cached.timestamp;\n if (age < this.cacheTimeout) {\n return cached.template;\n } else {\n this.cache.delete(templateId);\n }\n }\n return null;\n }\n\n /**\n * Fetch list of available templates (optional feature)\n * @param apiKey - Optional API key for authentication\n * @param token - Optional Bearer token for authentication\n * @returns Array of template metadata\n */\n async fetchTemplateList(apiKey?: string, token?: string): Promise<Array<{ id: string; name: Record<string, string>; version?: string; status?: string }>> {\n try {\n const url = `${KYCConfig.getBackendUrl()}/templates/kyc/templates`;\n logger.log(`Fetching template list from: ${url}`);\n\n const response = await axios.get<Array<{ id: string; name: Record<string, string>; version?: string; status?: string }>>(url, {\n headers: this.getHeaders(apiKey, token),\n timeout: 30000,\n });\n\n logger.log(`Fetched ${response.data.length} templates`);\n return response.data;\n } catch (error: any) {\n logger.error('Error fetching template list:', JSON.stringify(errorMessage(error), null, 2));\n throw new Error(`Failed to fetch template list: ${error.message || 'Unknown error'}`);\n }\n }\n}\n\n// Export singleton instance as default\nconst templateService = new TemplateServiceClass();\nexport default templateService;\n\n// Also export the class for advanced usage\n// export { TemplateServiceClass };"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=backendApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backendApi.d.ts","sourceRoot":"","sources":["../../../src/modules/api/backendApi.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ // import kycService from "./KYCService"
2
+ export {};
3
+ // const initializesession = (token: string) => {
4
+ // // const session = await kycService.post("/session", {
5
+ // }
6
+ //# sourceMappingURL=backendApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backendApi.js","sourceRoot":"","sources":["../../../src/modules/api/backendApi.ts"],"names":[],"mappings":"AAAA,wCAAwC;;AAIxC,iDAAiD;AAEjD,6DAA6D;AAC7D,IAAI","sourcesContent":["// import kycService from \"./KYCService\"\n\n\n\n// const initializesession = (token: string) => {\n\n// // const session = await kycService.post(\"/session\", {\n// }"]}
@@ -0,0 +1,53 @@
1
+ export interface SessionResponse {
2
+ id: number;
3
+ session_id: string;
4
+ status: string;
5
+ created_at: string;
6
+ updated_at: string;
7
+ metadata: string;
8
+ user: number;
9
+ module: number;
10
+ }
11
+ export interface VerificationSessionRequest {
12
+ step: number;
13
+ data: VerificationSessionData;
14
+ templateId: string | null;
15
+ session_id: string;
16
+ token: string;
17
+ action: string;
18
+ apiKey?: string;
19
+ }
20
+ export type VerificationSessionData = Record<string, any>;
21
+ export interface VerificationResult {
22
+ [key: string]: {
23
+ data: {
24
+ verification_id: string;
25
+ verification_status: string;
26
+ completion_timestamp: string;
27
+ user_data: {
28
+ personal_information: {
29
+ full_name: string;
30
+ first_name: string | null;
31
+ given_name: string | null;
32
+ last_name: string | null;
33
+ date_of_birth: string;
34
+ sex: string;
35
+ expiry_date: string;
36
+ issue_date: string;
37
+ issue_place: string | null;
38
+ place_of_birth: string | null;
39
+ address: string | null;
40
+ city: string | null;
41
+ postal_code: string | null;
42
+ country: string | null;
43
+ };
44
+ };
45
+ selfie_info: {
46
+ is_match: boolean;
47
+ similarity: number;
48
+ image: string;
49
+ };
50
+ };
51
+ };
52
+ }
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/api/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAG1D,MAAM,WAAW,kBAAkB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG;QACX,IAAI,EAAE;YACF,eAAe,EAAE,MAAM,CAAC;YACxB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,oBAAoB,EAAE,MAAM,CAAC;YAC7B,SAAS,EAAE;gBACP,oBAAoB,EAAE;oBAClB,SAAS,EAAE,MAAM,CAAC;oBAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;oBAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;oBAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;oBACzB,aAAa,EAAE,MAAM,CAAC;oBACtB,GAAG,EAAE,MAAM,CAAC;oBACZ,WAAW,EAAE,MAAM,CAAE;oBACrB,UAAU,EAAE,MAAM,CAAC;oBACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;oBAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;oBAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;oBACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;oBACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;oBAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;iBAC1B,CAAC;aACL,CAAC;YACF,WAAW,EAAE;gBACT,QAAQ,EAAE,OAAO,CAAC;gBAClB,UAAU,EAAE,MAAM,CAAC;gBACnB,KAAK,EAAE,MAAM,CAAC;aACjB,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/api/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface SessionResponse {\n id: number;\n session_id: string;\n status: string;\n created_at: string;\n updated_at: string;\n metadata: string;\n user: number;\n module: number;\n}\n\n\nexport interface VerificationSessionRequest {\n step: number;\n data: VerificationSessionData;\n templateId: string | null;\n session_id: string;\n token: string;\n action: string\n apiKey?: string;\n}\n\n\n// dynamic type\nexport type VerificationSessionData = Record<string, any>;\n\n\nexport interface VerificationResult {\n [key: string]: {\n data: {\n verification_id: string;\n verification_status: string;\n completion_timestamp: string;\n user_data: {\n personal_information: {\n full_name: string;\n first_name: string | null;\n given_name: string | null;\n last_name: string | null;\n date_of_birth: string;\n sex: string;\n expiry_date: string ;\n issue_date: string;\n issue_place: string | null;\n place_of_birth: string | null;\n address: string | null;\n city: string | null;\n postal_code: string | null;\n country: string | null;\n };\n };\n selfie_info: {\n is_match: boolean;\n similarity: number;\n image: string;\n };\n };\n };\n}"]}
@@ -0,0 +1,52 @@
1
+ export interface CameraCaptureResult {
2
+ success: boolean;
3
+ path?: string;
4
+ error?: string;
5
+ }
6
+ export interface FilePickerResult {
7
+ success: boolean;
8
+ uri?: string;
9
+ path?: string;
10
+ error?: string;
11
+ }
12
+ export declare class NativeCameraModule {
13
+ private eventEmitter;
14
+ /**
15
+ * Test simple du module natif
16
+ */
17
+ testModule(): Promise<string>;
18
+ constructor();
19
+ /**
20
+ * Demande les permissions de caméra
21
+ */
22
+ requestCameraPermission(): Promise<boolean>;
23
+ /**
24
+ * Ouvre la caméra avec des instructions personnalisées
25
+ */
26
+ openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult>;
27
+ /**
28
+ * Ouvre le sélecteur de fichiers
29
+ */
30
+ openFilePicker(allowedTypes?: string[]): Promise<FilePickerResult>;
31
+ /**
32
+ * Écoute les événements de la caméra
33
+ */
34
+ onCameraCapture(callback: (event: any) => void): import("react-native").EmitterSubscription | {
35
+ remove: () => void;
36
+ };
37
+ /**
38
+ * Écoute les événements de sélection de fichiers
39
+ */
40
+ onFileSelected(callback: (event: any) => void): import("react-native").EmitterSubscription | {
41
+ remove: () => void;
42
+ };
43
+ /**
44
+ * Écoute les erreurs
45
+ */
46
+ onError(callback: (event: any) => void): import("react-native").EmitterSubscription | {
47
+ remove: () => void;
48
+ };
49
+ }
50
+ declare const _default: NativeCameraModule;
51
+ export default _default;
52
+ //# sourceMappingURL=NativeCameraModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCameraModule.d.ts","sourceRoot":"","sources":["../../../src/modules/camera/NativeCameraModule.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,YAAY,CAAmC;IAEvD;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;;IAgCnC;;OAEG;IACG,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAejD;;OAEG;IACG,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAgCpF;;OAEG;IACG,cAAc,CAAC,YAAY,GAAE,MAAM,EAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwBjF;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;IAQ9C;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;IAQ7C;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;CAOvC;;AAED,wBAAwC"}