hibp 15.0.0 → 15.1.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.
Files changed (35) hide show
  1. package/API.md +376 -0
  2. package/CHANGELOG.md +26 -2
  3. package/MIGRATION.md +0 -2
  4. package/README.md +13 -1
  5. package/dist/browser/hibp.module.js +2 -2
  6. package/dist/esm/api/haveibeenpwned/package-info.d.ts +1 -1
  7. package/dist/esm/api/haveibeenpwned/package-info.js +1 -1
  8. package/dist/esm/api/haveibeenpwned/types.d.ts +10 -5
  9. package/dist/esm/api/haveibeenpwned/types.js +0 -6
  10. package/dist/esm/api/haveibeenpwned/types.js.map +1 -1
  11. package/dist/esm/breached-domain.d.ts +67 -0
  12. package/dist/esm/breached-domain.js +58 -0
  13. package/dist/esm/breached-domain.js.map +1 -0
  14. package/dist/esm/hibp.d.ts +14 -1
  15. package/dist/esm/hibp.js +7 -1
  16. package/dist/esm/hibp.js.map +1 -1
  17. package/dist/esm/latest-breach.d.ts +43 -0
  18. package/dist/esm/latest-breach.js +31 -0
  19. package/dist/esm/latest-breach.js.map +1 -0
  20. package/dist/esm/stealer-logs-by-email-domain.d.ts +68 -0
  21. package/dist/esm/stealer-logs-by-email-domain.js +59 -0
  22. package/dist/esm/stealer-logs-by-email-domain.js.map +1 -0
  23. package/dist/esm/stealer-logs-by-email.d.ts +71 -0
  24. package/dist/esm/stealer-logs-by-email.js +63 -0
  25. package/dist/esm/stealer-logs-by-email.js.map +1 -0
  26. package/dist/esm/stealer-logs-by-website-domain.d.ts +71 -0
  27. package/dist/esm/stealer-logs-by-website-domain.js +63 -0
  28. package/dist/esm/stealer-logs-by-website-domain.js.map +1 -0
  29. package/dist/esm/subscribed-domains.d.ts +73 -0
  30. package/dist/esm/subscribed-domains.js +64 -0
  31. package/dist/esm/subscribed-domains.js.map +1 -0
  32. package/dist/esm/subscription-status.d.ts +1 -0
  33. package/dist/esm/subscription-status.js +1 -0
  34. package/dist/esm/subscription-status.js.map +1 -1
  35. package/package.json +23 -24
package/API.md CHANGED
@@ -12,12 +12,27 @@
12
12
  without it will fail (unless you specify a <code>baseUrl</code> to a proxy that inserts
13
13
  a valid API key on your behalf).</p>
14
14
  </dd>
