@bernierllc/nevarmail 0.23.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 CHANGED
@@ -165,6 +165,7 @@ the two, not both). The slug must exist in exactly one project the key can open:
165
165
  | `getCampaignAnalytics(id, { projectId? })` — counts plus delivery/open/click/bounce/unsubscribe rates (0 to 1) | `GET /api/v1/campaigns/{id}/analytics` | `analytics:read` |
166
166
  | `listLists` / `createList` / `getList` | `/api/v1/lists` | `contacts:read` / `contacts:write` |
167
167
  | `addListContacts` | `POST /api/v1/lists/{id}/contacts` | `contacts:write` |
168
+ | `removeListContact` | `DELETE /api/v1/lists/{id}/contacts?email=` (one list only; the contact is kept) | `contacts:write` |
168
169
  | `listContacts` / `upsertContacts` / `updateContact` / `deleteContact` | `/api/v1/contacts` | `contacts:read` / `contacts:write` |
169
170
  | `listBusinesses({ projectId?, page?, perPage? })` / `getBusiness(id, { projectId? })` | `GET /api/v1/businesses`, `GET /api/v1/businesses/{id}` | `contacts:read` |
170
171
  | `createBusiness(input)` / `updateBusiness(id, input)` / `deleteBusiness(id, { projectId? })` — update replaces `domains`, merges `attributes`; delete keeps the contacts | `POST /api/v1/businesses`, `PATCH` / `DELETE /api/v1/businesses/{id}` | `contacts:write` |
@@ -179,6 +180,8 @@ the two, not both). The slug must exist in exactly one project the key can open:
179
180
  | `importSenders({ projectId? })` — adopts the project's provider-account identities; re-run to pick up provider verification | `POST /api/v1/senders/import` | `senders:write` |
180
181
  | `listDomains` / `createDomain(domain, { projectId })` / `getDomain` / `deleteDomain` | `/api/v1/domains` | `domains:read` / `domains:write` |
181
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` |
182
185
  | `listSuppressions` / `addSuppressions` | `/api/v1/suppressions` | `org:read` / `org:write` |
183
186
  | `getProjectAddress(projectId)` / `setProjectAddress(projectId, { physicalAddress, addressComponents? })` | `GET` / `PUT /api/v1/projects/{id}/address` | `org:read` / `org:write` |
184
187
  | `getInboxDbStatus` | `GET /api/v1/inbox-db/status` | `org:read` |
package/dist/index.d.ts CHANGED
@@ -341,6 +341,15 @@ export interface AddListContactsResult {
341
341
  alreadySubscribed: number;
342
342
  status: "added" | "already_subscribed" | "processing";
343
343
  }
344
+ export interface RemoveListContactResult {
345
+ listId: string;
346
+ email: string;
347
+ tier: "local" | "provider";
348
+ /** Null on a local-tier list. */
349
+ provider: string | null;
350
+ /** "processing" on a provider-tier list: the provider removes asynchronously. */
351
+ status: "removed" | "processing";
352
+ }
344
353
  export interface AggregatedContact {
345
354
  email: string;
346
355
  firstName?: string;
@@ -535,6 +544,37 @@ export interface DomainDnsRecords {
535
544
  explanations: Record<string, string>;
536
545
  }[];
537
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
+ }
538
578
  export type SuppressionSource = "provider" | "user" | "system" | "import";
539
579
  export interface Suppression {
540
580
  id: string;
@@ -829,6 +869,13 @@ export declare class NevarMail {
829
869
  * 404 LIST_NOT_FOUND; 422 LIST_NOT_SYNCED when the provider copy is behind.
830
870
  */
831
871
  addListContacts(listId: string, contacts: NewContact | NewContact[]): Promise<AddListContactsResult>;
872
+ /**
873
+ * DELETE /api/v1/lists/{id}/contacts?email= — take one address off one list.
874
+ * The contact stays on its other lists and on the provider account; erasing
875
+ * it everywhere is `deleteContact`. 404 NOT_SUBSCRIBED when the address is
876
+ * not on the list; 404 NOT_FOUND for an unknown list.
877
+ */
878
+ removeListContact(listId: string, email: string): Promise<RemoveListContactResult>;
832
879
  /** GET /api/v1/contacts — paged; `q` is a substring search. */
833
880
  listContacts(options?: PageOptions & {
834
881
  q?: string;
@@ -1022,6 +1069,16 @@ export declare class NevarMail {
1022
1069
  * domain with its updated verification state (a 200, not a 202).
1023
1070
  */
1024
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>;
1025
1082
  /** GET /api/v1/suppressions — paged, newest first. */
1026
1083
  listSuppressions(options?: ListSuppressionsOptions): Promise<Paginated<Suppression>>;
1027
1084
  /** POST /api/v1/suppressions — bulk add; see AddSuppressionsInput for the scope rules. */
package/dist/index.js CHANGED
@@ -389,6 +389,15 @@ export class NevarMail {
389
389
  addListContacts(listId, contacts) {
390
390
  return this.request("POST", `/api/v1/lists/${encodeURIComponent(listId)}/contacts`, { body: contacts });
391
391
  }
392
+ /**
393
+ * DELETE /api/v1/lists/{id}/contacts?email= — take one address off one list.
394
+ * The contact stays on its other lists and on the provider account; erasing
395
+ * it everywhere is `deleteContact`. 404 NOT_SUBSCRIBED when the address is
396
+ * not on the list; 404 NOT_FOUND for an unknown list.
397
+ */
398
+ removeListContact(listId, email) {
399
+ return this.request("DELETE", `/api/v1/lists/${encodeURIComponent(listId)}/contacts`, { query: { email } });
400
+ }
392
401
  /** GET /api/v1/contacts — paged; `q` is a substring search. */
393
402
  listContacts(options = {}) {
394
403
  return this.requestPaginated("GET", "/api/v1/contacts", {
@@ -585,6 +594,27 @@ export class NevarMail {
585
594
  verifyDomain(id) {
586
595
  return this.request("POST", `/api/v1/domains/${encodeURIComponent(id)}/verify`);
587
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
+ }
588
618
  // ── Suppressions ───────────────────────────────────────────────────────
589
619
  /** GET /api/v1/suppressions — paged, newest first. */
590
620
  async listSuppressions(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bernierllc/nevarmail",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Official client for the NevarMail v1 API. Typed, retries 429/5xx, throws NevarMailError on every non-2xx.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",