@transfergratis/react-native-sdk 0.1.9 → 0.1.10
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/build/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.js +8 -1
- package/build/components/EnhancedCameraView.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +63 -21
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/ReviewSubmitTemplate.js +1 -1
- package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.js +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.js +10 -9
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -1
- package/build/components/OverLay/IdCard.js +3 -3
- package/build/components/OverLay/IdCard.js.map +1 -1
- package/build/components/OverLay/StepOverlay.d.ts.map +1 -1
- package/build/components/OverLay/StepOverlay.js +3 -1
- package/build/components/OverLay/StepOverlay.js.map +1 -1
- package/build/components/OverLay/type.d.ts +5 -0
- package/build/components/OverLay/type.d.ts.map +1 -1
- package/build/components/OverLay/type.js.map +1 -1
- package/build/components/TemplateKYCExample.js +2 -2
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/config/countriesData.d.ts.map +1 -1
- package/build/config/countriesData.js +1 -0
- package/build/config/countriesData.js.map +1 -1
- package/build/config/region_mapping.d.ts.map +1 -1
- package/build/config/region_mapping.js +98 -49
- package/build/config/region_mapping.js.map +1 -1
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +7 -6
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +6 -0
- package/build/i18n/en/index.d.ts.map +1 -1
- package/build/i18n/en/index.js +7 -1
- package/build/i18n/en/index.js.map +1 -1
- package/build/i18n/fr/index.d.ts +6 -0
- package/build/i18n/fr/index.d.ts.map +1 -1
- package/build/i18n/fr/index.js +7 -1
- package/build/i18n/fr/index.js.map +1 -1
- package/build/modules/api/CardAuthentification.d.ts +23 -2
- package/build/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/modules/api/CardAuthentification.js +45 -16
- package/build/modules/api/CardAuthentification.js.map +1 -1
- package/build/modules/api/KYCService.d.ts +9 -0
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +52 -29
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/types/KYC.types.d.ts +3 -0
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/logger.d.ts +12 -0
- package/build/utils/logger.d.ts.map +1 -0
- package/build/utils/logger.js +45 -0
- package/build/utils/logger.js.map +1 -0
- package/package.json +1 -1
- package/src/components/EnhancedCameraView.tsx +8 -2
- package/src/components/KYCElements/IDCardCapture.tsx +75 -25
- package/src/components/KYCElements/ReviewSubmitTemplate.tsx +1 -1
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +1 -0
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +10 -9
- package/src/components/OverLay/IdCard.tsx +3 -3
- package/src/components/OverLay/StepOverlay.tsx +3 -1
- package/src/components/OverLay/type.ts +15 -9
- package/src/components/TemplateKYCExample.tsx +2 -2
- package/src/config/countriesData.ts +1 -0
- package/src/config/region_mapping.json +735 -0
- package/src/config/region_mapping.ts +98 -49
- package/src/hooks/useTemplateKYCFlow.tsx +7 -6
- package/src/i18n/en/index.ts +7 -1
- package/src/i18n/fr/index.ts +9 -2
- package/src/modules/api/CardAuthentification.ts +64 -30
- package/src/modules/api/KYCService.ts +57 -32
- package/src/types/KYC.types.ts +3 -0
- package/src/utils/logger.ts +48 -0
|
@@ -351,6 +351,8 @@ export interface ISilentCaptureResult {
|
|
|
351
351
|
bbox?: IBbox;
|
|
352
352
|
country?: string;
|
|
353
353
|
documentType?: string;
|
|
354
|
+
templatePath?: string;
|
|
355
|
+
lpipsScore?: number;
|
|
354
356
|
}
|
|
355
357
|
export interface IBbox {
|
|
356
358
|
minX: number;
|
|
@@ -363,6 +365,7 @@ export interface ICountryMapping {
|
|
|
363
365
|
front?: string;
|
|
364
366
|
back?: string;
|
|
365
367
|
keys_found?: string | null;
|
|
368
|
+
mrz_type?: string;
|
|
366
369
|
}
|
|
367
370
|
export interface Country {
|
|
368
371
|
code?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KYC.types.d.ts","sourceRoot":"","sources":["../../src/types/KYC.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IAC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","sources":["../../src/types/KYC.types.ts"],"names":[],"mappings":"AAwUA,MAAM,CAAC,MAAM,6BAA6B,GAA2C;IACnF,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,IAAI;IACrB,qBAAqB,EAAE,KAAK;IAC5B,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;CAClB,CAAA","sourcesContent":["import { VerificationResult } from \"../modules/api/types\";\n\n// Types pour les documents\nexport interface Document {\n id: string;\n type: DocumentType;\n imageUri: string;\n uploadedAt: Date;\n validated: boolean;\n extractedData?: DocumentData;\n}\n\nexport type DocumentType = 'passport' | 'id_card' | 'drivers_license';\n\nexport interface DocumentData {\n firstName?: string;\n lastName?: string;\n dateOfBirth?: string;\n documentNumber?: string;\n expiryDate?: string;\n nationality?: string;\n}\n\n// Types pour les selfies\nexport interface Selfie {\n id: string;\n imageUri: string;\n capturedAt: Date;\n validated: boolean;\n faceDetected: boolean;\n}\n\n// Types pour la session KYC\nexport interface KYCSession {\n id: string;\n userId: string;\n status: KYCStatus;\n currentStep: number;\n documents: Document[];\n selfie?: Selfie;\n verificationId?: string;\n createdAt: Date;\n updatedAt: Date;\n completedAt?: Date;\n}\n\nexport type KYCStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'rejected';\n\n// Types pour les étapes du processus\nexport interface KYCStep {\n id: number;\n title: string;\n description: string;\n isCompleted: boolean;\n isRequired: boolean;\n}\n\n// Types pour les erreurs\nexport interface KYCError {\n code: string;\n message: string;\n field?: string;\n details?: any;\n}\n\n// Types pour les réponses API\nexport interface KYCResponse {\n success: boolean;\n data?: any;\n error?: KYCError;\n message?: string;\n}\n\n// Types pour les événements\nexport interface KYCEvent {\n type: 'step_completed' | 'document_uploaded' | 'selfie_captured' | 'verification_started' | 'verification_completed';\n timestamp: Date;\n data?: any;\n}\n\n// Types pour les configurations\nexport interface KYCConfig {\n apiBaseUrl: string;\n apiKey: string;\n timeout: number;\n retryAttempts: number;\n enableDebug: boolean;\n}\n\n// Types pour les hooks\nexport interface UseKYCReturn {\n session: KYCSession | null;\n currentStep: number;\n isProcessing: boolean;\n error: KYCError | null;\n startSession: (userId: string) => void;\n nextStep: () => void;\n previousStep: () => void;\n uploadDocument: (document: Document) => Promise<void>;\n captureSelfie: (selfie: Selfie) => Promise<void>;\n submitVerification: () => Promise<void>;\n resetSession: () => void;\n}\n\n// ===== NOUVEAUX TYPES POUR CONFIGURATION AUTOMATIQUE =====\n\n// Types d'éléments KYC configurables\nexport type KYCElementType =\n | 'country_selection'\n | 'document_type_selection'\n | 'camera_capture'\n | 'file_upload'\n | 'selfie_capture'\n | 'verification'\n | 'completion';\n//KYCElementType shorted\n\n\n// Configuration d'un élément KYC\nexport interface KYCElement {\n id: string;\n type: KYCElementType;\n title: string;\n description: string;\n isRequired: boolean;\n isVisible: boolean;\n order: number;\n validation?: KYCValidation;\n options?: KYCElementOption[];\n cameraConfig?: KYCCameraConfig;\n uploadConfig?: KYCUploadConfig;\n}\n\n// Options pour les éléments de sélection\nexport interface KYCElementOption {\n value: string;\n label: string;\n icon?: string;\n description?: string;\n}\n\n// Configuration de validation\nexport interface KYCValidation {\n required: boolean;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n customValidator?: (value: any) => boolean | string;\n}\n\n// Configuration de la caméra\nexport interface KYCCameraConfig {\n aspectRatio?: number;\n quality?: number;\n flashMode?: 'on' | 'off' | 'auto';\n cameraType?: 'front' | 'back';\n allowRetake: boolean;\n maxRetakes?: number;\n overlay?: {\n showGuide: boolean;\n guideText?: string;\n guideImage?: string;\n };\n}\n\n// Configuration d'upload\nexport interface KYCUploadConfig {\n allowedTypes: string[];\n maxFiles: number;\n maxFileSize?: number;\n allowMultiple: boolean;\n}\n\n// Configuration complète du flux KYC\nexport interface KYCFlowConfig {\n id: string;\n name: string;\n description: string;\n version: string;\n elements: KYCElement[];\n settings: {\n allowBackNavigation: boolean;\n showProgressBar: boolean;\n showStepNumbers: boolean;\n autoAdvance: boolean;\n enableRetry: boolean;\n maxRetries: number;\n };\n styling: {\n primaryColor: string;\n secondaryColor: string;\n backgroundColor: string;\n textColor: string;\n borderRadius: number;\n fontFamily?: string;\n };\n localization: {\n language: string;\n translations: Record<string, Record<string, string>>;\n };\n}\n\n// État du flux KYC\nexport interface KYCFlowState {\n config: KYCFlowConfig;\n currentElementIndex: number;\n completedElements: string[];\n elementData: Record<string, any>;\n errors: Record<string, string>;\n isProcessing: boolean;\n}\n\n// Actions pour le flux KYC\nexport interface KYCFlowActions {\n initializeFlow: (config: KYCFlowConfig) => void;\n nextElement: () => void;\n previousElement: () => void;\n goToElement: (elementId: string) => void;\n updateElementData: (elementId: string, data: any) => void;\n validateElement: (elementId: string) => boolean;\n submitFlow: () => Promise<void>;\n resetFlow: () => void;\n}\n\n// Hook pour le flux KYC\nexport interface UseKYCFlowReturn {\n state: KYCFlowState;\n actions: KYCFlowActions;\n currentElement: KYCElement | null;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n}\n\n// ===== TYPES FOR ORIENTATION VIDEO PROCESSING =====\n\n// Orientation types for liveness detection\nexport type OrientationType = 'center' | 'left' | 'right';\n\n// Individual orientation capture result\nexport interface OrientationCapture {\n captured: boolean;\n frame: number | null;\n}\n\n// Complete orientation video processing result\nexport interface OrientationVideoResult {\n center: OrientationCapture;\n right: OrientationCapture;\n left: OrientationCapture;\n}\n\n// Orientation video processing request\nexport interface OrientationVideoRequest {\n file: string; // Base64 encoded video or file path\n}\n\n// Orientation video processing response\nexport interface OrientationVideoResponse {\n success: boolean;\n data?: OrientationVideoResult;\n error?: KYCError;\n message?: string;\n}\n\n// Configuration for orientation video capture\nexport interface OrientationVideoConfig {\n duration: number; // Duration in seconds\n orientations: OrientationType[];\n instructions: Record<OrientationType, string>;\n showPreview: boolean;\n allowRetake: boolean;\n maxRetakes: number;\n quality: number;\n aspectRatio: number;\n}\n\n// State for orientation video capture\nexport interface OrientationVideoState {\n isRecording: boolean;\n currentOrientation: OrientationType | null;\n recordedVideo: string | null;\n processingResult: OrientationVideoResult | null;\n isProcessing: boolean;\n error: string | null;\n retakeCount: number;\n}\n\n// Actions for orientation video capture\nexport interface OrientationVideoActions {\n startRecording: () => void;\n stopRecording: () => void;\n processVideo: () => Promise<OrientationVideoResult>;\n retake: () => void;\n reset: () => void;\n setCurrentOrientation: (orientation: OrientationType) => void;\n}\n\n// ===== NOUVEAUX TYPES POUR TEMPLATE JSON =====\n\n// Types pour les labels et instructions multilingues\nexport interface LocalizedText {\n en: string;\n fr: string;\n [key: string]: string; // Support pour d'autres langues\n}\n\n// Configuration UI pour les composants\nexport interface ComponentUI {\n icon?: string;\n themeColor?: string;\n buttonText: LocalizedText | Record<string, LocalizedText>;\n backgroundColor?: string;\n textColor?: string;\n borderRadius?: number;\n}\n\n// Types de documents gouvernementaux supportés\nexport type GovernmentDocumentType =\n | 'identity_card'\n | 'passport'\n | 'drivers_licence'\n | 'health_insurance_card'\n | 'permanent_residence'\n | 'national_id'\n | 'work_permit'\n\nexport const GovernmentDocumentTypeShorted: Record<GovernmentDocumentType, string> = {\n identity_card: 'id',\n passport: 'pp',\n drivers_licence: 'dl',\n health_insurance_card: 'hic',\n permanent_residence: 'pr',\n national_id: 'id',\n work_permit: 'wp',\n}\n\n// Configuration spécifique pour chaque type de composant\nexport interface IDCardConfig {\n sides: string[];\n allowed_formats: string[];\n max_size_mb: number;\n document_types: GovernmentDocumentType[]; // Types de documents disponibles\n bbox_configs: Record<GovernmentDocumentType, {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n borderColor?: string;\n borderWidth?: number;\n cornerRadius?: number;\n }>;\n}\n\n\nexport interface SelfieConfig {\n liveness_check: boolean;\n max_attempts: number;\n orientations: ('center' | 'left' | 'right')[]; // Tableau d'orientations à capturer\n}\n\nexport interface FileUploadConfig {\n allowed_formats: string[];\n max_size_mb: number;\n required: boolean;\n}\n\nexport interface LocationConfig {\n accuracy: string;\n required: boolean;\n}\n\nexport interface CountrySelectionConfig {\n allowed_countries: string[];\n default_country: string;\n required: boolean;\n}\n\n// Union type pour toutes les configurations\nexport type ComponentConfig =\n | IDCardConfig\n | SelfieConfig\n | FileUploadConfig\n | LocationConfig\n | CountrySelectionConfig;\n\n// Nouveau type de composant basé sur le template JSON\nexport interface TemplateComponent {\n id: number;\n type: 'id_card' | 'selfie' | 'file_upload' | 'location' | 'country_selection' | 'initialization' | 'review_submit' | 'verification_progress';\n order: number;\n templateId?: number;\n labels: LocalizedText | Record<string, LocalizedText>;\n instructions: LocalizedText | Record<string, LocalizedText>;\n ui: ComponentUI | Record<string, ComponentUI>;\n config: ComponentConfig;\n}\n\n// Template KYC complet\nexport interface KYCTemplate {\n id: number;\n name: LocalizedText;\n description: LocalizedText;\n version: string;\n components: TemplateComponent[];\n}\n\n// État pour le template KYC\nexport interface TemplateState {\n template: KYCTemplate;\n currentComponentIndex: number;\n completedComponents: number[];\n componentData: Record<number, any>;\n errors: Record<number, string>;\n isProcessing: boolean;\n currentLanguage: string;\n showCustomStepper: boolean;\n session: SessionState;\n verification: VerificationState;\n}\n\nexport interface SessionState {\n session_id: string;\n token: string;\n isInitialized: boolean;\n isProcessing: boolean;\n error: string | null;\n}\n\nexport type VerificationStatus = 'idle' | 'in_progress' | 'success' | 'failed';\n\n\n\nexport interface VerificationState {\n status: VerificationStatus;\n result?: VerificationResult;\n}\n\n// Actions pour le template KYC\nexport interface TemplateActions {\n initializeTemplate: (template: KYCTemplate) => void;\n nextComponent: () => void;\n previousComponent: () => void;\n goToComponent: (componentId: number) => void;\n updateComponentData: (componentId: number, data: any) => void;\n validateComponent: (componentId: number) => boolean;\n submitTemplate: () => Promise<void>;\n resetTemplate: () => void;\n setLanguage: (language: string) => void;\n showCustomStepper: (show: boolean) => void;\n setVerificationState: (state: VerificationState) => void;\n submitVerification: () => Promise<void>;\n}\n\n// Hook pour le template KYC\nexport interface UseTemplateReturn {\n state: TemplateState;\n actions: TemplateActions;\n currentComponent: TemplateComponent | null;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n getLocalizedText: (text: LocalizedText) => string;\n initializeSession: () => Promise<void>;\n}\n\n\nexport interface ISilentCaptureResult {\n success: boolean;\n path?: string;\n mrz?: string;\n error?: string;\n isAnalyzing?: boolean;\n bbox?: IBbox;\n country?: string;\n documentType?: string;\n}\n\nexport interface IBbox {\n minX: number;\n minY: number;\n width: number;\n height: number;\n}\n\nexport interface ICountryMapping {\n py_file?: string;\n front?: string;\n back?: string;\n keys_found?: string | null;\n}\n\nexport interface Country {\n code?: string; // ISO 3166-1 alpha-2\n name: string;\n name_en: string;\n flag: string;\n regionMapping?: ICountryMapping;\n hasRegions?: boolean;\n}"]}
|
|
1
|
+
{"version":3,"file":"KYC.types.js","sourceRoot":"","sources":["../../src/types/KYC.types.ts"],"names":[],"mappings":"AAwUA,MAAM,CAAC,MAAM,6BAA6B,GAA2C;IACnF,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,IAAI;IACrB,qBAAqB,EAAE,KAAK;IAC5B,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;CAClB,CAAA","sourcesContent":["import { VerificationResult } from \"../modules/api/types\";\n\n// Types pour les documents\nexport interface Document {\n id: string;\n type: DocumentType;\n imageUri: string;\n uploadedAt: Date;\n validated: boolean;\n extractedData?: DocumentData;\n}\n\nexport type DocumentType = 'passport' | 'id_card' | 'drivers_license';\n\nexport interface DocumentData {\n firstName?: string;\n lastName?: string;\n dateOfBirth?: string;\n documentNumber?: string;\n expiryDate?: string;\n nationality?: string;\n}\n\n// Types pour les selfies\nexport interface Selfie {\n id: string;\n imageUri: string;\n capturedAt: Date;\n validated: boolean;\n faceDetected: boolean;\n}\n\n// Types pour la session KYC\nexport interface KYCSession {\n id: string;\n userId: string;\n status: KYCStatus;\n currentStep: number;\n documents: Document[];\n selfie?: Selfie;\n verificationId?: string;\n createdAt: Date;\n updatedAt: Date;\n completedAt?: Date;\n}\n\nexport type KYCStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'rejected';\n\n// Types pour les étapes du processus\nexport interface KYCStep {\n id: number;\n title: string;\n description: string;\n isCompleted: boolean;\n isRequired: boolean;\n}\n\n// Types pour les erreurs\nexport interface KYCError {\n code: string;\n message: string;\n field?: string;\n details?: any;\n}\n\n// Types pour les réponses API\nexport interface KYCResponse {\n success: boolean;\n data?: any;\n error?: KYCError;\n message?: string;\n}\n\n// Types pour les événements\nexport interface KYCEvent {\n type: 'step_completed' | 'document_uploaded' | 'selfie_captured' | 'verification_started' | 'verification_completed';\n timestamp: Date;\n data?: any;\n}\n\n// Types pour les configurations\nexport interface KYCConfig {\n apiBaseUrl: string;\n apiKey: string;\n timeout: number;\n retryAttempts: number;\n enableDebug: boolean;\n}\n\n// Types pour les hooks\nexport interface UseKYCReturn {\n session: KYCSession | null;\n currentStep: number;\n isProcessing: boolean;\n error: KYCError | null;\n startSession: (userId: string) => void;\n nextStep: () => void;\n previousStep: () => void;\n uploadDocument: (document: Document) => Promise<void>;\n captureSelfie: (selfie: Selfie) => Promise<void>;\n submitVerification: () => Promise<void>;\n resetSession: () => void;\n}\n\n// ===== NOUVEAUX TYPES POUR CONFIGURATION AUTOMATIQUE =====\n\n// Types d'éléments KYC configurables\nexport type KYCElementType =\n | 'country_selection'\n | 'document_type_selection'\n | 'camera_capture'\n | 'file_upload'\n | 'selfie_capture'\n | 'verification'\n | 'completion';\n//KYCElementType shorted\n\n\n// Configuration d'un élément KYC\nexport interface KYCElement {\n id: string;\n type: KYCElementType;\n title: string;\n description: string;\n isRequired: boolean;\n isVisible: boolean;\n order: number;\n validation?: KYCValidation;\n options?: KYCElementOption[];\n cameraConfig?: KYCCameraConfig;\n uploadConfig?: KYCUploadConfig;\n}\n\n// Options pour les éléments de sélection\nexport interface KYCElementOption {\n value: string;\n label: string;\n icon?: string;\n description?: string;\n}\n\n// Configuration de validation\nexport interface KYCValidation {\n required: boolean;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n customValidator?: (value: any) => boolean | string;\n}\n\n// Configuration de la caméra\nexport interface KYCCameraConfig {\n aspectRatio?: number;\n quality?: number;\n flashMode?: 'on' | 'off' | 'auto';\n cameraType?: 'front' | 'back';\n allowRetake: boolean;\n maxRetakes?: number;\n overlay?: {\n showGuide: boolean;\n guideText?: string;\n guideImage?: string;\n };\n}\n\n// Configuration d'upload\nexport interface KYCUploadConfig {\n allowedTypes: string[];\n maxFiles: number;\n maxFileSize?: number;\n allowMultiple: boolean;\n}\n\n// Configuration complète du flux KYC\nexport interface KYCFlowConfig {\n id: string;\n name: string;\n description: string;\n version: string;\n elements: KYCElement[];\n settings: {\n allowBackNavigation: boolean;\n showProgressBar: boolean;\n showStepNumbers: boolean;\n autoAdvance: boolean;\n enableRetry: boolean;\n maxRetries: number;\n };\n styling: {\n primaryColor: string;\n secondaryColor: string;\n backgroundColor: string;\n textColor: string;\n borderRadius: number;\n fontFamily?: string;\n };\n localization: {\n language: string;\n translations: Record<string, Record<string, string>>;\n };\n}\n\n// État du flux KYC\nexport interface KYCFlowState {\n config: KYCFlowConfig;\n currentElementIndex: number;\n completedElements: string[];\n elementData: Record<string, any>;\n errors: Record<string, string>;\n isProcessing: boolean;\n}\n\n// Actions pour le flux KYC\nexport interface KYCFlowActions {\n initializeFlow: (config: KYCFlowConfig) => void;\n nextElement: () => void;\n previousElement: () => void;\n goToElement: (elementId: string) => void;\n updateElementData: (elementId: string, data: any) => void;\n validateElement: (elementId: string) => boolean;\n submitFlow: () => Promise<void>;\n resetFlow: () => void;\n}\n\n// Hook pour le flux KYC\nexport interface UseKYCFlowReturn {\n state: KYCFlowState;\n actions: KYCFlowActions;\n currentElement: KYCElement | null;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n}\n\n// ===== TYPES FOR ORIENTATION VIDEO PROCESSING =====\n\n// Orientation types for liveness detection\nexport type OrientationType = 'center' | 'left' | 'right';\n\n// Individual orientation capture result\nexport interface OrientationCapture {\n captured: boolean;\n frame: number | null;\n}\n\n// Complete orientation video processing result\nexport interface OrientationVideoResult {\n center: OrientationCapture;\n right: OrientationCapture;\n left: OrientationCapture;\n}\n\n// Orientation video processing request\nexport interface OrientationVideoRequest {\n file: string; // Base64 encoded video or file path\n}\n\n// Orientation video processing response\nexport interface OrientationVideoResponse {\n success: boolean;\n data?: OrientationVideoResult;\n error?: KYCError;\n message?: string;\n}\n\n// Configuration for orientation video capture\nexport interface OrientationVideoConfig {\n duration: number; // Duration in seconds\n orientations: OrientationType[];\n instructions: Record<OrientationType, string>;\n showPreview: boolean;\n allowRetake: boolean;\n maxRetakes: number;\n quality: number;\n aspectRatio: number;\n}\n\n// State for orientation video capture\nexport interface OrientationVideoState {\n isRecording: boolean;\n currentOrientation: OrientationType | null;\n recordedVideo: string | null;\n processingResult: OrientationVideoResult | null;\n isProcessing: boolean;\n error: string | null;\n retakeCount: number;\n}\n\n// Actions for orientation video capture\nexport interface OrientationVideoActions {\n startRecording: () => void;\n stopRecording: () => void;\n processVideo: () => Promise<OrientationVideoResult>;\n retake: () => void;\n reset: () => void;\n setCurrentOrientation: (orientation: OrientationType) => void;\n}\n\n// ===== NOUVEAUX TYPES POUR TEMPLATE JSON =====\n\n// Types pour les labels et instructions multilingues\nexport interface LocalizedText {\n en: string;\n fr: string;\n [key: string]: string; // Support pour d'autres langues\n}\n\n// Configuration UI pour les composants\nexport interface ComponentUI {\n icon?: string;\n themeColor?: string;\n buttonText: LocalizedText | Record<string, LocalizedText>;\n backgroundColor?: string;\n textColor?: string;\n borderRadius?: number;\n}\n\n// Types de documents gouvernementaux supportés\nexport type GovernmentDocumentType =\n | 'identity_card'\n | 'passport'\n | 'drivers_licence'\n | 'health_insurance_card'\n | 'permanent_residence'\n | 'national_id'\n | 'work_permit'\n\nexport const GovernmentDocumentTypeShorted: Record<GovernmentDocumentType, string> = {\n identity_card: 'id',\n passport: 'pp',\n drivers_licence: 'dl',\n health_insurance_card: 'hic',\n permanent_residence: 'pr',\n national_id: 'id',\n work_permit: 'wp',\n}\n\n// Configuration spécifique pour chaque type de composant\nexport interface IDCardConfig {\n sides: string[];\n allowed_formats: string[];\n max_size_mb: number;\n document_types: GovernmentDocumentType[]; // Types de documents disponibles\n bbox_configs: Record<GovernmentDocumentType, {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n borderColor?: string;\n borderWidth?: number;\n cornerRadius?: number;\n }>;\n}\n\n\nexport interface SelfieConfig {\n liveness_check: boolean;\n max_attempts: number;\n orientations: ('center' | 'left' | 'right')[]; // Tableau d'orientations à capturer\n}\n\nexport interface FileUploadConfig {\n allowed_formats: string[];\n max_size_mb: number;\n required: boolean;\n}\n\nexport interface LocationConfig {\n accuracy: string;\n required: boolean;\n}\n\nexport interface CountrySelectionConfig {\n allowed_countries: string[];\n default_country: string;\n required: boolean;\n}\n\n// Union type pour toutes les configurations\nexport type ComponentConfig =\n | IDCardConfig\n | SelfieConfig\n | FileUploadConfig\n | LocationConfig\n | CountrySelectionConfig;\n\n// Nouveau type de composant basé sur le template JSON\nexport interface TemplateComponent {\n id: number;\n type: 'id_card' | 'selfie' | 'file_upload' | 'location' | 'country_selection' | 'initialization' | 'review_submit' | 'verification_progress';\n order: number;\n templateId?: number;\n labels: LocalizedText | Record<string, LocalizedText>;\n instructions: LocalizedText | Record<string, LocalizedText>;\n ui: ComponentUI | Record<string, ComponentUI>;\n config: ComponentConfig;\n}\n\n// Template KYC complet\nexport interface KYCTemplate {\n id: number;\n name: LocalizedText;\n description: LocalizedText;\n version: string;\n components: TemplateComponent[];\n}\n\n// État pour le template KYC\nexport interface TemplateState {\n template: KYCTemplate;\n currentComponentIndex: number;\n completedComponents: number[];\n componentData: Record<number, any>;\n errors: Record<number, string>;\n isProcessing: boolean;\n currentLanguage: string;\n showCustomStepper: boolean;\n session: SessionState;\n verification: VerificationState;\n}\n\nexport interface SessionState {\n session_id: string;\n token: string;\n isInitialized: boolean;\n isProcessing: boolean;\n error: string | null;\n}\n\nexport type VerificationStatus = 'idle' | 'in_progress' | 'success' | 'failed';\n\n\n\nexport interface VerificationState {\n status: VerificationStatus;\n result?: VerificationResult;\n}\n\n// Actions pour le template KYC\nexport interface TemplateActions {\n initializeTemplate: (template: KYCTemplate) => void;\n nextComponent: () => void;\n previousComponent: () => void;\n goToComponent: (componentId: number) => void;\n updateComponentData: (componentId: number, data: any) => void;\n validateComponent: (componentId: number) => boolean;\n submitTemplate: () => Promise<void>;\n resetTemplate: () => void;\n setLanguage: (language: string) => void;\n showCustomStepper: (show: boolean) => void;\n setVerificationState: (state: VerificationState) => void;\n submitVerification: () => Promise<void>;\n}\n\n// Hook pour le template KYC\nexport interface UseTemplateReturn {\n state: TemplateState;\n actions: TemplateActions;\n currentComponent: TemplateComponent | null;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n getLocalizedText: (text: LocalizedText) => string;\n initializeSession: () => Promise<void>;\n}\n\n\nexport interface ISilentCaptureResult {\n success: boolean;\n path?: string;\n mrz?: string;\n error?: string;\n isAnalyzing?: boolean;\n bbox?: IBbox;\n country?: string;\n documentType?: string;\n templatePath?: string;\n lpipsScore?: number;\n}\n\nexport interface IBbox {\n minX: number;\n minY: number;\n width: number;\n height: number;\n}\n\nexport interface ICountryMapping {\n py_file?: string;\n front?: string;\n back?: string;\n keys_found?: string | null;\n mrz_type?: string;\n}\n\nexport interface Country {\n code?: string; // ISO 3166-1 alpha-2\n name: string;\n name_en: string;\n flag: string;\n regionMapping?: ICountryMapping;\n hasRegions?: boolean;\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utility that only logs in development mode
|
|
3
|
+
* In production, all logs are suppressed
|
|
4
|
+
*/
|
|
5
|
+
export declare const logger: {
|
|
6
|
+
log: (...args: any[]) => void;
|
|
7
|
+
error: (...args: any[]) => void;
|
|
8
|
+
warn: (...args: any[]) => void;
|
|
9
|
+
info: (...args: any[]) => void;
|
|
10
|
+
debug: (...args: any[]) => void;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,eAAO,MAAM,MAAM;mBACF,GAAG,EAAE;qBAKH,GAAG,EAAE;oBAKN,GAAG,EAAE;oBAKL,GAAG,EAAE;qBAKJ,GAAG,EAAE;CAKvB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utility that only logs in development mode
|
|
3
|
+
* In production, all logs are suppressed
|
|
4
|
+
*/
|
|
5
|
+
const isProduction = () => {
|
|
6
|
+
// Check for React Native __DEV__ flag
|
|
7
|
+
if (typeof __DEV__ !== 'undefined') {
|
|
8
|
+
return !__DEV__;
|
|
9
|
+
}
|
|
10
|
+
// Check for Node.js environment
|
|
11
|
+
if (typeof process !== 'undefined' && process.env) {
|
|
12
|
+
return process.env.NODE_ENV === 'production';
|
|
13
|
+
}
|
|
14
|
+
// Default to development mode if we can't determine
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
17
|
+
const shouldLog = !isProduction();
|
|
18
|
+
export const logger = {
|
|
19
|
+
log: (...args) => {
|
|
20
|
+
if (shouldLog) {
|
|
21
|
+
console.log(...args);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
error: (...args) => {
|
|
25
|
+
if (shouldLog) {
|
|
26
|
+
console.error(...args);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
warn: (...args) => {
|
|
30
|
+
if (shouldLog) {
|
|
31
|
+
console.warn(...args);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
info: (...args) => {
|
|
35
|
+
if (shouldLog) {
|
|
36
|
+
console.info(...args);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
debug: (...args) => {
|
|
40
|
+
if (shouldLog) {
|
|
41
|
+
console.debug(...args);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,YAAY,GAAG,GAAY,EAAE;IACjC,sCAAsC;IACtC,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,CAAC,OAAO,CAAC;IAClB,CAAC;IACD,gCAAgC;IAChC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;IAC/C,CAAC;IACD,oDAAoD;IACpD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,YAAY,EAAE,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACtB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IACD,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACvB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACvB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["/**\n * Logger utility that only logs in development mode\n * In production, all logs are suppressed\n */\n\nconst isProduction = (): boolean => {\n // Check for React Native __DEV__ flag\n if (typeof __DEV__ !== 'undefined') {\n return !__DEV__;\n }\n // Check for Node.js environment\n if (typeof process !== 'undefined' && process.env) {\n return process.env.NODE_ENV === 'production';\n }\n // Default to development mode if we can't determine\n return false;\n};\n\nconst shouldLog = !isProduction();\n\nexport const logger = {\n log: (...args: any[]) => {\n if (shouldLog) {\n console.log(...args);\n }\n },\n error: (...args: any[]) => {\n if (shouldLog) {\n console.error(...args);\n }\n },\n warn: (...args: any[]) => {\n if (shouldLog) {\n console.warn(...args);\n }\n },\n info: (...args: any[]) => {\n if (shouldLog) {\n console.info(...args);\n }\n },\n debug: (...args: any[]) => {\n if (shouldLog) {\n console.debug(...args);\n }\n },\n};\n\n"]}
|
package/package.json
CHANGED
|
@@ -9,8 +9,7 @@ import { Button } from './ui/Button';
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
export const EnhancedCameraView: React.FC<EnhancedCameraViewProps> = ({
|
|
13
|
-
instructions = 'Position yourself in the frame and tap the capture button',
|
|
12
|
+
export const EnhancedCameraView: React.FC<EnhancedCameraViewProps> = ({
|
|
14
13
|
showCamera,
|
|
15
14
|
cameraType: initialCameraType = 'front',
|
|
16
15
|
style,
|
|
@@ -124,6 +123,13 @@ export const EnhancedCameraView: React.FC<EnhancedCameraViewProps> = ({
|
|
|
124
123
|
onError?.({ message: t('camera.notReady') });
|
|
125
124
|
return;
|
|
126
125
|
}
|
|
126
|
+
if (silentCaptureResult?.success) {
|
|
127
|
+
onCapture?.({
|
|
128
|
+
success: true,
|
|
129
|
+
path: silentCaptureResult.path,
|
|
130
|
+
});
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
127
133
|
|
|
128
134
|
const photo = await camera.current.takePhoto({
|
|
129
135
|
enableShutterSound: true,
|
|
@@ -7,11 +7,12 @@ import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
|
7
7
|
import { useI18n } from '../../hooks/useI18n';
|
|
8
8
|
import { Button } from '../ui/Button';
|
|
9
9
|
import { removeDuplicates } from '../../utils/remove-duplicate';
|
|
10
|
-
import { backVerification, frontVerification } from '../../modules/api/CardAuthentification';
|
|
10
|
+
import { backVerification, checkTemplateType, frontVerification } from '../../modules/api/CardAuthentification';
|
|
11
11
|
import { getDocumentTypeInfo } from '../../utils/get-document-type-info';
|
|
12
12
|
import pathToBase64 from '../../utils/pathToBase64';
|
|
13
|
-
import
|
|
13
|
+
import { truncateFields } from '../../modules/api/KYCService';
|
|
14
14
|
import { cropImageWithBBox } from '../../utils/cropByObb';
|
|
15
|
+
import { logger } from '../../utils/logger';
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
interface IIDCardPayload {
|
|
@@ -36,7 +37,7 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
36
37
|
error,
|
|
37
38
|
language = 'en',
|
|
38
39
|
}) => {
|
|
39
|
-
const { t } = useI18n();
|
|
40
|
+
const { t , locale} = useI18n();
|
|
40
41
|
const [showCamera, setShowCamera] = useState(false);
|
|
41
42
|
const [capturedImages, setCapturedImages] = useState<Record<string, IIDCardPayload>>(value || {});
|
|
42
43
|
const [cropImageUri, setCropImageUri] = useState<string>('');
|
|
@@ -60,12 +61,12 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
60
61
|
const { actions, state, } = useTemplateKYCFlowContext();
|
|
61
62
|
const config = component.config as IDCardConfig;
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
|
|
64
65
|
|
|
65
66
|
const getLocalizedText = (text: LocalizedText | Record<string, LocalizedText>): string => {
|
|
66
67
|
// console.log("text", text, JSON.stringify(component, null, 2));
|
|
67
|
-
if (text && typeof text[currentSide] === 'object' && text[currentSide][
|
|
68
|
-
return text[currentSide][
|
|
68
|
+
if (text && typeof text[currentSide] === 'object' && text[currentSide][locale]) {
|
|
69
|
+
return text[currentSide][locale] || '';
|
|
69
70
|
}
|
|
70
71
|
return "";
|
|
71
72
|
};
|
|
@@ -92,13 +93,13 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
+
logger.log("newconfig", truncateFields(newconfig));
|
|
96
97
|
return newconfig;
|
|
97
98
|
}, []);
|
|
98
99
|
|
|
99
100
|
|
|
100
101
|
useEffect(() => {
|
|
101
|
-
|
|
102
|
+
logger.log("cropImageUri", JSON.stringify(truncateFields({ box: silentCaptureResult }), null, 2));
|
|
102
103
|
if (capturedImages[currentSide]?.dir && silentCaptureResult?.bbox) {
|
|
103
104
|
cropImageWithBBox(capturedImages[currentSide].dir, silentCaptureResult.bbox)?.then((uri) => {
|
|
104
105
|
setCropImageUri(uri);
|
|
@@ -117,7 +118,7 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
117
118
|
maxRetakes: 3,
|
|
118
119
|
overlay: {
|
|
119
120
|
showGuide: true,
|
|
120
|
-
guideText: selectedDocumentType ? getDocumentTypeInfo(selectedDocumentType.type).instructions.en : getLocalizedText(component.instructions as Record<string, LocalizedText>),
|
|
121
|
+
guideText: selectedDocumentType ? (locale === 'en' ? getDocumentTypeInfo(selectedDocumentType.type).instructions.en : getDocumentTypeInfo(selectedDocumentType.type).instructions.fr) : getLocalizedText(component.instructions as Record<string, LocalizedText>),
|
|
121
122
|
bbox: selectedDocumentType && config.bbox_configs[selectedDocumentType.type] ? config.bbox_configs[selectedDocumentType.type] : {
|
|
122
123
|
xMin: 20,
|
|
123
124
|
yMin: 140,
|
|
@@ -158,6 +159,7 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
158
159
|
const getCurrentSideVerification = (currentSide: string) => {
|
|
159
160
|
const regionMapping = countryData?.regionMapping[selectedDocumentType?.type as GovernmentDocumentType];
|
|
160
161
|
const authMethod: string[] = [];
|
|
162
|
+
const mrzTypes: string[] = [];
|
|
161
163
|
|
|
162
164
|
const key = selectedDocumentType?.region?.trim()?.length > 0 ? selectedDocumentType?.region?.trim() : 'root';
|
|
163
165
|
// console.log("regionMapping", JSON.stringify(regionMapping, null, 2), selectedDocumentType?.region);
|
|
@@ -167,44 +169,80 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
167
169
|
regionMapping[key].forEach((item: any) => {
|
|
168
170
|
if (item[currentSide as keyof typeof item]) {
|
|
169
171
|
authMethod.push(item[currentSide as keyof typeof item]);
|
|
172
|
+
if (item?.mrz_type) {
|
|
173
|
+
mrzTypes.push(item?.mrz_type);
|
|
174
|
+
}
|
|
170
175
|
}
|
|
171
176
|
});
|
|
172
177
|
}
|
|
173
178
|
|
|
174
|
-
|
|
179
|
+
logger.log("regionMapping", JSON.stringify(truncateFields({ regionMapping, selectedDocumentType: selectedDocumentType?.region, key }), null, 2));
|
|
175
180
|
|
|
176
|
-
return removeDuplicates(authMethod);
|
|
181
|
+
return { authMethod: removeDuplicates(authMethod), mrzTypes: removeDuplicates(mrzTypes), regionMapping: regionMapping, key: key };
|
|
177
182
|
}
|
|
178
183
|
|
|
184
|
+
const getCorrespondingMrzType = (templatePath: string, mapping: any, selectedDocumentType: string = "root") => {
|
|
185
|
+
if (!mapping[selectedDocumentType]) return null;
|
|
186
|
+
|
|
187
|
+
// Extraire le nom du fichier depuis le template_path
|
|
188
|
+
const fileName = templatePath.split("/").pop()?.replace(".jpg", "").replace(".png", "");
|
|
189
|
+
|
|
190
|
+
if (!fileName) return null;
|
|
191
|
+
|
|
192
|
+
// Normaliser en .py
|
|
193
|
+
const pyName = `${fileName}.py`; // ex: cameroon_id_back_3_1.py
|
|
194
|
+
|
|
195
|
+
// Chercher dans la liste
|
|
196
|
+
const found = mapping[selectedDocumentType].find((item: any) => item.py_file === pyName);
|
|
197
|
+
|
|
198
|
+
return found?.mrz_type || null;
|
|
199
|
+
}
|
|
179
200
|
|
|
180
|
-
const handleSilentCapture = (result: { success: boolean; path?: string; error?: string }) => {
|
|
201
|
+
const handleSilentCapture = async (result: { success: boolean; path?: string; error?: string }) => {
|
|
181
202
|
if (silentCaptureResult.isAnalyzing) {
|
|
182
203
|
return;
|
|
183
204
|
}
|
|
184
205
|
if (result.success && result.path) {
|
|
185
206
|
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: true, success: false, error: '' }));
|
|
207
|
+
let templatePath = silentCaptureResult.templatePath || '';
|
|
208
|
+
|
|
209
|
+
const regionMappings = getCurrentSideVerification(currentSide)
|
|
210
|
+
// logger.log("regionMappings", JSON.stringify(truncateFields({regionMappings, templatePath}), null, 2));
|
|
211
|
+
if (regionMappings.authMethod.includes('MRZ') && templatePath.length === 0) {
|
|
212
|
+
const templateType = await checkTemplateType({ path: result.path || '', docType: selectedDocumentType?.type as GovernmentDocumentType, docRegion: countryData?.code || "", postfix: currentSide });
|
|
213
|
+
|
|
214
|
+
if (templateType.template_path) {
|
|
215
|
+
templatePath = templateType.template_path;
|
|
216
|
+
logger.log("templatePath", templatePath);
|
|
217
|
+
setSilentCaptureResult((prev) => ({ ...prev, templatePath: templatePath }));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
186
220
|
if (currentSide === 'front') {
|
|
221
|
+
|
|
187
222
|
frontVerification(
|
|
188
223
|
{
|
|
189
224
|
path: result.path,
|
|
190
|
-
regionMapping:
|
|
225
|
+
regionMapping: regionMappings,
|
|
191
226
|
selectedDocumentType: selectedDocumentType?.type || '',
|
|
192
227
|
code: countryData?.code || '',
|
|
193
228
|
currentSide: currentSide,
|
|
194
|
-
|
|
229
|
+
templatePath: templatePath,
|
|
230
|
+
mrzType: getCorrespondingMrzType(templatePath, regionMappings.regionMapping, regionMappings.key || '') || '',
|
|
195
231
|
}).then((mrz) => {
|
|
196
|
-
|
|
232
|
+
logger.log("front verification result", truncateFields(mrz));
|
|
197
233
|
setSilentCaptureResult((prev) => ({
|
|
198
234
|
...prev, path: result.path,
|
|
199
235
|
bbox: (mrz as any)?.bbox, success: true,
|
|
200
236
|
mrz: JSON.stringify(mrz), isAnalyzing: false,
|
|
201
237
|
country: countryData?.code,
|
|
202
|
-
documentType: selectedDocumentType?.type
|
|
238
|
+
documentType: selectedDocumentType?.type,
|
|
239
|
+
templatePath: "",
|
|
203
240
|
}),
|
|
204
241
|
);
|
|
242
|
+
|
|
205
243
|
}).catch((e: any) => {
|
|
206
|
-
|
|
207
|
-
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: e?.message || 'Erreur de détection du MRZ' }));
|
|
244
|
+
logger.log("error front verification", truncateFields(e));
|
|
245
|
+
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, templatePath: templatePath, success: false, error: e?.message || 'Erreur de détection du MRZ' }));
|
|
208
246
|
// Alert.alert('Erreur', e?.message || 'Erreur de détection du MRZ');
|
|
209
247
|
})
|
|
210
248
|
} else {
|
|
@@ -214,18 +252,20 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
214
252
|
selectedDocumentType: selectedDocumentType?.type || '',
|
|
215
253
|
code: countryData?.code || '',
|
|
216
254
|
currentSide: currentSide,
|
|
217
|
-
|
|
255
|
+
templatePath: templatePath,
|
|
256
|
+
mrzType: getCorrespondingMrzType(templatePath, regionMappings.regionMapping, regionMappings.key || '') || '',
|
|
218
257
|
}).then((mrz) => {
|
|
219
|
-
|
|
258
|
+
logger.log("back verification result", truncateFields(mrz));
|
|
220
259
|
setSilentCaptureResult((prev) => ({
|
|
221
260
|
...prev, path: result.path, bbox: (mrz as any)?.bbox,
|
|
222
261
|
success: true, mrz: JSON.stringify(mrz), isAnalyzing: false,
|
|
223
262
|
country: countryData?.code,
|
|
224
|
-
documentType: selectedDocumentType?.type
|
|
263
|
+
documentType: selectedDocumentType?.type,
|
|
264
|
+
templatePath: "",
|
|
225
265
|
}));
|
|
226
266
|
}).catch((e: any) => {
|
|
227
|
-
|
|
228
|
-
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: e?.message || 'Erreur de détection du MRZ' }));
|
|
267
|
+
logger.log("error back verification", truncateFields(e));
|
|
268
|
+
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, templatePath: templatePath, success: false, error: e?.message || 'Erreur de détection du MRZ' }));
|
|
229
269
|
// Alert.alert('Erreur', e?.message || 'Erreur de détection du MRZ');
|
|
230
270
|
})
|
|
231
271
|
}
|
|
@@ -344,7 +384,7 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
344
384
|
}
|
|
345
385
|
|
|
346
386
|
if (showDocumentSelection.regionSelection) {
|
|
347
|
-
|
|
387
|
+
logger.log("showDocumentSelection", JSON.stringify(truncateFields(showDocumentSelection), null, 2));
|
|
348
388
|
setShowDocumentSelection({
|
|
349
389
|
documentSelection: false,
|
|
350
390
|
regionSelection: false
|
|
@@ -429,9 +469,10 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
429
469
|
actions.showCustomStepper(true);
|
|
430
470
|
}
|
|
431
471
|
},
|
|
432
|
-
selectedDocumentType: getDocumentTypeInfo(selectedDocumentType?.type || "identity_card").name.en || '',
|
|
472
|
+
selectedDocumentType: locale === 'en' ? getDocumentTypeInfo(selectedDocumentType?.type || "identity_card").name.en : getDocumentTypeInfo(selectedDocumentType?.type || "identity_card").name.fr || '',
|
|
433
473
|
step: state.currentComponentIndex + 1,
|
|
434
474
|
totalSteps: state.template.components.length,
|
|
475
|
+
side: currentSide,
|
|
435
476
|
}}
|
|
436
477
|
/>
|
|
437
478
|
}
|
|
@@ -482,6 +523,15 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({
|
|
|
482
523
|
}}
|
|
483
524
|
/>
|
|
484
525
|
) : null}
|
|
526
|
+
{silentCaptureResult.path ? (<Image
|
|
527
|
+
source={{ uri: silentCaptureResult.path }}
|
|
528
|
+
style={{
|
|
529
|
+
width: '100%',
|
|
530
|
+
height: 200,
|
|
531
|
+
borderRadius: 12,
|
|
532
|
+
resizeMode: 'cover',
|
|
533
|
+
}}
|
|
534
|
+
/>) : null}
|
|
485
535
|
|
|
486
536
|
</View>
|
|
487
537
|
{/* retake button */}
|
|
@@ -89,7 +89,7 @@ export const ReviewSubmitTemplate: React.FC<ReviewSubmitTemplateProps> = () => {
|
|
|
89
89
|
const colorStyle = o === 'center' ? styles.pink : o === 'right' ? styles.blue : styles.purple;
|
|
90
90
|
return (
|
|
91
91
|
<View key={o} style={[styles.tile, colorStyle, has ? styles.active : null]}>
|
|
92
|
-
<Text style={styles.tileLabel}>{
|
|
92
|
+
<Text style={styles.tileLabel}>{t(`kyc.reviewSubmit.selfieSide.${o}`)}</Text>
|
|
93
93
|
{has ? <Text style={styles.check}>✓</Text> : null}
|
|
94
94
|
</View>
|
|
95
95
|
);
|
|
@@ -253,6 +253,7 @@ export const SelfieCaptureTemplate: React.FC<SelfieCaptureTemplateProps> = ({
|
|
|
253
253
|
selectedDocumentType: "Selfie",
|
|
254
254
|
step: state.currentComponentIndex + 1,
|
|
255
255
|
totalSteps: state.template.components.length,
|
|
256
|
+
side: currentOrientation,
|
|
256
257
|
}} />}
|
|
257
258
|
/>
|
|
258
259
|
</View>
|
|
@@ -4,6 +4,7 @@ import { TemplateComponent } from '../../types/KYC.types';
|
|
|
4
4
|
import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
5
5
|
import { useI18n } from '../../hooks/useI18n';
|
|
6
6
|
import kycService from '../../modules/api/KYCService';
|
|
7
|
+
import { logger } from '../../utils/logger';
|
|
7
8
|
|
|
8
9
|
interface VerificationProgressTemplateProps {
|
|
9
10
|
component: TemplateComponent;
|
|
@@ -28,12 +29,12 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
28
29
|
// Fonction pour récupérer le résultat de vérification avec retry
|
|
29
30
|
const getVerificationResult = async (currentRetryCount = 0, maxRetries = 40) => {
|
|
30
31
|
try {
|
|
31
|
-
|
|
32
|
+
logger.log(`Starting verification check (attempt ${currentRetryCount + 1}/${maxRetries + 1})`);
|
|
32
33
|
|
|
33
34
|
const result = await kycService.getVerificationResult(state.session.session_id);
|
|
34
35
|
const verificationResult = result[state.session.session_id].data;
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
logger.log('getVerificationResult result', JSON.stringify(result, null, 2));
|
|
37
38
|
|
|
38
39
|
// Vérifier le statut de vérification
|
|
39
40
|
if (verificationResult.verification_status === null || verificationResult.verification_status === "processing" || verificationResult.verification_status === "pending") {
|
|
@@ -42,7 +43,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
42
43
|
setRetryCount(nextRetryCount);
|
|
43
44
|
setIsRetrying(true);
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
logger.log(`Verification still processing, retrying in 10s... (${nextRetryCount}/${maxRetries})`);
|
|
46
47
|
|
|
47
48
|
// Nettoyer le timeout précédent s'il existe
|
|
48
49
|
if (timeoutId) {
|
|
@@ -57,7 +58,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
57
58
|
setTimeoutId(newTimeoutId);
|
|
58
59
|
return; // Sortir de la fonction pour éviter de traiter le résultat
|
|
59
60
|
} else {
|
|
60
|
-
|
|
61
|
+
logger.error('Max retries reached, verification still processing');
|
|
61
62
|
setIsRetrying(false);
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
@@ -86,7 +87,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
86
87
|
setIsRetrying(false);
|
|
87
88
|
|
|
88
89
|
} catch (error) {
|
|
89
|
-
|
|
90
|
+
logger.error('getVerificationResult error', error);
|
|
90
91
|
|
|
91
92
|
// En cas d'erreur, on peut aussi retry
|
|
92
93
|
if (currentRetryCount < maxRetries) {
|
|
@@ -94,7 +95,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
94
95
|
setRetryCount(nextRetryCount);
|
|
95
96
|
setIsRetrying(true);
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
logger.log(`Error occurred, retrying in 10s... (${nextRetryCount}/${maxRetries})`);
|
|
98
99
|
|
|
99
100
|
// Nettoyer le timeout précédent s'il existe
|
|
100
101
|
if (timeoutId) {
|
|
@@ -108,7 +109,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
108
109
|
setTimeoutId(newTimeoutId);
|
|
109
110
|
} else {
|
|
110
111
|
setIsRetrying(false);
|
|
111
|
-
|
|
112
|
+
logger.error('Max retries reached after errors');
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
};
|
|
@@ -155,7 +156,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
155
156
|
))}
|
|
156
157
|
</View>
|
|
157
158
|
<TouchableOpacity style={[styles.button, styles.primary]} onPress={() => actions.goToComponent(state.template.components.find(c => c.type !== 'review_submit' && c.type !== 'verification_progress')?.id || 0)}>
|
|
158
|
-
<Text style={styles.buttonText}>{t('
|
|
159
|
+
<Text style={styles.buttonText}>{t('kyc.verificationProgress.status.retry')}</Text>
|
|
159
160
|
</TouchableOpacity>
|
|
160
161
|
<TouchableOpacity style={[styles.button, styles.secondary]}>
|
|
161
162
|
<Text style={styles.secondaryText}>{t('common.info')}</Text>
|
|
@@ -178,7 +179,7 @@ export const VerificationProgressTemplate: React.FC<VerificationProgressTemplate
|
|
|
178
179
|
<Text style={styles.title}>{t('kyc.verificationProgress.title')}</Text>
|
|
179
180
|
<Text style={styles.subtitle}>
|
|
180
181
|
{isRetrying
|
|
181
|
-
? `${t('kyc.verificationProgress.retrying'
|
|
182
|
+
? `${t('kyc.verificationProgress.retrying', { current: retryCount, max: 40 })}`
|
|
182
183
|
: t('kyc.verificationProgress.estimatedTime')
|
|
183
184
|
}
|
|
184
185
|
</Text>
|
|
@@ -141,14 +141,14 @@ const IdCardOverlay = ({ xMin: xMinProps, yMin: yMinProps, xMax: xMaxProps, yMax
|
|
|
141
141
|
|
|
142
142
|
<View style={styles.bottomIntruction}>
|
|
143
143
|
<Text style={styles.bottomTitle}>
|
|
144
|
-
{language === "en" ? "
|
|
144
|
+
{language === "en" ? "Scan the ${stepperProps?.side === 'front' ? 'front' : 'back'} side of your ${stepperProps?.selectedDocumentType}.":`Scanner de la face ${stepperProps?.side === 'front' ? 'avant' : 'arrière'} de votre ${stepperProps?.selectedDocumentType}.`}
|
|
145
145
|
|
|
146
146
|
</Text>
|
|
147
147
|
<Text style={styles.bottomSubtitle}>
|
|
148
148
|
{
|
|
149
149
|
language === "en"
|
|
150
|
-
? "
|
|
151
|
-
: "
|
|
150
|
+
? "Hold your ID card steady and make sure all corners are visible. Do not move your phone while the image is being captured."
|
|
151
|
+
: "Maintenez votre carte d'identité stable et assurez-vous que tous les coins sont visibles. Ne déplacez pas votre téléphone pendant la capture."
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
</Text>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StyleSheet, View, TouchableOpacity, Text } from "react-native";
|
|
2
|
+
import useI18n from "../../hooks/useI18n";
|
|
2
3
|
|
|
3
4
|
interface StepOverlayProps {
|
|
4
5
|
back: () => void;
|
|
@@ -7,6 +8,7 @@ interface StepOverlayProps {
|
|
|
7
8
|
totalSteps: number;
|
|
8
9
|
}
|
|
9
10
|
const StepOverlay = ({ back, selectedDocumentType, step, totalSteps }: StepOverlayProps) => {
|
|
11
|
+
const { t } = useI18n();
|
|
10
12
|
return (
|
|
11
13
|
<View style={styles.stepperContainer}>
|
|
12
14
|
<TouchableOpacity onPress={back} style={styles.back}>
|
|
@@ -16,7 +18,7 @@ const StepOverlay = ({ back, selectedDocumentType, step, totalSteps }: StepOverl
|
|
|
16
18
|
<Text style={styles.stepperItemText}>{selectedDocumentType}</Text>
|
|
17
19
|
</View>
|
|
18
20
|
<View style={styles.stepperDetails}>
|
|
19
|
-
<Text style={styles.stepperDetailsText}>
|
|
21
|
+
<Text style={styles.stepperDetailsText}>{t('kyc.step', { current: step, total: totalSteps })}</Text>
|
|
20
22
|
</View>
|
|
21
23
|
</View>
|
|
22
24
|
)
|