shipmail 0.2.2 → 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/README.md +42 -3
- package/dist/index.cjs +87 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +253 -169
- package/dist/index.d.ts +253 -169
- package/dist/index.js +87 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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", "
|
|
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", "
|
|
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"];
|
|
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];
|
|
@@ -592,6 +592,105 @@ type ImportUpload = {
|
|
|
592
592
|
readonly expires_in_seconds: number;
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
+
type Message = {
|
|
596
|
+
readonly object: "message";
|
|
597
|
+
readonly id: string;
|
|
598
|
+
readonly mailbox_id: string;
|
|
599
|
+
readonly thread_id: string | null;
|
|
600
|
+
readonly source_rfc_message_id: string | null;
|
|
601
|
+
readonly delivered_rfc_message_id: string | null;
|
|
602
|
+
readonly client_reference: string | null;
|
|
603
|
+
readonly metadata: Readonly<Record<string, string | number | boolean | null>>;
|
|
604
|
+
readonly headers: readonly OutboundHeader[];
|
|
605
|
+
readonly subject: string | null;
|
|
606
|
+
readonly from_address: string | null;
|
|
607
|
+
readonly to_addresses: readonly {
|
|
608
|
+
readonly address: string;
|
|
609
|
+
readonly name?: string | null;
|
|
610
|
+
}[] | null;
|
|
611
|
+
readonly cc_addresses: readonly {
|
|
612
|
+
readonly address: string;
|
|
613
|
+
readonly name?: string | null;
|
|
614
|
+
}[] | null;
|
|
615
|
+
readonly bcc_addresses: readonly {
|
|
616
|
+
readonly address: string;
|
|
617
|
+
readonly name?: string | null;
|
|
618
|
+
}[] | null;
|
|
619
|
+
readonly attachments: readonly {
|
|
620
|
+
readonly filename: string;
|
|
621
|
+
readonly size: number;
|
|
622
|
+
readonly content_type: string;
|
|
623
|
+
}[] | null;
|
|
624
|
+
readonly source: MessageSource;
|
|
625
|
+
readonly mode: DataMode;
|
|
626
|
+
readonly status: MessageStatus;
|
|
627
|
+
readonly scheduled_at: string | null;
|
|
628
|
+
readonly created_at: string;
|
|
629
|
+
readonly updated_at: string;
|
|
630
|
+
};
|
|
631
|
+
type Attachment = {
|
|
632
|
+
readonly filename: string;
|
|
633
|
+
readonly content: string;
|
|
634
|
+
readonly content_type?: string | undefined;
|
|
635
|
+
};
|
|
636
|
+
type OutboundHeader = {
|
|
637
|
+
readonly name: string;
|
|
638
|
+
readonly value: string;
|
|
639
|
+
};
|
|
640
|
+
type MessageMetadata = Readonly<Record<string, string | number | boolean | null>>;
|
|
641
|
+
type SendMessageParams = {
|
|
642
|
+
readonly mailbox_id?: string | undefined;
|
|
643
|
+
readonly from?: string | undefined;
|
|
644
|
+
readonly to: readonly EmailRecipientInput[];
|
|
645
|
+
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
646
|
+
readonly bcc?: readonly EmailRecipientInput[] | undefined;
|
|
647
|
+
readonly reply_to?: EmailRecipientInput | undefined;
|
|
648
|
+
readonly subject: string;
|
|
649
|
+
readonly html?: string | undefined;
|
|
650
|
+
readonly text?: string | undefined;
|
|
651
|
+
readonly in_reply_to?: string | undefined;
|
|
652
|
+
readonly references?: readonly string[] | undefined;
|
|
653
|
+
readonly attachments?: readonly Attachment[] | undefined;
|
|
654
|
+
readonly client_reference?: string | undefined;
|
|
655
|
+
readonly metadata?: MessageMetadata | undefined;
|
|
656
|
+
readonly source_rfc_message_id?: string | undefined;
|
|
657
|
+
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
658
|
+
readonly scheduled_at?: string | undefined;
|
|
659
|
+
readonly sandbox_outcome?: SandboxOutcome | undefined;
|
|
660
|
+
};
|
|
661
|
+
type ListMessagesParams = PaginationParams & ({
|
|
662
|
+
readonly mailbox_id: string;
|
|
663
|
+
readonly client_reference?: string | undefined;
|
|
664
|
+
} | {
|
|
665
|
+
readonly mailbox_id?: string | undefined;
|
|
666
|
+
readonly client_reference: string;
|
|
667
|
+
});
|
|
668
|
+
type ReplyToMessageParams = {
|
|
669
|
+
readonly html?: string | undefined;
|
|
670
|
+
readonly text?: string | undefined;
|
|
671
|
+
readonly to: readonly EmailRecipientInput[];
|
|
672
|
+
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
673
|
+
readonly client_reference?: string | undefined;
|
|
674
|
+
readonly metadata?: MessageMetadata | undefined;
|
|
675
|
+
readonly source_rfc_message_id?: string | undefined;
|
|
676
|
+
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
677
|
+
readonly scheduled_at?: string | undefined;
|
|
678
|
+
readonly sandbox_outcome?: SandboxOutcome | undefined;
|
|
679
|
+
};
|
|
680
|
+
type InjectSandboxInboundParams = {
|
|
681
|
+
readonly from: EmailRecipientInput;
|
|
682
|
+
readonly to?: readonly EmailRecipientInput[] | undefined;
|
|
683
|
+
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
684
|
+
readonly subject: string;
|
|
685
|
+
readonly text?: string | undefined;
|
|
686
|
+
readonly html?: string | undefined;
|
|
687
|
+
readonly message_id?: string | undefined;
|
|
688
|
+
readonly in_reply_to?: string | undefined;
|
|
689
|
+
readonly references?: readonly string[] | undefined;
|
|
690
|
+
readonly received_at?: string | undefined;
|
|
691
|
+
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
692
|
+
};
|
|
693
|
+
|
|
595
694
|
type AutoReply = {
|
|
596
695
|
readonly enabled: boolean;
|
|
597
696
|
readonly subject: string | null;
|
|
@@ -745,13 +844,79 @@ type InboxMessages = {
|
|
|
745
844
|
readonly address: string;
|
|
746
845
|
readonly data: readonly InboxFullMessage[];
|
|
747
846
|
readonly pagination: {
|
|
748
|
-
readonly position: number;
|
|
749
847
|
readonly limit: number;
|
|
750
848
|
readonly total: number;
|
|
751
849
|
readonly has_more: boolean;
|
|
752
|
-
readonly
|
|
850
|
+
readonly next_cursor: string | null;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
type InboxThreadReplyState = "needs_reply" | "waiting_on_contact" | "resolved" | "no_reply_expected";
|
|
854
|
+
type InboxThreadSummary = {
|
|
855
|
+
readonly object: "inbox_thread_summary";
|
|
856
|
+
readonly id: string;
|
|
857
|
+
readonly thread_id: string;
|
|
858
|
+
readonly reply_state: InboxThreadReplyState;
|
|
859
|
+
readonly reply_version: number;
|
|
860
|
+
readonly needs_reply_since: string | null;
|
|
861
|
+
readonly subject: string | null;
|
|
862
|
+
readonly latest_from_address: string | null;
|
|
863
|
+
readonly message_count: number;
|
|
864
|
+
readonly first_message_at: string;
|
|
865
|
+
readonly last_message_at: string;
|
|
866
|
+
readonly latest_message_id: string | null;
|
|
867
|
+
readonly latest_email_id: string | null;
|
|
868
|
+
readonly latest_inbound_message_id: string | null;
|
|
869
|
+
readonly latest_inbound_email_id: string | null;
|
|
870
|
+
readonly latest_inbound_at: string | null;
|
|
871
|
+
readonly latest_outbound_message_id: string | null;
|
|
872
|
+
readonly latest_outbound_email_id: string | null;
|
|
873
|
+
readonly latest_outbound_at: string | null;
|
|
874
|
+
};
|
|
875
|
+
type InboxThreads = {
|
|
876
|
+
readonly object: "inbox_threads";
|
|
877
|
+
readonly mailbox_id: string;
|
|
878
|
+
readonly data: readonly InboxThreadSummary[];
|
|
879
|
+
readonly summary: Readonly<Record<InboxThreadReplyState, number>>;
|
|
880
|
+
readonly pagination: {
|
|
881
|
+
readonly limit: number;
|
|
882
|
+
readonly has_more: boolean;
|
|
883
|
+
readonly next_cursor: string | null;
|
|
884
|
+
readonly snapshot_at: string;
|
|
753
885
|
};
|
|
754
886
|
};
|
|
887
|
+
type InboxThreadReplyStateResult = {
|
|
888
|
+
readonly object: "inbox_thread_reply_state";
|
|
889
|
+
readonly id: string;
|
|
890
|
+
readonly thread_id: string;
|
|
891
|
+
readonly reply_state: InboxThreadReplyState;
|
|
892
|
+
readonly reply_version: number;
|
|
893
|
+
readonly needs_reply_since: string | null;
|
|
894
|
+
};
|
|
895
|
+
type InboxReplyDraft = {
|
|
896
|
+
readonly object: "inbox_reply_draft";
|
|
897
|
+
readonly id: string;
|
|
898
|
+
readonly mailbox_id: string;
|
|
899
|
+
readonly thread_id: string;
|
|
900
|
+
readonly based_on_message_id: string | null;
|
|
901
|
+
readonly expected_reply_version: number;
|
|
902
|
+
readonly reply_mode: "reply" | "reply_all";
|
|
903
|
+
readonly status: "draft" | "sending" | "sent" | "invalidated" | "failed";
|
|
904
|
+
readonly to: readonly {
|
|
905
|
+
readonly address: string;
|
|
906
|
+
readonly name: string | null;
|
|
907
|
+
}[];
|
|
908
|
+
readonly cc: readonly {
|
|
909
|
+
readonly address: string;
|
|
910
|
+
readonly name: string | null;
|
|
911
|
+
}[];
|
|
912
|
+
readonly created_at: string;
|
|
913
|
+
};
|
|
914
|
+
type InboxReplyDraftSend = {
|
|
915
|
+
readonly object: "inbox_reply_draft_send";
|
|
916
|
+
readonly draft_id: string;
|
|
917
|
+
readonly status: InboxReplyDraft["status"];
|
|
918
|
+
readonly message: Message;
|
|
919
|
+
};
|
|
755
920
|
type InboxThread = {
|
|
756
921
|
readonly object: "inbox_thread";
|
|
757
922
|
readonly mailbox_id: string;
|
|
@@ -766,63 +931,6 @@ type InboxMessageAction = {
|
|
|
766
931
|
readonly message_id: string;
|
|
767
932
|
readonly ok: true;
|
|
768
933
|
};
|
|
769
|
-
type MailboxRuleMatchMode = "all" | "any";
|
|
770
|
-
type MailboxRuleCondition = {
|
|
771
|
-
readonly type: "from_is" | "from_contains" | "recipient_is" | "plus_tag_is" | "subject_contains";
|
|
772
|
-
readonly value: string;
|
|
773
|
-
} | {
|
|
774
|
-
readonly type: "has_attachment" | "list_unsubscribe_exists";
|
|
775
|
-
} | {
|
|
776
|
-
readonly type: "group";
|
|
777
|
-
readonly match_mode: MailboxRuleMatchMode;
|
|
778
|
-
readonly conditions: readonly MailboxRuleCondition[];
|
|
779
|
-
};
|
|
780
|
-
type MailboxRuleMoveTarget = {
|
|
781
|
-
readonly kind: "system";
|
|
782
|
-
readonly role: "inbox" | "archive" | "junk" | "trash";
|
|
783
|
-
} | {
|
|
784
|
-
readonly kind: "custom";
|
|
785
|
-
readonly folder_id: string;
|
|
786
|
-
};
|
|
787
|
-
type MailboxRuleAction = {
|
|
788
|
-
readonly type: "move";
|
|
789
|
-
readonly target: MailboxRuleMoveTarget;
|
|
790
|
-
} | {
|
|
791
|
-
readonly type: "mark_read";
|
|
792
|
-
} | {
|
|
793
|
-
readonly type: "star";
|
|
794
|
-
} | {
|
|
795
|
-
readonly type: "send_webhook";
|
|
796
|
-
} | {
|
|
797
|
-
readonly type: "ai_draft_reply";
|
|
798
|
-
readonly instructions: string;
|
|
799
|
-
readonly reply_mode: "reply" | "reply_all";
|
|
800
|
-
readonly agent_policy: "observe_only" | "draft_for_review";
|
|
801
|
-
};
|
|
802
|
-
type MailboxRule = {
|
|
803
|
-
readonly id: string;
|
|
804
|
-
readonly name: string;
|
|
805
|
-
readonly enabled: boolean;
|
|
806
|
-
readonly position: number;
|
|
807
|
-
readonly match_mode: MailboxRuleMatchMode;
|
|
808
|
-
readonly stop: boolean;
|
|
809
|
-
readonly conditions: readonly MailboxRuleCondition[];
|
|
810
|
-
readonly actions: readonly MailboxRuleAction[];
|
|
811
|
-
};
|
|
812
|
-
type MailboxRuleFolder = {
|
|
813
|
-
readonly id: string;
|
|
814
|
-
readonly name: string;
|
|
815
|
-
readonly parent_id: string | null;
|
|
816
|
-
readonly role: string | null;
|
|
817
|
-
readonly kind: "custom" | "system";
|
|
818
|
-
};
|
|
819
|
-
type MailboxRules = {
|
|
820
|
-
readonly object: "mailbox_rules";
|
|
821
|
-
readonly mailbox_id: string;
|
|
822
|
-
readonly address: string;
|
|
823
|
-
readonly rules: readonly MailboxRule[];
|
|
824
|
-
readonly folders: readonly MailboxRuleFolder[];
|
|
825
|
-
};
|
|
826
934
|
type MailboxForwarding = {
|
|
827
935
|
readonly object: "mailbox_forwarding";
|
|
828
936
|
readonly id: string;
|
|
@@ -874,11 +982,32 @@ type ListInboxMessagesParams = {
|
|
|
874
982
|
readonly folder_id?: string | undefined;
|
|
875
983
|
readonly folder_role?: "inbox" | "starred" | "sent" | "drafts" | "archive" | "junk" | "trash" | undefined;
|
|
876
984
|
readonly search_text?: string | undefined;
|
|
877
|
-
readonly
|
|
985
|
+
readonly cursor?: string | undefined;
|
|
986
|
+
readonly after?: string | undefined;
|
|
987
|
+
readonly before?: string | undefined;
|
|
878
988
|
readonly limit?: number | undefined;
|
|
879
989
|
readonly has_keyword?: InboxKeyword | undefined;
|
|
880
990
|
readonly not_keyword?: InboxKeyword | undefined;
|
|
881
991
|
};
|
|
992
|
+
type ListInboxThreadsParams = {
|
|
993
|
+
readonly reply_state?: InboxThreadReplyState | undefined;
|
|
994
|
+
readonly sort_by?: "needs_reply_since" | "last_message_at" | undefined;
|
|
995
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
996
|
+
readonly after?: string | undefined;
|
|
997
|
+
readonly before?: string | undefined;
|
|
998
|
+
readonly cursor?: string | undefined;
|
|
999
|
+
readonly limit?: number | undefined;
|
|
1000
|
+
};
|
|
1001
|
+
type CreateInboxReplyDraftParams = {
|
|
1002
|
+
readonly text?: string | undefined;
|
|
1003
|
+
readonly html?: string | undefined;
|
|
1004
|
+
readonly reply_mode?: "reply" | "reply_all" | undefined;
|
|
1005
|
+
readonly expected_reply_version: number;
|
|
1006
|
+
};
|
|
1007
|
+
type UpdateInboxThreadReplyStateParams = {
|
|
1008
|
+
readonly reply_state: "needs_reply" | "resolved" | "no_reply_expected";
|
|
1009
|
+
readonly expected_reply_version: number;
|
|
1010
|
+
};
|
|
882
1011
|
type DownloadInboxAttachmentParams = {
|
|
883
1012
|
readonly blob_id: string;
|
|
884
1013
|
readonly name?: string | undefined;
|
|
@@ -902,108 +1031,6 @@ type UpdateAutoReplyParams = {
|
|
|
902
1031
|
type UpdateSpamFilterParams = {
|
|
903
1032
|
readonly threshold: number;
|
|
904
1033
|
};
|
|
905
|
-
type UpdateMailboxRulesParams = {
|
|
906
|
-
readonly rules: readonly MailboxRule[];
|
|
907
|
-
};
|
|
908
|
-
|
|
909
|
-
type Message = {
|
|
910
|
-
readonly object: "message";
|
|
911
|
-
readonly id: string;
|
|
912
|
-
readonly mailbox_id: string;
|
|
913
|
-
readonly thread_id: string | null;
|
|
914
|
-
readonly source_rfc_message_id: string | null;
|
|
915
|
-
readonly delivered_rfc_message_id: string | null;
|
|
916
|
-
readonly client_reference: string | null;
|
|
917
|
-
readonly metadata: Readonly<Record<string, string | number | boolean | null>>;
|
|
918
|
-
readonly headers: readonly OutboundHeader[];
|
|
919
|
-
readonly subject: string | null;
|
|
920
|
-
readonly from_address: string | null;
|
|
921
|
-
readonly to_addresses: readonly {
|
|
922
|
-
readonly address: string;
|
|
923
|
-
readonly name?: string | null;
|
|
924
|
-
}[] | null;
|
|
925
|
-
readonly cc_addresses: readonly {
|
|
926
|
-
readonly address: string;
|
|
927
|
-
readonly name?: string | null;
|
|
928
|
-
}[] | null;
|
|
929
|
-
readonly bcc_addresses: readonly {
|
|
930
|
-
readonly address: string;
|
|
931
|
-
readonly name?: string | null;
|
|
932
|
-
}[] | null;
|
|
933
|
-
readonly attachments: readonly {
|
|
934
|
-
readonly filename: string;
|
|
935
|
-
readonly size: number;
|
|
936
|
-
readonly content_type: string;
|
|
937
|
-
}[] | null;
|
|
938
|
-
readonly source: MessageSource;
|
|
939
|
-
readonly mode: DataMode;
|
|
940
|
-
readonly status: MessageStatus;
|
|
941
|
-
readonly scheduled_at: string | null;
|
|
942
|
-
readonly created_at: string;
|
|
943
|
-
readonly updated_at: string;
|
|
944
|
-
};
|
|
945
|
-
type Attachment = {
|
|
946
|
-
readonly filename: string;
|
|
947
|
-
readonly content: string;
|
|
948
|
-
readonly content_type?: string | undefined;
|
|
949
|
-
};
|
|
950
|
-
type OutboundHeader = {
|
|
951
|
-
readonly name: string;
|
|
952
|
-
readonly value: string;
|
|
953
|
-
};
|
|
954
|
-
type MessageMetadata = Readonly<Record<string, string | number | boolean | null>>;
|
|
955
|
-
type SendMessageParams = {
|
|
956
|
-
readonly mailbox_id?: string | undefined;
|
|
957
|
-
readonly from?: string | undefined;
|
|
958
|
-
readonly to: readonly EmailRecipientInput[];
|
|
959
|
-
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
960
|
-
readonly bcc?: readonly EmailRecipientInput[] | undefined;
|
|
961
|
-
readonly reply_to?: EmailRecipientInput | undefined;
|
|
962
|
-
readonly subject: string;
|
|
963
|
-
readonly html?: string | undefined;
|
|
964
|
-
readonly text?: string | undefined;
|
|
965
|
-
readonly in_reply_to?: string | undefined;
|
|
966
|
-
readonly references?: readonly string[] | undefined;
|
|
967
|
-
readonly attachments?: readonly Attachment[] | undefined;
|
|
968
|
-
readonly client_reference?: string | undefined;
|
|
969
|
-
readonly metadata?: MessageMetadata | undefined;
|
|
970
|
-
readonly source_rfc_message_id?: string | undefined;
|
|
971
|
-
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
972
|
-
readonly scheduled_at?: string | undefined;
|
|
973
|
-
readonly sandbox_outcome?: SandboxOutcome | undefined;
|
|
974
|
-
};
|
|
975
|
-
type ListMessagesParams = PaginationParams & ({
|
|
976
|
-
readonly mailbox_id: string;
|
|
977
|
-
readonly client_reference?: string | undefined;
|
|
978
|
-
} | {
|
|
979
|
-
readonly mailbox_id?: string | undefined;
|
|
980
|
-
readonly client_reference: string;
|
|
981
|
-
});
|
|
982
|
-
type ReplyToMessageParams = {
|
|
983
|
-
readonly html?: string | undefined;
|
|
984
|
-
readonly text?: string | undefined;
|
|
985
|
-
readonly to: readonly EmailRecipientInput[];
|
|
986
|
-
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
987
|
-
readonly client_reference?: string | undefined;
|
|
988
|
-
readonly metadata?: MessageMetadata | undefined;
|
|
989
|
-
readonly source_rfc_message_id?: string | undefined;
|
|
990
|
-
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
991
|
-
readonly scheduled_at?: string | undefined;
|
|
992
|
-
readonly sandbox_outcome?: SandboxOutcome | undefined;
|
|
993
|
-
};
|
|
994
|
-
type InjectSandboxInboundParams = {
|
|
995
|
-
readonly from: EmailRecipientInput;
|
|
996
|
-
readonly to?: readonly EmailRecipientInput[] | undefined;
|
|
997
|
-
readonly cc?: readonly EmailRecipientInput[] | undefined;
|
|
998
|
-
readonly subject: string;
|
|
999
|
-
readonly text?: string | undefined;
|
|
1000
|
-
readonly html?: string | undefined;
|
|
1001
|
-
readonly message_id?: string | undefined;
|
|
1002
|
-
readonly in_reply_to?: string | undefined;
|
|
1003
|
-
readonly references?: readonly string[] | undefined;
|
|
1004
|
-
readonly received_at?: string | undefined;
|
|
1005
|
-
readonly headers?: readonly OutboundHeader[] | undefined;
|
|
1006
|
-
};
|
|
1007
1034
|
|
|
1008
1035
|
declare class Mailboxes extends ApiResource {
|
|
1009
1036
|
injectSandboxInbound(id: string, params: InjectSandboxInboundParams, options?: MethodOptions): Promise<Message>;
|
|
@@ -1023,7 +1050,12 @@ declare class Mailboxes extends ApiResource {
|
|
|
1023
1050
|
deleteFolder(id: string, folderId: string, options?: MethodOptions): Promise<void>;
|
|
1024
1051
|
listIdentities(id: string, options?: MethodOptions): Promise<MailboxIdentities>;
|
|
1025
1052
|
listInboxMessages(id: string, params?: ListInboxMessagesParams, options?: MethodOptions): Promise<InboxMessages>;
|
|
1053
|
+
getInboxMessage(id: string, messageId: string, options?: MethodOptions): Promise<InboxFullMessage>;
|
|
1054
|
+
listInboxThreads(id: string, params?: ListInboxThreadsParams, options?: MethodOptions): Promise<InboxThreads>;
|
|
1026
1055
|
getInboxThread(id: string, threadId: string, options?: MethodOptions): Promise<InboxThread>;
|
|
1056
|
+
updateInboxThreadReplyState(id: string, threadId: string, params: UpdateInboxThreadReplyStateParams, options?: MethodOptions): Promise<InboxThreadReplyStateResult>;
|
|
1057
|
+
createInboxReplyDraft(id: string, threadId: string, params: CreateInboxReplyDraftParams, options?: MethodOptions): Promise<InboxReplyDraft>;
|
|
1058
|
+
sendInboxReplyDraft(id: string, threadId: string, draftId: string, options?: MethodOptions): Promise<InboxReplyDraftSend>;
|
|
1027
1059
|
replyToInboxMessage(id: string, messageId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
1028
1060
|
replyToInboxThread(id: string, threadId: string, params: ReplyToMessageParams, options?: MethodOptions): Promise<Message>;
|
|
1029
1061
|
updateInboxMessage(id: string, messageId: string, params: UpdateInboxMessageParams, options?: MethodOptions): Promise<InboxMessageAction>;
|
|
@@ -1034,8 +1066,6 @@ declare class Mailboxes extends ApiResource {
|
|
|
1034
1066
|
listAppPasswords(id: string, options?: MethodOptions): Promise<MailboxAppPasswordList>;
|
|
1035
1067
|
createAppPassword(id: string, params: CreateMailboxAppPasswordParams, options?: OneTimeSecretMethodOptions): Promise<CreatedMailboxAppPassword>;
|
|
1036
1068
|
revokeAppPassword(id: string, appPasswordId: string, options?: MethodOptions): Promise<void>;
|
|
1037
|
-
getRules(id: string, options?: MethodOptions): Promise<MailboxRules>;
|
|
1038
|
-
updateRules(id: string, params: UpdateMailboxRulesParams, options?: MethodOptions): Promise<MailboxRules>;
|
|
1039
1069
|
listForwarding(id: string, options?: MethodOptions): Promise<MailboxForwardingList>;
|
|
1040
1070
|
createForwarding(id: string, params: CreateMailboxForwardingParams, options?: MethodOptions): Promise<MailboxForwarding>;
|
|
1041
1071
|
deleteForwarding(id: string, forwardingId: string, options?: MethodOptions): Promise<void>;
|
|
@@ -1491,6 +1521,59 @@ declare class Partner extends ApiResource {
|
|
|
1491
1521
|
usage(options?: MethodOptions): Promise<PartnerUsage>;
|
|
1492
1522
|
}
|
|
1493
1523
|
|
|
1524
|
+
type ReplyScanStatus = "completed";
|
|
1525
|
+
type ReplyScan = {
|
|
1526
|
+
readonly object: "reply_scan";
|
|
1527
|
+
readonly id: string;
|
|
1528
|
+
readonly mailbox_ids: readonly string[];
|
|
1529
|
+
readonly after: string;
|
|
1530
|
+
readonly before: string;
|
|
1531
|
+
readonly snapshot_at: string;
|
|
1532
|
+
readonly status: ReplyScanStatus;
|
|
1533
|
+
readonly candidate_count: number;
|
|
1534
|
+
readonly completed_at: string;
|
|
1535
|
+
readonly created_at: string;
|
|
1536
|
+
};
|
|
1537
|
+
type ReplyScanCandidate = {
|
|
1538
|
+
readonly object: "reply_scan_candidate";
|
|
1539
|
+
readonly id: string;
|
|
1540
|
+
readonly mailbox_id: string;
|
|
1541
|
+
readonly thread_id: string;
|
|
1542
|
+
readonly tracked_thread_id: string;
|
|
1543
|
+
readonly latest_message_id: string | null;
|
|
1544
|
+
readonly latest_email_id: string | null;
|
|
1545
|
+
readonly latest_inbound_message_id: string | null;
|
|
1546
|
+
readonly latest_inbound_email_id: string | null;
|
|
1547
|
+
readonly reply_version: number;
|
|
1548
|
+
readonly needs_reply_since: string;
|
|
1549
|
+
readonly subject: string | null;
|
|
1550
|
+
};
|
|
1551
|
+
type ReplyScanResults = {
|
|
1552
|
+
readonly object: "reply_scan_results";
|
|
1553
|
+
readonly scan_id: string;
|
|
1554
|
+
readonly data: readonly ReplyScanCandidate[];
|
|
1555
|
+
readonly pagination: {
|
|
1556
|
+
readonly limit: number;
|
|
1557
|
+
readonly has_more: boolean;
|
|
1558
|
+
readonly next_cursor: string | null;
|
|
1559
|
+
};
|
|
1560
|
+
};
|
|
1561
|
+
type CreateReplyScanParams = {
|
|
1562
|
+
readonly mailbox_ids: readonly string[];
|
|
1563
|
+
readonly after: string;
|
|
1564
|
+
readonly before?: string | undefined;
|
|
1565
|
+
};
|
|
1566
|
+
type ListReplyScanResultsParams = {
|
|
1567
|
+
readonly cursor?: string | undefined;
|
|
1568
|
+
readonly limit?: number | undefined;
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
declare class ReplyScans extends ApiResource {
|
|
1572
|
+
create(params: CreateReplyScanParams, options?: MethodOptions): Promise<ReplyScan>;
|
|
1573
|
+
get(id: string, options?: MethodOptions): Promise<ReplyScan>;
|
|
1574
|
+
listResults(id: string, params?: ListReplyScanResultsParams, options?: MethodOptions): Promise<ReplyScanResults>;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1494
1577
|
declare class Status extends ApiResource {
|
|
1495
1578
|
get(options?: MethodOptions): Promise<StatusResponse>;
|
|
1496
1579
|
}
|
|
@@ -1600,7 +1683,7 @@ type ListDeliveriesParams = PaginationParams & {
|
|
|
1600
1683
|
readonly event_type?: string | undefined;
|
|
1601
1684
|
};
|
|
1602
1685
|
type WebhookEvent<T = unknown> = {
|
|
1603
|
-
readonly version: "2026-07-
|
|
1686
|
+
readonly version: "2026-07-20";
|
|
1604
1687
|
readonly event_id: string;
|
|
1605
1688
|
readonly event_type: WebhookEventType;
|
|
1606
1689
|
readonly created_at: string;
|
|
@@ -1651,6 +1734,7 @@ declare class ShipMailClient {
|
|
|
1651
1734
|
readonly messages: Messages;
|
|
1652
1735
|
readonly newsletters: Newsletters;
|
|
1653
1736
|
readonly partner: Partner;
|
|
1737
|
+
readonly replyScans: ReplyScans;
|
|
1654
1738
|
readonly suppressions: Suppressions;
|
|
1655
1739
|
readonly threads: Threads;
|
|
1656
1740
|
readonly webhooks: Webhooks;
|
|
@@ -1739,4 +1823,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
1739
1823
|
readonly toleranceInSeconds?: number | undefined;
|
|
1740
1824
|
}): Promise<WebhookEvent>;
|
|
1741
1825
|
|
|
1742
|
-
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 CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, 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 InboxThread, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, 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
|
|
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 };
|