resend 6.32.0 → 6.32.1-preview-inboxes.1
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.cjs +216 -1
- package/dist/index.d.cts +551 -3
- package/dist/index.d.mts +551 -3
- package/dist/index.mjs +214 -2
- package/package.json +1 -1
- package/readme.md +16 -0
package/dist/index.d.cts
CHANGED
|
@@ -1760,6 +1760,403 @@ export interface UpdateEventResponseSuccess {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
export type UpdateEventResponse = Response<UpdateEventResponseSuccess>;
|
|
1762
1762
|
//#endregion
|
|
1763
|
+
//#region src/inboxes/drafts/interfaces/draft.d.ts
|
|
1764
|
+
type InboxDraftType = 'standalone' | 'reply';
|
|
1765
|
+
interface InboxDraft {
|
|
1766
|
+
object: 'inbox_draft';
|
|
1767
|
+
id: string;
|
|
1768
|
+
type: InboxDraftType;
|
|
1769
|
+
to: string[] | null;
|
|
1770
|
+
cc: string[];
|
|
1771
|
+
bcc: string[];
|
|
1772
|
+
subject: string | null;
|
|
1773
|
+
html: string | null;
|
|
1774
|
+
text: string | null;
|
|
1775
|
+
thread_id: string | null;
|
|
1776
|
+
reply_to_email_id: string | null;
|
|
1777
|
+
email_id: string | null;
|
|
1778
|
+
created_at: string;
|
|
1779
|
+
updated_at: string;
|
|
1780
|
+
}
|
|
1781
|
+
interface InboxDraftListItem {
|
|
1782
|
+
id: string;
|
|
1783
|
+
type: InboxDraftType;
|
|
1784
|
+
to: string[] | null;
|
|
1785
|
+
cc: string[];
|
|
1786
|
+
bcc: string[];
|
|
1787
|
+
subject: string | null;
|
|
1788
|
+
snippet: string | null;
|
|
1789
|
+
thread_id: string | null;
|
|
1790
|
+
reply_to_email_id: string | null;
|
|
1791
|
+
updated_at: string;
|
|
1792
|
+
}
|
|
1793
|
+
//#endregion
|
|
1794
|
+
//#region src/inboxes/drafts/interfaces/create-inbox-draft.interface.d.ts
|
|
1795
|
+
type CreateInboxDraftContent = RequireAtLeastOne<{
|
|
1796
|
+
to?: string | string[];
|
|
1797
|
+
cc?: string | string[];
|
|
1798
|
+
bcc?: string | string[];
|
|
1799
|
+
subject?: string | null;
|
|
1800
|
+
text?: string | null;
|
|
1801
|
+
html?: string | null;
|
|
1802
|
+
}>;
|
|
1803
|
+
type CreateInboxDraftOptions = {
|
|
1804
|
+
inboxId: string;
|
|
1805
|
+
} & CreateInboxDraftContent & ({
|
|
1806
|
+
threadId: string;
|
|
1807
|
+
replyToEmailId: string;
|
|
1808
|
+
} | {
|
|
1809
|
+
threadId?: never;
|
|
1810
|
+
replyToEmailId?: never;
|
|
1811
|
+
});
|
|
1812
|
+
interface CreateInboxDraftRequestOptions extends PostOptions {}
|
|
1813
|
+
type CreateInboxDraftResponseSuccess = InboxDraft;
|
|
1814
|
+
type CreateInboxDraftResponse = Response<CreateInboxDraftResponseSuccess>;
|
|
1815
|
+
//#endregion
|
|
1816
|
+
//#region src/inboxes/drafts/interfaces/get-inbox-draft.interface.d.ts
|
|
1817
|
+
interface GetInboxDraftOptions {
|
|
1818
|
+
inboxId: string;
|
|
1819
|
+
draftId: string;
|
|
1820
|
+
}
|
|
1821
|
+
type GetInboxDraftResponseSuccess = InboxDraft;
|
|
1822
|
+
type GetInboxDraftResponse = Response<GetInboxDraftResponseSuccess>;
|
|
1823
|
+
//#endregion
|
|
1824
|
+
//#region src/inboxes/drafts/interfaces/list-inbox-drafts.interface.d.ts
|
|
1825
|
+
type ListInboxDraftsOptions = {
|
|
1826
|
+
inboxId: string;
|
|
1827
|
+
} & PaginationOptions;
|
|
1828
|
+
interface ListInboxDraftsResponseSuccess {
|
|
1829
|
+
object: 'list';
|
|
1830
|
+
has_more: boolean;
|
|
1831
|
+
data: InboxDraftListItem[];
|
|
1832
|
+
}
|
|
1833
|
+
type ListInboxDraftsResponse = Response<ListInboxDraftsResponseSuccess>;
|
|
1834
|
+
//#endregion
|
|
1835
|
+
//#region src/inboxes/drafts/interfaces/remove-inbox-draft.interface.d.ts
|
|
1836
|
+
interface RemoveInboxDraftOptions {
|
|
1837
|
+
inboxId: string;
|
|
1838
|
+
draftId: string;
|
|
1839
|
+
}
|
|
1840
|
+
interface RemoveInboxDraftResponseSuccess {
|
|
1841
|
+
object: 'inbox_draft';
|
|
1842
|
+
id: string;
|
|
1843
|
+
deleted: boolean;
|
|
1844
|
+
}
|
|
1845
|
+
type RemoveInboxDraftResponse = Response<RemoveInboxDraftResponseSuccess>;
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region src/inboxes/drafts/interfaces/send-inbox-draft.interface.d.ts
|
|
1848
|
+
interface SendInboxDraftOptions {
|
|
1849
|
+
inboxId: string;
|
|
1850
|
+
draftId: string;
|
|
1851
|
+
}
|
|
1852
|
+
interface SendInboxDraftRequestOptions extends PostOptions {}
|
|
1853
|
+
interface SendInboxDraftResponseSuccess {
|
|
1854
|
+
object: 'inbox_draft';
|
|
1855
|
+
id: string;
|
|
1856
|
+
thread_id: string;
|
|
1857
|
+
email_id: string;
|
|
1858
|
+
}
|
|
1859
|
+
type SendInboxDraftResponse = Response<SendInboxDraftResponseSuccess>;
|
|
1860
|
+
//#endregion
|
|
1861
|
+
//#region src/inboxes/drafts/interfaces/update-inbox-draft.interface.d.ts
|
|
1862
|
+
type UpdateInboxDraftOptions = {
|
|
1863
|
+
inboxId: string;
|
|
1864
|
+
draftId: string;
|
|
1865
|
+
} & RequireAtLeastOne<{
|
|
1866
|
+
to?: string | string[] | null;
|
|
1867
|
+
cc?: string | string[] | null;
|
|
1868
|
+
bcc?: string | string[] | null;
|
|
1869
|
+
subject?: string | null;
|
|
1870
|
+
text?: string | null;
|
|
1871
|
+
html?: string | null;
|
|
1872
|
+
}>;
|
|
1873
|
+
type UpdateInboxDraftResponseSuccess = InboxDraft;
|
|
1874
|
+
type UpdateInboxDraftResponse = Response<UpdateInboxDraftResponseSuccess>;
|
|
1875
|
+
//#endregion
|
|
1876
|
+
//#region src/inboxes/interfaces/inbox.d.ts
|
|
1877
|
+
export declare const INBOX_MESSAGE_FOLDERS: readonly ["inbox", "archive", "spam", "sent", "trash"];
|
|
1878
|
+
type InboxMessageFolder = (typeof INBOX_MESSAGE_FOLDERS)[number];
|
|
1879
|
+
export declare const MOVE_THREAD_FOLDERS: readonly ["inbox", "archive", "spam", "trash"];
|
|
1880
|
+
type MoveThreadFolder = (typeof MOVE_THREAD_FOLDERS)[number];
|
|
1881
|
+
export declare const INBOX_LABEL_COLORS: readonly ["cyan", "teal", "grass", "lime", "yellow", "orange", "iris", "plum", "crimson", "bronze", "mauve"];
|
|
1882
|
+
type InboxLabelColor = (typeof INBOX_LABEL_COLORS)[number];
|
|
1883
|
+
interface Inbox {
|
|
1884
|
+
id: string;
|
|
1885
|
+
name: string | null;
|
|
1886
|
+
email_address: string;
|
|
1887
|
+
from_name: string | null;
|
|
1888
|
+
unread: number;
|
|
1889
|
+
last_received: string | null;
|
|
1890
|
+
}
|
|
1891
|
+
//#endregion
|
|
1892
|
+
//#region src/inboxes/labels/interfaces/create-inbox-label.interface.d.ts
|
|
1893
|
+
interface CreateInboxLabelOptions {
|
|
1894
|
+
inboxId: string;
|
|
1895
|
+
name: string;
|
|
1896
|
+
color?: InboxLabelColor;
|
|
1897
|
+
}
|
|
1898
|
+
interface CreateInboxLabelRequestOptions extends PostOptions {}
|
|
1899
|
+
interface CreateInboxLabelResponseSuccess {
|
|
1900
|
+
object: 'inbox_label';
|
|
1901
|
+
id: string;
|
|
1902
|
+
name: string;
|
|
1903
|
+
color: InboxLabelColor;
|
|
1904
|
+
created_at: string;
|
|
1905
|
+
}
|
|
1906
|
+
type CreateInboxLabelResponse = Response<CreateInboxLabelResponseSuccess>;
|
|
1907
|
+
//#endregion
|
|
1908
|
+
//#region src/inboxes/labels/interfaces/label.d.ts
|
|
1909
|
+
interface InboxLabel {
|
|
1910
|
+
id: string;
|
|
1911
|
+
name: string;
|
|
1912
|
+
color: InboxLabelColor;
|
|
1913
|
+
created_at: string;
|
|
1914
|
+
}
|
|
1915
|
+
//#endregion
|
|
1916
|
+
//#region src/inboxes/labels/interfaces/list-inbox-labels.interface.d.ts
|
|
1917
|
+
interface ListInboxLabelsOptions {
|
|
1918
|
+
inboxId: string;
|
|
1919
|
+
}
|
|
1920
|
+
interface ListInboxLabelsResponseSuccess {
|
|
1921
|
+
object: 'list';
|
|
1922
|
+
data: InboxLabel[];
|
|
1923
|
+
}
|
|
1924
|
+
type ListInboxLabelsResponse = Response<ListInboxLabelsResponseSuccess>;
|
|
1925
|
+
//#endregion
|
|
1926
|
+
//#region src/inboxes/labels/interfaces/remove-inbox-label.interface.d.ts
|
|
1927
|
+
interface RemoveInboxLabelOptions {
|
|
1928
|
+
inboxId: string;
|
|
1929
|
+
labelId: string;
|
|
1930
|
+
}
|
|
1931
|
+
interface RemoveInboxLabelResponseSuccess {
|
|
1932
|
+
object: 'inbox_label';
|
|
1933
|
+
id: string;
|
|
1934
|
+
deleted: boolean;
|
|
1935
|
+
}
|
|
1936
|
+
type RemoveInboxLabelResponse = Response<RemoveInboxLabelResponseSuccess>;
|
|
1937
|
+
//#endregion
|
|
1938
|
+
//#region src/inboxes/labels/interfaces/update-inbox-label.interface.d.ts
|
|
1939
|
+
interface UpdateInboxLabelOptions {
|
|
1940
|
+
inboxId: string;
|
|
1941
|
+
labelId: string;
|
|
1942
|
+
name?: string;
|
|
1943
|
+
color?: InboxLabelColor;
|
|
1944
|
+
}
|
|
1945
|
+
interface UpdateInboxLabelResponseSuccess {
|
|
1946
|
+
object: 'inbox_label';
|
|
1947
|
+
id: string;
|
|
1948
|
+
}
|
|
1949
|
+
type UpdateInboxLabelResponse = Response<UpdateInboxLabelResponseSuccess>;
|
|
1950
|
+
//#endregion
|
|
1951
|
+
//#region src/inboxes/threads/interfaces/thread.d.ts
|
|
1952
|
+
interface InboxThreadLabel {
|
|
1953
|
+
id: string;
|
|
1954
|
+
name: string;
|
|
1955
|
+
color: InboxLabelColor;
|
|
1956
|
+
}
|
|
1957
|
+
interface InboxThread {
|
|
1958
|
+
id: string;
|
|
1959
|
+
subject: string | null;
|
|
1960
|
+
from: string | null;
|
|
1961
|
+
to: string[];
|
|
1962
|
+
cc: string[];
|
|
1963
|
+
bcc: string[];
|
|
1964
|
+
labels: InboxThreadLabel[];
|
|
1965
|
+
message_count: number;
|
|
1966
|
+
has_attachment: boolean;
|
|
1967
|
+
has_draft: boolean;
|
|
1968
|
+
read: boolean;
|
|
1969
|
+
received_at: string;
|
|
1970
|
+
}
|
|
1971
|
+
interface InboxThreadSummary {
|
|
1972
|
+
object: 'inbox_thread';
|
|
1973
|
+
id: string;
|
|
1974
|
+
subject: string | null;
|
|
1975
|
+
folder: InboxMessageFolder;
|
|
1976
|
+
labels: InboxThreadLabel[];
|
|
1977
|
+
read: boolean;
|
|
1978
|
+
}
|
|
1979
|
+
interface InboxMessageAttachment {
|
|
1980
|
+
id: string;
|
|
1981
|
+
filename: string | null;
|
|
1982
|
+
size: number | null;
|
|
1983
|
+
}
|
|
1984
|
+
interface InboxMessage {
|
|
1985
|
+
id: string;
|
|
1986
|
+
direction: 'inbound' | 'outbound';
|
|
1987
|
+
from: string;
|
|
1988
|
+
to: string[];
|
|
1989
|
+
cc: string[];
|
|
1990
|
+
bcc: string[];
|
|
1991
|
+
reply_to: string[];
|
|
1992
|
+
subject: string | null;
|
|
1993
|
+
message_id: string | null;
|
|
1994
|
+
html: string | null;
|
|
1995
|
+
text: string | null;
|
|
1996
|
+
attachments: InboxMessageAttachment[];
|
|
1997
|
+
read: boolean;
|
|
1998
|
+
received_at: string;
|
|
1999
|
+
}
|
|
2000
|
+
//#endregion
|
|
2001
|
+
//#region src/inboxes/threads/interfaces/reply-inbox-thread-email.interface.d.ts
|
|
2002
|
+
type ReplyInboxThreadEmailOptions = {
|
|
2003
|
+
inboxId: string;
|
|
2004
|
+
threadId: string;
|
|
2005
|
+
emailId: string;
|
|
2006
|
+
} & RequireAtLeastOne<{
|
|
2007
|
+
html?: string;
|
|
2008
|
+
text?: string;
|
|
2009
|
+
}> & {
|
|
2010
|
+
cc?: string | string[];
|
|
2011
|
+
bcc?: string | string[];
|
|
2012
|
+
subject?: string;
|
|
2013
|
+
};
|
|
2014
|
+
interface ReplyInboxThreadEmailRequestOptions extends PostOptions {}
|
|
2015
|
+
type ReplyInboxThreadEmailResponseSuccess = InboxMessage & {
|
|
2016
|
+
direction: 'outbound';
|
|
2017
|
+
email_id: string;
|
|
2018
|
+
};
|
|
2019
|
+
type ReplyInboxThreadEmailResponse = Response<ReplyInboxThreadEmailResponseSuccess>;
|
|
2020
|
+
//#endregion
|
|
2021
|
+
//#region src/inboxes/threads/interfaces/forward-inbox-thread-email.interface.d.ts
|
|
2022
|
+
interface ForwardInboxThreadEmailOptions {
|
|
2023
|
+
inboxId: string;
|
|
2024
|
+
threadId: string;
|
|
2025
|
+
emailId: string;
|
|
2026
|
+
to: string | string[];
|
|
2027
|
+
cc?: string | string[];
|
|
2028
|
+
bcc?: string | string[];
|
|
2029
|
+
html?: string;
|
|
2030
|
+
text?: string;
|
|
2031
|
+
subject?: string;
|
|
2032
|
+
}
|
|
2033
|
+
interface ForwardInboxThreadEmailRequestOptions extends PostOptions {}
|
|
2034
|
+
type ForwardInboxThreadEmailResponseSuccess = ReplyInboxThreadEmailResponseSuccess;
|
|
2035
|
+
type ForwardInboxThreadEmailResponse = Response<ForwardInboxThreadEmailResponseSuccess>;
|
|
2036
|
+
//#endregion
|
|
2037
|
+
//#region src/inboxes/threads/interfaces/get-inbox-thread.interface.d.ts
|
|
2038
|
+
interface GetInboxThreadOptions {
|
|
2039
|
+
inboxId: string;
|
|
2040
|
+
threadId: string;
|
|
2041
|
+
}
|
|
2042
|
+
type GetInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2043
|
+
type GetInboxThreadResponse = Response<GetInboxThreadResponseSuccess>;
|
|
2044
|
+
//#endregion
|
|
2045
|
+
//#region src/inboxes/threads/interfaces/get-inbox-thread-email.interface.d.ts
|
|
2046
|
+
interface GetInboxThreadEmailOptions {
|
|
2047
|
+
inboxId: string;
|
|
2048
|
+
threadId: string;
|
|
2049
|
+
emailId: string;
|
|
2050
|
+
}
|
|
2051
|
+
type GetInboxThreadEmailResponseSuccess = InboxMessage;
|
|
2052
|
+
type GetInboxThreadEmailResponse = Response<GetInboxThreadEmailResponseSuccess>;
|
|
2053
|
+
//#endregion
|
|
2054
|
+
//#region src/inboxes/threads/interfaces/list-inbox-thread-emails.interface.d.ts
|
|
2055
|
+
type ListInboxThreadEmailsOptions = {
|
|
2056
|
+
inboxId: string;
|
|
2057
|
+
threadId: string;
|
|
2058
|
+
} & PaginationOptions;
|
|
2059
|
+
interface ListInboxThreadEmailsResponseSuccess {
|
|
2060
|
+
object: 'list';
|
|
2061
|
+
has_more: boolean;
|
|
2062
|
+
data: InboxMessage[];
|
|
2063
|
+
}
|
|
2064
|
+
type ListInboxThreadEmailsResponse = Response<ListInboxThreadEmailsResponseSuccess>;
|
|
2065
|
+
//#endregion
|
|
2066
|
+
//#region src/inboxes/threads/interfaces/list-inbox-threads.interface.d.ts
|
|
2067
|
+
type ListInboxThreadsOptions = {
|
|
2068
|
+
inboxId: string;
|
|
2069
|
+
folder?: InboxMessageFolder;
|
|
2070
|
+
query?: string;
|
|
2071
|
+
label?: string | string[];
|
|
2072
|
+
} & PaginationOptions;
|
|
2073
|
+
interface ListInboxThreadsResponseSuccess {
|
|
2074
|
+
object: 'list';
|
|
2075
|
+
has_more: boolean;
|
|
2076
|
+
data: InboxThread[];
|
|
2077
|
+
}
|
|
2078
|
+
type ListInboxThreadsResponse = Response<ListInboxThreadsResponseSuccess>;
|
|
2079
|
+
//#endregion
|
|
2080
|
+
//#region src/inboxes/threads/interfaces/remove-inbox-thread.interface.d.ts
|
|
2081
|
+
interface RemoveInboxThreadOptions {
|
|
2082
|
+
inboxId: string;
|
|
2083
|
+
threadId: string;
|
|
2084
|
+
}
|
|
2085
|
+
interface RemoveInboxThreadResponseSuccess {
|
|
2086
|
+
object: 'inbox_thread';
|
|
2087
|
+
id: string;
|
|
2088
|
+
deleted: boolean;
|
|
2089
|
+
}
|
|
2090
|
+
type RemoveInboxThreadResponse = Response<RemoveInboxThreadResponseSuccess>;
|
|
2091
|
+
//#endregion
|
|
2092
|
+
//#region src/inboxes/threads/interfaces/update-inbox-thread.interface.d.ts
|
|
2093
|
+
type UpdateInboxThreadOptions = {
|
|
2094
|
+
inboxId: string;
|
|
2095
|
+
threadId: string;
|
|
2096
|
+
} & RequireAtLeastOne<{
|
|
2097
|
+
read?: boolean;
|
|
2098
|
+
folder?: MoveThreadFolder;
|
|
2099
|
+
/** Applies the label to the thread. Labels cannot be removed through this endpoint. */
|
|
2100
|
+
labelId?: string;
|
|
2101
|
+
}>;
|
|
2102
|
+
type UpdateInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2103
|
+
type UpdateInboxThreadResponse = Response<UpdateInboxThreadResponseSuccess>;
|
|
2104
|
+
//#endregion
|
|
2105
|
+
//#region src/inboxes/interfaces/get-inbox.interface.d.ts
|
|
2106
|
+
interface GetInboxResponseSuccess {
|
|
2107
|
+
object: 'inbox';
|
|
2108
|
+
id: string;
|
|
2109
|
+
name: string;
|
|
2110
|
+
email_address: string;
|
|
2111
|
+
domain_id: string;
|
|
2112
|
+
receiving_address: string | null;
|
|
2113
|
+
from_name: string | null;
|
|
2114
|
+
unread: number;
|
|
2115
|
+
drafts: number;
|
|
2116
|
+
last_received: string | null;
|
|
2117
|
+
created_at: string;
|
|
2118
|
+
}
|
|
2119
|
+
type GetInboxResponse = Response<GetInboxResponseSuccess>;
|
|
2120
|
+
//#endregion
|
|
2121
|
+
//#region src/inboxes/interfaces/create-inbox.interface.d.ts
|
|
2122
|
+
interface CreateInboxOptions {
|
|
2123
|
+
emailAddress: string;
|
|
2124
|
+
name?: string;
|
|
2125
|
+
forwarding?: boolean;
|
|
2126
|
+
fromName?: string;
|
|
2127
|
+
}
|
|
2128
|
+
interface CreateInboxRequestOptions extends PostOptions {}
|
|
2129
|
+
type CreateInboxResponseSuccess = GetInboxResponseSuccess;
|
|
2130
|
+
type CreateInboxResponse = Response<CreateInboxResponseSuccess>;
|
|
2131
|
+
//#endregion
|
|
2132
|
+
//#region src/inboxes/interfaces/list-inboxes.interface.d.ts
|
|
2133
|
+
type ListInboxesOptions = PaginationOptions;
|
|
2134
|
+
interface ListInboxesResponseSuccess {
|
|
2135
|
+
object: 'list';
|
|
2136
|
+
has_more: boolean;
|
|
2137
|
+
data: Inbox[];
|
|
2138
|
+
}
|
|
2139
|
+
type ListInboxesResponse = Response<ListInboxesResponseSuccess>;
|
|
2140
|
+
//#endregion
|
|
2141
|
+
//#region src/inboxes/interfaces/remove-inbox.interface.d.ts
|
|
2142
|
+
interface RemoveInboxResponseSuccess {
|
|
2143
|
+
object: 'inbox';
|
|
2144
|
+
id: string;
|
|
2145
|
+
deleted: boolean;
|
|
2146
|
+
}
|
|
2147
|
+
type RemoveInboxResponse = Response<RemoveInboxResponseSuccess>;
|
|
2148
|
+
//#endregion
|
|
2149
|
+
//#region src/inboxes/interfaces/update-inbox.interface.d.ts
|
|
2150
|
+
type UpdateInboxOptions = RequireAtLeastOne<{
|
|
2151
|
+
name?: string;
|
|
2152
|
+
fromName?: string;
|
|
2153
|
+
}>;
|
|
2154
|
+
interface UpdateInboxResponseSuccess {
|
|
2155
|
+
object: 'inbox';
|
|
2156
|
+
id: string;
|
|
2157
|
+
}
|
|
2158
|
+
type UpdateInboxResponse = Response<UpdateInboxResponseSuccess>;
|
|
2159
|
+
//#endregion
|
|
1763
2160
|
//#region src/logs/interfaces/log.d.ts
|
|
1764
2161
|
export interface Log {
|
|
1765
2162
|
id: string;
|
|
@@ -2009,6 +2406,63 @@ declare class Events$1 {
|
|
|
2009
2406
|
remove(identifier: string, requestOptions?: RequestOptions): Promise<RemoveEventResponse>;
|
|
2010
2407
|
}
|
|
2011
2408
|
//#endregion
|
|
2409
|
+
//#region src/inboxes/drafts/drafts.d.ts
|
|
2410
|
+
declare class InboxDrafts {
|
|
2411
|
+
private readonly resend;
|
|
2412
|
+
constructor(resend: Resend);
|
|
2413
|
+
list(options: ListInboxDraftsOptions, requestOptions?: RequestOptions): Promise<ListInboxDraftsResponse>;
|
|
2414
|
+
create(payload: CreateInboxDraftOptions, options?: CreateInboxDraftRequestOptions): Promise<CreateInboxDraftResponse>;
|
|
2415
|
+
get(options: GetInboxDraftOptions, requestOptions?: RequestOptions): Promise<GetInboxDraftResponse>;
|
|
2416
|
+
update(options: UpdateInboxDraftOptions, requestOptions?: RequestOptions): Promise<UpdateInboxDraftResponse>;
|
|
2417
|
+
remove(options: RemoveInboxDraftOptions, requestOptions?: RequestOptions): Promise<RemoveInboxDraftResponse>;
|
|
2418
|
+
send(payload: SendInboxDraftOptions, options?: SendInboxDraftRequestOptions): Promise<SendInboxDraftResponse>;
|
|
2419
|
+
}
|
|
2420
|
+
//#endregion
|
|
2421
|
+
//#region src/inboxes/labels/labels.d.ts
|
|
2422
|
+
declare class InboxLabels {
|
|
2423
|
+
private readonly resend;
|
|
2424
|
+
constructor(resend: Resend);
|
|
2425
|
+
list(options: ListInboxLabelsOptions, requestOptions?: RequestOptions): Promise<ListInboxLabelsResponse>;
|
|
2426
|
+
create(payload: CreateInboxLabelOptions, options?: CreateInboxLabelRequestOptions): Promise<CreateInboxLabelResponse>;
|
|
2427
|
+
update(options: UpdateInboxLabelOptions, requestOptions?: RequestOptions): Promise<UpdateInboxLabelResponse>;
|
|
2428
|
+
remove(options: RemoveInboxLabelOptions, requestOptions?: RequestOptions): Promise<RemoveInboxLabelResponse>;
|
|
2429
|
+
}
|
|
2430
|
+
//#endregion
|
|
2431
|
+
//#region src/inboxes/threads/emails/emails.d.ts
|
|
2432
|
+
declare class InboxThreadEmails {
|
|
2433
|
+
private readonly resend;
|
|
2434
|
+
constructor(resend: Resend);
|
|
2435
|
+
list(options: ListInboxThreadEmailsOptions, requestOptions?: RequestOptions): Promise<ListInboxThreadEmailsResponse>;
|
|
2436
|
+
get(options: GetInboxThreadEmailOptions, requestOptions?: RequestOptions): Promise<GetInboxThreadEmailResponse>;
|
|
2437
|
+
reply(payload: ReplyInboxThreadEmailOptions, options?: ReplyInboxThreadEmailRequestOptions): Promise<ReplyInboxThreadEmailResponse>;
|
|
2438
|
+
forward(payload: ForwardInboxThreadEmailOptions, options?: ForwardInboxThreadEmailRequestOptions): Promise<ForwardInboxThreadEmailResponse>;
|
|
2439
|
+
}
|
|
2440
|
+
//#endregion
|
|
2441
|
+
//#region src/inboxes/threads/threads.d.ts
|
|
2442
|
+
declare class InboxThreads {
|
|
2443
|
+
private readonly resend;
|
|
2444
|
+
readonly emails: InboxThreadEmails;
|
|
2445
|
+
constructor(resend: Resend);
|
|
2446
|
+
list(options: ListInboxThreadsOptions, requestOptions?: RequestOptions): Promise<ListInboxThreadsResponse>;
|
|
2447
|
+
get(options: GetInboxThreadOptions, requestOptions?: RequestOptions): Promise<GetInboxThreadResponse>;
|
|
2448
|
+
update(options: UpdateInboxThreadOptions, requestOptions?: RequestOptions): Promise<UpdateInboxThreadResponse>;
|
|
2449
|
+
remove(options: RemoveInboxThreadOptions, requestOptions?: RequestOptions): Promise<RemoveInboxThreadResponse>;
|
|
2450
|
+
}
|
|
2451
|
+
//#endregion
|
|
2452
|
+
//#region src/inboxes/inboxes.d.ts
|
|
2453
|
+
declare class Inboxes {
|
|
2454
|
+
private readonly resend;
|
|
2455
|
+
readonly threads: InboxThreads;
|
|
2456
|
+
readonly labels: InboxLabels;
|
|
2457
|
+
readonly drafts: InboxDrafts;
|
|
2458
|
+
constructor(resend: Resend);
|
|
2459
|
+
create(payload: CreateInboxOptions, options?: CreateInboxRequestOptions): Promise<CreateInboxResponse>;
|
|
2460
|
+
list(options?: ListInboxesOptions, requestOptions?: RequestOptions): Promise<ListInboxesResponse>;
|
|
2461
|
+
get(idOrEmail: string, requestOptions?: RequestOptions): Promise<GetInboxResponse>;
|
|
2462
|
+
update(id: string, payload: UpdateInboxOptions, requestOptions?: RequestOptions): Promise<UpdateInboxResponse>;
|
|
2463
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveInboxResponse>;
|
|
2464
|
+
}
|
|
2465
|
+
//#endregion
|
|
2012
2466
|
//#region src/logs/logs.d.ts
|
|
2013
2467
|
declare class Logs {
|
|
2014
2468
|
private readonly resend;
|
|
@@ -2409,7 +2863,7 @@ declare class Usage {
|
|
|
2409
2863
|
}
|
|
2410
2864
|
//#endregion
|
|
2411
2865
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
2412
|
-
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'contact.topics.updated' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'topic.created' | 'topic.updated' | 'topic.deleted';
|
|
2866
|
+
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'contact.topics.updated' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'topic.created' | 'topic.updated' | 'topic.deleted' | 'inbox.created' | 'inbox.updated' | 'inbox.deleted' | 'inbox.thread.created' | 'inbox.thread.folder.updated' | 'inbox.thread.assigned' | 'inbox.thread.unassigned' | 'inbox.thread.labels.updated' | 'inbox.email.received' | 'inbox.email.sent' | 'inbox.draft.created' | 'inbox.draft.updated' | 'inbox.draft.sent' | 'inbox.draft.deleted';
|
|
2413
2867
|
interface BaseEmailEventData {
|
|
2414
2868
|
broadcast_id?: string;
|
|
2415
2869
|
created_at: string;
|
|
@@ -2509,6 +2963,17 @@ interface TopicEventData {
|
|
|
2509
2963
|
created_at: string;
|
|
2510
2964
|
updated_at: string;
|
|
2511
2965
|
}
|
|
2966
|
+
interface InboxEventData {
|
|
2967
|
+
source: 'api' | 'dashboard' | 'agent' | 'system';
|
|
2968
|
+
inbox_id: string;
|
|
2969
|
+
thread_id?: string;
|
|
2970
|
+
email_id?: string;
|
|
2971
|
+
draft_id?: string;
|
|
2972
|
+
thread?: InboxThreadSummary;
|
|
2973
|
+
email?: Omit<InboxMessage, 'html' | 'text'>;
|
|
2974
|
+
draft?: Omit<InboxDraft, 'html' | 'text'>;
|
|
2975
|
+
inbox?: GetInboxResponseSuccess;
|
|
2976
|
+
}
|
|
2512
2977
|
interface EmailSentEvent {
|
|
2513
2978
|
type: 'email.sent';
|
|
2514
2979
|
created_at: string;
|
|
@@ -2632,7 +3097,89 @@ interface TopicDeletedEvent {
|
|
|
2632
3097
|
created_at: string;
|
|
2633
3098
|
data: TopicEventData;
|
|
2634
3099
|
}
|
|
2635
|
-
|
|
3100
|
+
interface InboxCreatedEvent {
|
|
3101
|
+
type: 'inbox.created';
|
|
3102
|
+
created_at: string;
|
|
3103
|
+
data: InboxEventData;
|
|
3104
|
+
}
|
|
3105
|
+
interface InboxUpdatedEvent {
|
|
3106
|
+
type: 'inbox.updated';
|
|
3107
|
+
created_at: string;
|
|
3108
|
+
data: InboxEventData;
|
|
3109
|
+
}
|
|
3110
|
+
interface InboxDeletedEvent {
|
|
3111
|
+
type: 'inbox.deleted';
|
|
3112
|
+
created_at: string;
|
|
3113
|
+
data: InboxEventData;
|
|
3114
|
+
}
|
|
3115
|
+
interface InboxThreadCreatedEvent {
|
|
3116
|
+
type: 'inbox.thread.created';
|
|
3117
|
+
created_at: string;
|
|
3118
|
+
data: InboxEventData;
|
|
3119
|
+
}
|
|
3120
|
+
interface InboxThreadFolderUpdatedEvent {
|
|
3121
|
+
type: 'inbox.thread.folder.updated';
|
|
3122
|
+
created_at: string;
|
|
3123
|
+
data: InboxEventData & {
|
|
3124
|
+
from: InboxMessageFolder;
|
|
3125
|
+
to: InboxMessageFolder;
|
|
3126
|
+
};
|
|
3127
|
+
}
|
|
3128
|
+
interface InboxThreadAssignedEvent {
|
|
3129
|
+
type: 'inbox.thread.assigned';
|
|
3130
|
+
created_at: string;
|
|
3131
|
+
data: InboxEventData & {
|
|
3132
|
+
assignee_email: string | null;
|
|
3133
|
+
assigned_by_email: string | null;
|
|
3134
|
+
previous_assignee_email: string | null;
|
|
3135
|
+
};
|
|
3136
|
+
}
|
|
3137
|
+
interface InboxThreadUnassignedEvent {
|
|
3138
|
+
type: 'inbox.thread.unassigned';
|
|
3139
|
+
created_at: string;
|
|
3140
|
+
data: InboxEventData & {
|
|
3141
|
+
previous_assignee_email: string | null;
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
interface InboxThreadLabelsUpdatedEvent {
|
|
3145
|
+
type: 'inbox.thread.labels.updated';
|
|
3146
|
+
created_at: string;
|
|
3147
|
+
data: InboxEventData & {
|
|
3148
|
+
added: InboxThreadLabel[];
|
|
3149
|
+
removed: InboxThreadLabel[];
|
|
3150
|
+
};
|
|
3151
|
+
}
|
|
3152
|
+
interface InboxEmailReceivedEvent {
|
|
3153
|
+
type: 'inbox.email.received';
|
|
3154
|
+
created_at: string;
|
|
3155
|
+
data: InboxEventData;
|
|
3156
|
+
}
|
|
3157
|
+
interface InboxEmailSentEvent {
|
|
3158
|
+
type: 'inbox.email.sent';
|
|
3159
|
+
created_at: string;
|
|
3160
|
+
data: InboxEventData;
|
|
3161
|
+
}
|
|
3162
|
+
interface InboxDraftCreatedEvent {
|
|
3163
|
+
type: 'inbox.draft.created';
|
|
3164
|
+
created_at: string;
|
|
3165
|
+
data: InboxEventData;
|
|
3166
|
+
}
|
|
3167
|
+
interface InboxDraftUpdatedEvent {
|
|
3168
|
+
type: 'inbox.draft.updated';
|
|
3169
|
+
created_at: string;
|
|
3170
|
+
data: InboxEventData;
|
|
3171
|
+
}
|
|
3172
|
+
interface InboxDraftSentEvent {
|
|
3173
|
+
type: 'inbox.draft.sent';
|
|
3174
|
+
created_at: string;
|
|
3175
|
+
data: InboxEventData;
|
|
3176
|
+
}
|
|
3177
|
+
interface InboxDraftDeletedEvent {
|
|
3178
|
+
type: 'inbox.draft.deleted';
|
|
3179
|
+
created_at: string;
|
|
3180
|
+
data: InboxEventData;
|
|
3181
|
+
}
|
|
3182
|
+
type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactTopicsUpdatedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent | TopicCreatedEvent | TopicUpdatedEvent | TopicDeletedEvent | InboxCreatedEvent | InboxUpdatedEvent | InboxDeletedEvent | InboxThreadCreatedEvent | InboxThreadFolderUpdatedEvent | InboxThreadAssignedEvent | InboxThreadUnassignedEvent | InboxThreadLabelsUpdatedEvent | InboxEmailReceivedEvent | InboxEmailSentEvent | InboxDraftCreatedEvent | InboxDraftUpdatedEvent | InboxDraftSentEvent | InboxDraftDeletedEvent;
|
|
2636
3183
|
//#endregion
|
|
2637
3184
|
//#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
|
|
2638
3185
|
type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
|
|
@@ -2834,6 +3381,7 @@ export declare class Resend {
|
|
|
2834
3381
|
readonly domains: Domains;
|
|
2835
3382
|
readonly emails: Emails;
|
|
2836
3383
|
readonly events: Events$1;
|
|
3384
|
+
readonly inboxes: Inboxes;
|
|
2837
3385
|
readonly logs: Logs;
|
|
2838
3386
|
readonly oauthGrants: OAuthGrants;
|
|
2839
3387
|
readonly suppressions: Suppressions;
|
|
@@ -2851,4 +3399,4 @@ export declare class Resend {
|
|
|
2851
3399
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
2852
3400
|
}
|
|
2853
3401
|
//#endregion
|
|
2854
|
-
export type { ContactCreatedEvent, ContactDeletedEvent, ContactTopicsUpdatedEvent, ContactUpdatedEvent, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, OAuthGrant, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, TopicCreatedEvent, TopicDeletedEvent, TopicUpdatedEvent, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|
|
3402
|
+
export type { ContactCreatedEvent, ContactDeletedEvent, ContactTopicsUpdatedEvent, ContactUpdatedEvent, CreateInboxDraftOptions, CreateInboxDraftRequestOptions, CreateInboxDraftResponse, CreateInboxDraftResponseSuccess, CreateInboxLabelOptions, CreateInboxLabelRequestOptions, CreateInboxLabelResponse, CreateInboxLabelResponseSuccess, CreateInboxOptions, CreateInboxRequestOptions, CreateInboxResponse, CreateInboxResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, ForwardInboxThreadEmailOptions, ForwardInboxThreadEmailRequestOptions, ForwardInboxThreadEmailResponse, ForwardInboxThreadEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxCreatedEvent, InboxDeletedEvent, InboxDraft, InboxDraftCreatedEvent, InboxDraftDeletedEvent, InboxDraftListItem, InboxDraftSentEvent, InboxDraftType, InboxDraftUpdatedEvent, InboxEmailReceivedEvent, InboxEmailSentEvent, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadAssignedEvent, InboxThreadCreatedEvent, InboxThreadFolderUpdatedEvent, InboxThreadLabel, InboxThreadLabelsUpdatedEvent, InboxThreadSummary, InboxThreadUnassignedEvent, InboxUpdatedEvent, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListInboxDraftsOptions, ListInboxDraftsResponse, ListInboxDraftsResponseSuccess, ListInboxLabelsOptions, ListInboxLabelsResponse, ListInboxLabelsResponseSuccess, ListInboxThreadEmailsOptions, ListInboxThreadEmailsResponse, ListInboxThreadEmailsResponseSuccess, ListInboxThreadsOptions, ListInboxThreadsResponse, ListInboxThreadsResponseSuccess, ListInboxesOptions, ListInboxesResponse, ListInboxesResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, MoveThreadFolder, OAuthGrant, RemoveInboxDraftOptions, RemoveInboxDraftResponse, RemoveInboxDraftResponseSuccess, RemoveInboxLabelOptions, RemoveInboxLabelResponse, RemoveInboxLabelResponseSuccess, RemoveInboxResponse, RemoveInboxResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, TopicCreatedEvent, TopicDeletedEvent, TopicUpdatedEvent, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|