groundmail 0.15.1 → 0.16.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-N2LD34ND.js → chunk-JYLRUBEJ.js} +25 -0
- package/dist/clerk.d.ts +1 -1
- package/dist/clerk.js +1 -1
- package/dist/{client-DYUh2ub4.d.ts → client-DXYsWgOT.d.ts} +51 -1
- 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
|
@@ -773,6 +773,19 @@ var MigrationsResource = class {
|
|
|
773
773
|
body: JSON.stringify(params)
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
+
/** Recent imports (newest first), with totals. */
|
|
777
|
+
async list(params = {}) {
|
|
778
|
+
const query = params.limit ? `?limit=${encodeURIComponent(String(params.limit))}` : "";
|
|
779
|
+
return this.client.request(`/migrations${query}`, { method: "GET" });
|
|
780
|
+
}
|
|
781
|
+
/** The stored report of one import, every request merged. Webhook secrets are not kept. */
|
|
782
|
+
async get(id) {
|
|
783
|
+
return this.client.request(`/migrations/${encodeURIComponent(id)}`, { method: "GET" });
|
|
784
|
+
}
|
|
785
|
+
/** The report as CSV text: one row per domain, webhook and template, plus counts, skips and next steps. */
|
|
786
|
+
async reportCsv(id) {
|
|
787
|
+
return this.client.requestText(`/migrations/${encodeURIComponent(id)}/report`);
|
|
788
|
+
}
|
|
776
789
|
/** The whole import: follows `next_cursor` until done and returns the combined report. */
|
|
777
790
|
async run(params, options = {}) {
|
|
778
791
|
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
@@ -1431,6 +1444,18 @@ var Groundmail = class {
|
|
|
1431
1444
|
get fetchImpl() {
|
|
1432
1445
|
return this.options.fetch || fetch;
|
|
1433
1446
|
}
|
|
1447
|
+
/** GET a text body (CSV downloads). Errors are JSON, like every other route. */
|
|
1448
|
+
async requestText(path) {
|
|
1449
|
+
const response = await this.fetchImpl(`${this.baseUrl}${path}`, {
|
|
1450
|
+
method: "GET",
|
|
1451
|
+
headers: { Authorization: `Bearer ${this.apiKey}` }
|
|
1452
|
+
});
|
|
1453
|
+
if (!response.ok) {
|
|
1454
|
+
const body = await response.json().catch(() => ({}));
|
|
1455
|
+
throw GroundmailError.fromResponse(response.status, body);
|
|
1456
|
+
}
|
|
1457
|
+
return response.text();
|
|
1458
|
+
}
|
|
1434
1459
|
async request(path, init) {
|
|
1435
1460
|
const response = await this.fetchImpl(`${this.baseUrl}${path}`, {
|
|
1436
1461
|
...init,
|
package/dist/clerk.d.ts
CHANGED
package/dist/clerk.js
CHANGED
|
@@ -881,7 +881,31 @@ type CreateMigrationParams = {
|
|
|
881
881
|
/** `next_cursor` from the previous response, to continue. */
|
|
882
882
|
cursor?: string;
|
|
883
883
|
};
|
|
884
|
+
/**
|
|
885
|
+
* Running totals. Suppressions also count by kind: `bounce`, `complaint`,
|
|
886
|
+
* `unsubscribe`, `manual`, and `product_opt_out` (opt-outs that were never
|
|
887
|
+
* global at the old provider; they stop product email only).
|
|
888
|
+
*/
|
|
884
889
|
type MigrationTotals = Record<string, number>;
|
|
890
|
+
/** One DNS change for a domain, compared with what it publishes today. */
|
|
891
|
+
type MigrationDnsChange = {
|
|
892
|
+
/** `add` a record, `update` an existing one to `value` (SPF), `keep` yours (DMARC), or `done`. */
|
|
893
|
+
action: 'add' | 'update' | 'keep' | 'done';
|
|
894
|
+
type: string;
|
|
895
|
+
host: string;
|
|
896
|
+
value: string;
|
|
897
|
+
purpose: string;
|
|
898
|
+
/** What the name holds today, when relevant. */
|
|
899
|
+
current: string | null;
|
|
900
|
+
note: string | null;
|
|
901
|
+
};
|
|
902
|
+
type MigrationDnsPlan = {
|
|
903
|
+
/** False when DNS could not be read; every record is then listed as `add`. */
|
|
904
|
+
checked: boolean;
|
|
905
|
+
changes: MigrationDnsChange[];
|
|
906
|
+
/** Which old-provider records to keep while switching, and when to remove them. */
|
|
907
|
+
keep_old_records: string;
|
|
908
|
+
};
|
|
885
909
|
type MigrationDomainItem = {
|
|
886
910
|
name: string;
|
|
887
911
|
status: MigrationItemStatus;
|
|
@@ -893,6 +917,8 @@ type MigrationDomainItem = {
|
|
|
893
917
|
value: string;
|
|
894
918
|
purpose: string;
|
|
895
919
|
}>;
|
|
920
|
+
/** Null in a preview, or when the import ran out of time to check. */
|
|
921
|
+
dns_plan: MigrationDnsPlan | null;
|
|
896
922
|
dashboard_url: string | null;
|
|
897
923
|
message: string | null;
|
|
898
924
|
};
|
|
@@ -964,6 +990,16 @@ type Migration = {
|
|
|
964
990
|
}> | null;
|
|
965
991
|
agent_prompt: string | null;
|
|
966
992
|
};
|
|
993
|
+
/** A stored import, as listed by `migrations.list()`. Previews are not stored. */
|
|
994
|
+
type MigrationSummary = {
|
|
995
|
+
id: string;
|
|
996
|
+
provider: MigrationProvider;
|
|
997
|
+
status: Migration['status'];
|
|
998
|
+
resources: MigrationResource[];
|
|
999
|
+
started_at: string;
|
|
1000
|
+
finished_at: string | null;
|
|
1001
|
+
totals: Partial<Record<MigrationResource, MigrationTotals>>;
|
|
1002
|
+
};
|
|
967
1003
|
type RunMigrationOptions = {
|
|
968
1004
|
/** Called after each request with the report so far. */
|
|
969
1005
|
onProgress?: (migration: Migration) => void;
|
|
@@ -1079,6 +1115,18 @@ declare class MigrationsResource {
|
|
|
1079
1115
|
create(params: CreateMigrationParams): Promise<{
|
|
1080
1116
|
migration: Migration;
|
|
1081
1117
|
}>;
|
|
1118
|
+
/** Recent imports (newest first), with totals. */
|
|
1119
|
+
list(params?: {
|
|
1120
|
+
limit?: number;
|
|
1121
|
+
}): Promise<{
|
|
1122
|
+
data: MigrationSummary[];
|
|
1123
|
+
}>;
|
|
1124
|
+
/** The stored report of one import, every request merged. Webhook secrets are not kept. */
|
|
1125
|
+
get(id: string): Promise<{
|
|
1126
|
+
migration: Migration;
|
|
1127
|
+
}>;
|
|
1128
|
+
/** The report as CSV text: one row per domain, webhook and template, plus counts, skips and next steps. */
|
|
1129
|
+
reportCsv(id: string): Promise<string>;
|
|
1082
1130
|
/** The whole import: follows `next_cursor` until done and returns the combined report. */
|
|
1083
1131
|
run(params: CreateMigrationParams, options?: RunMigrationOptions): Promise<Migration>;
|
|
1084
1132
|
}
|
|
@@ -1210,7 +1258,9 @@ declare class Groundmail {
|
|
|
1210
1258
|
validate(email: string): Promise<ValidateEmailResult>;
|
|
1211
1259
|
get baseUrl(): string;
|
|
1212
1260
|
get fetchImpl(): typeof fetch;
|
|
1261
|
+
/** GET a text body (CSV downloads). Errors are JSON, like every other route. */
|
|
1262
|
+
requestText(path: string): Promise<string>;
|
|
1213
1263
|
request<T>(path: string, init: RequestInit): Promise<T>;
|
|
1214
1264
|
}
|
|
1215
1265
|
|
|
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,
|
|
1266
|
+
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, type WebhookEndpoint 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 ReceivedEmailAttachmentMeta as aA, type RemoteApplyDnsCredentials as aB, type RunMigrationOptions as aC, type SendEmailParams as aD, type SuppressedErrorDetails as aE, type Suppression as aF, type Template as aG, type TemplateFormat as aH, type TemplateLintWarning as aI, type TemplateStarter as aJ, type TemplateStatus as aK, type TemplateVersion as aL, type TestEmailWebhookParams as aM, type TestEmailWebhookResult as aN, type TriggerEventParams as aO, type TriggerEventResult as aP, type TwilioIntegrationResponse as aQ, type TwilioIntegrationStatus as aR, type UpdateAutomationParams as aS, type UpdateDomainParams as aT, type UpdateEmailParams as aU, type UpdateTemplateParams as aV, type UpdateWebhookParams as aW, type ValidateEmailResult as aX, type ValidationReason as aY, type ValidationVerdict as aZ, type VerifyDomainResult 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 MigrationDnsChange as ao, type MigrationDnsPlan as ap, type MigrationDomainItem as aq, type MigrationItemStatus as ar, type MigrationProvider as as, type MigrationResource as at, type MigrationSummary as au, type MigrationTemplateItem as av, type MigrationTotals as aw, type MigrationWebhookItem as ax, type ReceivedEmail as ay, type ReceivedEmailAttachment as az, type ApiKey as b, type WebhookEndpointWithSecret as b0, type WebhookEventType as b1, mergeMigrations as b2, 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 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
|
|
1
|
+
import { A as ApiErrorBody, D as DnsRecord } from './client-DXYsWgOT.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 MigrationDnsChange, ap as MigrationDnsPlan, aq as MigrationDomainItem, ar as MigrationItemStatus, as as MigrationProvider, at as MigrationResource, au as MigrationSummary, av as MigrationTemplateItem, aw as MigrationTotals, ax as MigrationWebhookItem, ay as ReceivedEmail, az as ReceivedEmailAttachment, aA as ReceivedEmailAttachmentMeta, aB as RemoteApplyDnsCredentials, aC as RunMigrationOptions, aD as SendEmailParams, S as SendEmailResult, aE as SuppressedErrorDetails, aF as Suppression, aG as Template, aH as TemplateFormat, aI as TemplateLintWarning, aJ as TemplateStarter, aK as TemplateStatus, aL as TemplateVersion, aM as TestEmailWebhookParams, aN as TestEmailWebhookResult, aO as TriggerEventParams, aP as TriggerEventResult, aQ as TwilioIntegrationResponse, aR as TwilioIntegrationStatus, aS as UpdateAutomationParams, aT as UpdateDomainParams, aU as UpdateEmailParams, aV as UpdateTemplateParams, aW as UpdateWebhookParams, aX as ValidateEmailResult, aY as ValidationReason, aZ as ValidationVerdict, a_ as VerifyDomainResult, a$ as WebhookEndpoint, b0 as WebhookEndpointWithSecret, b1 as WebhookEventType, b2 as mergeMigrations } from './client-DXYsWgOT.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.16.0",
|
|
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.15.
|
|
92
|
+
"groundmail-nodemailer": "0.15.2"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@types/nodemailer": "^8.0.1",
|