groundmail 0.23.0 → 0.24.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-QBGTN2WD.js → chunk-TTRMVR6T.js} +31 -0
- package/dist/clerk.d.ts +1 -1
- package/dist/clerk.js +1 -1
- package/dist/{client-CTG4zTKw.d.ts → client-DkpJ9AT0.d.ts} +52 -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
|
@@ -1334,6 +1334,37 @@ var SuppressionsResource = class {
|
|
|
1334
1334
|
method: "DELETE"
|
|
1335
1335
|
});
|
|
1336
1336
|
}
|
|
1337
|
+
/**
|
|
1338
|
+
* List category opt-outs: addresses that unsubscribed from product or
|
|
1339
|
+
* newsletter email. Pass `tenant` for one tenant's opt-outs.
|
|
1340
|
+
*/
|
|
1341
|
+
async listCategoryOptOuts(params = {}) {
|
|
1342
|
+
const search = new URLSearchParams({ type: "category_opt_out" });
|
|
1343
|
+
if (params.limit != null) search.set("limit", String(params.limit));
|
|
1344
|
+
if (params.cursor) search.set("cursor", params.cursor);
|
|
1345
|
+
if (params.email) search.set("email", params.email);
|
|
1346
|
+
if (params.category) search.set("category", params.category);
|
|
1347
|
+
if (params.tenant) search.set("tenant", params.tenant);
|
|
1348
|
+
if (params.includeTenants) search.set("include_tenants", "true");
|
|
1349
|
+
return this.client.request(`/suppressions?${search.toString()}`, { method: "GET" });
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Remove a category opt-out by opt-out id or email address, so the address
|
|
1353
|
+
* can receive that category again (for example after the reader re-subscribes).
|
|
1354
|
+
* Throws a 404 error when nothing matches.
|
|
1355
|
+
*/
|
|
1356
|
+
async removeCategoryOptOut(idOrEmail, options = {}) {
|
|
1357
|
+
const search = new URLSearchParams({ type: "category_opt_out" });
|
|
1358
|
+
if (options.category) search.set("category", options.category);
|
|
1359
|
+
if (options.tenant) search.set("tenant", options.tenant);
|
|
1360
|
+
if (idOrEmail.includes("@")) {
|
|
1361
|
+
search.set("email", idOrEmail);
|
|
1362
|
+
return this.client.request(`/suppressions?${search.toString()}`, { method: "DELETE" });
|
|
1363
|
+
}
|
|
1364
|
+
return this.client.request(`/suppressions/${encodeURIComponent(idOrEmail)}?${search.toString()}`, {
|
|
1365
|
+
method: "DELETE"
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1337
1368
|
};
|
|
1338
1369
|
|
|
1339
1370
|
// src/templates.ts
|
package/dist/clerk.d.ts
CHANGED
package/dist/clerk.js
CHANGED
|
@@ -697,6 +697,43 @@ type CreateSuppressionParams = {
|
|
|
697
697
|
/** Add to this tenant's own list (external id or Groundmail id) instead of the account's. */
|
|
698
698
|
tenant?: string;
|
|
699
699
|
};
|
|
700
|
+
/** A category a reader can opt out of with a one-click unsubscribe. */
|
|
701
|
+
type CategoryOptOutCategory = 'product' | 'newsletter';
|
|
702
|
+
/**
|
|
703
|
+
* A category opt-out: the address unsubscribed from one category (product or
|
|
704
|
+
* newsletter email). Sends in that category to the address are refused with a 422.
|
|
705
|
+
*/
|
|
706
|
+
type CategoryOptOut = {
|
|
707
|
+
id: string;
|
|
708
|
+
type: 'category_opt_out';
|
|
709
|
+
email: string;
|
|
710
|
+
category: CategoryOptOutCategory | string;
|
|
711
|
+
/** The tenant's external id for a tenant's opt-out; `null` when account-wide. */
|
|
712
|
+
tenant: string | null;
|
|
713
|
+
created_at: string;
|
|
714
|
+
updated_at: string;
|
|
715
|
+
};
|
|
716
|
+
type ListCategoryOptOutsParams = {
|
|
717
|
+
limit?: number;
|
|
718
|
+
cursor?: string;
|
|
719
|
+
email?: string;
|
|
720
|
+
category?: CategoryOptOutCategory;
|
|
721
|
+
/** List this tenant's opt-outs instead of the account-wide ones. */
|
|
722
|
+
tenant?: string;
|
|
723
|
+
/** Without `tenant`: also list every tenant's opt-outs (each row carries its tenant). */
|
|
724
|
+
includeTenants?: boolean;
|
|
725
|
+
};
|
|
726
|
+
type ListCategoryOptOutsResult = {
|
|
727
|
+
data: CategoryOptOut[];
|
|
728
|
+
has_more: boolean;
|
|
729
|
+
next_cursor: string | null;
|
|
730
|
+
};
|
|
731
|
+
type RemoveCategoryOptOutOptions = {
|
|
732
|
+
/** Only this category; omit to remove every category for the address. */
|
|
733
|
+
category?: CategoryOptOutCategory;
|
|
734
|
+
/** Remove from this tenant's opt-outs instead of the account-wide ones. */
|
|
735
|
+
tenant?: string;
|
|
736
|
+
};
|
|
700
737
|
type TemplateStatus = 'draft' | 'published';
|
|
701
738
|
type TemplateFormat = 'html' | 'blocks';
|
|
702
739
|
type TemplateLintWarning = {
|
|
@@ -1539,6 +1576,20 @@ declare class SuppressionsResource {
|
|
|
1539
1576
|
}): Promise<{
|
|
1540
1577
|
ok: boolean;
|
|
1541
1578
|
}>;
|
|
1579
|
+
/**
|
|
1580
|
+
* List category opt-outs: addresses that unsubscribed from product or
|
|
1581
|
+
* newsletter email. Pass `tenant` for one tenant's opt-outs.
|
|
1582
|
+
*/
|
|
1583
|
+
listCategoryOptOuts(params?: ListCategoryOptOutsParams): Promise<ListCategoryOptOutsResult>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Remove a category opt-out by opt-out id or email address, so the address
|
|
1586
|
+
* can receive that category again (for example after the reader re-subscribes).
|
|
1587
|
+
* Throws a 404 error when nothing matches.
|
|
1588
|
+
*/
|
|
1589
|
+
removeCategoryOptOut(idOrEmail: string, options?: RemoveCategoryOptOutOptions): Promise<{
|
|
1590
|
+
ok: boolean;
|
|
1591
|
+
deleted: number;
|
|
1592
|
+
}>;
|
|
1542
1593
|
}
|
|
1543
1594
|
|
|
1544
1595
|
declare class TemplatesResource {
|
|
@@ -1700,4 +1751,4 @@ declare class Groundmail {
|
|
|
1700
1751
|
request<T>(path: string, init: RequestInit): Promise<T>;
|
|
1701
1752
|
}
|
|
1702
1753
|
|
|
1703
|
-
export { type
|
|
1754
|
+
export { type DmarcStatus as $, type ApiErrorBody as A, type BatchSendEmailResult as B, type CategoryOptOut as C, type DnsRecord as D, type CreateDomainResult as E, type CreateMigrationParams as F, Groundmail as G, type CreateSuppressionParams as H, type CreateTemplateParams as I, type CreateTenantParams as J, type CreateWebhookParams as K, DEFAULT_API_BASE_URL as L, type DailyRampLimitErrorDetails as M, type DeleteTenantResult as N, type DeliverabilityBucket as O, type DeliverabilityDomainInsight as P, type DeliverabilityInsightsResult as Q, type DeliverabilityMailServerRelay as R, type SendEmailResult as S, type DeliverabilityWindow as T, type DmarcDailyPoint as U, type DmarcMonitoring as V, type DmarcMonitoringDisabled as W, type DmarcReadiness as X, type DmarcReadinessVerdict as Y, type DmarcSource as Z, type DmarcSourceStatus as _, type ApiErrorCode as a, type Suppression as a$, type DnsProviderName as a0, type Domain as a1, type DomainBimiAnalysis as a2, type DomainDetailResult as a3, type DomainDmarcAnalysis as a4, type DomainDnsAnalysis as a5, type DomainStatus as a6, type DomainTlsMode as a7, type DomainTrackingDns as a8, type DomainTrackingStatus as a9, type ListTemplatesParams as aA, type ListTemplatesResult as aB, type ListTenantDomainsResult as aC, type ListTenantsParams as aD, type ListTenantsResult as aE, type MailServerSigningStatus as aF, type MailStream as aG, type Migration as aH, type MigrationDnsChange as aI, type MigrationDnsPlan as aJ, type MigrationDomainItem as aK, type MigrationItemStatus as aL, type MigrationProvider as aM, type MigrationResource as aN, type MigrationSummary as aO, type MigrationTemplateItem as aP, type MigrationTotals as aQ, type MigrationWebhookItem as aR, type ReceivedEmail as aS, type ReceivedEmailAttachment as aT, type ReceivedEmailAttachmentMeta as aU, type RemoteApplyDnsCredentials as aV, type RemoveCategoryOptOutOptions as aW, type RunMigrationOptions as aX, type SendEmailParams as aY, type StreamDeliverability as aZ, type SuppressedErrorDetails as a_, type EmailListItem as aa, type EmailWebhookEventPayload as ab, type EmailWebhookEventType as ac, type EnableDmarcParams as ad, type EnableDmarcResult as ae, type EnrollmentSkip as af, type EventRecord as ag, type GroundmailOptions as ah, type HeldBackErrorDetails as ai, type HeldBackReason as aj, type HeldBackRecipient as ak, type ListApiKeysParams as al, type ListApiKeysResult as am, type ListAutomationRunsParams as an, type ListAutomationRunsResult as ao, type ListAutomationsResult as ap, type ListCategoryOptOutsParams as aq, type ListCategoryOptOutsResult as ar, type ListDomainsParams as as, type ListDomainsResult as at, type ListEmailsParams as au, type ListEmailsResult as av, type ListReceivedEmailsParams as aw, type ListReceivedEmailsResult as ax, type ListSuppressionsParams as ay, type ListSuppressionsResult as az, type ApiKey as b, type Template as b0, type TemplateFormat as b1, type TemplateLintWarning as b2, type TemplateStarter as b3, type TemplateStatus as b4, type TemplateVersion as b5, type Tenant as b6, type TenantPauseSource as b7, type TenantRamp as b8, type TenantStats as b9, type TenantStatsResult as ba, type TenantStatus as bb, type TenantStreamPolicy as bc, type TestEmailWebhookParams as bd, type TestEmailWebhookResult as be, type TriggerEventParams as bf, type TriggerEventResult as bg, type TwilioIntegrationResponse as bh, type TwilioIntegrationStatus as bi, type UpdateAutomationParams as bj, type UpdateDomainParams as bk, type UpdateEmailParams as bl, type UpdateTemplateParams as bm, type UpdateTenantParams as bn, type UpdateWebhookParams as bo, type ValidateEmailResult as bp, type ValidationReason as bq, type ValidationVerdict as br, type VerifyDomainResult as bs, type WebhookEmailTag as bt, type WebhookEndpoint as bu, type WebhookEndpointWithSecret as bv, type WebhookEventType as bw, mergeMigrations as bx, 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 CategoryOptOutCategory as s, type CategoryUnsubscribedErrorDetails as t, type ConnectTwilioParams as u, type ContactWebhookEventPayload as v, type CreateApiKeyParams as w, type CreateApiKeyResult as x, type CreateAutomationParams as y, type CreateDomainParams 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
|
|
1
|
+
import { A as ApiErrorBody, D as DnsRecord } from './client-DkpJ9AT0.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 CategoryOptOut, s as CategoryOptOutCategory, t as CategoryUnsubscribedErrorDetails, u as ConnectTwilioParams, v as ContactWebhookEventPayload, w as CreateApiKeyParams, x as CreateApiKeyResult, y as CreateAutomationParams, z as CreateDomainParams, E as CreateDomainResult, F as CreateMigrationParams, H as CreateSuppressionParams, I as CreateTemplateParams, J as CreateTenantParams, K as CreateWebhookParams, L as DEFAULT_API_BASE_URL, M as DailyRampLimitErrorDetails, N as DeleteTenantResult, O as DeliverabilityBucket, P as DeliverabilityDomainInsight, Q as DeliverabilityInsightsResult, R as DeliverabilityMailServerRelay, T as DeliverabilityWindow, U as DmarcDailyPoint, V as DmarcMonitoring, W as DmarcMonitoringDisabled, X as DmarcReadiness, Y as DmarcReadinessVerdict, Z as DmarcSource, _ as DmarcSourceStatus, $ as DmarcStatus, a0 as DnsProviderName, a1 as Domain, a2 as DomainBimiAnalysis, a3 as DomainDetailResult, a4 as DomainDmarcAnalysis, a5 as DomainDnsAnalysis, a6 as DomainStatus, a7 as DomainTlsMode, a8 as DomainTrackingDns, a9 as DomainTrackingStatus, aa as EmailListItem, ab as EmailWebhookEventPayload, ac as EmailWebhookEventType, ad as EnableDmarcParams, ae as EnableDmarcResult, af as EnrollmentSkip, ag as EventRecord, G as Groundmail, ah as GroundmailOptions, ai as HeldBackErrorDetails, aj as HeldBackReason, ak as HeldBackRecipient, al as ListApiKeysParams, am as ListApiKeysResult, an as ListAutomationRunsParams, ao as ListAutomationRunsResult, ap as ListAutomationsResult, aq as ListCategoryOptOutsParams, ar as ListCategoryOptOutsResult, as as ListDomainsParams, at as ListDomainsResult, au as ListEmailsParams, av as ListEmailsResult, aw as ListReceivedEmailsParams, ax as ListReceivedEmailsResult, ay as ListSuppressionsParams, az as ListSuppressionsResult, aA as ListTemplatesParams, aB as ListTemplatesResult, aC as ListTenantDomainsResult, aD as ListTenantsParams, aE as ListTenantsResult, aF as MailServerSigningStatus, aG as MailStream, aH as Migration, aI as MigrationDnsChange, aJ as MigrationDnsPlan, aK as MigrationDomainItem, aL as MigrationItemStatus, aM as MigrationProvider, aN as MigrationResource, aO as MigrationSummary, aP as MigrationTemplateItem, aQ as MigrationTotals, aR as MigrationWebhookItem, aS as ReceivedEmail, aT as ReceivedEmailAttachment, aU as ReceivedEmailAttachmentMeta, aV as RemoteApplyDnsCredentials, aW as RemoveCategoryOptOutOptions, aX as RunMigrationOptions, aY as SendEmailParams, S as SendEmailResult, aZ as StreamDeliverability, a_ as SuppressedErrorDetails, a$ as Suppression, b0 as Template, b1 as TemplateFormat, b2 as TemplateLintWarning, b3 as TemplateStarter, b4 as TemplateStatus, b5 as TemplateVersion, b6 as Tenant, b7 as TenantPauseSource, b8 as TenantRamp, b9 as TenantStats, ba as TenantStatsResult, bb as TenantStatus, bc as TenantStreamPolicy, bd as TestEmailWebhookParams, be as TestEmailWebhookResult, bf as TriggerEventParams, bg as TriggerEventResult, bh as TwilioIntegrationResponse, bi as TwilioIntegrationStatus, bj as UpdateAutomationParams, bk as UpdateDomainParams, bl as UpdateEmailParams, bm as UpdateTemplateParams, bn as UpdateTenantParams, bo as UpdateWebhookParams, bp as ValidateEmailResult, bq as ValidationReason, br as ValidationVerdict, bs as VerifyDomainResult, bt as WebhookEmailTag, bu as WebhookEndpoint, bv as WebhookEndpointWithSecret, bw as WebhookEventType, bx as mergeMigrations } from './client-DkpJ9AT0.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.24.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.10"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@types/nodemailer": "^8.0.1",
|