@neofaceid/web-sdk 1.30.0 → 1.32.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.
package/dist/index.d.ts CHANGED
@@ -47,6 +47,15 @@ export declare interface AuthorizationResult {
47
47
  message?: string;
48
48
  }
49
49
 
50
+ /**
51
+ * NeoFaceSDK.authorize — autoriza uma operação por biometria, orquestrando
52
+ * consent + captura + desafio de vivacidade (via runLivenessChallenge, NEO-408).
53
+ *
54
+ * O servidor sorteia a sequência de gestos, valida cada frame enviado e decide
55
+ * o resultado. O SDK apenas exibe e coleta ("client collects, server decides").
56
+ */
57
+ export declare function authorize(options: AuthorizeOptions): Promise<void>;
58
+
50
59
  /**
51
60
  * NEO-108: Authorization operation with multi-photo capture and gesture detection
52
61
  *
@@ -64,6 +73,26 @@ export declare interface AuthorizationResult {
64
73
  */
65
74
  export declare const authorizeOperation: (applicationToken: string, cpf: string, options?: AuthorizationOptions) => Promise<AuthorizationResult>;
66
75
 
76
+ export declare interface AuthorizeOptions {
77
+ applicationToken: string;
78
+ /** Titular sendo autorizado (CPF, e-mail ou id opaco). */
79
+ subject: string;
80
+ /** Nome do integrador (fallback: `init({ appName })`). */
81
+ appName?: string;
82
+ /**
83
+ * Número máximo de desafios (0-3). O servidor decide a sequência (NEO-408
84
+ * runLivenessChallenge) — este campo é apenas um teto sugerido ao backend.
85
+ */
86
+ challenges?: 0 | 1 | 2 | 3;
87
+ /** Valor monetário exibido no header. Ex.: 1250 = "R$ 1.250,00". */
88
+ amount?: number;
89
+ onChallengeStart?: (gesture: ChallengeGesture, index: number, total: number) => void;
90
+ onChallengeComplete?: (gesture: ChallengeGesture, index: number, total: number) => void;
91
+ onSuccess?: (result: LivenessChallengeResult) => void;
92
+ onError?: (error: NeoFaceError) => void;
93
+ onCancel?: () => void;
94
+ }
95
+
67
96
  export declare class BiometricCaptureModal {
68
97
  private modal;
69
98
  private video;
@@ -90,9 +119,11 @@ export declare class BiometricCaptureModal {
90
119
  */
91
120
  private initializeCamera;
92
121
  /**
93
- * Inicia a contagem regressiva
122
+ * NEO-413 · US14.6 (item 18) — a contagem "3, 2, 1" foi removida.
123
+ * Agora habilita direto o botão "Capturar" assim que a câmera fica pronta.
124
+ * Vivacidade fica com o desafio `runLivenessChallenge` (NEO-408), servidor decide.
94
125
  */
95
- private startCountdown;
126
+ private enableCaptureButton;
96
127
  /**
97
128
  * Captura a imagem da câmera
98
129
  */
@@ -1595,7 +1626,7 @@ export declare const validateToken: (applicationToken: string) => Promise<boolea
1595
1626
  * MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
1596
1627
  * PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
1597
1628
  */
1598
- export declare const VERSION = "1.30.0";
1629
+ export declare const VERSION = "1.32.0";
1599
1630
 
1600
1631
  /**
1601
1632
  * Executa `fn(sessionId)`. Se o servidor devolver 410 (sessão consumida/expirada),