shipmail 0.4.8 → 0.4.10

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/index.d.cts CHANGED
@@ -830,6 +830,36 @@ type ListMessagesParams = PaginationParams & ({
830
830
  readonly mailbox_id?: string | undefined;
831
831
  readonly client_reference: string;
832
832
  });
833
+ type MessageAnalytics = {
834
+ readonly object: "message_analytics";
835
+ readonly id: string;
836
+ readonly mailbox_id: string;
837
+ readonly thread_id: string | null;
838
+ readonly client_reference: string | null;
839
+ readonly direction: "inbound" | "outbound";
840
+ readonly contact_addresses: readonly string[];
841
+ readonly recipient_count: number;
842
+ readonly attachment_count: number;
843
+ readonly source: MessageSource;
844
+ readonly mode: DataMode;
845
+ readonly status: MessageStatus;
846
+ readonly scheduled_at: string | null;
847
+ readonly created_at: string;
848
+ readonly updated_at: string;
849
+ };
850
+ type ListMessageAnalyticsParams = PaginationParams & {
851
+ readonly updated_after?: string | undefined;
852
+ readonly updated_before?: string | undefined;
853
+ };
854
+ type MessageAnalyticsPage = {
855
+ readonly data: readonly MessageAnalytics[];
856
+ readonly pagination: {
857
+ readonly next_cursor: string | null;
858
+ readonly has_more: boolean;
859
+ readonly limit: number;
860
+ readonly snapshot_at: string;
861
+ };
862
+ };
833
863
  type ReplyToMessageParams = {
834
864
  readonly html?: string | undefined;
835
865
  readonly text?: string | undefined;
@@ -1307,6 +1337,7 @@ declare class Messages extends ApiResource {
1307
1337
  send(params: SendMessageParams, options?: MethodOptions): Promise<Message>;
1308
1338
  list(params: ListMessagesParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1309
1339
  listAutoPaginating(params: Omit<ListMessagesParams, "cursor">): Page<Message>;
1340
+ listAnalytics(params?: ListMessageAnalyticsParams, options?: MethodOptions): Promise<MessageAnalyticsPage>;
1310
1341
  get(id: string, options?: MethodOptions): Promise<Message>;
1311
1342
  reply(id: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1312
1343
  }
@@ -1343,10 +1374,25 @@ type NewsletterDomain = {
1343
1374
  readonly created_at: string;
1344
1375
  readonly updated_at: string;
1345
1376
  };
1377
+ type NewsletterSenderIdentity = {
1378
+ readonly object: "newsletter_sender_identity";
1379
+ readonly id: string;
1380
+ readonly newsletter_domain_id: string;
1381
+ readonly from_name: string;
1382
+ readonly from_address: string;
1383
+ readonly business_name: string;
1384
+ readonly postal_address: string | null;
1385
+ readonly footer_text: string | null;
1386
+ readonly domain_status: NewsletterDomainStatus;
1387
+ readonly is_default: boolean;
1388
+ readonly created_at: string;
1389
+ readonly updated_at: string;
1390
+ };
1346
1391
  type Newsletter = {
1347
1392
  readonly object: "newsletter";
1348
1393
  readonly id: string;
1349
1394
  readonly audience_id: string | null;
1395
+ readonly sender_identity_id: string;
1350
1396
  readonly newsletter_domain_id: string;
1351
1397
  readonly reply_to_mailbox_id: string | null;
1352
1398
  readonly name: string;
@@ -1438,11 +1484,10 @@ type NewsletterTestSend = {
1438
1484
  };
1439
1485
  type CreateNewsletterParams = {
1440
1486
  readonly audience_id: string;
1441
- readonly newsletter_domain_id: string;
1487
+ readonly sender_identity_id: string;
1442
1488
  readonly name: string;
1443
1489
  readonly subject: string;
1444
1490
  readonly preview_text?: string | null | undefined;
1445
- readonly from_name?: string | null | undefined;
1446
1491
  readonly body_html?: string | null | undefined;
1447
1492
  readonly body_text?: string | null | undefined;
1448
1493
  readonly blocks?: readonly NewsletterBlock[] | undefined;
@@ -1473,11 +1518,10 @@ type NewsletterChangelogEntry = {
1473
1518
  };
1474
1519
  type CreateNewsletterFromChangelogParams = {
1475
1520
  readonly audience_id: string;
1476
- readonly newsletter_domain_id: string;
1521
+ readonly sender_identity_id: string;
1477
1522
  readonly name: string;
1478
1523
  readonly subject: string;
1479
1524
  readonly preview_text?: string | null | undefined;
1480
- readonly from_name?: string | null | undefined;
1481
1525
  readonly tone?: NewsletterChangelogTone | undefined;
1482
1526
  readonly entries: readonly NewsletterChangelogEntry[];
1483
1527
  readonly final_cta?: {
@@ -1490,6 +1534,7 @@ type CreateNewsletterFromChangelogParams = {
1490
1534
  readonly styling_mode?: NewsletterStylingMode | undefined;
1491
1535
  };
1492
1536
  type ListNewsletterDomainsParams = PaginationParams;
1537
+ type ListNewsletterSenderIdentitiesParams = PaginationParams;
1493
1538
  type ListNewslettersParams = PaginationParams;
1494
1539
  type ListNewsletterAssetsParams = PaginationParams & {
1495
1540
  readonly kind?: NewsletterAssetKind | undefined;
@@ -1626,6 +1671,10 @@ declare class NewsletterDomains extends ApiResource {
1626
1671
  list(params?: ListNewsletterDomainsParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterDomain>>;
1627
1672
  listAutoPaginating(params?: Omit<ListNewsletterDomainsParams, "cursor">): Page<NewsletterDomain>;
1628
1673
  }
1674
+ declare class NewsletterSenderIdentities extends ApiResource {
1675
+ list(params?: ListNewsletterSenderIdentitiesParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterSenderIdentity>>;
1676
+ listAutoPaginating(params?: Omit<ListNewsletterSenderIdentitiesParams, "cursor">): Page<NewsletterSenderIdentity>;
1677
+ }
1629
1678
  declare class NewsletterAssets extends ApiResource {
1630
1679
  list(params?: ListNewsletterAssetsParams, options?: MethodOptions): Promise<NewsletterAssetListResponse>;
1631
1680
  listAutoPaginating(params?: Omit<ListNewsletterAssetsParams, "cursor">): Page<NewsletterAsset>;
@@ -1634,6 +1683,7 @@ declare class NewsletterAssets extends ApiResource {
1634
1683
  }
1635
1684
  declare class Newsletters extends ApiResource {
1636
1685
  readonly domains: NewsletterDomains;
1686
+ readonly senderIdentities: NewsletterSenderIdentities;
1637
1687
  readonly assets: NewsletterAssets;
1638
1688
  constructor(client: ShipMailClient);
1639
1689
  create(params: CreateNewsletterParams, options?: MethodOptions): Promise<Newsletter>;
@@ -2062,4 +2112,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
2062
2112
  readonly toleranceInSeconds?: number | undefined;
2063
2113
  }): Promise<WebhookEvent>;
2064
2114
 
2065
- 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 };
2115
+ 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 ListMessageAnalyticsParams, 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 MessageAnalytics, type MessageAnalyticsPage, 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
@@ -830,6 +830,36 @@ type ListMessagesParams = PaginationParams & ({
830
830
  readonly mailbox_id?: string | undefined;
831
831
  readonly client_reference: string;
832
832
  });
833
+ type MessageAnalytics = {
834
+ readonly object: "message_analytics";
835
+ readonly id: string;
836
+ readonly mailbox_id: string;
837
+ readonly thread_id: string | null;
838
+ readonly client_reference: string | null;
839
+ readonly direction: "inbound" | "outbound";
840
+ readonly contact_addresses: readonly string[];
841
+ readonly recipient_count: number;
842
+ readonly attachment_count: number;
843
+ readonly source: MessageSource;
844
+ readonly mode: DataMode;
845
+ readonly status: MessageStatus;
846
+ readonly scheduled_at: string | null;
847
+ readonly created_at: string;
848
+ readonly updated_at: string;
849
+ };
850
+ type ListMessageAnalyticsParams = PaginationParams & {
851
+ readonly updated_after?: string | undefined;
852
+ readonly updated_before?: string | undefined;
853
+ };
854
+ type MessageAnalyticsPage = {
855
+ readonly data: readonly MessageAnalytics[];
856
+ readonly pagination: {
857
+ readonly next_cursor: string | null;
858
+ readonly has_more: boolean;
859
+ readonly limit: number;
860
+ readonly snapshot_at: string;
861
+ };
862
+ };
833
863
  type ReplyToMessageParams = {
834
864
  readonly html?: string | undefined;
835
865
  readonly text?: string | undefined;
@@ -1307,6 +1337,7 @@ declare class Messages extends ApiResource {
1307
1337
  send(params: SendMessageParams, options?: MethodOptions): Promise<Message>;
1308
1338
  list(params: ListMessagesParams, options?: MethodOptions): Promise<PaginatedResponse<Message>>;
1309
1339
  listAutoPaginating(params: Omit<ListMessagesParams, "cursor">): Page<Message>;
1340
+ listAnalytics(params?: ListMessageAnalyticsParams, options?: MethodOptions): Promise<MessageAnalyticsPage>;
1310
1341
  get(id: string, options?: MethodOptions): Promise<Message>;
1311
1342
  reply(id: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
1312
1343
  }
@@ -1343,10 +1374,25 @@ type NewsletterDomain = {
1343
1374
  readonly created_at: string;
1344
1375
  readonly updated_at: string;
1345
1376
  };
1377
+ type NewsletterSenderIdentity = {
1378
+ readonly object: "newsletter_sender_identity";
1379
+ readonly id: string;
1380
+ readonly newsletter_domain_id: string;
1381
+ readonly from_name: string;
1382
+ readonly from_address: string;
1383
+ readonly business_name: string;
1384
+ readonly postal_address: string | null;
1385
+ readonly footer_text: string | null;
1386
+ readonly domain_status: NewsletterDomainStatus;
1387
+ readonly is_default: boolean;
1388
+ readonly created_at: string;
1389
+ readonly updated_at: string;
1390
+ };
1346
1391
  type Newsletter = {
1347
1392
  readonly object: "newsletter";
1348
1393
  readonly id: string;
1349
1394
  readonly audience_id: string | null;
1395
+ readonly sender_identity_id: string;
1350
1396
  readonly newsletter_domain_id: string;
1351
1397
  readonly reply_to_mailbox_id: string | null;
1352
1398
  readonly name: string;
@@ -1438,11 +1484,10 @@ type NewsletterTestSend = {
1438
1484
  };
1439
1485
  type CreateNewsletterParams = {
1440
1486
  readonly audience_id: string;
1441
- readonly newsletter_domain_id: string;
1487
+ readonly sender_identity_id: string;
1442
1488
  readonly name: string;
1443
1489
  readonly subject: string;
1444
1490
  readonly preview_text?: string | null | undefined;
1445
- readonly from_name?: string | null | undefined;
1446
1491
  readonly body_html?: string | null | undefined;
1447
1492
  readonly body_text?: string | null | undefined;
1448
1493
  readonly blocks?: readonly NewsletterBlock[] | undefined;
@@ -1473,11 +1518,10 @@ type NewsletterChangelogEntry = {
1473
1518
  };
1474
1519
  type CreateNewsletterFromChangelogParams = {
1475
1520
  readonly audience_id: string;
1476
- readonly newsletter_domain_id: string;
1521
+ readonly sender_identity_id: string;
1477
1522
  readonly name: string;
1478
1523
  readonly subject: string;
1479
1524
  readonly preview_text?: string | null | undefined;
1480
- readonly from_name?: string | null | undefined;
1481
1525
  readonly tone?: NewsletterChangelogTone | undefined;
1482
1526
  readonly entries: readonly NewsletterChangelogEntry[];
1483
1527
  readonly final_cta?: {
@@ -1490,6 +1534,7 @@ type CreateNewsletterFromChangelogParams = {
1490
1534
  readonly styling_mode?: NewsletterStylingMode | undefined;
1491
1535
  };
1492
1536
  type ListNewsletterDomainsParams = PaginationParams;
1537
+ type ListNewsletterSenderIdentitiesParams = PaginationParams;
1493
1538
  type ListNewslettersParams = PaginationParams;
1494
1539
  type ListNewsletterAssetsParams = PaginationParams & {
1495
1540
  readonly kind?: NewsletterAssetKind | undefined;
@@ -1626,6 +1671,10 @@ declare class NewsletterDomains extends ApiResource {
1626
1671
  list(params?: ListNewsletterDomainsParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterDomain>>;
1627
1672
  listAutoPaginating(params?: Omit<ListNewsletterDomainsParams, "cursor">): Page<NewsletterDomain>;
1628
1673
  }
1674
+ declare class NewsletterSenderIdentities extends ApiResource {
1675
+ list(params?: ListNewsletterSenderIdentitiesParams, options?: MethodOptions): Promise<PaginatedResponse<NewsletterSenderIdentity>>;
1676
+ listAutoPaginating(params?: Omit<ListNewsletterSenderIdentitiesParams, "cursor">): Page<NewsletterSenderIdentity>;
1677
+ }
1629
1678
  declare class NewsletterAssets extends ApiResource {
1630
1679
  list(params?: ListNewsletterAssetsParams, options?: MethodOptions): Promise<NewsletterAssetListResponse>;
1631
1680
  listAutoPaginating(params?: Omit<ListNewsletterAssetsParams, "cursor">): Page<NewsletterAsset>;
@@ -1634,6 +1683,7 @@ declare class NewsletterAssets extends ApiResource {
1634
1683
  }
1635
1684
  declare class Newsletters extends ApiResource {
1636
1685
  readonly domains: NewsletterDomains;
1686
+ readonly senderIdentities: NewsletterSenderIdentities;
1637
1687
  readonly assets: NewsletterAssets;
1638
1688
  constructor(client: ShipMailClient);
1639
1689
  create(params: CreateNewsletterParams, options?: MethodOptions): Promise<Newsletter>;
@@ -2062,4 +2112,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
2062
2112
  readonly toleranceInSeconds?: number | undefined;
2063
2113
  }): Promise<WebhookEvent>;
2064
2114
 
2065
- 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 };
2115
+ 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 ListMessageAnalyticsParams, 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 MessageAnalytics, type MessageAnalyticsPage, 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
@@ -1038,6 +1038,19 @@ var Messages = class extends ApiResource {
1038
1038
  limit: params.limit
1039
1039
  });
1040
1040
  }
1041
+ listAnalytics(params = {}, options) {
1042
+ return this.client.request({
1043
+ method: "GET",
1044
+ path: "/messages/analytics",
1045
+ query: {
1046
+ updated_after: params.updated_after,
1047
+ updated_before: params.updated_before,
1048
+ cursor: params.cursor,
1049
+ limit: params.limit
1050
+ },
1051
+ methodOptions: options
1052
+ });
1053
+ }
1041
1054
  get(id, options) {
1042
1055
  return this.client.request({
1043
1056
  method: "GET",
@@ -1072,6 +1085,21 @@ var NewsletterDomains = class extends ApiResource {
1072
1085
  return new Page(this.client, "/newsletter-domains", { limit: params?.limit });
1073
1086
  }
1074
1087
  };
1088
+ var NewsletterSenderIdentities = class extends ApiResource {
1089
+ list(params, options) {
1090
+ return this.client.request({
1091
+ method: "GET",
1092
+ path: "/newsletter-sender-identities",
1093
+ query: { cursor: params?.cursor, limit: params?.limit },
1094
+ methodOptions: options
1095
+ });
1096
+ }
1097
+ listAutoPaginating(params) {
1098
+ return new Page(this.client, "/newsletter-sender-identities", {
1099
+ limit: params?.limit
1100
+ });
1101
+ }
1102
+ };
1075
1103
  var NewsletterAssets = class extends ApiResource {
1076
1104
  list(params, options) {
1077
1105
  return this.client.request({
@@ -1116,6 +1144,7 @@ var Newsletters = class extends ApiResource {
1116
1144
  constructor(client) {
1117
1145
  super(client);
1118
1146
  this.domains = new NewsletterDomains(client);
1147
+ this.senderIdentities = new NewsletterSenderIdentities(client);
1119
1148
  this.assets = new NewsletterAssets(client);
1120
1149
  }
1121
1150
  create(params, options) {
@@ -1535,7 +1564,7 @@ var Webhooks = class extends ApiResource {
1535
1564
  };
1536
1565
 
1537
1566
  // src/version.ts
1538
- var VERSION = "0.4.8";
1567
+ var VERSION = "0.4.10";
1539
1568
 
1540
1569
  // src/client.ts
1541
1570
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";