shipmail 0.4.16 → 0.4.17
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -24
- package/dist/index.d.ts +46 -24
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1180,14 +1180,17 @@ type InboxMessages = {
|
|
|
1180
1180
|
readonly next_cursor: string | null;
|
|
1181
1181
|
};
|
|
1182
1182
|
};
|
|
1183
|
-
type
|
|
1183
|
+
type InboxThreadAttentionState = "needs_reply" | "waiting_on_them" | "done" | "follow_up_due" | "delivery_failed" | "no_action";
|
|
1184
1184
|
type InboxThreadSummary = {
|
|
1185
1185
|
readonly object: "inbox_thread_summary";
|
|
1186
1186
|
readonly id: string;
|
|
1187
1187
|
readonly thread_id: string;
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1188
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1189
|
+
readonly version: number;
|
|
1190
|
+
readonly attention_since: string | null;
|
|
1191
|
+
readonly done_at: string | null;
|
|
1192
|
+
readonly follow_up_at: string | null;
|
|
1193
|
+
readonly assigned_member_id: string | null;
|
|
1191
1194
|
readonly subject: string | null;
|
|
1192
1195
|
readonly latest_from_address: string | null;
|
|
1193
1196
|
readonly message_count: number;
|
|
@@ -1206,7 +1209,7 @@ type InboxThreads = {
|
|
|
1206
1209
|
readonly object: "inbox_threads";
|
|
1207
1210
|
readonly mailbox_id: string;
|
|
1208
1211
|
readonly data: readonly InboxThreadSummary[];
|
|
1209
|
-
readonly summary: Readonly<Record<
|
|
1212
|
+
readonly summary: Readonly<Record<InboxThreadAttentionState, number>>;
|
|
1210
1213
|
readonly pagination: {
|
|
1211
1214
|
readonly limit: number;
|
|
1212
1215
|
readonly has_more: boolean;
|
|
@@ -1214,13 +1217,15 @@ type InboxThreads = {
|
|
|
1214
1217
|
readonly snapshot_at: string;
|
|
1215
1218
|
};
|
|
1216
1219
|
};
|
|
1217
|
-
type
|
|
1218
|
-
readonly object: "
|
|
1220
|
+
type InboxThreadAttentionResult = {
|
|
1221
|
+
readonly object: "inbox_thread_attention";
|
|
1219
1222
|
readonly id: string;
|
|
1220
1223
|
readonly thread_id: string;
|
|
1221
|
-
readonly
|
|
1222
|
-
readonly
|
|
1223
|
-
readonly
|
|
1224
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1225
|
+
readonly version: number;
|
|
1226
|
+
readonly attention_since: string | null;
|
|
1227
|
+
readonly done_at: string | null;
|
|
1228
|
+
readonly follow_up_at: string | null;
|
|
1224
1229
|
};
|
|
1225
1230
|
type InboxReplyDraft = {
|
|
1226
1231
|
readonly object: "inbox_reply_draft";
|
|
@@ -1228,7 +1233,7 @@ type InboxReplyDraft = {
|
|
|
1228
1233
|
readonly mailbox_id: string;
|
|
1229
1234
|
readonly thread_id: string;
|
|
1230
1235
|
readonly based_on_message_id: string | null;
|
|
1231
|
-
readonly
|
|
1236
|
+
readonly expected_version: number;
|
|
1232
1237
|
readonly reply_mode: "reply" | "reply_all";
|
|
1233
1238
|
readonly status: "draft" | "sending" | "sent" | "invalidated" | "failed";
|
|
1234
1239
|
readonly to: readonly {
|
|
@@ -1372,8 +1377,8 @@ type ListInboxMessagesParams = {
|
|
|
1372
1377
|
readonly not_keyword?: InboxKeyword | undefined;
|
|
1373
1378
|
};
|
|
1374
1379
|
type ListInboxThreadsParams = {
|
|
1375
|
-
readonly
|
|
1376
|
-
readonly sort_by?: "
|
|
1380
|
+
readonly attention_state?: InboxThreadAttentionState | undefined;
|
|
1381
|
+
readonly sort_by?: "attention_since" | "last_message_at" | undefined;
|
|
1377
1382
|
readonly order?: "asc" | "desc" | undefined;
|
|
1378
1383
|
readonly after?: string | undefined;
|
|
1379
1384
|
readonly before?: string | undefined;
|
|
@@ -1384,11 +1389,12 @@ type CreateInboxReplyDraftParams = {
|
|
|
1384
1389
|
readonly text?: string | undefined;
|
|
1385
1390
|
readonly html?: string | undefined;
|
|
1386
1391
|
readonly reply_mode?: "reply" | "reply_all" | undefined;
|
|
1387
|
-
readonly
|
|
1392
|
+
readonly expected_version: number;
|
|
1388
1393
|
};
|
|
1389
|
-
type
|
|
1390
|
-
readonly
|
|
1391
|
-
readonly
|
|
1394
|
+
type UpdateInboxThreadAttentionParams = {
|
|
1395
|
+
readonly done?: boolean | undefined;
|
|
1396
|
+
readonly follow_up_at?: string | null | undefined;
|
|
1397
|
+
readonly expected_version: number;
|
|
1392
1398
|
};
|
|
1393
1399
|
type DownloadInboxAttachmentParams = {
|
|
1394
1400
|
readonly blob_id: string;
|
|
@@ -1440,7 +1446,7 @@ declare class Mailboxes extends ApiResource {
|
|
|
1440
1446
|
getInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<InboxFullMessage>;
|
|
1441
1447
|
listInboxThreads(id: string, params?: ListInboxThreadsParams, options?: MethodOptions): Promise<InboxThreads>;
|
|
1442
1448
|
getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
|
|
1443
|
-
|
|
1449
|
+
updateInboxThreadAttention(id: string, threadId: string, params: UpdateInboxThreadAttentionParams, options?: MethodOptions): Promise<InboxThreadAttentionResult>;
|
|
1444
1450
|
createInboxReplyDraft(id: string, threadId: string, params: CreateInboxReplyDraftParams, options?: MethodOptions): Promise<InboxReplyDraft>;
|
|
1445
1451
|
sendInboxReplyDraft(id: string, threadId: string, draftId: string, options?: MethodOptions): Promise<InboxReplyDraftSend>;
|
|
1446
1452
|
replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
@@ -1730,17 +1736,33 @@ type PrepareNewsletterAssetUploadParams = {
|
|
|
1730
1736
|
readonly size: number;
|
|
1731
1737
|
readonly sha256: string;
|
|
1732
1738
|
};
|
|
1733
|
-
type
|
|
1739
|
+
type NewsletterAssetUploadBase = {
|
|
1734
1740
|
readonly object: "newsletter_asset_upload";
|
|
1735
|
-
readonly kind: NewsletterAssetKind;
|
|
1736
1741
|
readonly filename: string;
|
|
1737
1742
|
readonly content_type: NewsletterAssetContentType;
|
|
1738
1743
|
readonly size: number;
|
|
1739
1744
|
readonly sha256: string;
|
|
1740
1745
|
readonly upload_url: string;
|
|
1741
|
-
readonly upload_method: "
|
|
1746
|
+
readonly upload_method: "PUT";
|
|
1747
|
+
readonly upload_headers: {
|
|
1748
|
+
readonly "Content-Type": NewsletterAssetContentType;
|
|
1749
|
+
readonly "If-None-Match": "*";
|
|
1750
|
+
};
|
|
1751
|
+
readonly complete_url: string;
|
|
1752
|
+
readonly complete_method: "POST";
|
|
1742
1753
|
readonly expires_at: string;
|
|
1743
1754
|
};
|
|
1755
|
+
type NewsletterAssetUpload = (NewsletterAssetUploadBase & {
|
|
1756
|
+
readonly kind: "image";
|
|
1757
|
+
}) | (NewsletterAssetUploadBase & {
|
|
1758
|
+
readonly kind: "video";
|
|
1759
|
+
readonly thumbnail_upload_url: string;
|
|
1760
|
+
readonly thumbnail_upload_method: "PUT";
|
|
1761
|
+
readonly thumbnail_upload_headers: {
|
|
1762
|
+
readonly "Content-Type": "image/jpeg";
|
|
1763
|
+
readonly "If-None-Match": "*";
|
|
1764
|
+
};
|
|
1765
|
+
});
|
|
1744
1766
|
type RegisterNewsletterAssetFromUrlParams = {
|
|
1745
1767
|
readonly url: string;
|
|
1746
1768
|
readonly filename?: string | undefined;
|
|
@@ -1981,8 +2003,8 @@ type ReplyScanCandidate = {
|
|
|
1981
2003
|
readonly latest_email_id: string | null;
|
|
1982
2004
|
readonly latest_inbound_message_id: string | null;
|
|
1983
2005
|
readonly latest_inbound_email_id: string | null;
|
|
1984
|
-
readonly
|
|
1985
|
-
readonly
|
|
2006
|
+
readonly version: number;
|
|
2007
|
+
readonly attention_since: string;
|
|
1986
2008
|
readonly subject: string | null;
|
|
1987
2009
|
};
|
|
1988
2010
|
type ReplyScanResults = {
|
|
@@ -2270,4 +2292,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2270
2292
|
readonly toleranceInSeconds?: number | undefined;
|
|
2271
2293
|
}): Promise<WebhookEvent>;
|
|
2272
2294
|
|
|
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
|
|
2295
|
+
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
|
@@ -1180,14 +1180,17 @@ type InboxMessages = {
|
|
|
1180
1180
|
readonly next_cursor: string | null;
|
|
1181
1181
|
};
|
|
1182
1182
|
};
|
|
1183
|
-
type
|
|
1183
|
+
type InboxThreadAttentionState = "needs_reply" | "waiting_on_them" | "done" | "follow_up_due" | "delivery_failed" | "no_action";
|
|
1184
1184
|
type InboxThreadSummary = {
|
|
1185
1185
|
readonly object: "inbox_thread_summary";
|
|
1186
1186
|
readonly id: string;
|
|
1187
1187
|
readonly thread_id: string;
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1188
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1189
|
+
readonly version: number;
|
|
1190
|
+
readonly attention_since: string | null;
|
|
1191
|
+
readonly done_at: string | null;
|
|
1192
|
+
readonly follow_up_at: string | null;
|
|
1193
|
+
readonly assigned_member_id: string | null;
|
|
1191
1194
|
readonly subject: string | null;
|
|
1192
1195
|
readonly latest_from_address: string | null;
|
|
1193
1196
|
readonly message_count: number;
|
|
@@ -1206,7 +1209,7 @@ type InboxThreads = {
|
|
|
1206
1209
|
readonly object: "inbox_threads";
|
|
1207
1210
|
readonly mailbox_id: string;
|
|
1208
1211
|
readonly data: readonly InboxThreadSummary[];
|
|
1209
|
-
readonly summary: Readonly<Record<
|
|
1212
|
+
readonly summary: Readonly<Record<InboxThreadAttentionState, number>>;
|
|
1210
1213
|
readonly pagination: {
|
|
1211
1214
|
readonly limit: number;
|
|
1212
1215
|
readonly has_more: boolean;
|
|
@@ -1214,13 +1217,15 @@ type InboxThreads = {
|
|
|
1214
1217
|
readonly snapshot_at: string;
|
|
1215
1218
|
};
|
|
1216
1219
|
};
|
|
1217
|
-
type
|
|
1218
|
-
readonly object: "
|
|
1220
|
+
type InboxThreadAttentionResult = {
|
|
1221
|
+
readonly object: "inbox_thread_attention";
|
|
1219
1222
|
readonly id: string;
|
|
1220
1223
|
readonly thread_id: string;
|
|
1221
|
-
readonly
|
|
1222
|
-
readonly
|
|
1223
|
-
readonly
|
|
1224
|
+
readonly attention_state: InboxThreadAttentionState;
|
|
1225
|
+
readonly version: number;
|
|
1226
|
+
readonly attention_since: string | null;
|
|
1227
|
+
readonly done_at: string | null;
|
|
1228
|
+
readonly follow_up_at: string | null;
|
|
1224
1229
|
};
|
|
1225
1230
|
type InboxReplyDraft = {
|
|
1226
1231
|
readonly object: "inbox_reply_draft";
|
|
@@ -1228,7 +1233,7 @@ type InboxReplyDraft = {
|
|
|
1228
1233
|
readonly mailbox_id: string;
|
|
1229
1234
|
readonly thread_id: string;
|
|
1230
1235
|
readonly based_on_message_id: string | null;
|
|
1231
|
-
readonly
|
|
1236
|
+
readonly expected_version: number;
|
|
1232
1237
|
readonly reply_mode: "reply" | "reply_all";
|
|
1233
1238
|
readonly status: "draft" | "sending" | "sent" | "invalidated" | "failed";
|
|
1234
1239
|
readonly to: readonly {
|
|
@@ -1372,8 +1377,8 @@ type ListInboxMessagesParams = {
|
|
|
1372
1377
|
readonly not_keyword?: InboxKeyword | undefined;
|
|
1373
1378
|
};
|
|
1374
1379
|
type ListInboxThreadsParams = {
|
|
1375
|
-
readonly
|
|
1376
|
-
readonly sort_by?: "
|
|
1380
|
+
readonly attention_state?: InboxThreadAttentionState | undefined;
|
|
1381
|
+
readonly sort_by?: "attention_since" | "last_message_at" | undefined;
|
|
1377
1382
|
readonly order?: "asc" | "desc" | undefined;
|
|
1378
1383
|
readonly after?: string | undefined;
|
|
1379
1384
|
readonly before?: string | undefined;
|
|
@@ -1384,11 +1389,12 @@ type CreateInboxReplyDraftParams = {
|
|
|
1384
1389
|
readonly text?: string | undefined;
|
|
1385
1390
|
readonly html?: string | undefined;
|
|
1386
1391
|
readonly reply_mode?: "reply" | "reply_all" | undefined;
|
|
1387
|
-
readonly
|
|
1392
|
+
readonly expected_version: number;
|
|
1388
1393
|
};
|
|
1389
|
-
type
|
|
1390
|
-
readonly
|
|
1391
|
-
readonly
|
|
1394
|
+
type UpdateInboxThreadAttentionParams = {
|
|
1395
|
+
readonly done?: boolean | undefined;
|
|
1396
|
+
readonly follow_up_at?: string | null | undefined;
|
|
1397
|
+
readonly expected_version: number;
|
|
1392
1398
|
};
|
|
1393
1399
|
type DownloadInboxAttachmentParams = {
|
|
1394
1400
|
readonly blob_id: string;
|
|
@@ -1440,7 +1446,7 @@ declare class Mailboxes extends ApiResource {
|
|
|
1440
1446
|
getInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<InboxFullMessage>;
|
|
1441
1447
|
listInboxThreads(id: string, params?: ListInboxThreadsParams, options?: MethodOptions): Promise<InboxThreads>;
|
|
1442
1448
|
getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
|
|
1443
|
-
|
|
1449
|
+
updateInboxThreadAttention(id: string, threadId: string, params: UpdateInboxThreadAttentionParams, options?: MethodOptions): Promise<InboxThreadAttentionResult>;
|
|
1444
1450
|
createInboxReplyDraft(id: string, threadId: string, params: CreateInboxReplyDraftParams, options?: MethodOptions): Promise<InboxReplyDraft>;
|
|
1445
1451
|
sendInboxReplyDraft(id: string, threadId: string, draftId: string, options?: MethodOptions): Promise<InboxReplyDraftSend>;
|
|
1446
1452
|
replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
@@ -1730,17 +1736,33 @@ type PrepareNewsletterAssetUploadParams = {
|
|
|
1730
1736
|
readonly size: number;
|
|
1731
1737
|
readonly sha256: string;
|
|
1732
1738
|
};
|
|
1733
|
-
type
|
|
1739
|
+
type NewsletterAssetUploadBase = {
|
|
1734
1740
|
readonly object: "newsletter_asset_upload";
|
|
1735
|
-
readonly kind: NewsletterAssetKind;
|
|
1736
1741
|
readonly filename: string;
|
|
1737
1742
|
readonly content_type: NewsletterAssetContentType;
|
|
1738
1743
|
readonly size: number;
|
|
1739
1744
|
readonly sha256: string;
|
|
1740
1745
|
readonly upload_url: string;
|
|
1741
|
-
readonly upload_method: "
|
|
1746
|
+
readonly upload_method: "PUT";
|
|
1747
|
+
readonly upload_headers: {
|
|
1748
|
+
readonly "Content-Type": NewsletterAssetContentType;
|
|
1749
|
+
readonly "If-None-Match": "*";
|
|
1750
|
+
};
|
|
1751
|
+
readonly complete_url: string;
|
|
1752
|
+
readonly complete_method: "POST";
|
|
1742
1753
|
readonly expires_at: string;
|
|
1743
1754
|
};
|
|
1755
|
+
type NewsletterAssetUpload = (NewsletterAssetUploadBase & {
|
|
1756
|
+
readonly kind: "image";
|
|
1757
|
+
}) | (NewsletterAssetUploadBase & {
|
|
1758
|
+
readonly kind: "video";
|
|
1759
|
+
readonly thumbnail_upload_url: string;
|
|
1760
|
+
readonly thumbnail_upload_method: "PUT";
|
|
1761
|
+
readonly thumbnail_upload_headers: {
|
|
1762
|
+
readonly "Content-Type": "image/jpeg";
|
|
1763
|
+
readonly "If-None-Match": "*";
|
|
1764
|
+
};
|
|
1765
|
+
});
|
|
1744
1766
|
type RegisterNewsletterAssetFromUrlParams = {
|
|
1745
1767
|
readonly url: string;
|
|
1746
1768
|
readonly filename?: string | undefined;
|
|
@@ -1981,8 +2003,8 @@ type ReplyScanCandidate = {
|
|
|
1981
2003
|
readonly latest_email_id: string | null;
|
|
1982
2004
|
readonly latest_inbound_message_id: string | null;
|
|
1983
2005
|
readonly latest_inbound_email_id: string | null;
|
|
1984
|
-
readonly
|
|
1985
|
-
readonly
|
|
2006
|
+
readonly version: number;
|
|
2007
|
+
readonly attention_since: string;
|
|
1986
2008
|
readonly subject: string | null;
|
|
1987
2009
|
};
|
|
1988
2010
|
type ReplyScanResults = {
|
|
@@ -2270,4 +2292,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2270
2292
|
readonly toleranceInSeconds?: number | undefined;
|
|
2271
2293
|
}): Promise<WebhookEvent>;
|
|
2272
2294
|
|
|
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
|
|
2295
|
+
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)}`,
|
|
@@ -1617,7 +1617,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1617
1617
|
};
|
|
1618
1618
|
|
|
1619
1619
|
// src/version.ts
|
|
1620
|
-
var VERSION = "0.4.
|
|
1620
|
+
var VERSION = "0.4.17";
|
|
1621
1621
|
|
|
1622
1622
|
// src/client.ts
|
|
1623
1623
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|