@koraidv/core 1.5.0 → 1.5.1

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 CHANGED
@@ -135,6 +135,8 @@ interface Verification {
135
135
  faceVerification?: FaceVerification;
136
136
  /** Liveness verification result */
137
137
  livenessVerification?: LivenessVerification;
138
+ /** Per-feature score breakdown (0-100 scale) */
139
+ scores?: VerificationScores;
138
140
  /** Risk signals */
139
141
  riskSignals?: RiskSignal[];
140
142
  /** Overall risk score (0-100) */
@@ -189,6 +191,25 @@ interface ChallengeResult {
189
191
  passed: boolean;
190
192
  confidence: number;
191
193
  }
194
+ /**
195
+ * Per-feature verification scores (0-100 scale).
196
+ *
197
+ * Mirrors the iOS / Android / Flutter SDKs so partners writing
198
+ * cross-platform code see the same shape on every platform. The single
199
+ * `overall` is the fused risk score (also exposed as `Verification.riskScore`
200
+ * at the top level for convenience). Individual feature scores let you
201
+ * drill into which check drove the result.
202
+ */
203
+ interface VerificationScores {
204
+ documentQuality: number;
205
+ documentAuth: number;
206
+ faceMatch: number;
207
+ liveness: number;
208
+ nameMatch: number;
209
+ dataConsistency: number;
210
+ screening: number;
211
+ overall: number;
212
+ }
192
213
  /**
193
214
  * Risk signal
194
215
  */
@@ -215,6 +236,10 @@ declare enum KoraErrorCode {
215
236
  RATE_LIMITED = "RATE_LIMITED",
216
237
  SERVER_ERROR = "SERVER_ERROR",
217
238
  HTTP_ERROR = "HTTP_ERROR",
239
+ INVALID_RESPONSE = "INVALID_RESPONSE",
240
+ NO_DATA = "NO_DATA",
241
+ DECODING_ERROR = "DECODING_ERROR",
242
+ ENCODING_ERROR = "ENCODING_ERROR",
218
243
  CAMERA_ACCESS_DENIED = "CAMERA_ACCESS_DENIED",
219
244
  CAMERA_NOT_AVAILABLE = "CAMERA_NOT_AVAILABLE",
220
245
  CAPTURE_FAILED = "CAPTURE_FAILED",
@@ -222,6 +247,8 @@ declare enum KoraErrorCode {
222
247
  DOCUMENT_NOT_DETECTED = "DOCUMENT_NOT_DETECTED",
223
248
  DOCUMENT_TYPE_NOT_SUPPORTED = "DOCUMENT_TYPE_NOT_SUPPORTED",
224
249
  MRZ_READ_FAILED = "MRZ_READ_FAILED",
250
+ NFC_NOT_AVAILABLE = "NFC_NOT_AVAILABLE",
251
+ NFC_READ_FAILED = "NFC_READ_FAILED",
225
252
  FACE_NOT_DETECTED = "FACE_NOT_DETECTED",
226
253
  MULTIPLE_FACES_DETECTED = "MULTIPLE_FACES_DETECTED",
227
254
  FACE_MATCH_FAILED = "FACE_MATCH_FAILED",
@@ -408,7 +435,7 @@ declare class KoraIDV {
408
435
  private currentVerification;
409
436
  private livenessSession;
410
437
  private sessionStartTime;
411
- static readonly VERSION = "1.5.0";
438
+ static readonly VERSION = "1.5.1";
412
439
  constructor(config: Partial<Configuration> & {
413
440
  apiKey: string;
414
441
  tenantId: string;
@@ -1046,4 +1073,4 @@ declare const WalletPresentationBuilder: {
1046
1073
  decode(json: string): WalletPresentation;
1047
1074
  };
1048
1075
 
1049
- export { ApiClient, type ChallengeResult, type ChallengeType, type Configuration, type CreateVerificationRequest, DisclosureClaim, type DisclosureProfile, DisclosureProfiles, type DocumentQualityResponse, DocumentType, type DocumentTypeInfo, type DocumentUploadResponse, type DocumentVerification, type Environment, type FaceVerification, type HandoffContext, type HandoffSession, KoraError, KoraErrorCode, KoraIDV, KoraWallet, type LivenessChallenge, type LivenessChallengeResponse, type LivenessMode, type LivenessSession, type LivenessVerification, type Locale, MrzParser, type QualityIssue$1 as QualityIssue, QualityValidator, type RiskSignal, type SelfieUploadResponse, type StoredWalletCredential, type SupportedCountry, type Theme, type Verification, type VerificationCallbacks, type VerificationOptions, type VerificationStatus, type VerificationStep, type WalletCredential, type WalletCredentialStatus, WalletCredentialStore, type WalletCredentialSubject, type WalletDataIntegrityProof, WalletError, type WalletPresentation, WalletPresentationBuilder, WebBarcodeScanner, applyDisclosure, blobToBase64, computeAgeOver18, createWalletCredential, getDocumentTypeInfo };
1076
+ export { ApiClient, type ChallengeResult, type ChallengeType, type Configuration, type CreateVerificationRequest, DisclosureClaim, type DisclosureProfile, DisclosureProfiles, type DocumentQualityResponse, DocumentType, type DocumentTypeInfo, type DocumentUploadResponse, type DocumentVerification, type Environment, type FaceVerification, type HandoffContext, type HandoffSession, KoraError, KoraErrorCode, KoraIDV, KoraWallet, type LivenessChallenge, type LivenessChallengeResponse, type LivenessMode, type LivenessSession, type LivenessVerification, type Locale, MrzParser, type QualityIssue$1 as QualityIssue, QualityValidator, type RiskSignal, type SelfieUploadResponse, type StoredWalletCredential, type SupportedCountry, type Theme, type Verification, type VerificationCallbacks, type VerificationOptions, type VerificationScores, type VerificationStatus, type VerificationStep, type WalletCredential, type WalletCredentialStatus, WalletCredentialStore, type WalletCredentialSubject, type WalletDataIntegrityProof, WalletError, type WalletPresentation, WalletPresentationBuilder, WebBarcodeScanner, applyDisclosure, blobToBase64, computeAgeOver18, createWalletCredential, getDocumentTypeInfo };
package/dist/index.d.ts CHANGED
@@ -135,6 +135,8 @@ interface Verification {
135
135
  faceVerification?: FaceVerification;
136
136
  /** Liveness verification result */
137
137
  livenessVerification?: LivenessVerification;
138
+ /** Per-feature score breakdown (0-100 scale) */
139
+ scores?: VerificationScores;
138
140
  /** Risk signals */
139
141
  riskSignals?: RiskSignal[];
140
142
  /** Overall risk score (0-100) */
@@ -189,6 +191,25 @@ interface ChallengeResult {
189
191
  passed: boolean;
190
192
  confidence: number;
191
193
  }
194
+ /**
195
+ * Per-feature verification scores (0-100 scale).
196
+ *
197
+ * Mirrors the iOS / Android / Flutter SDKs so partners writing
198
+ * cross-platform code see the same shape on every platform. The single
199
+ * `overall` is the fused risk score (also exposed as `Verification.riskScore`
200
+ * at the top level for convenience). Individual feature scores let you
201
+ * drill into which check drove the result.
202
+ */
203
+ interface VerificationScores {
204
+ documentQuality: number;
205
+ documentAuth: number;
206
+ faceMatch: number;
207
+ liveness: number;
208
+ nameMatch: number;
209
+ dataConsistency: number;
210
+ screening: number;
211
+ overall: number;
212
+ }
192
213
  /**
193
214
  * Risk signal
194
215
  */
@@ -215,6 +236,10 @@ declare enum KoraErrorCode {
215
236
  RATE_LIMITED = "RATE_LIMITED",
216
237
  SERVER_ERROR = "SERVER_ERROR",
217
238
  HTTP_ERROR = "HTTP_ERROR",
239
+ INVALID_RESPONSE = "INVALID_RESPONSE",
240
+ NO_DATA = "NO_DATA",
241
+ DECODING_ERROR = "DECODING_ERROR",
242
+ ENCODING_ERROR = "ENCODING_ERROR",
218
243
  CAMERA_ACCESS_DENIED = "CAMERA_ACCESS_DENIED",
219
244
  CAMERA_NOT_AVAILABLE = "CAMERA_NOT_AVAILABLE",
220
245
  CAPTURE_FAILED = "CAPTURE_FAILED",
@@ -222,6 +247,8 @@ declare enum KoraErrorCode {
222
247
  DOCUMENT_NOT_DETECTED = "DOCUMENT_NOT_DETECTED",
223
248
  DOCUMENT_TYPE_NOT_SUPPORTED = "DOCUMENT_TYPE_NOT_SUPPORTED",
224
249
  MRZ_READ_FAILED = "MRZ_READ_FAILED",
250
+ NFC_NOT_AVAILABLE = "NFC_NOT_AVAILABLE",
251
+ NFC_READ_FAILED = "NFC_READ_FAILED",
225
252
  FACE_NOT_DETECTED = "FACE_NOT_DETECTED",
226
253
  MULTIPLE_FACES_DETECTED = "MULTIPLE_FACES_DETECTED",
227
254
  FACE_MATCH_FAILED = "FACE_MATCH_FAILED",
@@ -408,7 +435,7 @@ declare class KoraIDV {
408
435
  private currentVerification;
409
436
  private livenessSession;
410
437
  private sessionStartTime;
411
- static readonly VERSION = "1.5.0";
438
+ static readonly VERSION = "1.5.1";
412
439
  constructor(config: Partial<Configuration> & {
413
440
  apiKey: string;
414
441
  tenantId: string;
@@ -1046,4 +1073,4 @@ declare const WalletPresentationBuilder: {
1046
1073
  decode(json: string): WalletPresentation;
1047
1074
  };
1048
1075
 
1049
- export { ApiClient, type ChallengeResult, type ChallengeType, type Configuration, type CreateVerificationRequest, DisclosureClaim, type DisclosureProfile, DisclosureProfiles, type DocumentQualityResponse, DocumentType, type DocumentTypeInfo, type DocumentUploadResponse, type DocumentVerification, type Environment, type FaceVerification, type HandoffContext, type HandoffSession, KoraError, KoraErrorCode, KoraIDV, KoraWallet, type LivenessChallenge, type LivenessChallengeResponse, type LivenessMode, type LivenessSession, type LivenessVerification, type Locale, MrzParser, type QualityIssue$1 as QualityIssue, QualityValidator, type RiskSignal, type SelfieUploadResponse, type StoredWalletCredential, type SupportedCountry, type Theme, type Verification, type VerificationCallbacks, type VerificationOptions, type VerificationStatus, type VerificationStep, type WalletCredential, type WalletCredentialStatus, WalletCredentialStore, type WalletCredentialSubject, type WalletDataIntegrityProof, WalletError, type WalletPresentation, WalletPresentationBuilder, WebBarcodeScanner, applyDisclosure, blobToBase64, computeAgeOver18, createWalletCredential, getDocumentTypeInfo };
1076
+ export { ApiClient, type ChallengeResult, type ChallengeType, type Configuration, type CreateVerificationRequest, DisclosureClaim, type DisclosureProfile, DisclosureProfiles, type DocumentQualityResponse, DocumentType, type DocumentTypeInfo, type DocumentUploadResponse, type DocumentVerification, type Environment, type FaceVerification, type HandoffContext, type HandoffSession, KoraError, KoraErrorCode, KoraIDV, KoraWallet, type LivenessChallenge, type LivenessChallengeResponse, type LivenessMode, type LivenessSession, type LivenessVerification, type Locale, MrzParser, type QualityIssue$1 as QualityIssue, QualityValidator, type RiskSignal, type SelfieUploadResponse, type StoredWalletCredential, type SupportedCountry, type Theme, type Verification, type VerificationCallbacks, type VerificationOptions, type VerificationScores, type VerificationStatus, type VerificationStep, type WalletCredential, type WalletCredentialStatus, WalletCredentialStore, type WalletCredentialSubject, type WalletDataIntegrityProof, WalletError, type WalletPresentation, WalletPresentationBuilder, WebBarcodeScanner, applyDisclosure, blobToBase64, computeAgeOver18, createWalletCredential, getDocumentTypeInfo };
package/dist/index.js CHANGED
@@ -386,6 +386,10 @@ var KoraErrorCode = /* @__PURE__ */ ((KoraErrorCode2) => {
386
386
  KoraErrorCode2["RATE_LIMITED"] = "RATE_LIMITED";
387
387
  KoraErrorCode2["SERVER_ERROR"] = "SERVER_ERROR";
388
388
  KoraErrorCode2["HTTP_ERROR"] = "HTTP_ERROR";
389
+ KoraErrorCode2["INVALID_RESPONSE"] = "INVALID_RESPONSE";
390
+ KoraErrorCode2["NO_DATA"] = "NO_DATA";
391
+ KoraErrorCode2["DECODING_ERROR"] = "DECODING_ERROR";
392
+ KoraErrorCode2["ENCODING_ERROR"] = "ENCODING_ERROR";
389
393
  KoraErrorCode2["CAMERA_ACCESS_DENIED"] = "CAMERA_ACCESS_DENIED";
390
394
  KoraErrorCode2["CAMERA_NOT_AVAILABLE"] = "CAMERA_NOT_AVAILABLE";
391
395
  KoraErrorCode2["CAPTURE_FAILED"] = "CAPTURE_FAILED";
@@ -393,6 +397,8 @@ var KoraErrorCode = /* @__PURE__ */ ((KoraErrorCode2) => {
393
397
  KoraErrorCode2["DOCUMENT_NOT_DETECTED"] = "DOCUMENT_NOT_DETECTED";
394
398
  KoraErrorCode2["DOCUMENT_TYPE_NOT_SUPPORTED"] = "DOCUMENT_TYPE_NOT_SUPPORTED";
395
399
  KoraErrorCode2["MRZ_READ_FAILED"] = "MRZ_READ_FAILED";
400
+ KoraErrorCode2["NFC_NOT_AVAILABLE"] = "NFC_NOT_AVAILABLE";
401
+ KoraErrorCode2["NFC_READ_FAILED"] = "NFC_READ_FAILED";
396
402
  KoraErrorCode2["FACE_NOT_DETECTED"] = "FACE_NOT_DETECTED";
397
403
  KoraErrorCode2["MULTIPLE_FACES_DETECTED"] = "MULTIPLE_FACES_DETECTED";
398
404
  KoraErrorCode2["FACE_MATCH_FAILED"] = "FACE_MATCH_FAILED";
@@ -420,6 +426,10 @@ var errorMessages = {
420
426
  ["RATE_LIMITED" /* RATE_LIMITED */]: "Rate limit exceeded. Please try again later.",
421
427
  ["SERVER_ERROR" /* SERVER_ERROR */]: "Server error. Please try again later.",
422
428
  ["HTTP_ERROR" /* HTTP_ERROR */]: "HTTP error occurred.",
429
+ ["INVALID_RESPONSE" /* INVALID_RESPONSE */]: "The server returned an invalid response.",
430
+ ["NO_DATA" /* NO_DATA */]: "No response data received.",
431
+ ["DECODING_ERROR" /* DECODING_ERROR */]: "Failed to decode the server response.",
432
+ ["ENCODING_ERROR" /* ENCODING_ERROR */]: "Failed to encode the request.",
423
433
  ["CAMERA_ACCESS_DENIED" /* CAMERA_ACCESS_DENIED */]: "Camera access denied. Please enable camera access.",
424
434
  ["CAMERA_NOT_AVAILABLE" /* CAMERA_NOT_AVAILABLE */]: "Camera not available on this device.",
425
435
  ["CAPTURE_FAILED" /* CAPTURE_FAILED */]: "Capture failed.",
@@ -427,6 +437,8 @@ var errorMessages = {
427
437
  ["DOCUMENT_NOT_DETECTED" /* DOCUMENT_NOT_DETECTED */]: "Document not detected. Position document in frame.",
428
438
  ["DOCUMENT_TYPE_NOT_SUPPORTED" /* DOCUMENT_TYPE_NOT_SUPPORTED */]: "Document type not supported.",
429
439
  ["MRZ_READ_FAILED" /* MRZ_READ_FAILED */]: "Could not read document MRZ.",
440
+ ["NFC_NOT_AVAILABLE" /* NFC_NOT_AVAILABLE */]: "NFC is not available on this device.",
441
+ ["NFC_READ_FAILED" /* NFC_READ_FAILED */]: "NFC read failed. Hold device steady against the chip.",
430
442
  ["FACE_NOT_DETECTED" /* FACE_NOT_DETECTED */]: "Face not detected. Position face in frame.",
431
443
  ["MULTIPLE_FACES_DETECTED" /* MULTIPLE_FACES_DETECTED */]: "Multiple faces detected. Show only one face.",
432
444
  ["FACE_MATCH_FAILED" /* FACE_MATCH_FAILED */]: "Face match failed.",
@@ -976,7 +988,7 @@ var KoraIDV = class {
976
988
  }
977
989
  }
978
990
  };
979
- KoraIDV.VERSION = "1.5.0";
991
+ KoraIDV.VERSION = "1.5.1";
980
992
 
981
993
  // src/utils/QualityValidator.ts
982
994
  var defaultThresholds = {
package/dist/index.mjs CHANGED
@@ -342,6 +342,10 @@ var KoraErrorCode = /* @__PURE__ */ ((KoraErrorCode2) => {
342
342
  KoraErrorCode2["RATE_LIMITED"] = "RATE_LIMITED";
343
343
  KoraErrorCode2["SERVER_ERROR"] = "SERVER_ERROR";
344
344
  KoraErrorCode2["HTTP_ERROR"] = "HTTP_ERROR";
345
+ KoraErrorCode2["INVALID_RESPONSE"] = "INVALID_RESPONSE";
346
+ KoraErrorCode2["NO_DATA"] = "NO_DATA";
347
+ KoraErrorCode2["DECODING_ERROR"] = "DECODING_ERROR";
348
+ KoraErrorCode2["ENCODING_ERROR"] = "ENCODING_ERROR";
345
349
  KoraErrorCode2["CAMERA_ACCESS_DENIED"] = "CAMERA_ACCESS_DENIED";
346
350
  KoraErrorCode2["CAMERA_NOT_AVAILABLE"] = "CAMERA_NOT_AVAILABLE";
347
351
  KoraErrorCode2["CAPTURE_FAILED"] = "CAPTURE_FAILED";
@@ -349,6 +353,8 @@ var KoraErrorCode = /* @__PURE__ */ ((KoraErrorCode2) => {
349
353
  KoraErrorCode2["DOCUMENT_NOT_DETECTED"] = "DOCUMENT_NOT_DETECTED";
350
354
  KoraErrorCode2["DOCUMENT_TYPE_NOT_SUPPORTED"] = "DOCUMENT_TYPE_NOT_SUPPORTED";
351
355
  KoraErrorCode2["MRZ_READ_FAILED"] = "MRZ_READ_FAILED";
356
+ KoraErrorCode2["NFC_NOT_AVAILABLE"] = "NFC_NOT_AVAILABLE";
357
+ KoraErrorCode2["NFC_READ_FAILED"] = "NFC_READ_FAILED";
352
358
  KoraErrorCode2["FACE_NOT_DETECTED"] = "FACE_NOT_DETECTED";
353
359
  KoraErrorCode2["MULTIPLE_FACES_DETECTED"] = "MULTIPLE_FACES_DETECTED";
354
360
  KoraErrorCode2["FACE_MATCH_FAILED"] = "FACE_MATCH_FAILED";
@@ -376,6 +382,10 @@ var errorMessages = {
376
382
  ["RATE_LIMITED" /* RATE_LIMITED */]: "Rate limit exceeded. Please try again later.",
377
383
  ["SERVER_ERROR" /* SERVER_ERROR */]: "Server error. Please try again later.",
378
384
  ["HTTP_ERROR" /* HTTP_ERROR */]: "HTTP error occurred.",
385
+ ["INVALID_RESPONSE" /* INVALID_RESPONSE */]: "The server returned an invalid response.",
386
+ ["NO_DATA" /* NO_DATA */]: "No response data received.",
387
+ ["DECODING_ERROR" /* DECODING_ERROR */]: "Failed to decode the server response.",
388
+ ["ENCODING_ERROR" /* ENCODING_ERROR */]: "Failed to encode the request.",
379
389
  ["CAMERA_ACCESS_DENIED" /* CAMERA_ACCESS_DENIED */]: "Camera access denied. Please enable camera access.",
380
390
  ["CAMERA_NOT_AVAILABLE" /* CAMERA_NOT_AVAILABLE */]: "Camera not available on this device.",
381
391
  ["CAPTURE_FAILED" /* CAPTURE_FAILED */]: "Capture failed.",
@@ -383,6 +393,8 @@ var errorMessages = {
383
393
  ["DOCUMENT_NOT_DETECTED" /* DOCUMENT_NOT_DETECTED */]: "Document not detected. Position document in frame.",
384
394
  ["DOCUMENT_TYPE_NOT_SUPPORTED" /* DOCUMENT_TYPE_NOT_SUPPORTED */]: "Document type not supported.",
385
395
  ["MRZ_READ_FAILED" /* MRZ_READ_FAILED */]: "Could not read document MRZ.",
396
+ ["NFC_NOT_AVAILABLE" /* NFC_NOT_AVAILABLE */]: "NFC is not available on this device.",
397
+ ["NFC_READ_FAILED" /* NFC_READ_FAILED */]: "NFC read failed. Hold device steady against the chip.",
386
398
  ["FACE_NOT_DETECTED" /* FACE_NOT_DETECTED */]: "Face not detected. Position face in frame.",
387
399
  ["MULTIPLE_FACES_DETECTED" /* MULTIPLE_FACES_DETECTED */]: "Multiple faces detected. Show only one face.",
388
400
  ["FACE_MATCH_FAILED" /* FACE_MATCH_FAILED */]: "Face match failed.",
@@ -932,7 +944,7 @@ var KoraIDV = class {
932
944
  }
933
945
  }
934
946
  };
935
- KoraIDV.VERSION = "1.5.0";
947
+ KoraIDV.VERSION = "1.5.1";
936
948
 
937
949
  // src/utils/QualityValidator.ts
938
950
  var defaultThresholds = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koraidv/core",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Kora IDV Core SDK - API Client and Utilities",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",