shipmail 0.4.16 → 0.4.18
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 +2 -2
- package/dist/index.cjs +18 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -25
- package/dist/index.d.ts +61 -25
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -768,12 +768,24 @@ type CreateImportUploadParams = {
|
|
|
768
768
|
readonly file_name: string;
|
|
769
769
|
readonly size_bytes: number;
|
|
770
770
|
};
|
|
771
|
+
type ImportUploadPart = {
|
|
772
|
+
readonly part_number: number;
|
|
773
|
+
readonly upload_url: string;
|
|
774
|
+
};
|
|
771
775
|
type ImportUpload = {
|
|
772
776
|
readonly object: "import_upload";
|
|
773
777
|
readonly file_id: string;
|
|
774
|
-
readonly
|
|
778
|
+
readonly part_size_bytes: number;
|
|
779
|
+
readonly parts: readonly ImportUploadPart[];
|
|
775
780
|
readonly expires_in_seconds: number;
|
|
776
781
|
};
|
|
782
|
+
type CompleteImportUploadPart = {
|
|
783
|
+
readonly part_number: number;
|
|
784
|
+
readonly etag: string;
|
|
785
|
+
};
|
|
786
|
+
type CompleteImportUploadParams = {
|
|
787
|
+
readonly parts: readonly CompleteImportUploadPart[];
|
|
788
|
+
};
|
|
777
789
|
|
|
778
790
|
type MessageRuleDisposition = {
|
|
779
791
|
readonly matched_rule_ids: readonly string[];
|
|
@@ -1180,14 +1192,17 @@ type InboxMessages = {
|
|
|
1180
1192
|
readonly next_cursor: string | null;
|
|
1181
1193
|
};
|
|
1182
1194
|
};
|
|
1183
|
-
type
|
|
1195
|
+
type InboxThreadAttentionState = "needs_reply" | "waiting_on_them" | "done" | "follow_up_due" | "delivery_failed" | "no_action";
|
|
1184
1196
|
type InboxThreadSummary = {
|
|
1185
1197
|
readonly object: "inbox_thread_summary";
|
|
1186
1198
|
readonly id: string;
|
|
1187
1199
|
readonly thread_id: string;
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1200
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1201
|
+
readonly version: number;
|
|
1202
|
+
readonly attention_since: string | null;
|
|
1203
|
+
readonly done_at: string | null;
|
|
1204
|
+
readonly follow_up_at: string | null;
|
|
1205
|
+
readonly assigned_member_id: string | null;
|
|
1191
1206
|
readonly subject: string | null;
|
|
1192
1207
|
readonly latest_from_address: string | null;
|
|
1193
1208
|
readonly message_count: number;
|
|
@@ -1206,7 +1221,7 @@ type InboxThreads = {
|
|
|
1206
1221
|
readonly object: "inbox_threads";
|
|
1207
1222
|
readonly mailbox_id: string;
|
|
1208
1223
|
readonly data: readonly InboxThreadSummary[];
|
|
1209
|
-
readonly summary: Readonly<Record<
|
|
1224
|
+
readonly summary: Readonly<Record<InboxThreadAttentionState, number>>;
|
|
1210
1225
|
readonly pagination: {
|
|
1211
1226
|
readonly limit: number;
|
|
1212
1227
|
readonly has_more: boolean;
|
|
@@ -1214,13 +1229,15 @@ type InboxThreads = {
|
|
|
1214
1229
|
readonly snapshot_at: string;
|
|
1215
1230
|
};
|
|
1216
1231
|
};
|
|
1217
|
-
type
|
|
1218
|
-
readonly object: "
|
|
1232
|
+
type InboxThreadAttentionResult = {
|
|
1233
|
+
readonly object: "inbox_thread_attention";
|
|
1219
1234
|
readonly id: string;
|
|
1220
1235
|
readonly thread_id: string;
|
|
1221
|
-
readonly
|
|
1222
|
-
readonly
|
|
1223
|
-
readonly
|
|
1236
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1237
|
+
readonly version: number;
|
|
1238
|
+
readonly attention_since: string | null;
|
|
1239
|
+
readonly done_at: string | null;
|
|
1240
|
+
readonly follow_up_at: string | null;
|
|
1224
1241
|
};
|
|
1225
1242
|
type InboxReplyDraft = {
|
|
1226
1243
|
readonly object: "inbox_reply_draft";
|
|
@@ -1228,7 +1245,7 @@ type InboxReplyDraft = {
|
|
|
1228
1245
|
readonly mailbox_id: string;
|
|
1229
1246
|
readonly thread_id: string;
|
|
1230
1247
|
readonly based_on_message_id: string | null;
|
|
1231
|
-
readonly
|
|
1248
|
+
readonly expected_version: number;
|
|
1232
1249
|
readonly reply_mode: "reply" | "reply_all";
|
|
1233
1250
|
readonly status: "draft" | "sending" | "sent" | "invalidated" | "failed";
|
|
1234
1251
|
readonly to: readonly {
|
|
@@ -1372,8 +1389,8 @@ type ListInboxMessagesParams = {
|
|
|
1372
1389
|
readonly not_keyword?: InboxKeyword | undefined;
|
|
1373
1390
|
};
|
|
1374
1391
|
type ListInboxThreadsParams = {
|
|
1375
|
-
readonly
|
|
1376
|
-
readonly sort_by?: "
|
|
1392
|
+
readonly attention_state?: InboxThreadAttentionState | undefined;
|
|
1393
|
+
readonly sort_by?: "attention_since" | "last_message_at" | undefined;
|
|
1377
1394
|
readonly order?: "asc" | "desc" | undefined;
|
|
1378
1395
|
readonly after?: string | undefined;
|
|
1379
1396
|
readonly before?: string | undefined;
|
|
@@ -1384,11 +1401,12 @@ type CreateInboxReplyDraftParams = {
|
|
|
1384
1401
|
readonly text?: string | undefined;
|
|
1385
1402
|
readonly html?: string | undefined;
|
|
1386
1403
|
readonly reply_mode?: "reply" | "reply_all" | undefined;
|
|
1387
|
-
readonly
|
|
1404
|
+
readonly expected_version: number;
|
|
1388
1405
|
};
|
|
1389
|
-
type
|
|
1390
|
-
readonly
|
|
1391
|
-
readonly
|
|
1406
|
+
type UpdateInboxThreadAttentionParams = {
|
|
1407
|
+
readonly done?: boolean | undefined;
|
|
1408
|
+
readonly follow_up_at?: string | null | undefined;
|
|
1409
|
+
readonly expected_version: number;
|
|
1392
1410
|
};
|
|
1393
1411
|
type DownloadInboxAttachmentParams = {
|
|
1394
1412
|
readonly blob_id: string;
|
|
@@ -1440,7 +1458,7 @@ declare class Mailboxes extends ApiResource {
|
|
|
1440
1458
|
getInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<InboxFullMessage>;
|
|
1441
1459
|
listInboxThreads(id: string, params?: ListInboxThreadsParams, options?: MethodOptions): Promise<InboxThreads>;
|
|
1442
1460
|
getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
|
|
1443
|
-
|
|
1461
|
+
updateInboxThreadAttention(id: string, threadId: string, params: UpdateInboxThreadAttentionParams, options?: MethodOptions): Promise<InboxThreadAttentionResult>;
|
|
1444
1462
|
createInboxReplyDraft(id: string, threadId: string, params: CreateInboxReplyDraftParams, options?: MethodOptions): Promise<InboxReplyDraft>;
|
|
1445
1463
|
sendInboxReplyDraft(id: string, threadId: string, draftId: string, options?: MethodOptions): Promise<InboxReplyDraftSend>;
|
|
1446
1464
|
replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
@@ -1466,6 +1484,8 @@ declare class Mailboxes extends ApiResource {
|
|
|
1466
1484
|
cancelImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1467
1485
|
undoImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1468
1486
|
createImportUpload(id: string, params: CreateImportUploadParams, options?: MethodOptions): Promise<ImportUpload>;
|
|
1487
|
+
completeImportUpload(id: string, fileId: string, params: CompleteImportUploadParams, options?: MethodOptions): Promise<void>;
|
|
1488
|
+
abortImportUpload(id: string, fileId: string, options?: MethodOptions): Promise<void>;
|
|
1469
1489
|
}
|
|
1470
1490
|
|
|
1471
1491
|
declare class Messages extends ApiResource {
|
|
@@ -1730,17 +1750,33 @@ type PrepareNewsletterAssetUploadParams = {
|
|
|
1730
1750
|
readonly size: number;
|
|
1731
1751
|
readonly sha256: string;
|
|
1732
1752
|
};
|
|
1733
|
-
type
|
|
1753
|
+
type NewsletterAssetUploadBase = {
|
|
1734
1754
|
readonly object: "newsletter_asset_upload";
|
|
1735
|
-
readonly kind: NewsletterAssetKind;
|
|
1736
1755
|
readonly filename: string;
|
|
1737
1756
|
readonly content_type: NewsletterAssetContentType;
|
|
1738
1757
|
readonly size: number;
|
|
1739
1758
|
readonly sha256: string;
|
|
1740
1759
|
readonly upload_url: string;
|
|
1741
|
-
readonly upload_method: "
|
|
1760
|
+
readonly upload_method: "PUT";
|
|
1761
|
+
readonly upload_headers: {
|
|
1762
|
+
readonly "Content-Type": NewsletterAssetContentType;
|
|
1763
|
+
readonly "If-None-Match": "*";
|
|
1764
|
+
};
|
|
1765
|
+
readonly complete_url: string;
|
|
1766
|
+
readonly complete_method: "POST";
|
|
1742
1767
|
readonly expires_at: string;
|
|
1743
1768
|
};
|
|
1769
|
+
type NewsletterAssetUpload = (NewsletterAssetUploadBase & {
|
|
1770
|
+
readonly kind: "image";
|
|
1771
|
+
}) | (NewsletterAssetUploadBase & {
|
|
1772
|
+
readonly kind: "video";
|
|
1773
|
+
readonly thumbnail_upload_url: string;
|
|
1774
|
+
readonly thumbnail_upload_method: "PUT";
|
|
1775
|
+
readonly thumbnail_upload_headers: {
|
|
1776
|
+
readonly "Content-Type": "image/jpeg";
|
|
1777
|
+
readonly "If-None-Match": "*";
|
|
1778
|
+
};
|
|
1779
|
+
});
|
|
1744
1780
|
type RegisterNewsletterAssetFromUrlParams = {
|
|
1745
1781
|
readonly url: string;
|
|
1746
1782
|
readonly filename?: string | undefined;
|
|
@@ -1981,8 +2017,8 @@ type ReplyScanCandidate = {
|
|
|
1981
2017
|
readonly latest_email_id: string | null;
|
|
1982
2018
|
readonly latest_inbound_message_id: string | null;
|
|
1983
2019
|
readonly latest_inbound_email_id: string | null;
|
|
1984
|
-
readonly
|
|
1985
|
-
readonly
|
|
2020
|
+
readonly version: number;
|
|
2021
|
+
readonly attention_since: string;
|
|
1986
2022
|
readonly subject: string | null;
|
|
1987
2023
|
};
|
|
1988
2024
|
type ReplyScanResults = {
|
|
@@ -2270,4 +2306,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2270
2306
|
readonly toleranceInSeconds?: number | undefined;
|
|
2271
2307
|
}): Promise<WebhookEvent>;
|
|
2272
2308
|
|
|
2273
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, 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
|
|
2309
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, 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 InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, 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 NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, 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 PrepareNewsletterAssetUploadParams, 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 UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, 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
|
@@ -768,12 +768,24 @@ type CreateImportUploadParams = {
|
|
|
768
768
|
readonly file_name: string;
|
|
769
769
|
readonly size_bytes: number;
|
|
770
770
|
};
|
|
771
|
+
type ImportUploadPart = {
|
|
772
|
+
readonly part_number: number;
|
|
773
|
+
readonly upload_url: string;
|
|
774
|
+
};
|
|
771
775
|
type ImportUpload = {
|
|
772
776
|
readonly object: "import_upload";
|
|
773
777
|
readonly file_id: string;
|
|
774
|
-
readonly
|
|
778
|
+
readonly part_size_bytes: number;
|
|
779
|
+
readonly parts: readonly ImportUploadPart[];
|
|
775
780
|
readonly expires_in_seconds: number;
|
|
776
781
|
};
|
|
782
|
+
type CompleteImportUploadPart = {
|
|
783
|
+
readonly part_number: number;
|
|
784
|
+
readonly etag: string;
|
|
785
|
+
};
|
|
786
|
+
type CompleteImportUploadParams = {
|
|
787
|
+
readonly parts: readonly CompleteImportUploadPart[];
|
|
788
|
+
};
|
|
777
789
|
|
|
778
790
|
type MessageRuleDisposition = {
|
|
779
791
|
readonly matched_rule_ids: readonly string[];
|
|
@@ -1180,14 +1192,17 @@ type InboxMessages = {
|
|
|
1180
1192
|
readonly next_cursor: string | null;
|
|
1181
1193
|
};
|
|
1182
1194
|
};
|
|
1183
|
-
type
|
|
1195
|
+
type InboxThreadAttentionState = "needs_reply" | "waiting_on_them" | "done" | "follow_up_due" | "delivery_failed" | "no_action";
|
|
1184
1196
|
type InboxThreadSummary = {
|
|
1185
1197
|
readonly object: "inbox_thread_summary";
|
|
1186
1198
|
readonly id: string;
|
|
1187
1199
|
readonly thread_id: string;
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1200
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1201
|
+
readonly version: number;
|
|
1202
|
+
readonly attention_since: string | null;
|
|
1203
|
+
readonly done_at: string | null;
|
|
1204
|
+
readonly follow_up_at: string | null;
|
|
1205
|
+
readonly assigned_member_id: string | null;
|
|
1191
1206
|
readonly subject: string | null;
|
|
1192
1207
|
readonly latest_from_address: string | null;
|
|
1193
1208
|
readonly message_count: number;
|
|
@@ -1206,7 +1221,7 @@ type InboxThreads = {
|
|
|
1206
1221
|
readonly object: "inbox_threads";
|
|
1207
1222
|
readonly mailbox_id: string;
|
|
1208
1223
|
readonly data: readonly InboxThreadSummary[];
|
|
1209
|
-
readonly summary: Readonly<Record<
|
|
1224
|
+
readonly summary: Readonly<Record<InboxThreadAttentionState, number>>;
|
|
1210
1225
|
readonly pagination: {
|
|
1211
1226
|
readonly limit: number;
|
|
1212
1227
|
readonly has_more: boolean;
|
|
@@ -1214,13 +1229,15 @@ type InboxThreads = {
|
|
|
1214
1229
|
readonly snapshot_at: string;
|
|
1215
1230
|
};
|
|
1216
1231
|
};
|
|
1217
|
-
type
|
|
1218
|
-
readonly object: "
|
|
1232
|
+
type InboxThreadAttentionResult = {
|
|
1233
|
+
readonly object: "inbox_thread_attention";
|
|
1219
1234
|
readonly id: string;
|
|
1220
1235
|
readonly thread_id: string;
|
|
1221
|
-
readonly
|
|
1222
|
-
readonly
|
|
1223
|
-
readonly
|
|
1236
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1237
|
+
readonly version: number;
|
|
1238
|
+
readonly attention_since: string | null;
|
|
1239
|
+
readonly done_at: string | null;
|
|
1240
|
+
readonly follow_up_at: string | null;
|
|
1224
1241
|
};
|
|
1225
1242
|
type InboxReplyDraft = {
|
|
1226
1243
|
readonly object: "inbox_reply_draft";
|
|
@@ -1228,7 +1245,7 @@ type InboxReplyDraft = {
|
|
|
1228
1245
|
readonly mailbox_id: string;
|
|
1229
1246
|
readonly thread_id: string;
|
|
1230
1247
|
readonly based_on_message_id: string | null;
|
|
1231
|
-
readonly
|
|
1248
|
+
readonly expected_version: number;
|
|
1232
1249
|
readonly reply_mode: "reply" | "reply_all";
|
|
1233
1250
|
readonly status: "draft" | "sending" | "sent" | "invalidated" | "failed";
|
|
1234
1251
|
readonly to: readonly {
|
|
@@ -1372,8 +1389,8 @@ type ListInboxMessagesParams = {
|
|
|
1372
1389
|
readonly not_keyword?: InboxKeyword | undefined;
|
|
1373
1390
|
};
|
|
1374
1391
|
type ListInboxThreadsParams = {
|
|
1375
|
-
readonly
|
|
1376
|
-
readonly sort_by?: "
|
|
1392
|
+
readonly attention_state?: InboxThreadAttentionState | undefined;
|
|
1393
|
+
readonly sort_by?: "attention_since" | "last_message_at" | undefined;
|
|
1377
1394
|
readonly order?: "asc" | "desc" | undefined;
|
|
1378
1395
|
readonly after?: string | undefined;
|
|
1379
1396
|
readonly before?: string | undefined;
|
|
@@ -1384,11 +1401,12 @@ type CreateInboxReplyDraftParams = {
|
|
|
1384
1401
|
readonly text?: string | undefined;
|
|
1385
1402
|
readonly html?: string | undefined;
|
|
1386
1403
|
readonly reply_mode?: "reply" | "reply_all" | undefined;
|
|
1387
|
-
readonly
|
|
1404
|
+
readonly expected_version: number;
|
|
1388
1405
|
};
|
|
1389
|
-
type
|
|
1390
|
-
readonly
|
|
1391
|
-
readonly
|
|
1406
|
+
type UpdateInboxThreadAttentionParams = {
|
|
1407
|
+
readonly done?: boolean | undefined;
|
|
1408
|
+
readonly follow_up_at?: string | null | undefined;
|
|
1409
|
+
readonly expected_version: number;
|
|
1392
1410
|
};
|
|
1393
1411
|
type DownloadInboxAttachmentParams = {
|
|
1394
1412
|
readonly blob_id: string;
|
|
@@ -1440,7 +1458,7 @@ declare class Mailboxes extends ApiResource {
|
|
|
1440
1458
|
getInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<InboxFullMessage>;
|
|
1441
1459
|
listInboxThreads(id: string, params?: ListInboxThreadsParams, options?: MethodOptions): Promise<InboxThreads>;
|
|
1442
1460
|
getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
|
|
1443
|
-
|
|
1461
|
+
updateInboxThreadAttention(id: string, threadId: string, params: UpdateInboxThreadAttentionParams, options?: MethodOptions): Promise<InboxThreadAttentionResult>;
|
|
1444
1462
|
createInboxReplyDraft(id: string, threadId: string, params: CreateInboxReplyDraftParams, options?: MethodOptions): Promise<InboxReplyDraft>;
|
|
1445
1463
|
sendInboxReplyDraft(id: string, threadId: string, draftId: string, options?: MethodOptions): Promise<InboxReplyDraftSend>;
|
|
1446
1464
|
replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
@@ -1466,6 +1484,8 @@ declare class Mailboxes extends ApiResource {
|
|
|
1466
1484
|
cancelImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1467
1485
|
undoImport(id: string, importId: string, options?: MethodOptions): Promise<MailboxImport>;
|
|
1468
1486
|
createImportUpload(id: string, params: CreateImportUploadParams, options?: MethodOptions): Promise<ImportUpload>;
|
|
1487
|
+
completeImportUpload(id: string, fileId: string, params: CompleteImportUploadParams, options?: MethodOptions): Promise<void>;
|
|
1488
|
+
abortImportUpload(id: string, fileId: string, options?: MethodOptions): Promise<void>;
|
|
1469
1489
|
}
|
|
1470
1490
|
|
|
1471
1491
|
declare class Messages extends ApiResource {
|
|
@@ -1730,17 +1750,33 @@ type PrepareNewsletterAssetUploadParams = {
|
|
|
1730
1750
|
readonly size: number;
|
|
1731
1751
|
readonly sha256: string;
|
|
1732
1752
|
};
|
|
1733
|
-
type
|
|
1753
|
+
type NewsletterAssetUploadBase = {
|
|
1734
1754
|
readonly object: "newsletter_asset_upload";
|
|
1735
|
-
readonly kind: NewsletterAssetKind;
|
|
1736
1755
|
readonly filename: string;
|
|
1737
1756
|
readonly content_type: NewsletterAssetContentType;
|
|
1738
1757
|
readonly size: number;
|
|
1739
1758
|
readonly sha256: string;
|
|
1740
1759
|
readonly upload_url: string;
|
|
1741
|
-
readonly upload_method: "
|
|
1760
|
+
readonly upload_method: "PUT";
|
|
1761
|
+
readonly upload_headers: {
|
|
1762
|
+
readonly "Content-Type": NewsletterAssetContentType;
|
|
1763
|
+
readonly "If-None-Match": "*";
|
|
1764
|
+
};
|
|
1765
|
+
readonly complete_url: string;
|
|
1766
|
+
readonly complete_method: "POST";
|
|
1742
1767
|
readonly expires_at: string;
|
|
1743
1768
|
};
|
|
1769
|
+
type NewsletterAssetUpload = (NewsletterAssetUploadBase & {
|
|
1770
|
+
readonly kind: "image";
|
|
1771
|
+
}) | (NewsletterAssetUploadBase & {
|
|
1772
|
+
readonly kind: "video";
|
|
1773
|
+
readonly thumbnail_upload_url: string;
|
|
1774
|
+
readonly thumbnail_upload_method: "PUT";
|
|
1775
|
+
readonly thumbnail_upload_headers: {
|
|
1776
|
+
readonly "Content-Type": "image/jpeg";
|
|
1777
|
+
readonly "If-None-Match": "*";
|
|
1778
|
+
};
|
|
1779
|
+
});
|
|
1744
1780
|
type RegisterNewsletterAssetFromUrlParams = {
|
|
1745
1781
|
readonly url: string;
|
|
1746
1782
|
readonly filename?: string | undefined;
|
|
@@ -1981,8 +2017,8 @@ type ReplyScanCandidate = {
|
|
|
1981
2017
|
readonly latest_email_id: string | null;
|
|
1982
2018
|
readonly latest_inbound_message_id: string | null;
|
|
1983
2019
|
readonly latest_inbound_email_id: string | null;
|
|
1984
|
-
readonly
|
|
1985
|
-
readonly
|
|
2020
|
+
readonly version: number;
|
|
2021
|
+
readonly attention_since: string;
|
|
1986
2022
|
readonly subject: string | null;
|
|
1987
2023
|
};
|
|
1988
2024
|
type ReplyScanResults = {
|
|
@@ -2270,4 +2306,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2270
2306
|
readonly toleranceInSeconds?: number | undefined;
|
|
2271
2307
|
}): Promise<WebhookEvent>;
|
|
2272
2308
|
|
|
2273
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, 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
|
|
2309
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, 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 EmailAuthVerdict, type EmailAuthenticationResults, 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 InboxThreadAttentionResult, type InboxThreadAttentionState, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, 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 NewsletterAssetContentType, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterAssetUpload, 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 PrepareNewsletterAssetUploadParams, 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 UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadAttentionParams, 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
|
@@ -833,7 +833,7 @@ var Mailboxes = class extends ApiResource {
|
|
|
833
833
|
method: "GET",
|
|
834
834
|
path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads`,
|
|
835
835
|
query: {
|
|
836
|
-
|
|
836
|
+
attention_state: params?.attention_state,
|
|
837
837
|
sort_by: params?.sort_by,
|
|
838
838
|
order: params?.order,
|
|
839
839
|
after: params?.after,
|
|
@@ -851,7 +851,7 @@ var Mailboxes = class extends ApiResource {
|
|
|
851
851
|
methodOptions: options
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
|
-
|
|
854
|
+
updateInboxThreadAttention(id, threadId, params, options) {
|
|
855
855
|
return this.client.request({
|
|
856
856
|
method: "PATCH",
|
|
857
857
|
path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads/${encodeURIComponent(threadId)}`,
|
|
@@ -1051,6 +1051,21 @@ var Mailboxes = class extends ApiResource {
|
|
|
1051
1051
|
methodOptions: options
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
+
completeImportUpload(id, fileId, params, options) {
|
|
1055
|
+
return this.client.request({
|
|
1056
|
+
method: "POST",
|
|
1057
|
+
path: `/mailboxes/${encodeURIComponent(id)}/imports/files/${encodeURIComponent(fileId)}/complete`,
|
|
1058
|
+
body: params,
|
|
1059
|
+
methodOptions: options
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
abortImportUpload(id, fileId, options) {
|
|
1063
|
+
return this.client.request({
|
|
1064
|
+
method: "DELETE",
|
|
1065
|
+
path: `/mailboxes/${encodeURIComponent(id)}/imports/files/${encodeURIComponent(fileId)}`,
|
|
1066
|
+
methodOptions: options
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1054
1069
|
};
|
|
1055
1070
|
|
|
1056
1071
|
// src/resources/messages.ts
|
|
@@ -1617,7 +1632,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1617
1632
|
};
|
|
1618
1633
|
|
|
1619
1634
|
// src/version.ts
|
|
1620
|
-
var VERSION = "0.4.
|
|
1635
|
+
var VERSION = "0.4.18";
|
|
1621
1636
|
|
|
1622
1637
|
// src/client.ts
|
|
1623
1638
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|