15
+ <dt><a href="#breachedDomain">breachedDomain(domain, [options])</a> ⇒ <code><a href="#breach--objectedDomainsByEmailAlias">Promise.&lt;BreachedDomainsByEmailAlias&gt;</a></code> | <code>Promise.&lt;null&gt;</code></dt>
16
+ <dd><p>Fetches all breached email addresses for a domain.</p>
17
+ <p>The result maps email aliases (the local-part before the &#39;@&#39;) to an array of
18
+ breach names. For example, querying <code>example.com</code> could return an object like
19
+ <code>{ &quot;john&quot;: [&quot;Adobe&quot;], &quot;jane&quot;: [&quot;Adobe&quot;, &quot;Gawker&quot;] }</code>, corresponding to
20
+ <code>john@example.com</code> and <code>jane@example.com</code>.</p>
21
+ <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
22
+ <a href="https://haveibeenpwned.com/API/Key">https://haveibeenpwned.com/API/Key</a> for the <code>breacheddomain</code> endpoint. The
23
+ <code>apiKey</code> option here is not explicitly required, but direct requests made
24
+ without it will fail (unless you specify a <code>baseUrl</code> to a proxy that inserts
25
+ a valid API key on your behalf).</p>
26
+ </dd>
15
27
  <dt><a href="#breaches">breaches([options])</a> ⇒ <code><a href="#breach--object">Promise.&lt;Array.&lt;Breach&gt;&gt;</a></code></dt>
16
28
  <dd><p>Fetches all breach events in the system.</p>
17
29
  </dd>
18
30
  <dt><a href="#dataClasses">dataClasses([options])</a> ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> | <code>Promise.&lt;null&gt;</code></dt>
19
31
  <dd><p>Fetches all data classes in the system.</p>
20
32
  </dd>
33
+ <dt><a href="#latestBreach">latestBreach([options])</a> ⇒ <code><a href="#breach--object">Promise.&lt;Breach&gt;</a></code> | <code>Promise.&lt;null&gt;</code></dt>
34
+ <dd><p>Fetches the most recently added breach.</p>
35
+ </dd>
21
36
  <dt><a href="#pasteAccount">pasteAccount(email, [options])</a> ⇒ <code><a href="#paste--object">Promise.&lt;Array.&lt;Paste&gt;&gt;</a></code> | <code>Promise.&lt;null&gt;</code></dt>
22
37
  <dd><p>Fetches paste data for a specific account (email address).</p>
23
38
  <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
@@ -54,6 +69,48 @@ convenience method is designed to mimic.</p>
54
69
  required, but direct requests made without it will fail (unless you specify a
55
70
  <code>baseUrl</code> to a proxy that inserts a valid API key on your behalf).</p>
56
71
  </dd>
72
+ <dt><a href="#stealerLogsByEmailDomain">stealerLogsByEmailDomain(emailDomain, [options])</a> ⇒ <code><a href="#StealerLogDomainsByEmailAlias">Promise.&lt;StealerLogDomainsByEmailAlias&gt;</a></code> | <code>Promise.&lt;null&gt;</code></dt>
73
+ <dd><p>Fetches all stealer log email aliases for an email domain.</p>
74
+ <p>The result maps email aliases (the local-part before the &#39;@&#39;) to an array of
75
+ email domains found in stealer logs. For example, querying <code>example.com</code>
76
+ could return an object like <code>{ &quot;andy&quot;: [&quot;netflix.com&quot;], &quot;jane&quot;: [&quot;netflix.com&quot;, &quot;spotify.com&quot;] }</code>, corresponding to <code>andy@example.com</code> and <code>jane@example.com</code>.</p>
77
+ <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
78
+ <a href="https://haveibeenpwned.com/API/Key">https://haveibeenpwned.com/API/Key</a> for the <code>stealerlogsbyemaildomain</code> endpoint.
79
+ The <code>apiKey</code> option here is not explicitly required, but direct requests made
80
+ without it will fail (unless you specify a <code>baseUrl</code> to a proxy that inserts
81
+ a valid API key on your behalf).</p>
82
+ </dd>
83
+ <dt><a href="#stealerLogsByEmail">stealerLogsByEmail(emailAddress, [options])</a> ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> | <code>Promise.&lt;null&gt;</code></dt>
84
+ <dd><p>Fetches all stealer log domains for an email address.</p>
85
+ <p>Returns an array of domains for which stealer logs contain entries for the
86
+ supplied email address.</p>
87
+ <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
88
+ <a href="https://haveibeenpwned.com/API/Key">https://haveibeenpwned.com/API/Key</a> for the <code>stealerlogsbyemail</code> endpoint. The
89
+ <code>apiKey</code> option here is not explicitly required, but direct requests made
90
+ without it will fail (unless you specify a <code>baseUrl</code> to a proxy that inserts
91
+ a valid API key on your behalf).</p>
92
+ </dd>
93
+ <dt><a href="#stealerLogsByWebsiteDomain">stealerLogsByWebsiteDomain(websiteDomain, [options])</a> ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> | <code>Promise.&lt;null&gt;</code></dt>
94
+ <dd><p>Fetches all stealer log email addresses for a website domain.</p>
95
+ <p>The result is an array of strings representing email addresses found in
96
+ stealer logs for the specified website domain (e.g., &quot;example.com&quot;).</p>
97
+ <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
98
+ <a href="https://haveibeenpwned.com/API/Key">https://haveibeenpwned.com/API/Key</a> for the <code>stealerlogsbywebsitedomain</code>
99
+ endpoint. The <code>apiKey</code> option here is not explicitly required, but direct
100
+ requests made without it will fail (unless you specify a <code>baseUrl</code> to a proxy
101
+ that inserts a valid API key on your behalf).</p>
102
+ </dd>
103
+ <dt><a href="#subscribedDomains">subscribedDomains([options])</a> ⇒ <code><a href="#subscribeddomain--object">Promise.&lt;Array.&lt;SubscribedDomain&gt;&gt;</a></code></dt>
104
+ <dd><p>Fetches all subscribed domains for your HIBP account.</p>
105
+ <p>Returns domains that have been successfully added to the Domain Search dashboard
106
+ after verifying control. Each domain includes metadata about breach counts and
107
+ the next renewal date, where available.</p>
108
+ <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
109
+ <a href="https://haveibeenpwned.com/API/Key">https://haveibeenpwned.com/API/Key</a> for the <code>subscribeddomains</code> endpoint. The
110
+ <code>apiKey</code> option here is not explicitly required, but direct requests made
111
+ without it will fail (unless you specify a <code>baseUrl</code> to a proxy that inserts
112
+ a valid API key on your behalf).</p>
113
+ </dd>
57
114
  <dt><a href="#subscriptionStatus">subscriptionStatus([options])</a> ⇒ <code><a href="#subscriptionstatus--object">Promise.&lt;SubscriptionStatus&gt;</a></code></dt>
58
115
  <dd><p>Fetches the current status of your HIBP subscription (API key).</p>
59
116
  <p>🔑 <code>haveibeenpwned.com</code> requires an API key from
@@ -70,6 +127,10 @@ a valid API key on your behalf).</p>
70
127
  <dt><a href="#breach--object">Breach</a> : <code>object</code></dt>
71
128
  <dd><p>An object representing a breach.</p>
72
129
  </dd>
130
+ <dt><a href="#breach--objectedDomainsByEmailAlias">BreachedDomainsByEmailAlias</a> : <code>Object.&lt;string, Array.&lt;string&gt;&gt;</code></dt>
131
+ <dd><p>An object mapping an email alias (local-part before the &#39;@&#39;) to the list of
132
+ breach names that alias has appeared in for the specified domain.</p>
133
+ </dd>
73
134
  <dt><a href="#Paste">Paste</a> : <code>object</code></dt>
74
135
  <dd><p>An object representing a paste.</p>
75
136
  </dd>
@@ -80,6 +141,14 @@ hash prefix) to how many times it occurred in the Pwned Passwords repository.</p
80
141
  <dt><a href="#SearchResults">SearchResults</a> : <code>object</code></dt>
81
142
  <dd><p>An object representing search results.</p>
82
143
  </dd>
144
+ <dt><a href="#StealerLogDomainsByEmailAlias">StealerLogDomainsByEmailAlias</a> : <code>Object.&lt;string, Array.&lt;string&gt;&gt;</code></dt>
145
+ <dd><p>An object mapping an email alias (local-part before the &#39;@&#39;) to the list of
146
+ email domains that alias has appeared in within stealer logs for the specified
147
+ email domain.</p>
148
+ </dd>
149
+ <dt><a href="#SubscribedDomain">SubscribedDomain</a> : <code>object</code></dt>
150
+ <dd><p>An object representing a subscribed domain.</p>
151
+ </dd>
83
152
  <dt><a href="#subscriptionstatus--object">SubscriptionStatus</a> : <code>object</code></dt>
84
153
  <dd><p>An object representing the status of your HIBP subscription.</p>
85
154
  </dd>
@@ -191,6 +260,49 @@ try {
191
260
  // ...
192
261
  }
193
262
  ```
263
+ <a name="breachedDomain"></a>
264
+
265
+ ## breachedDomain(domain, [options]) ⇒ [<code>Promise.&lt;BreachedDomainsByEmailAlias&gt;</code>](#breach--objectedDomainsByEmailAlias) \| <code>Promise.&lt;null&gt;</code>
266
+ Fetches all breached email addresses for a domain.
267
+
268
+ The result maps email aliases (the local-part before the '@') to an array of
269
+ breach names. For example, querying `example.com` could return an object like
270
+ `{ "john": ["Adobe"], "jane": ["Adobe", "Gawker"] }`, corresponding to
271
+ `john@example.com` and `jane@example.com`.
272
+
273
+ 🔑 `haveibeenpwned.com` requires an API key from
274
+ https://haveibeenpwned.com/API/Key for the `breacheddomain` endpoint. The
275
+ `apiKey` option here is not explicitly required, but direct requests made
276
+ without it will fail (unless you specify a `baseUrl` to a proxy that inserts
277
+ a valid API key on your behalf).
278
+
279
+ **Kind**: global function
280
+ **Returns**: [<code>Promise.&lt;BreachedDomainsByEmailAlias&gt;</code>](#breach--objectedDomainsByEmailAlias) \| <code>Promise.&lt;null&gt;</code> - a Promise which
281
+ resolves to an object mapping aliases to breach name arrays (or null if no
282
+ results were found), or rejects with an Error
283
+
284
+ | Param | Type | Description |
285
+ | --- | --- | --- |
286
+ | domain | <code>string</code> | the domain to query (e.g., "example.com") |
287
+ | [options] | <code>object</code> | a configuration object |
288
+ | [options.apiKey] | <code>string</code> | an API key from https://haveibeenpwned.com/API/Key (default: undefined) |
289
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
290
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
291
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
292
+
293
+ **Example**
294
+ ```js
295
+ try {
296
+ const data = await breachedDomain("example.com", { apiKey: "my-api-key" });
297
+ if (data) {
298
+ // { "john": ["Adobe"], "jane": ["Adobe", "Gawker"] }
299
+ } else {
300
+ // no results
301
+ }
302
+ } catch (err) {
303
+ // ...
304
+ }
305
+ ```
194
306
  <a name="breaches"></a>
195
307
 
196
308
  ## breaches([options]) ⇒ <code><a href="#breach--object">Promise.&lt;Array.&lt;Breach&gt;&gt;</a></code>
@@ -264,6 +376,36 @@ try {
264
376
  // ...
265
377
  }
266
378
  ```
379
+ <a name="latestBreach"></a>
380
+
381
+ ## latestBreach([options]) ⇒ [<code>Promise.&lt;Breach&gt;</code>](#breach--object) \| <code>Promise.&lt;null&gt;</code>
382
+ Fetches the most recently added breach.
383
+
384
+ **Kind**: global function
385
+ **Returns**: [<code>Promise.&lt;Breach&gt;</code>](#breach--object) \| <code>Promise.&lt;null&gt;</code> - a Promise which resolves to an
386
+ object representing a breach (or null if no breach was found), or rejects
387
+ with an Error
388
+
389
+ | Param | Type | Description |
390
+ | --- | --- | --- |
391
+ | [options] | <code>object</code> | a configuration object |
392
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
393
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
394
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
395
+
396
+ **Example**
397
+ ```js
398
+ try {
399
+ const data = await latestBreach();
400
+ if (data) {
401
+ // ...
402
+ } else {
403
+ // ...
404
+ }
405
+ } catch (err) {
406
+ // ...
407
+ }
408
+ ```
267
409
  <a name="pasteAccount"></a>
268
410
 
269
411
  ## pasteAccount(email, [options]) ⇒ <code><a href="#paste--object">Promise.&lt;Array.&lt;Paste&gt;&gt;</a></code> \| <code>Promise.&lt;null&gt;</code>
@@ -469,6 +611,208 @@ try {
469
611
  // ...
470
612
  }
471
613
  ```
614
+ <a name="stealerLogsByEmailDomain"></a>
615
+
616
+ ## stealerLogsByEmailDomain(emailDomain, [options]) ⇒ [<code>Promise.&lt;StealerLogDomainsByEmailAlias&gt;</code>](#StealerLogDomainsByEmailAlias) \| <code>Promise.&lt;null&gt;</code>
617
+ Fetches all stealer log email aliases for an email domain.
618
+
619
+ The result maps email aliases (the local-part before the '@') to an array of
620
+ email domains found in stealer logs. For example, querying `example.com`
621
+ could return an object like `{ "andy": ["netflix.com"], "jane": ["netflix.com",
622
+ "spotify.com"] }`, corresponding to `andy@example.com` and `jane@example.com`.
623
+
624
+ 🔑 `haveibeenpwned.com` requires an API key from
625
+ https://haveibeenpwned.com/API/Key for the `stealerlogsbyemaildomain` endpoint.
626
+ The `apiKey` option here is not explicitly required, but direct requests made
627
+ without it will fail (unless you specify a `baseUrl` to a proxy that inserts
628
+ a valid API key on your behalf).
629
+
630
+ **Kind**: global function
631
+ **Returns**: [<code>Promise.&lt;StealerLogDomainsByEmailAlias&gt;</code>](#StealerLogDomainsByEmailAlias) \| <code>Promise.&lt;null&gt;</code> - a Promise
632
+ which resolves to an object mapping aliases to stealer log email domain arrays
633
+ (or null if no results were found), or rejects with an Error
634
+
635
+ | Param | Type | Description |
636
+ | --- | --- | --- |
637
+ | emailDomain | <code>string</code> | the email domain to query (e.g., "example.com") |
638
+ | [options] | <code>object</code> | a configuration object |
639
+ | [options.apiKey] | <code>string</code> | an API key from https://haveibeenpwned.com/API/Key (default: undefined) |
640
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
641
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
642
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
643
+
644
+ **Example**
645
+ ```js
646
+ try {
647
+ const data = await stealerLogsByEmailDomain("example.com", { apiKey: "my-api-key" });
648
+ if (data) {
649
+ // { "andy": ["netflix.com"], "jane": ["netflix.com", "spotify.com"] }
650
+ } else {
651
+ // no results
652
+ }
653
+ } catch (err) {
654
+ // ...
655
+ }
656
+ ```
657
+ <a name="stealerLogsByEmail"></a>
658
+
659
+ ## stealerLogsByEmail(emailAddress, [options]) ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>Promise.&lt;null&gt;</code>
660
+ Fetches all stealer log domains for an email address.
661
+
662
+ Returns an array of domains for which stealer logs contain entries for the
663
+ supplied email address.
664
+
665
+ 🔑 `haveibeenpwned.com` requires an API key from
666
+ https://haveibeenpwned.com/API/Key for the `stealerlogsbyemail` endpoint. The
667
+ `apiKey` option here is not explicitly required, but direct requests made
668
+ without it will fail (unless you specify a `baseUrl` to a proxy that inserts
669
+ a valid API key on your behalf).
670
+
671
+ **Kind**: global function
672
+ **Returns**: <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>Promise.&lt;null&gt;</code> - a Promise which resolves to an
673
+ array of domain strings (or null if none were found), or rejects with an
674
+ Error
675
+
676
+ | Param | Type | Description |
677
+ | --- | --- | --- |
678
+ | emailAddress | <code>string</code> | the email address to query |
679
+ | [options] | <code>object</code> | a configuration object |
680
+ | [options.apiKey] | <code>string</code> | an API key from https://haveibeenpwned.com/API/Key (default: undefined) |
681
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
682
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
683
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
684
+
685
+ **Example**
686
+ ```js
687
+ try {
688
+ const data = await stealerLogsByEmail("foo@bar.com", { apiKey: "my-api-key" });
689
+ if (data) {
690
+ // ...
691
+ } else {
692
+ // ...
693
+ }
694
+ } catch (err) {
695
+ // ...
696
+ }
697
+ ```
698
+ **Example**
699
+ ```js
700
+ try {
701
+ const data = await stealerLogsByEmail("foo@bar.com", {
702
+ baseUrl: "https://my-hibp-proxy:8080",
703
+ });
704
+ if (data) {
705
+ // ...
706
+ } else {
707
+ // ...
708
+ }
709
+ } catch (err) {
710
+ // ...
711
+ }
712
+ ```
713
+ <a name="stealerLogsByWebsiteDomain"></a>
714
+
715
+ ## stealerLogsByWebsiteDomain(websiteDomain, [options]) ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>Promise.&lt;null&gt;</code>
716
+ Fetches all stealer log email addresses for a website domain.
717
+
718
+ The result is an array of strings representing email addresses found in
719
+ stealer logs for the specified website domain (e.g., "example.com").
720
+
721
+ 🔑 `haveibeenpwned.com` requires an API key from
722
+ https://haveibeenpwned.com/API/Key for the `stealerlogsbywebsitedomain`
723
+ endpoint. The `apiKey` option here is not explicitly required, but direct
724
+ requests made without it will fail (unless you specify a `baseUrl` to a proxy
725
+ that inserts a valid API key on your behalf).
726
+
727
+ **Kind**: global function
728
+ **Returns**: <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>Promise.&lt;null&gt;</code> - a Promise which resolves to an
729
+ array of email addresses (or null if no results were found), or rejects with
730
+ an Error
731
+
732
+ | Param | Type | Description |
733
+ | --- | --- | --- |
734
+ | websiteDomain | <code>string</code> | the website domain to query (e.g., "example.com") |
735
+ | [options] | <code>object</code> | a configuration object |
736
+ | [options.apiKey] | <code>string</code> | an API key from https://haveibeenpwned.com/API/Key (default: undefined) |
737
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
738
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
739
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
740
+
741
+ **Example**
742
+ ```js
743
+ try {
744
+ const data = await stealerLogsByWebsiteDomain("example.com", { apiKey: "my-api-key" });
745
+ if (data) {
746
+ // ["andy@gmail.com", "jane@gmail.com"]
747
+ } else {
748
+ // no results
749
+ }
750
+ } catch (err) {
751
+ // ...
752
+ }
753
+ ```
754
+ **Example**
755
+ ```js
756
+ try {
757
+ const data = await stealerLogsByWebsiteDomain("example.com", {
758
+ baseUrl: "https://my-hibp-proxy:8080",
759
+ });
760
+ if (data) {
761
+ // ...
762
+ } else {
763
+ // ...
764
+ }
765
+ } catch (err) {
766
+ // ...
767
+ }
768
+ ```
769
+ <a name="subscribedDomains"></a>
770
+
771
+ ## subscribedDomains([options]) ⇒ <code><a href="#subscribeddomain--object">Promise.&lt;Array.&lt;SubscribedDomain&gt;&gt;</a></code>
772
+ Fetches all subscribed domains for your HIBP account.
773
+
774
+ Returns domains that have been successfully added to the Domain Search dashboard
775
+ after verifying control. Each domain includes metadata about breach counts and
776
+ the next renewal date, where available.
777
+
778
+ 🔑 `haveibeenpwned.com` requires an API key from
779
+ https://haveibeenpwned.com/API/Key for the `subscribeddomains` endpoint. The
780
+ `apiKey` option here is not explicitly required, but direct requests made
781
+ without it will fail (unless you specify a `baseUrl` to a proxy that inserts
782
+ a valid API key on your behalf).
783
+
784
+ **Kind**: global function
785
+ **Returns**: <code><a href="#subscribeddomain--object">Promise.&lt;Array.&lt;SubscribedDomain&gt;&gt;</a></code> - a Promise which resolves to an array of
786
+ subscribed domain objects (an empty array if none), or rejects with an Error
787
+
788
+ | Param | Type | Description |
789
+ | --- | --- | --- |
790
+ | [options] | <code>object</code> | a configuration object |
791
+ | [options.apiKey] | <code>string</code> | an API key from https://haveibeenpwned.com/API/Key (default: undefined) |
792
+ | [options.baseUrl] | <code>string</code> | a custom base URL for the haveibeenpwned.com API endpoints (default: `https://haveibeenpwned.com/api/v3`) |
793
+ | [options.timeoutMs] | <code>number</code> | timeout for the request in milliseconds (default: none) |
794
+ | [options.userAgent] | <code>string</code> | a custom string to send as the User-Agent field in the request headers (default: `hibp <version>`) |
795
+
796
+ **Example**
797
+ ```js
798
+ try {
799
+ const data = await subscribedDomains({ apiKey: "my-api-key" });
800
+ // ...
801
+ } catch (err) {
802
+ // ...
803
+ }
804
+ ```
805
+ **Example**
806
+ ```js
807
+ try {
808
+ const data = await subscribedDomains({
809
+ baseUrl: "https://my-hibp-proxy:8080",
810
+ });
811
+ // ...
812
+ } catch (err) {
813
+ // ...
814
+ }
815
+ ```
472
816
  <a name="subscriptionStatus"></a>
473
817
 
474
818
  ## subscriptionStatus([options]) ⇒ [<code>Promise.&lt;SubscriptionStatus&gt;</code>](#subscriptionstatus--object)
@@ -540,6 +884,13 @@ An object representing a breach.
540
884
  | IsSubscriptionFree | <code>boolean</code> |
541
885
  | LogoPath | <code>string</code> |
542
886
 
887
+ <a name="BreachedDomainsByEmailAlias"></a>
888
+
889
+ ## BreachedDomainsByEmailAlias : <code>Object.&lt;string, Array.&lt;string&gt;&gt;</code>
890
+ An object mapping an email alias (local-part before the '@') to the list of
891
+ breach names that alias has appeared in for the specified domain.
892
+
893
+ **Kind**: global typedef
543
894
  <a name="Paste"></a>
544
895
 
545
896
  ## Paste : <code>object</code>
@@ -576,6 +927,30 @@ An object representing search results.
576
927
  | breaches | [<code>Array.&lt;Breach&gt;</code>](#breach--object) \| <code>null</code> |
577
928
  | pastes | [<code>Array.&lt;Paste&gt;</code>](#Paste) \| <code>null</code> |
578
929
 
930
+ <a name="StealerLogDomainsByEmailAlias"></a>
931
+
932
+ ## StealerLogDomainsByEmailAlias : <code>Object.&lt;string, Array.&lt;string&gt;&gt;</code>
933
+ An object mapping an email alias (local-part before the '@') to the list of
934
+ email domains that alias has appeared in within stealer logs for the specified
935
+ email domain.
936
+
937
+ **Kind**: global typedef
938
+ <a name="SubscribedDomain"></a>
939
+
940
+ ## SubscribedDomain : <code>object</code>
941
+ An object representing a subscribed domain.
942
+
943
+ **Kind**: global typedef
944
+ **Properties**
945
+
946
+ | Name | Type | Description |
947
+ | --- | --- | --- |
948
+ | DomainName | <code>string</code> | the fully qualified domain name |
949
+ | PwnCount | <code>number</code> \| <code>null</code> | total breached addresses at last search |
950
+ | PwnCountExcludingSpamLists | <code>number</code> \| <code>null</code> | breached addresses excluding spam lists at last search |
951
+ | PwnCountExcludingSpamListsAtLastSubscriptionRenewal | <code>number</code> \| <code>null</code> | breached addresses excluding spam lists at the time of last subscription renewal |
952
+ | NextSubscriptionRenewal | <code>string</code> \| <code>null</code> | ISO 8601 datetime when the current subscription ends |
953
+
579
954
  <a name="SubscriptionStatus"></a>
580
955
 
581
956
  ## SubscriptionStatus : <code>object</code>
@@ -591,4 +966,5 @@ An object representing the status of your HIBP subscription.
591
966
  | SubscribedUntil | <code>string</code> |
592
967
  | Rpm | <code>number</code> |
593
968
  | DomainSearchMaxBreachedAccounts | <code>number</code> |
969
+ | IncludesStealerLogs | <code>boolean</code> |
594
970
 
package/CHANGELOG.md CHANGED
@@ -1,13 +1,37 @@
1
1
  # Change Log
2
2
 
3
+ ## 15.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#543](https://github.com/wKovacs64/hibp/pull/543) [`70db0e1`](https://github.com/wKovacs64/hibp/commit/70db0e181d050b89eee34b326d6fb6247a5075bd) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `stealerLogsByEmailDomain` module.
8
+
9
+ - [#541](https://github.com/wKovacs64/hibp/pull/541) [`655b473`](https://github.com/wKovacs64/hibp/commit/655b473741b6ef358684c2c56c0bd4746ba0baf5) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `stealerLogsByEmail` module.
10
+
11
+ - [#542](https://github.com/wKovacs64/hibp/pull/542) [`682cff7`](https://github.com/wKovacs64/hibp/commit/682cff74c56322b348afab607da6786ff4c01691) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `stealerLogsByWebsiteDomain` module.
12
+
13
+ - [#539](https://github.com/wKovacs64/hibp/pull/539) [`a0c6e9a`](https://github.com/wKovacs64/hibp/commit/a0c6e9a01ad25931320e8dc79993faf11b127524) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `subscribedDomains` module.
14
+
15
+ - [#537](https://github.com/wKovacs64/hibp/pull/537) [`e15c6a7`](https://github.com/wKovacs64/hibp/commit/e15c6a7e053ded3e79ac407a33a213890d642454) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `latestBreach` module.
16
+
17
+ - [#538](https://github.com/wKovacs64/hibp/pull/538) [`f08af27`](https://github.com/wKovacs64/hibp/commit/f08af2795aac451d2d4abd9bca144214554b2575) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `breachedDomain` module.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#535](https://github.com/wKovacs64/hibp/pull/535) [`d47d462`](https://github.com/wKovacs64/hibp/commit/d47d46252c96990e35e785239189ca4834a80b4a) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Add `IncludesStealerLogs` field to `SubscriptionStatus` interface and docs.
22
+
23
+ ## 15.0.1
24
+
25
+ ### Patch Changes
26
+
27
+ - [#510](https://github.com/wKovacs64/hibp/pull/510) [`879fe9f`](https://github.com/wKovacs64/hibp/commit/879fe9fc3a7853eef69146841be32cdcfab0aa25) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Export the API data model types that were missing in v15.0.0.
28
+
3
29
  ## 15.0.0
4
30
 
5
31
  ### Major Changes
6
32
 
7
33
  - [#509](https://github.com/wKovacs64/hibp/pull/509) [`e8d4986`](https://github.com/wKovacs64/hibp/commit/e8d498622020fe0c99847f915839ce382bf4d817) Thanks [@wKovacs64](https://github.com/wKovacs64)! - Drop support for Node 18 and remove the CommonJS and UMD builds:
8
-
9
34
  - Drop support for Node.js 18 as it is [end-of-life](https://nodejs.org/en/about/releases/), making the new minimum Node.js runtime v20.19.0. Please upgrade your Node.js environment if necessary, or continue using a previous release if you are unable to upgrade your environment.
10
-
11
35
  - This also allowed us to drop the `fetch` polyfill that was only necessary in Node 18, which reduced the bundle size by approximately 33%! 📉 The library now officially has **zero dependencies**. 🎉
12
36
 
13
37
  - Remove the CommonJS build since [you can now `require()` ESM as of Node v20.19.0](https://github.com/nodejs/node/releases/tag/v20.19.0). **Consumers in a CommonJS environment should still be able to use the library as before** (given the appropriate Node.js version).
package/MIGRATION.md CHANGED
@@ -17,7 +17,6 @@
17
17
  #### 9.0.3 → 10.0.0
18
18
 
19
19
  - The production/minified versions of the browser build targets have been renamed:
20
-
21
20
  - ESM for Browsers (`<script type="module">`)
22
21
  - `dist/browser/hibp.esm.min.js` → `dist/browser/hibp.module.js`
23
22
  - UMD
@@ -38,7 +37,6 @@
38
37
 
39
38
  - Output files for all build targets have been consolidated under the `dist` directory. This should
40
39
  be transparent if you followed the documentation, but the changes are as follows:
41
-
42
40
  - CommonJS
43
41
  - `lib/hibp.js` → `dist/cjs/hibp.js`
44
42
  - ECMAScript Modules
package/README.md CHANGED
@@ -36,14 +36,20 @@ browser.
36
36
 
37
37
  ## Features (🔑 = [requires][api-key-blog-post] an [API key][get-api-key])
38
38
 
39
+ - Get the most recently added breach
39
40
  - Get a single breach event
40
41
  - Get all breaches for an account 🔑
42
+ - Get all breached email addresses for a domain 🔑
41
43
  - Get all breach events in the system
42
44
  - Get all data classes
43
45
  - Get all pastes for an account 🔑
44
46
  - [Securely][search-by-range] check a password to see if it has been exposed in a data breach
45
47
  - Check a SHA-1 or NTLM prefix to see if it has been exposed in a data breach
46
48
  - Search for an account in both breaches and pastes at the same time 🔑
49
+ - Get all stealer log domains for an email address 🔑
50
+ - Get all stealer log email aliases for an email domain 🔑
51
+ - Get all stealer log email addresses for a website domain 🔑
52
+ - Get all subscribed domains 🔑
47
53
  - Get your subscription status 🔑
48
54
  - All queries return a Promise
49
55
  - Available server-side (e.g., Node.js) and client-side (browser)
@@ -63,12 +69,18 @@ The following modules are available:
63
69
 
64
70
  - [breach](API.md#breach)
65
71
  - [breachedAccount](API.md#breachedaccount)
72
+ - [breachedDomain](API.md#breacheddomain)
66
73
  - [breaches](API.md#breaches)
67
74
  - [dataClasses](API.md#dataclasses)
75
+ - [latestBreach](API.md#latestbreach)
68
76
  - [pasteAccount](API.md#pasteaccount)
69
77
  - [pwnedPassword](API.md#pwnedpassword)
70
78
  - [pwnedPasswordRange](API.md#pwnedpasswordrange)
71
79
  - [search](API.md#search)
80
+ - [stealerLogsByEmail](API.md#stealerlogsbyemail)
81
+ - [stealerLogsByEmailDomain](API.md#stealerlogsbyemaildomain)
82
+ - [stealerLogsByWebsiteDomain](API.md#stealerlogsbywebsitedomain)
83
+ - [subscribedDomains](API.md#subscribeddomains)
72
84
  - [subscriptionStatus](API.md#subscriptionstatus)
73
85
 
74
86
  Please see the [API reference](API.md) for more detailed usage information and examples.
@@ -170,7 +182,7 @@ This module is distributed under the [MIT License][license].
170
182
  [ci-url]: https://github.com/wKovacs64/hibp/actions?query=workflow%3Aci
171
183
  [coverage-image]: https://img.shields.io/codecov/c/github/wKovacs64/hibp/main.svg?style=flat-square
172
184
  [coverage-url]: https://codecov.io/gh/wKovacs64/hibp/branch/main
173
- [deno]: https://deno.land/
185
+ [deno]: https://deno.com/
174
186
  [troy]: https://www.troyhunt.com
175
187
  [haveibeenpwned]: https://haveibeenpwned.com
176
188
  [haveibeenpwned-rate-limiting]: https://haveibeenpwned.com/API/v3#RateLimiting
@@ -1,2 +1,2 @@
1
- var w="hibp",y="15.0.0";var h={status:400,statusText:"Bad request \u2014 the account does not comply with an acceptable format."},P={status:401,body:`Your request to the API couldn't be authorised. Check you have the right value in the "hibp-api-key" header, refer to the documentation for more: https://haveibeenpwned.com/API/v3#Authorisation`},g={status:403,statusText:"Forbidden - access denied."};var x={status:404},U={headers:new Map([["retry-after","2"]]),status:429,body:{statusCode:429,message:"Rate limit is exceeded. Try again in 2 seconds."}};var d=class extends Error{retryAfterSeconds;constructor(t,r,n){super(r,n),this.name=this.constructor.name,this.retryAfterSeconds=typeof t=="string"?Number.parseInt(t,10):void 0}};function I(e){return`Request blocked, contact haveibeenpwned.com if this continues (Ray ID: ${e})`}async function u(e,t={}){let{apiKey:r,baseUrl:n="https://haveibeenpwned.com/api/v3",timeoutMs:o,userAgent:a}=t,i={};r&&(i["HIBP-API-Key"]=r),a&&(i["User-Agent"]=a),!a&&typeof navigator>"u"&&(i["User-Agent"]=`${w} ${y}`);let p={headers:i,...o?{signal:AbortSignal.timeout(o)}:{}},m=`${n.replace(/\/$/g,"")}${e}`,s=await fetch(m,p);if(s.ok)return s.json();switch(s.status){case h.status:throw new Error(h.statusText);case P.status:{let c=await s.text();throw new Error(c)}case g.status:{let c=s.headers.get("cf-ray");throw c?new Error(I(c)):new Error(g.statusText)}case x.status:return null;case U.status:{let c=await s.json(),f=s.headers.get("retry-after");throw new d(f,c.message)}default:throw new Error(s.statusText)}}function B(e,t={}){return u(`/breach/${encodeURIComponent(e)}`,t)}function l(e,t={}){let{apiKey:r,domain:n,includeUnverified:o=!0,timeoutMs:a,truncate:i=!0,baseUrl:p,userAgent:m}=t,s=`/breachedaccount/${encodeURIComponent(e)}?`,c=[];return n&&c.push(`domain=${encodeURIComponent(n)}`),o||c.push("includeUnverified=false"),i||c.push("truncateResponse=false"),u(`${s}${c.join("&")}`,{apiKey:r,baseUrl:p,timeoutMs:a,userAgent:m})}function M(e={}){let{domain:t,baseUrl:r,timeoutMs:n,userAgent:o}=e,a="/breaches?",i=[];return t&&i.push(`domain=${encodeURIComponent(t)}`),u(`${a}${i.join("&")}`,{baseUrl:r,timeoutMs:n,userAgent:o})}function T(e={}){return u("/dataclasses",e)}function b(e,t={}){return u(`/pasteaccount/${encodeURIComponent(e)}`,t)}var E={status:400,body:"The hash prefix was not in a valid format"};async function R(e,t={}){let{baseUrl:r="https://api.pwnedpasswords.com",timeoutMs:n,userAgent:o,addPadding:a=!1,mode:i="sha1"}=t,p={headers:{...o?{"User-Agent":o}:{},...a?{"Add-Padding":"true"}:{}},...n?{signal:AbortSignal.timeout(n)}:{}},m=`${r.replace(/\/$/g,"")}${e}?mode=${i}`,s=await fetch(m,p);if(s.ok)return s.text();if(s.status===E.status){let c=await s.text();throw new Error(c)}throw new Error(s.statusText)}async function A(e,t={}){let{baseUrl:r,timeoutMs:n,userAgent:o,addPadding:a=!1,mode:i="sha1"}=t;return(await R(`/range/${encodeURIComponent(e)}`,{baseUrl:r,timeoutMs:n,userAgent:o,addPadding:a,mode:i})).split(`
2
- `).filter(Boolean).reduce((s,c)=>{let[f,S]=c.split(":");return s[f]=Number.parseInt(S,10),s},{})}async function D(e,t={}){let[r,n]=await $(e);return(await A(r,t))[n]||0}async function $(e){if(typeof crypto=="object"&&crypto.subtle){let t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t),o=Array.from(new Uint8Array(r)).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return[o.slice(0,5),o.slice(5)]}throw new Error("The Web Crypto API is not available in this environment.")}async function v(e,t={}){let{apiKey:r,domain:n,truncate:o=!0,baseUrl:a,timeoutMs:i,userAgent:p}=t,[m,s]=await Promise.all([l(e,{apiKey:r,domain:n,truncate:o,baseUrl:a,timeoutMs:i,userAgent:p}),/^.+@.+$/.test(e)?b(e,{apiKey:r,baseUrl:a,timeoutMs:i,userAgent:p}):null]);return{breaches:m,pastes:s}}async function C(e={}){return u("/subscription/status",e)}export{d as RateLimitError,B as breach,l as breachedAccount,M as breaches,T as dataClasses,b as pasteAccount,D as pwnedPassword,A as pwnedPasswordRange,v as search,C as subscriptionStatus};
1
+ var A="hibp",w="15.1.0";var g={status:400,statusText:"Bad request \u2014 the account does not comply with an acceptable format."},P={status:401,body:`Your request to the API couldn't be authorised. Check you have the right value in the "hibp-api-key" header, refer to the documentation for more: https://haveibeenpwned.com/API/v3#Authorisation`},f={status:403,statusText:"Forbidden - access denied."};var U={status:404},E={headers:new Map([["retry-after","2"]]),status:429,body:{statusCode:429,message:"Rate limit is exceeded. Try again in 2 seconds."}};var d=class extends Error{retryAfterSeconds;constructor(t,s,r){super(s,r),this.name=this.constructor.name,this.retryAfterSeconds=typeof t=="string"?Number.parseInt(t,10):void 0}};function R(e){return`Request blocked, contact haveibeenpwned.com if this continues (Ray ID: ${e})`}async function a(e,t={}){let{apiKey:s,baseUrl:r="https://haveibeenpwned.com/api/v3",timeoutMs:n,userAgent:o}=t,i={};s&&(i["HIBP-API-Key"]=s),o&&(i["User-Agent"]=o),!o&&typeof navigator>"u"&&(i["User-Agent"]=`${A} ${w}`);let c={headers:i,...n?{signal:AbortSignal.timeout(n)}:{}},u=`${r.replace(/\/$/g,"")}${e}`,m=await fetch(u,c);if(m.ok)return m.json();switch(m.status){case g.status:throw new Error(g.statusText);case P.status:{let p=await m.text();throw new Error(p)}case f.status:{let p=m.headers.get("cf-ray");throw p?new Error(R(p)):new Error(f.statusText)}case U.status:return null;case E.status:{let p=await m.json(),l=m.headers.get("retry-after");throw new d(l,p.message)}default:throw new Error(m.statusText)}}function S(e,t={}){return a(`/breach/${encodeURIComponent(e)}`,t)}function b(e,t={}){let{apiKey:s,domain:r,includeUnverified:n=!0,timeoutMs:o,truncate:i=!0,baseUrl:c,userAgent:u}=t,m=`/breachedaccount/${encodeURIComponent(e)}?`,p=[];return r&&p.push(`domain=${encodeURIComponent(r)}`),n||p.push("includeUnverified=false"),i||p.push("truncateResponse=false"),a(`${m}${p.join("&")}`,{apiKey:s,baseUrl:c,timeoutMs:o,userAgent:u})}function M(e,t={}){let{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o}=t,i=`/breacheddomain/${encodeURIComponent(e)}`;return a(i,{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o})}function I(e={}){let{domain:t,baseUrl:s,timeoutMs:r,userAgent:n}=e,o="/breaches?",i=[];return t&&i.push(`domain=${encodeURIComponent(t)}`),a(`${o}${i.join("&")}`,{baseUrl:s,timeoutMs:r,userAgent:n})}function v(e={}){return a("/dataclasses",e)}function K(e={}){return a("/latestbreach",e)}function h(e,t={}){return a(`/pasteaccount/${encodeURIComponent(e)}`,t)}var x={status:400,body:"The hash prefix was not in a valid format"};async function B(e,t={}){let{baseUrl:s="https://api.pwnedpasswords.com",timeoutMs:r,userAgent:n,addPadding:o=!1,mode:i="sha1"}=t,c={headers:{...n?{"User-Agent":n}:{},...o?{"Add-Padding":"true"}:{}},...r?{signal:AbortSignal.timeout(r)}:{}},u=`${s.replace(/\/$/g,"")}${e}?mode=${i}`,m=await fetch(u,c);if(m.ok)return m.text();if(m.status===x.status){let p=await m.text();throw new Error(p)}throw new Error(m.statusText)}async function y(e,t={}){let{baseUrl:s,timeoutMs:r,userAgent:n,addPadding:o=!1,mode:i="sha1"}=t;return(await B(`/range/${encodeURIComponent(e)}`,{baseUrl:s,timeoutMs:r,userAgent:n,addPadding:o,mode:i})).split(`
2
+ `).filter(Boolean).reduce((m,p)=>{let[l,D]=p.split(":");return m[l]=Number.parseInt(D,10),m},{})}async function $(e,t={}){let[s,r]=await C(e);return(await y(s,t))[r]||0}async function C(e){if(typeof crypto=="object"&&crypto.subtle){let t=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",t),n=Array.from(new Uint8Array(s)).map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase();return[n.slice(0,5),n.slice(5)]}throw new Error("The Web Crypto API is not available in this environment.")}async function T(e,t={}){let{apiKey:s,domain:r,truncate:n=!0,baseUrl:o,timeoutMs:i,userAgent:c}=t,[u,m]=await Promise.all([b(e,{apiKey:s,domain:r,truncate:n,baseUrl:o,timeoutMs:i,userAgent:c}),/^.+@.+$/.test(e)?h(e,{apiKey:s,baseUrl:o,timeoutMs:i,userAgent:c}):null]);return{breaches:u,pastes:m}}function F(e,t={}){let{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o}=t,i=`/stealerlogsbyemail/${encodeURIComponent(e)}`;return a(i,{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o})}function j(e,t={}){let{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o}=t,i=`/stealerlogsbyemaildomain/${encodeURIComponent(e)}`;return a(i,{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o})}function L(e,t={}){let{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o}=t,i=`/stealerlogsbywebsitedomain/${encodeURIComponent(e)}`;return a(i,{apiKey:s,baseUrl:r,timeoutMs:n,userAgent:o})}function O(e={}){let{apiKey:t,baseUrl:s,timeoutMs:r,userAgent:n}=e;return a("/subscribeddomains",{apiKey:t,baseUrl:s,timeoutMs:r,userAgent:n})}async function N(e={}){return a("/subscription/status",e)}export{d as RateLimitError,S as breach,b as breachedAccount,M as breachedDomain,I as breaches,v as dataClasses,K as latestBreach,h as pasteAccount,$ as pwnedPassword,y as pwnedPasswordRange,T as search,F as stealerLogsByEmail,j as stealerLogsByEmailDomain,L as stealerLogsByWebsiteDomain,O as subscribedDomains,N as subscriptionStatus};
@@ -1,2 +1,2 @@
1
1
  export declare const PACKAGE_NAME = "hibp";
2
- export declare const PACKAGE_VERSION = "15.0.0";
2
+ export declare const PACKAGE_VERSION = "15.1.0";
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated. Do not edit.
2
2
  export const PACKAGE_NAME = "hibp";
3
- export const PACKAGE_VERSION = "15.0.0";
3
+ export const PACKAGE_VERSION = "15.1.0";
4
4
  //# sourceMappingURL=package-info.js.map
@@ -30,9 +30,14 @@ export interface SubscriptionStatus {
30
30
  SubscribedUntil: string;
31
31
  Rpm: number;
32
32
  DomainSearchMaxBreachedAccounts: number;
33
+ IncludesStealerLogs: boolean;
33
34
  }
34
- /**
35
- * All possible values that can be returned in the response body of an API query
36
- *
37
- * @internal
38
- */
35
+ export interface SubscribedDomain {
36
+ DomainName: string;
37
+ PwnCount: number | null;
38
+ PwnCountExcludingSpamLists: number | null;
39
+ PwnCountExcludingSpamListsAtLastSubscriptionRenewal: number | null;
40
+ NextSubscriptionRenewal: string | null;
41
+ }
42
+ export type BreachedDomainsByEmailAlias = Record<string, string[]>;
43
+ export type StealerLogDomainsByEmailAlias = Record<string, string[]>;
@@ -2,10 +2,4 @@
2
2
  // Data Models from the API
3
3
  //
4
4
  export {};
5
- /**
6
- * All possible values that can be returned in the response body of an API query
7
- *
8
- * @internal
9
- */
10
- // export type ResponseBody = ApiData | ErrorData;
11
5
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/haveibeenpwned/types.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,2BAA2B;AAC3B,EAAE;;AAiEF;;;;GAIG;AACH,kDAAkD"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/haveibeenpwned/types.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,2BAA2B;AAC3B,EAAE"}