groundmail 0.37.0 → 0.39.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,22 @@ 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
+ ## Batches
83
+
84
+ `emails.batch()` sends up to 100 emails in one request and returns a `batch_id` shared by every
85
+ email it accepted. Schedule a batch with `scheduledAt` on each email, then check on it or call it
86
+ off in one call:
87
+
88
+ ```ts
89
+ const { batch_id } = await tx.emails.batch(emails) // each with scheduledAt: '2026-11-04T09:00:00Z'
90
+
91
+ await tx.batches.get(batch_id) // { total: 100, counts: { scheduled: 100 }, … }
92
+ await tx.batches.cancel(batch_id) // { cancelled: 100, already_cancelled: 0, not_cancellable: 0 }
93
+ ```
94
+
95
+ `cancel` only touches emails that are still scheduled and is safe to repeat. Details:
96
+ https://docs.groundmail.dev/emails#batches
97
+
82
98
  ## Senders
83
99
 
84
100
  Save a sender once (name, an address on a verified domain, where replies go) and send as it by
package/dist/authjs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail } from './client-BZWkihNZ.js';
1
+ import { G as Groundmail } from './client-CdiEV1Qt.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-HMOQDJOX.js";
4
+ } from "./chunk-V4ZZRJ3Q.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-BZWkihNZ.js';
1
+ import { S as SendEmailResult, G as Groundmail } from './client-CdiEV1Qt.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-HMOQDJOX.js";
4
+ } from "./chunk-V4ZZRJ3Q.js";
5
5
 
6
6
  // src/better-auth.ts
7
7
  function linkHtml(label, url) {
@@ -1407,6 +1407,24 @@ var AutomationsResource = class {
1407
1407
  }
1408
1408
  };
1409
1409
 
1410
+ // src/batches.ts
1411
+ var BatchesResource = class {
1412
+ constructor(client) {
1413
+ this.client = client;
1414
+ }
1415
+ /** How many emails the batch has, by current status. */
1416
+ async get(batchId) {
1417
+ return this.client.request(`/batches/${encodeURIComponent(batchId)}`, { method: "GET" });
1418
+ }
1419
+ /**
1420
+ * Cancels every email in the batch that is still scheduled. Emails already
1421
+ * queued or sent are counted in `not_cancellable`. Safe to call again.
1422
+ */
1423
+ async cancel(batchId) {
1424
+ return this.client.request(`/batches/${encodeURIComponent(batchId)}/cancel`, { method: "POST" });
1425
+ }
1426
+ };
1427
+
1410
1428
  // src/dmarc.ts
