@emailverifier/sdk 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -1,88 +1,88 @@
1
- # Email Verifier SDK
2
-
3
- Offline email analysis, a typed client for [emailverifier.dev](https://emailverifier.dev), and a CLI in one package.
4
-
5
- The offline functions use bundled data and make no network requests. They can identify syntax problems, disposable providers, free mailbox providers, role addresses, and common provider typos. They cannot confirm whether a mailbox exists or will accept mail.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install @emailverifier/sdk
11
- ```
12
-
13
- Node.js 20 or newer is required. The package has no runtime dependencies and sends no telemetry.
14
-
15
- ## Free offline analysis
16
-
17
- ```ts
18
- import { analyzeEmail } from '@emailverifier/sdk/offline'
19
-
20
- const result = analyzeEmail('Support+Trial@Gmail.com')
21
-
22
- console.log(result.checks.syntax)
23
- console.log(result.checks.disposable)
24
- console.log(result.checks.freeProvider)
25
- console.log(result.checks.roleBased)
26
- console.log(result.suggestion)
27
- ```
28
-
29
- The result intentionally has no `deliverable` field. DNS, SMTP recipient acceptance, and catch-all detection require the hosted API.
30
-
31
- You can also import focused helpers:
32
-
33
- ```ts
34
- import {
35
- isDisposableDomain,
36
- isFreeEmailProvider,
37
- isRoleAddress
38
- } from '@emailverifier/sdk/offline'
39
- ```
40
-
41
- ## Hosted verification
42
-
43
- Create a project at [emailverifier.dev](https://emailverifier.dev), then use its API key:
44
-
45
- ```ts
46
- import { EmailVerifier } from '@emailverifier/sdk'
47
-
48
- const client = new EmailVerifier({
49
- apiKey: process.env.EMAILVERIFIER_API_KEY!
50
- })
51
-
52
- const verification = await client.verify('hello@example.com')
53
- const domain = await client.checkDomain('example.com')
54
- const usage = await client.getUsage()
55
- ```
56
-
57
- `verify` and `checkDomain` each use one project credit. `getUsage` does not use a credit. The client does not retry failed requests automatically.
58
-
59
- ## CLI
60
-
61
- Run local analysis without an account or API key:
62
-
63
- ```bash
64
- npx @emailverifier/sdk check hello@example.com
65
- npx @emailverifier/sdk check hello@example.com --json
66
- ```
67
-
68
- Remote commands read the key from the environment. API keys are deliberately not accepted as command-line arguments because command histories and process lists can expose them.
69
-
70
- ```bash
71
- export EMAILVERIFIER_API_KEY=ev_your_project_key
72
-
73
- npx @emailverifier/sdk verify hello@example.com
74
- npx @emailverifier/sdk domain example.com
75
- npx @emailverifier/sdk usage
76
- ```
77
-
78
- Use `EMAILVERIFIER_BASE_URL` only when testing against a local or self-selected API origin.
79
-
80
- ## Data updates
81
-
82
- The disposable-domain snapshot comes from [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains) and includes additional maintained aliases. Its license is recorded in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
83
-
84
- The scheduled GitHub workflow validates upstream data, runs the package checks, publishes a patch release, and commits the updated snapshot when the list changes. npm Trusted Publishing must be connected to this repository before that workflow can publish.
85
-
86
- ## License
87
-
88
- MIT
1
+ # Email Verifier SDK
2
+
3
+ Offline email analysis, a typed client for [emailverifier.dev](https://emailverifier.dev), and a CLI in one package.
4
+
5
+ The offline functions use bundled data and make no network requests. They can identify syntax problems, disposable providers, free mailbox providers, role addresses, and common provider typos. They cannot confirm whether a mailbox exists or will accept mail.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @emailverifier/sdk
11
+ ```
12
+
13
+ Node.js 20 or newer is required. The package has no runtime dependencies and sends no telemetry.
14
+
15
+ ## Free offline analysis
16
+
17
+ ```ts
18
+ import { analyzeEmail } from '@emailverifier/sdk/offline'
19
+
20
+ const result = analyzeEmail('Support+Trial@Gmail.com')
21
+
22
+ console.log(result.checks.syntax)
23
+ console.log(result.checks.disposable)
24
+ console.log(result.checks.freeProvider)
25
+ console.log(result.checks.roleBased)
26
+ console.log(result.suggestion)
27
+ ```
28
+
29
+ The result intentionally has no `deliverable` field. DNS, SMTP recipient acceptance, and catch-all detection require the hosted API.
30
+
31
+ You can also import focused helpers:
32
+
33
+ ```ts
34
+ import {
35
+ isDisposableDomain,
36
+ isFreeEmailProvider,
37
+ isRoleAddress
38
+ } from '@emailverifier/sdk/offline'
39
+ ```
40
+
41
+ ## Hosted verification
42
+
43
+ Create a project at [emailverifier.dev](https://emailverifier.dev), then use its API key:
44
+
45
+ ```ts
46
+ import { EmailVerifier } from '@emailverifier/sdk'
47
+
48
+ const client = new EmailVerifier({
49
+ apiKey: process.env.EMAILVERIFIER_API_KEY!
50
+ })
51
+
52
+ const verification = await client.verify('hello@example.com')
53
+ const domain = await client.checkDomain('example.com')
54
+ const usage = await client.getUsage()
55
+ ```
56
+
57
+ `verify` and `checkDomain` each use one project credit. `getUsage` does not use a credit. The client does not retry failed requests automatically.
58
+
59
+ ## CLI
60
+
61
+ Run local analysis without an account or API key:
62
+
63
+ ```bash
64
+ npx @emailverifier/sdk check hello@example.com
65
+ npx @emailverifier/sdk check hello@example.com --json
66
+ ```
67
+
68
+ Remote commands read the key from the environment. API keys are deliberately not accepted as command-line arguments because command histories and process lists can expose them.
69
+
70
+ ```bash
71
+ export EMAILVERIFIER_API_KEY=ev_your_project_key
72
+
73
+ npx @emailverifier/sdk verify hello@example.com
74
+ npx @emailverifier/sdk domain example.com
75
+ npx @emailverifier/sdk usage
76
+ ```
77
+
78
+ Use `EMAILVERIFIER_BASE_URL` only when testing against a local or self-selected API origin.
79
+
80
+ ## Data updates
81
+
82
+ The disposable-domain snapshot comes from [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains) and includes additional maintained aliases. Its license is recorded in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
83
+
84
+ The scheduled GitHub workflow validates upstream data, commits changed snapshots, and publishes a tested patch release. Configure npm Trusted Publishing for GitHub owner `usamaejaz`, repository `emailverifier`, workflow `update-data.yml`, environment `npm`, and the `npm publish` action.
85
+
86
+ ## License
87
+
88
+ MIT
@@ -1,28 +1,28 @@
1
- # Disposable email domain data
2
-
1
+ # Disposable email domain data
2
+
3
3
  The generated `src/data/disposable-domains.generated.ts` snapshot incorporates data from
4
- [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains).
5
- The snapshot is maintained inside this repository and is not fetched at runtime.
6
-
7
- MIT License
8
-
9
- Copyright (c) 2017 Andrei Simionescu
10
- Copyright (c) 2017 Stefan Meinecke, greenSec GmbH
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy
13
- of this software and associated documentation files (the "Software"), to deal
14
- in the Software without restriction, including without limitation the rights
15
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- copies of the Software, and to permit persons to whom the Software is
17
- furnished to do so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all
20
- copies or substantial portions of the Software.
21
-
22
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- SOFTWARE.
4
+ [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains).
5
+ The snapshot is maintained inside this repository and is not fetched at runtime.
6
+
7
+ MIT License
8
+
9
+ Copyright (c) 2017 Andrei Simionescu
10
+ Copyright (c) 2017 Stefan Meinecke, greenSec GmbH
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.