@transfergratis/react-native-sdk 0.1.22 → 0.1.24
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/android/src/main/AndroidManifest.xml +9 -4
- package/build/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.js +26 -3
- package/build/components/EnhancedCameraView.js.map +1 -1
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.web.js +21 -0
- package/build/components/EnhancedCameraView.web.js.map +1 -1
- package/build/components/KYCElements/CameraCapture.d.ts.map +1 -1
- package/build/components/KYCElements/CameraCapture.js +4 -3
- package/build/components/KYCElements/CameraCapture.js.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts +5 -2
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.js +360 -101
- package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
- package/build/components/KYCElements/FileUpload.d.ts.map +1 -1
- package/build/components/KYCElements/FileUpload.js +5 -4
- package/build/components/KYCElements/FileUpload.js.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.js +5 -4
- package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +193 -237
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/LocationCaptureTemplate.js +78 -37
- package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.js +3 -2
- package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js +3 -2
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js +3 -2
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
- package/build/components/KYCElements/SelfieCapture.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCapture.js +4 -3
- package/build/components/KYCElements/SelfieCapture.js.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.js +182 -39
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/WelcomeTemplate.d.ts +12 -0
- package/build/components/KYCElements/WelcomeTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/WelcomeTemplate.js +243 -0
- package/build/components/KYCElements/WelcomeTemplate.js.map +1 -0
- package/build/components/TemplateKYCExample.d.ts +4 -2
- package/build/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/components/TemplateKYCExample.js +5 -68
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts +2 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.js +95 -9
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/components/example/DynamicTemplateExample.d.ts +10 -0
- package/build/components/example/DynamicTemplateExample.d.ts.map +1 -0
- package/build/components/example/DynamicTemplateExample.js +241 -0
- package/build/components/example/DynamicTemplateExample.js.map +1 -0
- package/build/config/allowedDomains.d.ts +30 -0
- package/build/config/allowedDomains.d.ts.map +1 -0
- package/build/config/allowedDomains.js +127 -0
- package/build/config/allowedDomains.js.map +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +68 -43
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/hooks/useTemplateLoader.d.ts +14 -0
- package/build/hooks/useTemplateLoader.d.ts.map +1 -0
- package/build/hooks/useTemplateLoader.js +85 -0
- package/build/hooks/useTemplateLoader.js.map +1 -0
- package/build/i18n/en/index.d.ts +9 -0
- package/build/i18n/en/index.d.ts.map +1 -1
- package/build/i18n/en/index.js +9 -0
- package/build/i18n/en/index.js.map +1 -1
- package/build/i18n/fr/index.d.ts +9 -0
- package/build/i18n/fr/index.d.ts.map +1 -1
- package/build/i18n/fr/index.js +9 -0
- package/build/i18n/fr/index.js.map +1 -1
- package/build/index.d.ts +5 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +8 -0
- package/build/index.js.map +1 -1
- package/build/modules/api/CardAuthentification.js +1 -0
- package/build/modules/api/CardAuthentification.js.map +1 -1
- package/build/modules/api/KYCService.d.ts +4 -1
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +17 -5
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/modules/api/TemplateService.d.ts +45 -0
- package/build/modules/api/TemplateService.d.ts.map +1 -0
- package/build/modules/api/TemplateService.js +145 -0
- package/build/modules/api/TemplateService.js.map +1 -0
- package/build/modules/api/types.d.ts +1 -0
- package/build/modules/api/types.d.ts.map +1 -1
- package/build/modules/api/types.js.map +1 -1
- package/build/types/KYC.types.d.ts +144 -4
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js +15 -0
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/cropByObb.d.ts +1 -0
- package/build/utils/cropByObb.d.ts.map +1 -1
- package/build/utils/cropByObb.js +70 -0
- package/build/utils/cropByObb.js.map +1 -1
- package/build/utils/platformAlert.d.ts +20 -0
- package/build/utils/platformAlert.d.ts.map +1 -0
- package/build/utils/platformAlert.js +67 -0
- package/build/utils/platformAlert.js.map +1 -0
- package/build/utils/template-transformer.d.ts +10 -0
- package/build/utils/template-transformer.d.ts.map +1 -0
- package/build/utils/template-transformer.js +353 -0
- package/build/utils/template-transformer.js.map +1 -0
- package/build/web/WebKYCEntry.d.ts.map +1 -1
- package/build/web/WebKYCEntry.js +102 -20
- package/build/web/WebKYCEntry.js.map +1 -1
- package/package.json +1 -1
- package/src/components/EnhancedCameraView.tsx +31 -2
- package/src/components/EnhancedCameraView.web.tsx +24 -0
- package/src/components/KYCElements/CameraCapture.tsx +4 -3
- package/src/components/KYCElements/CountrySelectionTemplate.tsx +410 -113
- package/src/components/KYCElements/FileUpload.tsx +5 -4
- package/src/components/KYCElements/FileUploadTemplate.tsx +5 -4
- package/src/components/KYCElements/IDCardCapture.tsx +196 -254
- package/src/components/KYCElements/LocationCaptureTemplate.tsx +95 -44
- package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
- package/src/components/KYCElements/SelfieCapture.tsx +4 -3
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +195 -41
- package/src/components/KYCElements/WelcomeTemplate.tsx +289 -0
- package/src/components/TemplateKYCExample.tsx +16 -71
- package/src/components/TemplateKYCFlowRefactored.tsx +121 -11
- package/src/components/example/DynamicTemplateExample.tsx +289 -0
- package/src/config/allowedDomains.ts +152 -0
- package/src/hooks/useTemplateKYCFlow.tsx +71 -46
- package/src/hooks/useTemplateLoader.ts +102 -0
- package/src/i18n/en/index.ts +10 -0
- package/src/i18n/fr/index.ts +9 -0
- package/src/index.ts +11 -0
- package/src/modules/api/CardAuthentification.ts +1 -1
- package/src/modules/api/KYCService.ts +18 -8
- package/src/modules/api/TemplateService.ts +167 -0
- package/src/modules/api/types.ts +1 -0
- package/src/types/KYC.types.ts +188 -3
- package/src/utils/cropByObb.ts +83 -3
- package/src/utils/platformAlert.ts +85 -0
- package/src/utils/template-transformer.ts +433 -0
- package/src/web/WebKYCEntry.tsx +122 -24
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useState, useCallback, useRef } from 'react';
|
|
2
|
+
import templateService from '../modules/api/TemplateService';
|
|
3
|
+
import { transformBackendTemplateToSDK, validateTransformedTemplate } from '../utils/template-transformer';
|
|
4
|
+
import { logger } from '../utils/logger';
|
|
5
|
+
import { authentification } from '../modules/api/KYCService';
|
|
6
|
+
/**
|
|
7
|
+
* Hook to load and transform templates from the backend API
|
|
8
|
+
*/
|
|
9
|
+
export function useTemplateLoader() {
|
|
10
|
+
const [template, setTemplate] = useState(null);
|
|
11
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
12
|
+
const [error, setError] = useState(null);
|
|
13
|
+
const currentTemplateIdRef = useRef(null);
|
|
14
|
+
const currentApiKeyRef = useRef(undefined);
|
|
15
|
+
/**
|
|
16
|
+
* Load a template by ID
|
|
17
|
+
*/
|
|
18
|
+
const loadTemplate = useCallback(async (templateId, apiKey) => {
|
|
19
|
+
// Reset state
|
|
20
|
+
setError(null);
|
|
21
|
+
setIsLoading(true);
|
|
22
|
+
currentTemplateIdRef.current = templateId;
|
|
23
|
+
currentApiKeyRef.current = apiKey;
|
|
24
|
+
try {
|
|
25
|
+
logger.log(`Loading template: ${templateId}`);
|
|
26
|
+
// Get token if no API key provided
|
|
27
|
+
let token;
|
|
28
|
+
if (!apiKey) {
|
|
29
|
+
try {
|
|
30
|
+
token = await authentification();
|
|
31
|
+
}
|
|
32
|
+
catch (authError) {
|
|
33
|
+
logger.error('Authentication failed:', authError);
|
|
34
|
+
throw new Error('Failed to authenticate. Please provide a valid API key.');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Fetch template from backend
|
|
38
|
+
const backendTemplate = await templateService.fetchTemplate(templateId, apiKey, token);
|
|
39
|
+
// Transform to SDK format
|
|
40
|
+
const transformedTemplate = transformBackendTemplateToSDK(backendTemplate);
|
|
41
|
+
// Validate transformed template
|
|
42
|
+
if (!validateTransformedTemplate(transformedTemplate)) {
|
|
43
|
+
throw new Error('Transformed template validation failed');
|
|
44
|
+
}
|
|
45
|
+
// Set the template
|
|
46
|
+
setTemplate(transformedTemplate);
|
|
47
|
+
logger.log(`Template loaded successfully: ${templateId}`);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
const errorMessage = err.message || 'Failed to load template';
|
|
51
|
+
logger.error(`Error loading template ${templateId}:`, errorMessage);
|
|
52
|
+
setError(errorMessage);
|
|
53
|
+
setTemplate(null);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
setIsLoading(false);
|
|
57
|
+
}
|
|
58
|
+
}, []);
|
|
59
|
+
/**
|
|
60
|
+
* Refresh the current template
|
|
61
|
+
*/
|
|
62
|
+
const refresh = useCallback(() => {
|
|
63
|
+
if (currentTemplateIdRef.current) {
|
|
64
|
+
// Clear cache for this template
|
|
65
|
+
templateService.clearCache(currentTemplateIdRef.current);
|
|
66
|
+
// Reload template
|
|
67
|
+
loadTemplate(currentTemplateIdRef.current, currentApiKeyRef.current);
|
|
68
|
+
}
|
|
69
|
+
}, [loadTemplate]);
|
|
70
|
+
/**
|
|
71
|
+
* Clear error state
|
|
72
|
+
*/
|
|
73
|
+
const clearError = useCallback(() => {
|
|
74
|
+
setError(null);
|
|
75
|
+
}, []);
|
|
76
|
+
return {
|
|
77
|
+
template,
|
|
78
|
+
isLoading,
|
|
79
|
+
error,
|
|
80
|
+
loadTemplate,
|
|
81
|
+
refresh,
|
|
82
|
+
clearError,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=useTemplateLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTemplateLoader.js","sourceRoot":"","sources":["../../src/hooks/useTemplateLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC3G,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B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["import { useState, useCallback, useRef } from 'react';\nimport { KYCTemplate } from '../types/KYC.types';\nimport templateService from '../modules/api/TemplateService';\nimport { transformBackendTemplateToSDK, validateTransformedTemplate } from '../utils/template-transformer';\nimport { logger } from '../utils/logger';\nimport { authentification } from '../modules/api/KYCService';\n\nexport interface UseTemplateLoaderReturn {\n template: KYCTemplate | null;\n isLoading: boolean;\n error: string | null;\n loadTemplate: (templateId: string, apiKey?: string) => Promise<void>;\n refresh: () => void;\n clearError: () => void;\n}\n\n/**\n * Hook to load and transform templates from the backend API\n */\nexport function useTemplateLoader(): UseTemplateLoaderReturn {\n const [template, setTemplate] = useState<KYCTemplate | null>(null);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [error, setError] = useState<string | null>(null);\n const currentTemplateIdRef = useRef<string | null>(null);\n const currentApiKeyRef = useRef<string | undefined>(undefined);\n\n /**\n * Load a template by ID\n */\n const loadTemplate = useCallback(async (templateId: string, apiKey?: string) => {\n // Reset state\n setError(null);\n setIsLoading(true);\n currentTemplateIdRef.current = templateId;\n currentApiKeyRef.current = apiKey;\n\n try {\n logger.log(`Loading template: ${templateId}`);\n\n // Get token if no API key provided\n let token: string | undefined;\n if (!apiKey) {\n try {\n token = await authentification();\n } catch (authError) {\n logger.error('Authentication failed:', authError);\n throw new Error('Failed to authenticate. Please provide a valid API key.');\n }\n }\n\n // Fetch template from backend\n const backendTemplate = await templateService.fetchTemplate(templateId, apiKey, token);\n\n // Transform to SDK format\n const transformedTemplate = transformBackendTemplateToSDK(backendTemplate);\n\n // Validate transformed template\n if (!validateTransformedTemplate(transformedTemplate)) {\n throw new Error('Transformed template validation failed');\n }\n\n // Set the template\n setTemplate(transformedTemplate);\n logger.log(`Template loaded successfully: ${templateId}`);\n } catch (err: any) {\n const errorMessage = err.message || 'Failed to load template';\n logger.error(`Error loading template ${templateId}:`, errorMessage);\n setError(errorMessage);\n setTemplate(null);\n } finally {\n setIsLoading(false);\n }\n }, []);\n\n /**\n * Refresh the current template\n */\n const refresh = useCallback(() => {\n if (currentTemplateIdRef.current) {\n // Clear cache for this template\n templateService.clearCache(currentTemplateIdRef.current);\n // Reload template\n loadTemplate(currentTemplateIdRef.current, currentApiKeyRef.current);\n }\n }, [loadTemplate]);\n\n /**\n * Clear error state\n */\n const clearError = useCallback(() => {\n setError(null);\n }, []);\n\n return {\n template,\n isLoading,\n error,\n loadTemplate,\n refresh,\n clearError,\n };\n}"]}
|
package/build/i18n/en/index.d.ts
CHANGED
|
@@ -26,6 +26,15 @@ export declare const en: {
|
|
|
26
26
|
requirements: string;
|
|
27
27
|
requirementsList: string[];
|
|
28
28
|
};
|
|
29
|
+
welcome: {
|
|
30
|
+
requirements: string;
|
|
31
|
+
estimatedTime: string;
|
|
32
|
+
consent: string;
|
|
33
|
+
privacyPolicy: string;
|
|
34
|
+
termsOfService: string;
|
|
35
|
+
marketingConsent: string;
|
|
36
|
+
readMore: string;
|
|
37
|
+
};
|
|
29
38
|
locationCapture: {
|
|
30
39
|
title: string;
|
|
31
40
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuOd,CAAC"}
|
package/build/i18n/en/index.js
CHANGED
|
@@ -33,6 +33,15 @@ export const en = {
|
|
|
33
33
|
'Stable internet connection'
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
|
+
welcome: {
|
|
37
|
+
requirements: 'What you\'ll need:',
|
|
38
|
+
estimatedTime: 'Estimated time:',
|
|
39
|
+
consent: 'Please accept the following:',
|
|
40
|
+
privacyPolicy: 'I agree to the Privacy Policy',
|
|
41
|
+
termsOfService: 'I agree to the Terms of Service',
|
|
42
|
+
marketingConsent: 'I agree to receive marketing communications',
|
|
43
|
+
readMore: 'Read more'
|
|
44
|
+
},
|
|
36
45
|
// Location Capture
|
|
37
46
|
locationCapture: {
|
|
38
47
|
title: 'Secure Your Verification',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,aAAa;KACpB;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,iDAAiD;QAC3D,IAAI,EAAE,6BAA6B;QAEnC,iBAAiB;QACjB,cAAc,EAAE;YACd,KAAK,EAAE,kCAAkC;YACzC,WAAW,EAAE,iFAAiF;YAC9F,WAAW,EAAE,oBAAoB;YACjC,YAAY,EAAE,oBAAoB;YAClC,gBAAgB,EAAE;gBAChB,4BAA4B;gBAC5B,0BAA0B;gBAC1B,4BAA4B;aAC7B;SACF;QAED,mBAAmB;QACnB,eAAe,EAAE;YACf,KAAK,EAAE,0BAA0B;YACjC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/B,YAAY,EAAE,mBAAmB;QACjC,oBAAoB,EAAE,yBAAyB;KAChD;CACF,CAAC","sourcesContent":["export const en = {\n // Common UI elements\n common: {\n next: 'Next',\n previous: 'Previous',\n continue: 'Continue',\n cancel: 'Cancel',\n confirm: 'Confirm',\n submit: 'Submit',\n retry: 'Retry',\n close: 'Close',\n back: 'Back',\n loading: 'Loading...',\n error: 'Error',\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Identity Verification',\n subtitle: 'Complete your identity verification to continue',\n step: 'Step %{current} of %{total}',\n \n // Initialization\n initialization: {\n title: 'Welcome to Identity Verification',\n description: 'We need to verify your identity to comply with regulations and ensure security.',\n startButton: 'Start Verification',\n requirements: 'What you\\'ll need:',\n requirementsList: [\n 'Valid government-issued ID',\n 'Good lighting for photos',\n 'Stable internet connection'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Secure Your Verification',\n description: 'Allow location access to help us protect your account and prevent fraudulent activity during verification.',\n howThisHelps: 'How this helps:',\n howThisHelpsList: '• Verifies your device location matches your identity\\n• Detects and prevents unauthorized access\\n• Ensures compliance with security regulations',\n permissionDeniedTitle: 'Permission denied',\n permissionDeniedMessage: 'Location permission is required to continue.',\n locationDisabledTitle: 'Location disabled',\n locationDisabledMessage: 'Please enable location services on your device to continue.',\n errorTitle: 'Error',\n errorMessage: 'Unable to retrieve your location. Please try again.',\n obtained: 'Location obtained',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Accuracy',\n resetButton: 'Reset',\n enableButton: 'Enable Location Access',\n fetching: 'Fetching...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Select Your Country',\n subtitle: 'Choose the country that issued your ID document',\n searchPlaceholder: 'Search for your country...',\n noResults: 'No countries found',\n selectCountry: 'Select Country'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capture Your ID Document',\n subtitle: 'Take a clear photo of your ID document',\n frontSide: 'Front Side',\n backSide: 'Back Side',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Place your ID on a flat surface',\n 'Ensure good lighting',\n 'Keep the entire document in frame',\n 'Avoid glare and shadows'\n ]\n },\n captureButton: 'Capture Photo',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing image...',\n success: 'ID captured successfully',\n error: 'Failed to capture ID. Please try again.',\n captureTitle: '%{side} side of your government document',\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Take a Selfie',\n subtitle: 'Take a clear selfie for identity verification',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Look directly at the camera',\n 'Ensure good lighting on your face',\n 'Remove glasses and hats',\n 'Keep a neutral expression'\n ]\n },\n captureButton: 'Take Selfie',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing selfie...',\n success: 'Selfie captured successfully',\n error: 'Failed to capture selfie. Please try again.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Upload Document',\n subtitle: 'Upload a clear photo of your document',\n selectFile: 'Select File',\n uploadButton: 'Upload',\n dragDropText: 'Drag and drop your file here, or click to select',\n supportedFormats: 'Supported formats: JPG, PNG, PDF',\n maxSize: 'Max file size: 10MB',\n processing: 'Processing file...',\n success: 'File uploaded successfully',\n error: 'Failed to upload file. Please try again.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Verifying Your Identity',\n subtitle: 'Please wait while we verify your information',\n steps: {\n analyzing: 'Analyzing documents...',\n extracting: 'Extracting information...',\n verifying: 'Verifying identity...',\n complete: 'Verification complete'\n },\n retrying: 'Retrying ( %{current} / %{max} )',\n estimatedTime: 'Estimated time: 2-3 minutes',\n status: {\n pending: 'Pending',\n processing: 'Processing',\n completed: 'Completed',\n failed: 'Failed',\n retry: 'Retry'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Review Your Information',\n subtitle: 'Please review the information we extracted',\n personalInfo: 'Personal Information',\n documentInfo: 'Document Information',\n editButton: 'Edit',\n submitButton: 'Submit for Verification',\n confirmMessage: 'Are you sure you want to submit this information?',\n processing: 'Submitting...',\n success: 'Information submitted successfully',\n error: 'Failed to submit information. Please try again.',\n selfieSide: {\n center: 'Center',\n right: 'Right',\n left: 'Left'\n }\n },\n\n // Cancel Confirmation\n cancelConfirmation: {\n title: 'Are you sure you want to cancel?',\n message: 'You will lose all your progress.',\n cancelButton: 'Cancel',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Camera Permission Required',\n permissionMessage: 'We need access to your camera to capture your ID and selfie.',\n permissionButton: 'Grant Permission',\n settingsButton: 'Open Settings',\n notAvailable: 'Camera not available',\n switchCamera: 'Switch Camera',\n flashOn: 'Flash On',\n flashOff: 'Flash Off',\n capturePhoto: 'Capture Photo',\n processing: 'Processing...',\n permissionRequired: 'Camera permission required. Please grant permission to continue.',\n deviceNotAvailable: 'Camera device not available',\n notReady: 'Camera not ready',\n analyzing: 'Analyzing...',\n errorOccurred: 'Camera error occurred',\n failedToCapture: 'Failed to capture photo',\n failedToStartRecording: 'Failed to start video recording',\n failedToStopRecording: 'Failed to stop video recording'\n },\n\n // Errors\n errors: {\n networkError: 'Network error. Please check your connection.',\n serverError: 'Server error. Please try again later.',\n validationError: 'Please check your information and try again.',\n cameraError: 'Camera error. Please try again.',\n fileError: 'File error. Please try again.',\n timeoutError: 'Request timeout. Please try again.',\n unknownError: 'An unknown error occurred. Please try again.'\n },\n\n // Validation messages\n validation: {\n required: 'This field is required',\n invalidEmail: 'Please enter a valid email address',\n invalidPhone: 'Please enter a valid phone number',\n invalidDate: 'Please enter a valid date',\n minLength: 'Must be at least %{min} characters',\n maxLength: 'Must be no more than %{max} characters',\n invalidFormat: 'Invalid format',\n fileTooLarge: 'File is too large',\n fileTypeNotSupported: 'File type not supported'\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EA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AAE,IAAI;SACpB;KACF;IAED,mBAAmB;IACnB,MAAM,EAAE;QACN,eAAe,EAAE,4BAA4B;QAC7C,iBAAiB,EAAE,8DAA8D;QACjF,gBAAgB,EAAE,kBAAkB;QACpC,cAAc,EAAE,eAAe;QAC/B,YAAY,EAAE,sBAAsB;QACpC,YAAY,EAAE,eAAe;QAC7B,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,eAAe;QAC3B,kBAAkB,EAAE,kEAAkE;QACtF,kBAAkB,EAAE,6BAA6B;QACjD,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,uBAAuB;QACtC,eAAe,EAAE,yBAAyB;QAC1C,sBAAsB,EAAE,iCAAiC;QACzD,qBAAqB,EAAE,gCAAgC;KACxD;IAED,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,8CAA8C;QAC5D,WAAW,EAAE,uCAAuC;QACpD,eAAe,EAAE,8CAA8C;QAC/D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,+BAA+B;QAC1C,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,8CAA8C;KAC7D;IAED,sBAAsB;IACtB,UAAU,EAAE;QACV,QAAQ,EAAE,wBAAwB;QAClC,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,mCAAmC;QACjD,WAAW,EAAE,2BAA2B;QACxC,SAAS,EAAE,oCAAoC;QAC/C,SAAS,EAAE,wCAAwC;QACnD,aAAa,EAAE,gBAAgB;QAC/B,YAAY,EAAE,mBAAmB;QACjC,oBAAoB,EAAE,yBAAyB;KAChD;CACF,CAAC","sourcesContent":["export const en = {\n // Common UI elements\n common: {\n next: 'Next',\n previous: 'Previous',\n continue: 'Continue',\n cancel: 'Cancel',\n confirm: 'Confirm',\n submit: 'Submit',\n retry: 'Retry',\n close: 'Close',\n back: 'Back',\n loading: 'Loading...',\n error: 'Error',\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Identity Verification',\n subtitle: 'Complete your identity verification to continue',\n step: 'Step %{current} of %{total}',\n \n // Initialization\n initialization: {\n title: 'Welcome to Identity Verification',\n description: 'We need to verify your identity to comply with regulations and ensure security.',\n startButton: 'Start Verification',\n requirements: 'What you\\'ll need:',\n requirementsList: [\n 'Valid government-issued ID',\n 'Good lighting for photos',\n 'Stable internet connection'\n ]\n },\n\n welcome: {\n requirements: 'What you\\'ll need:',\n estimatedTime: 'Estimated time:',\n consent: 'Please accept the following:',\n privacyPolicy: 'I agree to the Privacy Policy',\n termsOfService: 'I agree to the Terms of Service',\n marketingConsent: 'I agree to receive marketing communications',\n readMore: 'Read more'\n },\n\n // Location Capture\n locationCapture: {\n title: 'Secure Your Verification',\n description: 'Allow location access to help us protect your account and prevent fraudulent activity during verification.',\n howThisHelps: 'How this helps:',\n howThisHelpsList: '• Verifies your device location matches your identity\\n• Detects and prevents unauthorized access\\n• Ensures compliance with security regulations',\n permissionDeniedTitle: 'Permission denied',\n permissionDeniedMessage: 'Location permission is required to continue.',\n locationDisabledTitle: 'Location disabled',\n locationDisabledMessage: 'Please enable location services on your device to continue.',\n errorTitle: 'Error',\n errorMessage: 'Unable to retrieve your location. Please try again.',\n obtained: 'Location obtained',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Accuracy',\n resetButton: 'Reset',\n enableButton: 'Enable Location Access',\n fetching: 'Fetching...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Select Your Country',\n subtitle: 'Choose the country that issued your ID document',\n searchPlaceholder: 'Search for your country...',\n noResults: 'No countries found',\n selectCountry: 'Select Country'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capture Your ID Document',\n subtitle: 'Take a clear photo of your ID document',\n frontSide: 'Front Side',\n backSide: 'Back Side',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Place your ID on a flat surface',\n 'Ensure good lighting',\n 'Keep the entire document in frame',\n 'Avoid glare and shadows'\n ]\n },\n captureButton: 'Capture Photo',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing image...',\n success: 'ID captured successfully',\n error: 'Failed to capture ID. Please try again.',\n captureTitle: '%{side} side of your government document',\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Take a Selfie',\n subtitle: 'Take a clear selfie for identity verification',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Look directly at the camera',\n 'Ensure good lighting on your face',\n 'Remove glasses and hats',\n 'Keep a neutral expression'\n ]\n },\n captureButton: 'Take Selfie',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing selfie...',\n success: 'Selfie captured successfully',\n error: 'Failed to capture selfie. Please try again.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Upload Document',\n subtitle: 'Upload a clear photo of your document',\n selectFile: 'Select File',\n uploadButton: 'Upload',\n dragDropText: 'Drag and drop your file here, or click to select',\n supportedFormats: 'Supported formats: JPG, PNG, PDF',\n maxSize: 'Max file size: 10MB',\n processing: 'Processing file...',\n success: 'File uploaded successfully',\n error: 'Failed to upload file. Please try again.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Verifying Your Identity',\n subtitle: 'Please wait while we verify your information',\n steps: {\n analyzing: 'Analyzing documents...',\n extracting: 'Extracting information...',\n verifying: 'Verifying identity...',\n complete: 'Verification complete'\n },\n retrying: 'Retrying ( %{current} / %{max} )',\n estimatedTime: 'Estimated time: 2-3 minutes',\n status: {\n pending: 'Pending',\n processing: 'Processing',\n completed: 'Completed',\n failed: 'Failed',\n retry: 'Retry'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Review Your Information',\n subtitle: 'Please review the information we extracted',\n personalInfo: 'Personal Information',\n documentInfo: 'Document Information',\n editButton: 'Edit',\n submitButton: 'Submit for Verification',\n confirmMessage: 'Are you sure you want to submit this information?',\n processing: 'Submitting...',\n success: 'Information submitted successfully',\n error: 'Failed to submit information. Please try again.',\n selfieSide: {\n center: 'Center',\n right: 'Right',\n left: 'Left'\n }\n },\n\n // Cancel Confirmation\n cancelConfirmation: {\n title: 'Are you sure you want to cancel?',\n message: 'You will lose all your progress.',\n cancelButton: 'Cancel',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Camera Permission Required',\n permissionMessage: 'We need access to your camera to capture your ID and selfie.',\n permissionButton: 'Grant Permission',\n settingsButton: 'Open Settings',\n notAvailable: 'Camera not available',\n switchCamera: 'Switch Camera',\n flashOn: 'Flash On',\n flashOff: 'Flash Off',\n capturePhoto: 'Capture Photo',\n processing: 'Processing...',\n permissionRequired: 'Camera permission required. Please grant permission to continue.',\n deviceNotAvailable: 'Camera device not available',\n notReady: 'Camera not ready',\n analyzing: 'Analyzing...',\n errorOccurred: 'Camera error occurred',\n failedToCapture: 'Failed to capture photo',\n failedToStartRecording: 'Failed to start video recording',\n failedToStopRecording: 'Failed to stop video recording'\n },\n\n // Errors\n errors: {\n networkError: 'Network error. Please check your connection.',\n serverError: 'Server error. Please try again later.',\n validationError: 'Please check your information and try again.',\n cameraError: 'Camera error. Please try again.',\n fileError: 'File error. Please try again.',\n timeoutError: 'Request timeout. Please try again.',\n unknownError: 'An unknown error occurred. Please try again.'\n },\n\n // Validation messages\n validation: {\n required: 'This field is required',\n invalidEmail: 'Please enter a valid email address',\n invalidPhone: 'Please enter a valid phone number',\n invalidDate: 'Please enter a valid date',\n minLength: 'Must be at least %{min} characters',\n maxLength: 'Must be no more than %{max} characters',\n invalidFormat: 'Invalid format',\n fileTooLarge: 'File is too large',\n fileTypeNotSupported: 'File type not supported'\n }\n};\n"]}
|
package/build/i18n/fr/index.d.ts
CHANGED
|
@@ -26,6 +26,15 @@ export declare const fr: {
|
|
|
26
26
|
requirements: string;
|
|
27
27
|
requirementsList: string[];
|
|
28
28
|
};
|
|
29
|
+
welcome: {
|
|
30
|
+
requirements: string;
|
|
31
|
+
estimatedTime: string;
|
|
32
|
+
consent: string;
|
|
33
|
+
privacyPolicy: string;
|
|
34
|
+
termsOfService: string;
|
|
35
|
+
marketingConsent: string;
|
|
36
|
+
readMore: string;
|
|
37
|
+
};
|
|
29
38
|
locationCapture: {
|
|
30
39
|
title: string;
|
|
31
40
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsOd,CAAC"}
|
package/build/i18n/fr/index.js
CHANGED
|
@@ -33,6 +33,15 @@ export const fr = {
|
|
|
33
33
|
'Une connexion internet stable'
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
|
+
welcome: {
|
|
37
|
+
requirements: 'Ce dont vous aurez besoin :',
|
|
38
|
+
estimatedTime: 'Temps estimé :',
|
|
39
|
+
consent: 'Veuillez accepter les suivants :',
|
|
40
|
+
privacyPolicy: 'J\'accepte la Politique de Confidentialité',
|
|
41
|
+
termsOfService: 'J\'accepte les Conditions d\'Utilisation',
|
|
42
|
+
marketingConsent: 'J\'accepte de recevoir des communications marketing',
|
|
43
|
+
readMore: 'Lire plus'
|
|
44
|
+
},
|
|
36
45
|
// Location Capture
|
|
37
46
|
locationCapture: {
|
|
38
47
|
title: 'Sécurisez Votre Vérification',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","source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AgB,EAAE,wBAAwB;QAC1C,cAAc,EAAE,uBAAuB;QACvC,YAAY,EAAE,uBAAuB;QACrC,YAAY,EAAE,mBAAmB;QACjC,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,iBAAiB;QAC3B,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,eAAe;QAC3B,kBAAkB,EAAE,4EAA4E;QAChG,kBAAkB,EAAE,+BAA+B;QACnD,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,2BAA2B;QAC1C,eAAe,EAAE,2BAA2B;QAC5C,sBAAsB,EAAE,+CAA+C;QACvE,qBAAqB,EAAE,8CAA8C;KACtE;IAED,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,+CAA+C;QAC5D,eAAe,EAAE,kDAAkD;QACnE,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE,qCAAqC;QAChD,YAAY,EAAE,+CAA+C;QAC7D,YAAY,EAAE,0DAA0D;KACzE;IAED,UAAU,EAAE;QACV,QAAQ,EAAE,0BAA0B;QACpC,YAAY,EAAE,0CAA0C;QACxD,YAAY,EAAE,+CAA+C;QAC7D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,uCAAuC;QAClD,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,yBAAyB;QACvC,oBAAoB,EAAE,8BAA8B;KACrD;CAEF,CAAC","sourcesContent":["export const fr = {\n // Common UI elements\n common: {\n next: 'Suivant',\n previous: 'Précédent',\n continue: 'Continuer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n submit: 'Soumettre',\n retry: 'Réessayer',\n close: 'Fermer',\n back: 'Retour',\n loading: 'Chargement...',\n error: 'Erreur',\n success: 'Succès',\n warning: 'Avertissement',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Vérification d\\'Identité',\n subtitle: 'Complétez votre vérification d\\'identité pour continuer',\n step: 'Étape %{current} sur %{total}',\n\n // Initialization\n initialization: {\n title: 'Bienvenue dans la Vérification d\\'Identité',\n description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',\n startButton: 'Commencer la Vérification',\n requirements: 'Ce dont vous aurez besoin :',\n requirementsList: [\n 'Une pièce d\\'identité officielle valide',\n 'Un bon éclairage pour les photos',\n 'Une connexion internet stable'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Sécurisez Votre Vérification',\n description: 'Autorisez l\\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',\n howThisHelps: 'Comment cela aide :',\n howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\\n• Détecte et empêche les accès non autorisés\\n• Garantit la conformité aux réglementations de sécurité',\n permissionDeniedTitle: 'Permission refusée',\n permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',\n locationDisabledTitle: 'Localisation désactivée',\n locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',\n errorTitle: 'Erreur',\n errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',\n obtained: 'Localisation obtenue',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Précision',\n resetButton: 'Réinitialiser',\n enableButton: 'Activer l\\'accès à la localisation',\n fetching: 'Récupération...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Sélectionnez Votre Pays',\n subtitle: 'Choisissez le pays qui a émis votre document d\\'identité',\n searchPlaceholder: 'Recherchez votre pays...',\n noResults: 'Aucun pays trouvé',\n selectCountry: 'Sélectionner le Pays'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capturez Votre Document d\\'Identité',\n subtitle: 'Prenez une photo claire de votre document d\\'identité',\n frontSide: 'Face Avant',\n backSide: 'Face Arrière',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Placez votre pièce d\\'identité sur une surface plane',\n 'Assurez-vous d\\'un bon éclairage',\n 'Gardez tout le document dans le cadre',\n 'Évitez les reflets et les ombres'\n ]\n },\n captureButton: 'Prendre la Photo',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement de l\\'image...',\n success: 'Document d\\'identité capturé avec succès',\n error: 'Échec de la capture du document. Veuillez réessayer.',\n captureTitle: '%{side} de votre document d\\'identité',\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Prenez un Selfie',\n subtitle: 'Prenez un selfie clair pour la vérification d\\'identité',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Regardez directement la caméra',\n 'Assurez-vous d\\'un bon éclairage sur votre visage',\n 'Retirez les lunettes et les chapeaux',\n 'Gardez une expression neutre'\n ]\n },\n captureButton: 'Prendre le Selfie',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement du selfie...',\n success: 'Selfie capturé avec succès',\n error: 'Échec de la capture du selfie. Veuillez réessayer.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Télécharger le Document',\n subtitle: 'Téléchargez une photo claire de votre document',\n selectFile: 'Sélectionner le Fichier',\n uploadButton: 'Télécharger',\n dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',\n supportedFormats: 'Formats supportés : JPG, PNG, PDF',\n maxSize: 'Taille maximale : 10MB',\n processing: 'Traitement du fichier...',\n success: 'Fichier téléchargé avec succès',\n error: 'Échec du téléchargement. Veuillez réessayer.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Vérification de Votre Identité',\n subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',\n steps: {\n analyzing: 'Analyse des documents...',\n extracting: 'Extraction des informations...',\n verifying: 'Vérification de l\\'identité...',\n complete: 'Vérification terminée'\n },\n retrying: 'Réessayer ( %{current}/ %{max} )',\n estimatedTime: 'Temps estimé : 2-3 minutes',\n status: {\n pending: 'En attente',\n processing: 'En cours',\n completed: 'Terminé',\n failed: 'Échoué',\n retry: 'Réessayer'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Vérifiez Vos Informations',\n subtitle: 'Veuillez vérifier les informations que nous avons extraites',\n personalInfo: 'Informations Personnelles',\n documentInfo: 'Informations du Document',\n editButton: 'Modifier',\n submitButton: 'Soumettre pour Vérification',\n confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',\n processing: 'Soumission...',\n success: 'Informations soumises avec succès',\n error: 'Échec de la soumission. Veuillez réessayer.',\n selfieSide: {\n center: 'Face',\n right: 'Droite',\n left: 'Gauche'\n }\n },\n\n // Confirmation d'annulation\n cancelConfirmation: {\n title: 'Êtes-vous sûr de vouloir annuler ?',\n message: 'Vous perdrez tout votre progrès.',\n cancelButton: 'Annuler',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Permission Caméra Requise',\n permissionMessage: 'Nous avons besoin d\\'accéder à votre caméra pour capturer votre pièce d\\'identité et votre selfie.',\n permissionButton: 'Accorder la Permission',\n settingsButton: 'Ouvrir les Paramètres',\n notAvailable: 'Caméra non disponible',\n switchCamera: 'Changer de Caméra',\n flashOn: 'Flash Activé',\n flashOff: 'Flash Désactivé',\n capturePhoto: 'Prendre la Photo',\n processing: 'Traitement...',\n permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',\n deviceNotAvailable: 'Appareil photo non disponible',\n notReady: 'Caméra pas prête',\n analyzing: 'Analyse en cours...',\n errorOccurred: 'Erreur de caméra survenue',\n failedToCapture: 'Échec de la capture photo',\n failedToStartRecording: 'Échec du démarrage de l\\'enregistrement vidéo',\n failedToStopRecording: 'Échec de l\\'arrêt de l\\'enregistrement vidéo'\n },\n\n // Errors\n errors: {\n networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',\n serverError: 'Erreur serveur. Veuillez réessayer plus tard.',\n validationError: 'Veuillez vérifier vos informations et réessayer.',\n cameraError: 'Erreur caméra. Veuillez réessayer.',\n fileError: 'Erreur fichier. Veuillez réessayer.',\n timeoutError: 'Délai d\\'attente dépassé. Veuillez réessayer.',\n unknownError: 'Une erreur inconnue s\\'est produite. Veuillez réessayer.'\n },\n\n validation: {\n required: 'Ce champ est obligatoire',\n invalidEmail: 'Veuillez entrer une adresse email valide',\n invalidPhone: 'Veuillez entrer un numéro de téléphone valide',\n invalidDate: 'Veuillez entrer une date valide',\n minLength: 'Doit contenir au moins {min} caractères',\n maxLength: 'Ne doit pas dépasser {max} caractères',\n invalidFormat: 'Format invalide',\n fileTooLarge: 'Fichier trop volumineux',\n fileTypeNotSupported: 'Type de fichier non supporté'\n }\n\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,aAAa;KACpB;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,yDAAyD;QACnE,IAAI,EAAE,+BAA+B;QAErC,iBAAiB;QACjB,cAAc,EAAE;YACd,KAAK,EAAE,4CAA4C;YACnD,WAAW,EAAE,gGAAgG;YAC7G,WAAW,EAAE,2BAA2B;YACxC,YAAY,EAAE,6BAA6B;YAC3C,gBAAgB,EAAE;gBAChB,yCAAyC;gBACzC,kCAAkC;gBAClC,+BAA+B;aAChC;SACF;QACD,OAAO,EAAE;YACP,YAAY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QAChD,YAAY,EAAE,+CAA+C;QAC7D,YAAY,EAAE,0DAA0D;KACzE;IAED,UAAU,EAAE;QACV,QAAQ,EAAE,0BAA0B;QACpC,YAAY,EAAE,0CAA0C;QACxD,YAAY,EAAE,+CAA+C;QAC7D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,uCAAuC;QAClD,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,yBAAyB;QACvC,oBAAoB,EAAE,8BAA8B;KACrD;CAEF,CAAC","sourcesContent":["export const fr = {\n // Common UI elements\n common: {\n next: 'Suivant',\n previous: 'Précédent',\n continue: 'Continuer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n submit: 'Soumettre',\n retry: 'Réessayer',\n close: 'Fermer',\n back: 'Retour',\n loading: 'Chargement...',\n error: 'Erreur',\n success: 'Succès',\n warning: 'Avertissement',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Vérification d\\'Identité',\n subtitle: 'Complétez votre vérification d\\'identité pour continuer',\n step: 'Étape %{current} sur %{total}',\n\n // Initialization\n initialization: {\n title: 'Bienvenue dans la Vérification d\\'Identité',\n description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',\n startButton: 'Commencer la Vérification',\n requirements: 'Ce dont vous aurez besoin :',\n requirementsList: [\n 'Une pièce d\\'identité officielle valide',\n 'Un bon éclairage pour les photos',\n 'Une connexion internet stable'\n ]\n },\n welcome: {\n requirements: 'Ce dont vous aurez besoin :',\n estimatedTime: 'Temps estimé :',\n consent: 'Veuillez accepter les suivants :',\n privacyPolicy: 'J\\'accepte la Politique de Confidentialité',\n termsOfService: 'J\\'accepte les Conditions d\\'Utilisation',\n marketingConsent: 'J\\'accepte de recevoir des communications marketing',\n readMore: 'Lire plus'\n },\n\n // Location Capture\n locationCapture: {\n title: 'Sécurisez Votre Vérification',\n description: 'Autorisez l\\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',\n howThisHelps: 'Comment cela aide :',\n howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\\n• Détecte et empêche les accès non autorisés\\n• Garantit la conformité aux réglementations de sécurité',\n permissionDeniedTitle: 'Permission refusée',\n permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',\n locationDisabledTitle: 'Localisation désactivée',\n locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',\n errorTitle: 'Erreur',\n errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',\n obtained: 'Localisation obtenue',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Précision',\n resetButton: 'Réinitialiser',\n enableButton: 'Activer l\\'accès à la localisation',\n fetching: 'Récupération...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Sélectionnez Votre Pays',\n subtitle: 'Choisissez le pays qui a émis votre document d\\'identité',\n searchPlaceholder: 'Recherchez votre pays...',\n noResults: 'Aucun pays trouvé',\n selectCountry: 'Sélectionner le Pays'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capturez Votre Document d\\'Identité',\n subtitle: 'Prenez une photo claire de votre document d\\'identité',\n frontSide: 'Face Avant',\n backSide: 'Face Arrière',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Placez votre pièce d\\'identité sur une surface plane',\n 'Assurez-vous d\\'un bon éclairage',\n 'Gardez tout le document dans le cadre',\n 'Évitez les reflets et les ombres'\n ]\n },\n captureButton: 'Prendre la Photo',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement de l\\'image...',\n success: 'Document d\\'identité capturé avec succès',\n error: 'Échec de la capture du document. Veuillez réessayer.',\n captureTitle: '%{side} de votre document d\\'identité',\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Prenez un Selfie',\n subtitle: 'Prenez un selfie clair pour la vérification d\\'identité',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Regardez directement la caméra',\n 'Assurez-vous d\\'un bon éclairage sur votre visage',\n 'Retirez les lunettes et les chapeaux',\n 'Gardez une expression neutre'\n ]\n },\n captureButton: 'Prendre le Selfie',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement du selfie...',\n success: 'Selfie capturé avec succès',\n error: 'Échec de la capture du selfie. Veuillez réessayer.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Télécharger le Document',\n subtitle: 'Téléchargez une photo claire de votre document',\n selectFile: 'Sélectionner le Fichier',\n uploadButton: 'Télécharger',\n dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',\n supportedFormats: 'Formats supportés : JPG, PNG, PDF',\n maxSize: 'Taille maximale : 10MB',\n processing: 'Traitement du fichier...',\n success: 'Fichier téléchargé avec succès',\n error: 'Échec du téléchargement. Veuillez réessayer.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Vérification de Votre Identité',\n subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',\n steps: {\n analyzing: 'Analyse des documents...',\n extracting: 'Extraction des informations...',\n verifying: 'Vérification de l\\'identité...',\n complete: 'Vérification terminée'\n },\n retrying: 'Réessayer ( %{current}/ %{max} )',\n estimatedTime: 'Temps estimé : 2-3 minutes',\n status: {\n pending: 'En attente',\n processing: 'En cours',\n completed: 'Terminé',\n failed: 'Échoué',\n retry: 'Réessayer'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Vérifiez Vos Informations',\n subtitle: 'Veuillez vérifier les informations que nous avons extraites',\n personalInfo: 'Informations Personnelles',\n documentInfo: 'Informations du Document',\n editButton: 'Modifier',\n submitButton: 'Soumettre pour Vérification',\n confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',\n processing: 'Soumission...',\n success: 'Informations soumises avec succès',\n error: 'Échec de la soumission. Veuillez réessayer.',\n selfieSide: {\n center: 'Face',\n right: 'Droite',\n left: 'Gauche'\n }\n },\n\n // Confirmation d'annulation\n cancelConfirmation: {\n title: 'Êtes-vous sûr de vouloir annuler ?',\n message: 'Vous perdrez tout votre progrès.',\n cancelButton: 'Annuler',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Permission Caméra Requise',\n permissionMessage: 'Nous avons besoin d\\'accéder à votre caméra pour capturer votre pièce d\\'identité et votre selfie.',\n permissionButton: 'Accorder la Permission',\n settingsButton: 'Ouvrir les Paramètres',\n notAvailable: 'Caméra non disponible',\n switchCamera: 'Changer de Caméra',\n flashOn: 'Flash Activé',\n flashOff: 'Flash Désactivé',\n capturePhoto: 'Prendre la Photo',\n processing: 'Traitement...',\n permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',\n deviceNotAvailable: 'Appareil photo non disponible',\n notReady: 'Caméra pas prête',\n analyzing: 'Analyse en cours...',\n errorOccurred: 'Erreur de caméra survenue',\n failedToCapture: 'Échec de la capture photo',\n failedToStartRecording: 'Échec du démarrage de l\\'enregistrement vidéo',\n failedToStopRecording: 'Échec de l\\'arrêt de l\\'enregistrement vidéo'\n },\n\n // Errors\n errors: {\n networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',\n serverError: 'Erreur serveur. Veuillez réessayer plus tard.',\n validationError: 'Veuillez vérifier vos informations et réessayer.',\n cameraError: 'Erreur caméra. Veuillez réessayer.',\n fileError: 'Erreur fichier. Veuillez réessayer.',\n timeoutError: 'Délai d\\'attente dépassé. Veuillez réessayer.',\n unknownError: 'Une erreur inconnue s\\'est produite. Veuillez réessayer.'\n },\n\n validation: {\n required: 'Ce champ est obligatoire',\n invalidEmail: 'Veuillez entrer une adresse email valide',\n invalidPhone: 'Veuillez entrer un numéro de téléphone valide',\n invalidDate: 'Veuillez entrer une date valide',\n minLength: 'Doit contenir au moins {min} caractères',\n maxLength: 'Ne doit pas dépasser {max} caractères',\n invalidFormat: 'Format invalide',\n fileTooLarge: 'Fichier trop volumineux',\n fileTypeNotSupported: 'Type de fichier non supporté'\n }\n\n};\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export * from './TransfergratisSdk.types';
|
|
2
2
|
export * from './types/KYC.types';
|
|
3
3
|
export { TemplateKYCExample as LauchTransferGratisKYC } from './components/TemplateKYCExample';
|
|
4
|
+
export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';
|
|
5
|
+
export { default as templateService } from './modules/api/TemplateService';
|
|
6
|
+
export { transformBackendTemplateToSDK, validateTransformedTemplate } from './utils/template-transformer';
|
|
7
|
+
export { useTemplateLoader } from './hooks/useTemplateLoader';
|
|
8
|
+
export { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';
|
|
4
9
|
export { WebKYCEntry } from './web';
|
|
5
10
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAI1C,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAI1C,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG/F,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAGzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAG3E,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -2,6 +2,14 @@ export * from './TransfergratisSdk.types';
|
|
|
2
2
|
// Export KYC types
|
|
3
3
|
export * from './types/KYC.types';
|
|
4
4
|
export { TemplateKYCExample as LauchTransferGratisKYC } from './components/TemplateKYCExample';
|
|
5
|
+
// Export Template Flow Components
|
|
6
|
+
export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';
|
|
7
|
+
// Export Template Service and Utilities
|
|
8
|
+
export { default as templateService } from './modules/api/TemplateService';
|
|
9
|
+
export { transformBackendTemplateToSDK, validateTransformedTemplate } from './utils/template-transformer';
|
|
10
|
+
export { useTemplateLoader } from './hooks/useTemplateLoader';
|
|
11
|
+
// Export Template Components
|
|
12
|
+
export { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';
|
|
5
13
|
// Export Web KYC Components
|
|
6
14
|
export { WebKYCEntry } from './web';
|
|
7
15
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAG1C,mBAAmB;AACnB,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export * from './TransfergratisSdk.types';\n\n\n// Export KYC types\nexport * from './types/KYC.types';\n\n\nexport { TemplateKYCExample as LauchTransferGratisKYC } from './components/TemplateKYCExample';\n\n// Export Web KYC Components\nexport { WebKYCEntry } from './web';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAG1C,mBAAmB;AACnB,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,wCAAwC;AACxC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,6BAA6B;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export * from './TransfergratisSdk.types';\n\n\n// Export KYC types\nexport * from './types/KYC.types';\n\n\nexport { TemplateKYCExample as LauchTransferGratisKYC } from './components/TemplateKYCExample';\n\n// Export Template Flow Components\nexport { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';\n\n// Export Template Service and Utilities\nexport { default as templateService } from './modules/api/TemplateService';\nexport { transformBackendTemplateToSDK, validateTransformedTemplate } from './utils/template-transformer';\nexport { useTemplateLoader } from './hooks/useTemplateLoader';\n\n// Export Template Components\nexport { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';\n\n// Export Web KYC Components\nexport { WebKYCEntry } from './web';\n"]}
|
|
@@ -3,6 +3,7 @@ import { cropByObb } from "../../utils/cropByObb";
|
|
|
3
3
|
import { logger } from "../../utils/logger";
|
|
4
4
|
export async function frontVerification(result) {
|
|
5
5
|
try {
|
|
6
|
+
console.log("Front verification START", JSON.stringify({ result }, null, 2));
|
|
6
7
|
logger.log("Front verification", JSON.stringify({ result }, null, 2));
|
|
7
8
|
const token = await authentification();
|
|
8
9
|
const detected = await kycService.detectFaceOnId(result?.path || '', token, result?.selectedDocumentType || '');
|
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ACD,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACvC,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAiC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAExN,MAAM,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,OAAO,YAAY,CAAC;IACxB,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QACd,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxF,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,oCAAoC,CAAC,CAAC;IACxE,CAAC;AACL,CAAC","sourcesContent":["import kycService, { authentification, errorMessage, truncateFields } from \"./KYCService\";\nimport { cropByObb } from \"../../utils/cropByObb\";\nimport { GovernmentDocumentType, IBbox } from \"../../types/KYC.types\";\nimport { logger } from \"../../utils/logger\";\n\nexport async function frontVerification(result: { path?: string, regionMapping: { authMethod: string[], mrzTypes: string[] }, selectedDocumentType: string, code: string, currentSide: string, templatePath?: string, mrzType?: string }) {\n try {\n\n logger.log(\"Front verification\", JSON.stringify({ result }, null, 2));\n const token = await authentification();\n const detected = await kycService.detectFaceOnId(result?.path || '', token, result?.selectedDocumentType || '')\n\n if (!detected.result) {\n throw new Error('Aucun visage détecté sur la carte. Veuillez reprendre.');\n }\n\n // Optional: crop image using card_obb for better MRZ/barcode extraction\n let croppedBase64: string | undefined;\n let bbox: IBbox | undefined;\n let mrz: any | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (detected as any).card_obb);\n croppedBase64 = crop.base64;\n bbox = crop.bbox;\n } catch { }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('MRZ')) {\n\n\n mrz = await kycService.extractMrzText(\n {\n fileUri: result.path || '',\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || \"\",\n postfix: result?.currentSide,\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n })\n\n }\n\n return { ...detected, croppedBase64, bbox, ...(mrz ? { mrz } : {}) };\n } catch (e: any) {\n logger.error('Error front verification:', JSON.stringify(errorMessage(e), null, 2));\n throw new Error(e?.message || 'Erreur de détection du visage');\n }\n}\n\nexport async function backVerification(result: { path?: string, regionMapping: { authMethod: string[], mrzTypes: string[] }, selectedDocumentType: string, code: string, currentSide: string, templatePath?: string, mrzType?: string }) {\n try {\n if (!result.path) throw new Error('No path provided');\n logger.log(\"result.regionMapping\", result.regionMapping, result.currentSide, result.code);\n const token = await authentification();\n\n\n\n // Fonction helper pour essayer MRZ puis barcode en fallback\n const tryMrzWithBarcodeFallback = async () => {\n try {\n\n logger.log(\"Tentative d'extraction MRZ\");\n const mrz = await kycService.extractMrzText({\n fileUri: result.path!,\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || '',\n postfix: 'back',\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n });\n let bbox: IBbox | undefined;\n let croppedBase64: string | undefined;\n\n try {\n const crop = await cropByObb(result?.path || '', (mrz as any).card_obb);\n bbox = crop.bbox;\n croppedBase64 = crop.base64;\n\n } catch { }\n return { ...mrz, bbox, croppedBase64 }\n } catch (mrzError: any) {\n logger.log(\"MRZ échoué, tentative d'extraction barcode\");\n try {\n const barcode = await kycService.extractBarcode({ fileUri: result.path!, token: token });\n return barcode;\n } catch (barcodeError: any) {\n throw new Error(`MRZ et barcode ont échoué. MRZ: ${mrzError?.message}, Barcode: ${barcodeError?.message}`);\n }\n }\n };\n\n\n\n if (result.regionMapping.authMethod.length > 2 && (!result?.mrzType || result?.mrzType.length === 0)) {\n return await tryMrzWithBarcodeFallback();\n }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('MRZ') && result?.mrzType && result?.mrzType.length > 0) {\n try {\n\n let mrz: any | undefined;\n mrz = await kycService.extractMrzText({\n fileUri: result.path!,\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || '',\n postfix: 'back',\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n });\n let bbox: IBbox | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (mrz as any).card_obb);\n bbox = crop.bbox;\n } catch { }\n return { ...mrz, bbox };\n } catch (mrzError: any) {\n throw new Error(`MRZ et barcode ont échoué. MRZ: ${mrzError?.message}, Barcode: ${mrzError?.message}`);\n }\n }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('2D_barcode')) {\n try {\n logger.log(\"Tentative d'extraction barcode\");\n const barcode = await kycService.extractBarcode({ fileUri: result.path!, token: token });\n let bbox: IBbox | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (barcode as any).card_obb);\n bbox = crop.bbox;\n } catch { }\n return { ...barcode, bbox };\n } catch (barcodeError: any) {\n throw new Error(`Barcode et MRZ ont échoué. Barcode: ${barcodeError?.message}, MRZ: ${barcodeError?.message}`);\n }\n }\n return null;\n } catch (e: any) {\n throw new Error(e?.message || 'Erreur de détection du MRZ ou barcode');\n }\n}\n\n/**\n * Check template type\n * @param result \n * @returns \n */\nexport async function checkTemplateType(result: { path?: string, docType: string, docRegion: string, postfix: string }) {\n try {\n const token = await authentification();\n const templateType = await kycService.checkTemplateType({ fileUri: result.path || '', docType: result?.docType as GovernmentDocumentType, docRegion: result?.docRegion || \"\", postfix: result?.postfix, token: token });\n\n logger.log(\"templateType result\", JSON.stringify(truncateFields(templateType), null, 2));\n return templateType;\n } catch (e: any) {\n logger.error('Error checking template type:', JSON.stringify(errorMessage(e), null, 2));\n throw new Error(e?.message || 'Erreur de vérification du template');\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"CardAuthentification.js","sourceRoot":"","sources":["../../../src/modules/api/CardAuthentification.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAgM;IACpO,IAAI,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,IAAI,EAAE,CAAC,CAAA;QAE/G,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC9E,CAAC;QAED,wEAAwE;QACxE,IAAI,aAAiC,CAAC;QACtC,IAAI,IAAuB,CAAC;QAC5B,IAAI,GAAoB,CAAC;QACzB,IAAI,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,EAAG,QAAgB,CAAC,QAAQ,CAAC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AAC,OAAO,CAAM,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,uCAAuC,CAAC,CAAC;IAC3E,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAA8E;IAClH,IAAI,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACvC,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAiC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAExN,MAAM,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,OAAO,YAAY,CAAC;IACxB,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QACd,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxF,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,oCAAoC,CAAC,CAAC;IACxE,CAAC;AACL,CAAC","sourcesContent":["import kycService, { authentification, errorMessage, truncateFields } from \"./KYCService\";\nimport { cropByObb } from \"../../utils/cropByObb\";\nimport { GovernmentDocumentType, IBbox } from \"../../types/KYC.types\";\nimport { logger } from \"../../utils/logger\";\n\nexport async function frontVerification(result: { path?: string, regionMapping: { authMethod: string[], mrzTypes: string[] }, selectedDocumentType: string, code: string, currentSide: string, templatePath?: string, mrzType?: string }) {\n try {\n console.log(\"Front verification START\", JSON.stringify({ result }, null, 2));\n logger.log(\"Front verification\", JSON.stringify({ result }, null, 2));\n const token = await authentification();\n const detected = await kycService.detectFaceOnId(result?.path || '', token, result?.selectedDocumentType || '')\n\n if (!detected.result) {\n throw new Error('Aucun visage détecté sur la carte. Veuillez reprendre.');\n }\n\n // Optional: crop image using card_obb for better MRZ/barcode extraction\n let croppedBase64: string | undefined;\n let bbox: IBbox | undefined;\n let mrz: any | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (detected as any).card_obb);\n croppedBase64 = crop.base64;\n bbox = crop.bbox;\n } catch { }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('MRZ')) {\n\n\n mrz = await kycService.extractMrzText(\n {\n fileUri: result.path || '',\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || \"\",\n postfix: result?.currentSide,\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n })\n\n }\n\n return { ...detected, croppedBase64, bbox, ...(mrz ? { mrz } : {}) };\n } catch (e: any) {\n logger.error('Error front verification:', JSON.stringify(errorMessage(e), null, 2));\n throw new Error(e?.message || 'Erreur de détection du visage');\n }\n}\n\nexport async function backVerification(result: { path?: string, regionMapping: { authMethod: string[], mrzTypes: string[] }, selectedDocumentType: string, code: string, currentSide: string, templatePath?: string, mrzType?: string }) {\n try {\n if (!result.path) throw new Error('No path provided');\n logger.log(\"result.regionMapping\", result.regionMapping, result.currentSide, result.code);\n const token = await authentification();\n\n\n\n // Fonction helper pour essayer MRZ puis barcode en fallback\n const tryMrzWithBarcodeFallback = async () => {\n try {\n\n logger.log(\"Tentative d'extraction MRZ\");\n const mrz = await kycService.extractMrzText({\n fileUri: result.path!,\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || '',\n postfix: 'back',\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n });\n let bbox: IBbox | undefined;\n let croppedBase64: string | undefined;\n\n try {\n const crop = await cropByObb(result?.path || '', (mrz as any).card_obb);\n bbox = crop.bbox;\n croppedBase64 = crop.base64;\n\n } catch { }\n return { ...mrz, bbox, croppedBase64 }\n } catch (mrzError: any) {\n logger.log(\"MRZ échoué, tentative d'extraction barcode\");\n try {\n const barcode = await kycService.extractBarcode({ fileUri: result.path!, token: token });\n return barcode;\n } catch (barcodeError: any) {\n throw new Error(`MRZ et barcode ont échoué. MRZ: ${mrzError?.message}, Barcode: ${barcodeError?.message}`);\n }\n }\n };\n\n\n\n if (result.regionMapping.authMethod.length > 2 && (!result?.mrzType || result?.mrzType.length === 0)) {\n return await tryMrzWithBarcodeFallback();\n }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('MRZ') && result?.mrzType && result?.mrzType.length > 0) {\n try {\n\n let mrz: any | undefined;\n mrz = await kycService.extractMrzText({\n fileUri: result.path!,\n docType: result?.selectedDocumentType || '',\n docRegion: result?.code || '',\n postfix: 'back',\n token: token,\n template_path: result?.templatePath || '',\n mrz_type: result?.mrzType || ''\n });\n let bbox: IBbox | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (mrz as any).card_obb);\n bbox = crop.bbox;\n } catch { }\n return { ...mrz, bbox };\n } catch (mrzError: any) {\n throw new Error(`MRZ et barcode ont échoué. MRZ: ${mrzError?.message}, Barcode: ${mrzError?.message}`);\n }\n }\n\n if (result.regionMapping.authMethod.length > 0 && result.regionMapping.authMethod.includes('2D_barcode')) {\n try {\n logger.log(\"Tentative d'extraction barcode\");\n const barcode = await kycService.extractBarcode({ fileUri: result.path!, token: token });\n let bbox: IBbox | undefined;\n try {\n const crop = await cropByObb(result?.path || '', (barcode as any).card_obb);\n bbox = crop.bbox;\n } catch { }\n return { ...barcode, bbox };\n } catch (barcodeError: any) {\n throw new Error(`Barcode et MRZ ont échoué. Barcode: ${barcodeError?.message}, MRZ: ${barcodeError?.message}`);\n }\n }\n return null;\n } catch (e: any) {\n throw new Error(e?.message || 'Erreur de détection du MRZ ou barcode');\n }\n}\n\n/**\n * Check template type\n * @param result \n * @returns \n */\nexport async function checkTemplateType(result: { path?: string, docType: string, docRegion: string, postfix: string }) {\n try {\n const token = await authentification();\n const templateType = await kycService.checkTemplateType({ fileUri: result.path || '', docType: result?.docType as GovernmentDocumentType, docRegion: result?.docRegion || \"\", postfix: result?.postfix, token: token });\n\n logger.log(\"templateType result\", JSON.stringify(truncateFields(templateType), null, 2));\n return templateType;\n } catch (e: any) {\n logger.error('Error checking template type:', JSON.stringify(errorMessage(e), null, 2));\n throw new Error(e?.message || 'Erreur de vérification du template');\n }\n}"]}
|
|
@@ -89,7 +89,10 @@ export declare class KYCService {
|
|
|
89
89
|
healthTextExtraction(): Promise<any>;
|
|
90
90
|
healthMrzService(): Promise<any>;
|
|
91
91
|
healthOrientationService(): Promise<any>;
|
|
92
|
-
newSession(token
|
|
92
|
+
newSession({ token, apiKey }: {
|
|
93
|
+
token?: string;
|
|
94
|
+
apiKey?: string;
|
|
95
|
+
}): Promise<SessionResponse>;
|
|
93
96
|
verificationSession(payload: VerificationSessionRequest): Promise<any>;
|
|
94
97
|
getVerificationResult(session_id: string): Promise<VerificationResult>;
|
|
95
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KYCService.d.ts","sourceRoot":"","sources":["../../../src/modules/api/KYCService.ts"],"names":[],"mappings":"AACA,OAAO,EAAyD,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAExH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1F,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,UAAU,GAAG,SAAS,GAAG,iBAAiB,CAAC;CAC1D;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,SAA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AE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IA6B5F,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,GAAG,CAAC;IA+CtE,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAa7E;AAGD,QAAA,MAAM,UAAU,YAAyB,CAAC;AAC1C,eAAe,UAAU,CAAC;AAI1B,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,SAAM,GAAG,GAAG,CAgB7D;AACD,eAAO,MAAM,gBAAgB,oBAqC5B,CAAA;AAID,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,QAKtC,CAAA"}
|
|
@@ -132,7 +132,9 @@ export class KYCService {
|
|
|
132
132
|
const formData = new FormData();
|
|
133
133
|
const rnFile = { uri: idCardImageUri, type: 'image/jpeg', name: 'id_card_photo.jpg' };
|
|
134
134
|
formData.append('file', rnFile);
|
|
135
|
+
logger.log('detectFaceOnId formData', JSON.stringify(formData, null, 2));
|
|
135
136
|
const docTypeShorted = GovernmentDocumentTypeShorted[docType];
|
|
137
|
+
logger.log('detectFaceOnId docTypeShorted', docTypeShorted);
|
|
136
138
|
try {
|
|
137
139
|
const res = await axios.post(`${this.faceServiceURL}/detect_face/?doc_type=${docTypeShorted}`, formData, {
|
|
138
140
|
headers: { 'Content-Type': 'multipart/form-data', 'Authorization': `Bearer ${token}`, },
|
|
@@ -293,13 +295,18 @@ export class KYCService {
|
|
|
293
295
|
const res = await axios.get(`${this.orientationServiceURL}/health`);
|
|
294
296
|
return res.data;
|
|
295
297
|
}
|
|
296
|
-
async newSession(token) {
|
|
298
|
+
async newSession({ token, apiKey }) {
|
|
297
299
|
try {
|
|
298
300
|
const data = {
|
|
299
301
|
"status": "PENDING",
|
|
300
302
|
"metadata": {},
|
|
301
303
|
};
|
|
302
|
-
const res = await axios.post(`${this.backendServiceURL}/verification/sessions/`, data, {
|
|
304
|
+
const res = await axios.post(`${this.backendServiceURL}/verification/sessions/`, data, {
|
|
305
|
+
headers: {
|
|
306
|
+
'Content-Type': 'application/json',
|
|
307
|
+
...(apiKey ? { 'Authorization': `ApiKey ${apiKey}` } : { 'Authorization': `Bearer ${token}` })
|
|
308
|
+
}
|
|
309
|
+
});
|
|
303
310
|
return res.data;
|
|
304
311
|
}
|
|
305
312
|
catch (error) {
|
|
@@ -314,6 +321,7 @@ export class KYCService {
|
|
|
314
321
|
}
|
|
315
322
|
}
|
|
316
323
|
async verificationSession(payload) {
|
|
324
|
+
console.log('apiKey in verificationSession', payload.apiKey);
|
|
317
325
|
try {
|
|
318
326
|
// /api/v1/verification/api/kyc/sessions/{session_id}/steps/{step}/
|
|
319
327
|
const { session_id, step, data, templateId, action, apiKey } = payload;
|
|
@@ -332,15 +340,18 @@ export class KYCService {
|
|
|
332
340
|
};
|
|
333
341
|
const url = `${this.backendServiceURL}/verification/api/kyc/sessions/${session_id}/steps/${step}/`;
|
|
334
342
|
const logPayload = truncateFields({ payloadData, session_id, step });
|
|
335
|
-
logger.log('verificationSession payload', JSON.stringify(truncateFields({ logPayload, token, path: url }), null, 2));
|
|
343
|
+
logger.log('verificationSession payload', JSON.stringify(truncateFields({ logPayload, token: token ?? "-", path: url, apiKey }), null, 2));
|
|
336
344
|
const res = await axios.post(url, payloadData, {
|
|
337
|
-
headers: {
|
|
345
|
+
headers: {
|
|
346
|
+
'Content-Type': 'application/json',
|
|
347
|
+
...(apiKey ? { 'Authorization': `ApiKey ${apiKey}` } : { 'Authorization': `Bearer ${token}` })
|
|
348
|
+
}
|
|
338
349
|
});
|
|
339
350
|
logger.log('verificationSession res', JSON.stringify(truncateFields(res.data), null, 2));
|
|
340
351
|
return res.data;
|
|
341
352
|
}
|
|
342
353
|
catch (error) {
|
|
343
|
-
logger.error('Error validating component:', JSON.stringify(
|
|
354
|
+
logger.error('Error validating component:', JSON.stringify(error, null, 2));
|
|
344
355
|
throw new Error(errorMessage(error));
|
|
345
356
|
}
|
|
346
357
|
}
|
|
@@ -386,6 +397,7 @@ export function truncateFields(obj, maxLength = 420) {
|
|
|
386
397
|
}
|
|
387
398
|
export const authentification = async () => {
|
|
388
399
|
try {
|
|
400
|
+
logger.log('authentification params', 'kyc_frontend', 'ZCW4mGaJXWR0UuI40lM1pHNQmYLw2xvX');
|
|
389
401
|
const params = new URLSearchParams();
|
|
390
402
|
params.append('client_id', 'kyc_frontend');
|
|
391
403
|
params.append('client_secret', 'ZCW4mGaJXWR0UuI40lM1pHNQmYLw2xvX');
|