@neofaceid/web-sdk 1.24.1 → 1.25.5

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.
@@ -0,0 +1,1367 @@
1
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
2
+ import { z } from 'zod';
3
+
4
+ /**
5
+ * Application registration data
6
+ */
7
+ export declare interface ApplicationRegistrationData {
8
+ applicationName: string;
9
+ domain: string;
10
+ acceptOnlyEmailWithSameDomain: boolean;
11
+ }
12
+
13
+ /**
14
+ * Application registration result.
15
+ * `app_token` só vem na criação/rotação; em GETs de leitura vem só `app_token_last4`.
16
+ */
17
+ export declare interface ApplicationRegistrationResult {
18
+ success: boolean;
19
+ application: {
20
+ id: string;
21
+ application_name: string;
22
+ domain: string;
23
+ accept_only_email_with_same_domain: boolean;
24
+ app_token?: string;
25
+ app_token_last4?: string;
26
+ is_active: boolean;
27
+ created_at: string;
28
+ };
29
+ message: string;
30
+ }
31
+
32
+ export declare interface AuthorizationOptions {
33
+ onProgress?: (step: number, totalSteps: number, instruction: string) => void;
34
+ onPhotoTaken?: (photoNumber: number, blob: Blob) => void;
35
+ captureDelay?: number;
36
+ }
37
+
38
+ export declare interface AuthorizationResult {
39
+ success: boolean;
40
+ authorizationHash?: string;
41
+ name?: string;
42
+ birthDate?: string;
43
+ cpf?: string;
44
+ confidenceScore?: number;
45
+ message?: string;
46
+ }
47
+
48
+ /**
49
+ * NEO-108: Authorization operation with multi-photo capture and gesture detection
50
+ *
51
+ * This function captures 4 sequential photos for authorization:
52
+ * - Photo 1: Front face
53
+ * - Photo 2: Left profile
54
+ * - Photo 3: Right profile
55
+ * - Photo 4: Thumbs up gesture with front face
56
+ *
57
+ * @param applicationToken The application token for authentication
58
+ * @param cpf The CPF of the person to authorize
59
+ * @param options Optional configuration for progress callbacks and delays
60
+ * @returns Promise with authorization result
61
+ * @throws NeoFaceError if capture or recognition fails
62
+ */
63
+ export declare const authorizeOperation: (applicationToken: string, cpf: string, options?: AuthorizationOptions) => Promise<AuthorizationResult>;
64
+
65
+ export declare class BiometricCaptureModal {
66
+ private modal;
67
+ private video;
68
+ private canvas;
69
+ private stream;
70
+ private options;
71
+ private countdownInterval;
72
+ private isCapturing;
73
+ constructor(options: BiometricCaptureOptions);
74
+ /**
75
+ * Abre o modal de captura biométrica
76
+ */
77
+ open(): Promise<void>;
78
+ /**
79
+ * Fecha o modal e limpa recursos
80
+ */
81
+ close(): void;
82
+ /**
83
+ * Cria a estrutura HTML do modal
84
+ */
85
+ private createModal;
86
+ /**
87
+ * Inicializa a câmera
88
+ */
89
+ private initializeCamera;
90
+ /**
91
+ * Inicia a contagem regressiva
92
+ */
93
+ private startCountdown;
94
+ /**
95
+ * Captura a imagem da câmera
96
+ */
97
+ private captureImage;
98
+ /**
99
+ * Detecta o tipo biométrico na imagem (face ou mão)
100
+ */
101
+ private detectBiometricType;
102
+ /**
103
+ * Adiciona event listeners aos elementos do modal
104
+ */
105
+ private addEventListeners;
106
+ /**
107
+ * Limpa recursos (câmera, intervalos, etc.)
108
+ */
109
+ private cleanup;
110
+ /**
111
+ * Retorna o título padrão baseado no modo
112
+ */
113
+ private getDefaultTitle;
114
+ /**
115
+ * Retorna o subtítulo padrão baseado no modo
116
+ */
117
+ private getDefaultSubtitle;
118
+ /**
119
+ * Adiciona estilos CSS ao modal
120
+ */
121
+ private addStyles;
122
+ }
123
+
124
+ declare interface BiometricCaptureOptions {
125
+ mode: 'face' | 'hand' | 'auto';
126
+ onSuccess: (imageData: string, detectedType: 'face' | 'hand') => void;
127
+ onError: (error: NeoFaceError) => void;
128
+ onCancel?: () => void;
129
+ countdown?: number;
130
+ title?: string;
131
+ subtitle?: string;
132
+ }
133
+
134
+ /**
135
+ * Função de conveniência para login biométrico simples
136
+ * @param applicationToken Token da aplicação
137
+ * @param mode Modo de captura ('face', 'hand' ou 'auto')
138
+ * @returns Promise que resolve com o resultado do login
139
+ */
140
+ export declare function biometricLogin(applicationToken: string, mode?: 'face' | 'hand' | 'auto'): Promise<BiometricLoginResult>;
141
+
142
+ export declare interface BiometricLoginOptions {
143
+ applicationToken: string;
144
+ onSuccess: (result: BiometricLoginResult) => void;
145
+ onError: (error: NeoFaceError) => void;
146
+ onCancel?: () => void;
147
+ onFallbackRequest?: () => void;
148
+ countdown?: number;
149
+ title?: string;
150
+ subtitle?: string;
151
+ }
152
+
153
+ export declare type BiometricLoginResult = z.infer<typeof BiometricLoginResultSchema>;
154
+
155
+ declare const BiometricLoginResultSchema: z.ZodObject<{
156
+ success: z.ZodBoolean;
157
+ accessToken: z.ZodOptional<z.ZodString>;
158
+ alias: z.ZodOptional<z.ZodString>;
159
+ user: z.ZodOptional<z.ZodObject<{
160
+ id: z.ZodString;
161
+ email: z.ZodString;
162
+ role: z.ZodString;
163
+ validated: z.ZodBoolean;
164
+ active: z.ZodBoolean;
165
+ }, z.core.$strip>>;
166
+ person: z.ZodOptional<z.ZodObject<{
167
+ id: z.ZodString;
168
+ name: z.ZodString;
169
+ birth_date: z.ZodString;
170
+ }, z.core.$strip>>;
171
+ confidence_score: z.ZodOptional<z.ZodNumber>;
172
+ recognition_id: z.ZodOptional<z.ZodString>;
173
+ task_id: z.ZodOptional<z.ZodString>;
174
+ status: z.ZodOptional<z.ZodString>;
175
+ message: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strip>;
177
+
178
+ /**
179
+ * Inicia o processo de login biométrico com fallback para email e senha se não houver match (assumindo purpose LOGIN).
180
+ * @param applicationToken Token da aplicação
181
+ * @param mode Modo de captura ('face', 'hand' ou 'auto')
182
+ * @returns Promise que resolve com o resultado do login
183
+ */
184
+ export declare function biometricLoginWithFallback(applicationToken: string, mode?: 'face' | 'hand' | 'auto'): Promise<BiometricLoginResult>;
185
+
186
+ declare interface BiometricRegistrationCallbacks {
187
+ onSuccess(result: BiometricRegistrationResult): void;
188
+ onError(code: string, message: string): void;
189
+ }
190
+
191
+ export declare function BiometricRegistrationModal({ personData, applicationToken, onClose, onSuccess, onPhotosCaptured, onError, }: BiometricRegistrationModalProps): JSX_2.Element;
192
+
193
+ declare interface BiometricRegistrationModalProps {
194
+ personData?: {
195
+ name: string;
196
+ birth_date: string;
197
+ cpf: string;
198
+ email: string;
199
+ password: string;
200
+ };
201
+ applicationToken?: string;
202
+ onClose: () => void;
203
+ onSuccess?: (result: BiometricRegistrationResult_2) => void;
204
+ onPhotosCaptured?: (photos: Blob[]) => void;
205
+ onError: (error: string) => void;
206
+ useRealApi?: boolean;
207
+ }
208
+
209
+ declare interface BiometricRegistrationResult {
210
+ success: boolean;
211
+ message: string;
212
+ person_id?: string;
213
+ user_id?: string;
214
+ person_validated?: boolean;
215
+ face_processing?: any;
216
+ onboarding_link?: string;
217
+ }
218
+
219
+ declare interface BiometricRegistrationResult_2 {
220
+ success: boolean;
221
+ message: string;
222
+ person_id?: string;
223
+ user_id?: string;
224
+ person_validated?: boolean;
225
+ face_processing?: any;
226
+ onboarding_link?: string;
227
+ }
228
+
229
+ /**
230
+ * Overlay minimalista estilo FaceID para login biométrico
231
+ * Implementação vanilla JS (sem React) para evitar conflitos de versão
232
+ */
233
+ export declare class BiometricStatusOverlay {
234
+ private container;
235
+ private currentStatus;
236
+ private getStyles;
237
+ private getStatusText;
238
+ private renderContent;
239
+ show(status?: OverlayStatus): void;
240
+ updateStatus(status: OverlayStatus): void;
241
+ close(): void;
242
+ }
243
+
244
+ declare interface Callbacks {
245
+ onSuccess(user: {
246
+ name: string;
247
+ email: string;
248
+ documentId: string;
249
+ }): void;
250
+ onError(code: string, message: string): void;
251
+ }
252
+
253
+ /**
254
+ * Options for capturing face frames
255
+ */
256
+ export declare interface CaptureFaceFramesOptions {
257
+ numFrames: number;
258
+ livenessCheck: boolean;
259
+ }
260
+
261
+ /**
262
+ * Check if a user exists by email or CPF
263
+ * @param params Object with email or cpf to check (only one at a time)
264
+ * @returns Promise with existence status
265
+ * @throws NeoFaceError if verification fails
266
+ *
267
+ * @example
268
+ * ```typescript
269
+ * const result = await checkUserExistence({ email: 'user@example.com' });
270
+ * if (result.data.exists) {
271
+ * console.log('User already exists');
272
+ * }
273
+ * ```
274
+ */
275
+ export declare const checkUserExistence: (params: {
276
+ email?: string;
277
+ cpf?: string;
278
+ }) => Promise<UserExistenceResult>;
279
+
280
+ /**
281
+ * Conclui o processo de onboarding enviando imagens de face e documento
282
+ * @param applicationToken Token da aplicação (header `X-App-Token`)
283
+ * @param onboardingToken Token do link de onboarding
284
+ * @param faceImage Blob da imagem de rosto
285
+ * @param documentImage Blob da imagem do documento
286
+ * @returns Resposta da conclusão do onboarding
287
+ * @throws NeoFaceError em caso de falha de rede ou validação
288
+ */
289
+ export declare const completeOnboarding: (applicationToken: string, onboardingToken: string, faceImage: Blob, documentImage: Blob) => Promise<{
290
+ success: boolean;
291
+ message: string;
292
+ person_id?: string;
293
+ identity_data_id?: string;
294
+ confidence_score?: number;
295
+ processing_time?: number;
296
+ }>;
297
+
298
+ /**
299
+ * Conclui o processo de onboarding com dados completos da pessoa
300
+ *
301
+ * RECEBE:
302
+ * - Nome, DataDeNascimento, CPF, CNPJ, Email
303
+ * - Imagens da Pessoa (array de Blobs)
304
+ * - Imagem do documento
305
+ *
306
+ * AÇÃO (backend):
307
+ * - Se não é cadastrado no NeoFaceId, cadastra-o
308
+ * - Escaneia o documento e confere com os dados passados
309
+ * - Confere se a imagem/vídeo passa nos critérios de prova de vida
310
+ *
311
+ * @param applicationToken Token da aplicação (header `X-App-Token`)
312
+ * @param onboardingToken Token do link de onboarding
313
+ * @param personData Dados da pessoa (Nome, DataDeNascimento, CPF, CNPJ, Email)
314
+ * @param personImages Array de imagens/vídeos da pessoa para prova de vida (mínimo 1)
315
+ * @param documentImage Blob da imagem do documento
316
+ * @returns Resposta da conclusão do onboarding
317
+ * @throws NeoFaceError em caso de falha de rede ou validação
318
+ */
319
+ export declare const completeOnboardingWithData: (applicationToken: string, onboardingToken: string, personData: OnboardingPersonData, personImages: Blob[], documentImage: Blob) => Promise<{
320
+ success: boolean;
321
+ message: string;
322
+ person_id?: string;
323
+ identity_data_id?: string;
324
+ confidence_score?: number;
325
+ processing_time?: number;
326
+ liveness_passed?: boolean;
327
+ document_verified?: boolean;
328
+ person_created?: boolean;
329
+ }>;
330
+
331
+ /**
332
+ * Confirm password reset using token
333
+ * @param token Reset token received via email
334
+ * @param new_password New password
335
+ */
336
+ export declare function confirmPasswordReset(token: string, new_password: string): Promise<{
337
+ message: string;
338
+ }>;
339
+
340
+ export declare interface ConsentInfo {
341
+ purpose: string;
342
+ legalBasis: string;
343
+ privacyPolicyUrl: string;
344
+ retentionDays: number;
345
+ }
346
+
347
+ /**
348
+ * Gerencia o ciclo de vida (montagem/desmontagem) do modal de consentimento.
349
+ */
350
+ export declare class ConsentModal {
351
+ private container;
352
+ private root;
353
+ show(props: ConsentModalProps): void;
354
+ close(): void;
355
+ }
356
+
357
+ /**
358
+ * Props do modal de consentimento LGPD exibido antes de qualquer captura de câmera.
359
+ */
360
+ export declare interface ConsentModalProps {
361
+ purpose: string;
362
+ legalBasis: string;
363
+ privacyPolicyUrl: string;
364
+ retentionDays: number;
365
+ onAccept: () => void;
366
+ onDecline: () => void;
367
+ }
368
+
369
+ /**
370
+ * Defaults conservadores usados enquanto `SDKInitOptions` não expõe `consent` (US7.2).
371
+ * Quando essa opção existir, este helper passa a ler `getConfig().consent`.
372
+ */
373
+ export declare const DEFAULT_CONSENT_INFO: ConsentInfo;
374
+
375
+ /**
376
+ * Detecta automaticamente o tipo biométrico na imagem
377
+ * @param imageData Dados da imagem em base64
378
+ * @returns Resultado da detecção com tipo e confiança
379
+ */
380
+ export declare function detectBiometricType(imageData: string): Promise<DetectionResult>;
381
+
382
+ /**
383
+ * Módulo de detecção automática de tipo biométrico
384
+ * Utiliza face-api.js para detectar se a imagem contém face ou mão
385
+ */
386
+ export declare interface DetectionResult {
387
+ type: 'face' | 'hand' | 'unknown';
388
+ confidence: number;
389
+ details?: any;
390
+ }
391
+
392
+ export declare class DocumentCaptureModal {
393
+ private overlay;
394
+ private video;
395
+ private canvas;
396
+ private stream;
397
+ private resolvePromise;
398
+ private options;
399
+ private selectedDocument;
400
+ private currentStep;
401
+ private frontBlob;
402
+ private backBlob;
403
+ constructor(options?: DocumentCaptureOptions);
404
+ open(): Promise<DocumentCaptureResult>;
405
+ private render;
406
+ private createOverlay;
407
+ private renderSelectStep;
408
+ private renderCaptureStep;
409
+ private renderPreviewStep;
410
+ private renderBranding;
411
+ private bindSelectEvents;
412
+ private bindCaptureEvents;
413
+ private handleFileUpload;
414
+ private compressUploadedImage;
415
+ private bindPreviewEvents;
416
+ private bindCloseEvent;
417
+ private startCamera;
418
+ private stopCamera;
419
+ private handleCapture;
420
+ private handleBack;
421
+ private handleRetake;
422
+ private handleConfirm;
423
+ private handleCancel;
424
+ private close;
425
+ private getStyles;
426
+ }
427
+
428
+ export declare interface DocumentCaptureOptions {
429
+ title?: string;
430
+ subtitle?: string;
431
+ useBackCamera?: boolean;
432
+ onCancel?: () => void;
433
+ preSelectedDocument?: DocumentType_2;
434
+ }
435
+
436
+ export declare interface DocumentCaptureResult {
437
+ success: boolean;
438
+ documentType?: DocumentType_2;
439
+ frontImage: Blob | null;
440
+ backImage: Blob | null;
441
+ error?: string;
442
+ }
443
+
444
+ /**
445
+ * Modal de captura de documento para validação de identidade
446
+ * Suporta RG, CNH e CPF com etapas de frente e verso quando aplicável
447
+ */
448
+ declare type DocumentType_2 = 'RG' | 'CNH' | 'CPF';
449
+ export { DocumentType_2 as DocumentType }
450
+
451
+ /**
452
+ * Modal para entrada de email e senha como fallback para login.
453
+ */
454
+ export declare class EmailPasswordModal {
455
+ private options;
456
+ private modalElement;
457
+ constructor(options: EmailPasswordOptions);
458
+ /**
459
+ * Abre o modal de login com email e senha.
460
+ */
461
+ open(): Promise<void>;
462
+ /**
463
+ * Fecha o modal.
464
+ */
465
+ close(): void;
466
+ private createModal;
467
+ private addStyles;
468
+ private handleSubmit;
469
+ }
470
+
471
+ export declare interface EmailPasswordOptions {
472
+ applicationToken: string;
473
+ onSuccess: (result: BiometricLoginResult) => void;
474
+ onError: (error: NeoFaceError) => void;
475
+ onCancel?: () => void;
476
+ title?: string;
477
+ subtitle?: string;
478
+ }
479
+
480
+ /**
481
+ * SDK Global Configuration
482
+ *
483
+ * Este módulo gerencia a configuração global do SDK, permitindo
484
+ * inicialização com detecção automática de ambiente ou override manual.
485
+ */
486
+ export declare type Environment = 'development' | 'sandbox' | 'production';
487
+
488
+ /**
489
+ * Mapeamento de ambientes para URLs base da API
490
+ */
491
+ export declare const ENVIRONMENT_URLS: Record<Environment, string>;
492
+
493
+ /**
494
+ * Tipos padronizados de erro do SDK NeoFace ID.
495
+ * Utilize estes tipos para categorizar e tratar erros de forma consistente.
496
+ */
497
+ export declare enum ErrorType {
498
+ NETWORK = "NetworkError",
499
+ NETWORK_ERROR = "NetworkError",
500
+ INVALID_TOKEN = "InvalidTokenError",
501
+ RECOGNITION_FAILED = "RecognitionFailedError",
502
+ LOGIN_FAILED = "LoginFailedError",
503
+ VALIDATION_ERROR = "ValidationError",
504
+ API_ERROR = "ApiError",
505
+ PERSON_NOT_FOUND = "PersonNotFoundError",
506
+ INITIALIZATION_ERROR = "InitializationError",
507
+ CAMERA_ERROR = "CameraError",
508
+ NO_CAMERA = "NoCameraError",
509
+ CAPTURE_ERROR = "CaptureError",
510
+ NOT_FOUND = "NotFoundError",
511
+ UNKNOWN = "UnknownError",
512
+ CONSENT_DENIED = "ConsentDeniedError"
513
+ }
514
+
515
+ export declare function FaceCaptureModal({ accessToken, onClose, onSuccess }: FaceCaptureModalProps): JSX_2.Element;
516
+
517
+ declare interface FaceCaptureModalProps {
518
+ accessToken: string;
519
+ onClose: () => void;
520
+ onSuccess: (result: RecognitionResult) => void;
521
+ }
522
+
523
+ /**
524
+ * Classe para gerenciar o prompt de fallback
525
+ */
526
+ export declare class FallbackPrompt {
527
+ private container;
528
+ private root;
529
+ /**
530
+ * Exibe o prompt de fallback
531
+ */
532
+ show(error: NeoFaceError | undefined, onRetry: () => void, onCredentials: () => void, onCancel?: () => void, applicationToken?: string): void;
533
+ /**
534
+ * Fecha o prompt
535
+ */
536
+ close(): void;
537
+ /**
538
+ * Renderiza o componente
539
+ */
540
+ private render;
541
+ }
542
+
543
+ /**
544
+ * Modal de recuperação de senha — self-contained, sem dependência de rotas externas.
545
+ * Segue o mesmo padrão visual do EmailPasswordModal (vanilla JS, overlay dark).
546
+ */
547
+ export declare class ForgotPasswordModal {
548
+ private applicationToken;
549
+ private modalElement;
550
+ constructor(applicationToken: string);
551
+ open(): void;
552
+ close(): void;
553
+ private renderEmailForm;
554
+ private renderSuccess;
555
+ private handleSubmit;
556
+ private addStyles;
557
+ }
558
+
559
+ /**
560
+ * Retorna o token de aplicação configurado, se houver.
561
+ */
562
+ export declare function getApplicationToken(): string | null;
563
+
564
+ /**
565
+ * Retorna a URL base configurada para a API.
566
+ * Se o SDK não foi inicializado, retorna o fallback para sandbox.
567
+ */
568
+ export declare function getBaseUrl(): string;
569
+
570
+ /**
571
+ * Retorna toda a configuração atual (para debug).
572
+ */
573
+ export declare function getConfig(): Readonly<SDKConfig>;
574
+
575
+ /**
576
+ * Retorna o ambiente atual configurado.
577
+ */
578
+ export declare function getEnvironment(): Environment | 'custom';
579
+
580
+ /**
581
+ * Identifies a person from an image and returns name and age
582
+ * @param image The image blob to process
583
+ * @param applicationToken The application token for authentication
584
+ * @returns Promise with person name and age
585
+ * @throws NeoFaceError if request fails
586
+ * @throws NeoFaceError if identification fails
587
+ */
588
+ export declare const identifyPerson: (image: Blob, applicationToken: string) => Promise<{
589
+ success: boolean;
590
+ taskId?: string;
591
+ status?: string;
592
+ person?: {
593
+ name: string;
594
+ birth_date: string;
595
+ };
596
+ message?: string;
597
+ }>;
598
+
599
+ /**
600
+ * High-level helper that identifies a person and waits for the result (polling)
601
+ * @param image The image blob to process
602
+ * @param applicationToken The application token
603
+ * @param options Polling options (maxRetries, interval)
604
+ */
605
+ export declare const identifyPersonAsync: (image: Blob, applicationToken: string, options?: {
606
+ maxRetries?: number;
607
+ interval?: number;
608
+ }) => Promise<{
609
+ personFound: boolean;
610
+ person?: {
611
+ name: string;
612
+ birth_date: string;
613
+ };
614
+ }>;
615
+
616
+ /**
617
+ * Inicializa o SDK com as configurações fornecidas.
618
+ * Deve ser chamado uma vez no início da aplicação, antes de usar qualquer função do SDK.
619
+ *
620
+ * @example
621
+ * ```typescript
622
+ * import { init } from '@neofaceid/web-sdk';
623
+ *
624
+ * // Usando ambiente predefinido
625
+ * init({ environment: 'production' });
626
+ *
627
+ * // Usando URL customizada
628
+ * init({ baseUrl: 'https://my-custom-api.com' });
629
+ *
630
+ * // Com token de aplicação
631
+ * init({
632
+ * environment: 'sandbox',
633
+ * applicationToken: 'your-app-token'
634
+ * });
635
+ * ```
636
+ *
637
+ * @param options Opções de inicialização
638
+ */
639
+ export declare function init(options?: SDKInitOptions): void;
640
+
641
+ /**
642
+ * Inicializa o sistema de detecção biométrica
643
+ * Carrega bibliotecas e modelos necessários
644
+ */
645
+ export declare function initializeBiometricDetection(): Promise<void>;
646
+
647
+ /**
648
+ * Verifica se o sistema de detecção está disponível
649
+ * @returns true se a detecção avançada está disponível
650
+ */
651
+ export declare function isAdvancedDetectionAvailable(): boolean;
652
+
653
+ /**
654
+ * Verifica se o SDK foi inicializado.
655
+ */
656
+ export declare function isInitialized(): boolean;
657
+
658
+ /**
659
+ * Options for login recognition
660
+ */
661
+ export declare interface LoginRecognitionOptions {
662
+ biometricData: Blob | Blob[];
663
+ typeOfIdentification: 'FACE' | 'HAND';
664
+ purpose: 'LOGIN' | 'PROOF_OF_LIFE' | 'AUTHORIZATION' | 'SIMPLE_IDENTIFICATION' | 'SIMPLIFIED_REGISTRATION';
665
+ confidenceThreshold?: number;
666
+ }
667
+
668
+ /**
669
+ * Result of login recognition
670
+ */
671
+ export declare interface LoginRecognitionResult {
672
+ success: boolean;
673
+ personName: string;
674
+ email: string;
675
+ cpf: string;
676
+ signature?: string;
677
+ sessionId?: string;
678
+ confidenceScore?: number;
679
+ accessToken?: string;
680
+ }
681
+
682
+ /**
683
+ * Performs biometric login using face recognition
684
+ * @param image The image blob to process
685
+ * @param applicationToken The application token for authentication
686
+ * @returns Promise with login result
687
+ * @throws NeoFaceError if request fails
688
+ */
689
+ export declare const loginWithBiometric: (image: Blob, applicationToken: string) => Promise<BiometricLoginResult>;
690
+
691
+ /**
692
+ * Performs login using email and password
693
+ * @param email User's email
694
+ * @param password User's password
695
+ * @param applicationToken The application token for authentication
696
+ /**
697
+ * @returns Promise with login result
698
+ * @throws NeoFaceError if request fails
699
+ */
700
+ export declare const loginWithEmail: (email: string, password: string, applicationToken: string) => Promise<BiometricLoginResult>;
701
+
702
+ /**
703
+ * Erro customizado do SDK que carrega um tipo semântico.
704
+ * Permite aos consumidores diferenciar falhas por categoria com `error.type`.
705
+ */
706
+ export declare class NeoFaceError extends Error {
707
+ type: ErrorType;
708
+ /**
709
+ * Constrói um erro do SDK com mensagem e tipo categórico.
710
+ * @param message Mensagem descritiva do erro (pode ser técnica)
711
+ * @param type Tipo categórico do erro
712
+ */
713
+ constructor(message: string, type: ErrorType);
714
+ /**
715
+ * Retorna uma mensagem amigável para o usuário final, ocultando termos técnicos.
716
+ */
717
+ getFriendlyMessage(): string;
718
+ }
719
+
720
+ /**
721
+ * NeoFaceID SDK class for biometric authentication
722
+ *
723
+ * This class provides a high-level API for biometric recognition,
724
+ * supporting both internal use (without signature) and external integrations
725
+ * (with signature and session data for systems like OpsPay).
726
+ *
727
+ * @example
728
+ * ```typescript
729
+ * // For external integrations (with signature)
730
+ * const sdk = new NeoFaceID({
731
+ * appToken: 'your-application-token',
732
+ * baseUrl: 'https://core.neofaceid.com',
733
+ * signature: signatureFromBackend,
734
+ * sessionData: {
735
+ * email: 'user@example.com',
736
+ * cpf: '12345678901',
737
+ * sessionId: 'session-uuid-123'
738
+ * }
739
+ * });
740
+ *
741
+ * // For internal use (without signature)
742
+ * const sdk = new NeoFaceID({
743
+ * appToken: 'your-application-token'
744
+ * });
745
+ * ```
746
+ */
747
+ export declare class NeoFaceID {
748
+ private appToken;
749
+ private signature?;
750
+ private sessionData?;
751
+ /**
752
+ * Creates a new NeoFaceID instance
753
+ * @param config Configuration object
754
+ * @throws NeoFaceError if signature format is invalid
755
+ */
756
+ constructor(config: NeoFaceIDConfig);
757
+ /**
758
+ * Validates the format of a signature
759
+ * HMAC-SHA256 produces a 64-character hexadecimal string
760
+ * @param signature The signature to validate
761
+ * @returns true if valid, false otherwise
762
+ */
763
+ private validateSignatureFormat;
764
+ /**
765
+ * Captures multiple face frames for biometric recognition
766
+ * @param options Capture options
767
+ * @returns Promise that resolves to an array of image blobs
768
+ * @throws NeoFaceError if capture fails
769
+ */
770
+ captureFaceFrames(options: CaptureFaceFramesOptions): Promise<Blob[]>;
771
+ /**
772
+ * Performs login recognition using biometric data
773
+ *
774
+ * This method is designed for external integrations that require
775
+ * signature validation and session management.
776
+ *
777
+ * @param options Recognition options
778
+ * @returns Promise that resolves to recognition result
779
+ * @throws NeoFaceError if recognition fails
780
+ *
781
+ * @example
782
+ * ```typescript
783
+ * const result = await sdk.loginRecognition({
784
+ * biometricData: await sdk.captureFaceFrames({
785
+ * numFrames: 5,
786
+ * livenessCheck: true
787
+ * }),
788
+ * typeOfIdentification: 'FACE',
789
+ * purpose: 'LOGIN',
790
+ * confidenceThreshold: 0.8
791
+ * });
792
+ *
793
+ * // Result includes signature and sessionId for callback validation
794
+ * console.log(result.signature, result.sessionId);
795
+ * ```
796
+ */
797
+ loginRecognition(options: LoginRecognitionOptions): Promise<LoginRecognitionResult>;
798
+ /**
799
+ * Register a new application for a consumer
800
+ *
801
+ * This method allows authenticated users to register new applications
802
+ * that will receive their own app_token for API access.
803
+ *
804
+ * @param jwtToken JWT authentication token from logged user
805
+ * @param consumerId Consumer ID (UUID) who will own the application
806
+ * @param applicationData Application registration data
807
+ * @returns Promise with registration result including app_token
808
+ * @throws NeoFaceError if registration fails
809
+ *
810
+ * @example
811
+ * ```typescript
812
+ * const sdk = new NeoFaceID({
813
+ * appToken: 'your-application-token'
814
+ * });
815
+ *
816
+ * const result = await sdk.registerApplication(
817
+ * userJwtToken,
818
+ * consumerUuid,
819
+ * {
820
+ * applicationName: 'My New App',
821
+ * domain: 'example.com',
822
+ * acceptOnlyEmailWithSameDomain: true
823
+ * }
824
+ * );
825
+ *
826
+ * // Use the generated app_token for the new application
827
+ * console.log('New App Token:', result.application.app_token);
828
+ * ```
829
+ */
830
+ registerApplication(jwtToken: string, consumerId: string, applicationData: ApplicationRegistrationData): Promise<ApplicationRegistrationResult>;
831
+ /**
832
+ * Performs Proof of Life verification
833
+ *
834
+ * This method records a video from the camera, sends it to the backend
835
+ * for liveness detection and face recognition, and returns the result
836
+ * with personal data filtered by purpose.
837
+ *
838
+ * The process is asynchronous:
839
+ * 1. Records video from the camera (default 3 seconds)
840
+ * 2. Converts video to base64 and sends to backend
841
+ * 3. Backend processes liveness detection and face recognition
842
+ * 4. Polls for task completion
843
+ * 5. Returns personal data of the identified person
844
+ *
845
+ * @param options Configuration options for the proof of life process
846
+ * @returns Promise that resolves to ProofOfLifeResult
847
+ * @throws NeoFaceError if verification fails
848
+ *
849
+ * @example
850
+ * ```typescript
851
+ * const sdk = new NeoFaceID({
852
+ * appToken: 'your-application-token'
853
+ * });
854
+ *
855
+ * const result = await sdk.proofOfLife({
856
+ * videoDurationMs: 3000, // 3 seconds
857
+ * onRecordingProgress: (progress) => {
858
+ * console.log(`Recording: ${progress}%`);
859
+ * },
860
+ * onTaskStatusChange: (status, progress) => {
861
+ * console.log(`Status: ${status}, Progress: ${progress}%`);
862
+ * }
863
+ * });
864
+ *
865
+ * if (result.success && result.isLive) {
866
+ * console.log('Person verified:', result.personalData);
867
+ * console.log('Liveness score:', result.livenessScore);
868
+ * console.log('Face recognition score:', result.faceRecognitionScore);
869
+ * }
870
+ * ```
871
+ */
872
+ /**
873
+ * Registers document images for an already-registered donor person.
874
+ *
875
+ * Opens the document capture UI (front + optional back), then submits
876
+ * the images to the backend for extraction via DocExt.
877
+ * The backend processes this asynchronously — use the returned `taskId`
878
+ * to poll status if needed.
879
+ *
880
+ * @param personId UUID of the donor's person record
881
+ * @param jwtToken JWT Bearer token of the authenticated donor
882
+ * @param options Optional capture configuration
883
+ * @returns Promise with task_id and processing status
884
+ * @throws NeoFaceError if capture is cancelled, validation fails, or API call fails
885
+ *
886
+ * @example
887
+ * ```typescript
888
+ * const sdk = new NeoFaceID({ appToken: 'your-token' });
889
+ *
890
+ * const result = await sdk.registerDocumentByImage(personId, userJwtToken);
891
+ * console.log('Task ID:', result.taskId); // poll for completion
892
+ * ```
893
+ */
894
+ registerDocumentByImage(personId: string, jwtToken: string, options?: RegisterDocumentByImageOptions): Promise<RegisterDocumentResult>;
895
+ proofOfLife(options?: ProofOfLifeOptions): Promise<ProofOfLifeResult>;
896
+ }
897
+
898
+ /**
899
+ * Configuration for NeoFaceID SDK initialization
900
+ */
901
+ export declare interface NeoFaceIDConfig {
902
+ appToken: string;
903
+ baseUrl?: string;
904
+ signature?: string;
905
+ sessionData?: SessionData;
906
+ }
907
+
908
+ declare interface OnboardingLinkDetails {
909
+ id: string;
910
+ token: string;
911
+ event: string;
912
+ custom_flow_id?: string | null;
913
+ expire: boolean;
914
+ expires_at?: string | null;
915
+ notification: boolean;
916
+ callback_url?: string | null;
917
+ callback_email?: string | null;
918
+ person_name: string;
919
+ person_birth_date: string;
920
+ person_cpf: string;
921
+ person_email: string;
922
+ person_phone?: string | null;
923
+ status: string;
924
+ created_at: string;
925
+ updated_at: string;
926
+ completed_at?: string | null;
927
+ is_valid: boolean;
928
+ is_expired: boolean;
929
+ onboarding_url: string;
930
+ consumer_name?: string;
931
+ }
932
+
933
+ /**
934
+ * Interface para dados da pessoa no onboarding
935
+ */
936
+ export declare interface OnboardingPersonData {
937
+ name?: string;
938
+ birth_date?: string;
939
+ cpf?: string;
940
+ cnpj?: string;
941
+ email?: string;
942
+ }
943
+
944
+ export declare type OverlayStatus = 'preparing' | 'detecting' | 'waiting-for-face' | 'capturing' | 'verifying' | 'success' | 'error';
945
+
946
+ /**
947
+ * Personal data item returned by PROOF_OF_LIFE
948
+ */
949
+ export declare interface PersonalDataItem {
950
+ type: string;
951
+ english_label?: string;
952
+ value: string;
953
+ masked: boolean;
954
+ validated: boolean;
955
+ is_principal_identification?: boolean;
956
+ data_classification?: string;
957
+ }
958
+
959
+ /**
960
+ * Pré-carrega modelos do face-api.js (chame no início da aplicação)
961
+ */
962
+ export declare function preloadFaceDetectionModels(): Promise<void>;
963
+
964
+ /**
965
+ * Options for Proof of Life verification
966
+ */
967
+ export declare interface ProofOfLifeOptions {
968
+ /** Duration of video recording in milliseconds (default: 3000) */
969
+ videoDurationMs?: number;
970
+ /** Maximum polling attempts for task status (default: 60) */
971
+ maxPollingAttempts?: number;
972
+ /** Interval between polling attempts in ms (default: 1000) */
973
+ pollingIntervalMs?: number;
974
+ /** Callback for recording progress (0-100) */
975
+ onRecordingProgress?: (progress: number) => void;
976
+ /** Callback for task status changes */
977
+ onTaskStatusChange?: (status: string, progress?: number) => void;
978
+ }
979
+
980
+ /**
981
+ * Result of PROOF_OF_LIFE operation
982
+ */
983
+ export declare interface ProofOfLifeResult {
984
+ success: boolean;
985
+ isLive: boolean;
986
+ livenessScore: number;
987
+ faceRecognitionScore: number;
988
+ combinedConfidence: number;
989
+ personId?: string;
990
+ personalData: PersonalDataItem[];
991
+ processingTime: number;
992
+ historyId: string;
993
+ taskId: string;
994
+ message?: string;
995
+ error?: string;
996
+ }
997
+
998
+ declare interface RecognitionResult {
999
+ success: boolean;
1000
+ data: {
1001
+ faceId: string;
1002
+ confidence: number;
1003
+ };
1004
+ }
1005
+
1006
+ /**
1007
+ * Recognizes a face from an image and returns user data
1008
+ * @param image The image blob to process
1009
+ * @param applicationToken The application token for authentication
1010
+ * @returns Promise with access token and user payload
1011
+ * @throws NeoFaceError if request fails
1012
+ * @throws NeoFaceError if recognition fails
1013
+ */
1014
+ export declare const recognize: (image: Blob, applicationToken: string) => Promise<{
1015
+ accessToken: string;
1016
+ payload: {
1017
+ name: string;
1018
+ email: string;
1019
+ documentId: string;
1020
+ };
1021
+ }>;
1022
+
1023
+ /**
1024
+ * Performs biometric recognition with liveness check
1025
+ *
1026
+ * Note: person_id is NOT returned for security reasons.
1027
+ * Use recognizeByPurpose for external integrations that require signature validation.
1028
+ *
1029
+ * @param image The image blob to process
1030
+ * @param applicationToken The application token for authentication
1031
+ * @param livenessCheck Whether to perform liveness check (default: true)
1032
+ * @param confidenceThreshold Confidence threshold for recognition (default: 0.8)
1033
+ * @returns Promise with recognition result
1034
+ * @throws NeoFaceError if request fails
1035
+ */
1036
+ export declare const recognizeBiometric: (image: Blob, applicationToken: string, livenessCheck?: boolean, confidenceThreshold?: number) => Promise<{
1037
+ success: boolean;
1038
+ confidenceScore?: number;
1039
+ accessToken?: string;
1040
+ payload?: {
1041
+ name: string;
1042
+ email: string;
1043
+ documentId: string;
1044
+ };
1045
+ }>;
1046
+
1047
+ /**
1048
+ * Performs purpose-specific recognition
1049
+ * @param image The image blob to process
1050
+ * @param applicationToken The application token for authentication
1051
+ * @param purpose Purpose of recognition ('LOGIN', 'PROOF_OF_LIFE', 'AUTHORIZATION', etc.)
1052
+ * @param confidenceThreshold Confidence threshold for recognition (default: 0.8)
1053
+ * @param signature Optional signature for external integrations (HMAC-SHA256 hex string)
1054
+ * @param sessionData Optional session data for external integrations (email, cpf, sessionId)
1055
+ * @returns Promise with recognition result
1056
+ * @throws NeoFaceError if request fails
1057
+ */
1058
+ export declare const recognizeByPurpose: (image: Blob, applicationToken: string, purpose: "LOGIN" | "PROOF_OF_LIFE" | "AUTHORIZATION" | "SIMPLE_IDENTIFICATION" | "SIMPLIFIED_REGISTRATION", confidenceThreshold?: number, signature?: string, sessionData?: SessionData) => Promise<{
1059
+ success: boolean;
1060
+ personName?: string;
1061
+ email?: string;
1062
+ cpf?: string;
1063
+ confidenceScore?: number;
1064
+ accessToken?: string;
1065
+ payload?: any;
1066
+ signature?: string;
1067
+ sessionId?: string;
1068
+ }>;
1069
+
1070
+ /**
1071
+ * NEO-101: Register biometric data for an existing person
1072
+ *
1073
+ * This method registers facial biometric data for a person already in the system.
1074
+ * It validates the image and sends it to the backend.
1075
+ *
1076
+ * @param personId The ID of the person to register biometric data for
1077
+ * @param faceImage The face image blob to register
1078
+ * @param applicationToken The application token for authentication
1079
+ * @returns Promise with registration result
1080
+ * @throws NeoFaceError if request fails
1081
+ * @throws NeoFaceError if validation fails
1082
+ */
1083
+ export declare const registerBiometric: (personId: string, faceImage: Blob, applicationToken: string) => Promise<{
1084
+ success: boolean;
1085
+ message: string;
1086
+ identity_data_id?: string;
1087
+ type_of_identification?: string;
1088
+ have_biometric_data?: boolean;
1089
+ created_at?: string;
1090
+ }>;
1091
+
1092
+ /**
1093
+ * Options for registering a document by image capture
1094
+ */
1095
+ export declare interface RegisterDocumentByImageOptions {
1096
+ /** Pre-select document type, skipping the selection screen */
1097
+ preSelectedDocument?: 'RG' | 'CNH' | 'CPF';
1098
+ /** Use back camera for capture (default: true) */
1099
+ useBackCamera?: boolean;
1100
+ }
1101
+
1102
+ /**
1103
+ * Result of a document registration request
1104
+ */
1105
+ export declare interface RegisterDocumentResult {
1106
+ success: boolean;
1107
+ taskId: string;
1108
+ status: string;
1109
+ message: string;
1110
+ }
1111
+
1112
+ /**
1113
+ * Register a person with face biometric data and liveness detection
1114
+ * @param personData Person registration data
1115
+ * @param facePhotos Array of face photos for biometric registration (up to 5 photos)
1116
+ * @param applicationToken The application token for authentication
1117
+ * @param options Optional document images
1118
+ * @returns Promise with registration result
1119
+ */
1120
+ export declare const registerPersonWithBiometric: (personData: {
1121
+ name: string;
1122
+ birth_date: string;
1123
+ cpf: string;
1124
+ email: string;
1125
+ password: string;
1126
+ is_pep?: boolean;
1127
+ }, facePhotos: Blob[], applicationToken: string, options?: {
1128
+ documentFront?: Blob;
1129
+ documentBack?: Blob;
1130
+ documentType?: string;
1131
+ }) => Promise<{
1132
+ success: boolean;
1133
+ message: string;
1134
+ person_id?: string;
1135
+ user_id?: string;
1136
+ person_validated?: boolean;
1137
+ face_processing?: any;
1138
+ onboarding_link?: string;
1139
+ task_id?: string;
1140
+ status?: string;
1141
+ }>;
1142
+
1143
+ /**
1144
+ * Register a person without face biometric data
1145
+ * @param personData Person registration data
1146
+ * @param applicationToken The application token for authentication
1147
+ * @param options Optional document images
1148
+ * @returns Promise with registration result
1149
+ */
1150
+ export declare const registerPersonWithoutFace: (personData: {
1151
+ name: string;
1152
+ birth_date: string;
1153
+ cpf: string;
1154
+ email: string;
1155
+ password: string;
1156
+ is_pep?: boolean;
1157
+ }, applicationToken: string, options?: {
1158
+ documentFront?: Blob;
1159
+ documentBack?: Blob;
1160
+ documentType?: string;
1161
+ }) => Promise<{
1162
+ success: boolean;
1163
+ message: string;
1164
+ person_id?: string;
1165
+ user_id?: string;
1166
+ person_validated?: boolean;
1167
+ onboarding_link?: string;
1168
+ data?: any;
1169
+ }>;
1170
+
1171
+ /**
1172
+ * Data de lançamento da versão atual
1173
+ */
1174
+ export declare const RELEASE_DATE = "2026-08-29";
1175
+
1176
+ /**
1177
+ * Exibe o modal de consentimento e resolve `true` se o titular aceitou,
1178
+ * `false` se recusou. Deve ser chamado antes de qualquer `getUserMedia()`.
1179
+ */
1180
+ export declare function requestConsent(info?: Partial<ConsentInfo>): Promise<boolean>;
1181
+
1182
+ /**
1183
+ * Request a password reset for a user account
1184
+ * @param email User email address
1185
+ * @param applicationToken Application token
1186
+ */
1187
+ export declare function requestPasswordReset(email: string, applicationToken: string): Promise<{
1188
+ message: string;
1189
+ }>;
1190
+
1191
+ /**
1192
+ * Configuração interna do SDK
1193
+ */
1194
+ declare interface SDKConfig {
1195
+ baseUrl: string;
1196
+ applicationToken: string | null;
1197
+ environment: Environment | 'custom';
1198
+ initialized: boolean;
1199
+ }
1200
+
1201
+ /**
1202
+ * Opções de inicialização do SDK
1203
+ */
1204
+ export declare interface SDKInitOptions {
1205
+ /**
1206
+ * Ambiente da aplicação. Se fornecido, a URL base será determinada automaticamente.
1207
+ * Pode ser 'development', 'sandbox' ou 'production'.
1208
+ */
1209
+ environment?: Environment;
1210
+ /**
1211
+ * URL base da API. Se fornecido, tem precedência sobre 'environment'.
1212
+ * Útil para ambientes customizados ou testes.
1213
+ */
1214
+ baseUrl?: string;
1215
+ /**
1216
+ * Token de aplicação para autenticação com a API.
1217
+ * Obtido através do painel administrativo do NeoFaceID.
1218
+ */
1219
+ applicationToken?: string;
1220
+ }
1221
+
1222
+ /**
1223
+ * Session data interface for external integrations
1224
+ */
1225
+ export declare interface SessionData {
1226
+ email: string;
1227
+ cpf: string;
1228
+ sessionId: string;
1229
+ }
1230
+
1231
+ /**
1232
+ * Performs simple identification using document data
1233
+ * @param documentType Type of document (e.g., 'CPF')
1234
+ * @param documentNumber Document number
1235
+ * @param applicationToken The application token for authentication
1236
+ * @param purpose Purpose of identification (default: 'LOGIN')
1237
+ * @returns Promise with identification result
1238
+ * @throws NeoFaceError if request fails
1239
+ */
1240
+ export declare const simpleIdentification: (documentType: string, documentNumber: string, applicationToken: string, purpose?: string) => Promise<{
1241
+ success: boolean;
1242
+ personId?: string;
1243
+ accessToken?: string;
1244
+ payload?: {
1245
+ name: string;
1246
+ email: string;
1247
+ documentId: string;
1248
+ };
1249
+ }>;
1250
+
1251
+ export declare function start(applicationToken: string, callbacks: Callbacks): void;
1252
+
1253
+ /**
1254
+ * Inicia o processo de login com detecção automática do tipo biométrico
1255
+ * @param options Opções de configuração para o login automático
1256
+ */
1257
+ export declare function startAutoLogin(options: BiometricLoginOptions): Promise<void>;
1258
+
1259
+ /**
1260
+ * Start biometric registration process with liveness detection
1261
+ * @param personData Person registration data (name, cpf, birth_date, email, password)
1262
+ * @param applicationToken Application token for authentication
1263
+ * @param callbacks Success and error callbacks
1264
+ */
1265
+ export declare function startBiometricRegistration(personData: {
1266
+ name: string;
1267
+ birth_date: string;
1268
+ cpf: string;
1269
+ email: string;
1270
+ password: string;
1271
+ }, applicationToken: string, callbacks: BiometricRegistrationCallbacks, options?: {
1272
+ useRealApi?: boolean;
1273
+ }): void;
1274
+
1275
+ /**
1276
+ * Função auxiliar para iniciar a captura de documento
1277
+ */
1278
+ export declare const startDocumentCapture: (options?: DocumentCaptureOptions) => Promise<DocumentCaptureResult>;
1279
+
1280
+ /**
1281
+ * Inicia o processo de login usando reconhecimento facial
1282
+ * Usa overlay minimalista estilo FaceID (não mostra câmera)
1283
+ * @param options Opções de configuração para o login facial
1284
+ */
1285
+ export declare function startFaceLogin(options: BiometricLoginOptions): Promise<void>;
1286
+
1287
+ /**
1288
+ * Inicia o processo de login usando reconhecimento de mão
1289
+ * @param options Opções de configuração para o login por mão
1290
+ */
1291
+ export declare function startHandLogin(options: BiometricLoginOptions): Promise<void>;
1292
+
1293
+ /**
1294
+ * Start liveness capture process only (no registration)
1295
+ * @param applicationToken Application token for authentication
1296
+ * @param callbacks Success and error callbacks
1297
+ */
1298
+ export declare function startLivenessCapture(applicationToken: string, callbacks: {
1299
+ onSuccess(photos: Blob[]): void;
1300
+ onError(code: string, message: string): void;
1301
+ onCancel?(): void;
1302
+ }): void;
1303
+
1304
+ /**
1305
+ * Inicia o fluxo de onboarding: valida token, captura face e documento, conclui no backend.
1306
+ * Este método orquestra o processo completo e expõe callbacks de sucesso/erro.
1307
+ */
1308
+ export declare const startOnboarding: (options: StartOnboardingOptions) => Promise<void>;
1309
+
1310
+ export declare interface StartOnboardingOptions {
1311
+ applicationToken: string;
1312
+ onboardingToken: string;
1313
+ countdown?: number;
1314
+ title?: string;
1315
+ subtitle?: string;
1316
+ onSuccess: (result: {
1317
+ success: boolean;
1318
+ message: string;
1319
+ person_id?: string;
1320
+ identity_data_id?: string;
1321
+ confidence_score?: number;
1322
+ processing_time?: number;
1323
+ details: OnboardingLinkDetails;
1324
+ }) => void;
1325
+ onError: (error: NeoFaceError) => void;
1326
+ onCancel?: () => void;
1327
+ }
1328
+
1329
+ /**
1330
+ * Result of user existence check
1331
+ */
1332
+ declare interface UserExistenceResult {
1333
+ success: boolean;
1334
+ message: string;
1335
+ data: {
1336
+ exists: boolean;
1337
+ };
1338
+ }
1339
+
1340
+ /**
1341
+ * Valida se um token de onboarding é válido
1342
+ * @param applicationToken Token da aplicação (header `X-App-Token`)
1343
+ * @param onboardingToken Token do link de onboarding a ser validado
1344
+ * @returns Promise que resolve para true se o token é válido, false caso contrário
1345
+ * @throws NeoFaceError em caso de falha de rede ou autorização
1346
+ */
1347
+ export declare const validateOnboardingToken: (applicationToken: string, onboardingToken: string) => Promise<boolean>;
1348
+
1349
+ /**
1350
+ * Validates an application token
1351
+ * @param applicationToken The application token to validate
1352
+ * @returns Promise that resolves to true if token is valid, false otherwise
1353
+ * @throws NeoFaceError if request fails
1354
+ */
1355
+ export declare const validateToken: (applicationToken: string) => Promise<boolean>;
1356
+
1357
+ /**
1358
+ * Versão atual do SDK NeoFace ID Web
1359
+ * Formato: MAJOR.MINOR.PATCH
1360
+ *
1361
+ * MAJOR: Incrementado quando há mudanças incompatíveis com versões anteriores
1362
+ * MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
1363
+ * PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
1364
+ */
1365
+ export declare const VERSION = "1.25.5";
1366
+
1367
+ export { }