groundmail 0.14.8 → 0.15.1
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-LKMNSXA3.js → chunk-N2LD34ND.js} +11 -0
- package/dist/clerk.d.ts +1 -1
- package/dist/clerk.js +1 -1
- package/dist/{client-UTorFXe6.d.ts → client-DYUh2ub4.d.ts} +71 -2
- 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 +2 -2
package/dist/authjs.d.ts
CHANGED
package/dist/authjs.js
CHANGED
package/dist/better-auth.d.ts
CHANGED
package/dist/better-auth.js
CHANGED
|
@@ -1414,6 +1414,17 @@ var Groundmail = class {
|
|
|
1414
1414
|
this.templates = new TemplatesResource(this);
|
|
1415
1415
|
this.migrations = new MigrationsResource(this);
|
|
1416
1416
|
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Check one address with Groundmail validation before you accept it (for
|
|
1419
|
+
* example on a signup form): syntax, mail server, disposable and role
|
|
1420
|
+
* addresses, recent hard bounces, and a typo suggestion. Free; sends nothing.
|
|
1421
|
+
*/
|
|
1422
|
+
async validate(email) {
|
|
1423
|
+
return this.request("/validate", {
|
|
1424
|
+
method: "POST",
|
|
1425
|
+
body: JSON.stringify({ email })
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1417
1428
|
get baseUrl() {
|
|
1418
1429
|
return (this.options.baseUrl || DEFAULT_API_BASE_URL).replace(/\/$/, "");
|
|
1419
1430
|
}
|
package/dist/clerk.d.ts
CHANGED
package/dist/clerk.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
type ApiErrorCode = 'validation_error' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'plan_limit'
|
|
1
|
+
type ApiErrorCode = 'validation_error' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'plan_limit'
|
|
2
|
+
/** 429: the send would go over a new account's daily ramp-up limit; see `details.resets_at`. */
|
|
3
|
+
| 'daily_ramp_limit' | 'domain_limit' | 'idempotency_conflict' | 'rate_limited' | 'upstream_error' | 'not_configured' | 'internal_error';
|
|
2
4
|
type SendEmailParams = {
|
|
3
5
|
from: string | {
|
|
4
6
|
email: string;
|
|
@@ -58,15 +60,57 @@ type SendEmailParams = {
|
|
|
58
60
|
*/
|
|
59
61
|
category?: 'transactional' | 'product';
|
|
60
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Why Groundmail validation held a recipient back before sending:
|
|
65
|
+
* - `invalid_address`: the address cannot exist (syntax).
|
|
66
|
+
* - `no_mail_server`: the domain does not exist or takes no email (no MX or A record, or a null MX).
|
|
67
|
+
* - `previously_bounced`: the address hard-bounced (mailbox does not exist) for a Groundmail
|
|
68
|
+
* sender in the last 90 days.
|
|
69
|
+
* - `mailbox_not_found`: Groundmail validation already knows the mailbox does not exist.
|
|
70
|
+
*/
|
|
71
|
+
type HeldBackReason = 'invalid_address' | 'no_mail_server' | 'previously_bounced' | 'mailbox_not_found';
|
|
72
|
+
type HeldBackRecipient = {
|
|
73
|
+
email: string;
|
|
74
|
+
reason: HeldBackReason | (string & {});
|
|
75
|
+
};
|
|
61
76
|
type SendEmailResult = {
|
|
62
77
|
id: string;
|
|
63
78
|
status: string;
|
|
79
|
+
/** Present when some recipients were held back and the email went to the rest. */
|
|
80
|
+
held_back?: HeldBackRecipient[];
|
|
81
|
+
};
|
|
82
|
+
/** `details` on `POST /emails` 422 when Groundmail validation held back every `to` recipient. */
|
|
83
|
+
type HeldBackErrorDetails = {
|
|
84
|
+
held_back: HeldBackRecipient[];
|
|
85
|
+
email_id: string;
|
|
86
|
+
};
|
|
87
|
+
type ValidationVerdict = 'valid' | 'risky' | 'invalid';
|
|
88
|
+
/**
|
|
89
|
+
* - invalid: `syntax`, `no_mail_server`, `mailbox_not_found`, `previously_bounced`
|
|
90
|
+
* - risky: `disposable`, `catch_all`, `possible_typo`
|
|
91
|
+
* - informational (does not change the verdict): `role`
|
|
92
|
+
*/
|
|
93
|
+
type ValidationReason = 'syntax' | 'no_mail_server' | 'mailbox_not_found' | 'previously_bounced' | 'disposable' | 'catch_all' | 'possible_typo' | 'role';
|
|
94
|
+
/** `POST /validate` result. */
|
|
95
|
+
type ValidateEmailResult = {
|
|
96
|
+
/** The address as checked: trimmed and lowercased. */
|
|
97
|
+
email: string;
|
|
98
|
+
domain: string | null;
|
|
99
|
+
verdict: ValidationVerdict;
|
|
100
|
+
reasons: Array<ValidationReason | (string & {})>;
|
|
101
|
+
/** The address with a likely-mistyped domain corrected (`ada@gmial.com` → `ada@gmail.com`), or null. */
|
|
102
|
+
suggestion: string | null;
|
|
103
|
+
/** A throwaway-inbox service. It can receive mail; accepting it is your call. */
|
|
104
|
+
disposable: boolean;
|
|
105
|
+
/** Reaches a team or queue (`info@`, `support@`) rather than a person. */
|
|
106
|
+
role: boolean;
|
|
64
107
|
};
|
|
65
108
|
type BatchSendEmailResult = {
|
|
66
109
|
data: Array<{
|
|
67
110
|
index: number;
|
|
68
111
|
id?: string;
|
|
69
112
|
status?: string;
|
|
113
|
+
held_back?: HeldBackRecipient[];
|
|
70
114
|
error?: {
|
|
71
115
|
message: string;
|
|
72
116
|
code?: string;
|
|
@@ -102,6 +146,8 @@ type EmailListItem = {
|
|
|
102
146
|
bounce_reason: string | null;
|
|
103
147
|
/** `hard` or `block` once the email has bounced; null otherwise. */
|
|
104
148
|
bounce_type: BounceType | null;
|
|
149
|
+
/** Recipients Groundmail validation held back before sending, with why. Empty when none were. */
|
|
150
|
+
held_back: HeldBackRecipient[];
|
|
105
151
|
tags: unknown;
|
|
106
152
|
scheduled_at: string | null;
|
|
107
153
|
cancelled_at: string | null;
|
|
@@ -308,6 +354,23 @@ type SuppressedErrorDetails = {
|
|
|
308
354
|
suppressed: string[];
|
|
309
355
|
email_id: string;
|
|
310
356
|
};
|
|
357
|
+
/**
|
|
358
|
+
* `details` on a 429 `daily_ramp_limit`: the send would go over a new account's
|
|
359
|
+
* daily ramp-up limit for its stream. Send the rest after `resets_at`.
|
|
360
|
+
*/
|
|
361
|
+
type DailyRampLimitErrorDetails = {
|
|
362
|
+
stream: 'transactional' | 'product';
|
|
363
|
+
/** Today's recipient limit for this stream. */
|
|
364
|
+
daily_limit: number;
|
|
365
|
+
/** Recipients already sent today on this stream. */
|
|
366
|
+
used_today: number;
|
|
367
|
+
/** Recipients (to + cc + bcc) in the refused send. */
|
|
368
|
+
recipients: number;
|
|
369
|
+
/** Ramp-up stage, 1-based; null with a fixed limit set by support. */
|
|
370
|
+
ramp_stage: number | null;
|
|
371
|
+
/** The next 00:00 UTC, ISO 8601. */
|
|
372
|
+
resets_at: string;
|
|
373
|
+
};
|
|
311
374
|
/** Event types accepted by `POST /emails/test`. */
|
|
312
375
|
type EmailWebhookEventType = 'email.received' | 'email.sent' | 'email.delivered' | 'email.delivery_delayed' | 'email.bounced' | 'email.complained' | 'email.opened' | 'email.clicked' | 'email.failed' | 'email.suppressed' | 'email.scheduled';
|
|
313
376
|
type TestEmailWebhookParams = {
|
|
@@ -1139,9 +1202,15 @@ declare class Groundmail {
|
|
|
1139
1202
|
/** Import from SendGrid, Postmark or Mailgun (Beta). */
|
|
1140
1203
|
readonly migrations: MigrationsResource;
|
|
1141
1204
|
constructor(apiKey: string, options?: GroundmailOptions);
|
|
1205
|
+
/**
|
|
1206
|
+
* Check one address with Groundmail validation before you accept it (for
|
|
1207
|
+
* example on a signup form): syntax, mail server, disposable and role
|
|
1208
|
+
* addresses, recent hard bounces, and a typo suggestion. Free; sends nothing.
|
|
1209
|
+
*/
|
|
1210
|
+
validate(email: string): Promise<ValidateEmailResult>;
|
|
1142
1211
|
get baseUrl(): string;
|
|
1143
1212
|
get fetchImpl(): typeof fetch;
|
|
1144
1213
|
request<T>(path: string, init: RequestInit): Promise<T>;
|
|
1145
1214
|
}
|
|
1146
1215
|
|
|
1147
|
-
export { type
|
|
1216
|
+
export { type EmailWebhookEventPayload as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type CategoryUnsubscribedErrorDetails as C, type DnsRecord as D, type CreateSuppressionParams as E, type CreateTemplateParams as F, Groundmail as G, type CreateWebhookParams as H, DEFAULT_API_BASE_URL as I, type DailyRampLimitErrorDetails as J, type DeliverabilityBucket as K, type DeliverabilityDomainInsight as L, type DeliverabilityInsightsResult as M, type DeliverabilityMailServerRelay as N, type DeliverabilityWindow as O, type DnsProviderName as P, type Domain as Q, type DomainBimiAnalysis as R, type SendEmailResult as S, type DomainDetailResult as T, type DomainDmarcAnalysis as U, type DomainDnsAnalysis as V, type DomainStatus as W, type DomainTlsMode as X, type DomainTrackingDns as Y, type DomainTrackingStatus as Z, type EmailListItem as _, type ApiErrorCode as a, mergeMigrations as a$, type EmailWebhookEventType as a0, type EnrollmentSkip as a1, type EventRecord as a2, type GroundmailOptions as a3, type HeldBackErrorDetails as a4, type HeldBackReason as a5, type HeldBackRecipient as a6, type ListApiKeysParams as a7, type ListApiKeysResult as a8, type ListAutomationRunsParams as a9, type SendEmailParams as aA, type SuppressedErrorDetails as aB, type Suppression as aC, type Template as aD, type TemplateFormat as aE, type TemplateLintWarning as aF, type TemplateStarter as aG, type TemplateStatus as aH, type TemplateVersion as aI, type TestEmailWebhookParams as aJ, type TestEmailWebhookResult as aK, type TriggerEventParams as aL, type TriggerEventResult as aM, type TwilioIntegrationResponse as aN, type TwilioIntegrationStatus as aO, type UpdateAutomationParams as aP, type UpdateDomainParams as aQ, type UpdateEmailParams as aR, type UpdateTemplateParams as aS, type UpdateWebhookParams as aT, type ValidateEmailResult as aU, type ValidationReason as aV, type ValidationVerdict as aW, type VerifyDomainResult as aX, type WebhookEndpoint as aY, type WebhookEndpointWithSecret as aZ, type WebhookEventType as a_, type ListAutomationRunsResult as aa, type ListAutomationsResult as ab, type ListDomainsParams as ac, type ListDomainsResult as ad, type ListEmailsParams as ae, type ListEmailsResult as af, type ListReceivedEmailsParams as ag, type ListReceivedEmailsResult as ah, type ListSuppressionsParams as ai, type ListSuppressionsResult as aj, type ListTemplatesParams as ak, type ListTemplatesResult as al, type MailServerSigningStatus as am, type Migration as an, type MigrationDomainItem as ao, type MigrationItemStatus as ap, type MigrationProvider as aq, type MigrationResource as ar, type MigrationTemplateItem as as, type MigrationTotals as at, type MigrationWebhookItem as au, type ReceivedEmail as av, type ReceivedEmailAttachment as aw, type ReceivedEmailAttachmentMeta as ax, type RemoteApplyDnsCredentials as ay, type RunMigrationOptions as az, type ApiKey as b, type ApiKeyScope as c, type ApplyDnsParams as d, type ApplyDnsRecordResult as e, type ApplyDnsResult as f, type Asset as g, type Automation as h, type AutomationResult as i, type AutomationRun as j, type AutomationRunResponse as k, type AutomationRunStatus as l, type AutomationRunStep as m, type AutomationRunStepStatus as n, type AutomationStatus as o, type AutomationStep as p, type AutomationTrigger as q, type BounceType as r, type ConnectTwilioParams as s, type ContactWebhookEventPayload as t, type CreateApiKeyParams as u, type CreateApiKeyResult as v, type CreateAutomationParams as w, type CreateDomainParams as x, type CreateDomainResult as y, type CreateMigrationParams 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 ApiKeyScope, d as ApplyDnsParams, e as ApplyDnsRecordResult, f as ApplyDnsResult, g as Asset, h as Automation, i as AutomationResult, j as AutomationRun, k as AutomationRunResponse, l as AutomationRunStatus, m as AutomationRunStep, n as AutomationRunStepStatus, o as AutomationStatus, p as AutomationStep, q as AutomationTrigger, B as BatchSendEmailResult, r as BounceType, C as CategoryUnsubscribedErrorDetails, s as ConnectTwilioParams, t as ContactWebhookEventPayload, u as CreateApiKeyParams, v as CreateApiKeyResult, w as CreateAutomationParams, x as CreateDomainParams, y as CreateDomainResult, z as CreateMigrationParams, E as CreateSuppressionParams, F as CreateTemplateParams, H as CreateWebhookParams, I as DEFAULT_API_BASE_URL, J as
|
|
1
|
+
import { A as ApiErrorBody, D as DnsRecord } from './client-DYUh2ub4.js';
|
|
2
|
+
export { a as ApiErrorCode, b as ApiKey, c as ApiKeyScope, d as ApplyDnsParams, e as ApplyDnsRecordResult, f as ApplyDnsResult, g as Asset, h as Automation, i as AutomationResult, j as AutomationRun, k as AutomationRunResponse, l as AutomationRunStatus, m as AutomationRunStep, n as AutomationRunStepStatus, o as AutomationStatus, p as AutomationStep, q as AutomationTrigger, B as BatchSendEmailResult, r as BounceType, C as CategoryUnsubscribedErrorDetails, s as ConnectTwilioParams, t as ContactWebhookEventPayload, u as CreateApiKeyParams, v as CreateApiKeyResult, w as CreateAutomationParams, x as CreateDomainParams, y as CreateDomainResult, z as CreateMigrationParams, E as CreateSuppressionParams, F as CreateTemplateParams, H as CreateWebhookParams, I as DEFAULT_API_BASE_URL, J as DailyRampLimitErrorDetails, K as DeliverabilityBucket, L as DeliverabilityDomainInsight, M as DeliverabilityInsightsResult, N as DeliverabilityMailServerRelay, O as DeliverabilityWindow, P as DnsProviderName, Q as Domain, R as DomainBimiAnalysis, T as DomainDetailResult, U as DomainDmarcAnalysis, V as DomainDnsAnalysis, W as DomainStatus, X as DomainTlsMode, Y as DomainTrackingDns, Z as DomainTrackingStatus, _ as EmailListItem, $ as EmailWebhookEventPayload, a0 as EmailWebhookEventType, a1 as EnrollmentSkip, a2 as EventRecord, G as Groundmail, a3 as GroundmailOptions, a4 as HeldBackErrorDetails, a5 as HeldBackReason, a6 as HeldBackRecipient, a7 as ListApiKeysParams, a8 as ListApiKeysResult, a9 as ListAutomationRunsParams, aa as ListAutomationRunsResult, ab as ListAutomationsResult, ac as ListDomainsParams, ad as ListDomainsResult, ae as ListEmailsParams, af as ListEmailsResult, ag as ListReceivedEmailsParams, ah as ListReceivedEmailsResult, ai as ListSuppressionsParams, aj as ListSuppressionsResult, ak as ListTemplatesParams, al as ListTemplatesResult, am as MailServerSigningStatus, an as Migration, ao as MigrationDomainItem, ap as MigrationItemStatus, aq as MigrationProvider, ar as MigrationResource, as as MigrationTemplateItem, at as MigrationTotals, au as MigrationWebhookItem, av as ReceivedEmail, aw as ReceivedEmailAttachment, ax as ReceivedEmailAttachmentMeta, ay as RemoteApplyDnsCredentials, az as RunMigrationOptions, aA as SendEmailParams, S as SendEmailResult, aB as SuppressedErrorDetails, aC as Suppression, aD as Template, aE as TemplateFormat, aF as TemplateLintWarning, aG as TemplateStarter, aH as TemplateStatus, aI as TemplateVersion, aJ as TestEmailWebhookParams, aK as TestEmailWebhookResult, aL as TriggerEventParams, aM as TriggerEventResult, aN as TwilioIntegrationResponse, aO as TwilioIntegrationStatus, aP as UpdateAutomationParams, aQ as UpdateDomainParams, aR as UpdateEmailParams, aS as UpdateTemplateParams, aT as UpdateWebhookParams, aU as ValidateEmailResult, aV as ValidationReason, aW as ValidationVerdict, aX as VerifyDomainResult, aY as WebhookEndpoint, aZ as WebhookEndpointWithSecret, a_ as WebhookEventType, a$ as mergeMigrations } from './client-DYUh2ub4.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Groundmail transactional email API client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"prepublishOnly": "npm run build && npm run build:nodemailer-bridge"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"groundmail-nodemailer": "0.
|
|
92
|
+
"groundmail-nodemailer": "0.15.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@types/nodemailer": "^8.0.1",
|