@sanctum-key/react-native-sdk 1.0.9 → 1.0.11

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 (180) hide show
  1. package/README.md +3 -3
  2. package/android/build/.transforms/{c9d62bb333688ab562f51958998d5a48 → 9e34a0354bf8964d60c4c1392f5aa5b2}/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/generated/source/buildConfig/debug/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.java +2 -2
  4. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
  6. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  7. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  8. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_file_paths.xml.flat +0 -0
  9. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
  10. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
  11. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
  12. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
  13. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
  14. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.class +0 -0
  15. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +42 -42
  16. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
  17. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  18. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
  19. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  20. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  21. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  22. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  23. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  24. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  25. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  57. package/android/build/outputs/logs/manifest-merger-debug-report.txt +52 -52
  58. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  59. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
  60. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
  61. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
  62. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
  63. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
  64. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
  65. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
  66. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
  67. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  68. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  69. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  70. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  71. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  72. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
  73. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
  74. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule.class +0 -0
  75. package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkView.class +0 -0
  76. package/android/build.gradle +2 -2
  77. package/android/src/main/AndroidManifest.xml +1 -1
  78. package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkModule.kt → sanctumkey/com/SanctumKeySdkModule.kt} +21 -18
  79. package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkView.kt → sanctumkey/com/SanctumKeySdkView.kt} +2 -2
  80. package/build/package.json +5 -5
  81. package/build/src/App.d.ts +2 -2
  82. package/build/src/App.d.ts.map +1 -1
  83. package/build/src/App.js +2 -2
  84. package/build/src/App.js.map +1 -1
  85. package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
  86. package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
  87. package/build/src/SanctumKeySdk.types.js +2 -0
  88. package/build/src/SanctumKeySdk.types.js.map +1 -0
  89. package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
  90. package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
  91. package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
  92. package/build/src/SanctumKeySdkModule.js.map +1 -0
  93. package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
  94. package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
  95. package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
  96. package/build/src/SanctumKeySdkModule.web.js.map +1 -0
  97. package/build/src/SanctumKeySdkView.d.ts +4 -0
  98. package/build/src/SanctumKeySdkView.d.ts.map +1 -0
  99. package/build/src/SanctumKeySdkView.js +7 -0
  100. package/build/src/SanctumKeySdkView.js.map +1 -0
  101. package/build/src/SanctumKeySdkView.web.d.ts +4 -0
  102. package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
  103. package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
  104. package/build/src/SanctumKeySdkView.web.js.map +1 -0
  105. package/build/src/components/KYCElements/CountrySelection.d.ts.map +1 -1
  106. package/build/src/components/KYCElements/CountrySelection.js +259 -63
  107. package/build/src/components/KYCElements/CountrySelection.js.map +1 -1
  108. package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
  109. package/build/src/components/KYCElements/IDCardCapture.js +231 -69
  110. package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
  111. package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
  112. package/build/src/components/KYCElements/PhoneVerificationTemplate.js +160 -21
  113. package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
  114. package/build/src/components/NativeCameraView.js +1 -1
  115. package/build/src/components/NativeCameraView.js.map +1 -1
  116. package/build/src/components/TemplateKYCExample.d.ts +4 -3
  117. package/build/src/components/TemplateKYCExample.d.ts.map +1 -1
  118. package/build/src/components/TemplateKYCExample.js +2 -2
  119. package/build/src/components/TemplateKYCExample.js.map +1 -1
  120. package/build/src/config/allowedDomains.js +6 -6
  121. package/build/src/config/allowedDomains.js.map +1 -1
  122. package/build/src/config/region_mapping.json +727 -0
  123. package/build/src/index.d.ts +3 -3
  124. package/build/src/index.d.ts.map +1 -1
  125. package/build/src/index.js +3 -3
  126. package/build/src/index.js.map +1 -1
  127. package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
  128. package/build/src/modules/api/CardAuthentification.js +3 -7
  129. package/build/src/modules/api/CardAuthentification.js.map +1 -1
  130. package/build/src/modules/api/KYCService.d.ts +1 -2
  131. package/build/src/modules/api/KYCService.d.ts.map +1 -1
  132. package/build/src/modules/api/KYCService.js +112 -60
  133. package/build/src/modules/api/KYCService.js.map +1 -1
  134. package/build/src/modules/camera/NativeCameraModule.js +17 -17
  135. package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
  136. package/build/src/web/WebKYCEntry.d.ts +2 -2
  137. package/build/src/web/WebKYCEntry.d.ts.map +1 -1
  138. package/build/src/web/WebKYCEntry.js +3 -2
  139. package/build/src/web/WebKYCEntry.js.map +1 -1
  140. package/expo-module.config.json +3 -3
  141. package/ios/TransfergratisSdk.podspec +2 -2
  142. package/ios/TransfergratisSdkModule.swift +12 -12
  143. package/package.json +5 -5
  144. package/src/App.tsx +2 -2
  145. package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
  146. package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
  147. package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
  148. package/src/SanctumKeySdkView.tsx +11 -0
  149. package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
  150. package/src/components/KYCElements/CountrySelection.tsx +300 -74
  151. package/src/components/KYCElements/IDCardCapture.tsx +322 -157
  152. package/src/components/KYCElements/PhoneVerificationTemplate.tsx +201 -29
  153. package/src/components/NativeCameraView.tsx +1 -1
  154. package/src/components/TemplateKYCExample.tsx +23 -4
  155. package/src/config/allowedDomains.ts +6 -6
  156. package/src/i18n/README.md +1 -1
  157. package/src/index.ts +3 -3
  158. package/src/modules/api/CardAuthentification.ts +5 -8
  159. package/src/modules/api/KYCService.ts +174 -106
  160. package/src/modules/camera/NativeCameraModule.ts +17 -17
  161. package/src/web/WebKYCEntry.tsx +3 -3
  162. package/android/build/.transforms/ab90740579f5bd05b27b4343ada2d1c9/transformed/classes/classes_dex/classes.dex +0 -0
  163. package/android/build/.transforms/c9d62bb333688ab562f51958998d5a48/results.bin +0 -1
  164. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0 +0 -0
  165. package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
  166. package/build/src/TransfergratisSdk.types.js +0 -2
  167. package/build/src/TransfergratisSdk.types.js.map +0 -1
  168. package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
  169. package/build/src/TransfergratisSdkModule.js.map +0 -1
  170. package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
  171. package/build/src/TransfergratisSdkModule.web.js.map +0 -1
  172. package/build/src/TransfergratisSdkView.d.ts +0 -4
  173. package/build/src/TransfergratisSdkView.d.ts.map +0 -1
  174. package/build/src/TransfergratisSdkView.js +0 -7
  175. package/build/src/TransfergratisSdkView.js.map +0 -1
  176. package/build/src/TransfergratisSdkView.web.d.ts +0 -4
  177. package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
  178. package/build/src/TransfergratisSdkView.web.js.map +0 -1
  179. package/src/TransfergratisSdkView.tsx +0 -11
  180. /package/android/build/.transforms/{ab90740579f5bd05b27b4343ada2d1c9 → 9e34a0354bf8964d60c4c1392f5aa5b2}/results.bin +0 -0
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
2
  import { GovernmentDocumentType, GovernmentDocumentTypeShorted, OrientationVideoResponse } from '../../types/KYC.types';