1411
1429
  var DmarcResource = class {
1412
1430
  constructor(client) {
@@ -2100,9 +2118,41 @@ var TenantDomainsResource = class {
2100
2118
  };
2101
2119
 
2102
2120
  // src/webhooks/index.ts
2121
+ var WebhookDeliveriesResource = class {
2122
+ constructor(client) {
2123
+ this.client = client;
2124
+ }
2125
+ /** Newest first. Filter by `status`, `event`, `email_id`, `test`, or search with `q`. */
2126
+ async list(webhookId, params = {}) {
2127
+ const search = new URLSearchParams();
2128
+ for (const [key, value] of Object.entries(params)) {
2129
+ if (value != null && value !== "") search.set(key, String(value));
2130
+ }
2131
+ const query = search.toString();
2132
+ return this.client.request(
2133
+ `/webhooks/${encodeURIComponent(webhookId)}/deliveries${query ? `?${query}` : ""}`,
2134
+ { method: "GET" }
2135
+ );
2136
+ }
2137
+ /** One delivery with every attempt, the payload sent and what your server replied. */
2138
+ async get(webhookId, deliveryId) {
2139
+ return this.client.request(
2140
+ `/webhooks/${encodeURIComponent(webhookId)}/deliveries/${encodeURIComponent(deliveryId)}`,
2141
+ { method: "GET" }
2142
+ );
2143
+ }
2144
+ /** Send the same payload again as a new delivery, signed afresh. The original is unchanged. */
2145
+ async resend(webhookId, deliveryId) {
2146
+ return this.client.request(
2147
+ `/webhooks/${encodeURIComponent(webhookId)}/deliveries/${encodeURIComponent(deliveryId)}/resend`,
2148
+ { method: "POST" }
2149
+ );
2150
+ }
2151
+ };
2103
2152
  var WebhooksResource = class {
2104
2153
  constructor(client) {
2105
2154
  this.client = client;
2155
+ this.deliveries = new WebhookDeliveriesResource(client);
2106
2156
  }
2107
2157
  async list(params = {}) {
2108
2158
  const search = new URLSearchParams();
@@ -2158,6 +2208,7 @@ var _Groundmail = class _Groundmail {
2158
2208
  }
2159
2209
  this.domains = new DomainsResource(this);
2160
2210
  this.emails = new EmailsResource(this);
2211
+ this.batches = new BatchesResource(this);
2161
2212
  this.receivedEmails = new ReceivedEmailsResource(this);
2162
2213
  this.events = new EventsResource(this);
2163
2214
  this.automations = new AutomationsResource(this);
package/dist/clerk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail, S as SendEmailResult } from './client-BZWkihNZ.js';
1
+ import { G as Groundmail, S as SendEmailResult } from './client-CdiEV1Qt.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-HMOQDJOX.js";
4
+ } from "./chunk-V4ZZRJ3Q.js";
5
5
 
6
6
  // src/clerk.ts
7
7
  function resolveApiKey(options) {
@@ -135,6 +135,11 @@ type BatchSendOptions = {
135
135
  idempotencyKey?: string;
136
136
  };
137
137
  type BatchSendEmailResult = {
138
+ /**
139
+ * Shared by every email this call accepted (`batch_…`). Pass it to
140
+ * `batches.get()` or `batches.cancel()`. Optional so older API responses still type-check.
141
+ */
142
+ batch_id?: string;
138
143
  data: Array<{
139
144
  index: number;
140
145
  id?: string;
@@ -149,6 +154,26 @@ type BatchSendEmailResult = {
149
154
  };
150
155
  }>;
151
156
  };
157
+ /** `batches.get()`: a batch's emails by current status. */
158
+ type Batch = {
159
+ batch_id: string;
160
+ /** When the batch's first email was created (ISO 8601). */
161
+ created_at: string;
162
+ /** Emails in the batch. */
163
+ total: number;
164
+ /** Emails by status, e.g. `{ scheduled: 98, sent: 2 }`. Only statuses with an email appear. */
165
+ counts: Record<string, number>;
166
+ };
167
+ /** `batches.cancel()` result. */
168
+ type CancelBatchResult = {
169
+ batch_id: string;
170
+ /** Scheduled emails this call cancelled. */
171
+ cancelled: number;
172
+ /** Emails already cancelled before this call. */
173
+ already_cancelled: number;
174
+ /** Emails past `scheduled` (queued, sent, delivered, failed, …) that can no longer be cancelled. */
175
+ not_cancellable: number;
176
+ };
152
177
  type UpdateEmailParams = {
153
178
  scheduledAt?: string | Date;
154
179
  scheduled_at?: string | Date;
@@ -211,6 +236,11 @@ type EmailListItem = {
211
236
  /** Mail stream it went out on (each sends from its own IPs). */
212
237
  stream?: MailStream;
213
238
  tags: unknown;
239
+ /**
240
+ * The `emails.batch()` call that sent it (`batch_…`); null for a single send.
241
+ * Optional so older API responses still type-check.
242
+ */
243
+ batch_id?: string | null;
214
244
  scheduled_at: string | null;
215
245
  cancelled_at: string | null;
216
246
  created_at: string;
@@ -779,9 +809,81 @@ type WebhookEndpoint = {
779
809
  enabled: boolean;
780
810
  /** Present only when the endpoint receives email events for some tenants only (their external ids). */
781
811
  tenants?: string[];
812
+ /** Delivery health, on `list` and `get`. */
813
+ health?: WebhookEndpointHealth;
814
+ created_at: string;
815
+ updated_at: string;
816
+ };
817
+ type WebhookEndpointHealth = {
818
+ last_24h: {
819
+ total: number;
820
+ delivered: number;
821
+ /** Deliveries that used all 5 attempts and still failed. */
822
+ failed: number;
823
+ /** Median response time in milliseconds; null with no responses. */
824
+ median_latency_ms: number | null;
825
+ };
826
+ last_delivery_at: string | null;
827
+ last_status: WebhookDeliveryStatus | null;
828
+ /** The HTTP status of the latest attempt; null when nothing answered. */
829
+ last_response_status: number | null;
830
+ /** At least one delivery failed all 5 attempts in the last 24 hours. */
831
+ failing: boolean;
832
+ };
833
+ type WebhookDeliveryStatus = 'pending' | 'retrying' | 'delivered' | 'failed';
834
+ type WebhookDelivery = {
835
+ id: string;
836
+ webhook_id: string;
837
+ event: WebhookEventType;
838
+ status: WebhookDeliveryStatus;
839
+ attempt_count: number;
840
+ max_attempts: number;
841
+ email_id: string | null;
842
+ recipient: string | null;
843
+ /** A simulated event (`data.test: true`). */
844
+ test: boolean;
845
+ /** The latest attempt's HTTP status; null when nothing answered. */
846
+ response_status: number | null;
847
+ /** Why there was no response: `timeout` or `connection`. */
848
+ error_kind: 'timeout' | 'connection' | null;
849
+ latency_ms: number | null;
850
+ last_attempt_at: string | null;
851
+ next_attempt_at: string | null;
852
+ /** The delivery this one resends. */
853
+ resent_from: string | null;
782
854
  created_at: string;
783
855
  updated_at: string;
784
856
  };
857
+ type WebhookDeliveryAttempt = {
858
+ attempt: number;
859
+ started_at: string;
860
+ response_status: number | null;
861
+ error_kind: 'timeout' | 'connection' | null;
862
+ latency_ms: number | null;
863
+ /** The first 2 KB of what your server replied. */
864
+ response_body: string | null;
865
+ response_headers: Record<string, string> | null;
866
+ };
867
+ type WebhookDeliveryDetail = WebhookDelivery & {
868
+ /** The event exactly as sent. */
869
+ payload: unknown;
870
+ attempts: WebhookDeliveryAttempt[];
871
+ };
872
+ type ListWebhookDeliveriesParams = {
873
+ limit?: number;
874
+ cursor?: string;
875
+ status?: WebhookDeliveryStatus;
876
+ event?: WebhookEventType;
877
+ email_id?: string;
878
+ /** An exact email id, or part of a recipient address. */
879
+ q?: string;
880
+ test?: boolean;
881
+ };
882
+ type ListWebhookDeliveriesResult = {
883
+ deliveries: WebhookDelivery[];
884
+ has_more: boolean;
885
+ next_cursor: string | null;
886
+ };
785
887
  type CreateWebhookParams = {
786
888
  url: string;
787
889
  events?: WebhookEventType[];
@@ -1760,6 +1862,22 @@ declare class AutomationsResource {
1760
1862
  retryRun(id: string): Promise<AutomationRunResponse>;
1761
1863
  }
1762
1864
 
1865
+ /**
1866
+ * Batches from `emails.batch()`: every email one call accepted shares the
1867
+ * result's `batch_id`. Read their status counts, or cancel the scheduled ones.
1868
+ */
1869
+ declare class BatchesResource {
1870
+ private readonly client;
1871
+ constructor(client: Groundmail);
1872
+ /** How many emails the batch has, by current status. */
1873
+ get(batchId: string): Promise<Batch>;
1874
+ /**
1875
+ * Cancels every email in the batch that is still scheduled. Emails already
1876
+ * queued or sent are counted in `not_cancellable`. Safe to call again.
1877
+ */
1878
+ cancel(batchId: string): Promise<CancelBatchResult>;
1879
+ }
1880
+
1763
1881
  /** Status of one sending source in the DMARC reports. `unknown`: an unrecognised server failing DMARC (possible spoofing). */
1764
1882
  type DmarcSourceStatus = 'passing' | 'failing' | 'unknown';
1765
1883
  type DmarcSource = {
@@ -2212,8 +2330,24 @@ declare class TestInboxResource {
2212
2330
  waitFor(params: WaitForTestEmailParams): Promise<TestInboxEmailDetail>;
2213
2331
  }
2214
2332
 
2333
+ /** The delivery log of one endpoint: every event sent to it, kept 30 days. */
2334
+ declare class WebhookDeliveriesResource {
2335
+ private readonly client;
2336
+ constructor(client: Groundmail);
2337
+ /** Newest first. Filter by `status`, `event`, `email_id`, `test`, or search with `q`. */
2338
+ list(webhookId: string, params?: ListWebhookDeliveriesParams): Promise<ListWebhookDeliveriesResult>;
2339
+ /** One delivery with every attempt, the payload sent and what your server replied. */
2340
+ get(webhookId: string, deliveryId: string): Promise<{
2341
+ delivery: WebhookDeliveryDetail;
2342
+ }>;
2343
+ /** Send the same payload again as a new delivery, signed afresh. The original is unchanged. */
2344
+ resend(webhookId: string, deliveryId: string): Promise<{
2345
+ delivery: WebhookDeliveryDetail;
2346
+ }>;
2347
+ }
2215
2348
  declare class WebhooksResource {
2216
2349
  private readonly client;
2350
+ readonly deliveries: WebhookDeliveriesResource;
2217
2351
  constructor(client: Groundmail);
2218
2352
  list(params?: {
2219
2353
  limit?: number;
@@ -2241,6 +2375,8 @@ declare const DEFAULT_API_BASE_URL = "https://api.groundmail.dev";
2241
2375
  declare class Groundmail {
2242
2376
  readonly domains: DomainsResource;
2243
2377
  readonly emails: EmailsResource;
2378
+ /** Batches from `emails.batch()`: status counts, and cancel the scheduled emails in one call. */
2379
+ readonly batches: BatchesResource;
2244
2380
  readonly receivedEmails: ReceivedEmailsResource;
2245
2381
  readonly events: EventsResource;
2246
2382
  readonly automations: AutomationsResource;
@@ -2297,4 +2433,4 @@ declare function normalizeAccessToken(value: GroundmailAccessToken | null | unde
2297
2433
  expiresAt: number | null;
2298
2434
  };
2299
2435
 
2300
- export { type DeliverabilityInsightsResult as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type BrandSettings as C, type DnsRecord as D, type CategoryOptOut as E, type CategoryOptOutCategory as F, Groundmail as G, type CategoryUnsubscribedErrorDetails as H, type ConnectTwilioParams as I, type ContactWebhookEventPayload as J, type CreateApiKeyParams as K, type CreateApiKeyResult as L, type CreateAutomationParams as M, type CreateDomainParams as N, type CreateDomainResult as O, type CreateMigrationParams as P, type CreateSenderParams as Q, type CreateSuppressionParams as R, type SendEmailResult as S, type CreateTemplateParams as T, type CreateTenantParams as U, type CreateWebhookParams as V, DEFAULT_API_BASE_URL as W, type DailyRampLimitErrorDetails as X, type DeleteTenantResult as Y, type DeliverabilityBucket as Z, type DeliverabilityDomainInsight as _, type ApiErrorCode as a, type MailStream as a$, type DeliverabilityMailServerRelay as a0, type DeliverabilityWindow as a1, type DmarcDailyPoint as a2, type DmarcMonitoring as a3, type DmarcMonitoringDisabled as a4, type DmarcReadiness as a5, type DmarcReadinessVerdict as a6, type DmarcSource as a7, type DmarcSourceStatus as a8, type DmarcStatus as a9, type HeldBackReason as aA, type HeldBackRecipient as aB, type InReplyToEmail as aC, type ListApiKeysParams as aD, type ListApiKeysResult as aE, type ListAutomationRunsParams as aF, type ListAutomationRunsResult as aG, type ListAutomationsResult as aH, type ListCategoryOptOutsParams as aI, type ListCategoryOptOutsResult as aJ, type ListDomainsParams as aK, type ListDomainsResult as aL, type ListEmailsParams as aM, type ListEmailsResult as aN, type ListReceivedEmailsParams as aO, type ListReceivedEmailsResult as aP, type ListSendersResult as aQ, type ListSuppressionsParams as aR, type ListSuppressionsResult as aS, type ListTemplatesParams as aT, type ListTemplatesResult as aU, type ListTenantDomainsResult as aV, type ListTenantsParams as aW, type ListTenantsResult as aX, type ListTestInboxEmailsParams as aY, type ListTestInboxEmailsResult as aZ, type MailServerSigningStatus as a_, type DnsProviderName as aa, type Domain as ab, type DomainBimiAnalysis as ac, type DomainBlocklistListing as ad, type DomainBlocklistStatus as ae, type DomainBlocklists as af, type DomainDetailResult as ag, type DomainDmarcAnalysis as ah, type DomainDnsAnalysis as ai, type DomainStatus as aj, type DomainTlsMode as ak, type DomainTrackingDns as al, type DomainTrackingStatus as am, type EmailDelivery as an, type EmailListItem as ao, type EmailWebhookEventPayload as ap, type EmailWebhookEventType as aq, type EnableDmarcParams as ar, type EnableDmarcResult as as, type EnrollmentSkip as at, type EventRecord as au, type GroundmailAccessToken as av, type GroundmailOptions as aw, type GroundmailTokenOptions as ax, type GroundmailTokenProvider as ay, type HeldBackErrorDetails as az, type ApiKey as b, type WaitForTestEmailParams as b$, type Migration as b0, type MigrationDnsChange as b1, type MigrationDnsPlan as b2, type MigrationDomainItem as b3, type MigrationItemStatus as b4, type MigrationProvider as b5, type MigrationResource as b6, type MigrationSummary as b7, type MigrationTemplateItem as b8, type MigrationTotals as b9, type TenantStatus as bA, type TenantStreamPolicy as bB, type TestEmailWebhookParams as bC, type TestEmailWebhookResult as bD, type TestInbox as bE, type TestInboxAddressOptions as bF, type TestInboxEmail as bG, type TestInboxEmailDetail as bH, type TestInboxHeader as bI, TestInboxResource as bJ, type TestInboxUsage as bK, type TriggerEventParams as bL, type TriggerEventResult as bM, type TwilioIntegrationResponse as bN, type TwilioIntegrationStatus as bO, type UpdateAutomationParams as bP, type UpdateBrandParams as bQ, type UpdateDomainParams as bR, type UpdateEmailParams as bS, type UpdateSenderParams as bT, type UpdateTemplateParams as bU, type UpdateTenantParams as bV, type UpdateWebhookParams as bW, type ValidateEmailResult as bX, type ValidationReason as bY, type ValidationVerdict as bZ, type VerifyDomainResult as b_, type MigrationWebhookItem as ba, type ReceivedEmail as bb, type ReceivedEmailAttachment as bc, type ReceivedEmailAttachmentMeta as bd, type RemoteApplyDnsCredentials as be, type RemoveCategoryOptOutOptions as bf, type RunMigrationOptions as bg, type SendEmailParams as bh, type Sender as bi, type SesMigrationParams as bj, type StreamDeliverability as bk, type SuppressedErrorDetails as bl, type Suppression as bm, TEST_INBOX_WAIT_DEFAULT_MS as bn, TEST_INBOX_WAIT_MAX_SECONDS as bo, type Template as bp, type TemplateFormat as bq, type TemplateLintWarning as br, type TemplateStarter as bs, type TemplateStatus as bt, type TemplateVersion as bu, type Tenant as bv, type TenantPauseSource as bw, type TenantRamp as bx, type TenantStats as by, type TenantStatsResult as bz, type ApiKeyMigrationParams as c, type WebhookEmailTag as c0, type WebhookEndpoint as c1, type WebhookEndpointWithSecret as c2, type WebhookEventType as c3, mergeMigrations as c4, normalizeAccessToken as c5, 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 AutomationInlineEmail as l, type AutomationResult as m, type AutomationRun as n, type AutomationRunResponse as o, type AutomationRunStatus as p, type AutomationRunStep as q, type AutomationRunStepStatus as r, type AutomationSendEmailStep as s, type AutomationStatus as t, type AutomationStep as u, type AutomationTemplateEmail as v, type AutomationTrigger as w, type BounceType as x, type Brand as y, type BrandLogo as z };
2436
+ export { type DeliverabilityBucket as $, type ApiErrorBody as A, type Batch as B, type BrandLogo as C, type DnsRecord as D, type BrandSettings as E, type CancelBatchResult as F, Groundmail as G, type CategoryOptOut as H, type CategoryOptOutCategory as I, type CategoryUnsubscribedErrorDetails as J, type ConnectTwilioParams as K, type ContactWebhookEventPayload as L, type CreateApiKeyParams as M, type CreateApiKeyResult as N, type CreateAutomationParams as O, type CreateDomainParams as P, type CreateDomainResult as Q, type CreateMigrationParams as R, type SendEmailResult as S, type CreateSenderParams as T, type CreateSuppressionParams as U, type CreateTemplateParams as V, type CreateTenantParams as W, type CreateWebhookParams as X, DEFAULT_API_BASE_URL as Y, type DailyRampLimitErrorDetails as Z, type DeleteTenantResult as _, type ApiErrorCode as a, type ListTestInboxEmailsResult as a$, type DeliverabilityDomainInsight as a0, type DeliverabilityInsightsResult as a1, type DeliverabilityMailServerRelay as a2, type DeliverabilityWindow as a3, type DmarcDailyPoint as a4, type DmarcMonitoring as a5, type DmarcMonitoringDisabled as a6, type DmarcReadiness as a7, type DmarcReadinessVerdict as a8, type DmarcSource as a9, type GroundmailTokenProvider as aA, type HeldBackErrorDetails as aB, type HeldBackReason as aC, type HeldBackRecipient as aD, type InReplyToEmail as aE, type ListApiKeysParams as aF, type ListApiKeysResult as aG, type ListAutomationRunsParams as aH, type ListAutomationRunsResult as aI, type ListAutomationsResult as aJ, type ListCategoryOptOutsParams as aK, type ListCategoryOptOutsResult as aL, type ListDomainsParams as aM, type ListDomainsResult as aN, type ListEmailsParams as aO, type ListEmailsResult as aP, type ListReceivedEmailsParams as aQ, type ListReceivedEmailsResult as aR, type ListSendersResult as aS, type ListSuppressionsParams as aT, type ListSuppressionsResult as aU, type ListTemplatesParams as aV, type ListTemplatesResult as aW, type ListTenantDomainsResult as aX, type ListTenantsParams as aY, type ListTenantsResult as aZ, type ListTestInboxEmailsParams as a_, type DmarcSourceStatus as aa, type DmarcStatus as ab, type DnsProviderName as ac, type Domain as ad, type DomainBimiAnalysis as ae, type DomainBlocklistListing as af, type DomainBlocklistStatus as ag, type DomainBlocklists as ah, type DomainDetailResult as ai, type DomainDmarcAnalysis as aj, type DomainDnsAnalysis as ak, type DomainStatus as al, type DomainTlsMode as am, type DomainTrackingDns as an, type DomainTrackingStatus as ao, type EmailDelivery as ap, type EmailListItem as aq, type EmailWebhookEventPayload as ar, type EmailWebhookEventType as as, type EnableDmarcParams as at, type EnableDmarcResult as au, type EnrollmentSkip as av, type EventRecord as aw, type GroundmailAccessToken as ax, type GroundmailOptions as ay, type GroundmailTokenOptions as az, type ApiKey as b, type ValidateEmailResult as b$, type ListWebhookDeliveriesParams as b0, type ListWebhookDeliveriesResult as b1, type MailServerSigningStatus as b2, type MailStream as b3, type Migration as b4, type MigrationDnsChange as b5, type MigrationDnsPlan as b6, type MigrationDomainItem as b7, type MigrationItemStatus as b8, type MigrationProvider as b9, type TenantPauseSource as bA, type TenantRamp as bB, type TenantStats as bC, type TenantStatsResult as bD, type TenantStatus as bE, type TenantStreamPolicy as bF, type TestEmailWebhookParams as bG, type TestEmailWebhookResult as bH, type TestInbox as bI, type TestInboxAddressOptions as bJ, type TestInboxEmail as bK, type TestInboxEmailDetail as bL, type TestInboxHeader as bM, TestInboxResource as bN, type TestInboxUsage as bO, type TriggerEventParams as bP, type TriggerEventResult as bQ, type TwilioIntegrationResponse as bR, type TwilioIntegrationStatus as bS, type UpdateAutomationParams as bT, type UpdateBrandParams as bU, type UpdateDomainParams as bV, type UpdateEmailParams as bW, type UpdateSenderParams as bX, type UpdateTemplateParams as bY, type UpdateTenantParams as bZ, type UpdateWebhookParams as b_, type MigrationResource as ba, type MigrationSummary as bb, type MigrationTemplateItem as bc, type MigrationTotals as bd, type MigrationWebhookItem as be, type ReceivedEmail as bf, type ReceivedEmailAttachment as bg, type ReceivedEmailAttachmentMeta as bh, type RemoteApplyDnsCredentials as bi, type RemoveCategoryOptOutOptions as bj, type RunMigrationOptions as bk, type SendEmailParams as bl, type Sender as bm, type SesMigrationParams as bn, type StreamDeliverability as bo, type SuppressedErrorDetails as bp, type Suppression as bq, TEST_INBOX_WAIT_DEFAULT_MS as br, TEST_INBOX_WAIT_MAX_SECONDS as bs, type Template as bt, type TemplateFormat as bu, type TemplateLintWarning as bv, type TemplateStarter as bw, type TemplateStatus as bx, type TemplateVersion as by, type Tenant as bz, type ApiKeyMigrationParams as c, type ValidationReason as c0, type ValidationVerdict as c1, type VerifyDomainResult as c2, type WaitForTestEmailParams as c3, type WebhookDelivery as c4, type WebhookDeliveryAttempt as c5, type WebhookDeliveryDetail as c6, type WebhookDeliveryStatus as c7, type WebhookEmailTag as c8, type WebhookEndpoint as c9, type WebhookEndpointHealth as ca, type WebhookEndpointWithSecret as cb, type WebhookEventType as cc, mergeMigrations as cd, normalizeAccessToken as ce, 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 AutomationInlineEmail as l, type AutomationResult as m, type AutomationRun as n, type AutomationRunResponse as o, type AutomationRunStatus as p, type AutomationRunStep as q, type AutomationRunStepStatus as r, type AutomationSendEmailStep as s, type AutomationStatus as t, type AutomationStep as u, type AutomationTemplateEmail as v, type AutomationTrigger as w, type BatchSendEmailResult as x, type BounceType as y, type Brand as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiErrorBody, D as DnsRecord } from './client-BZWkihNZ.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 AutomationInlineEmail, m as AutomationResult, n as AutomationRun, o as AutomationRunResponse, p as AutomationRunStatus, q as AutomationRunStep, r as AutomationRunStepStatus, s as AutomationSendEmailStep, t as AutomationStatus, u as AutomationStep, v as AutomationTemplateEmail, w as AutomationTrigger, B as BatchSendEmailResult, x as BounceType, y as Brand, z as BrandLogo, C as BrandSettings, E as CategoryOptOut, F as CategoryOptOutCategory, H as CategoryUnsubscribedErrorDetails, I as ConnectTwilioParams, J as ContactWebhookEventPayload, K as CreateApiKeyParams, L as CreateApiKeyResult, M as CreateAutomationParams, N as CreateDomainParams, O as CreateDomainResult, P as CreateMigrationParams, Q as CreateSenderParams, R as CreateSuppressionParams, T as CreateTemplateParams, U as CreateTenantParams, V as CreateWebhookParams, W as DEFAULT_API_BASE_URL, X as DailyRampLimitErrorDetails, Y as DeleteTenantResult, Z as DeliverabilityBucket, _ as DeliverabilityDomainInsight, $ as DeliverabilityInsightsResult, a0 as DeliverabilityMailServerRelay, a1 as DeliverabilityWindow, a2 as DmarcDailyPoint, a3 as DmarcMonitoring, a4 as DmarcMonitoringDisabled, a5 as DmarcReadiness, a6 as DmarcReadinessVerdict, a7 as DmarcSource, a8 as DmarcSourceStatus, a9 as DmarcStatus, aa as DnsProviderName, ab as Domain, ac as DomainBimiAnalysis, ad as DomainBlocklistListing, ae as DomainBlocklistStatus, af as DomainBlocklists, ag as DomainDetailResult, ah as DomainDmarcAnalysis, ai as DomainDnsAnalysis, aj as DomainStatus, ak as DomainTlsMode, al as DomainTrackingDns, am as DomainTrackingStatus, an as EmailDelivery, ao as EmailListItem, ap as EmailWebhookEventPayload, aq as EmailWebhookEventType, ar as EnableDmarcParams, as as EnableDmarcResult, at as EnrollmentSkip, au as EventRecord, G as Groundmail, av as GroundmailAccessToken, aw as GroundmailOptions, ax as GroundmailTokenOptions, ay as GroundmailTokenProvider, az as HeldBackErrorDetails, aA as HeldBackReason, aB as HeldBackRecipient, aC as InReplyToEmail, aD as ListApiKeysParams, aE as ListApiKeysResult, aF as ListAutomationRunsParams, aG as ListAutomationRunsResult, aH as ListAutomationsResult, aI as ListCategoryOptOutsParams, aJ as ListCategoryOptOutsResult, aK as ListDomainsParams, aL as ListDomainsResult, aM as ListEmailsParams, aN as ListEmailsResult, aO as ListReceivedEmailsParams, aP as ListReceivedEmailsResult, aQ as ListSendersResult, aR as ListSuppressionsParams, aS as ListSuppressionsResult, aT as ListTemplatesParams, aU as ListTemplatesResult, aV as ListTenantDomainsResult, aW as ListTenantsParams, aX as ListTenantsResult, aY as ListTestInboxEmailsParams, aZ as ListTestInboxEmailsResult, a_ as MailServerSigningStatus, a$ as MailStream, b0 as Migration, b1 as MigrationDnsChange, b2 as MigrationDnsPlan, b3 as MigrationDomainItem, b4 as MigrationItemStatus, b5 as MigrationProvider, b6 as MigrationResource, b7 as MigrationSummary, b8 as MigrationTemplateItem, b9 as MigrationTotals, ba as MigrationWebhookItem, bb as ReceivedEmail, bc as ReceivedEmailAttachment, bd as ReceivedEmailAttachmentMeta, be as RemoteApplyDnsCredentials, bf as RemoveCategoryOptOutOptions, bg as RunMigrationOptions, bh as SendEmailParams, S as SendEmailResult, bi as Sender, bj as SesMigrationParams, bk as StreamDeliverability, bl as SuppressedErrorDetails, bm as Suppression, bn as TEST_INBOX_WAIT_DEFAULT_MS, bo as TEST_INBOX_WAIT_MAX_SECONDS, bp as Template, bq as TemplateFormat, br as TemplateLintWarning, bs as TemplateStarter, bt as TemplateStatus, bu as TemplateVersion, bv as Tenant, bw as TenantPauseSource, bx as TenantRamp, by as TenantStats, bz as TenantStatsResult, bA as TenantStatus, bB as TenantStreamPolicy, bC as TestEmailWebhookParams, bD as TestEmailWebhookResult, bE as TestInbox, bF as TestInboxAddressOptions, bG as TestInboxEmail, bH as TestInboxEmailDetail, bI as TestInboxHeader, bJ as TestInboxResource, bK as TestInboxUsage, bL as TriggerEventParams, bM as TriggerEventResult, bN as TwilioIntegrationResponse, bO as TwilioIntegrationStatus, bP as UpdateAutomationParams, bQ as UpdateBrandParams, bR as UpdateDomainParams, bS as UpdateEmailParams, bT as UpdateSenderParams, bU as UpdateTemplateParams, bV as UpdateTenantParams, bW as UpdateWebhookParams, bX as ValidateEmailResult, bY as ValidationReason, bZ as ValidationVerdict, b_ as VerifyDomainResult, b$ as WaitForTestEmailParams, c0 as WebhookEmailTag, c1 as WebhookEndpoint, c2 as WebhookEndpointWithSecret, c3 as WebhookEventType, c4 as mergeMigrations, c5 as normalizeAccessToken } from './client-BZWkihNZ.js';
1
+ import { A as ApiErrorBody, D as DnsRecord } from './client-CdiEV1Qt.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 AutomationInlineEmail, m as AutomationResult, n as AutomationRun, o as AutomationRunResponse, p as AutomationRunStatus, q as AutomationRunStep, r as AutomationRunStepStatus, s as AutomationSendEmailStep, t as AutomationStatus, u as AutomationStep, v as AutomationTemplateEmail, w as AutomationTrigger, B as Batch, x as BatchSendEmailResult, y as BounceType, z as Brand, C as BrandLogo, E as BrandSettings, F as CancelBatchResult, H as CategoryOptOut, I as CategoryOptOutCategory, J as CategoryUnsubscribedErrorDetails, K as ConnectTwilioParams, L as ContactWebhookEventPayload, M as CreateApiKeyParams, N as CreateApiKeyResult, O as CreateAutomationParams, P as CreateDomainParams, Q as CreateDomainResult, R as CreateMigrationParams, T as CreateSenderParams, U as CreateSuppressionParams, V as CreateTemplateParams, W as CreateTenantParams, X as CreateWebhookParams, Y as DEFAULT_API_BASE_URL, Z as DailyRampLimitErrorDetails, _ as DeleteTenantResult, $ as DeliverabilityBucket, a0 as DeliverabilityDomainInsight, a1 as DeliverabilityInsightsResult, a2 as DeliverabilityMailServerRelay, a3 as DeliverabilityWindow, a4 as DmarcDailyPoint, a5 as DmarcMonitoring, a6 as DmarcMonitoringDisabled, a7 as DmarcReadiness, a8 as DmarcReadinessVerdict, a9 as DmarcSource, aa as DmarcSourceStatus, ab as DmarcStatus, ac as DnsProviderName, ad as Domain, ae as DomainBimiAnalysis, af as DomainBlocklistListing, ag as DomainBlocklistStatus, ah as DomainBlocklists, ai as DomainDetailResult, aj as DomainDmarcAnalysis, ak as DomainDnsAnalysis, al as DomainStatus, am as DomainTlsMode, an as DomainTrackingDns, ao as DomainTrackingStatus, ap as EmailDelivery, aq as EmailListItem, ar as EmailWebhookEventPayload, as as EmailWebhookEventType, at as EnableDmarcParams, au as EnableDmarcResult, av as EnrollmentSkip, aw as EventRecord, G as Groundmail, ax as GroundmailAccessToken, ay as GroundmailOptions, az as GroundmailTokenOptions, aA as GroundmailTokenProvider, aB as HeldBackErrorDetails, aC as HeldBackReason, aD as HeldBackRecipient, aE as InReplyToEmail, aF as ListApiKeysParams, aG as ListApiKeysResult, aH as ListAutomationRunsParams, aI as ListAutomationRunsResult, aJ as ListAutomationsResult, aK as ListCategoryOptOutsParams, aL as ListCategoryOptOutsResult, aM as ListDomainsParams, aN as ListDomainsResult, aO as ListEmailsParams, aP as ListEmailsResult, aQ as ListReceivedEmailsParams, aR as ListReceivedEmailsResult, aS as ListSendersResult, aT as ListSuppressionsParams, aU as ListSuppressionsResult, aV as ListTemplatesParams, aW as ListTemplatesResult, aX as ListTenantDomainsResult, aY as ListTenantsParams, aZ as ListTenantsResult, a_ as ListTestInboxEmailsParams, a$ as ListTestInboxEmailsResult, b0 as ListWebhookDeliveriesParams, b1 as ListWebhookDeliveriesResult, b2 as MailServerSigningStatus, b3 as MailStream, b4 as Migration, b5 as MigrationDnsChange, b6 as MigrationDnsPlan, b7 as MigrationDomainItem, b8 as MigrationItemStatus, b9 as MigrationProvider, ba as MigrationResource, bb as MigrationSummary, bc as MigrationTemplateItem, bd as MigrationTotals, be as MigrationWebhookItem, bf as ReceivedEmail, bg as ReceivedEmailAttachment, bh as ReceivedEmailAttachmentMeta, bi as RemoteApplyDnsCredentials, bj as RemoveCategoryOptOutOptions, bk as RunMigrationOptions, bl as SendEmailParams, S as SendEmailResult, bm as Sender, bn as SesMigrationParams, bo as StreamDeliverability, bp as SuppressedErrorDetails, bq as Suppression, br as TEST_INBOX_WAIT_DEFAULT_MS, bs as TEST_INBOX_WAIT_MAX_SECONDS, bt as Template, bu as TemplateFormat, bv as TemplateLintWarning, bw as TemplateStarter, bx as TemplateStatus, by as TemplateVersion, bz as Tenant, bA as TenantPauseSource, bB as TenantRamp, bC as TenantStats, bD as TenantStatsResult, bE as TenantStatus, bF as TenantStreamPolicy, bG as TestEmailWebhookParams, bH as TestEmailWebhookResult, bI as TestInbox, bJ as TestInboxAddressOptions, bK as TestInboxEmail, bL as TestInboxEmailDetail, bM as TestInboxHeader, bN as TestInboxResource, bO as TestInboxUsage, bP as TriggerEventParams, bQ as TriggerEventResult, bR as TwilioIntegrationResponse, bS as TwilioIntegrationStatus, bT as UpdateAutomationParams, bU as UpdateBrandParams, bV as UpdateDomainParams, bW as UpdateEmailParams, bX as UpdateSenderParams, bY as UpdateTemplateParams, bZ as UpdateTenantParams, b_ as UpdateWebhookParams, b$ as ValidateEmailResult, c0 as ValidationReason, c1 as ValidationVerdict, c2 as VerifyDomainResult, c3 as WaitForTestEmailParams, c4 as WebhookDelivery, c5 as WebhookDeliveryAttempt, c6 as WebhookDeliveryDetail, c7 as WebhookDeliveryStatus, c8 as WebhookEmailTag, c9 as WebhookEndpoint, ca as WebhookEndpointHealth, cb as WebhookEndpointWithSecret, cc as WebhookEventType, cd as mergeMigrations, ce as normalizeAccessToken } from './client-CdiEV1Qt.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-HMOQDJOX.js";
15
+ } from "./chunk-V4ZZRJ3Q.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-BZWkihNZ.js';
1
+ import { G as Groundmail } from './client-CdiEV1Qt.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-HMOQDJOX.js";
4
+ } from "./chunk-V4ZZRJ3Q.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.37.0",
3
+ "version": "0.39.0",
4
4
  "description": "Groundmail transactional email API client",
5
5
  "license": "MIT",
6
6
  "type": "module",