groundmail 0.34.0 → 0.36.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 +1 -1
- package/dist/authjs.js +1 -1
- package/dist/better-auth.d.ts +1 -1
- package/dist/better-auth.js +1 -1
- package/dist/{chunk-PSLA3IGN.js → chunk-ARI5MWK4.js} +11 -1
- package/dist/clerk.d.ts +1 -1
- package/dist/clerk.js +1 -1
- package/dist/{client-PVTp1lAM.d.ts → client-_kSrks28.d.ts} +59 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/payload.d.ts +1 -1
- package/dist/payload.js +1 -1
- package/package.json +1 -1
package/dist/authjs.d.ts
CHANGED
package/dist/authjs.js
CHANGED
package/dist/better-auth.d.ts
CHANGED
package/dist/better-auth.js
CHANGED
|
@@ -1585,10 +1585,20 @@ var EmailsResource = class {
|
|
|
1585
1585
|
body: JSON.stringify(payload)
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
|
|
1588
|
+
/**
|
|
1589
|
+
* Send up to 100 emails in one request. `idempotencyKey` works as on `send`:
|
|
1590
|
+
* a retry with the same key and emails returns the first response and sends
|
|
1591
|
+
* nothing again. (An `idempotencyKey` on an individual email is ignored here.)
|
|
1592
|
+
*/
|
|
1593
|
+
async batch(emails, options = {}) {
|
|
1589
1594
|
const serialized = await Promise.all(emails.map((email) => this.serializeSendParams(email)));
|
|
1595
|
+
const headers = {};
|
|
1596
|
+
if (options.idempotencyKey) {
|
|
1597
|
+
headers["Idempotency-Key"] = options.idempotencyKey;
|
|
1598
|
+
}
|
|
1590
1599
|
return this.client.request("/emails/batch", {
|
|
1591
1600
|
method: "POST",
|
|
1601
|
+
headers,
|
|
1592
1602
|
body: JSON.stringify({ emails: serialized })
|
|
1593
1603
|
});
|
|
1594
1604
|
}
|
package/dist/clerk.d.ts
CHANGED
package/dist/clerk.js
CHANGED
|
@@ -130,6 +130,10 @@ type ValidateEmailResult = {
|
|
|
130
130
|
/** Reaches a team or queue (`info@`, `support@`) rather than a person. */
|
|
131
131
|
role: boolean;
|
|
132
132
|
};
|
|
133
|
+
type BatchSendOptions = {
|
|
134
|
+
/** Optional Idempotency-Key for the whole batch (24h TTL), as on `emails.send`. */
|
|
135
|
+
idempotencyKey?: string;
|
|
136
|
+
};
|
|
133
137
|
type BatchSendEmailResult = {
|
|
134
138
|
data: Array<{
|
|
135
139
|
index: number;
|
|
@@ -625,10 +629,56 @@ type AutomationBranchStep = {
|
|
|
625
629
|
then: AutomationStep[];
|
|
626
630
|
else: AutomationStep[];
|
|
627
631
|
};
|
|
632
|
+
/** Who an automation email is from and to, and what it overrides for its step. */
|
|
633
|
+
type AutomationEmailAddressing = {
|
|
634
|
+
/** A sender address. Use this or `sender`. */
|
|
635
|
+
from?: string;
|
|
636
|
+
/** A saved sender's handle (`GET /senders`), looked up when the email sends. */
|
|
637
|
+
sender?: string;
|
|
638
|
+
/** Usually `'{{event.email}}'`. */
|
|
639
|
+
to: string | string[];
|
|
640
|
+
reply_to?: string | string[];
|
|
641
|
+
category?: 'transactional' | 'product';
|
|
642
|
+
tags?: {
|
|
643
|
+
name: string;
|
|
644
|
+
value: string;
|
|
645
|
+
}[];
|
|
646
|
+
headers?: Record<string, string>;
|
|
647
|
+
[key: string]: unknown;
|
|
648
|
+
};
|
|
649
|
+
/**
|
|
650
|
+
* The email an automation step sends: a published template, by id or alias,
|
|
651
|
+
* with its fields filled from the run. Publishing a new version of the
|
|
652
|
+
* template changes every step that sends it. The template can also read the
|
|
653
|
+
* run directly: `{{event.data.plan}}`, `{{contact.email}}`.
|
|
654
|
+
*/
|
|
655
|
+
type AutomationTemplateEmail = AutomationEmailAddressing & {
|
|
656
|
+
template: {
|
|
657
|
+
/** The template's id or alias. */
|
|
658
|
+
id: string;
|
|
659
|
+
/** A value for each of the template's fields, e.g. `{ name: '{{event.data.name}}' }`. */
|
|
660
|
+
variables?: Record<string, string>;
|
|
661
|
+
};
|
|
662
|
+
/** This step's subject instead of the template's. */
|
|
663
|
+
subject?: string;
|
|
664
|
+
html?: never;
|
|
665
|
+
text?: never;
|
|
666
|
+
};
|
|
667
|
+
/** An email written into the step from code (no template): its own subject and body. */
|
|
668
|
+
type AutomationInlineEmail = AutomationEmailAddressing & {
|
|
669
|
+
template?: never;
|
|
670
|
+
subject: string;
|
|
671
|
+
html?: string;
|
|
672
|
+
text?: string;
|
|
673
|
+
};
|
|
674
|
+
type AutomationSendEmailStep = {
|
|
675
|
+
type: 'send_email';
|
|
676
|
+
email: AutomationTemplateEmail | AutomationInlineEmail;
|
|
677
|
+
};
|
|
628
678
|
type AutomationStep = {
|
|
629
|
-
type: 'delay' | '
|
|
679
|
+
type: 'delay' | 'send_sms' | 'condition' | 'wait_for_event';
|
|
630
680
|
[key: string]: unknown;
|
|
631
|
-
} | AutomationBranchStep;
|
|
681
|
+
} | AutomationSendEmailStep | AutomationBranchStep;
|
|
632
682
|
type TwilioIntegrationStatus = {
|
|
633
683
|
connected: boolean;
|
|
634
684
|
hint: string | null;
|
|
@@ -1788,7 +1838,12 @@ declare class EmailsResource {
|
|
|
1788
1838
|
}>;
|
|
1789
1839
|
insights(window?: DeliverabilityWindow): Promise<DeliverabilityInsightsResult>;
|
|
1790
1840
|
send(params: SendEmailParams): Promise<SendEmailResult>;
|
|
1791
|
-
|
|
1841
|
+
/**
|
|
1842
|
+
* Send up to 100 emails in one request. `idempotencyKey` works as on `send`:
|
|
1843
|
+
* a retry with the same key and emails returns the first response and sends
|
|
1844
|
+
* nothing again. (An `idempotencyKey` on an individual email is ignored here.)
|
|
1845
|
+
*/
|
|
1846
|
+
batch(emails: SendEmailParams[], options?: BatchSendOptions): Promise<BatchSendEmailResult>;
|
|
1792
1847
|
update(id: string, params: UpdateEmailParams): Promise<SendEmailResult>;
|
|
1793
1848
|
cancel(id: string): Promise<SendEmailResult>;
|
|
1794
1849
|
/** Create a new send from a previously stored email (new `msg_…` id). */
|
|
@@ -2150,4 +2205,4 @@ declare function normalizeAccessToken(value: GroundmailAccessToken | null | unde
|
|
|
2150
2205
|
expiresAt: number | null;
|
|
2151
2206
|
};
|
|
2152
2207
|
|
|
2153
|
-
export { type
|
|
2208
|
+
export { type DmarcDailyPoint as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type CategoryOptOut as C, type DnsRecord as D, type ConnectTwilioParams as E, type ContactWebhookEventPayload as F, Groundmail as G, type CreateApiKeyParams as H, type CreateApiKeyResult as I, type CreateAutomationParams as J, type CreateDomainParams as K, type CreateDomainResult as L, type CreateMigrationParams as M, type CreateSenderParams as N, type CreateSuppressionParams as O, type CreateTemplateParams as P, type CreateTenantParams as Q, type CreateWebhookParams as R, type SendEmailResult as S, DEFAULT_API_BASE_URL as T, type DailyRampLimitErrorDetails as U, type DeleteTenantResult as V, type DeliverabilityBucket as W, type DeliverabilityDomainInsight as X, type DeliverabilityInsightsResult as Y, type DeliverabilityMailServerRelay as Z, type DeliverabilityWindow as _, type ApiErrorCode as a, type MigrationDnsPlan as a$, type DmarcMonitoring as a0, type DmarcMonitoringDisabled as a1, type DmarcReadiness as a2, type DmarcReadinessVerdict as a3, type DmarcSource as a4, type DmarcSourceStatus as a5, type DmarcStatus as a6, type DnsProviderName as a7, type Domain as a8, type DomainBimiAnalysis as a9, type ListApiKeysParams as aA, type ListApiKeysResult as aB, type ListAutomationRunsParams as aC, type ListAutomationRunsResult as aD, type ListAutomationsResult as aE, type ListCategoryOptOutsParams as aF, type ListCategoryOptOutsResult as aG, type ListDomainsParams as aH, type ListDomainsResult as aI, type ListEmailsParams as aJ, type ListEmailsResult as aK, type ListReceivedEmailsParams as aL, type ListReceivedEmailsResult as aM, type ListSendersResult as aN, type ListSuppressionsParams as aO, type ListSuppressionsResult as aP, type ListTemplatesParams as aQ, type ListTemplatesResult as aR, type ListTenantDomainsResult as aS, type ListTenantsParams as aT, type ListTenantsResult as aU, type ListTestInboxEmailsParams as aV, type ListTestInboxEmailsResult as aW, type MailServerSigningStatus as aX, type MailStream as aY, type Migration as aZ, type MigrationDnsChange as a_, type DomainBlocklistListing as aa, type DomainBlocklistStatus as ab, type DomainBlocklists as ac, type DomainDetailResult as ad, type DomainDmarcAnalysis as ae, type DomainDnsAnalysis as af, type DomainStatus as ag, type DomainTlsMode as ah, type DomainTrackingDns as ai, type DomainTrackingStatus as aj, type EmailDelivery as ak, type EmailListItem as al, type EmailWebhookEventPayload as am, type EmailWebhookEventType as an, type EnableDmarcParams as ao, type EnableDmarcResult as ap, type EnrollmentSkip as aq, type EventRecord as ar, type GroundmailAccessToken as as, type GroundmailOptions as at, type GroundmailTokenOptions as au, type GroundmailTokenProvider as av, type HeldBackErrorDetails as aw, type HeldBackReason as ax, type HeldBackRecipient as ay, type InReplyToEmail as az, type ApiKey as b, type WebhookEventType as b$, type MigrationDomainItem as b0, type MigrationItemStatus as b1, type MigrationProvider as b2, type MigrationResource as b3, type MigrationSummary as b4, type MigrationTemplateItem as b5, type MigrationTotals as b6, type MigrationWebhookItem as b7, type ReceivedEmail as b8, type ReceivedEmailAttachment as b9, type TestEmailWebhookResult as bA, type TestInbox as bB, type TestInboxAddressOptions as bC, type TestInboxEmail as bD, type TestInboxEmailDetail as bE, type TestInboxHeader as bF, TestInboxResource as bG, type TestInboxUsage as bH, type TriggerEventParams as bI, type TriggerEventResult as bJ, type TwilioIntegrationResponse as bK, type TwilioIntegrationStatus as bL, type UpdateAutomationParams as bM, type UpdateDomainParams as bN, type UpdateEmailParams as bO, type UpdateSenderParams as bP, type UpdateTemplateParams as bQ, type UpdateTenantParams as bR, type UpdateWebhookParams as bS, type ValidateEmailResult as bT, type ValidationReason as bU, type ValidationVerdict as bV, type VerifyDomainResult as bW, type WaitForTestEmailParams as bX, type WebhookEmailTag as bY, type WebhookEndpoint as bZ, type WebhookEndpointWithSecret as b_, type ReceivedEmailAttachmentMeta as ba, type RemoteApplyDnsCredentials as bb, type RemoveCategoryOptOutOptions as bc, type RunMigrationOptions as bd, type SendEmailParams as be, type Sender as bf, type SesMigrationParams as bg, type StreamDeliverability as bh, type SuppressedErrorDetails as bi, type Suppression as bj, TEST_INBOX_WAIT_DEFAULT_MS as bk, TEST_INBOX_WAIT_MAX_SECONDS as bl, type Template as bm, type TemplateFormat as bn, type TemplateLintWarning as bo, type TemplateStarter as bp, type TemplateStatus as bq, type TemplateVersion as br, type Tenant as bs, type TenantPauseSource as bt, type TenantRamp as bu, type TenantStats as bv, type TenantStatsResult as bw, type TenantStatus as bx, type TenantStreamPolicy as by, type TestEmailWebhookParams as bz, type ApiKeyMigrationParams as c, mergeMigrations as c0, normalizeAccessToken as c1, 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 CategoryOptOutCategory as y, type CategoryUnsubscribedErrorDetails as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiErrorBody, D as DnsRecord } from './client-
|
|
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
|
|
1
|
+
import { A as ApiErrorBody, D as DnsRecord } from './client-_kSrks28.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, C as CategoryOptOut, y as CategoryOptOutCategory, z as CategoryUnsubscribedErrorDetails, E as ConnectTwilioParams, F as ContactWebhookEventPayload, H as CreateApiKeyParams, I as CreateApiKeyResult, J as CreateAutomationParams, K as CreateDomainParams, L as CreateDomainResult, M as CreateMigrationParams, N as CreateSenderParams, O as CreateSuppressionParams, P as CreateTemplateParams, Q as CreateTenantParams, R as CreateWebhookParams, T as DEFAULT_API_BASE_URL, U as DailyRampLimitErrorDetails, V as DeleteTenantResult, W as DeliverabilityBucket, X as DeliverabilityDomainInsight, Y as DeliverabilityInsightsResult, Z as DeliverabilityMailServerRelay, _ as DeliverabilityWindow, $ as DmarcDailyPoint, a0 as DmarcMonitoring, a1 as DmarcMonitoringDisabled, a2 as DmarcReadiness, a3 as DmarcReadinessVerdict, a4 as DmarcSource, a5 as DmarcSourceStatus, a6 as DmarcStatus, a7 as DnsProviderName, a8 as Domain, a9 as DomainBimiAnalysis, aa as DomainBlocklistListing, ab as DomainBlocklistStatus, ac as DomainBlocklists, ad as DomainDetailResult, ae as DomainDmarcAnalysis, af as DomainDnsAnalysis, ag as DomainStatus, ah as DomainTlsMode, ai as DomainTrackingDns, aj as DomainTrackingStatus, ak as EmailDelivery, al as EmailListItem, am as EmailWebhookEventPayload, an as EmailWebhookEventType, ao as EnableDmarcParams, ap as EnableDmarcResult, aq as EnrollmentSkip, ar as EventRecord, G as Groundmail, as as GroundmailAccessToken, at as GroundmailOptions, au as GroundmailTokenOptions, av as GroundmailTokenProvider, aw as HeldBackErrorDetails, ax as HeldBackReason, ay as HeldBackRecipient, az as InReplyToEmail, aA as ListApiKeysParams, aB as ListApiKeysResult, aC as ListAutomationRunsParams, aD as ListAutomationRunsResult, aE as ListAutomationsResult, aF as ListCategoryOptOutsParams, aG as ListCategoryOptOutsResult, aH as ListDomainsParams, aI as ListDomainsResult, aJ as ListEmailsParams, aK as ListEmailsResult, aL as ListReceivedEmailsParams, aM as ListReceivedEmailsResult, aN as ListSendersResult, aO as ListSuppressionsParams, aP as ListSuppressionsResult, aQ as ListTemplatesParams, aR as ListTemplatesResult, aS as ListTenantDomainsResult, aT as ListTenantsParams, aU as ListTenantsResult, aV as ListTestInboxEmailsParams, aW as ListTestInboxEmailsResult, aX as MailServerSigningStatus, aY as MailStream, aZ as Migration, a_ as MigrationDnsChange, a$ as MigrationDnsPlan, b0 as MigrationDomainItem, b1 as MigrationItemStatus, b2 as MigrationProvider, b3 as MigrationResource, b4 as MigrationSummary, b5 as MigrationTemplateItem, b6 as MigrationTotals, b7 as MigrationWebhookItem, b8 as ReceivedEmail, b9 as ReceivedEmailAttachment, ba as ReceivedEmailAttachmentMeta, bb as RemoteApplyDnsCredentials, bc as RemoveCategoryOptOutOptions, bd as RunMigrationOptions, be as SendEmailParams, S as SendEmailResult, bf as Sender, bg as SesMigrationParams, bh as StreamDeliverability, bi as SuppressedErrorDetails, bj as Suppression, bk as TEST_INBOX_WAIT_DEFAULT_MS, bl as TEST_INBOX_WAIT_MAX_SECONDS, bm as Template, bn as TemplateFormat, bo as TemplateLintWarning, bp as TemplateStarter, bq as TemplateStatus, br as TemplateVersion, bs as Tenant, bt as TenantPauseSource, bu as TenantRamp, bv as TenantStats, bw as TenantStatsResult, bx as TenantStatus, by as TenantStreamPolicy, bz as TestEmailWebhookParams, bA as TestEmailWebhookResult, bB as TestInbox, bC as TestInboxAddressOptions, bD as TestInboxEmail, bE as TestInboxEmailDetail, bF as TestInboxHeader, bG as TestInboxResource, bH as TestInboxUsage, bI as TriggerEventParams, bJ as TriggerEventResult, bK as TwilioIntegrationResponse, bL as TwilioIntegrationStatus, bM as UpdateAutomationParams, bN as UpdateDomainParams, bO as UpdateEmailParams, bP as UpdateSenderParams, bQ as UpdateTemplateParams, bR as UpdateTenantParams, bS as UpdateWebhookParams, bT as ValidateEmailResult, bU as ValidationReason, bV as ValidationVerdict, bW as VerifyDomainResult, bX as WaitForTestEmailParams, bY as WebhookEmailTag, bZ as WebhookEndpoint, b_ as WebhookEndpointWithSecret, b$ as WebhookEventType, c0 as mergeMigrations, c1 as normalizeAccessToken } from './client-_kSrks28.js';
|
|
3
3
|
|
|
4
4
|
type GroundmailErrorOptions = {
|
|
5
5
|
code?: string;
|
package/dist/index.js
CHANGED
package/dist/payload.d.ts
CHANGED
package/dist/payload.js
CHANGED