shipmail 0.4.6 → 0.4.9
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/README.md +5 -4
- package/dist/index.cjs +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -7
- package/dist/index.d.ts +30 -7
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -55,9 +55,9 @@ type EmailRecipient = {
|
|
|
55
55
|
readonly name?: string | null | undefined;
|
|
56
56
|
};
|
|
57
57
|
type EmailRecipientInput = EmailRecipient | string;
|
|
58
|
-
declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "
|
|
58
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
|
|
59
59
|
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
60
|
-
declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "
|
|
60
|
+
declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
|
|
61
61
|
type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
|
|
62
62
|
type StatusResponse = {
|
|
63
63
|
readonly status: string;
|
|
@@ -106,8 +106,10 @@ type AudienceFeed = {
|
|
|
106
106
|
readonly title: string | null;
|
|
107
107
|
readonly subtitle: string | null;
|
|
108
108
|
readonly site_url: string | null;
|
|
109
|
+
readonly canonical_url: string | null;
|
|
109
110
|
readonly author_name: string | null;
|
|
110
111
|
readonly icon_url: string | null;
|
|
112
|
+
readonly entry_limit: number | null;
|
|
111
113
|
/** Atom feed URL, or null when the feed is disabled. Anyone with this URL can read the feed. */
|
|
112
114
|
readonly url: string | null;
|
|
113
115
|
readonly updated_at: string;
|
|
@@ -138,8 +140,10 @@ type UpdateAudienceFeedParams = {
|
|
|
138
140
|
readonly title?: string | null | undefined;
|
|
139
141
|
readonly subtitle?: string | null | undefined;
|
|
140
142
|
readonly site_url?: string | null | undefined;
|
|
143
|
+
readonly canonical_url?: string | null | undefined;
|
|
141
144
|
readonly author_name?: string | null | undefined;
|
|
142
145
|
readonly icon_url?: string | null | undefined;
|
|
146
|
+
readonly entry_limit?: number | null | undefined;
|
|
143
147
|
};
|
|
144
148
|
type ListAudiencesParams = PaginationParams;
|
|
145
149
|
type AddSubscriberParams = {
|
|
@@ -1339,10 +1343,25 @@ type NewsletterDomain = {
|
|
|
1339
1343
|
readonly created_at: string;
|
|
1340
1344
|
readonly updated_at: string;
|
|
1341
1345
|
};
|
|
1346
|
+
type NewsletterSenderIdentity = {
|
|
1347
|
+
readonly object: "newsletter_sender_identity";
|
|
1348
|
+
readonly id: string;
|
|
1349
|
+
readonly newsletter_domain_id: string;
|
|
1350
|
+
readonly from_name: string;
|
|
1351
|
+
readonly from_address: string;
|
|
1352
|
+
readonly business_name: string;
|
|
1353
|
+
readonly postal_address: string | null;
|
|
1354
|
+
readonly footer_text: string | null;
|
|
1355
|
+
readonly domain_status: NewsletterDomainStatus;
|
|
1356
|
+
readonly is_default: boolean;
|
|
1357
|
+
readonly created_at: string;
|
|
1358
|
+
readonly updated_at: string;
|
|
1359
|
+
};
|
|
1342
1360
|
type Newsletter = {
|
|
1343
1361
|
readonly object: "newsletter";
|
|
1344
1362
|
readonly id: string;
|
|
1345
1363
|
readonly audience_id: string | null;
|
|
1364
|
+
readonly sender_identity_id: string;
|
|
1346
1365
|
readonly newsletter_domain_id: string;
|
|
1347
1366
|
readonly reply_to_mailbox_id: string | null;
|
|
1348
1367
|
readonly name: string;
|
|
@@ -1434,11 +1453,10 @@ type NewsletterTestSend = {
|
|
|
1434
1453
|
};
|
|
1435
1454
|
type CreateNewsletterParams = {
|
|
1436
1455
|
readonly audience_id: string;
|
|
1437
|
-
readonly
|
|
1456
|
+
readonly sender_identity_id: string;
|
|
1438
1457
|
readonly name: string;
|
|
1439
1458
|
readonly subject: string;
|
|
1440
1459
|
readonly preview_text?: string | null | undefined;
|
|
1441
|
-
readonly from_name?: string | null | undefined;
|
|
1442
1460
|
readonly body_html?: string | null | undefined;
|
|
1443
1461
|
readonly body_text?: string | null | undefined;
|
|
1444
1462
|
readonly blocks?: readonly NewsletterBlock[] | undefined;
|
|
@@ -1469,11 +1487,10 @@ type NewsletterChangelogEntry = {
|
|
|
1469
1487
|
};
|
|
1470
1488
|
type CreateNewsletterFromChangelogParams = {
|
|
1471
1489
|
readonly audience_id: string;
|
|
1472
|
-
readonly
|
|
1490
|
+
readonly sender_identity_id: string;
|
|
1473
1491
|
readonly name: string;
|
|
1474
1492
|
readonly subject: string;
|
|
1475
1493
|
readonly preview_text?: string | null | undefined;
|
|
1476
|
-
readonly from_name?: string | null | undefined;
|
|
1477
1494
|
readonly tone?: NewsletterChangelogTone | undefined;
|
|
1478
1495
|
readonly entries: readonly NewsletterChangelogEntry[];
|
|
1479
1496
|
readonly final_cta?: {
|
|
@@ -1486,6 +1503,7 @@ type CreateNewsletterFromChangelogParams = {
|
|
|
1486
1503
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1487
1504
|
};
|
|
1488
1505
|
type ListNewsletterDomainsParams = PaginationParams;
|
|
1506
|
+
type ListNewsletterSenderIdentitiesParams = PaginationParams;
|
|
1489
1507
|
type ListNewslettersParams = PaginationParams;
|
|
1490
1508
|
type ListNewsletterAssetsParams = PaginationParams & {
|
|
1491
1509
|
readonly kind?: NewsletterAssetKind | undefined;
|
|
@@ -1622,6 +1640,10 @@ declare class NewsletterDomains extends ApiResource {
|
|
|
1622
1640
|
list(params?: ListNewsletterDomainsParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterDomain>>;
|
|
1623
1641
|
listAutoPaginating(params?: Omit<ListNewsletterDomainsParams, "cursor">): Page<NewsletterDomain>;
|
|
1624
1642
|
}
|
|
1643
|
+
declare class NewsletterSenderIdentities extends ApiResource {
|
|
1644
|
+
list(params?: ListNewsletterSenderIdentitiesParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterSenderIdentity>>;
|
|
1645
|
+
listAutoPaginating(params?: Omit<ListNewsletterSenderIdentitiesParams, "cursor">): Page<NewsletterSenderIdentity>;
|
|
1646
|
+
}
|
|
1625
1647
|
declare class NewsletterAssets extends ApiResource {
|
|
1626
1648
|
list(params?: ListNewsletterAssetsParams, options?: MethodOptions): Promise<NewsletterAssetListResponse>;
|
|
1627
1649
|
listAutoPaginating(params?: Omit<ListNewsletterAssetsParams, "cursor">): Page<NewsletterAsset>;
|
|
@@ -1630,6 +1652,7 @@ declare class NewsletterAssets extends ApiResource {
|
|
|
1630
1652
|
}
|
|
1631
1653
|
declare class Newsletters extends ApiResource {
|
|
1632
1654
|
readonly domains: NewsletterDomains;
|
|
1655
|
+
readonly senderIdentities: NewsletterSenderIdentities;
|
|
1633
1656
|
readonly assets: NewsletterAssets;
|
|
1634
1657
|
constructor(client: ShipMailClient);
|
|
1635
1658
|
create(params: CreateNewsletterParams, options?: MethodOptions): Promise<Newsletter>;
|
|
@@ -2058,4 +2081,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2058
2081
|
readonly toleranceInSeconds?: number | undefined;
|
|
2059
2082
|
}): Promise<WebhookEvent>;
|
|
2060
2083
|
|
|
2061
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
|
|
2084
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
|
package/dist/index.d.ts
CHANGED
|
@@ -55,9 +55,9 @@ type EmailRecipient = {
|
|
|
55
55
|
readonly name?: string | null | undefined;
|
|
56
56
|
};
|
|
57
57
|
type EmailRecipientInput = EmailRecipient | string;
|
|
58
|
-
declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "
|
|
58
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
|
|
59
59
|
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
60
|
-
declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "
|
|
60
|
+
declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
|
|
61
61
|
type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
|
|
62
62
|
type StatusResponse = {
|
|
63
63
|
readonly status: string;
|
|
@@ -106,8 +106,10 @@ type AudienceFeed = {
|
|
|
106
106
|
readonly title: string | null;
|
|
107
107
|
readonly subtitle: string | null;
|
|
108
108
|
readonly site_url: string | null;
|
|
109
|
+
readonly canonical_url: string | null;
|
|
109
110
|
readonly author_name: string | null;
|
|
110
111
|
readonly icon_url: string | null;
|
|
112
|
+
readonly entry_limit: number | null;
|
|
111
113
|
/** Atom feed URL, or null when the feed is disabled. Anyone with this URL can read the feed. */
|
|
112
114
|
readonly url: string | null;
|
|
113
115
|
readonly updated_at: string;
|
|
@@ -138,8 +140,10 @@ type UpdateAudienceFeedParams = {
|
|
|
138
140
|
readonly title?: string | null | undefined;
|
|
139
141
|
readonly subtitle?: string | null | undefined;
|
|
140
142
|
readonly site_url?: string | null | undefined;
|
|
143
|
+
readonly canonical_url?: string | null | undefined;
|
|
141
144
|
readonly author_name?: string | null | undefined;
|
|
142
145
|
readonly icon_url?: string | null | undefined;
|
|
146
|
+
readonly entry_limit?: number | null | undefined;
|
|
143
147
|
};
|
|
144
148
|
type ListAudiencesParams = PaginationParams;
|
|
145
149
|
type AddSubscriberParams = {
|
|
@@ -1339,10 +1343,25 @@ type NewsletterDomain = {
|
|
|
1339
1343
|
readonly created_at: string;
|
|
1340
1344
|
readonly updated_at: string;
|
|
1341
1345
|
};
|
|
1346
|
+
type NewsletterSenderIdentity = {
|
|
1347
|
+
readonly object: "newsletter_sender_identity";
|
|
1348
|
+
readonly id: string;
|
|
1349
|
+
readonly newsletter_domain_id: string;
|
|
1350
|
+
readonly from_name: string;
|
|
1351
|
+
readonly from_address: string;
|
|
1352
|
+
readonly business_name: string;
|
|
1353
|
+
readonly postal_address: string | null;
|
|
1354
|
+
readonly footer_text: string | null;
|
|
1355
|
+
readonly domain_status: NewsletterDomainStatus;
|
|
1356
|
+
readonly is_default: boolean;
|
|
1357
|
+
readonly created_at: string;
|
|
1358
|
+
readonly updated_at: string;
|
|
1359
|
+
};
|
|
1342
1360
|
type Newsletter = {
|
|
1343
1361
|
readonly object: "newsletter";
|
|
1344
1362
|
readonly id: string;
|
|
1345
1363
|
readonly audience_id: string | null;
|
|
1364
|
+
readonly sender_identity_id: string;
|
|
1346
1365
|
readonly newsletter_domain_id: string;
|
|
1347
1366
|
readonly reply_to_mailbox_id: string | null;
|
|
1348
1367
|
readonly name: string;
|
|
@@ -1434,11 +1453,10 @@ type NewsletterTestSend = {
|
|
|
1434
1453
|
};
|
|
1435
1454
|
type CreateNewsletterParams = {
|
|
1436
1455
|
readonly audience_id: string;
|
|
1437
|
-
readonly
|
|
1456
|
+
readonly sender_identity_id: string;
|
|
1438
1457
|
readonly name: string;
|
|
1439
1458
|
readonly subject: string;
|
|
1440
1459
|
readonly preview_text?: string | null | undefined;
|
|
1441
|
-
readonly from_name?: string | null | undefined;
|
|
1442
1460
|
readonly body_html?: string | null | undefined;
|
|
1443
1461
|
readonly body_text?: string | null | undefined;
|
|
1444
1462
|
readonly blocks?: readonly NewsletterBlock[] | undefined;
|
|
@@ -1469,11 +1487,10 @@ type NewsletterChangelogEntry = {
|
|
|
1469
1487
|
};
|
|
1470
1488
|
type CreateNewsletterFromChangelogParams = {
|
|
1471
1489
|
readonly audience_id: string;
|
|
1472
|
-
readonly
|
|
1490
|
+
readonly sender_identity_id: string;
|
|
1473
1491
|
readonly name: string;
|
|
1474
1492
|
readonly subject: string;
|
|
1475
1493
|
readonly preview_text?: string | null | undefined;
|
|
1476
|
-
readonly from_name?: string | null | undefined;
|
|
1477
1494
|
readonly tone?: NewsletterChangelogTone | undefined;
|
|
1478
1495
|
readonly entries: readonly NewsletterChangelogEntry[];
|
|
1479
1496
|
readonly final_cta?: {
|
|
@@ -1486,6 +1503,7 @@ type CreateNewsletterFromChangelogParams = {
|
|
|
1486
1503
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1487
1504
|
};
|
|
1488
1505
|
type ListNewsletterDomainsParams = PaginationParams;
|
|
1506
|
+
type ListNewsletterSenderIdentitiesParams = PaginationParams;
|
|
1489
1507
|
type ListNewslettersParams = PaginationParams;
|
|
1490
1508
|
type ListNewsletterAssetsParams = PaginationParams & {
|
|
1491
1509
|
readonly kind?: NewsletterAssetKind | undefined;
|
|
@@ -1622,6 +1640,10 @@ declare class NewsletterDomains extends ApiResource {
|
|
|
1622
1640
|
list(params?: ListNewsletterDomainsParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterDomain>>;
|
|
1623
1641
|
listAutoPaginating(params?: Omit<ListNewsletterDomainsParams, "cursor">): Page<NewsletterDomain>;
|
|
1624
1642
|
}
|
|
1643
|
+
declare class NewsletterSenderIdentities extends ApiResource {
|
|
1644
|
+
list(params?: ListNewsletterSenderIdentitiesParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterSenderIdentity>>;
|
|
1645
|
+
listAutoPaginating(params?: Omit<ListNewsletterSenderIdentitiesParams, "cursor">): Page<NewsletterSenderIdentity>;
|
|
1646
|
+
}
|
|
1625
1647
|
declare class NewsletterAssets extends ApiResource {
|
|
1626
1648
|
list(params?: ListNewsletterAssetsParams, options?: MethodOptions): Promise<NewsletterAssetListResponse>;
|
|
1627
1649
|
listAutoPaginating(params?: Omit<ListNewsletterAssetsParams, "cursor">): Page<NewsletterAsset>;
|
|
@@ -1630,6 +1652,7 @@ declare class NewsletterAssets extends ApiResource {
|
|
|
1630
1652
|
}
|
|
1631
1653
|
declare class Newsletters extends ApiResource {
|
|
1632
1654
|
readonly domains: NewsletterDomains;
|
|
1655
|
+
readonly senderIdentities: NewsletterSenderIdentities;
|
|
1633
1656
|
readonly assets: NewsletterAssets;
|
|
1634
1657
|
constructor(client: ShipMailClient);
|
|
1635
1658
|
create(params: CreateNewsletterParams, options?: MethodOptions): Promise<Newsletter>;
|
|
@@ -2058,4 +2081,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2058
2081
|
readonly toleranceInSeconds?: number | undefined;
|
|
2059
2082
|
}): Promise<WebhookEvent>;
|
|
2060
2083
|
|
|
2061
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
|
|
2084
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
|
package/dist/index.js
CHANGED
|
@@ -1072,6 +1072,21 @@ var NewsletterDomains = class extends ApiResource {
|
|
|
1072
1072
|
return new Page(this.client, "/newsletter-domains", { limit: params?.limit });
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
|
+
var NewsletterSenderIdentities = class extends ApiResource {
|
|
1076
|
+
list(params, options) {
|
|
1077
|
+
return this.client.request({
|
|
1078
|
+
method: "GET",
|
|
1079
|
+
path: "/newsletter-sender-identities",
|
|
1080
|
+
query: { cursor: params?.cursor, limit: params?.limit },
|
|
1081
|
+
methodOptions: options
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
listAutoPaginating(params) {
|
|
1085
|
+
return new Page(this.client, "/newsletter-sender-identities", {
|
|
1086
|
+
limit: params?.limit
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1075
1090
|
var NewsletterAssets = class extends ApiResource {
|
|
1076
1091
|
list(params, options) {
|
|
1077
1092
|
return this.client.request({
|
|
@@ -1116,6 +1131,7 @@ var Newsletters = class extends ApiResource {
|
|
|
1116
1131
|
constructor(client) {
|
|
1117
1132
|
super(client);
|
|
1118
1133
|
this.domains = new NewsletterDomains(client);
|
|
1134
|
+
this.senderIdentities = new NewsletterSenderIdentities(client);
|
|
1119
1135
|
this.assets = new NewsletterAssets(client);
|
|
1120
1136
|
}
|
|
1121
1137
|
create(params, options) {
|
|
@@ -1535,7 +1551,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1535
1551
|
};
|
|
1536
1552
|
|
|
1537
1553
|
// src/version.ts
|
|
1538
|
-
var VERSION = "0.4.
|
|
1554
|
+
var VERSION = "0.4.9";
|
|
1539
1555
|
|
|
1540
1556
|
// src/client.ts
|
|
1541
1557
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -1709,7 +1725,6 @@ var WEBHOOK_EVENT_TYPES = [
|
|
|
1709
1725
|
"message.delivered",
|
|
1710
1726
|
"message.bounced",
|
|
1711
1727
|
"message.complained",
|
|
1712
|
-
"thread.needs_reply",
|
|
1713
1728
|
"mailbox.rule_matched",
|
|
1714
1729
|
"domain.verified",
|
|
1715
1730
|
"domain.verification_failed",
|