groundmail 0.41.0 → 0.43.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-B_H1iNa7.js';
1
+ import { G as Groundmail } from './client-BF4NQhim.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-65NWGUZM.js";
4
+ } from "./chunk-Y573OVJI.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-B_H1iNa7.js';
1
+ import { S as SendEmailResult, G as Groundmail } from './client-BF4NQhim.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-65NWGUZM.js";
4
+ } from "./chunk-Y573OVJI.js";
5
5
 
6
6
  // src/better-auth.ts
7
7
  function linkHtml(label, url) {
@@ -1450,6 +1450,7 @@ var AutomationsResource = class {
1450
1450
  async listRuns(params = {}) {
1451
1451
  const search = new URLSearchParams();
1452
1452
  if (params.automation_id) search.set("automation_id", params.automation_id);
1453
+ if (params.test != null) search.set("test", String(params.test));
1453
1454
  const query = search.toString();
1454
1455
  return this.client.request(`/automations/runs${query ? `?${query}` : ""}`, { method: "GET" });
1455
1456
  }
@@ -1859,6 +1860,7 @@ var SmtpCredentialsResource = class {
1859
1860
  const search = new URLSearchParams();
1860
1861
  if (params.limit != null) search.set("limit", String(params.limit));
1861
1862
  if (params.cursor) search.set("cursor", params.cursor);
1863
+ if (params.test != null) search.set("test", String(params.test));
1862
1864
  const query = search.toString();
1863
1865
  return this.client.request(
1864
1866
  `/smtp-credentials${query ? `?${query}` : ""}`,
@@ -1869,7 +1871,8 @@ var SmtpCredentialsResource = class {
1869
1871
  return this.client.request("/smtp-credentials", {
1870
1872
  method: "POST",
1871
1873
  body: JSON.stringify({
1872
- ...params.name ? { name: params.name } : {}
1874
+ ...params.name ? { name: params.name } : {},
1875
+ ...params.test ? { test: true } : {}
1873
1876
  })
1874
1877
  });
1875
1878
  }
package/dist/clerk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail, S as SendEmailResult } from './client-B_H1iNa7.js';
1
+ import { G as Groundmail, S as SendEmailResult } from './client-BF4NQhim.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-65NWGUZM.js";
4
+ } from "./chunk-Y573OVJI.js";
5
5
 
6
6
  // src/clerk.ts
7
7
  function resolveApiKey(options) {
@@ -473,6 +473,8 @@ type SmtpCredential = {
473
473
  id: string;
474
474
  name: string;
475
475
  password_prefix: string;
476
+ /** A test credential (`gmsmtp_test_…`): mail sent with it is simulated and never delivered. */
477
+ test: boolean;
476
478
  username: string;
477
479
  host: string;
478
480
  port: number;
@@ -483,6 +485,8 @@ type SmtpCredential = {
483
485
  type ListSmtpCredentialsParams = {
484
486
  limit?: number;
485
487
  cursor?: string;
488
+ /** `true` for test credentials only, `false` for live ones only. */
489
+ test?: boolean;
486
490
  };
487
491
  type ListSmtpCredentialsResult = {
488
492
  data: SmtpCredential[];
@@ -491,6 +495,8 @@ type ListSmtpCredentialsResult = {
491
495
  };
492
496
  type CreateSmtpCredentialParams = {
493
497
  name?: string;
498
+ /** Create a test credential: mail sent with it is simulated and never delivered. */
499
+ test?: boolean;
494
500
  };
495
501
  type CreateSmtpCredentialResult = SmtpCredential & {
496
502
  password: string;
@@ -808,6 +814,8 @@ type AutomationRunResponse = {
808
814
  };
809
815
  type ListAutomationRunsParams = {
810
816
  automation_id?: string;
817
+ /** `true` for runs started with a test key only, `false` for live runs only. */
818
+ test?: boolean;
811
819
  };
812
820
  type ListAutomationRunsResult = {
813
821
  runs: AutomationRun[];
@@ -1905,6 +1913,10 @@ type BurrowGuardVerifyResult = {
1905
1913
  reason: BurrowGuardReason | null;
1906
1914
  /** Set when nothing was checked: over the monthly limit, rate limited, or we couldn't be reached. */
1907
1915
  limited?: true;
1916
+ /** The site is on watch only: `success` is always true, whatever the checks said. */
1917
+ watch_only?: true;
1918
+ /** On watch only, the `reason` this would have had. Left out when every check passed. */
1919
+ would_block_reason?: BurrowGuardReason;
1908
1920
  };
1909
1921
  type BurrowGuardSite = {
1910
1922
  id: string;
@@ -1916,6 +1928,8 @@ type BurrowGuardSite = {
1916
1928
  allow_data_center_ips: boolean;
1917
1929
  /** No script or token: verify takes the email and runs the address checks only. */
1918
1930
  email_checks_only: boolean;
1931
+ /** Every check runs and is recorded, and verify always answers `success: true`. */
1932
+ watch_only: boolean;
1919
1933
  last_check_at: string | null;
1920
1934
  created_at: string;
1921
1935
  };
@@ -1933,6 +1947,8 @@ type CreateBurrowGuardSiteParams = {
1933
1947
  allow_data_center_ips?: boolean;
1934
1948
  /** Already using a captcha? No script or box: one server call checks the address. */
1935
1949
  email_checks_only?: boolean;
1950
+ /** Run every check and show what would be blocked, without blocking anyone. */
1951
+ watch_only?: boolean;
1936
1952
  };
1937
1953
  type UpdateBurrowGuardSiteParams = Partial<CreateBurrowGuardSiteParams>;
1938
1954
  type BurrowGuardCheck = {
@@ -1946,11 +1962,14 @@ type BurrowGuardCheck = {
1946
1962
  reason_label: string | null;
1947
1963
  ip: string | null;
1948
1964
  user_agent: string | null;
1965
+ /** The site was on watch only: `result` is what would have happened, and nobody was turned away. */
1966
+ watch_only: boolean;
1949
1967
  };
1950
1968
  type ListBurrowGuardChecksParams = {
1951
1969
  /** A site's id. */
1952
1970
  site?: string;
1953
- result?: 'passed' | 'blocked' | 'no_token';
1971
+ /** `blocked` is real blocks only. `would_block` is the same on a watch-only site. */
1972
+ result?: 'passed' | 'blocked' | 'would_block' | 'no_token';
1954
1973
  range?: '24h' | '7d' | '30d';
1955
1974
  limit?: number;
1956
1975
  cursor?: string;
@@ -1963,6 +1982,7 @@ type ListBurrowGuardChecksResult = {
1963
1982
  checked: number;
1964
1983
  passed: number;
1965
1984
  blocked: number;
1985
+ would_block: number;
1966
1986
  no_token: number;
1967
1987
  top_reason: BurrowGuardReason | null;
1968
1988
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiErrorBody, D as DnsRecord } from './client-B_H1iNa7.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 BurrowGuardCheck, H as BurrowGuardReason, I as BurrowGuardResource, J as BurrowGuardSite, K as BurrowGuardSiteWithSecret, L as BurrowGuardVerifyParams, M as BurrowGuardVerifyResult, N as CancelBatchResult, O as CategoryOptOut, P as CategoryOptOutCategory, Q as CategoryUnsubscribedErrorDetails, R as ConnectTwilioParams, T as ContactWebhookEventPayload, U as CreateApiKeyParams, V as CreateApiKeyResult, W as CreateAutomationParams, X as CreateBurrowGuardSiteParams, Y as CreateDomainParams, Z as CreateDomainResult, _ as CreateMigrationParams, $ as CreateSenderParams, a0 as CreateSuppressionParams, a1 as CreateTemplateParams, a2 as CreateTenantParams, a3 as CreateWebhookParams, a4 as DEFAULT_API_BASE_URL, a5 as DailyRampLimitErrorDetails, a6 as DeleteTenantResult, a7 as DeliverabilityBucket, a8 as DeliverabilityDomainInsight, a9 as DeliverabilityInsightsResult, aa as DeliverabilityMailServerRelay, ab as DeliverabilityWindow, ac as DmarcDailyPoint, ad as DmarcMonitoring, ae as DmarcMonitoringDisabled, af as DmarcReadiness, ag as DmarcReadinessVerdict, ah as DmarcSource, ai as DmarcSourceStatus, aj as DmarcStatus, ak as DnsProviderName, al as Domain, am as DomainBimiAnalysis, an as DomainBlocklistListing, ao as DomainBlocklistStatus, ap as DomainBlocklists, aq as DomainDetailResult, ar as DomainDmarcAnalysis, as as DomainDnsAnalysis, at as DomainStatus, au as DomainTlsMode, av as DomainTrackingDns, aw as DomainTrackingStatus, ax as EmailDelivery, ay as EmailListItem, az as EmailWebhookEventPayload, aA as EmailWebhookEventType, aB as EnableDmarcParams, aC as EnableDmarcResult, aD as EnrollmentSkip, aE as EventRecord, G as Groundmail, aF as GroundmailAccessToken, aG as GroundmailOptions, aH as GroundmailTokenOptions, aI as GroundmailTokenProvider, aJ as HeldBackErrorDetails, aK as HeldBackReason, aL as HeldBackRecipient, aM as InReplyToEmail, aN as ListApiKeysParams, aO as ListApiKeysResult, aP as ListAutomationRunsParams, aQ as ListAutomationRunsResult, aR as ListAutomationsResult, aS as ListBurrowGuardChecksParams, aT as ListBurrowGuardChecksResult, aU as ListCategoryOptOutsParams, aV as ListCategoryOptOutsResult, aW as ListDomainsParams, aX as ListDomainsResult, aY as ListEmailsParams, aZ as ListEmailsResult, a_ as ListReceivedEmailsParams, a$ as ListReceivedEmailsResult, b0 as ListSendersResult, b1 as ListSuppressionsParams, b2 as ListSuppressionsResult, b3 as ListTemplatesParams, b4 as ListTemplatesResult, b5 as ListTenantDomainsResult, b6 as ListTenantsParams, b7 as ListTenantsResult, b8 as ListTestInboxEmailsParams, b9 as ListTestInboxEmailsResult, ba as ListWebhookDeliveriesParams, bb as ListWebhookDeliveriesResult, bc as MailServerSigningStatus, bd as MailStream, be as Migration, bf as MigrationDnsChange, bg as MigrationDnsPlan, bh as MigrationDomainItem, bi as MigrationItemStatus, bj as MigrationProvider, bk as MigrationResource, bl as MigrationSummary, bm as MigrationTemplateItem, bn as MigrationTotals, bo as MigrationWebhookItem, bp as ReceivedEmail, bq as ReceivedEmailAttachment, br as ReceivedEmailAttachmentMeta, bs as RemoteApplyDnsCredentials, bt as RemoveCategoryOptOutOptions, bu as RunMigrationOptions, bv as SendEmailParams, S as SendEmailResult, bw as Sender, bx as SesMigrationParams, by as StreamDeliverability, bz as SuppressedErrorDetails, bA as Suppression, bB as TEST_INBOX_WAIT_DEFAULT_MS, bC as TEST_INBOX_WAIT_MAX_SECONDS, bD as Template, bE as TemplateFormat, bF as TemplateLintWarning, bG as TemplateStarter, bH as TemplateStatus, bI as TemplateVersion, bJ as Tenant, bK as TenantPauseSource, bL as TenantRamp, bM as TenantStats, bN as TenantStatsResult, bO as TenantStatus, bP as TenantStreamPolicy, bQ as TestEmailWebhookParams, bR as TestEmailWebhookResult, bS as TestInbox, bT as TestInboxAddressOptions, bU as TestInboxEmail, bV as TestInboxEmailDetail, bW as TestInboxHeader, bX as TestInboxResource, bY as TestInboxUsage, bZ as TriggerEventParams, b_ as TriggerEventResult, b$ as TwilioIntegrationResponse, c0 as TwilioIntegrationStatus, c1 as UpdateAutomationParams, c2 as UpdateBrandParams, c3 as UpdateBurrowGuardSiteParams, c4 as UpdateDomainParams, c5 as UpdateEmailParams, c6 as UpdateSenderParams, c7 as UpdateTemplateParams, c8 as UpdateTenantParams, c9 as UpdateWebhookParams, ca as ValidateEmailResult, cb as ValidationReason, cc as ValidationVerdict, cd as VerifyDomainResult, ce as WaitForTestEmailParams, cf as WebhookDelivery, cg as WebhookDeliveryAttempt, ch as WebhookDeliveryDetail, ci as WebhookDeliveryStatus, cj as WebhookEmailTag, ck as WebhookEndpoint, cl as WebhookEndpointHealth, cm as WebhookEndpointWithSecret, cn as WebhookEventType, co as mergeMigrations, cp as normalizeAccessToken } from './client-B_H1iNa7.js';
1
+ import { A as ApiErrorBody, D as DnsRecord } from './client-BF4NQhim.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 BurrowGuardCheck, H as BurrowGuardReason, I as BurrowGuardResource, J as BurrowGuardSite, K as BurrowGuardSiteWithSecret, L as BurrowGuardVerifyParams, M as BurrowGuardVerifyResult, N as CancelBatchResult, O as CategoryOptOut, P as CategoryOptOutCategory, Q as CategoryUnsubscribedErrorDetails, R as ConnectTwilioParams, T as ContactWebhookEventPayload, U as CreateApiKeyParams, V as CreateApiKeyResult, W as CreateAutomationParams, X as CreateBurrowGuardSiteParams, Y as CreateDomainParams, Z as CreateDomainResult, _ as CreateMigrationParams, $ as CreateSenderParams, a0 as CreateSuppressionParams, a1 as CreateTemplateParams, a2 as CreateTenantParams, a3 as CreateWebhookParams, a4 as DEFAULT_API_BASE_URL, a5 as DailyRampLimitErrorDetails, a6 as DeleteTenantResult, a7 as DeliverabilityBucket, a8 as DeliverabilityDomainInsight, a9 as DeliverabilityInsightsResult, aa as DeliverabilityMailServerRelay, ab as DeliverabilityWindow, ac as DmarcDailyPoint, ad as DmarcMonitoring, ae as DmarcMonitoringDisabled, af as DmarcReadiness, ag as DmarcReadinessVerdict, ah as DmarcSource, ai as DmarcSourceStatus, aj as DmarcStatus, ak as DnsProviderName, al as Domain, am as DomainBimiAnalysis, an as DomainBlocklistListing, ao as DomainBlocklistStatus, ap as DomainBlocklists, aq as DomainDetailResult, ar as DomainDmarcAnalysis, as as DomainDnsAnalysis, at as DomainStatus, au as DomainTlsMode, av as DomainTrackingDns, aw as DomainTrackingStatus, ax as EmailDelivery, ay as EmailListItem, az as EmailWebhookEventPayload, aA as EmailWebhookEventType, aB as EnableDmarcParams, aC as EnableDmarcResult, aD as EnrollmentSkip, aE as EventRecord, G as Groundmail, aF as GroundmailAccessToken, aG as GroundmailOptions, aH as GroundmailTokenOptions, aI as GroundmailTokenProvider, aJ as HeldBackErrorDetails, aK as HeldBackReason, aL as HeldBackRecipient, aM as InReplyToEmail, aN as ListApiKeysParams, aO as ListApiKeysResult, aP as ListAutomationRunsParams, aQ as ListAutomationRunsResult, aR as ListAutomationsResult, aS as ListBurrowGuardChecksParams, aT as ListBurrowGuardChecksResult, aU as ListCategoryOptOutsParams, aV as ListCategoryOptOutsResult, aW as ListDomainsParams, aX as ListDomainsResult, aY as ListEmailsParams, aZ as ListEmailsResult, a_ as ListReceivedEmailsParams, a$ as ListReceivedEmailsResult, b0 as ListSendersResult, b1 as ListSuppressionsParams, b2 as ListSuppressionsResult, b3 as ListTemplatesParams, b4 as ListTemplatesResult, b5 as ListTenantDomainsResult, b6 as ListTenantsParams, b7 as ListTenantsResult, b8 as ListTestInboxEmailsParams, b9 as ListTestInboxEmailsResult, ba as ListWebhookDeliveriesParams, bb as ListWebhookDeliveriesResult, bc as MailServerSigningStatus, bd as MailStream, be as Migration, bf as MigrationDnsChange, bg as MigrationDnsPlan, bh as MigrationDomainItem, bi as MigrationItemStatus, bj as MigrationProvider, bk as MigrationResource, bl as MigrationSummary, bm as MigrationTemplateItem, bn as MigrationTotals, bo as MigrationWebhookItem, bp as ReceivedEmail, bq as ReceivedEmailAttachment, br as ReceivedEmailAttachmentMeta, bs as RemoteApplyDnsCredentials, bt as RemoveCategoryOptOutOptions, bu as RunMigrationOptions, bv as SendEmailParams, S as SendEmailResult, bw as Sender, bx as SesMigrationParams, by as StreamDeliverability, bz as SuppressedErrorDetails, bA as Suppression, bB as TEST_INBOX_WAIT_DEFAULT_MS, bC as TEST_INBOX_WAIT_MAX_SECONDS, bD as Template, bE as TemplateFormat, bF as TemplateLintWarning, bG as TemplateStarter, bH as TemplateStatus, bI as TemplateVersion, bJ as Tenant, bK as TenantPauseSource, bL as TenantRamp, bM as TenantStats, bN as TenantStatsResult, bO as TenantStatus, bP as TenantStreamPolicy, bQ as TestEmailWebhookParams, bR as TestEmailWebhookResult, bS as TestInbox, bT as TestInboxAddressOptions, bU as TestInboxEmail, bV as TestInboxEmailDetail, bW as TestInboxHeader, bX as TestInboxResource, bY as TestInboxUsage, bZ as TriggerEventParams, b_ as TriggerEventResult, b$ as TwilioIntegrationResponse, c0 as TwilioIntegrationStatus, c1 as UpdateAutomationParams, c2 as UpdateBrandParams, c3 as UpdateBurrowGuardSiteParams, c4 as UpdateDomainParams, c5 as UpdateEmailParams, c6 as UpdateSenderParams, c7 as UpdateTemplateParams, c8 as UpdateTenantParams, c9 as UpdateWebhookParams, ca as ValidateEmailResult, cb as ValidationReason, cc as ValidationVerdict, cd as VerifyDomainResult, ce as WaitForTestEmailParams, cf as WebhookDelivery, cg as WebhookDeliveryAttempt, ch as WebhookDeliveryDetail, ci as WebhookDeliveryStatus, cj as WebhookEmailTag, ck as WebhookEndpoint, cl as WebhookEndpointHealth, cm as WebhookEndpointWithSecret, cn as WebhookEventType, co as mergeMigrations, cp as normalizeAccessToken } from './client-BF4NQhim.js';
3
3
 
4
4
  type GroundmailErrorOptions = {
5
5
  code?: string;
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  normalizeAccessToken,
14
14
  signWebhookPayload,
15
15
  verifyWebhookSignature
16
- } from "./chunk-65NWGUZM.js";
16
+ } from "./chunk-Y573OVJI.js";
17
17
 
18
18
  // src/simulator.ts
19
19
  var SIMULATOR_DOMAIN = "simulator.groundmail.dev";
package/dist/payload.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as Groundmail } from './client-B_H1iNa7.js';
1
+ import { G as Groundmail } from './client-BF4NQhim.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-65NWGUZM.js";
4
+ } from "./chunk-Y573OVJI.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.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "Groundmail transactional email API client",
5
5
  "license": "MIT",
6
6
  "type": "module",