@koraidv/core 1.7.11 → 1.8.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
@@ -147,6 +147,16 @@ interface Verification {
147
147
  updatedAt: Date;
148
148
  /** Completion timestamp */
149
149
  completedAt?: Date;
150
+ /**
151
+ * Integrator + SDK-supplied metadata persisted on the verification.
152
+ * The Web SDK sets `source: 'web'` here so the backend's source-
153
+ * aware threshold tuning (v1.8.0) and the SDK's source-aware
154
+ * display thresholds (v1.8.1) can both line up — without this
155
+ * round-trip, the SDK can't tell which thresholds the backend
156
+ * used and the ResultScreen "REVIEW" badge disagrees with the
157
+ * actual backend approval.
158
+ */
159
+ metadata?: Record<string, unknown>;
150
160
  }
151
161
  /**
152
162
  * Verification status
@@ -304,6 +314,14 @@ interface CreateVerificationRequest {
304
314
  expectedFirstName?: string;
305
315
  /** Expected last name. See `expectedFirstName` for semantics. */
306
316
  expectedLastName?: string;
317
+ /**
318
+ * Optional integrator-supplied metadata. The Web SDK ALWAYS adds
319
+ * `source: 'web'` so the backend's source-aware threshold tuning
320
+ * (v1.8.0+) can apply the right floors for webcam-captured selfies.
321
+ * Anything the integrator passes here is merged on top of the
322
+ * SDK-set `source` key.
323
+ */
324
+ metadata?: Record<string, unknown>;
307
325
  }
308
326
  /**
309
327
  * Document upload response
package/dist/index.d.ts CHANGED
@@ -147,6 +147,16 @@ interface Verification {
147
147
  updatedAt: Date;
148
148
  /** Completion timestamp */
149
149
  completedAt?: Date;
150
+ /**
151
+ * Integrator + SDK-supplied metadata persisted on the verification.
152
+ * The Web SDK sets `source: 'web'` here so the backend's source-
153
+ * aware threshold tuning (v1.8.0) and the SDK's source-aware
154
+ * display thresholds (v1.8.1) can both line up — without this
155
+ * round-trip, the SDK can't tell which thresholds the backend
156
+ * used and the ResultScreen "REVIEW" badge disagrees with the
157
+ * actual backend approval.
158
+ */
159
+ metadata?: Record<string, unknown>;
150
160
  }
151
161
  /**
152
162
  * Verification status
@@ -304,6 +314,14 @@ interface CreateVerificationRequest {
304
314
  expectedFirstName?: string;
305
315
  /** Expected last name. See `expectedFirstName` for semantics. */
306
316
  expectedLastName?: string;
317
+ /**
318
+ * Optional integrator-supplied metadata. The Web SDK ALWAYS adds
319
+ * `source: 'web'` so the backend's source-aware threshold tuning
320
+ * (v1.8.0+) can apply the right floors for webcam-captured selfies.
321
+ * Anything the integrator passes here is merged on top of the
322
+ * SDK-set `source` key.
323
+ */
324
+ metadata?: Record<string, unknown>;
307
325
  }
308
326
  /**
309
327
  * 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.1",
4
4
  "description": "Kora IDV Core SDK - API Client and Utilities",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",