@koraidv/core 1.7.11 → 1.8.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.mts CHANGED
@@ -304,6 +304,14 @@ interface CreateVerificationRequest {
304
304
  expectedFirstName?: string;
305
305
  /** Expected last name. See `expectedFirstName` for semantics. */
306
306
  expectedLastName?: string;
307
+ /**
308
+ * Optional integrator-supplied metadata. The Web SDK ALWAYS adds
309
+ * `source: 'web'` so the backend's source-aware threshold tuning
310
+ * (v1.8.0+) can apply the right floors for webcam-captured selfies.
311
+ * Anything the integrator passes here is merged on top of the
312
+ * SDK-set `source` key.
313
+ */
314
+ metadata?: Record<string, unknown>;
307
315
  }
308
316
  /**
309
317
  * Document upload response
package/dist/index.d.ts CHANGED
@@ -304,6 +304,14 @@ interface CreateVerificationRequest {
304
304
  expectedFirstName?: string;
305
305
  /** Expected last name. See `expectedFirstName` for semantics. */
306
306
  expectedLastName?: string;
307
+ /**
308
+ * Optional integrator-supplied metadata. The Web SDK ALWAYS adds
309
+ * `source: 'web'` so the backend's source-aware threshold tuning
310
+ * (v1.8.0+) can apply the right floors for webcam-captured selfies.
311
+ * Anything the integrator passes here is merged on top of the
312
+ * SDK-set `source` key.
313
+ */
314
+ metadata?: Record<string, unknown>;
307
315
  }
308
316
  /**
309
317
  * Document upload response
package/dist/index.js CHANGED
@@ -578,7 +578,19 @@ var ApiClient = class {
578
578
  // emitting empty strings (backend's name-match logic treats
579
579
  // "" as "user has no claimed name" same as missing).
580
580
  expectedFirstName: request.expectedFirstName,
581
- expectedLastName: request.expectedLastName
581
+ expectedLastName: request.expectedLastName,
582
+ // Source signal for backend's source-aware threshold tuning
583
+ // (v1.8.0). Backend's EffectiveForSource(source) relaxes the
584
+ // MinFaceMatchScore + MinLivenessScore floors by 10 each when
585
+ // source="web" — webcam captures consistently score lower than
586
+ // native mobile camera captures, and the strict mobile-
587
+ // calibrated floor false-rejects perfectly real users. Carried
588
+ // in `metadata` to avoid a schema migration on the backend;
589
+ // any other integrator-supplied metadata is merged on top.
590
+ metadata: {
591
+ source: "web",
592
+ ...request.metadata ?? {}
593
+ }
582
594
  })
583
595
  });
584
596
  }
@@ -1009,8 +1021,8 @@ var KoraIDV = class {
1009
1021
  imageData
1010
1022
  );
1011
1023
  return {
1012
- passed: response.challengePassed,
1013
- remainingChallenges: response.remainingChallenges
1024
+ passed: response.challengePassed ?? false,
1025
+ remainingChallenges: response.remainingChallenges ?? 0
1014
1026
  };
1015
1027
  }
1016
1028
  /**
package/dist/index.mjs CHANGED
@@ -534,7 +534,19 @@ var ApiClient = class {
534
534
  // emitting empty strings (backend's name-match logic treats
535
535
  // "" as "user has no claimed name" same as missing).
536
536
  expectedFirstName: request.expectedFirstName,
537
- expectedLastName: request.expectedLastName
537
+ expectedLastName: request.expectedLastName,
538
+ // Source signal for backend's source-aware threshold tuning
539
+ // (v1.8.0). Backend's EffectiveForSource(source) relaxes the
540
+ // MinFaceMatchScore + MinLivenessScore floors by 10 each when
541
+ // source="web" — webcam captures consistently score lower than
542
+ // native mobile camera captures, and the strict mobile-
543
+ // calibrated floor false-rejects perfectly real users. Carried
544
+ // in `metadata` to avoid a schema migration on the backend;
545
+ // any other integrator-supplied metadata is merged on top.
546
+ metadata: {
547
+ source: "web",
548
+ ...request.metadata ?? {}
549
+ }
538
550
  })
539
551
  });
540
552
  }
@@ -965,8 +977,8 @@ var KoraIDV = class {
965
977
  imageData
966
978
  );
967
979
  return {
968
- passed: response.challengePassed,
969
- remainingChallenges: response.remainingChallenges
980
+ passed: response.challengePassed ?? false,
981
+ remainingChallenges: response.remainingChallenges ?? 0
970
982
  };
971
983
  }
972
984
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koraidv/core",
3
- "version": "1.7.11",
3
+ "version": "1.8.0",
4
4
  "description": "Kora IDV Core SDK - API Client and Utilities",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",