@dynamicore/jumio-sdk 1.0.0 → 1.0.2
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/README.md +238 -160
- package/dist/client-BwEiGMPy.d.mts +515 -0
- package/dist/client-BwEiGMPy.d.ts +515 -0
- package/dist/core/index.d.mts +94 -4
- package/dist/core/index.d.ts +94 -4
- package/dist/core/index.js +545 -125
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +506 -83
- package/dist/core/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +747 -126
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +706 -83
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +146 -2
- package/dist/react/index.d.ts +146 -2
- package/dist/react/index.js +766 -142
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +766 -143
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/client-BR1xIZ0X.d.mts +0 -252
- package/dist/client-BR1xIZ0X.d.ts +0 -252
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Estados posibles del flujo de verificación en Jumio.
|
|
5
|
-
*/
|
|
6
|
-
type JumioWorkflowStatus = "PENDING" | "INITIATED" | "ACQUIRED" | "SUBMITTED" | "PROCESSED" | "APPROVED_VERIFIED" | "REJECTED" | "FAILED" | "ERROR" | "DENIED" | "EXPIRED" | "ABANDONED" | (string & {});
|
|
7
|
-
/**
|
|
8
|
-
* Tipos de entrada soportados para las imágenes del documento.
|
|
9
|
-
*/
|
|
10
|
-
type ImageSource = string | Blob | File | ArrayBuffer | Uint8Array | {
|
|
11
|
-
url?: unknown;
|
|
12
|
-
} | {
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Función personalizada para firmar URLs de S3 o descargar recursos privados.
|
|
17
|
-
*/
|
|
18
|
-
type S3SignerFunction = (pathOrUrl: string, expires?: number) => Promise<string | {
|
|
19
|
-
url?: unknown;
|
|
20
|
-
} | unknown>;
|
|
21
|
-
/**
|
|
22
|
-
* Función o valor para proveer el token de autenticación.
|
|
23
|
-
*/
|
|
24
|
-
type AuthTokenProvider = string | (() => string | undefined | null | Promise<string | undefined | null>);
|
|
25
|
-
/**
|
|
26
|
-
* Opciones de configuración para instanciar el cliente JumioClient.
|
|
27
|
-
*/
|
|
28
|
-
interface JumioClientConfig {
|
|
29
|
-
/**
|
|
30
|
-
* URL base de la API de DynamiCore / Backend.
|
|
31
|
-
* @default "https://front.dynamicore.io"
|
|
32
|
-
*/
|
|
33
|
-
baseUrl?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Endpoint específico del servicio de verificación Jumio.
|
|
36
|
-
* @default "/marketplace/apps/jumio"
|
|
37
|
-
*/
|
|
38
|
-
endpoint?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Header de contexto moral / negocio enviado en las peticiones.
|
|
41
|
-
*/
|
|
42
|
-
context?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Token de autenticación o función que lo obtiene.
|
|
45
|
-
*/
|
|
46
|
-
authToken?: AuthTokenProvider;
|
|
47
|
-
/**
|
|
48
|
-
* Prefijo para el header Authorization (por defecto vacío o "Bearer ").
|
|
49
|
-
* @default ""
|
|
50
|
-
*/
|
|
51
|
-
authTokenPrefix?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Timeout en milisegundos para las peticiones POST de verificación.
|
|
54
|
-
* @default 180000 (3 minutos)
|
|
55
|
-
*/
|
|
56
|
-
requestTimeout?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Timeout en milisegundos para las peticiones GET de status.
|
|
59
|
-
* @default 120000 (2 minutos)
|
|
60
|
-
*/
|
|
61
|
-
statusTimeout?: number;
|
|
62
|
-
/**
|
|
63
|
-
* Número máximo de reintentos ante timeouts o fallas transitorias de red.
|
|
64
|
-
* @default 3
|
|
65
|
-
*/
|
|
66
|
-
maxRetries?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Delay base en milisegundos para el backoff exponencial de reintentos.
|
|
69
|
-
* @default 800
|
|
70
|
-
*/
|
|
71
|
-
retryDelayMs?: number;
|
|
72
|
-
/**
|
|
73
|
-
* Intervalo en milisegundos entre consultas sucesivas de sondeo (polling).
|
|
74
|
-
* @default 10000 (10 segundos)
|
|
75
|
-
*/
|
|
76
|
-
pollingIntervalMs?: number;
|
|
77
|
-
/**
|
|
78
|
-
* Número máximo de intentos de sondeo antes de timeout.
|
|
79
|
-
* @default 20 (20 x 10s = aprox 200 segundos)
|
|
80
|
-
*/
|
|
81
|
-
maxPollingAttempts?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Función opcional para firmar rutas u URLs de Amazon S3.
|
|
84
|
-
*/
|
|
85
|
-
s3Signer?: S3SignerFunction;
|
|
86
|
-
/**
|
|
87
|
-
* Headers HTTP adicionales para incluir en cada petición.
|
|
88
|
-
*/
|
|
89
|
-
customHeaders?: Record<string, string>;
|
|
90
|
-
/**
|
|
91
|
-
* Instancia personalizada de Axios (opcional).
|
|
92
|
-
*/
|
|
93
|
-
axiosInstance?: AxiosInstance;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Payload enviado a la API de verificación de Jumio.
|
|
97
|
-
*/
|
|
98
|
-
interface JumioVerificationPayload {
|
|
99
|
-
client: string;
|
|
100
|
-
front_image_b64: string;
|
|
101
|
-
back_image_b64: string;
|
|
102
|
-
[key: string]: unknown;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Estructura de respuesta de datos de verificación.
|
|
106
|
-
*/
|
|
107
|
-
interface JumioVerificationData {
|
|
108
|
-
valid?: boolean;
|
|
109
|
-
status?: JumioWorkflowStatus;
|
|
110
|
-
workflowStatus?: JumioWorkflowStatus;
|
|
111
|
-
decision?: string;
|
|
112
|
-
accountId?: string;
|
|
113
|
-
workflowId?: string;
|
|
114
|
-
message?: string;
|
|
115
|
-
[key: string]: unknown;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Estructura inicial devuelta al iniciar el flujo de verificación.
|
|
119
|
-
*/
|
|
120
|
-
interface JumioIneStartData extends JumioVerificationData {
|
|
121
|
-
accountId?: string;
|
|
122
|
-
workflowId?: string;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Resultado estructurado retornado por el cliente tras una validación.
|
|
126
|
-
*/
|
|
127
|
-
interface VerifyIneResult {
|
|
128
|
-
/**
|
|
129
|
-
* Indica si la validación fue exitosa (true) o fallida/rechazada (false).
|
|
130
|
-
*/
|
|
131
|
-
valid: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Estado actual o final del flujo de Jumio.
|
|
134
|
-
*/
|
|
135
|
-
status?: JumioWorkflowStatus;
|
|
136
|
-
/**
|
|
137
|
-
* Identificador de cuenta en Jumio.
|
|
138
|
-
*/
|
|
139
|
-
accountId?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Identificador del workflow en Jumio.
|
|
142
|
-
*/
|
|
143
|
-
workflowId?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Datos completos devueltos por la API de Jumio/DynamiCore.
|
|
146
|
-
*/
|
|
147
|
-
data: unknown;
|
|
148
|
-
/**
|
|
149
|
-
* Mensaje descriptivo o de error si la validación falló.
|
|
150
|
-
*/
|
|
151
|
-
errorMessage?: string;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Callback ejecutado cuando el sondeo resuelve un estado final.
|
|
155
|
-
*/
|
|
156
|
-
type JumioStatusResolvedCallback = (result: VerifyIneResult) => void;
|
|
157
|
-
/**
|
|
158
|
-
* Callback ejecutado si ocurre un error durante el sondeo o la petición.
|
|
159
|
-
*/
|
|
160
|
-
type JumioStatusErrorCallback = (error: Error) => void;
|
|
161
|
-
/**
|
|
162
|
-
* Callback de progreso para reportar avances de conversión o polling.
|
|
163
|
-
*/
|
|
164
|
-
type JumioProgressCallback = (stage: string, percent?: number) => void;
|
|
165
|
-
/**
|
|
166
|
-
* Parámetros de entrada para la función `verifyIne`.
|
|
167
|
-
*/
|
|
168
|
-
interface VerifyIneInput {
|
|
169
|
-
/**
|
|
170
|
-
* Identificador único del cliente (persona, usuario o ID externo).
|
|
171
|
-
*/
|
|
172
|
-
clientId: string;
|
|
173
|
-
/**
|
|
174
|
-
* Imagen frontal del documento (INE): URL, ruta S3, File, Blob o Base64.
|
|
175
|
-
*/
|
|
176
|
-
frontImage: ImageSource;
|
|
177
|
-
/**
|
|
178
|
-
* Imagen trasera/reverso del documento (INE): URL, ruta S3, File, Blob o Base64.
|
|
179
|
-
*/
|
|
180
|
-
backImage: ImageSource;
|
|
181
|
-
/**
|
|
182
|
-
* Si es `true`, la promesa espera hasta que Jumio resuelva el resultado final (bloqueante).
|
|
183
|
-
* Si es `false` (por defecto), inicia la validación, retorna de inmediato y ejecuta el sondeo en 2do plano.
|
|
184
|
-
* @default false
|
|
185
|
-
*/
|
|
186
|
-
awaitFinalStatus?: boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Callback invocado cuando se completa el proceso de validación (síncrono o en segundo plano).
|
|
189
|
-
*/
|
|
190
|
-
onStatusResolved?: JumioStatusResolvedCallback;
|
|
191
|
-
/**
|
|
192
|
-
* Callback invocado ante errores no recuperables durante la validación o sondeo.
|
|
193
|
-
*/
|
|
194
|
-
onStatusError?: JumioStatusErrorCallback;
|
|
195
|
-
/**
|
|
196
|
-
* Callback opcional para reportar etapas del proceso.
|
|
197
|
-
*/
|
|
198
|
-
onProgress?: JumioProgressCallback;
|
|
199
|
-
/**
|
|
200
|
-
* Señal de cancelación (AbortSignal) para abortar peticiones o sondeo activo.
|
|
201
|
-
*/
|
|
202
|
-
signal?: AbortSignal;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Opciones para el método de polling de estado.
|
|
206
|
-
*/
|
|
207
|
-
interface PollStatusOptions {
|
|
208
|
-
pollingIntervalMs?: number;
|
|
209
|
-
maxAttempts?: number;
|
|
210
|
-
signal?: AbortSignal;
|
|
211
|
-
onAttempt?: (attempt: number, maxAttempts: number, lastData: unknown) => void;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Cliente principal para gestionar validaciones de identidad mediante Jumio.
|
|
216
|
-
*/
|
|
217
|
-
declare class JumioClient {
|
|
218
|
-
private readonly http;
|
|
219
|
-
private readonly config;
|
|
220
|
-
constructor(config?: JumioClientConfig);
|
|
221
|
-
/**
|
|
222
|
-
* Inicia el proceso de verificación convirtiendo las imágenes y enviando el payload inicial a Jumio.
|
|
223
|
-
*/
|
|
224
|
-
startIneVerification(params: {
|
|
225
|
-
clientId: string;
|
|
226
|
-
frontImage: ImageSource;
|
|
227
|
-
backImage: ImageSource;
|
|
228
|
-
signal?: AbortSignal;
|
|
229
|
-
onProgress?: JumioProgressCallback;
|
|
230
|
-
}): Promise<JumioIneStartData>;
|
|
231
|
-
/**
|
|
232
|
-
* Consulta una única vez el estado actual de la validación.
|
|
233
|
-
*/
|
|
234
|
-
getIneStatus(accountId: string, workflowId: string, signal?: AbortSignal): Promise<JumioVerificationData>;
|
|
235
|
-
/**
|
|
236
|
-
* Sondea periódicamente el estado hasta obtener un resultado definitivo.
|
|
237
|
-
*/
|
|
238
|
-
pollIneStatus(accountId: string, workflowId: string, options?: PollStatusOptions): Promise<VerifyIneResult>;
|
|
239
|
-
/**
|
|
240
|
-
* Ejecuta el flujo completo de validación de INE.
|
|
241
|
-
*
|
|
242
|
-
* @param input Parámetros de validación y callbacks.
|
|
243
|
-
* @returns `VerifyIneResult` con el resultado inicial o definitivo según `awaitFinalStatus`.
|
|
244
|
-
*/
|
|
245
|
-
verifyIne(input: VerifyIneInput): Promise<VerifyIneResult>;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Fábrica para crear una nueva instancia de `JumioClient`.
|
|
249
|
-
*/
|
|
250
|
-
declare function createJumioClient(config?: JumioClientConfig): JumioClient;
|
|
251
|
-
|
|
252
|
-
export { type AuthTokenProvider as A, type ImageSource as I, JumioClient as J, type PollStatusOptions as P, type S3SignerFunction as S, type VerifyIneInput as V, type JumioClientConfig as a, type JumioIneStartData as b, type JumioProgressCallback as c, type JumioStatusErrorCallback as d, type JumioStatusResolvedCallback as e, type JumioVerificationData as f, type JumioVerificationPayload as g, type JumioWorkflowStatus as h, type VerifyIneResult as i, createJumioClient as j };
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Estados posibles del flujo de verificación en Jumio.
|
|
5
|
-
*/
|
|
6
|
-
type JumioWorkflowStatus = "PENDING" | "INITIATED" | "ACQUIRED" | "SUBMITTED" | "PROCESSED" | "APPROVED_VERIFIED" | "REJECTED" | "FAILED" | "ERROR" | "DENIED" | "EXPIRED" | "ABANDONED" | (string & {});
|
|
7
|
-
/**
|
|
8
|
-
* Tipos de entrada soportados para las imágenes del documento.
|
|
9
|
-
*/
|
|
10
|
-
type ImageSource = string | Blob | File | ArrayBuffer | Uint8Array | {
|
|
11
|
-
url?: unknown;
|
|
12
|
-
} | {
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Función personalizada para firmar URLs de S3 o descargar recursos privados.
|
|
17
|
-
*/
|
|
18
|
-
type S3SignerFunction = (pathOrUrl: string, expires?: number) => Promise<string | {
|
|
19
|
-
url?: unknown;
|
|
20
|
-
} | unknown>;
|
|
21
|
-
/**
|
|
22
|
-
* Función o valor para proveer el token de autenticación.
|
|
23
|
-
*/
|
|
24
|
-
type AuthTokenProvider = string | (() => string | undefined | null | Promise<string | undefined | null>);
|
|
25
|
-
/**
|
|
26
|
-
* Opciones de configuración para instanciar el cliente JumioClient.
|
|
27
|
-
*/
|
|
28
|
-
interface JumioClientConfig {
|
|
29
|
-
/**
|
|
30
|
-
* URL base de la API de DynamiCore / Backend.
|
|
31
|
-
* @default "https://front.dynamicore.io"
|
|
32
|
-
*/
|
|
33
|
-
baseUrl?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Endpoint específico del servicio de verificación Jumio.
|
|
36
|
-
* @default "/marketplace/apps/jumio"
|
|
37
|
-
*/
|
|
38
|
-
endpoint?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Header de contexto moral / negocio enviado en las peticiones.
|
|
41
|
-
*/
|
|
42
|
-
context?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Token de autenticación o función que lo obtiene.
|
|
45
|
-
*/
|
|
46
|
-
authToken?: AuthTokenProvider;
|
|
47
|
-
/**
|
|
48
|
-
* Prefijo para el header Authorization (por defecto vacío o "Bearer ").
|
|
49
|
-
* @default ""
|
|
50
|
-
*/
|
|
51
|
-
authTokenPrefix?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Timeout en milisegundos para las peticiones POST de verificación.
|
|
54
|
-
* @default 180000 (3 minutos)
|
|
55
|
-
*/
|
|
56
|
-
requestTimeout?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Timeout en milisegundos para las peticiones GET de status.
|
|
59
|
-
* @default 120000 (2 minutos)
|
|
60
|
-
*/
|
|
61
|
-
statusTimeout?: number;
|
|
62
|
-
/**
|
|
63
|
-
* Número máximo de reintentos ante timeouts o fallas transitorias de red.
|
|
64
|
-
* @default 3
|
|
65
|
-
*/
|
|
66
|
-
maxRetries?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Delay base en milisegundos para el backoff exponencial de reintentos.
|
|
69
|
-
* @default 800
|
|
70
|
-
*/
|
|
71
|
-
retryDelayMs?: number;
|
|
72
|
-
/**
|
|
73
|
-
* Intervalo en milisegundos entre consultas sucesivas de sondeo (polling).
|
|
74
|
-
* @default 10000 (10 segundos)
|
|
75
|
-
*/
|
|
76
|
-
pollingIntervalMs?: number;
|
|
77
|
-
/**
|
|
78
|
-
* Número máximo de intentos de sondeo antes de timeout.
|
|
79
|
-
* @default 20 (20 x 10s = aprox 200 segundos)
|
|
80
|
-
*/
|
|
81
|
-
maxPollingAttempts?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Función opcional para firmar rutas u URLs de Amazon S3.
|
|
84
|
-
*/
|
|
85
|
-
s3Signer?: S3SignerFunction;
|
|
86
|
-
/**
|
|
87
|
-
* Headers HTTP adicionales para incluir en cada petición.
|
|
88
|
-
*/
|
|
89
|
-
customHeaders?: Record<string, string>;
|
|
90
|
-
/**
|
|
91
|
-
* Instancia personalizada de Axios (opcional).
|
|
92
|
-
*/
|
|
93
|
-
axiosInstance?: AxiosInstance;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Payload enviado a la API de verificación de Jumio.
|
|
97
|
-
*/
|
|
98
|
-
interface JumioVerificationPayload {
|
|
99
|
-
client: string;
|
|
100
|
-
front_image_b64: string;
|
|
101
|
-
back_image_b64: string;
|
|
102
|
-
[key: string]: unknown;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Estructura de respuesta de datos de verificación.
|
|
106
|
-
*/
|
|
107
|
-
interface JumioVerificationData {
|
|
108
|
-
valid?: boolean;
|
|
109
|
-
status?: JumioWorkflowStatus;
|
|
110
|
-
workflowStatus?: JumioWorkflowStatus;
|
|
111
|
-
decision?: string;
|
|
112
|
-
accountId?: string;
|
|
113
|
-
workflowId?: string;
|
|
114
|
-
message?: string;
|
|
115
|
-
[key: string]: unknown;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Estructura inicial devuelta al iniciar el flujo de verificación.
|
|
119
|
-
*/
|
|
120
|
-
interface JumioIneStartData extends JumioVerificationData {
|
|
121
|
-
accountId?: string;
|
|
122
|
-
workflowId?: string;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Resultado estructurado retornado por el cliente tras una validación.
|
|
126
|
-
*/
|
|
127
|
-
interface VerifyIneResult {
|
|
128
|
-
/**
|
|
129
|
-
* Indica si la validación fue exitosa (true) o fallida/rechazada (false).
|
|
130
|
-
*/
|
|
131
|
-
valid: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Estado actual o final del flujo de Jumio.
|
|
134
|
-
*/
|
|
135
|
-
status?: JumioWorkflowStatus;
|
|
136
|
-
/**
|
|
137
|
-
* Identificador de cuenta en Jumio.
|
|
138
|
-
*/
|
|
139
|
-
accountId?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Identificador del workflow en Jumio.
|
|
142
|
-
*/
|
|
143
|
-
workflowId?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Datos completos devueltos por la API de Jumio/DynamiCore.
|
|
146
|
-
*/
|
|
147
|
-
data: unknown;
|
|
148
|
-
/**
|
|
149
|
-
* Mensaje descriptivo o de error si la validación falló.
|
|
150
|
-
*/
|
|
151
|
-
errorMessage?: string;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Callback ejecutado cuando el sondeo resuelve un estado final.
|
|
155
|
-
*/
|
|
156
|
-
type JumioStatusResolvedCallback = (result: VerifyIneResult) => void;
|
|
157
|
-
/**
|
|
158
|
-
* Callback ejecutado si ocurre un error durante el sondeo o la petición.
|
|
159
|
-
*/
|
|
160
|
-
type JumioStatusErrorCallback = (error: Error) => void;
|
|
161
|
-
/**
|
|
162
|
-
* Callback de progreso para reportar avances de conversión o polling.
|
|
163
|
-
*/
|
|
164
|
-
type JumioProgressCallback = (stage: string, percent?: number) => void;
|
|
165
|
-
/**
|
|
166
|
-
* Parámetros de entrada para la función `verifyIne`.
|
|
167
|
-
*/
|
|
168
|
-
interface VerifyIneInput {
|
|
169
|
-
/**
|
|
170
|
-
* Identificador único del cliente (persona, usuario o ID externo).
|
|
171
|
-
*/
|
|
172
|
-
clientId: string;
|
|
173
|
-
/**
|
|
174
|
-
* Imagen frontal del documento (INE): URL, ruta S3, File, Blob o Base64.
|
|
175
|
-
*/
|
|
176
|
-
frontImage: ImageSource;
|
|
177
|
-
/**
|
|
178
|
-
* Imagen trasera/reverso del documento (INE): URL, ruta S3, File, Blob o Base64.
|
|
179
|
-
*/
|
|
180
|
-
backImage: ImageSource;
|
|
181
|
-
/**
|
|
182
|
-
* Si es `true`, la promesa espera hasta que Jumio resuelva el resultado final (bloqueante).
|
|
183
|
-
* Si es `false` (por defecto), inicia la validación, retorna de inmediato y ejecuta el sondeo en 2do plano.
|
|
184
|
-
* @default false
|
|
185
|
-
*/
|
|
186
|
-
awaitFinalStatus?: boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Callback invocado cuando se completa el proceso de validación (síncrono o en segundo plano).
|
|
189
|
-
*/
|
|
190
|
-
onStatusResolved?: JumioStatusResolvedCallback;
|
|
191
|
-
/**
|
|
192
|
-
* Callback invocado ante errores no recuperables durante la validación o sondeo.
|
|
193
|
-
*/
|
|
194
|
-
onStatusError?: JumioStatusErrorCallback;
|
|
195
|
-
/**
|
|
196
|
-
* Callback opcional para reportar etapas del proceso.
|
|
197
|
-
*/
|
|
198
|
-
onProgress?: JumioProgressCallback;
|
|
199
|
-
/**
|
|
200
|
-
* Señal de cancelación (AbortSignal) para abortar peticiones o sondeo activo.
|
|
201
|
-
*/
|
|
202
|
-
signal?: AbortSignal;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Opciones para el método de polling de estado.
|
|
206
|
-
*/
|
|
207
|
-
interface PollStatusOptions {
|
|
208
|
-
pollingIntervalMs?: number;
|
|
209
|
-
maxAttempts?: number;
|
|
210
|
-
signal?: AbortSignal;
|
|
211
|
-
onAttempt?: (attempt: number, maxAttempts: number, lastData: unknown) => void;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Cliente principal para gestionar validaciones de identidad mediante Jumio.
|
|
216
|
-
*/
|
|
217
|
-
declare class JumioClient {
|
|
218
|
-
private readonly http;
|
|
219
|
-
private readonly config;
|
|
220
|
-
constructor(config?: JumioClientConfig);
|
|
221
|
-
/**
|
|
222
|
-
* Inicia el proceso de verificación convirtiendo las imágenes y enviando el payload inicial a Jumio.
|
|
223
|
-
*/
|
|
224
|
-
startIneVerification(params: {
|
|
225
|
-
clientId: string;
|
|
226
|
-
frontImage: ImageSource;
|
|
227
|
-
backImage: ImageSource;
|
|
228
|
-
signal?: AbortSignal;
|
|
229
|
-
onProgress?: JumioProgressCallback;
|
|
230
|
-
}): Promise<JumioIneStartData>;
|
|
231
|
-
/**
|
|
232
|
-
* Consulta una única vez el estado actual de la validación.
|
|
233
|
-
*/
|
|
234
|
-
getIneStatus(accountId: string, workflowId: string, signal?: AbortSignal): Promise<JumioVerificationData>;
|
|
235
|
-
/**
|
|
236
|
-
* Sondea periódicamente el estado hasta obtener un resultado definitivo.
|
|
237
|
-
*/
|
|
238
|
-
pollIneStatus(accountId: string, workflowId: string, options?: PollStatusOptions): Promise<VerifyIneResult>;
|
|
239
|
-
/**
|
|
240
|
-
* Ejecuta el flujo completo de validación de INE.
|
|
241
|
-
*
|
|
242
|
-
* @param input Parámetros de validación y callbacks.
|
|
243
|
-
* @returns `VerifyIneResult` con el resultado inicial o definitivo según `awaitFinalStatus`.
|
|
244
|
-
*/
|
|
245
|
-
verifyIne(input: VerifyIneInput): Promise<VerifyIneResult>;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Fábrica para crear una nueva instancia de `JumioClient`.
|
|
249
|
-
*/
|
|
250
|
-
declare function createJumioClient(config?: JumioClientConfig): JumioClient;
|
|
251
|
-
|
|
252
|
-
export { type AuthTokenProvider as A, type ImageSource as I, JumioClient as J, type PollStatusOptions as P, type S3SignerFunction as S, type VerifyIneInput as V, type JumioClientConfig as a, type JumioIneStartData as b, type JumioProgressCallback as c, type JumioStatusErrorCallback as d, type JumioStatusResolvedCallback as e, type JumioVerificationData as f, type JumioVerificationPayload as g, type JumioWorkflowStatus as h, type VerifyIneResult as i, createJumioClient as j };
|