@zyphr-dev/node-sdk 0.1.50 → 0.1.51

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.cts CHANGED
@@ -12527,6 +12527,12 @@ interface PasswordPolicy {
12527
12527
  * @memberof PasswordPolicy
12528
12528
  */
12529
12529
  disallowCommon: boolean;
12530
+ /**
12531
+ * Whether passwords found in the HaveIBeenPwned breach corpus are rejected at registration/reset. Checked via k-anonymity (only a 5-char SHA-1 prefix leaves our infrastructure) and fail-open: if the breach source is unavailable the password is allowed. Default false (advisory only — the breach signal is returned but does not gate acceptance unless enabled).
12532
+ * @type {boolean}
12533
+ * @memberof PasswordPolicy
12534
+ */
12535
+ disallowBreached: boolean;
12530
12536
  }
12531
12537
  /**
12532
12538
  * Check if a given object implements the PasswordPolicy interface.
@@ -12635,13 +12641,25 @@ declare function PasswordRequirementsResponseToJSONTyped(value?: PasswordRequire
12635
12641
  */
12636
12642
  interface PasswordStrength {
12637
12643
  /**
12638
- * Whether the password would be accepted by the server's enforcement path. A password that is valid here is accepted by registration.
12644
+ * Whether the password would be accepted by the server's enforcement path. A password that is valid here is accepted by registration. When the application enables `disallow_breached`, a breached password is `valid: false` here AND rejected by register/reset (no drift).
12639
12645
  * @type {boolean}
12640
12646
  * @memberof PasswordStrength
12641
12647
  */
12642
12648
  valid: boolean;
12643
12649
  /**
12644
- * Strength score, 0-100.
12650
+ * Whether the password appears in the HaveIBeenPwned breach corpus. This is a distinct signal from `valid` and is always returned regardless of the app's `disallow_breached` setting. Fail-open: if the breach source is unavailable this is `false`.
12651
+ * @type {boolean}
12652
+ * @memberof PasswordStrength
12653
+ */
12654
+ breached: boolean;
12655
+ /**
12656
+ * HIBP occurrence count for the password (0 if not breached or if the breach lookup failed/was unavailable).
12657
+ * @type {number}
12658
+ * @memberof PasswordStrength
12659
+ */
12660
+ breachCount: number;
12661
+ /**
12662
+ * Strength score, 0-100. A pure composition measure — independent of the breach signal.
12645
12663
  * @type {number}
12646
12664
  * @memberof PasswordStrength
12647
12665
  */
package/dist/index.d.ts CHANGED
@@ -12527,6 +12527,12 @@ interface PasswordPolicy {
12527
12527
  * @memberof PasswordPolicy
12528
12528
  */
12529
12529
  disallowCommon: boolean;
12530
+ /**
12531
+ * Whether passwords found in the HaveIBeenPwned breach corpus are rejected at registration/reset. Checked via k-anonymity (only a 5-char SHA-1 prefix leaves our infrastructure) and fail-open: if the breach source is unavailable the password is allowed. Default false (advisory only — the breach signal is returned but does not gate acceptance unless enabled).
12532
+ * @type {boolean}
12533
+ * @memberof PasswordPolicy
12534
+ */
12535
+ disallowBreached: boolean;
12530
12536
  }
12531
12537
  /**
12532
12538
  * Check if a given object implements the PasswordPolicy interface.
@@ -12635,13 +12641,25 @@ declare function PasswordRequirementsResponseToJSONTyped(value?: PasswordRequire
12635
12641
  */
12636
12642
  interface PasswordStrength {
12637
12643
  /**
12638
- * Whether the password would be accepted by the server's enforcement path. A password that is valid here is accepted by registration.
12644
+ * Whether the password would be accepted by the server's enforcement path. A password that is valid here is accepted by registration. When the application enables `disallow_breached`, a breached password is `valid: false` here AND rejected by register/reset (no drift).
12639
12645
  * @type {boolean}
12640
12646
  * @memberof PasswordStrength
12641
12647
  */
12642
12648
  valid: boolean;
12643
12649
  /**
12644
- * Strength score, 0-100.
12650
+ * Whether the password appears in the HaveIBeenPwned breach corpus. This is a distinct signal from `valid` and is always returned regardless of the app's `disallow_breached` setting. Fail-open: if the breach source is unavailable this is `false`.
12651
+ * @type {boolean}
12652
+ * @memberof PasswordStrength
12653
+ */
12654
+ breached: boolean;
12655
+ /**
12656
+ * HIBP occurrence count for the password (0 if not breached or if the breach lookup failed/was unavailable).
12657
+ * @type {number}
12658
+ * @memberof PasswordStrength
12659
+ */
12660
+ breachCount: number;
12661
+ /**
12662
+ * Strength score, 0-100. A pure composition measure — independent of the breach signal.
12645
12663
  * @type {number}
12646
12664
  * @memberof PasswordStrength
12647
12665
  */
package/dist/index.js CHANGED
@@ -8581,6 +8581,7 @@ function instanceOfPasswordPolicy(value) {
8581
8581
  if (!("requireNumbers" in value) || value["requireNumbers"] === void 0) return false;
8582
8582
  if (!("requireSpecial" in value) || value["requireSpecial"] === void 0) return false;
8583
8583
  if (!("disallowCommon" in value) || value["disallowCommon"] === void 0) return false;
8584
+ if (!("disallowBreached" in value) || value["disallowBreached"] === void 0) return false;
8584
8585
  return true;
8585
8586
  }
8586
8587
  function PasswordPolicyFromJSON(json) {
@@ -8597,7 +8598,8 @@ function PasswordPolicyFromJSONTyped(json, ignoreDiscriminator) {
8597
8598
  "requireLowercase": json["require_lowercase"],
8598
8599
  "requireNumbers": json["require_numbers"],
8599
8600
  "requireSpecial": json["require_special"],
8600
- "disallowCommon": json["disallow_common"]
8601
+ "disallowCommon": json["disallow_common"],
8602
+ "disallowBreached": json["disallow_breached"]
8601
8603
  };
8602
8604
  }
8603
8605
  function PasswordPolicyToJSON(json) {
@@ -8614,7 +8616,8 @@ function PasswordPolicyToJSONTyped(value, ignoreDiscriminator = false) {
8614
8616
  "require_lowercase": value["requireLowercase"],
8615
8617
  "require_numbers": value["requireNumbers"],
8616
8618
  "require_special": value["requireSpecial"],
8617
- "disallow_common": value["disallowCommon"]
8619
+ "disallow_common": value["disallowCommon"],
8620
+ "disallow_breached": value["disallowBreached"]
8618
8621
  };
8619
8622
  }
8620
8623
 
@@ -8687,6 +8690,8 @@ var PasswordStrengthLabelEnum = {
8687
8690
  };
8688
8691
  function instanceOfPasswordStrength(value) {
8689
8692
  if (!("valid" in value) || value["valid"] === void 0) return false;
8693
+ if (!("breached" in value) || value["breached"] === void 0) return false;
8694
+ if (!("breachCount" in value) || value["breachCount"] === void 0) return false;
8690
8695
  if (!("score" in value) || value["score"] === void 0) return false;
8691
8696
  if (!("label" in value) || value["label"] === void 0) return false;
8692
8697
  if (!("feedback" in value) || value["feedback"] === void 0) return false;
@@ -8701,6 +8706,8 @@ function PasswordStrengthFromJSONTyped(json, ignoreDiscriminator) {
8701
8706
  }
8702
8707
  return {
8703
8708
  "valid": json["valid"],
8709
+ "breached": json["breached"],
8710
+ "breachCount": json["breach_count"],
8704
8711
  "score": json["score"],
8705
8712
  "label": json["label"],
8706
8713
  "feedback": json["feedback"]
@@ -8715,6 +8722,8 @@ function PasswordStrengthToJSONTyped(value, ignoreDiscriminator = false) {
8715
8722
  }
8716
8723
  return {
8717
8724
  "valid": value["valid"],
8725
+ "breached": value["breached"],
8726
+ "breach_count": value["breachCount"],
8718
8727
  "score": value["score"],
8719
8728
  "label": value["label"],
8720
8729
  "feedback": value["feedback"]