groundmail 0.39.0 → 0.40.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/dist/authjs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail } from './client-CdiEV1Qt.js';
1
+ import { G as Groundmail } from './client-CtzyzXO3.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-V4ZZRJ3Q.js";
4
+ } from "./chunk-H53CAVEH.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-CdiEV1Qt.js';
1
+ import { S as SendEmailResult, G as Groundmail } from './client-CtzyzXO3.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-V4ZZRJ3Q.js";
4
+ } from "./chunk-H53CAVEH.js";
5
5
 
6
6
  // src/better-auth.ts
7
7
  function linkHtml(label, url) {
@@ -1702,6 +1702,7 @@ var EmailsResource = class {
1702
1702
  payload.scheduled_at = scheduledAt instanceof Date ? scheduledAt.toISOString() : scheduledAt;
1703
1703
  }
1704
1704
  if (params.unsubscribe !== void 0) payload.unsubscribe = params.unsubscribe;
1705
+ if (params.validation !== void 0) payload.validation = params.validation;
1705
1706
  if (params.category !== void 0) payload.category = params.category;
1706
1707
  if (params.tenant !== void 0) payload.tenant = params.tenant;
1707
1708
  return payload;
package/dist/clerk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail, S as SendEmailResult } from './client-CdiEV1Qt.js';
1
+ import { G as Groundmail, S as SendEmailResult } from './client-CtzyzXO3.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-V4ZZRJ3Q.js";
4
+ } from "./chunk-H53CAVEH.js";
5
5
 
6
6
  // src/clerk.ts
7
7
  function resolveApiKey(options) {
@@ -76,6 +76,14 @@ type SendEmailParams = {
76
76
  * `newsletter_not_enabled`.
77
77
  */
78
78
  category?: 'transactional' | 'product' | 'newsletter';
79
+ /**
80
+ * Opt-in checks for this send. `block_bot_signups` holds back addresses that look
81
+ * like bots filled them into a form (reason `likely_bot_signup`). It's a pattern
82
+ * check and it can be wrong: use it for sign-up emails, not password resets.
83
+ */
84
+ validation?: {
85
+ block_bot_signups?: boolean;
86
+ };
79
87
  /**
80
88
  * Send as one of your tenants (its external id or Groundmail id). The send uses that
81
89
  * tenant's domains, suppression list, pause switch and daily limit. Omit to send from
@@ -90,8 +98,10 @@ type SendEmailParams = {
90
98
  * - `previously_bounced`: the address hard-bounced (mailbox does not exist) for a Groundmail
91
99
  * sender in the last 90 days.
92
100
  * - `mailbox_not_found`: Groundmail validation already knows the mailbox does not exist.
101
+ * - `likely_bot_signup`: the address looks like a bot filled it into a form. Only when the
102
+ * send sets `validation: { block_bot_signups: true }`.
93
103
  */
94
- type HeldBackReason = 'invalid_address' | 'no_mail_server' | 'previously_bounced' | 'mailbox_not_found';
104
+ type HeldBackReason = 'invalid_address' | 'no_mail_server' | 'previously_bounced' | 'mailbox_not_found' | 'likely_bot_signup';
95
105
  type HeldBackRecipient = {
96
106
  email: string;
97
107
  reason: HeldBackReason | (string & {});
@@ -112,10 +122,10 @@ type HeldBackErrorDetails = {
112
122
  type ValidationVerdict = 'valid' | 'risky' | 'invalid';
113
123
  /**
114
124
  * - invalid: `syntax`, `no_mail_server`, `mailbox_not_found`, `previously_bounced`
115
- * - risky: `disposable`, `catch_all`, `possible_typo`
125
+ * - risky: `disposable`, `catch_all`, `possible_typo`, `likely_bot_signup`
116
126
  * - informational (does not change the verdict): `role`
117
127
  */
118
- type ValidationReason = 'syntax' | 'no_mail_server' | 'mailbox_not_found' | 'previously_bounced' | 'disposable' | 'catch_all' | 'possible_typo' | 'role';
128
+ type ValidationReason = 'syntax' | 'no_mail_server' | 'mailbox_not_found' | 'previously_bounced' | 'disposable' | 'catch_all' | 'possible_typo' | 'likely_bot_signup' | 'role';
119
129
  /** `POST /validate` result. */
120
130
  type ValidateEmailResult = {
121
131
  /** The address as checked: trimmed and lowercased. */
@@ -844,8 +854,8 @@ type WebhookDelivery = {
844
854
  test: boolean;
845
855
  /** The latest attempt's HTTP status; null when nothing answered. */
846
856
  response_status: number | null;
847
- /** Why there was no response: `timeout` or `connection`. */
848
- error_kind: 'timeout' | 'connection' | null;
857
+ /** Why there was no response: `timeout`, `connection`, or `blocked_destination` (a private or internal URL, so no request was made). */
858
+ error_kind: 'timeout' | 'connection' | 'blocked_destination' | null;
849
859
  latency_ms: number | null;
850
860
  last_attempt_at: string | null;
851
861
  next_attempt_at: string | null;
@@ -858,7 +868,7 @@ type WebhookDeliveryAttempt = {
858
868
  attempt: number;
859
869
  started_at: string;
860
870
  response_status: number | null;
861
- error_kind: 'timeout' | 'connection' | null;
871
+ error_kind: 'timeout' | 'connection' | 'blocked_destination' | null;
862
872
  latency_ms: number | null;
863
873
  /** The first 2 KB of what your server replied. */
864
874
  response_body: string | null;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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';
1
+ import { A as ApiErrorBody, D as DnsRecord } from './client-CtzyzXO3.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-CtzyzXO3.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-V4ZZRJ3Q.js";
15
+ } from "./chunk-H53CAVEH.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-CdiEV1Qt.js';
1
+ import { G as Groundmail } from './client-CtzyzXO3.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-V4ZZRJ3Q.js";
4
+ } from "./chunk-H53CAVEH.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.39.0",
3
+ "version": "0.40.0",
4
4
  "description": "Groundmail transactional email API client",
5
5
  "license": "MIT",
6
6
  "type": "module",