@velion-la/onboarding-sdk-react-native 1.0.0-beta.2
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.
- package/CHANGELOG.md +66 -0
- package/LICENSE +12 -0
- package/README.md +803 -0
- package/lib/commonjs/camera/AddressSearchBar.js +304 -0
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
- package/lib/commonjs/camera/DocumentCapture.js +505 -0
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
- package/lib/commonjs/camera/LivenessCamera.js +534 -0
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
- package/lib/commonjs/camera/MapAddressPicker.js +341 -0
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
- package/lib/commonjs/core/VelionOnboarding.js +815 -0
- package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/commonjs/core/sessionStateMapper.js +137 -0
- package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
- package/lib/commonjs/core/sseReasonMessages.js +450 -0
- package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
- package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
- package/lib/commonjs/data/iso3166CountryNames.json +251 -0
- package/lib/commonjs/i18n/index.js +30 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/strings/en.js +261 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -0
- package/lib/commonjs/i18n/strings/es.js +266 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -0
- package/lib/commonjs/index.js +213 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/steps/AddressInfoStep.js +650 -0
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js +397 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/commonjs/steps/EmailContactStep.js +145 -0
- package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
- package/lib/commonjs/steps/EmailOtpStep.js +220 -0
- package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
- package/lib/commonjs/steps/FaceMatchStep.js +166 -0
- package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
- package/lib/commonjs/steps/FingerprintStep.js +92 -0
- package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js +243 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js +268 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js +188 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js +166 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LivenessMatchStep.js +707 -0
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneContactStep.js +146 -0
- package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneOtpStep.js +219 -0
- package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js +196 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/commonjs/steps/TaxInfoStep.js +244 -0
- package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js +238 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/commonjs/steps/_shared.js +40 -0
- package/lib/commonjs/steps/_shared.js.map +1 -0
- package/lib/commonjs/steps/types.js +6 -0
- package/lib/commonjs/steps/types.js.map +1 -0
- package/lib/commonjs/transport/api.js +176 -0
- package/lib/commonjs/transport/api.js.map +1 -0
- package/lib/commonjs/transport/irisWebSocket.js +121 -0
- package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
- package/lib/commonjs/transport/secureUrl.js +50 -0
- package/lib/commonjs/transport/secureUrl.js.map +1 -0
- package/lib/commonjs/transport/sse.js +248 -0
- package/lib/commonjs/transport/sse.js.map +1 -0
- package/lib/commonjs/types/index.js +391 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/commonjs/ui/StepShell.js +118 -0
- package/lib/commonjs/ui/StepShell.js.map +1 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js +217 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/commonjs/ui/forms/index.js +38 -0
- package/lib/commonjs/ui/forms/index.js.map +1 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/commonjs/ui/forms/validators.js +34 -0
- package/lib/commonjs/ui/forms/validators.js.map +1 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/commonjs/ui/icons/StepIcon.js +59 -0
- package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js +95 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/commonjs/ui/overlays/index.js +33 -0
- package/lib/commonjs/ui/overlays/index.js.map +1 -0
- package/lib/commonjs/ui/primitives/Banner.js +81 -0
- package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
- package/lib/commonjs/ui/primitives/Button.js +142 -0
- package/lib/commonjs/ui/primitives/Button.js.map +1 -0
- package/lib/commonjs/ui/primitives/Card.js +50 -0
- package/lib/commonjs/ui/primitives/Card.js.map +1 -0
- package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
- package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
- package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
- package/lib/commonjs/ui/primitives/Input.js +101 -0
- package/lib/commonjs/ui/primitives/Input.js.map +1 -0
- package/lib/commonjs/ui/primitives/Select.js +209 -0
- package/lib/commonjs/ui/primitives/Select.js.map +1 -0
- package/lib/commonjs/ui/primitives/Spinner.js +25 -0
- package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
- package/lib/commonjs/ui/primitives/index.js +69 -0
- package/lib/commonjs/ui/primitives/index.js.map +1 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/ui/theme/index.js +68 -0
- package/lib/commonjs/ui/theme/index.js.map +1 -0
- package/lib/commonjs/ui/theme/tokens.js +154 -0
- package/lib/commonjs/ui/theme/tokens.js.map +1 -0
- package/lib/commonjs/utils/EventEmitter.js +144 -0
- package/lib/commonjs/utils/EventEmitter.js.map +1 -0
- package/lib/commonjs/utils/base64.js +53 -0
- package/lib/commonjs/utils/base64.js.map +1 -0
- package/lib/commonjs/utils/deviceFingerprint.js +132 -0
- package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
- package/lib/commonjs/utils/documentTypeOptions.js +35 -0
- package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
- package/lib/commonjs/utils/googleMapsPreflight.js +77 -0
- package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
- package/lib/commonjs/utils/hmac.js +58 -0
- package/lib/commonjs/utils/hmac.js.map +1 -0
- package/lib/commonjs/utils/iso3166Countries.js +98 -0
- package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
- package/lib/commonjs/utils/jpegFromUri.js +44 -0
- package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
- package/lib/commonjs/utils/keepAwake.js +58 -0
- package/lib/commonjs/utils/keepAwake.js.map +1 -0
- package/lib/commonjs/utils/log.js +42 -0
- package/lib/commonjs/utils/log.js.map +1 -0
- package/lib/commonjs/utils/osGeocoder.js +70 -0
- package/lib/commonjs/utils/osGeocoder.js.map +1 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/commonjs/utils/personNameNormalize.js +24 -0
- package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
- package/lib/commonjs/utils/sdkError.js +34 -0
- package/lib/commonjs/utils/sdkError.js.map +1 -0
- package/lib/commonjs/utils/sdkVersion.js +13 -0
- package/lib/commonjs/utils/sdkVersion.js.map +1 -0
- package/lib/commonjs/utils/stepConfig.js +65 -0
- package/lib/commonjs/utils/stepConfig.js.map +1 -0
- package/lib/commonjs/utils/taxInfoConfig.js +19 -0
- package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
- package/lib/module/camera/AddressSearchBar.js +299 -0
- package/lib/module/camera/AddressSearchBar.js.map +1 -0
- package/lib/module/camera/DocumentCapture.js +500 -0
- package/lib/module/camera/DocumentCapture.js.map +1 -0
- package/lib/module/camera/LivenessCamera.js +529 -0
- package/lib/module/camera/LivenessCamera.js.map +1 -0
- package/lib/module/camera/MapAddressPicker.js +337 -0
- package/lib/module/camera/MapAddressPicker.js.map +1 -0
- package/lib/module/core/VelionOnboarding.js +811 -0
- package/lib/module/core/VelionOnboarding.js.map +1 -0
- package/lib/module/core/sessionDeclinedCopy.js +52 -0
- package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/module/core/sessionStateMapper.js +128 -0
- package/lib/module/core/sessionStateMapper.js.map +1 -0
- package/lib/module/core/sseReasonMessages.js +446 -0
- package/lib/module/core/sseReasonMessages.js.map +1 -0
- package/lib/module/data/iso3166Alpha2Codes.json +1 -0
- package/lib/module/data/iso3166CountryNames.json +251 -0
- package/lib/module/i18n/index.js +25 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/strings/en.js +257 -0
- package/lib/module/i18n/strings/en.js.map +1 -0
- package/lib/module/i18n/strings/es.js +262 -0
- package/lib/module/i18n/strings/es.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/steps/AddressInfoStep.js +646 -0
- package/lib/module/steps/AddressInfoStep.js.map +1 -0
- package/lib/module/steps/DocumentsOcrStep.js +391 -0
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/module/steps/EmailContactStep.js +140 -0
- package/lib/module/steps/EmailContactStep.js.map +1 -0
- package/lib/module/steps/EmailOtpStep.js +215 -0
- package/lib/module/steps/EmailOtpStep.js.map +1 -0
- package/lib/module/steps/FaceMatchStep.js +161 -0
- package/lib/module/steps/FaceMatchStep.js.map +1 -0
- package/lib/module/steps/FingerprintStep.js +87 -0
- package/lib/module/steps/FingerprintStep.js.map +1 -0
- package/lib/module/steps/HumanBasicInfoStep.js +238 -0
- package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/module/steps/HumanExtendedInfoStep.js +263 -0
- package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LegalBasicInfoStep.js +183 -0
- package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/module/steps/LegalExtendedInfoStep.js +161 -0
- package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LivenessMatchStep.js +701 -0
- package/lib/module/steps/LivenessMatchStep.js.map +1 -0
- package/lib/module/steps/PhoneContactStep.js +141 -0
- package/lib/module/steps/PhoneContactStep.js.map +1 -0
- package/lib/module/steps/PhoneOtpStep.js +214 -0
- package/lib/module/steps/PhoneOtpStep.js.map +1 -0
- package/lib/module/steps/SwornDeclarationStep.js +191 -0
- package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/module/steps/TaxInfoStep.js +239 -0
- package/lib/module/steps/TaxInfoStep.js.map +1 -0
- package/lib/module/steps/TermsAndConditionsStep.js +233 -0
- package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/module/steps/_shared.js +33 -0
- package/lib/module/steps/_shared.js.map +1 -0
- package/lib/module/steps/types.js +4 -0
- package/lib/module/steps/types.js.map +1 -0
- package/lib/module/transport/api.js +173 -0
- package/lib/module/transport/api.js.map +1 -0
- package/lib/module/transport/irisWebSocket.js +115 -0
- package/lib/module/transport/irisWebSocket.js.map +1 -0
- package/lib/module/transport/secureUrl.js +45 -0
- package/lib/module/transport/secureUrl.js.map +1 -0
- package/lib/module/transport/sse.js +242 -0
- package/lib/module/transport/sse.js.map +1 -0
- package/lib/module/types/index.js +457 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/ui/MapFallbackBoundary.js +37 -0
- package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/module/ui/StepShell.js +114 -0
- package/lib/module/ui/StepShell.js.map +1 -0
- package/lib/module/ui/VelionOnboardingScreen.js +212 -0
- package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/module/ui/forms/index.js +5 -0
- package/lib/module/ui/forms/index.js.map +1 -0
- package/lib/module/ui/forms/useInlineValidation.js +84 -0
- package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/module/ui/forms/validators.js +27 -0
- package/lib/module/ui/forms/validators.js.map +1 -0
- package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
- package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/module/ui/icons/StepIcon.js +55 -0
- package/lib/module/ui/icons/StepIcon.js.map +1 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
- package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/ProgressBar.js +90 -0
- package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/module/ui/overlays/RetryDialog.js +121 -0
- package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/module/ui/overlays/index.js +6 -0
- package/lib/module/ui/overlays/index.js.map +1 -0
- package/lib/module/ui/primitives/Banner.js +77 -0
- package/lib/module/ui/primitives/Banner.js.map +1 -0
- package/lib/module/ui/primitives/Button.js +138 -0
- package/lib/module/ui/primitives/Button.js.map +1 -0
- package/lib/module/ui/primitives/Card.js +46 -0
- package/lib/module/ui/primitives/Card.js.map +1 -0
- package/lib/module/ui/primitives/Checkbox.js +136 -0
- package/lib/module/ui/primitives/Checkbox.js.map +1 -0
- package/lib/module/ui/primitives/CountrySelect.js +284 -0
- package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/module/ui/primitives/DatePicker.js +241 -0
- package/lib/module/ui/primitives/DatePicker.js.map +1 -0
- package/lib/module/ui/primitives/Input.js +97 -0
- package/lib/module/ui/primitives/Input.js.map +1 -0
- package/lib/module/ui/primitives/Select.js +205 -0
- package/lib/module/ui/primitives/Select.js.map +1 -0
- package/lib/module/ui/primitives/Spinner.js +21 -0
- package/lib/module/ui/primitives/Spinner.js.map +1 -0
- package/lib/module/ui/primitives/index.js +12 -0
- package/lib/module/ui/primitives/index.js.map +1 -0
- package/lib/module/ui/theme/ThemeProvider.js +67 -0
- package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/module/ui/theme/index.js +5 -0
- package/lib/module/ui/theme/index.js.map +1 -0
- package/lib/module/ui/theme/tokens.js +145 -0
- package/lib/module/ui/theme/tokens.js.map +1 -0
- package/lib/module/utils/EventEmitter.js +139 -0
- package/lib/module/utils/EventEmitter.js.map +1 -0
- package/lib/module/utils/base64.js +47 -0
- package/lib/module/utils/base64.js.map +1 -0
- package/lib/module/utils/deviceFingerprint.js +129 -0
- package/lib/module/utils/deviceFingerprint.js.map +1 -0
- package/lib/module/utils/documentTypeOptions.js +31 -0
- package/lib/module/utils/documentTypeOptions.js.map +1 -0
- package/lib/module/utils/googleMapsPreflight.js +73 -0
- package/lib/module/utils/googleMapsPreflight.js.map +1 -0
- package/lib/module/utils/hmac.js +53 -0
- package/lib/module/utils/hmac.js.map +1 -0
- package/lib/module/utils/iso3166Countries.js +92 -0
- package/lib/module/utils/iso3166Countries.js.map +1 -0
- package/lib/module/utils/jpegFromUri.js +40 -0
- package/lib/module/utils/jpegFromUri.js.map +1 -0
- package/lib/module/utils/keepAwake.js +53 -0
- package/lib/module/utils/keepAwake.js.map +1 -0
- package/lib/module/utils/log.js +37 -0
- package/lib/module/utils/log.js.map +1 -0
- package/lib/module/utils/osGeocoder.js +65 -0
- package/lib/module/utils/osGeocoder.js.map +1 -0
- package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
- package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/module/utils/personNameNormalize.js +20 -0
- package/lib/module/utils/personNameNormalize.js.map +1 -0
- package/lib/module/utils/sdkError.js +29 -0
- package/lib/module/utils/sdkError.js.map +1 -0
- package/lib/module/utils/sdkVersion.js +9 -0
- package/lib/module/utils/sdkVersion.js.map +1 -0
- package/lib/module/utils/stepConfig.js +59 -0
- package/lib/module/utils/stepConfig.js.map +1 -0
- package/lib/module/utils/taxInfoConfig.js +15 -0
- package/lib/module/utils/taxInfoConfig.js.map +1 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
- package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
- package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
- package/lib/typescript/camera/LivenessCamera.d.ts +50 -0
- package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
- package/lib/typescript/core/VelionOnboarding.d.ts +115 -0
- package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
- package/lib/typescript/core/sessionStateMapper.d.ts +33 -0
- package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
- package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
- package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
- package/lib/typescript/i18n/index.d.ts +13 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/en.d.ts +3 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/es.d.ts +260 -0
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +26 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
- package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
- package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
- package/lib/typescript/steps/_shared.d.ts +11 -0
- package/lib/typescript/steps/_shared.d.ts.map +1 -0
- package/lib/typescript/steps/types.d.ts +68 -0
- package/lib/typescript/steps/types.d.ts.map +1 -0
- package/lib/typescript/transport/api.d.ts +35 -0
- package/lib/typescript/transport/api.d.ts.map +1 -0
- package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
- package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
- package/lib/typescript/transport/secureUrl.d.ts +14 -0
- package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
- package/lib/typescript/transport/sse.d.ts +54 -0
- package/lib/typescript/transport/sse.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +1010 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
- package/lib/typescript/ui/StepShell.d.ts +19 -0
- package/lib/typescript/ui/StepShell.d.ts.map +1 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts +19 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
- package/lib/typescript/ui/forms/index.d.ts +3 -0
- package/lib/typescript/ui/forms/index.d.ts.map +1 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
- package/lib/typescript/ui/forms/validators.d.ts +11 -0
- package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts +26 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/index.d.ts +4 -0
- package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
- package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Button.d.ts +27 -0
- package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Card.d.ts +10 -0
- package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Input.d.ts +17 -0
- package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Select.d.ts +26 -0
- package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/index.d.ts +10 -0
- package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/ui/theme/index.d.ts +3 -0
- package/lib/typescript/ui/theme/index.d.ts.map +1 -0
- package/lib/typescript/ui/theme/tokens.d.ts +42 -0
- package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/utils/EventEmitter.d.ts +98 -0
- package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/utils/base64.d.ts +19 -0
- package/lib/typescript/utils/base64.d.ts.map +1 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts +44 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
- package/lib/typescript/utils/hmac.d.ts +39 -0
- package/lib/typescript/utils/hmac.d.ts.map +1 -0
- package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
- package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
- package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
- package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
- package/lib/typescript/utils/keepAwake.d.ts +16 -0
- package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
- package/lib/typescript/utils/log.d.ts +18 -0
- package/lib/typescript/utils/log.d.ts.map +1 -0
- package/lib/typescript/utils/osGeocoder.d.ts +38 -0
- package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
- package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
- package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
- package/lib/typescript/utils/sdkError.d.ts +14 -0
- package/lib/typescript/utils/sdkError.d.ts.map +1 -0
- package/lib/typescript/utils/sdkVersion.d.ts +7 -0
- package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
- package/lib/typescript/utils/stepConfig.d.ts +8 -0
- package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
- package/package.json +99 -0
- package/src/camera/AddressSearchBar.tsx +363 -0
- package/src/camera/DocumentCapture.tsx +505 -0
- package/src/camera/LivenessCamera.tsx +602 -0
- package/src/camera/MapAddressPicker.tsx +397 -0
- package/src/core/VelionOnboarding.ts +974 -0
- package/src/core/sessionDeclinedCopy.ts +76 -0
- package/src/core/sessionStateMapper.ts +167 -0
- package/src/core/sseReasonMessages.ts +531 -0
- package/src/data/iso3166Alpha2Codes.json +1 -0
- package/src/data/iso3166CountryNames.json +251 -0
- package/src/i18n/index.ts +26 -0
- package/src/i18n/strings/en.ts +289 -0
- package/src/i18n/strings/es.ts +291 -0
- package/src/index.ts +137 -0
- package/src/steps/AddressInfoStep.tsx +726 -0
- package/src/steps/DocumentsOcrStep.tsx +472 -0
- package/src/steps/EmailContactStep.tsx +159 -0
- package/src/steps/EmailOtpStep.tsx +250 -0
- package/src/steps/FaceMatchStep.tsx +177 -0
- package/src/steps/FingerprintStep.tsx +99 -0
- package/src/steps/HumanBasicInfoStep.tsx +274 -0
- package/src/steps/HumanExtendedInfoStep.tsx +353 -0
- package/src/steps/LegalBasicInfoStep.tsx +205 -0
- package/src/steps/LegalExtendedInfoStep.tsx +171 -0
- package/src/steps/LivenessMatchStep.tsx +846 -0
- package/src/steps/PhoneContactStep.tsx +160 -0
- package/src/steps/PhoneOtpStep.tsx +249 -0
- package/src/steps/SwornDeclarationStep.tsx +220 -0
- package/src/steps/TaxInfoStep.tsx +277 -0
- package/src/steps/TermsAndConditionsStep.tsx +261 -0
- package/src/steps/_shared.ts +44 -0
- package/src/steps/types.ts +72 -0
- package/src/transport/api.ts +257 -0
- package/src/transport/irisWebSocket.ts +186 -0
- package/src/transport/secureUrl.ts +47 -0
- package/src/transport/sse.ts +310 -0
- package/src/types/index.ts +1198 -0
- package/src/ui/MapFallbackBoundary.tsx +46 -0
- package/src/ui/StepShell.tsx +137 -0
- package/src/ui/VelionOnboardingScreen.tsx +223 -0
- package/src/ui/forms/index.ts +12 -0
- package/src/ui/forms/useInlineValidation.ts +115 -0
- package/src/ui/forms/validators.ts +29 -0
- package/src/ui/icons/HomeHeartIcon.tsx +34 -0
- package/src/ui/icons/StepIcon.tsx +77 -0
- package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
- package/src/ui/overlays/LoadingOverlay.tsx +115 -0
- package/src/ui/overlays/ProgressBar.tsx +99 -0
- package/src/ui/overlays/RetryDialog.tsx +128 -0
- package/src/ui/overlays/index.ts +3 -0
- package/src/ui/primitives/Banner.tsx +81 -0
- package/src/ui/primitives/Button.tsx +164 -0
- package/src/ui/primitives/Card.tsx +55 -0
- package/src/ui/primitives/Checkbox.tsx +153 -0
- package/src/ui/primitives/CountrySelect.tsx +356 -0
- package/src/ui/primitives/DatePicker.tsx +266 -0
- package/src/ui/primitives/Input.tsx +110 -0
- package/src/ui/primitives/Select.tsx +259 -0
- package/src/ui/primitives/Spinner.tsx +17 -0
- package/src/ui/primitives/index.ts +9 -0
- package/src/ui/theme/ThemeProvider.tsx +102 -0
- package/src/ui/theme/index.ts +17 -0
- package/src/ui/theme/tokens.ts +159 -0
- package/src/utils/EventEmitter.ts +155 -0
- package/src/utils/base64.ts +44 -0
- package/src/utils/deviceFingerprint.ts +184 -0
- package/src/utils/documentTypeOptions.ts +31 -0
- package/src/utils/googleMapsPreflight.ts +72 -0
- package/src/utils/hmac.ts +61 -0
- package/src/utils/iso3166Countries.ts +111 -0
- package/src/utils/jpegFromUri.ts +42 -0
- package/src/utils/keepAwake.ts +62 -0
- package/src/utils/log.ts +37 -0
- package/src/utils/osGeocoder.ts +75 -0
- package/src/utils/parseGoogleAddressComponents.ts +123 -0
- package/src/utils/personNameNormalize.ts +17 -0
- package/src/utils/sdkError.ts +40 -0
- package/src/utils/sdkVersion.ts +6 -0
- package/src/utils/stepConfig.ts +75 -0
- package/src/utils/taxInfoConfig.ts +14 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ThemeProvider + hooks.
|
|
3
|
+
*
|
|
4
|
+
* - `ThemeProvider` resolves tokens from `VelionConfig.theme` + colorMode and
|
|
5
|
+
* exposes them to descendants.
|
|
6
|
+
* - `useTheme()` returns the active `ResolvedTheme`.
|
|
7
|
+
* - `useReducedMotion()` honours the OS-level `prefers-reduced-motion` flag —
|
|
8
|
+
* components disable animations when true.
|
|
9
|
+
*/
|
|
10
|
+
import React, { type ReactNode } from 'react';
|
|
11
|
+
import type { VelionTheme } from '../../types';
|
|
12
|
+
import { type ResolvedTheme } from './tokens';
|
|
13
|
+
export interface ThemeProviderProps {
|
|
14
|
+
/** Consumer-supplied overrides (subset of tokens). */
|
|
15
|
+
themeOverrides?: VelionTheme | undefined;
|
|
16
|
+
/** Explicit mode. `'auto'` follows the system color scheme. */
|
|
17
|
+
colorMode?: 'light' | 'dark' | 'auto' | undefined;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare function ThemeProvider({ themeOverrides, colorMode, children, }: ThemeProviderProps): React.JSX.Element;
|
|
21
|
+
export declare function useTheme(): ResolvedTheme;
|
|
22
|
+
export declare function useReducedMotion(): boolean;
|
|
23
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAS5D,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,cAAc,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,cAAc,EACd,SAAkB,EAClB,QAAQ,GACT,EAAE,kBAAkB,qBAsBpB;AAED,wBAAgB,QAAQ,IAAI,aAAa,CAQxC;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ThemeProvider, useTheme, useReducedMotion, type ThemeProviderProps, } from './ThemeProvider';
|
|
2
|
+
export { LIGHT_TOKENS, DARK_TOKENS, getDefaultThemeTokens, resolveTheme, mixHex, withAlpha, isHexDark, type ResolvedTheme, type ThemeTokenSet, } from './tokens';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Theme tokens for the React Native SDK.
|
|
3
|
+
*
|
|
4
|
+
* Exposes logical tokens as a plain JS object that components consume via
|
|
5
|
+
* `useTheme()`.
|
|
6
|
+
*
|
|
7
|
+
* Light and dark are tuned independently (Material Design 3 / Apple HIG dark
|
|
8
|
+
* pairing). Consumer overrides from `VelionConfig.theme` are layered on top.
|
|
9
|
+
*/
|
|
10
|
+
import type { VelionTheme } from '../../types';
|
|
11
|
+
/** Tonal token set. Shape matches `VelionTheme` (all required, no undefineds). */
|
|
12
|
+
export type ThemeTokenSet = Required<VelionTheme>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolved values that components actually read from. We keep colors as plain
|
|
15
|
+
* hex strings; consumers that want to layer translucency use `mixHex` instead
|
|
16
|
+
* of CSS `color-mix()` (which does not exist in RN).
|
|
17
|
+
*/
|
|
18
|
+
export interface ResolvedTheme extends ThemeTokenSet {
|
|
19
|
+
/** The mode that components should consider active (post-luminance check). */
|
|
20
|
+
effectiveMode: 'light' | 'dark';
|
|
21
|
+
/** The numeric pixel value parsed from `borderRadius` (the SDK-wide default). */
|
|
22
|
+
borderRadiusPx: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const LIGHT_TOKENS: ThemeTokenSet;
|
|
25
|
+
export declare const DARK_TOKENS: ThemeTokenSet;
|
|
26
|
+
export declare function getDefaultThemeTokens(colorMode?: 'light' | 'dark'): ThemeTokenSet;
|
|
27
|
+
/** Layers consumer overrides on top of the base tokens for the requested mode. */
|
|
28
|
+
export declare function resolveTheme(theme: VelionTheme | undefined, colorMode: 'light' | 'dark'): ResolvedTheme;
|
|
29
|
+
/** WCAG relative-luminance check. Returns false on unparsable input. */
|
|
30
|
+
export declare function isHexDark(hex: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Mix two hex colors at the given ratio (0–100). Cheap stand-in for the web's
|
|
33
|
+
* `color-mix(in srgb, A x%, B)` so we can render the soft halos and tinted
|
|
34
|
+
* backgrounds the design system uses (.vl-retry-dialog, .vl-sworn__option).
|
|
35
|
+
*/
|
|
36
|
+
export declare function mixHex(a: string, b: string, ratioOfA: number): string;
|
|
37
|
+
/**
|
|
38
|
+
* Returns an `rgba()` string with the supplied alpha (0–1). Use for translucent
|
|
39
|
+
* borders / fills that should not blend with the host background.
|
|
40
|
+
*/
|
|
41
|
+
export declare function withAlpha(hex: string, alpha: number): string;
|
|
42
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/ui/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,8EAA8E;IAC9E,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,EAAE,aAe1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,aAezB,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,SAAS,GAAE,OAAO,GAAG,MAAgB,GACpC,aAAa,CAEf;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAC1B,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,SAAS,EAAE,OAAO,GAAG,MAAM,GAC1B,aAAa,CAWf;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAY9C;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASrE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK5D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Typed, memory-safe EventEmitter for internal SDK communication.
|
|
3
|
+
*
|
|
4
|
+
* Design rationale:
|
|
5
|
+
* - Fully typed via generics — no `any` escapes at the call sites.
|
|
6
|
+
* - All `on()` calls return an unsubscribe function, which is the preferred
|
|
7
|
+
* modern pattern over imperative `off()` calls. This makes cleanup trivial
|
|
8
|
+
* via a collected array of disposables.
|
|
9
|
+
* - Listeners that throw are caught and logged, preventing one bad subscriber
|
|
10
|
+
* from silently breaking the entire event chain.
|
|
11
|
+
* - `removeAllListeners()` is explicitly called in `VelionOnboarding.destroy()`
|
|
12
|
+
* to prevent memory leaks in long-lived single-page applications.
|
|
13
|
+
*/
|
|
14
|
+
/** A strongly-typed listener function for a given event payload. */
|
|
15
|
+
type Listener<TPayload> = (payload: TPayload) => void;
|
|
16
|
+
/** A function returned by `on()` that removes the registered listener when called. */
|
|
17
|
+
export type Unsubscribe = () => void;
|
|
18
|
+
/**
|
|
19
|
+
* A generic, compile-time safe EventEmitter.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam TEventMap - An object type mapping event names to their payload types.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* interface MyEvents {
|
|
26
|
+
* 'data:ready': { records: string[] };
|
|
27
|
+
* 'error': Error;
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* const emitter = new TypedEventEmitter<MyEvents>();
|
|
31
|
+
*
|
|
32
|
+
* const unsub = emitter.on('data:ready', ({ records }) => {
|
|
33
|
+
* // `records` is correctly typed as string[]
|
|
34
|
+
* console.log(records);
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* emitter.emit('data:ready', { records: ['a', 'b'] });
|
|
38
|
+
* unsub(); // Clean up
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class TypedEventEmitter<TEventMap extends Record<string, unknown>> {
|
|
42
|
+
/**
|
|
43
|
+
* Internal store. Using a `Map<K, Set<Listener>>` gives O(1) lookups and
|
|
44
|
+
* avoids duplicate listeners with zero extra checks (Set semantics).
|
|
45
|
+
*/
|
|
46
|
+
private readonly _listeners;
|
|
47
|
+
/**
|
|
48
|
+
* Registers a listener for the given event. The listener will be invoked
|
|
49
|
+
* synchronously every time `emit(event, payload)` is called.
|
|
50
|
+
*
|
|
51
|
+
* @param event - The event name to subscribe to.
|
|
52
|
+
* @param listener - The callback to invoke. Receives the typed payload.
|
|
53
|
+
* @returns An unsubscribe function. Call it to remove this specific listener.
|
|
54
|
+
*/
|
|
55
|
+
on<K extends keyof TEventMap>(event: K, listener: Listener<TEventMap[K]>): Unsubscribe;
|
|
56
|
+
/**
|
|
57
|
+
* Registers a one-time listener. The listener is automatically removed
|
|
58
|
+
* after the first time the event fires.
|
|
59
|
+
*
|
|
60
|
+
* @param event - The event name to subscribe to.
|
|
61
|
+
* @param listener - The callback to invoke once.
|
|
62
|
+
* @returns An unsubscribe function. Call it to cancel before the event fires.
|
|
63
|
+
*/
|
|
64
|
+
once<K extends keyof TEventMap>(event: K, listener: Listener<TEventMap[K]>): Unsubscribe;
|
|
65
|
+
/**
|
|
66
|
+
* Emits an event, synchronously invoking all registered listeners.
|
|
67
|
+
* Errors thrown by individual listeners are caught and logged to prevent
|
|
68
|
+
* cascading failures.
|
|
69
|
+
*
|
|
70
|
+
* @param event - The event name to emit.
|
|
71
|
+
* @param payload - The data to pass to each listener.
|
|
72
|
+
*/
|
|
73
|
+
emit<K extends keyof TEventMap>(event: K, payload: TEventMap[K]): void;
|
|
74
|
+
/**
|
|
75
|
+
* Removes a specific listener for an event.
|
|
76
|
+
*
|
|
77
|
+
* @param event - The event name.
|
|
78
|
+
* @param listener - The exact listener function reference to remove.
|
|
79
|
+
*/
|
|
80
|
+
off<K extends keyof TEventMap>(event: K, listener: Listener<TEventMap[K]>): void;
|
|
81
|
+
/**
|
|
82
|
+
* Removes all listeners, optionally scoped to a single event.
|
|
83
|
+
* Called by `VelionOnboarding.destroy()` to prevent memory leaks.
|
|
84
|
+
*
|
|
85
|
+
* @param event - If provided, only clears listeners for that event.
|
|
86
|
+
* If omitted, clears ALL listeners on ALL events.
|
|
87
|
+
*/
|
|
88
|
+
removeAllListeners(event?: keyof TEventMap): void;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the number of registered listeners for a given event.
|
|
91
|
+
* Useful for debugging and testing assertions.
|
|
92
|
+
*
|
|
93
|
+
* @param event - The event name to check.
|
|
94
|
+
*/
|
|
95
|
+
listenerCount(event: keyof TEventMap): number;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=EventEmitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/utils/EventEmitter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,oEAAoE;AACpE,KAAK,QAAQ,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;AAEtD,sFAAsF;AACtF,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAiB,CAAC,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtE;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAGvB;IAEJ;;;;;;;OAOG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,SAAS,EAC1B,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAC/B,WAAW;IAUd;;;;;;;OAOG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,SAAS,EAC5B,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAC/B,WAAW;IAQd;;;;;;;OAOG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;IAgBtE;;;;;OAKG;IACH,GAAG,CAAC,CAAC,SAAS,MAAM,SAAS,EAC3B,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAC/B,IAAI;IAIP;;;;;;OAMG;IACH,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,SAAS,GAAG,IAAI;IAQjD;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,SAAS,GAAG,MAAM;CAG9C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base64 helpers without `Buffer` (RN does not ship a Buffer global) and
|
|
3
|
+
* without leaning on `react-native-quick-base64`. Hermes provides `btoa` /
|
|
4
|
+
* `atob`, which take Latin-1 strings — we wrap them with byte arrays so
|
|
5
|
+
* callers don't have to think about the in-between.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Encodes a `Uint8Array` to a standard base64 string.
|
|
9
|
+
*
|
|
10
|
+
* Implementation note: `btoa` requires a Latin-1 string. We convert the byte
|
|
11
|
+
* array to one char per byte via `String.fromCharCode`, in chunks to avoid
|
|
12
|
+
* blowing the JS argument-list limit on large frames (~1 MB JPEG).
|
|
13
|
+
*/
|
|
14
|
+
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
15
|
+
/** Decodes a standard base64 string into a `Uint8Array`. */
|
|
16
|
+
export declare function base64ToBytes(b64: string): Uint8Array;
|
|
17
|
+
/** Lowercase hex (`'a1f3…'`) — matches the canonical Iris HMAC format. */
|
|
18
|
+
export declare function bytesToHexLower(bytes: Uint8Array): string;
|
|
19
|
+
//# sourceMappingURL=base64.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/base64.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CASvD;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOrD;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAOzD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Device Fingerprint via Fingerprint Pro RN SDK.
|
|
3
|
+
*
|
|
4
|
+
* Uses the official `@fingerprintjs/fingerprintjs-pro-react-native` agent
|
|
5
|
+
* class to identify the device.
|
|
6
|
+
*
|
|
7
|
+
* Why a real SDK and not a hand-rolled hash:
|
|
8
|
+
* - The backend (`PublicSdkSessionController.fingerprint`) reads only
|
|
9
|
+
* `request_id` and `sealed_result` from the body. A custom `visitor_id`
|
|
10
|
+
* field is silently dropped and the AML enrichment lookup never runs.
|
|
11
|
+
* - Fingerprint Pro returns a stable `requestId` (lookup key against the
|
|
12
|
+
* Fingerprint server) and a `sealedResult` (encrypted payload the
|
|
13
|
+
* backend decrypts with its private key for server-side identification).
|
|
14
|
+
*
|
|
15
|
+
* The Fingerprint Pro RN SDK is loaded **dynamically** so it stays an
|
|
16
|
+
* optional peer dep: hosts that don't ship the fingerprint module get a
|
|
17
|
+
* clear `FINGERPRINT_FAILED` error instead of a hard module-resolution
|
|
18
|
+
* crash at app boot. (The Velion example app installs it; third-party
|
|
19
|
+
* consumers without a Fingerprint workspace can swap defaults via
|
|
20
|
+
* `fingerprintApiKey` / `fingerprintEndpoint` in `VelionConfig`.)
|
|
21
|
+
*/
|
|
22
|
+
/** Public shape of the result. */
|
|
23
|
+
export interface DeviceFingerprintResult {
|
|
24
|
+
request_id: string;
|
|
25
|
+
sealed_result?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface DeviceFingerprintOptions {
|
|
28
|
+
/** Custom endpoint subdomain (proxied through Velion infra). */
|
|
29
|
+
endpoint: string;
|
|
30
|
+
/** Optional override for the public Fingerprint Pro key. */
|
|
31
|
+
apiKey?: string;
|
|
32
|
+
/** Hard ceiling for the call (ms). The SDK's own timeout can hang past this; we Promise.race against it. */
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Calls Fingerprint Pro RN to obtain `requestId` + optional `sealedResult`,
|
|
37
|
+
* the only two pieces of data the Velion backend cares about. Throws a
|
|
38
|
+
* shaped `SdkError` on any failure (missing module, agent init error,
|
|
39
|
+
* network).
|
|
40
|
+
*/
|
|
41
|
+
export declare function generateDeviceFingerprint(options: DeviceFingerprintOptions): Promise<DeviceFingerprintResult>;
|
|
42
|
+
//# sourceMappingURL=deviceFingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceFingerprint.d.ts","sourceRoot":"","sources":["../../../src/utils/deviceFingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,kCAAkC;AAClC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4GAA4G;IAC5G,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkDD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAwFlC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default identification document option for HUMAN_BASIC_INFO when the backend
|
|
3
|
+
* does not send `accepted_country_documents` (same label keys as legacy UI).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Fallback list for the HUMAN_BASIC_INFO identification type selector when step config
|
|
7
|
+
* does not include document types from the backend.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveDocumentTypeOptions(uiLocale: string): Array<{
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=documentTypeOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentTypeOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/documentTypeOptions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAKzC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-flight checks for the assisted address flow.
|
|
3
|
+
*
|
|
4
|
+
* The SDK no longer calls any Google REST API from the client — reverse
|
|
5
|
+
* geocoding goes through the OS native geocoder (see `osGeocoder.ts`). What
|
|
6
|
+
* we still need to verify is:
|
|
7
|
+
* 1. `react-native-maps` is linked.
|
|
8
|
+
* 2. On Android, the Google Maps key is declared in `AndroidManifest.xml`
|
|
9
|
+
* as `<meta-data android:name="com.google.android.geo.API_KEY" .../>`.
|
|
10
|
+
* Without that, mounting `<MapView>` throws a native
|
|
11
|
+
* `IllegalStateException` from the Fabric UI manager — a JS error
|
|
12
|
+
* boundary cannot catch it because the throw happens in a native
|
|
13
|
+
* thread during the UI commit.
|
|
14
|
+
*
|
|
15
|
+
* Note that these probes cannot catch the iOS-specific case where
|
|
16
|
+
* `react-native-maps` IS installed but the `AirGoogleMaps` sub-target was
|
|
17
|
+
* never added to the Xcode project — that one only surfaces at render time
|
|
18
|
+
* and is handled by `MapFallbackBoundary`.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Returns true when `react-native-maps` is importable and exposes the
|
|
22
|
+
* MapView component we need.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isReactNativeMapsAvailable(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Best-effort probe for the Android `com.google.android.geo.API_KEY` meta-data
|
|
27
|
+
* in the host's `AndroidManifest.xml`.
|
|
28
|
+
*
|
|
29
|
+
* Returns:
|
|
30
|
+
* - `true` on iOS (the check does not apply — Apple Maps needs no key).
|
|
31
|
+
* - `true` when we can confirm the key is wired via the Expo config
|
|
32
|
+
* (`android.config.googleMaps.apiKey`). Expo prebuild copies that
|
|
33
|
+
* into the manifest, so its presence in `expoConfig` is a reliable
|
|
34
|
+
* proxy for the real meta-data.
|
|
35
|
+
* - `false` when `expo-constants` is available AND the Expo config does not
|
|
36
|
+
* declare the key — we know prebuild produced a manifest without
|
|
37
|
+
* the meta-data, so mounting `<MapView>` would crash.
|
|
38
|
+
* - `undefined` when `expo-constants` is not installed (bare RN). We cannot
|
|
39
|
+
* probe the manifest without a custom native module; the caller
|
|
40
|
+
* should default to the previous behaviour (trust the integrator
|
|
41
|
+
* when they pass `googleMapsApiKey` via `VelionConfig`).
|
|
42
|
+
*/
|
|
43
|
+
export declare function isAndroidGoogleMapsKeyInManifest(): boolean | undefined;
|
|
44
|
+
//# sourceMappingURL=googleMapsPreflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"googleMapsPreflight.d.ts","sourceRoot":"","sources":["../../../src/utils/googleMapsPreflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CASpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,GAAG,SAAS,CAetE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview HMAC-SHA256 over JPEG frames for the Iris liveness flow.
|
|
3
|
+
*
|
|
4
|
+
* React Native's WebCrypto support is incomplete in Hermes (no `subtle.sign`),
|
|
5
|
+
* so we lean on `@noble/hashes` — pure JavaScript, ~10 KB, no native code.
|
|
6
|
+
*
|
|
7
|
+
* Canonical message (must match the Iris orchestrator exactly):
|
|
8
|
+
* `${sessionId}\n${frameId}\n${ts}\n${sha256hex(jpeg)}`
|
|
9
|
+
*
|
|
10
|
+
* Output: lowercase hex MAC, sent in the JSON envelope's `mac` field.
|
|
11
|
+
*/
|
|
12
|
+
export interface HmacKey {
|
|
13
|
+
readonly raw: Uint8Array;
|
|
14
|
+
}
|
|
15
|
+
/** Decode the base64 frame_integrity_key from `/liveness-init`. */
|
|
16
|
+
export declare function importHmacKey(base64: string): HmacKey;
|
|
17
|
+
/**
|
|
18
|
+
* Build the signed envelope sent over the Iris WebSocket. Mirrors
|
|
19
|
+
* `LivenessModule.buildSignedEnvelope`:
|
|
20
|
+
* 1. Compute SHA-256 of the JPEG bytes (hex, lowercase).
|
|
21
|
+
* 2. Build the canonical message.
|
|
22
|
+
* 3. HMAC-SHA256 with the imported key.
|
|
23
|
+
* 4. Wrap into `{ type: 'FRAME', frameId, timestamp, image, mac }`.
|
|
24
|
+
*
|
|
25
|
+
* Returns the JSON string ready to `ws.send`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildSignedFrameEnvelope(args: {
|
|
28
|
+
key: HmacKey;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
frameId: number;
|
|
31
|
+
jpegBytes: Uint8Array;
|
|
32
|
+
jpegBase64: string;
|
|
33
|
+
/** Defaults to `Date.now()`. */
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
}): {
|
|
36
|
+
json: string;
|
|
37
|
+
timestamp: number;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=hmac.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../../src/utils/hmac.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;CAC1B;AAED,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAiBtC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO 3166-1 alpha-2 country list with localized display names.
|
|
3
|
+
*
|
|
4
|
+
* Strategy:
|
|
5
|
+
* 1. If `Intl.DisplayNames` is available (full ICU build, polyfilled
|
|
6
|
+
* Hermes, native iOS runtime, …), use it — it covers every BCP-47
|
|
7
|
+
* locale and stays current with ICU updates.
|
|
8
|
+
* 2. Otherwise fall back to a built-in map covering all 249 ISO 3166-1
|
|
9
|
+
* alpha-2 codes in `es` and `en`. The names match the official
|
|
10
|
+
* Spanish convention (es. wikipedia.org/wiki/ISO_3166-1) and the ISO
|
|
11
|
+
* English short name. Hermes default builds (which ship without
|
|
12
|
+
* `Intl.DisplayNames`) get full localized names without needing
|
|
13
|
+
* `@formatjs/intl-displaynames`.
|
|
14
|
+
*/
|
|
15
|
+
export interface Iso3166CountryOption {
|
|
16
|
+
readonly code: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns all ISO 3166-1 alpha-2 countries sorted by localized display name.
|
|
21
|
+
*/
|
|
22
|
+
export declare function listIso3166CountriesForUi(locale: string): Iso3166CountryOption[];
|
|
23
|
+
/**
|
|
24
|
+
* Filters by country name or code (case-insensitive).
|
|
25
|
+
*/
|
|
26
|
+
export declare function filterIso3166Countries(options: readonly Iso3166CountryOption[], query: string): Iso3166CountryOption[];
|
|
27
|
+
//# sourceMappingURL=iso3166Countries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iso3166Countries.d.ts","sourceRoot":"","sources":["../../../src/utils/iso3166Countries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAyDD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAchF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,oBAAoB,EAAE,EACxC,KAAK,EAAE,MAAM,GACZ,oBAAoB,EAAE,CAMxB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for reading a captured photo into JPEG bytes.
|
|
3
|
+
*
|
|
4
|
+
* Vision-Camera writes captures to a `file://` path; consumers convert that
|
|
5
|
+
* path into either base64 (for the Iris HMAC envelope) or raw bytes (for
|
|
6
|
+
* binary WebSocket frames + direct PUT to signed URLs).
|
|
7
|
+
*
|
|
8
|
+
* Why not `fetch(uri).then(r => r.blob()).then(b => b.arrayBuffer())`?
|
|
9
|
+
*
|
|
10
|
+
* React Native's Blob polyfill does NOT implement `Blob.arrayBuffer()`
|
|
11
|
+
* (it's web-only). Calling it crashes with
|
|
12
|
+
* `TypeError: blob.arrayBuffer is not a function`. The reliable path on
|
|
13
|
+
* iOS + Android is the native `File.arrayBuffer()` from
|
|
14
|
+
* `expo-file-system` v19+, which reads directly from disk into an
|
|
15
|
+
* ArrayBuffer without going through the JS Blob bridge.
|
|
16
|
+
*/
|
|
17
|
+
export interface JpegFromUri {
|
|
18
|
+
bytes: Uint8Array;
|
|
19
|
+
base64: string;
|
|
20
|
+
byteLength: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Reads a `file://` URI into JPEG bytes + base64 representation.
|
|
24
|
+
*
|
|
25
|
+
* Accepts both forms vision-camera returns (`/var/mobile/...` without a
|
|
26
|
+
* scheme on iOS; `file:///data/...` on Android). Normalises to `file://`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function readJpegFromUri(uri: string): Promise<JpegFromUri>;
|
|
29
|
+
//# sourceMappingURL=jpegFromUri.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jpegFromUri.d.ts","sourceRoot":"","sources":["../../../src/utils/jpegFromUri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CASvE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin wrapper around `expo-keep-awake` that prevents the device from
|
|
3
|
+
* locking the screen while the SDK is in the foreground. Without this,
|
|
4
|
+
* Android's screen-timeout policy kicks in during camera-heavy steps
|
|
5
|
+
* (LIVENESS_MATCH, DOCUMENTS_OCR) where the user is holding still and
|
|
6
|
+
* not interacting with the touchscreen — the screen dims, then locks,
|
|
7
|
+
* and the session is interrupted.
|
|
8
|
+
*
|
|
9
|
+
* Implementation is `require`-based so the SDK keeps working in bare
|
|
10
|
+
* React Native setups where `expo-keep-awake` may not be installed —
|
|
11
|
+
* in that case both calls degrade to no-ops and the host is expected to
|
|
12
|
+
* manage the wake lock itself.
|
|
13
|
+
*/
|
|
14
|
+
export declare function activateScreenKeepAwake(): void;
|
|
15
|
+
export declare function deactivateScreenKeepAwake(): void;
|
|
16
|
+
//# sourceMappingURL=keepAwake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keepAwake.d.ts","sourceRoot":"","sources":["../../../src/utils/keepAwake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuBH,wBAAgB,uBAAuB,IAAI,IAAI,CAc9C;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAUhD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Lightweight log gate.
|
|
3
|
+
*
|
|
4
|
+
* `log.info()` is silent unless either:
|
|
5
|
+
* - `__DEV__` is true (Metro bundler injects this in development), or
|
|
6
|
+
* - the host explicitly opted in via `VelionConfig.debug = true`.
|
|
7
|
+
*
|
|
8
|
+
* `log.warn()` / `log.error()` always go through. They sit on top of `console.*`
|
|
9
|
+
* so the host's logging pipeline (Sentry, Datadog, …) keeps capturing them.
|
|
10
|
+
*/
|
|
11
|
+
/** Enables verbose logging at runtime. Called from VelionOnboarding when `config.debug === true`. */
|
|
12
|
+
export declare function setDebugEnabled(enabled: boolean): void;
|
|
13
|
+
export declare const log: {
|
|
14
|
+
info(...args: unknown[]): void;
|
|
15
|
+
warn(...args: unknown[]): void;
|
|
16
|
+
error(...args: unknown[]): void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/utils/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEtD;AAOD,eAAO,MAAM,GAAG;kBACA,OAAO,EAAE,GAAG,IAAI;kBAIhB,OAAO,EAAE,GAAG,IAAI;mBAGf,OAAO,EAAE,GAAG,IAAI;CAGhC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse geocoding via the OS-native geocoder, bypassing Google's REST API
|
|
3
|
+
* entirely.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists:
|
|
6
|
+
* - The Google Geocoding Web Service is HTTP REST. It does not honour
|
|
7
|
+
* iOS/Android application restrictions on the API key, so a key tightly
|
|
8
|
+
* locked to a bundle ID still fails with REQUEST_DENIED when called from
|
|
9
|
+
* fetch().
|
|
10
|
+
* - The OS geocoder (CLGeocoder on iOS / android.location.Geocoder on
|
|
11
|
+
* Android) needs no Google key and respects the platform conventions
|
|
12
|
+
* users expect. Coverage in urban LATAM is excellent; rural coverage on
|
|
13
|
+
* iOS uses Apple Maps (lower than Google in remote zones) but the
|
|
14
|
+
* downstream OCR step normally recovers the printed address either way.
|
|
15
|
+
* - Keeps the SDK to one Google Maps key whose only purpose is rendering
|
|
16
|
+
* the map via the native Maps SDK — that one IS protected by the iOS /
|
|
17
|
+
* Android app restriction.
|
|
18
|
+
*
|
|
19
|
+
* Returns the same `ParsedAddressFields` shape that the previous Google
|
|
20
|
+
* Geocoding caller produced, so downstream code (`AddressDetailsForm`,
|
|
21
|
+
* payload assembly) doesn't change.
|
|
22
|
+
*/
|
|
23
|
+
import { type ParsedAddressFields } from './parseGoogleAddressComponents';
|
|
24
|
+
export interface ReverseGeocodeArgs {
|
|
25
|
+
latitude: number;
|
|
26
|
+
longitude: number;
|
|
27
|
+
/** `'es'` or `'en'` — passed through to the OS where supported. */
|
|
28
|
+
locale?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns parsed structured address fields, or `null` when the OS geocoder
|
|
32
|
+
* has no match.
|
|
33
|
+
*/
|
|
34
|
+
export declare function reverseGeocode(args: ReverseGeocodeArgs): Promise<(ParsedAddressFields & {
|
|
35
|
+
latitude: number;
|
|
36
|
+
longitude: number;
|
|
37
|
+
}) | null>;
|
|
38
|
+
//# sourceMappingURL=osGeocoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"osGeocoder.d.ts","sourceRoot":"","sources":["../../../src/utils/osGeocoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EACL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AAGxC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,CAAC,mBAAmB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC,CAgCjF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps Google Geocoder / Places `address_components` into
|
|
3
|
+
* `AddressInfoPayload` fields.
|
|
4
|
+
*
|
|
5
|
+
* The wire shape used here is whatever the Google Geocoding REST API
|
|
6
|
+
* returns: `{ long_name, short_name, types: string[] }`.
|
|
7
|
+
*/
|
|
8
|
+
export interface GoogleAddressComponent {
|
|
9
|
+
long_name: string;
|
|
10
|
+
short_name: string;
|
|
11
|
+
types: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ParsedAddressFields {
|
|
14
|
+
country: string;
|
|
15
|
+
state: string;
|
|
16
|
+
city: string;
|
|
17
|
+
district?: string;
|
|
18
|
+
neighborhood?: string;
|
|
19
|
+
street: string;
|
|
20
|
+
number: string;
|
|
21
|
+
zip_code: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parses `address_components` from a Geocoder result or Place result.
|
|
25
|
+
* Applies fallbacks so required API fields are usually non-empty when Google
|
|
26
|
+
* returns a result.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseGoogleAddressComponents(components: GoogleAddressComponent[] | null | undefined, formattedAddress: string | undefined, lat: number, lng: number): ParsedAddressFields & {
|
|
29
|
+
latitude: number;
|
|
30
|
+
longitude: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* True when the parsed address has enough required fields to send to the
|
|
34
|
+
* backend.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isAddressSelectionComplete(parsed: ParsedAddressFields, required?: {
|
|
37
|
+
state?: boolean | undefined;
|
|
38
|
+
city?: boolean | undefined;
|
|
39
|
+
street?: boolean | undefined;
|
|
40
|
+
number?: boolean | undefined;
|
|
41
|
+
postal?: boolean | undefined;
|
|
42
|
+
}): boolean;
|
|
43
|
+
//# sourceMappingURL=parseGoogleAddressComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseGoogleAddressComponents.d.ts","sourceRoot":"","sources":["../../../src/utils/parseGoogleAddressComponents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAYD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,sBAAsB,EAAE,GAAG,IAAI,GAAG,SAAS,EACvD,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,mBAAmB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAgD/D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,GAAE;IACR,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACzB,GACL,OAAO,CAcT"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a single name field (given names or surnames) for API submission.
|
|
3
|
+
*
|
|
4
|
+
* - Trims leading/trailing whitespace
|
|
5
|
+
* - Applies Unicode NFC (composed form) for consistent encoding
|
|
6
|
+
* - Splits on any run of whitespace and rejoins with a single ASCII space,
|
|
7
|
+
* so multiple internal spaces or line breaks become one separator between words
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizePersonNameSegment(raw: string): string;
|
|
10
|
+
//# sourceMappingURL=personNameNormalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personNameNormalize.d.ts","sourceRoot":"","sources":["../../../src/utils/personNameNormalize.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ9D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Helpers to normalize thrown values into SdkError for consistent onError delivery.
|
|
3
|
+
*/
|
|
4
|
+
import { SdkErrorCode, type SdkError } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Returns true if the value looks like an SdkError (has code and message).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isSdkError(value: unknown): value is SdkError;
|
|
9
|
+
/**
|
|
10
|
+
* Normalizes any thrown value to an SdkError so it can be passed to rejectStep/onError.
|
|
11
|
+
* Use when catching in a flow that must always end with an event to the implementer.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toSdkError(err: unknown, defaultCode: SdkErrorCode, defaultMessage: string): SdkError;
|
|
14
|
+
//# sourceMappingURL=sdkError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkError.d.ts","sourceRoot":"","sources":["../../../src/utils/sdkError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEvD;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAS5D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,YAAY,EACzB,cAAc,EAAE,MAAM,GACrB,QAAQ,CAWV"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time SDK version string sent on every authenticated request as
|
|
3
|
+
* `X-Velion-SDK-Version`. Bump it together with `sdk/package.json#version`
|
|
4
|
+
* on every release.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SDK_VERSION: "0.1.0";
|
|
7
|
+
//# sourceMappingURL=sdkVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkVersion.d.ts","sourceRoot":"","sources":["../../../src/utils/sdkVersion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAG,OAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DocumentCaptureMode, DocumentsOcrStepConfig, HumanBasicInfoStepConfig, TermsAndConditionsItem, TermsAndConditionsStepConfig } from '../types';
|
|
2
|
+
export declare function resolveDocumentOptionsFromStepConfig(cfg: HumanBasicInfoStepConfig | undefined): Array<{
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}> | undefined;
|
|
6
|
+
export declare function resolveCaptureModeFromStepConfig(cfg: DocumentsOcrStepConfig | undefined): DocumentCaptureMode | undefined;
|
|
7
|
+
export declare function resolveTermsFromStepConfig(cfg: TermsAndConditionsStepConfig | undefined): TermsAndConditionsItem[] | undefined;
|
|
8
|
+
//# sourceMappingURL=stepConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepConfig.d.ts","sourceRoot":"","sources":["../../../src/utils/stepConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,wBAAwB,GAAG,SAAS,GACxC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAmBrD;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,sBAAsB,GAAG,SAAS,GACtC,mBAAmB,GAAG,SAAS,CASjC;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,4BAA4B,GAAG,SAAS,GAC5C,sBAAsB,EAAE,GAAG,SAAS,CAetC"}
|