@koraidv/core 1.7.9 → 1.7.11
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.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -292,6 +292,18 @@ declare class KoraError extends Error {
|
|
|
292
292
|
interface CreateVerificationRequest {
|
|
293
293
|
externalId: string;
|
|
294
294
|
tier: string;
|
|
295
|
+
/**
|
|
296
|
+
* Expected first name for name-match scoring. When set, the backend
|
|
297
|
+
* compares the OCR'd given name on the document against this value
|
|
298
|
+
* and surfaces a real `scores.nameMatch` percentage; when unset,
|
|
299
|
+
* nameMatch is 0 and the ResultScreen's "Name Match" row shows FAIL
|
|
300
|
+
* on otherwise-approved verifications. Optional — integrators that
|
|
301
|
+
* don't have the user's claimed legal name (or don't care) can
|
|
302
|
+
* omit. Mirrors iOS's `CreateVerificationRequest.expectedFirstName`.
|
|
303
|
+
*/
|
|
304
|
+
expectedFirstName?: string;
|
|
305
|
+
/** Expected last name. See `expectedFirstName` for semantics. */
|
|
306
|
+
expectedLastName?: string;
|
|
295
307
|
}
|
|
296
308
|
/**
|
|
297
309
|
* Document upload response
|
|
@@ -421,6 +433,14 @@ interface VerificationOptions {
|
|
|
421
433
|
externalId: string;
|
|
422
434
|
tier?: 'basic' | 'standard' | 'enhanced';
|
|
423
435
|
documentTypes?: DocumentType[];
|
|
436
|
+
/**
|
|
437
|
+
* Optional name-match inputs. When set, the backend compares the
|
|
438
|
+
* OCR'd names on the document against these values and surfaces a
|
|
439
|
+
* real `scores.nameMatch` percentage on the verification result.
|
|
440
|
+
* Mirrors iOS's startVerification(expectedFirstName:expectedLastName:).
|
|
441
|
+
*/
|
|
442
|
+
expectedFirstName?: string;
|
|
443
|
+
expectedLastName?: string;
|
|
424
444
|
}
|
|
425
445
|
/**
|
|
426
446
|
* Verification step
|
package/dist/index.d.ts
CHANGED
|
@@ -292,6 +292,18 @@ declare class KoraError extends Error {
|
|
|
292
292
|
interface CreateVerificationRequest {
|
|
293
293
|
externalId: string;
|
|
294
294
|
tier: string;
|
|
295
|
+
/**
|
|
296
|
+
* Expected first name for name-match scoring. When set, the backend
|
|
297
|
+
* compares the OCR'd given name on the document against this value
|
|
298
|
+
* and surfaces a real `scores.nameMatch` percentage; when unset,
|
|
299
|
+
* nameMatch is 0 and the ResultScreen's "Name Match" row shows FAIL
|
|
300
|
+
* on otherwise-approved verifications. Optional — integrators that
|
|
301
|
+
* don't have the user's claimed legal name (or don't care) can
|
|
302
|
+
* omit. Mirrors iOS's `CreateVerificationRequest.expectedFirstName`.
|
|
303
|
+
*/
|
|
304
|
+
expectedFirstName?: string;
|
|
305
|
+
/** Expected last name. See `expectedFirstName` for semantics. */
|
|
306
|
+
expectedLastName?: string;
|
|
295
307
|
}
|
|
296
308
|
/**
|
|
297
309
|
* Document upload response
|
|
@@ -421,6 +433,14 @@ interface VerificationOptions {
|
|
|
421
433
|
externalId: string;
|
|
422
434
|
tier?: 'basic' | 'standard' | 'enhanced';
|
|
423
435
|
documentTypes?: DocumentType[];
|
|
436
|
+
/**
|
|
437
|
+
* Optional name-match inputs. When set, the backend compares the
|
|
438
|
+
* OCR'd names on the document against these values and surfaces a
|
|
439
|
+
* real `scores.nameMatch` percentage on the verification result.
|
|
440
|
+
* Mirrors iOS's startVerification(expectedFirstName:expectedLastName:).
|
|
441
|
+
*/
|
|
442
|
+
expectedFirstName?: string;
|
|
443
|
+
expectedLastName?: string;
|
|
424
444
|
}
|
|
425
445
|
/**
|
|
426
446
|
* Verification step
|
package/dist/index.js
CHANGED
|
@@ -572,7 +572,13 @@ var ApiClient = class {
|
|
|
572
572
|
method: "POST",
|
|
573
573
|
body: JSON.stringify({
|
|
574
574
|
externalId: request.externalId,
|
|
575
|
-
tier: request.tier
|
|
575
|
+
tier: request.tier,
|
|
576
|
+
// Optional name-match inputs — only sent when the integrator
|
|
577
|
+
// provided them, so older call sites don't accidentally start
|
|
578
|
+
// emitting empty strings (backend's name-match logic treats
|
|
579
|
+
// "" as "user has no claimed name" same as missing).
|
|
580
|
+
expectedFirstName: request.expectedFirstName,
|
|
581
|
+
expectedLastName: request.expectedLastName
|
|
576
582
|
})
|
|
577
583
|
});
|
|
578
584
|
}
|
|
@@ -916,7 +922,9 @@ var KoraIDV = class {
|
|
|
916
922
|
this.sessionStartTime = /* @__PURE__ */ new Date();
|
|
917
923
|
const verification = await this.apiClient.createVerification({
|
|
918
924
|
externalId: options.externalId,
|
|
919
|
-
tier: options.tier ?? "standard"
|
|
925
|
+
tier: options.tier ?? "standard",
|
|
926
|
+
expectedFirstName: options.expectedFirstName,
|
|
927
|
+
expectedLastName: options.expectedLastName
|
|
920
928
|
});
|
|
921
929
|
this.currentVerification = verification;
|
|
922
930
|
callbacks.onStepChange?.("consent");
|
package/dist/index.mjs
CHANGED
|
@@ -528,7 +528,13 @@ var ApiClient = class {
|
|
|
528
528
|
method: "POST",
|
|
529
529
|
body: JSON.stringify({
|
|
530
530
|
externalId: request.externalId,
|
|
531
|
-
tier: request.tier
|
|
531
|
+
tier: request.tier,
|
|
532
|
+
// Optional name-match inputs — only sent when the integrator
|
|
533
|
+
// provided them, so older call sites don't accidentally start
|
|
534
|
+
// emitting empty strings (backend's name-match logic treats
|
|
535
|
+
// "" as "user has no claimed name" same as missing).
|
|
536
|
+
expectedFirstName: request.expectedFirstName,
|
|
537
|
+
expectedLastName: request.expectedLastName
|
|
532
538
|
})
|
|
533
539
|
});
|
|
534
540
|
}
|
|
@@ -872,7 +878,9 @@ var KoraIDV = class {
|
|
|
872
878
|
this.sessionStartTime = /* @__PURE__ */ new Date();
|
|
873
879
|
const verification = await this.apiClient.createVerification({
|
|
874
880
|
externalId: options.externalId,
|
|
875
|
-
tier: options.tier ?? "standard"
|
|
881
|
+
tier: options.tier ?? "standard",
|
|
882
|
+
expectedFirstName: options.expectedFirstName,
|
|
883
|
+
expectedLastName: options.expectedLastName
|
|
876
884
|
});
|
|
877
885
|
this.currentVerification = verification;
|
|
878
886
|
callbacks.onStepChange?.("consent");
|