@@ -69,6 +69,17 @@ convenience method is designed to mimic.</p>
6969required, but direct requests made without it will fail (unless you specify a
7070<code >baseUrl</code > to a proxy that inserts a valid API key on your behalf).</p >
7171</dd >
72+ <dt ><a href =" #stealerLogsByEmailDomain " >stealerLogsByEmailDomain(emailDomain, [options])</a > ⇒ <code ><a href =" #StealerLogDomainsByEmailAlias " >Promise.< ; StealerLogDomainsByEmailAlias> ; </a ></code > | <code >Promise.< ; null> ; </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 ' ; @' ; ) 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 >{ " ; andy" ; : [ " ; netflix.com" ; ] , " ; jane" ; : [ " ; netflix.com" ; , " ; spotify.com" ; ] }</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 >
7283<dt ><a href =" #stealerLogsByEmail " >stealerLogsByEmail(emailAddress, [options])</a > ⇒ <code >Promise.< ; Array.< ; string> ;> ; </code > | <code >Promise.< ; null> ; </code ></dt >
7384<dd ><p >Fetches all stealer log domains for an email address.</p >
7485<p >Returns an array of domains for which stealer logs contain entries for the
@@ -130,6 +141,11 @@ hash prefix) to how many times it occurred in the Pwned Passwords repository.</p
130141<dt ><a href =" #SearchResults " >SearchResults</a > : <code >object</code ></dt >
131142<dd ><p >An object representing search results.</p >
132143</dd >
144+ <dt ><a href =" #StealerLogDomainsByEmailAlias " >StealerLogDomainsByEmailAlias</a > : <code >Object.< ; string, Array.< ; string> ;> ; </code ></dt >
145+ <dd ><p >An object mapping an email alias (local-part before the ' ; @' ; ) to the list of
146+ email domains that alias has appeared in within stealer logs for the specified
147+ email domain.</p >
148+ </dd >
133149<dt ><a href =" #SubscribedDomain " >SubscribedDomain</a > : <code >object</code ></dt >
134150<dd ><p >An object representing a subscribed domain.</p >
135151</dd >
@@ -595,6 +611,49 @@ try {
595611 // ...
596612}
597613```
614+ <a name =" stealerLogsByEmailDomain " ></a >
615+
616+ ## stealerLogsByEmailDomain(emailDomain, [ options] ) ⇒ [ <code >Promise.< ; StealerLogDomainsByEmailAlias> ; </code >] ( #StealerLogDomainsByEmailAlias ) \| <code >Promise.< ; null> ; </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.< ; StealerLogDomainsByEmailAlias> ; </code >] ( #StealerLogDomainsByEmailAlias ) \| <code >Promise.< ; null> ; </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+ ```
598657<a name =" stealerLogsByEmail " ></a >
599658
600659## stealerLogsByEmail(emailAddress, [ options] ) ⇒ <code >Promise.< ; Array.< ; string> ;> ; </code > \| <code >Promise.< ; null> ; </code >
@@ -868,6 +927,14 @@ An object representing search results.
868927| breaches | [ <code >Array.< ; Breach> ; </code >] ( #breach--object ) \| <code >null</code > |
869928| pastes | [ <code >Array.< ; Paste> ; </code >] ( #Paste ) \| <code >null</code > |
870929
930+ <a name =" StealerLogDomainsByEmailAlias " ></a >
931+
932+ ## StealerLogDomainsByEmailAlias : <code >Object.< ; string, Array.< ; string> ;> ; </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
871938<a name =" SubscribedDomain " ></a >
872939
873940## SubscribedDomain : <code >object</code >
0 commit comments