@bernierllc/nevarmail 0.24.0 → 0.25.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 +41 -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
|
@@ -544,6 +544,37 @@ export interface DomainDnsRecords {
|
|
|
544
544
|
explanations: Record<string, string>;
|
|
545
545
|
}[];
|
|
546
546
|
}
|
|
547
|
+
export interface BrandedTracking {
|
|
548
|
+
domainId: string;
|
|
549
|
+
host: string;
|
|
550
|
+
status: "pending" | "active" | "failed";
|
|
551
|
+
httpsStatus: "pending" | "active";
|
|
552
|
+
dnsRecords: DnsRecord[];
|
|
553
|
+
dnsRecordStatuses: Record<string, unknown>[];
|
|
554
|
+
lastCheckedAt: string | null;
|
|
555
|
+
verifiedAt: string | null;
|
|
556
|
+
}
|
|
557
|
+
export interface Inbox {
|
|
558
|
+
id: string;
|
|
559
|
+
domainId: string;
|
|
560
|
+
projectId: string;
|
|
561
|
+
address: string;
|
|
562
|
+
displayName: string | null;
|
|
563
|
+
forwardTo: string | null;
|
|
564
|
+
storeMessages: boolean;
|
|
565
|
+
openTracking: boolean;
|
|
566
|
+
openTrackingAvailable: boolean;
|
|
567
|
+
status: string;
|
|
568
|
+
createdAt: string;
|
|
569
|
+
}
|
|
570
|
+
export interface UpdateInboxInput {
|
|
571
|
+
displayName?: string | null;
|
|
572
|
+
forwardTo?: string | null;
|
|
573
|
+
storeMessages?: boolean;
|
|
574
|
+
/** true needs the domain's branded tracking host active over HTTPS (400 otherwise). */
|
|
575
|
+
openTracking?: boolean;
|
|
576
|
+
status?: "active" | "disabled";
|
|
577
|
+
}
|
|
547
578
|
export type SuppressionSource = "provider" | "user" | "system" | "import";
|
|
548
579
|
export interface Suppression {
|
|
549
580
|
id: string;
|
|
@@ -1038,6 +1069,16 @@ export declare class NevarMail {
|
|
|
1038
1069
|
* domain with its updated verification state (a 200, not a 202).
|
|
1039
1070
|
*/
|
|
1040
1071
|
verifyDomain(id: string): Promise<Domain>;
|
|
1072
|
+
/** GET /api/v1/domains/{id}/branded-tracking — 404 BRANDED_TRACKING_NOT_ENABLED when none. */
|
|
1073
|
+
getDomainBrandedTracking(id: string): Promise<BrandedTracking>;
|
|
1074
|
+
/** POST /api/v1/domains/{id}/branded-tracking — enables it and returns the DNS records to publish. */
|
|
1075
|
+
enableDomainBrandedTracking(id: string): Promise<BrandedTracking>;
|
|
1076
|
+
/** GET /api/v1/inboxes — not paginated. */
|
|
1077
|
+
listInboxes(): Promise<Inbox[]>;
|
|
1078
|
+
/** GET /api/v1/inboxes/{id}. */
|
|
1079
|
+
getInbox(id: string): Promise<Inbox>;
|
|
1080
|
+
/** PATCH /api/v1/inboxes/{id} — 400 for `openTracking: true` without an active HTTPS branded host. */
|
|
1081
|
+
updateInbox(id: string, input: UpdateInboxInput): Promise<Inbox>;
|
|
1041
1082
|
/** GET /api/v1/suppressions — paged, newest first. */
|
|
1042
1083
|
listSuppressions(options?: ListSuppressionsOptions): Promise<Paginated<Suppression>>;
|
|
1043
1084
|
/** 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