@hexar/biometric-identity-sdk-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/BiometricIdentitySDK.d.ts +111 -0
  2. package/dist/BiometricIdentitySDK.js +395 -0
  3. package/dist/ai-models/FaceDetector.d.ts +59 -0
  4. package/dist/ai-models/FaceDetector.js +167 -0
  5. package/dist/ai-models/LivenessDetector.d.ts +61 -0
  6. package/dist/ai-models/LivenessDetector.js +218 -0
  7. package/dist/api/BackendClient.d.ts +178 -0
  8. package/dist/api/BackendClient.js +199 -0
  9. package/dist/api/index.d.ts +5 -0
  10. package/dist/api/index.js +8 -0
  11. package/dist/encryption/index.d.ts +38 -0
  12. package/dist/encryption/index.js +99 -0
  13. package/dist/i18n/index.d.ts +6 -0
  14. package/dist/i18n/index.js +47 -0
  15. package/dist/i18n/languages/en.d.ts +2 -0
  16. package/dist/i18n/languages/en.js +112 -0
  17. package/dist/i18n/languages/es-AR.d.ts +2 -0
  18. package/dist/i18n/languages/es-AR.js +112 -0
  19. package/dist/i18n/languages/es.d.ts +2 -0
  20. package/dist/i18n/languages/es.js +112 -0
  21. package/dist/i18n/languages/pt-BR.d.ts +2 -0
  22. package/dist/i18n/languages/pt-BR.js +112 -0
  23. package/dist/i18n/types.d.ts +110 -0
  24. package/dist/i18n/types.js +2 -0
  25. package/dist/index.d.ts +20 -0
  26. package/dist/index.js +64 -0
  27. package/dist/services/BackendValidationService.d.ts +84 -0
  28. package/dist/services/BackendValidationService.js +174 -0
  29. package/dist/services/IValidationService.d.ts +132 -0
  30. package/dist/services/IValidationService.js +8 -0
  31. package/dist/services/index.d.ts +8 -0
  32. package/dist/services/index.js +10 -0
  33. package/dist/types/index.d.ts +288 -0
  34. package/dist/types/index.js +34 -0
  35. package/dist/validation/DocumentValidator.d.ts +84 -0
  36. package/dist/validation/DocumentValidator.js +295 -0
  37. package/dist/validation/OCREngine.d.ts +75 -0
  38. package/dist/validation/OCREngine.js +225 -0
  39. package/package.json +24 -0
  40. package/src/BiometricIdentitySDK.ts +493 -0
  41. package/src/ai-models/FaceDetector.ts +200 -0
  42. package/src/ai-models/LivenessDetector.ts +274 -0
  43. package/src/api/BackendClient.ts +395 -0
  44. package/src/api/index.ts +15 -0
  45. package/src/encryption/index.ts +108 -0
  46. package/src/i18n/index.ts +35 -0
  47. package/src/i18n/languages/en.ts +121 -0
  48. package/src/i18n/languages/es-AR.ts +121 -0
  49. package/src/i18n/languages/es.ts +121 -0
  50. package/src/i18n/languages/pt-BR.ts +121 -0
  51. package/src/i18n/types.ts +121 -0
  52. package/src/index.ts +54 -0
  53. package/src/services/BackendValidationService.ts +228 -0
  54. package/src/services/IValidationService.ts +158 -0
  55. package/src/services/index.ts +17 -0
  56. package/src/types/index.ts +380 -0
  57. package/src/validation/DocumentValidator.ts +353 -0
  58. package/src/validation/OCREngine.ts +265 -0
  59. package/tsconfig.json +20 -0
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+ /**
3
+ * Backend API Client for Biometric Identity SDK
4
+ * Communicates with the Python backend for AI-powered validation
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.BackendClient = void 0;
8
+ /**
9
+ * Client for communicating with the Biometric Identity Backend
10
+ */
11
+ class BackendClient {
12
+ constructor(config) {
13
+ this.currentSessionId = null;
14
+ this.config = {
15
+ apiEndpoint: config.apiEndpoint.replace(/\/$/, ''), // Remove trailing slash
16
+ apiKey: config.apiKey,
17
+ timeout: config.timeout || 60000,
18
+ };
19
+ }
20
+ /**
21
+ * Check if the backend is available
22
+ */
23
+ async healthCheck() {
24
+ try {
25
+ const response = await this.request('/api/v1/health', 'GET');
26
+ return response.status === 'healthy';
27
+ }
28
+ catch (error) {
29
+ console.warn('Backend health check failed:', error);
30
+ return false;
31
+ }
32
+ }
33
+ /**
34
+ * Generate a liveness challenge
35
+ */
36
+ async generateChallenge(challengeType = 'active') {
37
+ const response = await this.request('/api/v1/liveness/challenge', 'POST', {
38
+ challenge_type: challengeType,
39
+ session_id: this.currentSessionId,
40
+ });
41
+ this.currentSessionId = response.session_id;
42
+ return response;
43
+ }
44
+ /**
45
+ * Validate liveness from video frames
46
+ */
47
+ async validateLiveness(videoFrames, videoDurationMs, challengesCompleted = [], deviceInfo) {
48
+ if (!this.currentSessionId) {
49
+ throw new Error('No active session. Call generateChallenge() first.');
50
+ }
51
+ const response = await this.request('/api/v1/liveness/validate', 'POST', {
52
+ session_id: this.currentSessionId,
53
+ video_frames: videoFrames,
54
+ video_duration_ms: videoDurationMs,
55
+ challenges_completed: challengesCompleted,
56
+ device_info: deviceInfo,
57
+ });
58
+ return response;
59
+ }
60
+ /**
61
+ * Compare faces between document and live capture
62
+ */
63
+ async matchFaces(documentImage, liveFaceImage) {
64
+ return this.request('/api/v1/face/match', 'POST', {
65
+ document_image: documentImage,
66
+ live_face_image: liveFaceImage,
67
+ session_id: this.currentSessionId,
68
+ });
69
+ }
70
+ /**
71
+ * Validate document and extract data
72
+ */
73
+ async validateDocument(frontImage, backImage, documentType, countryCode) {
74
+ return this.request('/api/v1/document/validate', 'POST', {
75
+ front_image: frontImage,
76
+ back_image: backImage,
77
+ document_type: documentType,
78
+ country_code: countryCode,
79
+ });
80
+ }
81
+ /**
82
+ * Perform full biometric validation
83
+ */
84
+ async fullValidation(params) {
85
+ if (!this.currentSessionId) {
86
+ // Generate a challenge first if no session exists
87
+ await this.generateChallenge();
88
+ }
89
+ return this.request('/api/v1/validate', 'POST', {
90
+ front_id_image: params.frontIdImage,
91
+ back_id_image: params.backIdImage,
92
+ video_frames: params.videoFrames,
93
+ video_duration_ms: params.videoDurationMs,
94
+ session_id: this.currentSessionId,
95
+ challenges_completed: params.challengesCompleted || [],
96
+ document_type: params.documentType,
97
+ country_code: params.countryCode,
98
+ device_info: params.deviceInfo,
99
+ });
100
+ }
101
+ /**
102
+ * Convert backend response to SDK ValidationResult format
103
+ */
104
+ convertToValidationResult(response) {
105
+ const extractedData = response.extracted_data;
106
+ return {
107
+ matchScore: response.match_score,
108
+ isValidFaceMatch: response.face_match_passed,
109
+ isDocumentAuthentic: response.document_authentic,
110
+ livenessScore: response.liveness_score * 100, // Convert 0-1 to 0-100
111
+ extractedDocumentData: {
112
+ firstName: extractedData.first_name || '',
113
+ lastName: extractedData.last_name || '',
114
+ documentNumber: extractedData.document_number || '',
115
+ dateOfBirth: extractedData.date_of_birth || '',
116
+ expirationDate: extractedData.expiration_date || '',
117
+ nationality: extractedData.nationality || '',
118
+ documentType: extractedData.document_type,
119
+ gender: extractedData.gender,
120
+ address: extractedData.address,
121
+ issuingCountry: extractedData.issuing_country,
122
+ rawText: extractedData.raw_text,
123
+ },
124
+ warnings: response.warnings,
125
+ timestamp: new Date(response.timestamp).getTime(),
126
+ details: {
127
+ faceDetection: {
128
+ detected: response.details.face_match.live_face_detected,
129
+ confidence: response.details.face_match.live_face_confidence,
130
+ },
131
+ documentQuality: {
132
+ hasGlare: response.details.document.quality.has_glare,
133
+ hasBlur: response.details.document.quality.has_blur,
134
+ hasCropping: response.details.document.quality.has_cropping,
135
+ hasReflections: response.details.document.quality.has_shadows,
136
+ edgeDetectionScore: response.details.document.quality.edge_detection_score,
137
+ },
138
+ tamperDetection: {
139
+ isTampered: response.details.document.tamper_detection.is_tampered,
140
+ tamperScore: response.details.document.tamper_detection.tamper_score,
141
+ suspiciousRegions: response.details.document.tamper_detection.suspicious_regions,
142
+ },
143
+ livenessChecks: {
144
+ passedMotionCheck: response.details.liveness.checks.find(c => c.name === 'motion_analysis')?.passed || false,
145
+ passedTextureCheck: response.details.liveness.checks.find(c => c.name === 'texture_analysis')?.passed || false,
146
+ passedDepthCheck: response.details.liveness.checks.find(c => c.name === 'face_consistency')?.passed || false,
147
+ },
148
+ },
149
+ };
150
+ }
151
+ /**
152
+ * Get current session ID
153
+ */
154
+ getSessionId() {
155
+ return this.currentSessionId;
156
+ }
157
+ /**
158
+ * Reset session
159
+ */
160
+ resetSession() {
161
+ this.currentSessionId = null;
162
+ }
163
+ /**
164
+ * Make HTTP request to backend
165
+ */
166
+ async request(endpoint, method, body) {
167
+ const url = `${this.config.apiEndpoint}${endpoint}`;
168
+ const controller = new AbortController();
169
+ const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);
170
+ try {
171
+ const response = await fetch(url, {
172
+ method,
173
+ headers: {
174
+ 'Content-Type': 'application/json',
175
+ 'X-API-Key': this.config.apiKey,
176
+ },
177
+ body: body ? JSON.stringify(body) : undefined,
178
+ signal: controller.signal,
179
+ });
180
+ clearTimeout(timeoutId);
181
+ if (!response.ok) {
182
+ const errorData = await response.json().catch(() => ({}));
183
+ throw new Error(errorData?.error?.message ||
184
+ errorData?.detail ||
185
+ `Request failed with status ${response.status}`);
186
+ }
187
+ return await response.json();
188
+ }
189
+ catch (error) {
190
+ clearTimeout(timeoutId);
191
+ if (error.name === 'AbortError') {
192
+ throw new Error('Request timeout');
193
+ }
194
+ throw error;
195
+ }
196
+ }
197
+ }
198
+ exports.BackendClient = BackendClient;
199
+ exports.default = BackendClient;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * API Client exports
3
+ */
4
+ export { BackendClient } from './BackendClient';
5
+ export type { ChallengeAction, ChallengeResponse, LivenessResponse, FaceMatchResponse, DocumentValidationResponse, FullValidationResponse, BackendClientConfig, } from './BackendClient';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * API Client exports
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BackendClient = void 0;
7
+ var BackendClient_1 = require("./BackendClient");
8
+ Object.defineProperty(exports, "BackendClient", { enumerable: true, get: function () { return BackendClient_1.BackendClient; } });
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Encryption utilities for secure data transmission
3
+ */
4
+ import { EncryptedData } from '../types';
5
+ export declare class EncryptionService {
6
+ private encryptionKey?;
7
+ private algorithm;
8
+ private keyLength;
9
+ constructor(encryptionKey?: string | undefined);
10
+ /**
11
+ * Encrypt data using AES-256-GCM
12
+ */
13
+ encrypt(data: string): Promise<EncryptedData>;
14
+ /**
15
+ * Decrypt data using AES-256-GCM
16
+ */
17
+ decrypt(encryptedData: EncryptedData): Promise<string>;
18
+ /**
19
+ * Encrypt image data (base64)
20
+ */
21
+ encryptImage(base64Image: string): Promise<EncryptedData>;
22
+ /**
23
+ * Hash data using SHA-256
24
+ */
25
+ hash(data: string): string;
26
+ /**
27
+ * Generate secure random token
28
+ */
29
+ generateToken(length?: number): string;
30
+ }
31
+ /**
32
+ * Encrypt multiple images for batch processing
33
+ */
34
+ export declare function encryptImages(images: string[], encryptionKey?: string): Promise<EncryptedData[]>;
35
+ /**
36
+ * Create integrity signature for data
37
+ */
38
+ export declare function createIntegritySignature(data: any): string;
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /**
3
+ * Encryption utilities for secure data transmission
4
+ */
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.EncryptionService = void 0;
10
+ exports.encryptImages = encryptImages;
11
+ exports.createIntegritySignature = createIntegritySignature;
12
+ const crypto_1 = __importDefault(require("crypto"));
13
+ class EncryptionService {
14
+ constructor(encryptionKey) {
15
+ this.encryptionKey = encryptionKey;
16
+ this.algorithm = 'aes-256-gcm';
17
+ this.keyLength = 32; // 256 bits
18
+ if (!encryptionKey) {
19
+ // Generate a random key if not provided
20
+ this.encryptionKey = crypto_1.default.randomBytes(this.keyLength).toString('hex');
21
+ }
22
+ }
23
+ /**
24
+ * Encrypt data using AES-256-GCM
25
+ */
26
+ async encrypt(data) {
27
+ try {
28
+ const key = Buffer.from(this.encryptionKey, 'hex').slice(0, this.keyLength);
29
+ const iv = crypto_1.default.randomBytes(16);
30
+ const cipher = crypto_1.default.createCipheriv(this.algorithm, key, iv);
31
+ let encrypted = cipher.update(data, 'utf8', 'base64');
32
+ encrypted += cipher.final('base64');
33
+ const authTag = cipher.getAuthTag();
34
+ return {
35
+ data: encrypted,
36
+ iv: iv.toString('base64'),
37
+ tag: authTag.toString('base64'),
38
+ algorithm: this.algorithm,
39
+ };
40
+ }
41
+ catch (error) {
42
+ throw new Error(`Encryption failed: ${error}`);
43
+ }
44
+ }
45
+ /**
46
+ * Decrypt data using AES-256-GCM
47
+ */
48
+ async decrypt(encryptedData) {
49
+ try {
50
+ const key = Buffer.from(this.encryptionKey, 'hex').slice(0, this.keyLength);
51
+ const iv = Buffer.from(encryptedData.iv, 'base64');
52
+ const authTag = Buffer.from(encryptedData.tag || '', 'base64');
53
+ const decipher = crypto_1.default.createDecipheriv(this.algorithm, key, iv);
54
+ decipher.setAuthTag(authTag);
55
+ let decrypted = decipher.update(encryptedData.data, 'base64', 'utf8');
56
+ decrypted += decipher.final('utf8');
57
+ return decrypted;
58
+ }
59
+ catch (error) {
60
+ throw new Error(`Decryption failed: ${error}`);
61
+ }
62
+ }
63
+ /**
64
+ * Encrypt image data (base64)
65
+ */
66
+ async encryptImage(base64Image) {
67
+ return this.encrypt(base64Image);
68
+ }
69
+ /**
70
+ * Hash data using SHA-256
71
+ */
72
+ hash(data) {
73
+ return crypto_1.default.createHash('sha256').update(data).digest('hex');
74
+ }
75
+ /**
76
+ * Generate secure random token
77
+ */
78
+ generateToken(length = 32) {
79
+ return crypto_1.default.randomBytes(length).toString('hex');
80
+ }
81
+ }
82
+ exports.EncryptionService = EncryptionService;
83
+ /**
84
+ * Encrypt multiple images for batch processing
85
+ */
86
+ async function encryptImages(images, encryptionKey) {
87
+ const service = new EncryptionService(encryptionKey);
88
+ return Promise.all(images.map(img => service.encryptImage(img)));
89
+ }
90
+ /**
91
+ * Create integrity signature for data
92
+ */
93
+ function createIntegritySignature(data) {
94
+ const dataString = JSON.stringify(data);
95
+ return crypto_1.default
96
+ .createHmac('sha256', 'biometric-identity-sdk')
97
+ .update(dataString)
98
+ .digest('hex');
99
+ }
@@ -0,0 +1,6 @@
1
+ import { SupportedLanguage, LanguageStrings } from './types';
2
+ export declare const setLanguage: (lang: SupportedLanguage) => void;
3
+ export declare const getStrings: () => LanguageStrings;
4
+ export declare const getCurrentLanguage: () => SupportedLanguage;
5
+ export { SupportedLanguage, LanguageStrings };
6
+ export * from './types';
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.getCurrentLanguage = exports.getStrings = exports.setLanguage = void 0;
18
+ const en_1 = require("./languages/en");
19
+ const es_1 = require("./languages/es");
20
+ const es_AR_1 = require("./languages/es-AR");
21
+ const pt_BR_1 = require("./languages/pt-BR");
22
+ const languages = {
23
+ 'en': en_1.en,
24
+ 'es': es_1.es,
25
+ 'es-AR': es_AR_1.esAR,
26
+ 'pt-BR': pt_BR_1.ptBR,
27
+ };
28
+ let currentLanguage = 'en';
29
+ const setLanguage = (lang) => {
30
+ if (languages[lang]) {
31
+ currentLanguage = lang;
32
+ }
33
+ else {
34
+ console.warn(`Language ${lang} not supported, falling back to English`);
35
+ currentLanguage = 'en';
36
+ }
37
+ };
38
+ exports.setLanguage = setLanguage;
39
+ const getStrings = () => {
40
+ return languages[currentLanguage];
41
+ };
42
+ exports.getStrings = getStrings;
43
+ const getCurrentLanguage = () => {
44
+ return currentLanguage;
45
+ };
46
+ exports.getCurrentLanguage = getCurrentLanguage;
47
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,2 @@
1
+ import { LanguageStrings } from '../types';
2
+ export declare const en: LanguageStrings;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.en = void 0;
4
+ exports.en = {
5
+ common: {
6
+ loading: 'Loading...',
7
+ error: 'Error',
8
+ retry: 'Retry',
9
+ cancel: 'Cancel',
10
+ continue: 'Continue',
11
+ close: 'Close',
12
+ done: 'Done',
13
+ },
14
+ initialization: {
15
+ initializing: 'Initializing...',
16
+ connectingToServer: 'Connecting to server...',
17
+ loadingModels: 'Loading AI models...',
18
+ },
19
+ instructions: {
20
+ title: 'Identity Verification',
21
+ subtitle: 'Follow these steps to verify your identity',
22
+ step1: 'Capture front of ID',
23
+ step2: 'Capture back of ID',
24
+ step3: 'Record face video',
25
+ startButton: 'Start Verification',
26
+ requirements: {
27
+ goodLighting: 'Good lighting',
28
+ clearDocument: 'Clear document',
29
+ stableHand: 'Stable hand',
30
+ followInstructions: 'Follow instructions',
31
+ },
32
+ },
33
+ capture: {
34
+ frontId: {
35
+ title: 'Front of ID',
36
+ instruction: 'Position the front of your ID within the frame',
37
+ button: 'Capture Front ID',
38
+ },
39
+ backId: {
40
+ title: 'Back of ID',
41
+ instruction: 'Position the back of your ID within the frame',
42
+ button: 'Capture Back ID',
43
+ },
44
+ selfie: {
45
+ title: 'Face Photo',
46
+ instruction: 'Position your face within the frame',
47
+ button: 'Take Photo',
48
+ },
49
+ },
50
+ liveness: {
51
+ title: 'Face Verification',
52
+ preparing: 'Preparing verification...',
53
+ instructions: {
54
+ lookLeft: 'Look to the left',
55
+ lookRight: 'Look to the right',
56
+ lookUp: 'Look up',
57
+ lookDown: 'Look down',
58
+ smile: 'Smile',
59
+ blink: 'Blink naturally',
60
+ turnHeadLeft: 'Turn your head to the left',
61
+ turnHeadRight: 'Turn your head to the right',
62
+ stayStill: 'Stay still',
63
+ },
64
+ recording: 'Recording...',
65
+ processing: 'Processing video...',
66
+ },
67
+ validation: {
68
+ title: 'Validating',
69
+ validating: 'Validating your identity...',
70
+ checkingDocument: 'Checking document authenticity...',
71
+ checkingLiveness: 'Verifying liveness...',
72
+ matchingFaces: 'Matching faces...',
73
+ almostDone: 'Almost done...',
74
+ },
75
+ result: {
76
+ success: {
77
+ title: 'Verification Successful',
78
+ message: 'Your identity has been verified successfully',
79
+ verificationComplete: 'Verification Complete',
80
+ },
81
+ failure: {
82
+ title: 'Verification Failed',
83
+ message: 'We could not verify your identity',
84
+ tryAgain: 'Please try again',
85
+ },
86
+ },
87
+ errors: {
88
+ cameraPermissionDenied: 'Camera permission denied. Please enable camera access in settings.',
89
+ cameraNotAvailable: 'Camera not available.',
90
+ faceNotDetected: 'Face not detected. Please position your face clearly.',
91
+ multipleFacesDetected: 'Multiple faces detected. Only one person should be in frame.',
92
+ documentNotDetected: 'Document not detected. Please position your ID clearly.',
93
+ poorImageQuality: 'Image quality too low. Please ensure good lighting.',
94
+ livenessCheckFailed: 'Liveness check failed. Please try again.',
95
+ faceMatchFailed: 'Face does not match document photo.',
96
+ documentTampered: 'Document appears to be tampered or fraudulent.',
97
+ networkError: 'Network error. Please check your connection.',
98
+ timeout: 'Request timeout. Please try again.',
99
+ unknownError: 'An unexpected error occurred.',
100
+ },
101
+ badges: {
102
+ secureVerification: 'Secure AI Verification',
103
+ aiPowered: 'AI-Powered',
104
+ verified: 'Verified',
105
+ },
106
+ steps: {
107
+ frontId: 'Front ID',
108
+ backId: 'Back ID',
109
+ faceVideo: 'Face Video',
110
+ validation: 'Validation',
111
+ },
112
+ };
@@ -0,0 +1,2 @@
1
+ import { LanguageStrings } from '../types';
2
+ export declare const esAR: LanguageStrings;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.esAR = void 0;
4
+ exports.esAR = {
5
+ common: {
6
+ loading: 'Cargando...',
7
+ error: 'Error',
8
+ retry: 'Reintentar',
9
+ cancel: 'Cancelar',
10
+ continue: 'Continuar',
11
+ close: 'Cerrar',
12
+ done: 'Listo',
13
+ },
14
+ initialization: {
15
+ initializing: 'Iniciando...',
16
+ connectingToServer: 'Conectando al servidor...',
17
+ loadingModels: 'Cargando modelos de IA...',
18
+ },
19
+ instructions: {
20
+ title: 'Verificación de Identidad',
21
+ subtitle: 'Seguí estos pasos para verificar tu identidad',
22
+ step1: 'Capturá el frente de tu documento',
23
+ step2: 'Capturá el dorso de tu documento',
24
+ step3: 'Grabá un video de tu rostro',
25
+ startButton: 'Iniciar Verificación',
26
+ requirements: {
27
+ goodLighting: 'Buena iluminación',
28
+ clearDocument: 'Documento claro',
29
+ stableHand: 'Mano firme',
30
+ followInstructions: 'Seguí las instrucciones',
31
+ },
32
+ },
33
+ capture: {
34
+ frontId: {
35
+ title: 'Frente del Documento',
36
+ instruction: 'Posicioná el frente de tu documento dentro del marco',
37
+ button: 'Capturar Frente',
38
+ },
39
+ backId: {
40
+ title: 'Dorso del Documento',
41
+ instruction: 'Posicioná el dorso de tu documento dentro del marco',
42
+ button: 'Capturar Dorso',
43
+ },
44
+ selfie: {
45
+ title: 'Foto de Rostro',
46
+ instruction: 'Posicioná tu rostro dentro del marco',
47
+ button: 'Tomar Foto',
48
+ },
49
+ },
50
+ liveness: {
51
+ title: 'Verificación Facial',
52
+ preparing: 'Preparando verificación...',
53
+ instructions: {
54
+ lookLeft: 'Mirá a la izquierda',
55
+ lookRight: 'Mirá a la derecha',
56
+ lookUp: 'Mirá hacia arriba',
57
+ lookDown: 'Mirá hacia abajo',
58
+ smile: 'Sonreí',
59
+ blink: 'Parpadeá naturalmente',
60
+ turnHeadLeft: 'Girá tu cabeza a la izquierda',
61
+ turnHeadRight: 'Girá tu cabeza a la derecha',
62
+ stayStill: 'Quedate quieto',
63
+ },
64
+ recording: 'Grabando...',
65
+ processing: 'Procesando video...',
66
+ },
67
+ validation: {
68
+ title: 'Validando',
69
+ validating: 'Validando tu identidad...',
70
+ checkingDocument: 'Verificando autenticidad del documento...',
71
+ checkingLiveness: 'Verificando prueba de vida...',
72
+ matchingFaces: 'Comparando rostros...',
73
+ almostDone: 'Ya casi terminamos...',
74
+ },
75
+ result: {
76
+ success: {
77
+ title: 'Verificación Exitosa',
78
+ message: 'Tu identidad fue verificada correctamente',
79
+ verificationComplete: 'Verificación Completa',
80
+ },
81
+ failure: {
82
+ title: 'Verificación Fallida',
83
+ message: 'No pudimos verificar tu identidad',
84
+ tryAgain: 'Por favor, intentá nuevamente',
85
+ },
86
+ },
87
+ errors: {
88
+ cameraPermissionDenied: 'Permiso de cámara denegado. Habilitá el acceso en configuración.',
89
+ cameraNotAvailable: 'Cámara no disponible.',
90
+ faceNotDetected: 'Rostro no detectado. Posicioná tu cara claramente.',
91
+ multipleFacesDetected: 'Múltiples rostros detectados. Solo debe haber una persona.',
92
+ documentNotDetected: 'Documento no detectado. Posicioná tu documento claramente.',
93
+ poorImageQuality: 'Calidad de imagen baja. Asegurate de tener buena iluminación.',
94
+ livenessCheckFailed: 'Prueba de vida fallida. Intentá nuevamente.',
95
+ faceMatchFailed: 'El rostro no coincide con la foto del documento.',
96
+ documentTampered: 'El documento parece estar alterado o ser fraudulento.',
97
+ networkError: 'Error de red. Verificá tu conexión.',
98
+ timeout: 'Tiempo de espera agotado. Intentá nuevamente.',
99
+ unknownError: 'Ocurrió un error inesperado.',
100
+ },
101
+ badges: {
102
+ secureVerification: 'Verificación Segura con IA',
103
+ aiPowered: 'Impulsado por IA',
104
+ verified: 'Verificado',
105
+ },
106
+ steps: {
107
+ frontId: 'Frente',
108
+ backId: 'Dorso',
109
+ faceVideo: 'Video',
110
+ validation: 'Validación',
111
+ },
112
+ };
@@ -0,0 +1,2 @@
1
+ import { LanguageStrings } from '../types';
2
+ export declare const es: LanguageStrings;