@webbula/mcp 1.0.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.
- package/README.md +150 -0
- package/dist/api/enums.d.ts +80 -0
- package/dist/api/enums.js +230 -0
- package/dist/api/enums.js.map +1 -0
- package/dist/api/types.d.ts +163 -0
- package/dist/api/types.js +8 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/webbula-client.d.ts +116 -0
- package/dist/api/webbula-client.js +249 -0
- package/dist/api/webbula-client.js.map +1 -0
- package/dist/config.d.ts +70 -0
- package/dist/config.js +90 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/server/http.d.ts +4 -0
- package/dist/server/http.js +76 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/stdio.d.ts +12 -0
- package/dist/server/stdio.js +30 -0
- package/dist/server/stdio.js.map +1 -0
- package/dist/tools/download-results.d.ts +35 -0
- package/dist/tools/download-results.js +62 -0
- package/dist/tools/download-results.js.map +1 -0
- package/dist/tools/errors.d.ts +10 -0
- package/dist/tools/errors.js +16 -0
- package/dist/tools/errors.js.map +1 -0
- package/dist/tools/file-status.d.ts +35 -0
- package/dist/tools/file-status.js +54 -0
- package/dist/tools/file-status.js.map +1 -0
- package/dist/tools/get-credits.d.ts +31 -0
- package/dist/tools/get-credits.js +47 -0
- package/dist/tools/get-credits.js.map +1 -0
- package/dist/tools/hygiene-check.d.ts +49 -0
- package/dist/tools/hygiene-check.js +84 -0
- package/dist/tools/hygiene-check.js.map +1 -0
- package/dist/tools/persona-append.d.ts +62 -0
- package/dist/tools/persona-append.js +123 -0
- package/dist/tools/persona-append.js.map +1 -0
- package/dist/tools/register.d.ts +15 -0
- package/dist/tools/register.js +23 -0
- package/dist/tools/register.js.map +1 -0
- package/dist/tools/upload-file.d.ts +58 -0
- package/dist/tools/upload-file.js +119 -0
- package/dist/tools/upload-file.js.map +1 -0
- package/dist/tools/validate-lead.d.ts +102 -0
- package/dist/tools/validate-lead.js +192 -0
- package/dist/tools/validate-lead.js.map +1 -0
- package/dist/tools/verify-email.d.ts +41 -0
- package/dist/tools/verify-email.js +74 -0
- package/dist/tools/verify-email.js.map +1 -0
- package/dist/trust.d.ts +28 -0
- package/dist/trust.js +23 -0
- package/dist/trust.js.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Webbula MCP Server
|
|
2
|
+
|
|
3
|
+
Expose Webbula's email-intelligence and identity-resolution data to AI agents as
|
|
4
|
+
[Model Context Protocol](https://modelcontextprotocol.io) tools — verify and
|
|
5
|
+
clean email addresses, validate full lead records, run batch files, append
|
|
6
|
+
missing contact data, and check your credit balance. Each verification result
|
|
7
|
+
carries a **trust** block (data provenance and activity history) from Webbula's
|
|
8
|
+
20+ year dataset.
|
|
9
|
+
|
|
10
|
+
The server is a thin wrapper over the Webbula API: it validates input, calls the
|
|
11
|
+
API over HTTPS, and reshapes the response. It performs no scoring of its own —
|
|
12
|
+
every verdict comes from Webbula.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Tools
|
|
17
|
+
|
|
18
|
+
7 tools available today, plus 4 data-append tools **coming soon** (🔜). Every tool
|
|
19
|
+
validates input with `zod` before any upstream call and returns the result both
|
|
20
|
+
as pretty-printed text and as `structuredContent`.
|
|
21
|
+
|
|
22
|
+
| # | Tool | Category | Required params | Optional params |
|
|
23
|
+
|---|------|----------|-----------------|-----------------|
|
|
24
|
+
| 1 | `verify_email` | Email verification | `email` | `profile` |
|
|
25
|
+
| 2 | `hygiene_check` | Email verification | `emails` (array, 1–100) | `profile` |
|
|
26
|
+
| 3 | `validate_lead` | Lead validation | ≥1 of `first_name`, `last_name`, `full_address`, `phone`, `emails` | `profile` |
|
|
27
|
+
| 4 | `upload_file` | Batch (async) | `filename` + `content_base64` **or** `data_source` | `profile`, `url`, `host`, `port`, `username`, `password`, `path`, `secure` |
|
|
28
|
+
| 5 | `file_status` | Batch (async) | `package_name` | — |
|
|
29
|
+
| 6 | `download_results` | Batch (async) | `package_name`, `filename` | — |
|
|
30
|
+
| 7 | `get_credits` | Account | — | — |
|
|
31
|
+
| 8 | `append_email` 🔜 | Data append | ≥1 identifying attribute † | `scope` |
|
|
32
|
+
| 9 | `append_telephone` 🔜 | Data append | ≥1 identifying attribute † | `scope` |
|
|
33
|
+
| 10 | `append_postal` 🔜 | Data append | ≥1 identifying attribute † | `scope` |
|
|
34
|
+
| 11 | `append_automotive` 🔜 | Data append | ≥1 identifying attribute † | `scope` |
|
|
35
|
+
|
|
36
|
+
> 🔜 **Coming soon.** The four `append_*` (identity-resolution) tools are
|
|
37
|
+
> implemented and registered, but the data-append API endpoint is not yet wired
|
|
38
|
+
> up — these tools will go live once it is available.
|
|
39
|
+
>
|
|
40
|
+
> † The four `append_*` tools share one input: any combination of `first_name`,
|
|
41
|
+
> `last_name`, `email`, `address`, `city`, `state`, `zip5`, `phone` (at least one
|
|
42
|
+
> required), plus an optional `scope` (`individual` / `household` / `both`,
|
|
43
|
+
> default `both`).
|
|
44
|
+
|
|
45
|
+
### Capability breakdown
|
|
46
|
+
|
|
47
|
+
- **Email verification & hygiene** — `verify_email` returns a deliverability
|
|
48
|
+
verdict, any corrected form, and a trust block for a single address;
|
|
49
|
+
`hygiene_check` runs the same per-email classification + activity history over a
|
|
50
|
+
list of 1–100.
|
|
51
|
+
- **Lead validation** — `validate_lead` parses and assesses a full contact record
|
|
52
|
+
(name, postal address, phone) in one call, and runs email hygiene too when
|
|
53
|
+
`emails` are supplied.
|
|
54
|
+
- **Batch file processing (async)** — `upload_file` submits a file (inline base64
|
|
55
|
+
or a web/FTP/SSH source) and returns a `package_name`; poll `file_status`, then
|
|
56
|
+
pull each output with `download_results` (`insert.csv` / `_report.xls`).
|
|
57
|
+
- **Data append (identity resolution) 🔜 coming soon** — the `append_*` tools
|
|
58
|
+
will resolve a contact from known PII and return one missing data point: email,
|
|
59
|
+
phone (+ line type), full postal address, or automotive (year/make/model). Built
|
|
60
|
+
and registered; awaiting the data-append API endpoint.
|
|
61
|
+
- **Account** — `get_credits` reports the remaining balance per billing scenario
|
|
62
|
+
with an explicit "unlimited" flag (consumes no verification credits).
|
|
63
|
+
|
|
64
|
+
### Result vocabulary
|
|
65
|
+
|
|
66
|
+
Verification tools pass the upstream **verdict token** through verbatim as `status`
|
|
67
|
+
(or per-email `result`) and attach a static, documented `label` / `risk` /
|
|
68
|
+
`usable` for known tokens (unknown tokens keep the raw token, friendly fields
|
|
69
|
+
omitted — the wrapper never guesses):
|
|
70
|
+
|
|
71
|
+
| Token | Label | Risk | Usable |
|
|
72
|
+
|-------|-------|------|--------|
|
|
73
|
+
| `Clean` / `Valid` | Clean / Valid | Low | ✅ true |
|
|
74
|
+
| `Unknown` | Unknown | High to Moderate | — (indeterminate) |
|
|
75
|
+
| `Invalid` | Invalid | Extreme | ❌ false |
|
|
76
|
+
| `Reputation` | Reputation Threat | Extreme | ❌ false |
|
|
77
|
+
| `Fraud` | Fraud Threat | Extreme to High | ❌ false |
|
|
78
|
+
| `Delivery` | Delivery Threat | High | ❌ false |
|
|
79
|
+
| `Conversion` | Conversion Threat | Moderate | ❌ false |
|
|
80
|
+
| `Beta` | Beta Threat | Moderate to Low | ❌ false |
|
|
81
|
+
|
|
82
|
+
When upstream supplies activity data, a **trust** block is attached:
|
|
83
|
+
`{ data_source, first_seen, last_seen, trajectory }`.
|
|
84
|
+
|
|
85
|
+
### Resources
|
|
86
|
+
|
|
87
|
+
This server exposes **no MCP resources** — all functionality is provided through
|
|
88
|
+
the tools above.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Configuration
|
|
93
|
+
|
|
94
|
+
The package is configured entirely through the **environment** — nothing else is
|
|
95
|
+
required. The API key is held in memory for the duration of a request only; it is
|
|
96
|
+
never logged, persisted, or returned in any tool output or error.
|
|
97
|
+
|
|
98
|
+
| Variable | Default | Purpose |
|
|
99
|
+
|----------|---------|---------|
|
|
100
|
+
| `WEBBULA_API_KEY` | — | **Required.** Your Webbula API key. Sent upstream as the `X-API-KEY` header. |
|
|
101
|
+
| `PORT` | `3000` | Listen port for the HTTP transport. |
|
|
102
|
+
|
|
103
|
+
### Applying the configuration
|
|
104
|
+
|
|
105
|
+
The same tool set runs under two transports; the transport is chosen at launch,
|
|
106
|
+
everything else comes from the environment.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# stdio (default) — for a local MCP host that spawns the server
|
|
110
|
+
WEBBULA_API_KEY=wb_your_key npx -y @webbula/mcp
|
|
111
|
+
|
|
112
|
+
# HTTP transport on port 4000 — for a remote/shared deployment
|
|
113
|
+
WEBBULA_API_KEY=wb_your_key PORT=4000 npx -y @webbula/mcp --http
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Most MCP hosts launch the server over stdio and inject the key via `env`
|
|
117
|
+
(Claude Desktop `claude_desktop_config.json` example):
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"webbula": {
|
|
123
|
+
"command": "npx",
|
|
124
|
+
"args": ["-y", "@webbula/mcp"],
|
|
125
|
+
"env": {
|
|
126
|
+
"WEBBULA_API_KEY": "wb_your_key"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Step-by-step, per-client guides:
|
|
134
|
+
|
|
135
|
+
- [Claude Desktop](./docs/configuration-claude.md)
|
|
136
|
+
- [VS Code](./docs/configuration-vscode.md)
|
|
137
|
+
- [Cursor](./docs/configuration-cursor.md)
|
|
138
|
+
|
|
139
|
+
### Notes
|
|
140
|
+
|
|
141
|
+
- **Authentication model.** The key is configured **once, on the server
|
|
142
|
+
process**, and every request uses it. The HTTP transport does **not** read a
|
|
143
|
+
per-request `Authorization` / `X-API-KEY` header from inbound clients — run one
|
|
144
|
+
server instance per key (per tenant, if you need multiple keys).
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT © Webbula, LLC
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webbula response vocabulary — the single source of truth for every documented
|
|
3
|
+
* enum the API returns, with human-readable labels and descriptions.
|
|
4
|
+
*
|
|
5
|
+
* Source of truth: the official "Webbula Hygiene API — Developer Guide" v4.2.22
|
|
6
|
+
* (§2 Responses and Test Values, §5.2 task status, §6.1 webhook events). The
|
|
7
|
+
* upstream wire values are terse tokens / single-character flags / day buckets;
|
|
8
|
+
* the tables below map each one to a friendly label and the verbatim documented
|
|
9
|
+
* description so the tools can return human-readable statuses.
|
|
10
|
+
*
|
|
11
|
+
* These tables are DATA, not logic (constitution principle I): the wrapper still
|
|
12
|
+
* passes the upstream token through verbatim and only attaches the documented
|
|
13
|
+
* label/risk/description by static lookup — it never scores or infers a verdict.
|
|
14
|
+
* Any token absent from a table is surfaced as-is with the friendly fields
|
|
15
|
+
* omitted (no guessing). Update the table — never the handler — when Webbula
|
|
16
|
+
* adds a value.
|
|
17
|
+
*
|
|
18
|
+
* Only the email-verdict and activity tables are consumed by the current MVP
|
|
19
|
+
* tools (verify_email / hygiene_check). The name / postal / phone / task / hook
|
|
20
|
+
* tables are captured here ahead of the lead, batch, and webhook tools so the
|
|
21
|
+
* raw `context/` reference can be retired.
|
|
22
|
+
*/
|
|
23
|
+
/** Documented risk level for an email verdict (§2.1, verbatim). */
|
|
24
|
+
export type EmailRisk = "Extreme" | "Extreme to High" | "High" | "Moderate" | "Moderate to Low" | "High to Moderate" | "Low";
|
|
25
|
+
export interface EmailVerdictInfo {
|
|
26
|
+
/** Single-character batch-file flag for this verdict (§2.1). */
|
|
27
|
+
flag: string;
|
|
28
|
+
/** Human-readable label for the verdict token. */
|
|
29
|
+
label: string;
|
|
30
|
+
/** Documented threat/risk level. */
|
|
31
|
+
risk: EmailRisk;
|
|
32
|
+
/** Documented description, verbatim. */
|
|
33
|
+
description: string;
|
|
34
|
+
/**
|
|
35
|
+
* Static usability verdict. `undefined` means "indeterminate" — the agent must
|
|
36
|
+
* read `status`/`result` and decide; callers OMIT `usable` rather than guess.
|
|
37
|
+
*/
|
|
38
|
+
usable?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Email verdict tokens (§2.1). The union of the three profile modes (Hygiene +
|
|
42
|
+
* Verification bundled, Hygiene only, Verification only): the threat categories
|
|
43
|
+
* R/F/D/C/B plus Invalid/Unknown/Valid (verification) and Clean (hygiene-only).
|
|
44
|
+
*/
|
|
45
|
+
export declare const EMAIL_VERDICTS: Readonly<Record<string, EmailVerdictInfo>>;
|
|
46
|
+
/** Look up an email verdict token; `undefined` for unrecognised tokens. */
|
|
47
|
+
export declare function lookupEmailVerdict(token: string): EmailVerdictInfo | undefined;
|
|
48
|
+
/** Day-bucket tokens shared by `activity_first_seen` / `activity_most_recent_seen`. */
|
|
49
|
+
export declare const ACTIVITY_WINDOWS: Readonly<Record<string, string>>;
|
|
50
|
+
/** `activity_trajectory` values (§2.2) → documented description. */
|
|
51
|
+
export declare const ACTIVITY_TRAJECTORY: Readonly<Record<string, string>>;
|
|
52
|
+
/** Name assessment `status` (§2.3). */
|
|
53
|
+
export declare const NAME_STATUS: Readonly<Record<string, string>>;
|
|
54
|
+
export interface GenderInfo {
|
|
55
|
+
label: string;
|
|
56
|
+
description: string;
|
|
57
|
+
}
|
|
58
|
+
/** Modeled `gender` codes (§2.3). */
|
|
59
|
+
export declare const NAME_GENDER: Readonly<Record<string, GenderInfo>>;
|
|
60
|
+
export interface AccuracyReferencePoint {
|
|
61
|
+
score: string;
|
|
62
|
+
label: string;
|
|
63
|
+
description: string;
|
|
64
|
+
}
|
|
65
|
+
/** Documented `accuracy_score` reference points (§2.4) — orientation, not a lookup. */
|
|
66
|
+
export declare const POSTAL_ACCURACY_REFERENCE: ReadonlyArray<AccuracyReferencePoint>;
|
|
67
|
+
/** Phone `status` (§2.5). */
|
|
68
|
+
export declare const PHONE_STATUS: Readonly<Record<string, string>>;
|
|
69
|
+
/** Phone `service_type` (§2.5). */
|
|
70
|
+
export declare const PHONE_SERVICE_TYPE: Readonly<Record<string, string>>;
|
|
71
|
+
export interface TaskStatusInfo {
|
|
72
|
+
label: string;
|
|
73
|
+
description: string;
|
|
74
|
+
/** Terminal statuses produce no further transitions. */
|
|
75
|
+
terminal: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** Batch task `status` values (§5.2). */
|
|
78
|
+
export declare const TASK_STATUS: Readonly<Record<string, TaskStatusInfo>>;
|
|
79
|
+
/** Webhook event types (§6.1) → documented description. */
|
|
80
|
+
export declare const WEBHOOK_EVENTS: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webbula response vocabulary — the single source of truth for every documented
|
|
3
|
+
* enum the API returns, with human-readable labels and descriptions.
|
|
4
|
+
*
|
|
5
|
+
* Source of truth: the official "Webbula Hygiene API — Developer Guide" v4.2.22
|
|
6
|
+
* (§2 Responses and Test Values, §5.2 task status, §6.1 webhook events). The
|
|
7
|
+
* upstream wire values are terse tokens / single-character flags / day buckets;
|
|
8
|
+
* the tables below map each one to a friendly label and the verbatim documented
|
|
9
|
+
* description so the tools can return human-readable statuses.
|
|
10
|
+
*
|
|
11
|
+
* These tables are DATA, not logic (constitution principle I): the wrapper still
|
|
12
|
+
* passes the upstream token through verbatim and only attaches the documented
|
|
13
|
+
* label/risk/description by static lookup — it never scores or infers a verdict.
|
|
14
|
+
* Any token absent from a table is surfaced as-is with the friendly fields
|
|
15
|
+
* omitted (no guessing). Update the table — never the handler — when Webbula
|
|
16
|
+
* adds a value.
|
|
17
|
+
*
|
|
18
|
+
* Only the email-verdict and activity tables are consumed by the current MVP
|
|
19
|
+
* tools (verify_email / hygiene_check). The name / postal / phone / task / hook
|
|
20
|
+
* tables are captured here ahead of the lead, batch, and webhook tools so the
|
|
21
|
+
* raw `context/` reference can be retired.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Email verdict tokens (§2.1). The union of the three profile modes (Hygiene +
|
|
25
|
+
* Verification bundled, Hygiene only, Verification only): the threat categories
|
|
26
|
+
* R/F/D/C/B plus Invalid/Unknown/Valid (verification) and Clean (hygiene-only).
|
|
27
|
+
*/
|
|
28
|
+
export const EMAIL_VERDICTS = Object.freeze({
|
|
29
|
+
Reputation: {
|
|
30
|
+
flag: "R",
|
|
31
|
+
label: "Reputation Threat",
|
|
32
|
+
risk: "Extreme",
|
|
33
|
+
description: "Hazardous email found in a Reputation category filter",
|
|
34
|
+
usable: false,
|
|
35
|
+
},
|
|
36
|
+
Fraud: {
|
|
37
|
+
flag: "F",
|
|
38
|
+
label: "Fraud Threat",
|
|
39
|
+
risk: "Extreme to High",
|
|
40
|
+
description: "Hazardous email found in a Fraud category filter",
|
|
41
|
+
usable: false,
|
|
42
|
+
},
|
|
43
|
+
Delivery: {
|
|
44
|
+
flag: "D",
|
|
45
|
+
label: "Delivery Threat",
|
|
46
|
+
risk: "High",
|
|
47
|
+
description: "Hazardous email found in a Delivery category filter",
|
|
48
|
+
usable: false,
|
|
49
|
+
},
|
|
50
|
+
Conversion: {
|
|
51
|
+
flag: "C",
|
|
52
|
+
label: "Conversion Threat",
|
|
53
|
+
risk: "Moderate",
|
|
54
|
+
description: "Hazardous email found in a Conversion category filter",
|
|
55
|
+
usable: false,
|
|
56
|
+
},
|
|
57
|
+
Beta: {
|
|
58
|
+
flag: "B",
|
|
59
|
+
label: "Beta Threat",
|
|
60
|
+
risk: "Moderate to Low",
|
|
61
|
+
description: "Hazardous email found in a Beta category filter",
|
|
62
|
+
usable: false,
|
|
63
|
+
},
|
|
64
|
+
Invalid: {
|
|
65
|
+
flag: "I",
|
|
66
|
+
label: "Invalid",
|
|
67
|
+
risk: "Extreme",
|
|
68
|
+
description: "Invalid and will bounce",
|
|
69
|
+
usable: false,
|
|
70
|
+
},
|
|
71
|
+
Unknown: {
|
|
72
|
+
flag: "U",
|
|
73
|
+
label: "Unknown",
|
|
74
|
+
risk: "High to Moderate",
|
|
75
|
+
description: "Verification cannot be determined",
|
|
76
|
+
// usable intentionally omitted — indeterminate (spec edge case).
|
|
77
|
+
},
|
|
78
|
+
Valid: {
|
|
79
|
+
flag: "V",
|
|
80
|
+
label: "Valid",
|
|
81
|
+
risk: "Low",
|
|
82
|
+
description: "Passed the profile process",
|
|
83
|
+
usable: true,
|
|
84
|
+
},
|
|
85
|
+
Clean: {
|
|
86
|
+
flag: "G",
|
|
87
|
+
label: "Clean",
|
|
88
|
+
risk: "Low",
|
|
89
|
+
description: "Passed the profile process",
|
|
90
|
+
usable: true,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
/** Look up an email verdict token; `undefined` for unrecognised tokens. */
|
|
94
|
+
export function lookupEmailVerdict(token) {
|
|
95
|
+
return Object.prototype.hasOwnProperty.call(EMAIL_VERDICTS, token)
|
|
96
|
+
? EMAIL_VERDICTS[token]
|
|
97
|
+
: undefined;
|
|
98
|
+
}
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// Email activity (§2.2) — `activity_first_seen` / `activity_most_recent_seen`
|
|
101
|
+
// day buckets and `activity_trajectory`.
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
/** Day-bucket tokens shared by `activity_first_seen` / `activity_most_recent_seen`. */
|
|
104
|
+
export const ACTIVITY_WINDOWS = Object.freeze({
|
|
105
|
+
"30": "Within the last 30 days",
|
|
106
|
+
"90": "Within the last 90 days",
|
|
107
|
+
"180": "Within the last 180 days",
|
|
108
|
+
"365": "Within the last 365 days",
|
|
109
|
+
"365+": "Over 365 days ago",
|
|
110
|
+
});
|
|
111
|
+
/** `activity_trajectory` values (§2.2) → documented description. */
|
|
112
|
+
export const ACTIVITY_TRAJECTORY = Object.freeze({
|
|
113
|
+
"Major Deceleration": "The average activity volume of the email has significantly slowed",
|
|
114
|
+
"Moderate Deceleration": "The average activity volume of the email has moderately slowed",
|
|
115
|
+
"Slight Deceleration": "The average activity volume of the email has slightly slowed",
|
|
116
|
+
Unchanged: "The average activity volume of the email has remained constant",
|
|
117
|
+
"Slight Acceleration": "The average activity volume of the email has slightly hastened",
|
|
118
|
+
"Moderate Acceleration": "The average activity volume of the email has moderately hastened",
|
|
119
|
+
"Major Acceleration": "The average activity volume of the email has significantly hastened",
|
|
120
|
+
});
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
// Name (§2.3) — `task/lead` (future). `status` + `gender`.
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
/** Name assessment `status` (§2.3). */
|
|
125
|
+
export const NAME_STATUS = Object.freeze({
|
|
126
|
+
Valid: "Name that has been assessed as Valid",
|
|
127
|
+
Invalid: "Name that has been assessed as Invalid",
|
|
128
|
+
});
|
|
129
|
+
/** Modeled `gender` codes (§2.3). */
|
|
130
|
+
export const NAME_GENDER = Object.freeze({
|
|
131
|
+
M: { label: "Male", description: "Name modeled to an individual who is Male" },
|
|
132
|
+
LM: {
|
|
133
|
+
label: "Likely Male",
|
|
134
|
+
description: "Name modeled to an individual who is Likely Male",
|
|
135
|
+
},
|
|
136
|
+
F: { label: "Female", description: "Name modeled to an individual who is Female" },
|
|
137
|
+
LF: {
|
|
138
|
+
label: "Likely Female",
|
|
139
|
+
description: "Name modeled to an individual who is Likely Female",
|
|
140
|
+
},
|
|
141
|
+
U: {
|
|
142
|
+
label: "Undetermined",
|
|
143
|
+
description: "Name that cannot be modeled for a gender",
|
|
144
|
+
},
|
|
145
|
+
NF: {
|
|
146
|
+
label: "Not Found",
|
|
147
|
+
description: "Name that is not found in our model",
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
/** Documented `accuracy_score` reference points (§2.4) — orientation, not a lookup. */
|
|
151
|
+
export const POSTAL_ACCURACY_REFERENCE = Object.freeze([
|
|
152
|
+
{
|
|
153
|
+
score: "0.00%",
|
|
154
|
+
label: "Low accuracy",
|
|
155
|
+
description: "Postal that has received a modeled accuracy score of 0.00% (low accuracy)",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
score: "50.00%",
|
|
159
|
+
label: "Medium accuracy",
|
|
160
|
+
description: "Postal that has received a modeled accuracy score of 50.00% (medium accuracy)",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
score: "100.00%",
|
|
164
|
+
label: "High accuracy",
|
|
165
|
+
description: "Postal that has received a modeled accuracy score of 100.00% (high accuracy)",
|
|
166
|
+
},
|
|
167
|
+
]);
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
// Phone (§2.5) — `task/lead` (future). `status` + `service_type`.
|
|
170
|
+
// ---------------------------------------------------------------------------
|
|
171
|
+
/** Phone `status` (§2.5). */
|
|
172
|
+
export const PHONE_STATUS = Object.freeze({
|
|
173
|
+
Valid: "Phone number that has been assessed as syntactically Valid",
|
|
174
|
+
Invalid: "Phone number that has been assessed as syntactically Invalid",
|
|
175
|
+
});
|
|
176
|
+
/** Phone `service_type` (§2.5). */
|
|
177
|
+
export const PHONE_SERVICE_TYPE = Object.freeze({
|
|
178
|
+
Mobile: "The phone number was assigned by the telco as a Mobile number",
|
|
179
|
+
Landline: "The phone number was assigned by the telco as a Landline number",
|
|
180
|
+
});
|
|
181
|
+
/** Batch task `status` values (§5.2). */
|
|
182
|
+
export const TASK_STATUS = Object.freeze({
|
|
183
|
+
preparing: {
|
|
184
|
+
label: "Preparing",
|
|
185
|
+
description: "The task is being prepared (uploading, formatting, etc.)",
|
|
186
|
+
terminal: false,
|
|
187
|
+
},
|
|
188
|
+
prepared: {
|
|
189
|
+
label: "Prepared",
|
|
190
|
+
description: "The task is prepared and will be executed soon",
|
|
191
|
+
terminal: false,
|
|
192
|
+
},
|
|
193
|
+
running: {
|
|
194
|
+
label: "Running",
|
|
195
|
+
description: "The task is running through the profile filters",
|
|
196
|
+
terminal: false,
|
|
197
|
+
},
|
|
198
|
+
finished: {
|
|
199
|
+
label: "Finished",
|
|
200
|
+
description: "The task is finished and the results are being compiled",
|
|
201
|
+
terminal: false,
|
|
202
|
+
},
|
|
203
|
+
canceled: {
|
|
204
|
+
label: "Canceled",
|
|
205
|
+
description: "The task was canceled (no fields, no records, errors, etc.)",
|
|
206
|
+
terminal: true,
|
|
207
|
+
},
|
|
208
|
+
completed: {
|
|
209
|
+
label: "Completed",
|
|
210
|
+
description: "The task is completed and the results are available for download",
|
|
211
|
+
terminal: true,
|
|
212
|
+
},
|
|
213
|
+
unknown: {
|
|
214
|
+
label: "Unknown",
|
|
215
|
+
description: "The task is in a transitional status state",
|
|
216
|
+
terminal: false,
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
// Webhook event types (§6.1) — hook/* (future).
|
|
221
|
+
// ---------------------------------------------------------------------------
|
|
222
|
+
/** Webhook event types (§6.1) → documented description. */
|
|
223
|
+
export const WEBHOOK_EVENTS = Object.freeze({
|
|
224
|
+
"task.status.preparing": "Fires a request to the callback URL when a task is in the preparation stage",
|
|
225
|
+
"task.status.prepared": "Fires a request to the callback URL when a task is done preparing for execution",
|
|
226
|
+
"task.status.running": "Fires a request to the callback URL when a task is processing",
|
|
227
|
+
"task.status.finished": "Fires a request to the callback URL when a task is done processing and the results are being prepared",
|
|
228
|
+
"task.status.canceled": "Fires a request to the callback URL when a task has been canceled",
|
|
229
|
+
});
|
|
230
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/api/enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAgCH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,MAAM,CAAC,MAAM,CAAC;IACZ,UAAU,EAAE;QACV,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,mBAAmB;QAC1B,IA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EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,iDAAiD;QAC9D,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,kEAAkE;QAC/E,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC,CAAC;AAEH,8EAA8E;AAC9E,gDAAgD;AAChD,8EAA8E;AAE9E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAqC,MAAM,CAAC,MAAM,CAAC;IAC5E,uBAAuB,EACrB,6EAA6E;IAC/E,sBAAsB,EACpB,iFAAiF;IACnF,qBAAqB,EACnB,+DAA+D;IACjE,sBAAsB,EACpB,uGAAuG;IACzG,sBAAsB,EACpB,mEAAmE;CACtE,CAAC,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upstream Webbula request/response types, mirroring `.context/openapi.yaml`
|
|
3
|
+
* (the source of truth, constitution principle I). These describe the wire shape
|
|
4
|
+
* of the v5 express endpoint and `account/info`; the wrapper reshapes them into
|
|
5
|
+
* agent-facing results elsewhere (see `src/trust.ts` and the tool handlers).
|
|
6
|
+
*/
|
|
7
|
+
/** One per-email hygiene result (`EmailResult` in the OpenAPI contract). */
|
|
8
|
+
export interface EmailResult {
|
|
9
|
+
email: string;
|
|
10
|
+
/** Present only when the upstream corrected a typo. */
|
|
11
|
+
corrected?: string;
|
|
12
|
+
activity_first_seen?: string;
|
|
13
|
+
activity_most_recent_seen?: string;
|
|
14
|
+
activity_trajectory?: string;
|
|
15
|
+
/** Verdict token, passed through verbatim (e.g. "Clean"). */
|
|
16
|
+
result: string;
|
|
17
|
+
}
|
|
18
|
+
/** Shared express result envelope (`ExpressResult`). */
|
|
19
|
+
export interface ExpressResult {
|
|
20
|
+
success: number;
|
|
21
|
+
transaction?: string;
|
|
22
|
+
package_name?: string;
|
|
23
|
+
profile?: string;
|
|
24
|
+
emails?: EmailResult[];
|
|
25
|
+
/** Present on error envelopes (`success: 0`). */
|
|
26
|
+
errors?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* v5 express response — `credits_remaining` is numeric (research D2). The field
|
|
30
|
+
* is omitted upstream when the account is unlimited.
|
|
31
|
+
*/
|
|
32
|
+
export interface ExpressEmailResponseV5 extends ExpressResult {
|
|
33
|
+
credits_remaining?: number;
|
|
34
|
+
duration?: number;
|
|
35
|
+
error?: unknown;
|
|
36
|
+
}
|
|
37
|
+
/** Parsed name assessment (`NameValidationResult`), all parts verbatim. */
|
|
38
|
+
export interface NameValidationResult {
|
|
39
|
+
prefix?: string;
|
|
40
|
+
first?: string;
|
|
41
|
+
middle?: string;
|
|
42
|
+
last?: string;
|
|
43
|
+
suffix?: string;
|
|
44
|
+
/** Modeled gender code (`M`/`LM`/`F`/`LF`/`U`/`NF`), verbatim. */
|
|
45
|
+
gender?: string;
|
|
46
|
+
/** `Valid` / `Invalid`, verbatim. */
|
|
47
|
+
status?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Parsed address assessment (`AddressValidationResult`). */
|
|
50
|
+
export interface AddressValidationResult {
|
|
51
|
+
zip5?: string;
|
|
52
|
+
state?: string;
|
|
53
|
+
city?: string;
|
|
54
|
+
address?: string;
|
|
55
|
+
address2?: string;
|
|
56
|
+
/** Continuous percent string (e.g. `"98.5%"`), passed through verbatim (FR-006). */
|
|
57
|
+
accuracy_score?: string;
|
|
58
|
+
lon?: number;
|
|
59
|
+
lat?: number;
|
|
60
|
+
}
|
|
61
|
+
/** Parsed phone assessment (`PhoneValidationResult`). */
|
|
62
|
+
export interface PhoneValidationResult {
|
|
63
|
+
number?: string;
|
|
64
|
+
area_code?: string;
|
|
65
|
+
prefix?: string;
|
|
66
|
+
suffix?: string;
|
|
67
|
+
/** `Mobile` / `Landline`, verbatim. */
|
|
68
|
+
service_type?: string;
|
|
69
|
+
/** `Valid` / `Invalid`, verbatim. */
|
|
70
|
+
status?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One per-scenario credit entry on the compound response (`CreditEntry`). Note
|
|
74
|
+
* `records` is a formatted string here (e.g. `"12,345"`), unlike the numeric
|
|
75
|
+
* `CreditsRemaining.records` on `account/info` — passed through verbatim.
|
|
76
|
+
*/
|
|
77
|
+
export interface CreditEntry {
|
|
78
|
+
scenario?: string;
|
|
79
|
+
records?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* `task/lead` compound response (`ExpressCompoundResponse`) — the email
|
|
83
|
+
* `ExpressResult` plus the optional name/phone/address assessments and the
|
|
84
|
+
* per-scenario `credits_remaining` array.
|
|
85
|
+
*/
|
|
86
|
+
export interface ExpressCompoundResponse extends ExpressResult {
|
|
87
|
+
name?: NameValidationResult;
|
|
88
|
+
phone?: PhoneValidationResult;
|
|
89
|
+
address?: AddressValidationResult;
|
|
90
|
+
credits_remaining?: CreditEntry[];
|
|
91
|
+
duration?: number;
|
|
92
|
+
error?: unknown;
|
|
93
|
+
}
|
|
94
|
+
/** `task/run` batch submission response (`BatchRunResponse`). */
|
|
95
|
+
export interface BatchRunResponse {
|
|
96
|
+
success: number;
|
|
97
|
+
transaction?: string;
|
|
98
|
+
/** The task handle used to poll status and download results. */
|
|
99
|
+
package_name?: string;
|
|
100
|
+
errors?: string[];
|
|
101
|
+
duration?: number;
|
|
102
|
+
}
|
|
103
|
+
/** `task/info` batch status response (`BatchTaskResponse`). */
|
|
104
|
+
export interface BatchTaskResponse {
|
|
105
|
+
success: number;
|
|
106
|
+
transaction?: string;
|
|
107
|
+
package_name?: string;
|
|
108
|
+
/** Status token, verbatim (e.g. `running`, `completed`). */
|
|
109
|
+
status?: string;
|
|
110
|
+
/** Result files available for download (present once finished). */
|
|
111
|
+
files?: string[];
|
|
112
|
+
errors?: string[];
|
|
113
|
+
duration?: number;
|
|
114
|
+
}
|
|
115
|
+
/** One remaining-credit scenario (`CreditsRemaining`). */
|
|
116
|
+
export interface CreditsRemaining {
|
|
117
|
+
service?: string;
|
|
118
|
+
scenario?: string;
|
|
119
|
+
user?: string;
|
|
120
|
+
records?: number;
|
|
121
|
+
/** `false` ⇒ the scenario is unlimited (FR-003). */
|
|
122
|
+
limited?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Persona data-append response (`POST /v1/append`, feature 006). The endpoint
|
|
126
|
+
* wraps the appended fields under `data` with a `status` of `"success"`; on
|
|
127
|
+
* failure it returns a non-2xx with a message. `data` keys vary by the requested
|
|
128
|
+
* filter (e.g. `email`, `phone`/`phone_type`, postal parts, automotive parts) —
|
|
129
|
+
* the wrapper passes them through verbatim (constitution principle I).
|
|
130
|
+
*/
|
|
131
|
+
export interface PersonaAppendResponse {
|
|
132
|
+
/** `"success"` on a match; other values / non-2xx indicate failure. */
|
|
133
|
+
status?: string;
|
|
134
|
+
/** Appended data points, keyed by field name — passed through verbatim. */
|
|
135
|
+
data?: Record<string, unknown>;
|
|
136
|
+
/** Present on some legacy-style error envelopes. */
|
|
137
|
+
success?: number;
|
|
138
|
+
errors?: string[] | string;
|
|
139
|
+
message?: string;
|
|
140
|
+
}
|
|
141
|
+
/** `account/info` response. With `mode=short` the `key` field is omitted. */
|
|
142
|
+
export interface AccountInfoResponse {
|
|
143
|
+
success: number;
|
|
144
|
+
transaction?: string;
|
|
145
|
+
login?: string;
|
|
146
|
+
credits_remaining?: CreditsRemaining[];
|
|
147
|
+
/** API token — omitted when `mode=short`; never surfaced by the wrapper. */
|
|
148
|
+
key?: string;
|
|
149
|
+
errors?: string[] | {
|
|
150
|
+
message?: string;
|
|
151
|
+
};
|
|
152
|
+
duration?: number;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Legacy error envelope (`LegacyErrorResponse`): `success: 0` with verbatim
|
|
156
|
+
* human-readable messages, sometimes returned even on HTTP 200.
|
|
157
|
+
*/
|
|
158
|
+
export interface LegacyErrorResponse {
|
|
159
|
+
success: number;
|
|
160
|
+
transaction?: string;
|
|
161
|
+
errors?: string[];
|
|
162
|
+
duration?: number;
|
|
163
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upstream Webbula request/response types, mirroring `.context/openapi.yaml`
|
|
3
|
+
* (the source of truth, constitution principle I). These describe the wire shape
|
|
4
|
+
* of the v5 express endpoint and `account/info`; the wrapper reshapes them into
|
|
5
|
+
* agent-facing results elsewhere (see `src/trust.ts` and the tool handlers).
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|