shipmail 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -53,9 +53,9 @@ type EmailRecipient = {
53
53
  readonly name?: string | null | undefined;
54
54
  };
55
55
  type EmailRecipientInput = EmailRecipient | string;
56
- declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
56
+ declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
57
57
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
58
- declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
58
+ declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
59
59
  type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
60
60
  type StatusResponse = {
61
61
  readonly status: string;
@@ -67,7 +67,7 @@ declare const DOMAIN_STATUSES: readonly ["pending", "verifying", "verified", "de
67
67
  type DomainStatus = (typeof DOMAIN_STATUSES)[number];
68
68
  declare const MESSAGE_STATUSES: readonly ["scheduled", "queued", "sent", "delivered", "bounced", "complained", "failed", "suppressed", "cancelled"];
69
69
  type MessageStatus = (typeof MESSAGE_STATUSES)[number];
70
- declare const MESSAGE_SOURCES: readonly ["api", "newsletter", "dashboard", "inbound", "smtp", "agent"];
70
+ declare const MESSAGE_SOURCES: readonly ["api", "newsletter", "dashboard", "inbound", "smtp", "assistant"];
71
71
  type MessageSource = (typeof MESSAGE_SOURCES)[number];
72
72
  declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed"];
73
73
  type WebhookDeliveryStatus = (typeof WEBHOOK_DELIVERY_STATUSES)[number];
@@ -931,63 +931,6 @@ type InboxMessageAction = {
931
931
  readonly message_id: string;
932
932
  readonly ok: true;
933
933
  };
934
- type MailboxRuleMatchMode = "all" | "any";
935
- type MailboxRuleCondition = {
936
- readonly type: "from_is" | "from_contains" | "recipient_is" | "plus_tag_is" | "subject_contains";
937
- readonly value: string;
938
- } | {
939
- readonly type: "has_attachment" | "list_unsubscribe_exists";
940
- } | {
941
- readonly type: "group";
942
- readonly match_mode: MailboxRuleMatchMode;
943
- readonly conditions: readonly MailboxRuleCondition[];
944
- };
945
- type MailboxRuleMoveTarget = {
946
- readonly kind: "system";
947
- readonly role: "inbox" | "archive" | "junk" | "trash";
948
- } | {
949
- readonly kind: "custom";
950
- readonly folder_id: string;
951
- };
952
- type MailboxRuleAction = {
953
- readonly type: "move";
954
- readonly target: MailboxRuleMoveTarget;
955
- } | {
956
- readonly type: "mark_read";
957
- } | {
958
- readonly type: "star";
959
- } | {
960
- readonly type: "send_webhook";
961
- } | {
962
- readonly type: "ai_draft_reply";
963
- readonly instructions: string;
964
- readonly reply_mode: "reply" | "reply_all";
965
- readonly agent_policy: "observe_only" | "draft_for_review";
966
- };
967
- type MailboxRule = {
968
- readonly id: string;
969
- readonly name: string;
970
- readonly enabled: boolean;
971
- readonly position: number;
972
- readonly match_mode: MailboxRuleMatchMode;
973
- readonly stop: boolean;
974
- readonly conditions: readonly MailboxRuleCondition[];
975
- readonly actions: readonly MailboxRuleAction[];
976
- };
977
- type MailboxRuleFolder = {
978
- readonly id: string;
979
- readonly name: string;
980
- readonly parent_id: string | null;
981
- readonly role: string | null;
982
- readonly kind: "custom" | "system";
983
- };
984
- type MailboxRules = {
985
- readonly object: "mailbox_rules";
986
- readonly mailbox_id: string;
987
- readonly address: string;
988
- readonly rules: readonly MailboxRule[];
989
- readonly folders: readonly MailboxRuleFolder[];
990
- };
991
934
  type MailboxForwarding = {
992
935
  readonly object: "mailbox_forwarding";
993
936
  readonly id: string;
@@ -1088,9 +1031,6 @@ type UpdateAutoReplyParams = {
1088
1031
  type UpdateSpamFilterParams = {
1089
1032
  readonly threshold: number;
1090
1033
  };
1091
- type UpdateMailboxRulesParams = {
1092
- readonly rules: readonly MailboxRule[];
1093
- };
1094
1034
 
1095
1035
  declare class Mailboxes extends ApiResource {
1096
1036
  injectSandboxInbound(id: string, params: InjectSandboxInboundParams, options?: MethodOptions): Promise<Message>;
@@ -1126,8 +1066,6 @@ declare class Mailboxes extends ApiResource {
1126
1066
  listAppPasswords(id: string, options?: MethodOptions): Promise<MailboxAppPasswordList>;
1127
1067
  createAppPassword(id: string, params: CreateMailboxAppPasswordParams, options?: OneTimeSecretMethodOptions): Promise<CreatedMailboxAppPassword>;
1128
1068
  revokeAppPassword(id: string, appPasswordId: string, options?: MethodOptions): Promise<void>;
1129
- getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
1130
- updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
1131
1069
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
1132
1070
  createForwarding(id: string, params: CreateMailboxForwardingParams, options?: MethodOptions): Promise<MailboxForwarding>;
1133
1071
  deleteForwarding(id: string, forwardingId: string, options?: MethodOptions): Promise<void>;
@@ -1885,4 +1823,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1885
1823
  readonly toleranceInSeconds?: number | undefined;
1886
1824
  }): Promise<WebhookEvent>;
1887
1825
 
1888
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, 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 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 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 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, 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 SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, 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 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 };
1826
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, 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 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 MergeFields, type Message, type MessageMetadata, 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 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, 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 SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, 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
@@ -53,9 +53,9 @@ type EmailRecipient = {
53
53
  readonly name?: string | null | undefined;
54
54
  };
55
55
  type EmailRecipientInput = EmailRecipient | string;
56
- declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
56
+ declare const WEBHOOK_EVENT_TYPES: readonly ["message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
57
57
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
58
- declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "mailbox.rule_matched", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
58
+ declare const WEBHOOK_DELIVERY_EVENT_TYPES: readonly ["webhook.test", "message.received", "message.sent", "message.delivered", "message.bounced", "message.complained", "thread.needs_reply", "domain.verified", "domain.verification_failed", "domain.degraded", "org.reputation_warning", "org.sending_throttled", "org.sending_suspended", "org.reputation_recovered"];
59
59
  type WebhookDeliveryEventType = (typeof WEBHOOK_DELIVERY_EVENT_TYPES)[number];
60
60
  type StatusResponse = {
61
61
  readonly status: string;
@@ -67,7 +67,7 @@ declare const DOMAIN_STATUSES: readonly ["pending", "verifying", "verified", "de
67
67
  type DomainStatus = (typeof DOMAIN_STATUSES)[number];
68
68
  declare const MESSAGE_STATUSES: readonly ["scheduled", "queued", "sent", "delivered", "bounced", "complained", "failed", "suppressed", "cancelled"];
69
69
  type MessageStatus = (typeof MESSAGE_STATUSES)[number];
70
- declare const MESSAGE_SOURCES: readonly ["api", "newsletter", "dashboard", "inbound", "smtp", "agent"];
70
+ declare const MESSAGE_SOURCES: readonly ["api", "newsletter", "dashboard", "inbound", "smtp", "assistant"];
71
71
  type MessageSource = (typeof MESSAGE_SOURCES)[number];
72
72
  declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed"];
73
73
  type WebhookDeliveryStatus = (typeof WEBHOOK_DELIVERY_STATUSES)[number];
@@ -931,63 +931,6 @@ type InboxMessageAction = {
931
931
  readonly message_id: string;
932
932
  readonly ok: true;
933
933
  };
934
- type MailboxRuleMatchMode = "all" | "any";
935
- type MailboxRuleCondition = {
936
- readonly type: "from_is" | "from_contains" | "recipient_is" | "plus_tag_is" | "subject_contains";
937
- readonly value: string;
938
- } | {
939
- readonly type: "has_attachment" | "list_unsubscribe_exists";
940
- } | {
941
- readonly type: "group";
942
- readonly match_mode: MailboxRuleMatchMode;
943
- readonly conditions: readonly MailboxRuleCondition[];
944
- };
945
- type MailboxRuleMoveTarget = {
946
- readonly kind: "system";
947
- readonly role: "inbox" | "archive" | "junk" | "trash";
948
- } | {
949
- readonly kind: "custom";
950
- readonly folder_id: string;
951
- };
952
- type MailboxRuleAction = {
953
- readonly type: "move";
954
- readonly target: MailboxRuleMoveTarget;
955
- } | {
956
- readonly type: "mark_read";
957
- } | {
958
- readonly type: "star";
959
- } | {
960
- readonly type: "send_webhook";
961
- } | {
962
- readonly type: "ai_draft_reply";
963
- readonly instructions: string;
964
- readonly reply_mode: "reply" | "reply_all";
965
- readonly agent_policy: "observe_only" | "draft_for_review";
966
- };
967
- type MailboxRule = {
968
- readonly id: string;
969
- readonly name: string;
970
- readonly enabled: boolean;
971
- readonly position: number;
972
- readonly match_mode: MailboxRuleMatchMode;
973
- readonly stop: boolean;
974
- readonly conditions: readonly MailboxRuleCondition[];
975
- readonly actions: readonly MailboxRuleAction[];
976
- };
977
- type MailboxRuleFolder = {
978
- readonly id: string;
979
- readonly name: string;
980
- readonly parent_id: string | null;
981
- readonly role: string | null;
982
- readonly kind: "custom" | "system";
983
- };
984
- type MailboxRules = {
985
- readonly object: "mailbox_rules";
986
- readonly mailbox_id: string;
987
- readonly address: string;
988
- readonly rules: readonly MailboxRule[];
989
- readonly folders: readonly MailboxRuleFolder[];
990
- };
991
934
  type MailboxForwarding = {
992
935
  readonly object: "mailbox_forwarding";
993
936
  readonly id: string;
@@ -1088,9 +1031,6 @@ type UpdateAutoReplyParams = {
1088
1031
  type UpdateSpamFilterParams = {
1089
1032
  readonly threshold: number;
1090
1033
  };
1091
- type UpdateMailboxRulesParams = {
1092
- readonly rules: readonly MailboxRule[];
1093
- };
1094
1034
 
1095
1035
  declare class Mailboxes extends ApiResource {
1096
1036
  injectSandboxInbound(id: string, params: InjectSandboxInboundParams, options?: MethodOptions): Promise<Message>;
@@ -1126,8 +1066,6 @@ declare class Mailboxes extends ApiResource {
1126
1066
  listAppPasswords(id: string, options?: MethodOptions): Promise<MailboxAppPasswordList>;
1127
1067
  createAppPassword(id: string, params: CreateMailboxAppPasswordParams, options?: OneTimeSecretMethodOptions): Promise<CreatedMailboxAppPassword>;
1128
1068
  revokeAppPassword(id: string, appPasswordId: string, options?: MethodOptions): Promise<void>;
1129
- getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
1130
- updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
1131
1069
  listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
1132
1070
  createForwarding(id: string, params: CreateMailboxForwardingParams, options?: MethodOptions): Promise<MailboxForwarding>;
1133
1071
  deleteForwarding(id: string, forwardingId: string, options?: MethodOptions): Promise<void>;
@@ -1885,4 +1823,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1885
1823
  readonly toleranceInSeconds?: number | undefined;
1886
1824
  }): Promise<WebhookEvent>;
1887
1825
 
1888
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, 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 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 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 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, 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 SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, 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 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 };
1826
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, 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 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 MergeFields, type Message, type MessageMetadata, 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 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, 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 SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, 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
@@ -763,21 +763,6 @@ var Mailboxes = class extends ApiResource {
763
763
  methodOptions: options
764
764
  });
765
765
  }
766
- getRules(id, options) {
767
- return this.client.request({
768
- method: "GET",
769
- path: `/mailboxes/${encodeURIComponent(id)}/rules`,
770
- methodOptions: options
771
- });
772
- }
773
- updateRules(id, params, options) {
774
- return this.client.request({
775
- method: "PUT",
776
- path: `/mailboxes/${encodeURIComponent(id)}/rules`,
777
- body: params,
778
- methodOptions: options
779
- });
780
- }
781
766
  listForwarding(id, options) {
782
767
  return this.client.request({
783
768
  method: "GET",
@@ -1351,7 +1336,7 @@ var Webhooks = class extends ApiResource {
1351
1336
  };
1352
1337
 
1353
1338
  // src/version.ts
1354
- var VERSION = "0.2.3";
1339
+ var VERSION = "0.3.0";
1355
1340
 
1356
1341
  // src/client.ts
1357
1342
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1524,7 +1509,6 @@ var WEBHOOK_EVENT_TYPES = [
1524
1509
  "message.bounced",
1525
1510
  "message.complained",
1526
1511
  "thread.needs_reply",
1527
- "mailbox.rule_matched",
1528
1512
  "domain.verified",
1529
1513
  "domain.verification_failed",
1530
1514
  "domain.degraded",
@@ -1552,7 +1536,7 @@ var MESSAGE_SOURCES = [
1552
1536
  "dashboard",
1553
1537
  "inbound",
1554
1538
  "smtp",
1555
- "agent"
1539
+ "assistant"
1556
1540
  ];
1557
1541
  var WEBHOOK_DELIVERY_STATUSES = ["pending", "delivered", "failed"];
1558
1542