@neofaceid/web-sdk 1.25.4 → 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.
- package/dist/index.d.ts +5 -3
- package/dist/neoface-id-sdk.es.js +15 -3
- package/dist/neoface-id-sdk.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export declare interface ApplicationRegistrationData {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Application registration result
|
|
14
|
+
* Application registration result.
|
|
15
|
+
* `app_token` só vem na criação/rotação; em GETs de leitura vem só `app_token_last4`.
|
|
15
16
|
*/
|
|
16
17
|
export declare interface ApplicationRegistrationResult {
|
|
17
18
|
success: boolean;
|
|
@@ -20,7 +21,8 @@ export declare interface ApplicationRegistrationResult {
|
|
|
20
21
|
application_name: string;
|
|
21
22
|
domain: string;
|
|
22
23
|
accept_only_email_with_same_domain: boolean;
|
|
23
|
-
app_token
|
|
24
|
+
app_token?: string;
|
|
25
|
+
app_token_last4?: string;
|
|
24
26
|
is_active: boolean;
|
|
25
27
|
created_at: string;
|
|
26
28
|
};
|
|
@@ -1360,6 +1362,6 @@ export declare const validateToken: (applicationToken: string) => Promise<boolea
|
|
|
1360
1362
|
* MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
|
|
1361
1363
|
* PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
|
|
1362
1364
|
*/
|
|
1363
|
-
export declare const VERSION = "1.25.
|
|
1365
|
+
export declare const VERSION = "1.25.5";
|
|
1364
1366
|
|
|
1365
1367
|
export { }
|
|
@@ -5336,6 +5336,8 @@ function init(options = {}) {
|
|
|
5336
5336
|
}
|
|
5337
5337
|
if (applicationToken) {
|
|
5338
5338
|
globalConfig.applicationToken = applicationToken;
|
|
5339
|
+
} else if (applicationToken === "") {
|
|
5340
|
+
console.warn("[NeoFaceID SDK] applicationToken vazio em init() — 401 esperado em chamadas autenticadas.");
|
|
5339
5341
|
}
|
|
5340
5342
|
globalConfig.initialized = true;
|
|
5341
5343
|
console.log(`[NeoFaceID SDK] Inicializado - Ambiente: ${globalConfig.environment}, URL: ${globalConfig.baseUrl}`);
|
|
@@ -6027,6 +6029,9 @@ const registerPersonWithoutFace = async (personData, applicationToken, options)
|
|
|
6027
6029
|
}
|
|
6028
6030
|
];
|
|
6029
6031
|
}
|
|
6032
|
+
if (!applicationToken) {
|
|
6033
|
+
console.warn("[NeoFaceID SDK] registerPersonWithoutFace sem applicationToken — 401 esperado.");
|
|
6034
|
+
}
|
|
6030
6035
|
const response = await fetch(`${getApiBaseUrl()}/api/v1/signup/donor/`, {
|
|
6031
6036
|
method: "POST",
|
|
6032
6037
|
headers: {
|
|
@@ -6161,6 +6166,9 @@ const registerPersonWithBiometric = async (personData, facePhotos, applicationTo
|
|
|
6161
6166
|
}
|
|
6162
6167
|
];
|
|
6163
6168
|
}
|
|
6169
|
+
if (!applicationToken) {
|
|
6170
|
+
console.warn("[NeoFaceID SDK] registerPersonWithBiometric sem applicationToken — 401 esperado.");
|
|
6171
|
+
}
|
|
6164
6172
|
const response = await fetch(`${getApiBaseUrl()}/api/v1/signup/donor/`, {
|
|
6165
6173
|
method: "POST",
|
|
6166
6174
|
headers: {
|
|
@@ -6775,13 +6783,17 @@ const registerDocumentByImage = async (personId, jwtToken, images) => {
|
|
|
6775
6783
|
throw new NeoFaceError("Unknown error occurred", ErrorType.NETWORK_ERROR);
|
|
6776
6784
|
}
|
|
6777
6785
|
};
|
|
6778
|
-
const getTaskStatus = async (taskId) => {
|
|
6786
|
+
const getTaskStatus = async (taskId, applicationToken) => {
|
|
6779
6787
|
const controller = createTimeoutController();
|
|
6788
|
+
{
|
|
6789
|
+
console.warn("[NeoFaceID SDK] getTaskStatus sem applicationToken — /tasks/status/ vai responder 401.");
|
|
6790
|
+
}
|
|
6780
6791
|
try {
|
|
6781
6792
|
const response = await fetch(`${getApiBaseUrl()}/api/v1/tasks/status/?task_id=${taskId}`, {
|
|
6782
6793
|
method: "GET",
|
|
6783
6794
|
headers: {
|
|
6784
|
-
"Content-Type": "application/json"
|
|
6795
|
+
"Content-Type": "application/json",
|
|
6796
|
+
...applicationToken ? { "X-App-Token": applicationToken } : {}
|
|
6785
6797
|
},
|
|
6786
6798
|
signal: controller.signal
|
|
6787
6799
|
});
|
|
@@ -11336,7 +11348,7 @@ const biometricDetection = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
11336
11348
|
initializeBiometricDetection,
|
|
11337
11349
|
isAdvancedDetectionAvailable
|
|
11338
11350
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11339
|
-
const VERSION = "1.25.
|
|
11351
|
+
const VERSION = "1.25.5";
|
|
11340
11352
|
const RELEASE_DATE = "2026-08-29";
|
|
11341
11353
|
class OnboardingCaptureModal {
|
|
11342
11354
|
constructor(options) {
|