groundmail 0.33.0 → 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-C8TtxhtX.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-C8TtxhtX.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-C8TtxhtX.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;
@@ -828,6 +837,8 @@ type Template = {
828
837
  category: 'transactional' | 'product' | 'newsletter' | string;
829
838
  /** Folder the template is filed in on the dashboard, or null. */
830
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;
831
842
  published_version_id: string | null;
832
843
  published_at: string | null;
833
844
  created_at: string;
@@ -883,6 +894,8 @@ type CreateTemplateParams = {
883
894
  category?: 'transactional' | 'product';
884
895
  /** File it in this folder, created when it does not exist. */
885
896
  folder?: string;
897
+ /** The sender it goes out as (sender id or handle). */
898
+ sender_id?: string | null;
886
899
  };
887
900
  type TemplateStarter = {
888
901
  alias: string;
@@ -910,7 +923,48 @@ type UpdateTemplateParams = {
910
923
  category?: 'transactional' | 'product' | null;
911
924
  /** Move it to this folder (created when missing); `null` or `''` takes it out of any folder. */
912
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;
913
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[];
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>;
914
968
  /**
915
969
  * What a token provider may return: the token itself, or an object with the
916
970
  * token and when it expires (the `AccessToken` shape `@azure/identity`'s
@@ -1817,6 +1871,33 @@ declare class ReceivedEmailsResource {
1817
1871
  }>;
1818
1872
  }
1819
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
+
1820
1901
  declare class SuppressionsResource {
1821
1902
  private readonly client;
1822
1903
  constructor(client: Groundmail);
@@ -1886,9 +1967,12 @@ declare class TemplatesResource {
1886
1967
  restoreVersion(idOrAlias: string, version: number): Promise<{
1887
1968
  template: Template;
1888
1969
  }>;
1889
- 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: {
1890
1973
  to: string;
1891
- from: string;
1974
+ from?: string;
1975
+ sender?: string;
1892
1976
  variables?: Record<string, unknown>;
1893
1977
  }): Promise<unknown>;
1894
1978
  }
@@ -2021,6 +2105,8 @@ declare class Groundmail {
2021
2105
  readonly smtpCredentials: SmtpCredentialsResource;
2022
2106
  readonly suppressions: SuppressionsResource;
2023
2107
  readonly templates: TemplatesResource;
2108
+ /** Saved senders: name, address and reply-to that sends name with `sender: 'billing'`. */
2109
+ readonly senders: SendersResource;
2024
2110
  /** Your platform's customers, each with its own domains, suppressions, stats and limits. */
2025
2111
  readonly tenants: TenantsResource;
2026
2112
  /** Import from SendGrid, Postmark, Mailgun, Resend or Amazon SES (Beta). */
@@ -2064,4 +2150,4 @@ declare function normalizeAccessToken(value: GroundmailAccessToken | null | unde
2064
2150
  expiresAt: number | null;
2065
2151
  };
2066
2152
 
2067
- export { type DmarcReadinessVerdict 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 CreateSuppressionParams as K, type CreateTemplateParams as L, type CreateTenantParams as M, type CreateWebhookParams as N, DEFAULT_API_BASE_URL as O, type DailyRampLimitErrorDetails as P, type DeleteTenantResult as Q, type DeliverabilityBucket as R, type SendEmailResult as S, type DeliverabilityDomainInsight as T, type DeliverabilityInsightsResult as U, type DeliverabilityMailServerRelay as V, type DeliverabilityWindow as W, type DmarcDailyPoint as X, type DmarcMonitoring as Y, type DmarcMonitoringDisabled as Z, type DmarcReadiness as _, type ApiErrorCode as a, type MigrationSummary as a$, type DmarcSource as a0, type DmarcSourceStatus as a1, type DmarcStatus as a2, type DnsProviderName as a3, type Domain as a4, type DomainBimiAnalysis as a5, type DomainBlocklistListing as a6, type DomainBlocklistStatus as a7, type DomainBlocklists as a8, type DomainDetailResult as a9, type ListAutomationsResult as aA, type ListCategoryOptOutsParams as aB, type ListCategoryOptOutsResult as aC, type ListDomainsParams as aD, type ListDomainsResult as aE, type ListEmailsParams as aF, type ListEmailsResult as aG, type ListReceivedEmailsParams as aH, type ListReceivedEmailsResult as aI, type ListSuppressionsParams as aJ, type ListSuppressionsResult as aK, type ListTemplatesParams as aL, type ListTemplatesResult as aM, type ListTenantDomainsResult as aN, type ListTenantsParams as aO, type ListTenantsResult as aP, type ListTestInboxEmailsParams as aQ, type ListTestInboxEmailsResult as aR, type MailServerSigningStatus as aS, type MailStream as aT, type Migration as aU, type MigrationDnsChange as aV, type MigrationDnsPlan as aW, type MigrationDomainItem as aX, type MigrationItemStatus as aY, type MigrationProvider as aZ, type MigrationResource as a_, type DomainDmarcAnalysis as aa, type DomainDnsAnalysis as ab, type DomainStatus as ac, type DomainTlsMode as ad, type DomainTrackingDns as ae, type DomainTrackingStatus as af, type EmailDelivery as ag, type EmailListItem as ah, type EmailWebhookEventPayload as ai, type EmailWebhookEventType as aj, type EnableDmarcParams as ak, type EnableDmarcResult as al, type EnrollmentSkip as am, type EventRecord as an, type GroundmailAccessToken as ao, type GroundmailOptions as ap, type GroundmailTokenOptions as aq, type GroundmailTokenProvider as ar, type HeldBackErrorDetails as as, type HeldBackReason as at, type HeldBackRecipient as au, type InReplyToEmail as av, type ListApiKeysParams as aw, type ListApiKeysResult as ax, type ListAutomationRunsParams as ay, type ListAutomationRunsResult as az, type ApiKey as b, type MigrationTemplateItem as b0, type MigrationTotals as b1, type MigrationWebhookItem as b2, type ReceivedEmail as b3, type ReceivedEmailAttachment as b4, type ReceivedEmailAttachmentMeta as b5, type RemoteApplyDnsCredentials as b6, type RemoveCategoryOptOutOptions as b7, type RunMigrationOptions as b8, type SendEmailParams as b9, TestInboxResource as bA, type TestInboxUsage as bB, type TriggerEventParams as bC, type TriggerEventResult as bD, type TwilioIntegrationResponse as bE, type TwilioIntegrationStatus as bF, type UpdateAutomationParams as bG, type UpdateDomainParams as bH, type UpdateEmailParams as bI, type UpdateTemplateParams as bJ, type UpdateTenantParams as bK, type UpdateWebhookParams as bL, type ValidateEmailResult as bM, type ValidationReason as bN, type ValidationVerdict as bO, type VerifyDomainResult as bP, type WaitForTestEmailParams as bQ, type WebhookEmailTag as bR, type WebhookEndpoint as bS, type WebhookEndpointWithSecret as bT, type WebhookEventType as bU, mergeMigrations as bV, normalizeAccessToken as bW, type SesMigrationParams as ba, type StreamDeliverability as bb, type SuppressedErrorDetails as bc, type Suppression as bd, TEST_INBOX_WAIT_DEFAULT_MS as be, TEST_INBOX_WAIT_MAX_SECONDS as bf, type Template as bg, type TemplateFormat as bh, type TemplateLintWarning as bi, type TemplateStarter as bj, type TemplateStatus as bk, type TemplateVersion as bl, type Tenant as bm, type TenantPauseSource as bn, type TenantRamp as bo, type TenantStats as bp, type TenantStatsResult as bq, type TenantStatus as br, type TenantStreamPolicy as bs, type TestEmailWebhookParams as bt, type TestEmailWebhookResult as bu, type TestInbox as bv, type TestInboxAddressOptions as bw, type TestInboxEmail as bx, type TestInboxEmailDetail as by, type TestInboxHeader 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 };
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-C8TtxhtX.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 CreateSuppressionParams, L as CreateTemplateParams, M as CreateTenantParams, N as CreateWebhookParams, O as DEFAULT_API_BASE_URL, P as DailyRampLimitErrorDetails, Q as DeleteTenantResult, R as DeliverabilityBucket, T as DeliverabilityDomainInsight, U as DeliverabilityInsightsResult, V as DeliverabilityMailServerRelay, W as DeliverabilityWindow, X as DmarcDailyPoint, Y as DmarcMonitoring, Z as DmarcMonitoringDisabled, _ as DmarcReadiness, $ as DmarcReadinessVerdict, a0 as DmarcSource, a1 as DmarcSourceStatus, a2 as DmarcStatus, a3 as DnsProviderName, a4 as Domain, a5 as DomainBimiAnalysis, a6 as DomainBlocklistListing, a7 as DomainBlocklistStatus, a8 as DomainBlocklists, a9 as DomainDetailResult, aa as DomainDmarcAnalysis, ab as DomainDnsAnalysis, ac as DomainStatus, ad as DomainTlsMode, ae as DomainTrackingDns, af as DomainTrackingStatus, ag as EmailDelivery, ah as EmailListItem, ai as EmailWebhookEventPayload, aj as EmailWebhookEventType, ak as EnableDmarcParams, al as EnableDmarcResult, am as EnrollmentSkip, an as EventRecord, G as Groundmail, ao as GroundmailAccessToken, ap as GroundmailOptions, aq as GroundmailTokenOptions, ar as GroundmailTokenProvider, as as HeldBackErrorDetails, at as HeldBackReason, au as HeldBackRecipient, av as InReplyToEmail, aw as ListApiKeysParams, ax as ListApiKeysResult, ay as ListAutomationRunsParams, az as ListAutomationRunsResult, aA as ListAutomationsResult, aB as ListCategoryOptOutsParams, aC as ListCategoryOptOutsResult, aD as ListDomainsParams, aE as ListDomainsResult, aF as ListEmailsParams, aG as ListEmailsResult, aH as ListReceivedEmailsParams, aI as ListReceivedEmailsResult, aJ as ListSuppressionsParams, aK as ListSuppressionsResult, aL as ListTemplatesParams, aM as ListTemplatesResult, aN as ListTenantDomainsResult, aO as ListTenantsParams, aP as ListTenantsResult, aQ as ListTestInboxEmailsParams, aR as ListTestInboxEmailsResult, aS as MailServerSigningStatus, aT as MailStream, aU as Migration, aV as MigrationDnsChange, aW as MigrationDnsPlan, aX as MigrationDomainItem, aY as MigrationItemStatus, aZ as MigrationProvider, a_ as MigrationResource, a$ as MigrationSummary, b0 as MigrationTemplateItem, b1 as MigrationTotals, b2 as MigrationWebhookItem, b3 as ReceivedEmail, b4 as ReceivedEmailAttachment, b5 as ReceivedEmailAttachmentMeta, b6 as RemoteApplyDnsCredentials, b7 as RemoveCategoryOptOutOptions, b8 as RunMigrationOptions, b9 as SendEmailParams, S as SendEmailResult, ba as SesMigrationParams, bb as StreamDeliverability, bc as SuppressedErrorDetails, bd as Suppression, be as TEST_INBOX_WAIT_DEFAULT_MS, bf as TEST_INBOX_WAIT_MAX_SECONDS, bg as Template, bh as TemplateFormat, bi as TemplateLintWarning, bj as TemplateStarter, bk as TemplateStatus, bl as TemplateVersion, bm as Tenant, bn as TenantPauseSource, bo as TenantRamp, bp as TenantStats, bq as TenantStatsResult, br as TenantStatus, bs as TenantStreamPolicy, bt as TestEmailWebhookParams, bu as TestEmailWebhookResult, bv as TestInbox, bw as TestInboxAddressOptions, bx as TestInboxEmail, by as TestInboxEmailDetail, bz as TestInboxHeader, bA as TestInboxResource, bB as TestInboxUsage, bC as TriggerEventParams, bD as TriggerEventResult, bE as TwilioIntegrationResponse, bF as TwilioIntegrationStatus, bG as UpdateAutomationParams, bH as UpdateDomainParams, bI as UpdateEmailParams, bJ as UpdateTemplateParams, bK as UpdateTenantParams, bL as UpdateWebhookParams, bM as ValidateEmailResult, bN as ValidationReason, bO as ValidationVerdict, bP as VerifyDomainResult, bQ as WaitForTestEmailParams, bR as WebhookEmailTag, bS as WebhookEndpoint, bT as WebhookEndpointWithSecret, bU as WebhookEventType, bV as mergeMigrations, bW as normalizeAccessToken } from './client-C8TtxhtX.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-C8TtxhtX.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.33.0",
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"