groundmail 0.32.1 → 0.34.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
@@ -79,6 +79,21 @@ time. Also: `tx.testInbox.list({ to, since })`, `tx.testInbox.get(id)` and `tx.t
79
79
  (domain and monthly usage). Emails sent with a `gm_test_` key land here too. Details:
80
80
  https://docs.groundmail.dev/email-testing
81
81
 
82
+ ## Senders
83
+
84
+ Save a sender once (name, an address on a verified domain, where replies go) and send as it by
85
+ handle instead of writing `from` each time. A `from` you pass still wins; with no `from` or
86
+ `sender`, the template's sender, then your default sender, is used.
87
+
88
+ ```ts
89
+ await tx.senders.create({ name: 'Acme Billing', address: 'billing@mail.acme.com', reply_to: 'billing@acme.com', handle: 'billing' })
90
+
91
+ await tx.emails.send({ sender: 'billing', to: 'user@example.com', template: { id: 'receipt' } })
92
+ ```
93
+
94
+ Also `tx.senders.list()`, `get`, `update` and `remove`, and `sender_id` on templates. Details:
95
+ https://docs.groundmail.dev/senders
96
+
82
97
  ## Tenants
83
98
 
84
99
  If you send email for your own customers, create one tenant per customer. Each tenant has its
package/dist/authjs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail } from './client-C6Cu0xLT.js';
1
+ import { G as Groundmail } from './client-PVTp1lAM.js';
2
2
 
3
3
  /** Subset of Auth.js theme used for the default magic-link email. */
4
4
  type AuthjsTheme = {
package/dist/authjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-KOSFM5QK.js";
4
+ } from "./chunk-PSLA3IGN.js";
5
5
 
6
6
  // src/authjs.ts
7
7
  function escapeHtml(value) {
@@ -1,4 +1,4 @@
1
- import { S as SendEmailResult, G as Groundmail } from './client-C6Cu0xLT.js';
1
+ import { S as SendEmailResult, G as Groundmail } from './client-PVTp1lAM.js';
2
2
 
3
3
  type BetterAuthEmailUser = {
4
4
  email: string;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-KOSFM5QK.js";
4
+ } from "./chunk-PSLA3IGN.js";
5
5
 
6
6
  // src/better-auth.ts
7
7
  function linkHtml(label, url) {
@@ -1638,10 +1638,10 @@ var EmailsResource = class {
1638
1638
  if (hasTemplate && (hasHtml || hasText)) {
1639
1639
  throw new Error("`template` cannot be combined with `html` or `text`");
1640
1640
  }
1641
- const payload = {
1642
- from: params.from,
1643
- to: params.to
1644
- };
1641
+ const payload = {};
1642
+ if (params.from !== void 0) payload.from = params.from;
1643
+ if (params.sender !== void 0) payload.sender = params.sender;
1644
+ payload.to = params.to;
1645
1645
  if (params.subject !== void 0) payload.subject = params.subject;
1646
1646
  if (hasReact) {
1647
1647
  payload.html = await renderReactEmail(params.react);
@@ -1817,6 +1817,38 @@ var ReceivedEmailsResource = class {
1817
1817
  }
1818
1818
  };
1819
1819
 
1820
+ // src/senders.ts
1821
+ var SendersResource = class {
1822
+ constructor(client) {
1823
+ this.client = client;
1824
+ }
1825
+ /** Every sender, the default first, with how many automations and templates use each. */
1826
+ async list() {
1827
+ return this.client.request("/senders", { method: "GET" });
1828
+ }
1829
+ async get(idOrHandle) {
1830
+ return this.client.request(`/senders/${encodeURIComponent(idOrHandle)}`, { method: "GET" });
1831
+ }
1832
+ /** The address must be on a verified domain. The handle is made from the name when left out. */
1833
+ async create(params) {
1834
+ return this.client.request("/senders", {
1835
+ method: "POST",
1836
+ body: JSON.stringify(params)
1837
+ });
1838
+ }
1839
+ /** Renaming the handle updates automation emails that use it; code using the old handle needs the new one. */
1840
+ async update(idOrHandle, params) {
1841
+ return this.client.request(`/senders/${encodeURIComponent(idOrHandle)}`, {
1842
+ method: "PATCH",
1843
+ body: JSON.stringify(params)
1844
+ });
1845
+ }
1846
+ /** Fails with a 409 `conflict` while an automation or template uses the sender. */
1847
+ async remove(idOrHandle) {
1848
+ return this.client.request(`/senders/${encodeURIComponent(idOrHandle)}`, { method: "DELETE" });
1849
+ }
1850
+ };
1851
+
1820
1852
  // src/suppressions.ts
1821
1853
  var SuppressionsResource = class {
1822
1854
  constructor(client) {
@@ -2108,6 +2140,7 @@ var _Groundmail = class _Groundmail {
2108
2140
  this.smtpCredentials = new SmtpCredentialsResource(this);
2109
2141
  this.suppressions = new SuppressionsResource(this);
2110
2142
  this.templates = new TemplatesResource(this);
2143
+ this.senders = new SendersResource(this);
2111
2144
  this.tenants = new TenantsResource(this);
2112
2145
  this.migrations = new MigrationsResource(this);
2113
2146
  this.dmarc = new DmarcResource(this);
package/dist/clerk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail, S as SendEmailResult } from './client-C6Cu0xLT.js';
1
+ import { G as Groundmail, S as SendEmailResult } from './client-PVTp1lAM.js';
2
2
 
3
3
  /**
4
4
  * Subset of Clerk `email.created` webhook `data` used for delivery.
package/dist/clerk.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-KOSFM5QK.js";
4
+ } from "./chunk-PSLA3IGN.js";
5
5
 
6
6
  // src/clerk.ts
7
7
  function resolveApiKey(options) {
@@ -8,10 +8,19 @@ type ApiErrorCode = 'validation_error' | 'unauthorized' | 'forbidden' | 'not_fou
8
8
  /** 408: a long-poll ended before anything matched (`testInbox.waitFor`). Safe to call again. */
9
9
  | 'timeout' | 'upstream_error' | 'not_configured' | 'internal_error';
10
10
  type SendEmailParams = {
11
- from: string | {
11
+ /**
12
+ * Who it is from. Optional when you pass `sender`, the template has a sender, or
13
+ * the team has a default sender. When set, it wins over all of them.
14
+ */
15
+ from?: string | {
12
16
  email: string;
13
17
  name?: string;
14
18
  };
19
+ /**
20
+ * A saved sender's handle or id (`groundmail.senders.list()`), e.g. `'billing'`.
21
+ * Sets `from`, and `reply_to` when the send has none. Ignored when `from` is set.
22
+ */
23
+ sender?: string;
15
24
  to: string | string[];
16
25
  /** Required unless `template` supplies the subject. */
17
26
  subject?: string;
@@ -601,10 +610,25 @@ type AutomationTrigger = {
601
610
  /** Do not enrol the same recipient again within this many days. */
602
611
  cooldown_days?: number;
603
612
  };
613
+ /** The question an If / otherwise step asks: did they send an event since the run started, or a value on the event. */
614
+ type AutomationBranchQuestion = {
615
+ event: string;
616
+ } | {
617
+ path: string;
618
+ operator: 'equals' | 'not_equals' | 'exists' | 'not_exists' | 'includes';
619
+ value?: string | number | boolean | null;
620
+ };
621
+ /** If / otherwise: the last step at the top level, with a path for each answer. Paths cannot hold another branch. */
622
+ type AutomationBranchStep = {
623
+ type: 'branch';
624
+ if: AutomationBranchQuestion;
625
+ then: AutomationStep[];
626
+ else: AutomationStep[];
627
+ };
604
628
  type AutomationStep = {
605
629
  type: 'delay' | 'send_email' | 'send_sms' | 'condition' | 'wait_for_event';
606
630
  [key: string]: unknown;
607
- };
631
+ } | AutomationBranchStep;
608
632
  type TwilioIntegrationStatus = {
609
633
  connected: boolean;
610
634
  hint: string | null;
@@ -659,6 +683,8 @@ type AutomationRunStepStatus = 'started' | 'waiting' | 'completed' | 'failed';
659
683
  type AutomationRunStep = {
660
684
  id: string;
661
685
  step_index: number;
686
+ /** Where the step sits: `"3"`, or `"3.then.0"` inside an If / otherwise path. */
687
+ step_path: string | null;
662
688
  step_type: AutomationStep['type'] | string;
663
689
  status: AutomationRunStepStatus | string;
664
690
  output: unknown;
@@ -811,6 +837,8 @@ type Template = {
811
837
  category: 'transactional' | 'product' | 'newsletter' | string;
812
838
  /** Folder the template is filed in on the dashboard, or null. */
813
839
  folder: string | null;
840
+ /** The sender it goes out as when a send sets neither `from` nor `sender`; null uses the default sender. */
841
+ sender_id?: string | null;
814
842
  published_version_id: string | null;
815
843
  published_at: string | null;
816
844
  created_at: string;
@@ -866,6 +894,8 @@ type CreateTemplateParams = {
866
894
  category?: 'transactional' | 'product';
867
895
  /** File it in this folder, created when it does not exist. */
868
896
  folder?: string;
897
+ /** The sender it goes out as (sender id or handle). */
898
+ sender_id?: string | null;
869
899
  };
870
900
  type TemplateStarter = {
871
901
  alias: string;
@@ -893,7 +923,48 @@ type UpdateTemplateParams = {
893
923
  category?: 'transactional' | 'product' | null;
894
924
  /** Move it to this folder (created when missing); `null` or `''` takes it out of any folder. */
895
925
  folder?: string | null;
926
+ /** The sender it goes out as (sender id or handle); `null` falls back to the default sender. */
927
+ sender_id?: string | null;
928
+ };
929
+ /**
930
+ * A saved sender: the name people see, an address on a verified domain, an
931
+ * optional reply-to and the handle sends use (`sender: 'billing'`).
932
+ */
933
+ type Sender = {
934
+ id: string;
935
+ name: string;
936
+ address: string;
937
+ /** Name and address as the inbox shows them: `Acme Billing <billing@mail.acme.com>`. */
938
+ from: string;
939
+ /** Where replies go; null means replies go to `address`. */
940
+ reply_to: string | null;
941
+ handle: string;
942
+ /** Sends with no `from`, `sender` or template sender go out as the default. */
943
+ is_default: boolean;
944
+ /** How many automations and templates send as it. */
945
+ used_by?: {
946
+ automations: number;
947
+ templates: number;
948
+ };
949
+ created_at: string;
950
+ updated_at: string;
951
+ };
952
+ type ListSendersResult = {
953
+ data: Sender[];
896
954
  };
955
+ type CreateSenderParams = {
956
+ /** The name people see. */
957
+ name: string;
958
+ /** An address on one of your verified domains. */
959
+ address: string;
960
+ /** Where replies go; leave it out to get replies at `address`. */
961
+ reply_to?: string | null;
962
+ /** Lowercase letters, digits and hyphens. Made from `name` when left out. */
963
+ handle?: string;
964
+ /** Make it the default. Your first sender is the default unless this is `false`. */
965
+ is_default?: boolean;
966
+ };
967
+ type UpdateSenderParams = Partial<CreateSenderParams>;
897
968
  /**
898
969
  * What a token provider may return: the token itself, or an object with the
899
970
  * token and when it expires (the `AccessToken` shape `@azure/identity`'s
@@ -1800,6 +1871,33 @@ declare class ReceivedEmailsResource {
1800
1871
  }>;
1801
1872
  }
1802
1873
 
1874
+ /**
1875
+ * Saved senders: the name people see, an address on one of your verified
1876
+ * domains, an optional reply-to, and a handle. Send with `sender: 'billing'`
1877
+ * instead of writing the address. Every method takes the sender's id or handle.
1878
+ */
1879
+ declare class SendersResource {
1880
+ private readonly client;
1881
+ constructor(client: Groundmail);
1882
+ /** Every sender, the default first, with how many automations and templates use each. */
1883
+ list(): Promise<ListSendersResult>;
1884
+ get(idOrHandle: string): Promise<{
1885
+ sender: Sender;
1886
+ }>;
1887
+ /** The address must be on a verified domain. The handle is made from the name when left out. */
1888
+ create(params: CreateSenderParams): Promise<{
1889
+ sender: Sender;
1890
+ }>;
1891
+ /** Renaming the handle updates automation emails that use it; code using the old handle needs the new one. */
1892
+ update(idOrHandle: string, params: UpdateSenderParams): Promise<{
1893
+ sender: Sender;
1894
+ }>;
1895
+ /** Fails with a 409 `conflict` while an automation or template uses the sender. */
1896
+ remove(idOrHandle: string): Promise<{
1897
+ ok: boolean;
1898
+ }>;
1899
+ }
1900
+
1803
1901
  declare class SuppressionsResource {
1804
1902
  private readonly client;
1805
1903
  constructor(client: Groundmail);
@@ -1869,9 +1967,12 @@ declare class TemplatesResource {
1869
1967
  restoreVersion(idOrAlias: string, version: number): Promise<{
1870
1968
  template: Template;
1871
1969
  }>;
1872
- testSend(idOrAlias: string, params: {
1970
+ testSend(idOrAlias: string,
1971
+ /** Without `from` or `sender`, the test goes out as the template's sender, else the default sender. */
1972
+ params: {
1873
1973
  to: string;
1874
- from: string;
1974
+ from?: string;
1975
+ sender?: string;
1875
1976
  variables?: Record<string, unknown>;
1876
1977
  }): Promise<unknown>;
1877
1978
  }
@@ -2004,6 +2105,8 @@ declare class Groundmail {
2004
2105
  readonly smtpCredentials: SmtpCredentialsResource;
2005
2106
  readonly suppressions: SuppressionsResource;
2006
2107
  readonly templates: TemplatesResource;
2108
+ /** Saved senders: name, address and reply-to that sends name with `sender: 'billing'`. */
2109
+ readonly senders: SendersResource;
2007
2110
  /** Your platform's customers, each with its own domains, suppressions, stats and limits. */
2008
2111
  readonly tenants: TenantsResource;
2009
2112
  /** Import from SendGrid, Postmark, Mailgun, Resend or Amazon SES (Beta). */
@@ -2047,4 +2150,4 @@ declare function normalizeAccessToken(value: GroundmailAccessToken | null | unde
2047
2150
  expiresAt: number | null;
2048
2151
  };
2049
2152
 
2050
- export { type DmarcSourceStatus as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type CategoryOptOut as C, type DnsRecord as D, type CreateDomainParams as E, type CreateDomainResult as F, Groundmail as G, type CreateMigrationParams as H, type CreateSuppressionParams as I, type CreateTemplateParams as J, type CreateTenantParams as K, type CreateWebhookParams as L, DEFAULT_API_BASE_URL as M, type DailyRampLimitErrorDetails as N, type DeleteTenantResult as O, type DeliverabilityBucket as P, type DeliverabilityDomainInsight as Q, type DeliverabilityInsightsResult as R, type SendEmailResult as S, type DeliverabilityMailServerRelay as T, type DeliverabilityWindow as U, type DmarcDailyPoint as V, type DmarcMonitoring as W, type DmarcMonitoringDisabled as X, type DmarcReadiness as Y, type DmarcReadinessVerdict as Z, type DmarcSource as _, type ApiErrorCode as a, type MigrationTotals as a$, type DmarcStatus as a0, type DnsProviderName as a1, type Domain as a2, type DomainBimiAnalysis as a3, type DomainBlocklistListing as a4, type DomainBlocklistStatus as a5, type DomainBlocklists as a6, type DomainDetailResult as a7, type DomainDmarcAnalysis as a8, type DomainDnsAnalysis as a9, type ListCategoryOptOutsResult as aA, type ListDomainsParams as aB, type ListDomainsResult as aC, type ListEmailsParams as aD, type ListEmailsResult as aE, type ListReceivedEmailsParams as aF, type ListReceivedEmailsResult as aG, type ListSuppressionsParams as aH, type ListSuppressionsResult as aI, type ListTemplatesParams as aJ, type ListTemplatesResult as aK, type ListTenantDomainsResult as aL, type ListTenantsParams as aM, type ListTenantsResult as aN, type ListTestInboxEmailsParams as aO, type ListTestInboxEmailsResult as aP, type MailServerSigningStatus as aQ, type MailStream as aR, type Migration as aS, type MigrationDnsChange as aT, type MigrationDnsPlan as aU, type MigrationDomainItem as aV, type MigrationItemStatus as aW, type MigrationProvider as aX, type MigrationResource as aY, type MigrationSummary as aZ, type MigrationTemplateItem as a_, type DomainStatus as aa, type DomainTlsMode as ab, type DomainTrackingDns as ac, type DomainTrackingStatus as ad, type EmailDelivery as ae, type EmailListItem as af, type EmailWebhookEventPayload as ag, type EmailWebhookEventType as ah, type EnableDmarcParams as ai, type EnableDmarcResult as aj, type EnrollmentSkip as ak, type EventRecord as al, type GroundmailAccessToken as am, type GroundmailOptions as an, type GroundmailTokenOptions as ao, type GroundmailTokenProvider as ap, type HeldBackErrorDetails as aq, type HeldBackReason as ar, type HeldBackRecipient as as, type InReplyToEmail as at, type ListApiKeysParams as au, type ListApiKeysResult as av, type ListAutomationRunsParams as aw, type ListAutomationRunsResult as ax, type ListAutomationsResult as ay, type ListCategoryOptOutsParams as az, type ApiKey as b, type MigrationWebhookItem as b0, type ReceivedEmail as b1, type ReceivedEmailAttachment as b2, type ReceivedEmailAttachmentMeta as b3, type RemoteApplyDnsCredentials as b4, type RemoveCategoryOptOutOptions as b5, type RunMigrationOptions as b6, type SendEmailParams as b7, type SesMigrationParams as b8, type StreamDeliverability as b9, type TriggerEventParams as bA, type TriggerEventResult as bB, type TwilioIntegrationResponse as bC, type TwilioIntegrationStatus as bD, type UpdateAutomationParams as bE, type UpdateDomainParams as bF, type UpdateEmailParams as bG, type UpdateTemplateParams as bH, type UpdateTenantParams as bI, type UpdateWebhookParams as bJ, type ValidateEmailResult as bK, type ValidationReason as bL, type ValidationVerdict as bM, type VerifyDomainResult as bN, type WaitForTestEmailParams as bO, type WebhookEmailTag as bP, type WebhookEndpoint as bQ, type WebhookEndpointWithSecret as bR, type WebhookEventType as bS, mergeMigrations as bT, normalizeAccessToken as bU, type SuppressedErrorDetails as ba, type Suppression as bb, TEST_INBOX_WAIT_DEFAULT_MS as bc, TEST_INBOX_WAIT_MAX_SECONDS as bd, type Template as be, type TemplateFormat as bf, type TemplateLintWarning as bg, type TemplateStarter as bh, type TemplateStatus as bi, type TemplateVersion as bj, type Tenant as bk, type TenantPauseSource as bl, type TenantRamp as bm, type TenantStats as bn, type TenantStatsResult as bo, type TenantStatus as bp, type TenantStreamPolicy as bq, type TestEmailWebhookParams as br, type TestEmailWebhookResult as bs, type TestInbox as bt, type TestInboxAddressOptions as bu, type TestInboxEmail as bv, type TestInboxEmailDetail as bw, type TestInboxHeader as bx, TestInboxResource as by, type TestInboxUsage as bz, type ApiKeyMigrationParams as c, type ApiKeyScope as d, type ApplyDnsParams as e, type ApplyDnsRecordResult as f, type ApplyDnsResult as g, type Asset as h, type Automation as i, type AutomationResult as j, type AutomationRun as k, type AutomationRunResponse as l, type AutomationRunStatus as m, type AutomationRunStep as n, type AutomationRunStepStatus as o, type AutomationStatus as p, type AutomationStep as q, type AutomationTrigger as r, type BounceType as s, type CategoryOptOutCategory as t, type CategoryUnsubscribedErrorDetails as u, type ConnectTwilioParams as v, type ContactWebhookEventPayload as w, type CreateApiKeyParams as x, type CreateApiKeyResult as y, type CreateAutomationParams as z };
2153
+ export { type DmarcReadiness as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type CategoryOptOut as C, type DnsRecord as D, type CreateApiKeyResult as E, type CreateAutomationParams as F, Groundmail as G, type CreateDomainParams as H, type CreateDomainResult as I, type CreateMigrationParams as J, type CreateSenderParams as K, type CreateSuppressionParams as L, type CreateTemplateParams as M, type CreateTenantParams as N, type CreateWebhookParams as O, DEFAULT_API_BASE_URL as P, type DailyRampLimitErrorDetails as Q, type DeleteTenantResult as R, type SendEmailResult as S, type DeliverabilityBucket as T, type DeliverabilityDomainInsight as U, type DeliverabilityInsightsResult as V, type DeliverabilityMailServerRelay as W, type DeliverabilityWindow as X, type DmarcDailyPoint as Y, type DmarcMonitoring as Z, type DmarcMonitoringDisabled as _, type ApiErrorCode as a, type MigrationProvider as a$, type DmarcReadinessVerdict as a0, type DmarcSource as a1, type DmarcSourceStatus as a2, type DmarcStatus as a3, type DnsProviderName as a4, type Domain as a5, type DomainBimiAnalysis as a6, type DomainBlocklistListing as a7, type DomainBlocklistStatus as a8, type DomainBlocklists as a9, type ListAutomationRunsResult as aA, type ListAutomationsResult as aB, type ListCategoryOptOutsParams as aC, type ListCategoryOptOutsResult as aD, type ListDomainsParams as aE, type ListDomainsResult as aF, type ListEmailsParams as aG, type ListEmailsResult as aH, type ListReceivedEmailsParams as aI, type ListReceivedEmailsResult as aJ, type ListSendersResult as aK, type ListSuppressionsParams as aL, type ListSuppressionsResult as aM, type ListTemplatesParams as aN, type ListTemplatesResult as aO, type ListTenantDomainsResult as aP, type ListTenantsParams as aQ, type ListTenantsResult as aR, type ListTestInboxEmailsParams as aS, type ListTestInboxEmailsResult as aT, type MailServerSigningStatus as aU, type MailStream as aV, type Migration as aW, type MigrationDnsChange as aX, type MigrationDnsPlan as aY, type MigrationDomainItem as aZ, type MigrationItemStatus as a_, type DomainDetailResult as aa, type DomainDmarcAnalysis as ab, type DomainDnsAnalysis as ac, type DomainStatus as ad, type DomainTlsMode as ae, type DomainTrackingDns as af, type DomainTrackingStatus as ag, type EmailDelivery as ah, type EmailListItem as ai, type EmailWebhookEventPayload as aj, type EmailWebhookEventType as ak, type EnableDmarcParams as al, type EnableDmarcResult as am, type EnrollmentSkip as an, type EventRecord as ao, type GroundmailAccessToken as ap, type GroundmailOptions as aq, type GroundmailTokenOptions as ar, type GroundmailTokenProvider as as, type HeldBackErrorDetails as at, type HeldBackReason as au, type HeldBackRecipient as av, type InReplyToEmail as aw, type ListApiKeysParams as ax, type ListApiKeysResult as ay, type ListAutomationRunsParams as az, type ApiKey as b, type MigrationResource as b0, type MigrationSummary as b1, type MigrationTemplateItem as b2, type MigrationTotals as b3, type MigrationWebhookItem as b4, type ReceivedEmail as b5, type ReceivedEmailAttachment as b6, type ReceivedEmailAttachmentMeta as b7, type RemoteApplyDnsCredentials as b8, type RemoveCategoryOptOutOptions as b9, type TestInboxEmail as bA, type TestInboxEmailDetail as bB, type TestInboxHeader as bC, TestInboxResource as bD, type TestInboxUsage as bE, type TriggerEventParams as bF, type TriggerEventResult as bG, type TwilioIntegrationResponse as bH, type TwilioIntegrationStatus as bI, type UpdateAutomationParams as bJ, type UpdateDomainParams as bK, type UpdateEmailParams as bL, type UpdateSenderParams as bM, type UpdateTemplateParams as bN, type UpdateTenantParams as bO, type UpdateWebhookParams as bP, type ValidateEmailResult as bQ, type ValidationReason as bR, type ValidationVerdict as bS, type VerifyDomainResult as bT, type WaitForTestEmailParams as bU, type WebhookEmailTag as bV, type WebhookEndpoint as bW, type WebhookEndpointWithSecret as bX, type WebhookEventType as bY, mergeMigrations as bZ, normalizeAccessToken as b_, type RunMigrationOptions as ba, type SendEmailParams as bb, type Sender as bc, type SesMigrationParams as bd, type StreamDeliverability as be, type SuppressedErrorDetails as bf, type Suppression as bg, TEST_INBOX_WAIT_DEFAULT_MS as bh, TEST_INBOX_WAIT_MAX_SECONDS as bi, type Template as bj, type TemplateFormat as bk, type TemplateLintWarning as bl, type TemplateStarter as bm, type TemplateStatus as bn, type TemplateVersion as bo, type Tenant as bp, type TenantPauseSource as bq, type TenantRamp as br, type TenantStats as bs, type TenantStatsResult as bt, type TenantStatus as bu, type TenantStreamPolicy as bv, type TestEmailWebhookParams as bw, type TestEmailWebhookResult as bx, type TestInbox as by, type TestInboxAddressOptions as bz, type ApiKeyMigrationParams as c, type ApiKeyScope as d, type ApplyDnsParams as e, type ApplyDnsRecordResult as f, type ApplyDnsResult as g, type Asset as h, type Automation as i, type AutomationBranchQuestion as j, type AutomationBranchStep as k, type AutomationResult as l, type AutomationRun as m, type AutomationRunResponse as n, type AutomationRunStatus as o, type AutomationRunStep as p, type AutomationRunStepStatus as q, type AutomationStatus as r, type AutomationStep as s, type AutomationTrigger as t, type BounceType as u, type CategoryOptOutCategory as v, type CategoryUnsubscribedErrorDetails as w, type ConnectTwilioParams as x, type ContactWebhookEventPayload as y, type CreateApiKeyParams as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiErrorBody, D as DnsRecord } from './client-C6Cu0xLT.js';
2
- export { a as ApiErrorCode, b as ApiKey, c as ApiKeyMigrationParams, d as ApiKeyScope, e as ApplyDnsParams, f as ApplyDnsRecordResult, g as ApplyDnsResult, h as Asset, i as Automation, j as AutomationResult, k as AutomationRun, l as AutomationRunResponse, m as AutomationRunStatus, n as AutomationRunStep, o as AutomationRunStepStatus, p as AutomationStatus, q as AutomationStep, r as AutomationTrigger, B as BatchSendEmailResult, s as BounceType, C as CategoryOptOut, t as CategoryOptOutCategory, u as CategoryUnsubscribedErrorDetails, v as ConnectTwilioParams, w as ContactWebhookEventPayload, x as CreateApiKeyParams, y as CreateApiKeyResult, z as CreateAutomationParams, E as CreateDomainParams, F as CreateDomainResult, H as CreateMigrationParams, I as CreateSuppressionParams, J as CreateTemplateParams, K as CreateTenantParams, L as CreateWebhookParams, M as DEFAULT_API_BASE_URL, N as DailyRampLimitErrorDetails, O as DeleteTenantResult, P as DeliverabilityBucket, Q as DeliverabilityDomainInsight, R as DeliverabilityInsightsResult, T as DeliverabilityMailServerRelay, U as DeliverabilityWindow, V as DmarcDailyPoint, W as DmarcMonitoring, X as DmarcMonitoringDisabled, Y as DmarcReadiness, Z as DmarcReadinessVerdict, _ as DmarcSource, $ as DmarcSourceStatus, a0 as DmarcStatus, a1 as DnsProviderName, a2 as Domain, a3 as DomainBimiAnalysis, a4 as DomainBlocklistListing, a5 as DomainBlocklistStatus, a6 as DomainBlocklists, a7 as DomainDetailResult, a8 as DomainDmarcAnalysis, a9 as DomainDnsAnalysis, aa as DomainStatus, ab as DomainTlsMode, ac as DomainTrackingDns, ad as DomainTrackingStatus, ae as EmailDelivery, af as EmailListItem, ag as EmailWebhookEventPayload, ah as EmailWebhookEventType, ai as EnableDmarcParams, aj as EnableDmarcResult, ak as EnrollmentSkip, al as EventRecord, G as Groundmail, am as GroundmailAccessToken, an as GroundmailOptions, ao as GroundmailTokenOptions, ap as GroundmailTokenProvider, aq as HeldBackErrorDetails, ar as HeldBackReason, as as HeldBackRecipient, at as InReplyToEmail, au as ListApiKeysParams, av as ListApiKeysResult, aw as ListAutomationRunsParams, ax as ListAutomationRunsResult, ay as ListAutomationsResult, az as ListCategoryOptOutsParams, aA as ListCategoryOptOutsResult, aB as ListDomainsParams, aC as ListDomainsResult, aD as ListEmailsParams, aE as ListEmailsResult, aF as ListReceivedEmailsParams, aG as ListReceivedEmailsResult, aH as ListSuppressionsParams, aI as ListSuppressionsResult, aJ as ListTemplatesParams, aK as ListTemplatesResult, aL as ListTenantDomainsResult, aM as ListTenantsParams, aN as ListTenantsResult, aO as ListTestInboxEmailsParams, aP as ListTestInboxEmailsResult, aQ as MailServerSigningStatus, aR as MailStream, aS as Migration, aT as MigrationDnsChange, aU as MigrationDnsPlan, aV as MigrationDomainItem, aW as MigrationItemStatus, aX as MigrationProvider, aY as MigrationResource, aZ as MigrationSummary, a_ as MigrationTemplateItem, a$ as MigrationTotals, b0 as MigrationWebhookItem, b1 as ReceivedEmail, b2 as ReceivedEmailAttachment, b3 as ReceivedEmailAttachmentMeta, b4 as RemoteApplyDnsCredentials, b5 as RemoveCategoryOptOutOptions, b6 as RunMigrationOptions, b7 as SendEmailParams, S as SendEmailResult, b8 as SesMigrationParams, b9 as StreamDeliverability, ba as SuppressedErrorDetails, bb as Suppression, bc as TEST_INBOX_WAIT_DEFAULT_MS, bd as TEST_INBOX_WAIT_MAX_SECONDS, be as Template, bf as TemplateFormat, bg as TemplateLintWarning, bh as TemplateStarter, bi as TemplateStatus, bj as TemplateVersion, bk as Tenant, bl as TenantPauseSource, bm as TenantRamp, bn as TenantStats, bo as TenantStatsResult, bp as TenantStatus, bq as TenantStreamPolicy, br as TestEmailWebhookParams, bs as TestEmailWebhookResult, bt as TestInbox, bu as TestInboxAddressOptions, bv as TestInboxEmail, bw as TestInboxEmailDetail, bx as TestInboxHeader, by as TestInboxResource, bz as TestInboxUsage, bA as TriggerEventParams, bB as TriggerEventResult, bC as TwilioIntegrationResponse, bD as TwilioIntegrationStatus, bE as UpdateAutomationParams, bF as UpdateDomainParams, bG as UpdateEmailParams, bH as UpdateTemplateParams, bI as UpdateTenantParams, bJ as UpdateWebhookParams, bK as ValidateEmailResult, bL as ValidationReason, bM as ValidationVerdict, bN as VerifyDomainResult, bO as WaitForTestEmailParams, bP as WebhookEmailTag, bQ as WebhookEndpoint, bR as WebhookEndpointWithSecret, bS as WebhookEventType, bT as mergeMigrations, bU as normalizeAccessToken } from './client-C6Cu0xLT.js';
1
+ import { A as ApiErrorBody, D as DnsRecord } from './client-PVTp1lAM.js';
2
+ export { a as ApiErrorCode, b as ApiKey, c as ApiKeyMigrationParams, d as ApiKeyScope, e as ApplyDnsParams, f as ApplyDnsRecordResult, g as ApplyDnsResult, h as Asset, i as Automation, j as AutomationBranchQuestion, k as AutomationBranchStep, l as AutomationResult, m as AutomationRun, n as AutomationRunResponse, o as AutomationRunStatus, p as AutomationRunStep, q as AutomationRunStepStatus, r as AutomationStatus, s as AutomationStep, t as AutomationTrigger, B as BatchSendEmailResult, u as BounceType, C as CategoryOptOut, v as CategoryOptOutCategory, w as CategoryUnsubscribedErrorDetails, x as ConnectTwilioParams, y as ContactWebhookEventPayload, z as CreateApiKeyParams, E as CreateApiKeyResult, F as CreateAutomationParams, H as CreateDomainParams, I as CreateDomainResult, J as CreateMigrationParams, K as CreateSenderParams, L as CreateSuppressionParams, M as CreateTemplateParams, N as CreateTenantParams, O as CreateWebhookParams, P as DEFAULT_API_BASE_URL, Q as DailyRampLimitErrorDetails, R as DeleteTenantResult, T as DeliverabilityBucket, U as DeliverabilityDomainInsight, V as DeliverabilityInsightsResult, W as DeliverabilityMailServerRelay, X as DeliverabilityWindow, Y as DmarcDailyPoint, Z as DmarcMonitoring, _ as DmarcMonitoringDisabled, $ as DmarcReadiness, a0 as DmarcReadinessVerdict, a1 as DmarcSource, a2 as DmarcSourceStatus, a3 as DmarcStatus, a4 as DnsProviderName, a5 as Domain, a6 as DomainBimiAnalysis, a7 as DomainBlocklistListing, a8 as DomainBlocklistStatus, a9 as DomainBlocklists, aa as DomainDetailResult, ab as DomainDmarcAnalysis, ac as DomainDnsAnalysis, ad as DomainStatus, ae as DomainTlsMode, af as DomainTrackingDns, ag as DomainTrackingStatus, ah as EmailDelivery, ai as EmailListItem, aj as EmailWebhookEventPayload, ak as EmailWebhookEventType, al as EnableDmarcParams, am as EnableDmarcResult, an as EnrollmentSkip, ao as EventRecord, G as Groundmail, ap as GroundmailAccessToken, aq as GroundmailOptions, ar as GroundmailTokenOptions, as as GroundmailTokenProvider, at as HeldBackErrorDetails, au as HeldBackReason, av as HeldBackRecipient, aw as InReplyToEmail, ax as ListApiKeysParams, ay as ListApiKeysResult, az as ListAutomationRunsParams, aA as ListAutomationRunsResult, aB as ListAutomationsResult, aC as ListCategoryOptOutsParams, aD as ListCategoryOptOutsResult, aE as ListDomainsParams, aF as ListDomainsResult, aG as ListEmailsParams, aH as ListEmailsResult, aI as ListReceivedEmailsParams, aJ as ListReceivedEmailsResult, aK as ListSendersResult, aL as ListSuppressionsParams, aM as ListSuppressionsResult, aN as ListTemplatesParams, aO as ListTemplatesResult, aP as ListTenantDomainsResult, aQ as ListTenantsParams, aR as ListTenantsResult, aS as ListTestInboxEmailsParams, aT as ListTestInboxEmailsResult, aU as MailServerSigningStatus, aV as MailStream, aW as Migration, aX as MigrationDnsChange, aY as MigrationDnsPlan, aZ as MigrationDomainItem, a_ as MigrationItemStatus, a$ as MigrationProvider, b0 as MigrationResource, b1 as MigrationSummary, b2 as MigrationTemplateItem, b3 as MigrationTotals, b4 as MigrationWebhookItem, b5 as ReceivedEmail, b6 as ReceivedEmailAttachment, b7 as ReceivedEmailAttachmentMeta, b8 as RemoteApplyDnsCredentials, b9 as RemoveCategoryOptOutOptions, ba as RunMigrationOptions, bb as SendEmailParams, S as SendEmailResult, bc as Sender, bd as SesMigrationParams, be as StreamDeliverability, bf as SuppressedErrorDetails, bg as Suppression, bh as TEST_INBOX_WAIT_DEFAULT_MS, bi as TEST_INBOX_WAIT_MAX_SECONDS, bj as Template, bk as TemplateFormat, bl as TemplateLintWarning, bm as TemplateStarter, bn as TemplateStatus, bo as TemplateVersion, bp as Tenant, bq as TenantPauseSource, br as TenantRamp, bs as TenantStats, bt as TenantStatsResult, bu as TenantStatus, bv as TenantStreamPolicy, bw as TestEmailWebhookParams, bx as TestEmailWebhookResult, by as TestInbox, bz as TestInboxAddressOptions, bA as TestInboxEmail, bB as TestInboxEmailDetail, bC as TestInboxHeader, bD as TestInboxResource, bE as TestInboxUsage, bF as TriggerEventParams, bG as TriggerEventResult, bH as TwilioIntegrationResponse, bI as TwilioIntegrationStatus, bJ as UpdateAutomationParams, bK as UpdateDomainParams, bL as UpdateEmailParams, bM as UpdateSenderParams, bN as UpdateTemplateParams, bO as UpdateTenantParams, bP as UpdateWebhookParams, bQ as ValidateEmailResult, bR as ValidationReason, bS as ValidationVerdict, bT as VerifyDomainResult, bU as WaitForTestEmailParams, bV as WebhookEmailTag, bW as WebhookEndpoint, bX as WebhookEndpointWithSecret, bY as WebhookEventType, bZ as mergeMigrations, b_ as normalizeAccessToken } from './client-PVTp1lAM.js';
3
3
 
4
4
  type GroundmailErrorOptions = {
5
5
  code?: string;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  normalizeAccessToken,
13
13
  signWebhookPayload,
14
14
  verifyWebhookSignature
15
- } from "./chunk-KOSFM5QK.js";
15
+ } from "./chunk-PSLA3IGN.js";
16
16
 
17
17
  // src/simulator.ts
18
18
  var SIMULATOR_DOMAIN = "simulator.groundmail.dev";
package/dist/payload.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail } from './client-C6Cu0xLT.js';
1
+ import { G as Groundmail } from './client-PVTp1lAM.js';
2
2
 
3
3
  /**
4
4
  * Minimal Payload `SendEmailOptions` / address shapes used by this adapter.
package/dist/payload.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_API_BASE_URL,
3
3
  Groundmail
4
- } from "./chunk-KOSFM5QK.js";
4
+ } from "./chunk-PSLA3IGN.js";
5
5
 
6
6
  // src/payload.ts
7
7
  function resolveApiKey(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail",
3
- "version": "0.32.1",
3
+ "version": "0.34.0",
4
4
  "description": "Groundmail transactional email API client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -92,8 +92,8 @@
92
92
  "groundmail-nodemailer": "0.15.21"
93
93
  },
94
94
  "devDependencies": {
95
- "@types/nodemailer": "^8.0.1",
96
- "nodemailer": "^10.2.1",
95
+ "@types/nodemailer": "^8.0.2",
96
+ "nodemailer": "^10.3.1",
97
97
  "tsup": "^8.5.0",
98
98
  "typescript": "^5",
99
99
  "vitest": "^3.2.4"