3
- import { CheckTemplateTypeResponse, ExtractMrzTextResponse } from '../../components/OverLay/type';
3
+ import { CheckTemplateTypeResponse } from '../../components/OverLay/type';
4
4
  import { SessionResponse, VerificationResult, VerificationSessionRequest } from './types';
5
5
  import { KycEnvironment } from '../../types/env.types';
6
6
  import { logger } from '../../utils/logger';
@@ -60,12 +60,18 @@ export class KYCService {
60
60
  private baseURL: string;
61
61
  private apiKey: string;
62
62
  // Additional service base URLs (fixed as per current infra)
63
- private faceServiceURL = 'https://kyc-engine.transfergratis.net:8000';
64
- private textExtractionServiceURL = 'https://kyc-engine.transfergratis.net:8006';
65
- private mrzServiceURL = 'https://kyc-engine.transfergratis.net:8002';
66
- private barcodeServiceURL = 'https://kyc-engine.transfergratis.net:8000';
63
+ private faceServiceURL = 'https://face-infera.sanctumkey.com';
64
+ private textExtractionServiceURL = 'https://text-infera.sanctumkey.com';
65
+ private mrzServiceURL = 'https://mrz-infera.sanctumkey.com';
66
+ private barcodeServiceURL = 'https://kyc-engine.SanctumKey.net:8000';
67
67
  private orientationServiceURL = 'http://18.188.180.154:8080';
68
68
 
69
+ // private faceServiceURL = 'https://kyc-engine.transfergratis.net:8000';
70
+ // private textExtractionServiceURL = 'https://kyc-engine.transfergratis.net:8006';
71
+ // private mrzServiceURL = 'https://kyc-engine.transfergratis.net:8002';
72
+ // private barcodeServiceURL = 'https://kyc-engine.transfergratis.net:8000';
73
+ // private orientationServiceURL = 'http://18.188.180.154:8080';
74
+
69
75
  constructor(baseURL: string, apiKey: string) {
70
76
  this.baseURL = baseURL;
71
77
  this.apiKey = apiKey;
@@ -239,8 +245,8 @@ export class KYCService {
239
245
  const formData = new FormData();
240
246
  await appendFileToFormData(formData, 'file', idCardImageUri, 'id_card_photo.jpg', 'image/jpeg');
241
247
 
242
- const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType];
243
-
248
+ const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType] || docType;
249
+
244
250
  // Log metadata, NOT the FormData object
245
251
  logger.log('detectFaceOnId Request:', { docTypeShorted, imageUri: idCardImageUri });
246
252
 
@@ -305,7 +311,7 @@ export class KYCService {
305
311
  logger.log('checkTemplateType res', JSON.stringify(res.data, null, 2));
306
312
  return res.data;
307
313
  } catch (e: any) {
308
- logger.error('Error checking template type:', JSON.stringify(e));
314
+ logger.error('Error checkingg template type:', JSON.stringify(e));
309
315
  throw e;
310
316
  }
311
317
 
@@ -379,78 +385,104 @@ export class KYCService {
379
385
 
380
386
  // STEP 3 - MRZ TEXT EXTRACTION
381
387
  async extractMrzText(
382
- params: {
383
- fileUri: string;
384
- docType: string;
385
- docRegion: string;
386
- postfix?: string;
387
- token: string;
388
- template_path: string;
389
- mrz_type?: string;
390
- },
388
+ params: {
389
+ fileUri: string;
390
+ docType: string;
391
+ docRegion: string;
392
+ postfix?: string;
393
+ token: string;
394
+ template_path: string;
395
+ mrz_type?: string;
396
+ },
391
397
  env: KycEnvironment = 'PRODUCTION'
392
- ): Promise<any> {
393
- // SANDBOX mode
394
- if (env === 'SANDBOX') {
395
- console.log("SANDBOX mode: Skipping AI MRZ extraction");
396
- logger.log("SANDBOX mode: Returning mock MRZ response");
397
- const { docType, docRegion, postfix = 'back', mrz_type } = params;
398
- return {
399
- success: true,
400
- parsed_data: {
401
- status: 'success',
402
- document_type: docType,
403
- mrz_type: mrz_type || 'TD1',
404
- doc_region: docRegion,
405
- postfix: postfix
398
+ ): Promise<any> {
399
+ // SANDBOX mode
400
+ if (env === 'SANDBOX') {
401
+ console.log("SANDBOX mode: Skipping AI MRZ extraction");
402
+ const { docType, docRegion, postfix = 'back', mrz_type } = params;
403
+ return {
404
+ success: true,
405
+ parsed_data: {
406
+ status: 'success',
407
+ document_type: docType,
408
+ mrz_type: mrz_type || 'TD1',
409
+ doc_region: docRegion,
410
+ postfix: postfix
411
+ },
412
+ card_obb: { x: 50, y: 50, width: 200, height: 200 }
413
+ };
414
+ }
415
+
416
+ const { fileUri, docType, docRegion, postfix = 'back', token, template_path, mrz_type } = params;
417
+
418
+ // 1. Build the FormData ONLY for the file
419
+ const formData = new FormData();
420
+ const filePayload = {
421
+ uri: fileUri,
422
+ type: 'image/jpeg',
423
+ name: `id_card_${postfix}.jpg`,
424
+ };
425
+ formData.append('file', filePayload as any);
426
+
427
+ const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType] || docType;
428
+ const safeMrzType = mrz_type && mrz_type.trim() !== '' ? mrz_type : 'TD1';
429
+
430
+ logger.log("docTypeShorted", docTypeShorted, docRegion, postfix);
431
+
432
+ // 🚨 THE FIX: Pass all required text parameters in the URL query string for FastAPI
433
+ const queryParams = new URLSearchParams({
434
+ doc_type: docTypeShorted,
435
+ doc_region: docRegion,
436
+ postfix: postfix,
437
+ template_path: template_path,
438
+ mrz_type: safeMrzType,
439
+ reset_cache: 'true'
440
+ }).toString();
441
+
442
+ const url = `${this.mrzServiceURL}/extract_mrz_text/?${queryParams}`;
443
+ logger.log("url", url);
444
+
445
+ try {
446
+ const response = await fetch(url, {
447
+ method: 'POST',
448
+ headers: {
449
+ 'Authorization': `Bearer ${token}`,
450
+ 'Accept': 'application/json'
406
451
  },
407
- card_obb: { x: 50, y: 50, width: 200, height: 200 }
408
- };
409
- }
452
+ body: formData, // Only the file goes in the body
453
+ });
410
454
 
411
- const { fileUri, docType, docRegion, postfix = 'back', token, template_path, mrz_type } = params;
412
- const formData = new FormData();
413
-
414
- // Dynamic filename to prevent passports from crashing (since their MRZ is on the front)
415
- await appendFileToFormData(formData, 'file', fileUri, `id_card_${postfix}.jpg`, 'image/jpeg');
455
+ if (!response.ok) {
456
+ const errorText = await response.text();
457
+ logger.error('Backend MRZ Error Details:', errorText);
458
+ throw new Error(`Erreur serveur: ${response.status}`);
459
+ }
416
460
 
417
- const docTypeShorted = GovernmentDocumentTypeShorted[docType as GovernmentDocumentType] || docType;
418
- logger.log("docTypeShorted", docTypeShorted, docRegion, postfix);
461
+ // const data = await response.json();
462
+ // logger.log('extractMrzText res', JSON.stringify(data, null, 2));
419
463
 
420
- let url = `${this.mrzServiceURL}/extract_mrz_text/?doc_type=${encodeURIComponent(docTypeShorted)}&doc_region=${encodeURIComponent(docRegion)}&postfix=${encodeURIComponent(postfix)}&template_path=${encodeURIComponent(template_path)}`;
421
-
422
- if (mrz_type && mrz_type.trim() !== '') {
423
- url += `&mrz_type=${encodeURIComponent(mrz_type)}`;
424
- }
425
-
426
- logger.log("url", url);
464
+ // if (Object.keys(data).length === 0) throw new Error('No data found');
465
+ // if (data?.success === false) throw new Error(data.parsed_data?.status || 'Échec de l\'extraction MRZ');
427
466
 
428
- const attempt = async () => {
429
- try {
430
- const res = await axios.post<ExtractMrzTextResponse>(url, formData, {
431
- headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}` },
432
- // Note: Reduced timeout to 10000ms (10s) based on our earlier network fix to prevent infinite hanging!
433
- timeout: 10000,
434
- });
435
-
436
- logger.log('extractMrzText res', JSON.stringify(res.data, null, 2));
437
-
438
- if (Object.keys(res.data).length === 0) throw new Error('No data found');
439
- if (res.data?.success === false) throw new Error(res.data.parsed_data?.status || 'Échec de l\'extraction MRZ');
440
-
441
- return res.data;
442
- } catch (e: any) {
443
- throw new Error(e?.message || 'Erreur de détection du MRZ');
444
- }
445
- };
467
+ // return data;
468
+ const data = await response.json();
469
+ logger.log('extractMrzText res', JSON.stringify(data, null, 2));
446
470
 
447
- try {
448
- return await attempt();
449
- } catch (e) {
450
- logger.error('Error extracting MRZ text:', JSON.stringify(errorMessage(e), null, 2));
451
- throw e;
452
- }
453
- }
471
+ if (Object.keys(data).length === 0) throw new Error('No data found');
472
+
473
+ // 🚨 UPDATE THIS LINE to grab the actual status_message:
474
+ if (data?.success === false) {
475
+ const serverMessage = data.parsed_data?.status_message || data.parsed_data?.status || 'Échec de l\'extraction MRZ';
476
+ throw new Error(`Lecture MRZ refusée: ${serverMessage}`);
477
+ }
478
+
479
+ return data;
480
+
481
+ } catch (error: any) {
482
+ logger.error("MRZ Fetch Error: ", error?.message || error);
483
+ throw new Error(error?.message || 'Erreur de connexion lors de l\'extraction MRZ');
484
+ }
485
+ }
454
486
 
455
487
  // STEP 2 - SELFIE VALIDATION
456
488
  async recognizeFace(params: { idPhotoUri: string; selfiePhotoUri: string }, env: KycEnvironment = 'PRODUCTION'): Promise<{ is_match: boolean; similarity: number; id_bbox?: number[]; selfie_bbox?: number[] }> {
@@ -627,49 +659,85 @@ export class KYCService {
627
659
  auth?: { apiKey?: string; token?: string }
628
660
  ): Promise<unknown> {
629
661
  const url = `${KYCConfig.getBackendUrl()}/accounts/send-whatsapp-verification/`;
630
- const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
631
662
 
632
- const res = await axios.post(
633
- url,
634
- {
663
+ // 1. Formatting (Ensure consistency with verification step)
664
+ const formattedPhoneNumber = phoneNumber.replace(/^\+/, '');
665
+
666
+ // 2. Prepare Payload
667
+ const payload = {
635
668
  session_id: sessionId,
636
- phone_number: phoneNumber
637
- },
638
- {
639
- headers: {
640
- 'Content-Type': 'application/json',
641
- ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
642
- },
643
- }
644
- );
645
- return res.data;
669
+ phone_number: formattedPhoneNumber
670
+ };
671
+
672
+
673
+
674
+ const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
675
+ const headers = {
676
+ 'Content-Type': 'application/json',
677
+ ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
678
+ };
679
+
680
+
681
+
682
+ try {
683
+ const res = await axios.post(url, payload, { headers });
684
+
685
+ logger.log("✅ WhatsApp Send Success:", res.data);
686
+ return res.data;
687
+
688
+ } catch (error: any) {
689
+ if (error.response) {
690
+ logger.error("🛑 WhatsApp Send Failed (Server Response):", {
691
+ status: error.response.status,
692
+ data: error.response.data,
693
+ headers: error.response.headers
694
+ });
695
+ }
696
+ throw error;
697
+ }
646
698
  }
647
699
 
648
- /** Verify WhatsApp code with OTP. POST /api/v1/accounts/verify-whatsapp-verification/ */
649
700
  async verifyWhatsAppCode(
650
701
  sessionId: string,
651
702
  otp: string,
703
+ phoneNumber: string,
652
704
  auth?: { apiKey?: string; token?: string }
653
705
  ): Promise<unknown> {
654
- // Note: Verify this endpoint matches your exact Django/backend route
655
- const url = `${KYCConfig.getBackendUrl()}/accounts/verify-whatsapp-verification/`;
656
- const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
706
+ const url = `${KYCConfig.getBackendUrl()}/accounts/verify-whatsapp-code/`;
657
707
 
658
- const res = await axios.post(
659
- url,
660
- {
708
+ const formattedPhoneNumber = phoneNumber.replace(/^\+/, '');
709
+
710
+ const payload = {
661
711
  session_id: sessionId,
662
- otp: otp
663
- }, // Adjust this payload if your backend also expects 'phone_number' here
664
- {
665
- headers: {
666
- 'Content-Type': 'application/json',
667
- ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
668
- },
669
- }
670
- );
671
- return res.data;
672
- }
712
+ verification_code: otp,
713
+ phone_number: formattedPhoneNumber
714
+ };
715
+
716
+
717
+
718
+ const token = auth?.apiKey ? undefined : (auth?.token ?? await authentification());
719
+ const headers = {
720
+ 'Content-Type': 'application/json',
721
+ ...(auth?.apiKey ? { 'Authorization': `ApiKey ${auth.apiKey}` } : { 'Authorization': `Bearer ${token}` }),
722
+ };
723
+
724
+
725
+ try {
726
+ const res = await axios.post(url, payload, { headers });
727
+
728
+ return res.data;
729
+
730
+ } catch (error: any) {
731
+ if (error.response) {
732
+ logger.error("🛑 WhatsApp Verification Failed (Server Response):", {
733
+ status: error.response.status,
734
+ data: error.response.data,
735
+ headers: error.response.headers
736
+ });
737
+ }
738
+ throw error;
739
+ }
740
+ }
673
741
  }
674
742
 
675
743
  const kycService = new KYCService("", "");
@@ -719,7 +787,7 @@ export const authentification = async (): Promise<string> => {
719
787
  const params = 'client_id=kyc_frontend&client_secret=QhgAmvKgmwODzsEp98dnA4PeUEMMaFHd&grant_type=client_credentials';
720
788
 
721
789
  const res = await axios.post(
722
- `https://keycloak.transfergratis.net/realms/kyc/protocol/openid-connect/token`,
790
+ `https://idms.sanctumkey.com/realms/kyc/protocol/openid-connect/token`,
723
791
  params,
724
792
  {
725
793
  headers: {
@@ -1,5 +1,5 @@
1
1
  import { NativeEventEmitter, Platform } from "react-native";
2
- import TransfergratisSdkModule from "../../TransfergratisSdkModule";
2
+ import SanctumKeySdkModule from "../../SanctumKeySdkModule";
3
3
 
4
4
 
5
5
  export interface CameraCaptureResult {
@@ -23,11 +23,11 @@ export class NativeCameraModule {
23
23
  */
24
24
  async testModule(): Promise<string> {
25
25
  try {
26
- if (!TransfergratisSdkModule) {
27
- console.warn('TransfergratisSdk native module not available');
26
+ if (!SanctumKeySdkModule) {
27
+ console.warn('SanctumKeySdk native module not available');
28
28
  return 'Module not available';
29
29
  }
30
- return await TransfergratisSdkModule.testModule();
30
+ return await SanctumKeySdkModule.testModule();
31
31
  } catch (error) {
32
32
  console.error('Error testing module:', error);
33
33
  return 'Test failed';
@@ -39,17 +39,17 @@ export class NativeCameraModule {
39
39
  console.log('Platform:', Platform.OS);
40
40
 
41
41
  // Vérifier que le module natif est disponible
42
- if (TransfergratisSdkModule) {
43
- console.log('TransfergratisSdk module found, creating event emitter');
42
+ if (SanctumKeySdkModule) {
43
+ console.log('SanctumKeySdk module found, creating event emitter');
44
44
  try {
45
- // this.eventEmitter = new NativeEventEmitter(TransfergratisSdkModule as unknown as NativeModule);
45
+ // this.eventEmitter = new NativeEventEmitter(SanctumKeySdkModule as unknown as NativeModule);
46
46
  console.log('Event emitter created successfully');
47
47
  } catch (error) {
48
48
  console.error('Error creating event emitter:', error);
49
49
  this.eventEmitter = null;
50
50
  }
51
51
  } else {
52
- console.warn('TransfergratisSdk native module not available');
52
+ console.warn('SanctumKeySdk native module not available');
53
53
  }
54
54
  }
55
55
 
@@ -60,11 +60,11 @@ export class NativeCameraModule {
60
60
  console.log('requestCameraPermission');
61
61
 
62
62
  try {
63
- if (!TransfergratisSdkModule) {
64
- console.warn('TransfergratisSdk native module not available');
63
+ if (!SanctumKeySdkModule) {
64
+ console.warn('SanctumKeySdk native module not available');
65
65
  return false;
66
66
  }
67
- return await TransfergratisSdkModule.requestCameraPermission();
67
+ return await SanctumKeySdkModule.requestCameraPermission();
68
68
  } catch (error) {
69
69
  console.error('Error requesting camera permission:', error);
70
70
  return false;
@@ -76,8 +76,8 @@ export class NativeCameraModule {
76
76
  */
77
77
  async openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult> {
78
78
  try {
79
- if (!TransfergratisSdkModule) {
80
- console.warn('TransfergratisSdk native module not available');
79
+ if (!SanctumKeySdkModule) {
80
+ console.warn('SanctumKeySdk native module not available');
81
81
  return {
82
82
  success: false,
83
83
  error: 'Native module not available'
@@ -92,7 +92,7 @@ export class NativeCameraModule {
92
92
  };
93
93
  }
94
94
 
95
- const result = await TransfergratisSdkModule.openCameraWithInstructions(instructions);
95
+ const result = await SanctumKeySdkModule.openCameraWithInstructions(instructions);
96
96
  return {
97
97
  success: result.success,
98
98
  path: result.path
@@ -111,14 +111,14 @@ export class NativeCameraModule {
111
111
  */
112
112
  async openFilePicker(allowedTypes: string[] = ['*/*']): Promise<FilePickerResult> {
113
113
  try {
114
- if (!TransfergratisSdkModule) {
115
- console.warn('TransfergratisSdk native module not available');
114
+ if (!SanctumKeySdkModule) {
115
+ console.warn('SanctumKeySdk native module not available');
116
116
  return {
117
117
  success: false,
118
118
  error: 'Native module not available'
119
119
  };
120
120
  }
121
- const result = await TransfergratisSdkModule.openFilePicker(allowedTypes);
121
+ const result = await SanctumKeySdkModule.openFilePicker(allowedTypes);
122
122
  return {
123
123
  success: result.success,
124
124
  uri: result.uri,
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState, useCallback } from 'react';
1
+ import React, { useEffect, useState, useCallback, JSX } from 'react';
2
2
  import { View, Text, StyleSheet, SafeAreaView, ActivityIndicator } from 'react-native';
3
3
  // import { TemplateKYCFlow } from '../components/TemplateKYCFlowRefactored';
4
4
  // import { KYCTemplate } from '../types/KYC.types';
@@ -105,12 +105,12 @@ const postWebhook = async (url: string, payload: unknown, timeoutMs: number = 50
105
105
  }
106
106
  };
107
107
 
108
- const WebKYCEntry: React.FC<WebKYCEntryProps> = ({
108
+ export function WebKYCEntry({
109
109
  onComplete,
110
110
  onError,
111
111
  onCancel,
112
112
  onSessionSave,
113
- }) => {
113
+ }: WebKYCEntryProps): JSX.Element {
114
114
  const { setLocale } = useI18n();
115
115
  const [urlParams, setUrlParams] = useState<URLParams>({});
116
116
  const [isLoading, setIsLoading] = useState(true);
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdk.types.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,eAAe,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC7D,cAAc,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC3D,OAAO,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TransfergratisSdk.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdk.types.js","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nexport type CameraCaptureEventPayload = {\n instructions?: string;\n status: 'opened' | 'captured';\n path?: string;\n};\n\nexport type FileSelectedEventPayload = {\n uri: string;\n path: string;\n};\n\nexport type ErrorEventPayload = {\n message: string;\n};\n\nexport type TransfergratisSdkModuleEvents = {\n onCameraCapture: (params: CameraCaptureEventPayload) => void;\n onFileSelected: (params: FileSelectedEventPayload) => void;\n onError: (params: ErrorEventPayload) => void;\n};\n\nexport type TransfergratisSdkViewProps = {\n instructions: string;\n showCamera: boolean;\n onCapture?: (event: { nativeEvent: { action: 'capture' | 'retake' } }) => void;\n onError?: (event: { nativeEvent: ErrorEventPayload }) => void;\n style?: StyleProp<ViewStyle>;\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkModule.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAC7B,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAC3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnH;;AAGD,wBAAiF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkModule.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAcxD,yDAAyD;AACzD,eAAe,mBAAmB,CAA0B,mBAAmB,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\ndeclare class TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI: number;\n testModule(): Promise<string>;\n requestCameraPermission(): Promise<boolean>;\n openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }>;\n openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<TransfergratisSdkModule>('TransfergratisSdk');\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkModule.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,cAAM,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IAC/E,EAAE,SAAW;IAEP,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAK3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAOzH;;AAED,wBAAqF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkModule.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,uBAAwB,SAAQ,YAA2C;IAC/E,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAEb,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,0BAA0B,CAAC,YAAoB;QACnD,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sCAAsC;SAC9C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,YAAsB;QACzC,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,2CAA2C;SACnD,CAAC;IACJ,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { registerWebModule } from 'expo-modules-core';\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\nclass TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI = Math.PI;\n \n async requestCameraPermission(): Promise<boolean> {\n console.warn('Camera permission not available on web');\n return false;\n }\n \n async openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }> {\n console.warn('Camera not available on web');\n return {\n success: false,\n error: 'Camera not available on web platform'\n };\n }\n \n async openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }> {\n console.warn('File picker not available on web');\n return {\n success: false,\n error: 'File picker not available on web platform'\n };\n }\n}\n\nexport default registerWebModule(TransfergratisSdkModule, 'TransfergratisSdkModule');\n"]}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { TransfergratisSdkViewProps } from './TransfergratisSdk.types';
3
- export default function TransfergratisSdkView(props: TransfergratisSdkViewProps): React.JSX.Element;
4
- //# sourceMappingURL=TransfergratisSdkView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkView.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAKvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAE9E"}
@@ -1,7 +0,0 @@
1
- import { requireNativeView } from 'expo';
2
- import * as React from 'react';
3
- const NativeView = requireNativeView('TransfergratisSdk');
4
- export default function TransfergratisSdkView(props) {
5
- return <NativeView {...props}/>;
6
- }
7
- //# sourceMappingURL=TransfergratisSdkView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkView.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GACd,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nconst NativeView: React.ComponentType<TransfergratisSdkViewProps> =\n requireNativeView('TransfergratisSdk');\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return <NativeView {...props} />;\n}\n"]}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { TransfergratisSdkViewProps } from './TransfergratisSdk.types';
3
- export default function TransfergratisSdkView(props: TransfergratisSdkViewProps): React.JSX.Element;
4
- //# sourceMappingURL=TransfergratisSdkView.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkView.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAU9E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransfergratisSdkView.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CACL,CAAC,GAAG,CACF;MAAA,CAAC;;;;aAII,CACP;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return (\n <div>\n {/* <iframe\n style={{ flex: 1 }}\n src={props.url}\n onLoad={() => props.onLoad({ nativeEvent: { url: props.url } })}\n /> */}\n </div>\n );\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { requireNativeView } from 'expo';
2
- import * as React from 'react';
3
-
4
- import { TransfergratisSdkViewProps } from './TransfergratisSdk.types';
5
-
6
- const NativeView: React.ComponentType<TransfergratisSdkViewProps> =
7
- requireNativeView('TransfergratisSdk');
8
-
9
- export default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {
10
- return <NativeView {...props} />;
11
- }