@bernierllc/nevarmail 0.24.0 → 0.26.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 +2 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -180,6 +180,8 @@ the two, not both). The slug must exist in exactly one project the key can open:
|
|
|
180
180
|
| `importSenders({ projectId? })` — adopts the project's provider-account identities; re-run to pick up provider verification | `POST /api/v1/senders/import` | `senders:write` |
|
|
181
181
|
| `listDomains` / `createDomain(domain, { projectId })` / `getDomain` / `deleteDomain` | `/api/v1/domains` | `domains:read` / `domains:write` |
|
|
182
182
|
| `getDomainDnsRecords` / `verifyDomain` | `/api/v1/domains/{id}/…` | `domains:read` / `domains:write` |
|
|
183
|
+
| `getDomainBrandedTracking` / `enableDomainBrandedTracking` | `GET` / `POST /api/v1/domains/{id}/branded-tracking` | `domains:read` / `domains:write` |
|
|
184
|
+
| `listInboxes` / `getInbox` / `updateInbox(id, { displayName?, forwardTo?, storeMessages?, openTracking?, status? })` — `openTracking: true` needs an active HTTPS branded host | `/api/v1/inboxes`, `/api/v1/inboxes/{id}` | `inboxes:read` / `inboxes:write` |
|
|
183
185
|
| `listSuppressions` / `addSuppressions` | `/api/v1/suppressions` | `org:read` / `org:write` |
|
|
184
186
|
| `getProjectAddress(projectId)` / `setProjectAddress(projectId, { physicalAddress, addressComponents? })` | `GET` / `PUT /api/v1/projects/{id}/address` | `org:read` / `org:write` |
|
|
185
187
|
| `getInboxDbStatus` | `GET /api/v1/inbox-db/status` | `org:read` |
|
package/dist/index.d.ts
CHANGED
|
@@ -531,6 +531,24 @@ export interface Domain {
|
|
|
531
531
|
}[];
|
|
532
532
|
mxStatus?: string;
|
|
533
533
|
mxRecords?: DnsRecord[];
|
|
534
|
+
/**
|
|
535
|
+
* DMARC on the domain, refreshed on every verification check. Providers never
|
|
536
|
+
* verify DMARC, so a domain can be verified with none. `published`: the
|
|
537
|
+
* domain's own record (keep it; never add a second). `conflict`: more than
|
|
538
|
+
* one DMARC record at `host`, so receivers ignore all of them; remove all but
|
|
539
|
+
* one (`value` is the first). `inherited`: covered by
|
|
540
|
+
* its organizational domain's record. `missing`: add `value` at `host`.
|
|
541
|
+
* `unchecked`: not looked up yet; `value` is the recommended record.
|
|
542
|
+
*/
|
|
543
|
+
dmarc: DomainDmarc;
|
|
544
|
+
}
|
|
545
|
+
export interface DomainDmarc {
|
|
546
|
+
status: "published" | "conflict" | "inherited" | "missing" | "unchecked";
|
|
547
|
+
/** Where the record lives, or should be added (`_dmarc.<domain>`). */
|
|
548
|
+
host: string;
|
|
549
|
+
/** The record found, or the recommended `v=DMARC1; p=none;`. */
|
|
550
|
+
value: string;
|
|
551
|
+
checkedAt: string | null;
|
|
534
552
|
}
|
|
535
553
|
export interface DomainDnsRecords {
|
|
536
554
|
domainId: string;
|
|
@@ -544,6 +562,37 @@ export interface DomainDnsRecords {
|
|
|
544
562
|
explanations: Record<string, string>;
|
|
545
563
|
}[];
|
|
546
564
|
}
|
|
565
|
+
export interface BrandedTracking {
|
|
566
|
+
domainId: string;
|
|
567
|
+
host: string;
|
|
568
|
+
status: "pending" | "active" | "failed";
|
|
569
|
+
httpsStatus: "pending" | "active";
|
|
570
|
+
dnsRecords: DnsRecord[];
|
|
571
|
+
dnsRecordStatuses: Record<string, unknown>[];
|
|
572
|
+
lastCheckedAt: string | null;
|
|
573
|
+
verifiedAt: string | null;
|
|
574
|
+
}
|
|
575
|
+
export interface Inbox {
|
|
576
|
+
id: string;
|
|
577
|
+
domainId: string;
|
|
578
|
+
projectId: string;
|
|
579
|
+
address: string;
|
|
580
|
+
displayName: string | null;
|
|
581
|
+
forwardTo: string | null;
|
|
582
|
+
storeMessages: boolean;
|
|
583
|
+
openTracking: boolean;
|
|
584
|
+
openTrackingAvailable: boolean;
|
|
585
|
+
status: string;
|
|
586
|
+
createdAt: string;
|
|
587
|
+
}
|
|
588
|
+
export interface UpdateInboxInput {
|
|
589
|
+
displayName?: string | null;
|
|
590
|
+
forwardTo?: string | null;
|
|
591
|
+
storeMessages?: boolean;
|
|
592
|
+
/** true needs the domain's branded tracking host active over HTTPS (400 otherwise). */
|
|
593
|
+
openTracking?: boolean;
|
|
594
|
+
status?: "active" | "disabled";
|
|
595
|
+
}
|
|
547
596
|
export type SuppressionSource = "provider" | "user" | "system" | "import";
|
|
548
597
|
export interface Suppression {
|
|
549
598
|
id: string;
|
|
@@ -1038,6 +1087,16 @@ export declare class NevarMail {
|
|
|
1038
1087
|
* domain with its updated verification state (a 200, not a 202).
|
|
1039
1088
|
*/
|
|
1040
1089
|
verifyDomain(id: string): Promise<Domain>;
|
|
1090
|
+
/** GET /api/v1/domains/{id}/branded-tracking — 404 BRANDED_TRACKING_NOT_ENABLED when none. */
|
|
1091
|
+
getDomainBrandedTracking(id: string): Promise<BrandedTracking>;
|
|
1092
|
+
/** POST /api/v1/domains/{id}/branded-tracking — enables it and returns the DNS records to publish. */
|
|
1093
|
+
enableDomainBrandedTracking(id: string): Promise<BrandedTracking>;
|
|
1094
|
+
/** GET /api/v1/inboxes — not paginated. */
|
|
1095
|
+
listInboxes(): Promise<Inbox[]>;
|
|
1096
|
+
/** GET /api/v1/inboxes/{id}. */
|
|
1097
|
+
getInbox(id: string): Promise<Inbox>;
|
|
1098
|
+
/** PATCH /api/v1/inboxes/{id} — 400 for `openTracking: true` without an active HTTPS branded host. */
|
|
1099
|
+
updateInbox(id: string, input: UpdateInboxInput): Promise<Inbox>;
|
|
1041
1100
|
/** GET /api/v1/suppressions — paged, newest first. */
|
|
1042
1101
|
listSuppressions(options?: ListSuppressionsOptions): Promise<Paginated<Suppression>>;
|
|
1043
1102
|
/** POST /api/v1/suppressions — bulk add; see AddSuppressionsInput for the scope rules. */
|
package/dist/index.js
CHANGED
|
@@ -594,6 +594,27 @@ export class NevarMail {
|
|
|
594
594
|
verifyDomain(id) {
|
|
595
595
|
return this.request("POST", `/api/v1/domains/${encodeURIComponent(id)}/verify`);
|
|
596
596
|
}
|
|
597
|
+
/** GET /api/v1/domains/{id}/branded-tracking — 404 BRANDED_TRACKING_NOT_ENABLED when none. */
|
|
598
|
+
getDomainBrandedTracking(id) {
|
|
599
|
+
return this.request("GET", `/api/v1/domains/${encodeURIComponent(id)}/branded-tracking`);
|
|
600
|
+
}
|
|
601
|
+
/** POST /api/v1/domains/{id}/branded-tracking — enables it and returns the DNS records to publish. */
|
|
602
|
+
enableDomainBrandedTracking(id) {
|
|
603
|
+
return this.request("POST", `/api/v1/domains/${encodeURIComponent(id)}/branded-tracking`);
|
|
604
|
+
}
|
|
605
|
+
// ── Inboxes ────────────────────────────────────────────────────────────
|
|
606
|
+
/** GET /api/v1/inboxes — not paginated. */
|
|
607
|
+
listInboxes() {
|
|
608
|
+
return this.request("GET", "/api/v1/inboxes");
|
|
609
|
+
}
|
|
610
|
+
/** GET /api/v1/inboxes/{id}. */
|
|
611
|
+
getInbox(id) {
|
|
612
|
+
return this.request("GET", `/api/v1/inboxes/${encodeURIComponent(id)}`);
|
|
613
|
+
}
|
|
614
|
+
/** PATCH /api/v1/inboxes/{id} — 400 for `openTracking: true` without an active HTTPS branded host. */
|
|
615
|
+
updateInbox(id, input) {
|
|
616
|
+
return this.request("PATCH", `/api/v1/inboxes/${encodeURIComponent(id)}`, { body: input });
|
|
617
|
+
}
|
|
597
618
|
// ── Suppressions ───────────────────────────────────────────────────────
|
|
598
619
|
/** GET /api/v1/suppressions — paged, newest first. */
|
|
599
620
|
async listSuppressions(options = {}) {
|
package/package.json
CHANGED