resend 6.32.1 → 6.34.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.cjs +376 -7
- package/dist/index.d.cts +736 -3
- package/dist/index.d.mts +736 -3
- package/dist/index.mjs +373 -8
- package/package.json +1 -1
- package/readme.md +27 -0
package/dist/index.d.cts
CHANGED
|
@@ -1760,6 +1760,547 @@ export interface UpdateEventResponseSuccess {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
export type UpdateEventResponse = Response<UpdateEventResponseSuccess>;
|
|
1762
1762
|
//#endregion
|
|
1763
|
+
//#region src/inboxes/agent/interfaces/agent.d.ts
|
|
1764
|
+
export declare const INBOX_AGENT_ACTIONS: readonly ["draft_reply", "forward_thread", "add_labels", "assign_thread", "mark_as_spam", "archive", "move_to_trash"];
|
|
1765
|
+
type InboxAgentAction = (typeof INBOX_AGENT_ACTIONS)[number];
|
|
1766
|
+
export declare const INBOX_AGENT_TONES: readonly ["concise_professional", "concise_casual", "expanded_professional", "expanded_casual"];
|
|
1767
|
+
type InboxAgentTone = (typeof INBOX_AGENT_TONES)[number];
|
|
1768
|
+
interface InboxAgentSettings {
|
|
1769
|
+
object: 'inbox_agent';
|
|
1770
|
+
instructions: string | null;
|
|
1771
|
+
tone: InboxAgentTone | null;
|
|
1772
|
+
actions: InboxAgentAction[];
|
|
1773
|
+
}
|
|
1774
|
+
//#endregion
|
|
1775
|
+
//#region src/inboxes/interfaces/inbox.d.ts
|
|
1776
|
+
export declare const INBOX_MESSAGE_FOLDERS: readonly ["inbox", "archive", "spam", "sent", "trash"];
|
|
1777
|
+
type InboxMessageFolder = (typeof INBOX_MESSAGE_FOLDERS)[number];
|
|
1778
|
+
export declare const MOVE_THREAD_FOLDERS: readonly ["inbox", "archive", "spam", "trash"];
|
|
1779
|
+
type MoveThreadFolder = (typeof MOVE_THREAD_FOLDERS)[number];
|
|
1780
|
+
/**
|
|
1781
|
+
* Hex color in the #RRGGBB format
|
|
1782
|
+
*
|
|
1783
|
+
* @example '#E93D82'
|
|
1784
|
+
*/
|
|
1785
|
+
type InboxLabelColor = string;
|
|
1786
|
+
type InboxSelector = {
|
|
1787
|
+
/** The inbox ID. */
|
|
1788
|
+
inboxId: string;
|
|
1789
|
+
emailAddress?: never;
|
|
1790
|
+
} | {
|
|
1791
|
+
inboxId?: never;
|
|
1792
|
+
/** The inbox email address, such as `support@example.com`. */
|
|
1793
|
+
emailAddress: string;
|
|
1794
|
+
};
|
|
1795
|
+
interface Inbox {
|
|
1796
|
+
id: string;
|
|
1797
|
+
name: string | null;
|
|
1798
|
+
email_address: string;
|
|
1799
|
+
from_name: string | null;
|
|
1800
|
+
unread: number;
|
|
1801
|
+
last_received: string | null;
|
|
1802
|
+
created_at: string;
|
|
1803
|
+
updated_at: string;
|
|
1804
|
+
}
|
|
1805
|
+
//#endregion
|
|
1806
|
+
//#region src/inboxes/agent/interfaces/get-inbox-agent.interface.d.ts
|
|
1807
|
+
type GetInboxAgentOptions = InboxSelector;
|
|
1808
|
+
type GetInboxAgentResponseSuccess = InboxAgentSettings;
|
|
1809
|
+
type GetInboxAgentResponse = Response<GetInboxAgentResponseSuccess>;
|
|
1810
|
+
//#endregion
|
|
1811
|
+
//#region src/inboxes/agent/interfaces/update-inbox-agent.interface.d.ts
|
|
1812
|
+
type UpdateInboxAgentOptions = InboxSelector & RequireAtLeastOne<{
|
|
1813
|
+
instructions?: string | null;
|
|
1814
|
+
tone?: InboxAgentTone | null;
|
|
1815
|
+
actions?: InboxAgentAction[];
|
|
1816
|
+
}>;
|
|
1817
|
+
interface UpdateInboxAgentResponseSuccess {
|
|
1818
|
+
object: 'inbox_agent';
|
|
1819
|
+
id: string;
|
|
1820
|
+
}
|
|
1821
|
+
type UpdateInboxAgentResponse = Response<UpdateInboxAgentResponseSuccess>;
|
|
1822
|
+
//#endregion
|
|
1823
|
+
//#region src/inboxes/drafts/interfaces/draft.d.ts
|
|
1824
|
+
type InboxDraftType = 'standalone' | 'reply';
|
|
1825
|
+
interface InboxDraftAttachment {
|
|
1826
|
+
id: string;
|
|
1827
|
+
filename: string;
|
|
1828
|
+
content_type: string;
|
|
1829
|
+
size: number;
|
|
1830
|
+
}
|
|
1831
|
+
interface InboxDraftAttachmentOptions {
|
|
1832
|
+
/** Content of the file, as a base64 string or a Buffer. */
|
|
1833
|
+
content: string | Buffer;
|
|
1834
|
+
filename: string;
|
|
1835
|
+
contentType: string;
|
|
1836
|
+
}
|
|
1837
|
+
interface InboxDraft {
|
|
1838
|
+
object: 'inbox_draft';
|
|
1839
|
+
id: string;
|
|
1840
|
+
type: InboxDraftType;
|
|
1841
|
+
to: string[] | null;
|
|
1842
|
+
cc: string[];
|
|
1843
|
+
bcc: string[];
|
|
1844
|
+
subject: string | null;
|
|
1845
|
+
html: string | null;
|
|
1846
|
+
text: string | null;
|
|
1847
|
+
thread_id: string | null;
|
|
1848
|
+
reply_to_email_id: string | null;
|
|
1849
|
+
email_id: string | null;
|
|
1850
|
+
created_at: string;
|
|
1851
|
+
updated_at: string;
|
|
1852
|
+
attachments: InboxDraftAttachment[];
|
|
1853
|
+
}
|
|
1854
|
+
interface InboxDraftListItem {
|
|
1855
|
+
id: string;
|
|
1856
|
+
type: InboxDraftType;
|
|
1857
|
+
to: string[] | null;
|
|
1858
|
+
cc: string[];
|
|
1859
|
+
bcc: string[];
|
|
1860
|
+
subject: string | null;
|
|
1861
|
+
snippet: string | null;
|
|
1862
|
+
thread_id: string | null;
|
|
1863
|
+
reply_to_email_id: string | null;
|
|
1864
|
+
updated_at: string;
|
|
1865
|
+
attachments: InboxDraftAttachment[];
|
|
1866
|
+
}
|
|
1867
|
+
//#endregion
|
|
1868
|
+
//#region src/inboxes/drafts/interfaces/create-inbox-draft.interface.d.ts
|
|
1869
|
+
type CreateInboxDraftContent = RequireAtLeastOne<{
|
|
1870
|
+
to?: string | string[] | null;
|
|
1871
|
+
cc?: string | string[] | null;
|
|
1872
|
+
bcc?: string | string[] | null;
|
|
1873
|
+
subject?: string | null;
|
|
1874
|
+
text?: string | null;
|
|
1875
|
+
html?: string | null;
|
|
1876
|
+
/**
|
|
1877
|
+
* Files to store on the draft. Each one needs `content`, `filename` and `contentType`.
|
|
1878
|
+
* The files on a draft can total at most 25 MB. An empty file or a blocked file type returns a 422.
|
|
1879
|
+
*/
|
|
1880
|
+
attachments?: InboxDraftAttachmentOptions[];
|
|
1881
|
+
}>;
|
|
1882
|
+
type CreateInboxDraftOptions = InboxSelector & CreateInboxDraftContent & ({
|
|
1883
|
+
threadId: string;
|
|
1884
|
+
replyToEmailId: string;
|
|
1885
|
+
} | {
|
|
1886
|
+
threadId?: never;
|
|
1887
|
+
replyToEmailId?: never;
|
|
1888
|
+
});
|
|
1889
|
+
interface CreateInboxDraftRequestOptions extends PostOptions, IdempotentRequest {}
|
|
1890
|
+
interface CreateInboxDraftResponseSuccess {
|
|
1891
|
+
object: 'inbox_draft';
|
|
1892
|
+
id: string;
|
|
1893
|
+
}
|
|
1894
|
+
type CreateInboxDraftResponse = Response<CreateInboxDraftResponseSuccess>;
|
|
1895
|
+
//#endregion
|
|
1896
|
+
//#region src/inboxes/drafts/interfaces/get-inbox-draft.interface.d.ts
|
|
1897
|
+
type GetInboxDraftOptions = InboxSelector & {
|
|
1898
|
+
draftId: string;
|
|
1899
|
+
};
|
|
1900
|
+
type GetInboxDraftResponseSuccess = InboxDraft;
|
|
1901
|
+
type GetInboxDraftResponse = Response<GetInboxDraftResponseSuccess>;
|
|
1902
|
+
//#endregion
|
|
1903
|
+
//#region src/inboxes/drafts/interfaces/list-inbox-drafts.interface.d.ts
|
|
1904
|
+
type ListInboxDraftsOptions = InboxSelector & PaginationOptions;
|
|
1905
|
+
interface ListInboxDraftsResponseSuccess {
|
|
1906
|
+
object: 'list';
|
|
1907
|
+
has_more: boolean;
|
|
1908
|
+
data: InboxDraftListItem[];
|
|
1909
|
+
}
|
|
1910
|
+
type ListInboxDraftsResponse = Response<ListInboxDraftsResponseSuccess>;
|
|
1911
|
+
//#endregion
|
|
1912
|
+
//#region src/inboxes/drafts/interfaces/remove-inbox-draft.interface.d.ts
|
|
1913
|
+
type RemoveInboxDraftOptions = InboxSelector & {
|
|
1914
|
+
draftId: string;
|
|
1915
|
+
};
|
|
1916
|
+
interface RemoveInboxDraftResponseSuccess {
|
|
1917
|
+
object: 'inbox_draft';
|
|
1918
|
+
id: string;
|
|
1919
|
+
deleted: boolean;
|
|
1920
|
+
}
|
|
1921
|
+
type RemoveInboxDraftResponse = Response<RemoveInboxDraftResponseSuccess>;
|
|
1922
|
+
//#endregion
|
|
1923
|
+
//#region src/inboxes/drafts/interfaces/send-inbox-draft.interface.d.ts
|
|
1924
|
+
type SendInboxDraftOptions = InboxSelector & {
|
|
1925
|
+
draftId: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* Custom headers to add to the email.
|
|
1928
|
+
* The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here.
|
|
1929
|
+
* Sending one of them, in any letter case, returns a 422.
|
|
1930
|
+
* Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422.
|
|
1931
|
+
* `null` means no custom headers.
|
|
1932
|
+
*/
|
|
1933
|
+
headers?: Record<string, string> | null;
|
|
1934
|
+
};
|
|
1935
|
+
interface SendInboxDraftRequestOptions extends PostOptions, IdempotentRequest {}
|
|
1936
|
+
interface SendInboxDraftResponseSuccess {
|
|
1937
|
+
id: string;
|
|
1938
|
+
}
|
|
1939
|
+
type SendInboxDraftResponse = Response<SendInboxDraftResponseSuccess>;
|
|
1940
|
+
//#endregion
|
|
1941
|
+
//#region src/inboxes/drafts/interfaces/update-inbox-draft.interface.d.ts
|
|
1942
|
+
type UpdateInboxDraftOptions = InboxSelector & {
|
|
1943
|
+
draftId: string;
|
|
1944
|
+
} & RequireAtLeastOne<{
|
|
1945
|
+
to?: string | string[] | null;
|
|
1946
|
+
cc?: string | string[] | null;
|
|
1947
|
+
bcc?: string | string[] | null;
|
|
1948
|
+
subject?: string | null;
|
|
1949
|
+
text?: string | null;
|
|
1950
|
+
html?: string | null;
|
|
1951
|
+
/**
|
|
1952
|
+
* Files to store on the draft. Each one needs `content`, `filename` and `contentType`.
|
|
1953
|
+
* The files on a draft can total at most 25 MB. An empty file or a blocked file type returns a 422.
|
|
1954
|
+
* Sending the field replaces every attachment on the draft. Send `[]` or `null` to remove them all.
|
|
1955
|
+
*/
|
|
1956
|
+
attachments?: InboxDraftAttachmentOptions[] | null;
|
|
1957
|
+
}>;
|
|
1958
|
+
type UpdateInboxDraftResponseSuccess = InboxDraft;
|
|
1959
|
+
type UpdateInboxDraftResponse = Response<UpdateInboxDraftResponseSuccess>;
|
|
1960
|
+
//#endregion
|
|
1961
|
+
//#region src/inboxes/labels/interfaces/create-inbox-label.interface.d.ts
|
|
1962
|
+
type CreateInboxLabelOptions = InboxSelector & {
|
|
1963
|
+
name: string;
|
|
1964
|
+
color?: InboxLabelColor;
|
|
1965
|
+
};
|
|
1966
|
+
interface CreateInboxLabelRequestOptions extends PostOptions {}
|
|
1967
|
+
interface CreateInboxLabelResponseSuccess {
|
|
1968
|
+
object: 'inbox_label';
|
|
1969
|
+
id: string;
|
|
1970
|
+
}
|
|
1971
|
+
type CreateInboxLabelResponse = Response<CreateInboxLabelResponseSuccess>;
|
|
1972
|
+
//#endregion
|
|
1973
|
+
//#region src/inboxes/labels/interfaces/label.d.ts
|
|
1974
|
+
interface InboxLabel {
|
|
1975
|
+
id: string;
|
|
1976
|
+
name: string;
|
|
1977
|
+
color: InboxLabelColor;
|
|
1978
|
+
created_at: string;
|
|
1979
|
+
}
|
|
1980
|
+
//#endregion
|
|
1981
|
+
//#region src/inboxes/labels/interfaces/list-inbox-labels.interface.d.ts
|
|
1982
|
+
type ListInboxLabelsOptions = InboxSelector;
|
|
1983
|
+
interface ListInboxLabelsResponseSuccess {
|
|
1984
|
+
object: 'list';
|
|
1985
|
+
data: InboxLabel[];
|
|
1986
|
+
}
|
|
1987
|
+
type ListInboxLabelsResponse = Response<ListInboxLabelsResponseSuccess>;
|
|
1988
|
+
//#endregion
|
|
1989
|
+
//#region src/inboxes/labels/interfaces/remove-inbox-label.interface.d.ts
|
|
1990
|
+
type RemoveInboxLabelOptions = InboxSelector & {
|
|
1991
|
+
labelId: string;
|
|
1992
|
+
};
|
|
1993
|
+
interface RemoveInboxLabelResponseSuccess {
|
|
1994
|
+
object: 'inbox_label';
|
|
1995
|
+
id: string;
|
|
1996
|
+
deleted: boolean;
|
|
1997
|
+
}
|
|
1998
|
+
type RemoveInboxLabelResponse = Response<RemoveInboxLabelResponseSuccess>;
|
|
1999
|
+
//#endregion
|
|
2000
|
+
//#region src/inboxes/labels/interfaces/update-inbox-label.interface.d.ts
|
|
2001
|
+
type UpdateInboxLabelOptions = InboxSelector & {
|
|
2002
|
+
labelId: string;
|
|
2003
|
+
name?: string;
|
|
2004
|
+
color?: InboxLabelColor;
|
|
2005
|
+
};
|
|
2006
|
+
interface UpdateInboxLabelResponseSuccess {
|
|
2007
|
+
object: 'inbox_label';
|
|
2008
|
+
id: string;
|
|
2009
|
+
}
|
|
2010
|
+
type UpdateInboxLabelResponse = Response<UpdateInboxLabelResponseSuccess>;
|
|
2011
|
+
//#endregion
|
|
2012
|
+
//#region src/inboxes/threads/interfaces/thread.d.ts
|
|
2013
|
+
interface InboxThreadLabel {
|
|
2014
|
+
id: string;
|
|
2015
|
+
name: string;
|
|
2016
|
+
color: InboxLabelColor;
|
|
2017
|
+
}
|
|
2018
|
+
interface InboxThreadLabelList {
|
|
2019
|
+
object: 'list';
|
|
2020
|
+
data: InboxThreadLabel[];
|
|
2021
|
+
}
|
|
2022
|
+
interface InboxThread {
|
|
2023
|
+
id: string;
|
|
2024
|
+
subject: string | null;
|
|
2025
|
+
from: string | null;
|
|
2026
|
+
to: string[];
|
|
2027
|
+
cc: string[];
|
|
2028
|
+
bcc: string[];
|
|
2029
|
+
labels: InboxThreadLabel[];
|
|
2030
|
+
email_count: number;
|
|
2031
|
+
has_attachment: boolean;
|
|
2032
|
+
has_draft: boolean;
|
|
2033
|
+
read: boolean;
|
|
2034
|
+
received_at: string;
|
|
2035
|
+
folder: InboxMessageFolder;
|
|
2036
|
+
}
|
|
2037
|
+
interface InboxThreadSummary {
|
|
2038
|
+
object: 'inbox_thread';
|
|
2039
|
+
id: string;
|
|
2040
|
+
subject: string | null;
|
|
2041
|
+
folder: InboxMessageFolder;
|
|
2042
|
+
labels: InboxThreadLabel[];
|
|
2043
|
+
read: boolean;
|
|
2044
|
+
}
|
|
2045
|
+
interface InboxMessageAttachment {
|
|
2046
|
+
id: string;
|
|
2047
|
+
filename: string | null;
|
|
2048
|
+
size: number | null;
|
|
2049
|
+
}
|
|
2050
|
+
interface InboxMessage {
|
|
2051
|
+
id: string;
|
|
2052
|
+
direction: 'inbound' | 'outbound';
|
|
2053
|
+
from: string;
|
|
2054
|
+
to: string[];
|
|
2055
|
+
cc: string[];
|
|
2056
|
+
bcc: string[];
|
|
2057
|
+
reply_to: string[];
|
|
2058
|
+
subject: string | null;
|
|
2059
|
+
message_id: string | null;
|
|
2060
|
+
html: string | null;
|
|
2061
|
+
text: string | null;
|
|
2062
|
+
attachments: InboxMessageAttachment[];
|
|
2063
|
+
read: boolean;
|
|
2064
|
+
received_at: string;
|
|
2065
|
+
}
|
|
2066
|
+
//#endregion
|
|
2067
|
+
//#region src/inboxes/threads/interfaces/add-inbox-thread-labels.interface.d.ts
|
|
2068
|
+
type AddInboxThreadLabelsOptions = InboxSelector & {
|
|
2069
|
+
threadId: string;
|
|
2070
|
+
/** Between 1 and 10 label IDs. */
|
|
2071
|
+
labels: string[];
|
|
2072
|
+
};
|
|
2073
|
+
type AddInboxThreadLabelsResponseSuccess = InboxThreadLabelList;
|
|
2074
|
+
type AddInboxThreadLabelsResponse = Response<AddInboxThreadLabelsResponseSuccess>;
|
|
2075
|
+
//#endregion
|
|
2076
|
+
//#region src/inboxes/threads/interfaces/forward-inbox-thread-email.interface.d.ts
|
|
2077
|
+
type ForwardInboxThreadEmailOptions = InboxSelector & {
|
|
2078
|
+
threadId: string;
|
|
2079
|
+
emailId: string;
|
|
2080
|
+
to: string | string[];
|
|
2081
|
+
cc?: string | string[];
|
|
2082
|
+
bcc?: string | string[];
|
|
2083
|
+
html?: string;
|
|
2084
|
+
text?: string;
|
|
2085
|
+
subject?: string;
|
|
2086
|
+
/**
|
|
2087
|
+
* Files to attach, as on `POST /emails`. Each one needs `content` or `path`.
|
|
2088
|
+
* They share one limit with the attachments of the original message, which the forward also sends.
|
|
2089
|
+
* Together they can have up to 10 files and at most 25 MB of `content`.
|
|
2090
|
+
* A `path` file counts toward the 10 files only, because it is fetched when the email is sent.
|
|
2091
|
+
* An empty file, a blocked file type, a `path` that is not an `http` or `https` URL or that points to `localhost`, `127.0.0.1` or `0.0.0.0`,
|
|
2092
|
+
* or a `content_type` that is not a valid MIME type returns a 422.
|
|
2093
|
+
* An original attachment that was sent from a URL (`path`) cannot be forwarded, and the request returns a 422.
|
|
2094
|
+
*/
|
|
2095
|
+
attachments?: Attachment[];
|
|
2096
|
+
/**
|
|
2097
|
+
* Custom headers to add to the email.
|
|
2098
|
+
* The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here.
|
|
2099
|
+
* Sending one of them, in any letter case, returns a 422.
|
|
2100
|
+
* Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422.
|
|
2101
|
+
* `null` means no custom headers.
|
|
2102
|
+
*/
|
|
2103
|
+
headers?: Record<string, string> | null;
|
|
2104
|
+
};
|
|
2105
|
+
interface ForwardInboxThreadEmailRequestOptions extends PostOptions, IdempotentRequest {}
|
|
2106
|
+
interface ForwardInboxThreadEmailResponseSuccess {
|
|
2107
|
+
id: string;
|
|
2108
|
+
}
|
|
2109
|
+
type ForwardInboxThreadEmailResponse = Response<ForwardInboxThreadEmailResponseSuccess>;
|
|
2110
|
+
//#endregion
|
|
2111
|
+
//#region src/inboxes/threads/interfaces/get-inbox-thread.interface.d.ts
|
|
2112
|
+
type GetInboxThreadOptions = InboxSelector & {
|
|
2113
|
+
threadId: string;
|
|
2114
|
+
};
|
|
2115
|
+
type GetInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2116
|
+
type GetInboxThreadResponse = Response<GetInboxThreadResponseSuccess>;
|
|
2117
|
+
//#endregion
|
|
2118
|
+
//#region src/inboxes/threads/interfaces/get-inbox-thread-email.interface.d.ts
|
|
2119
|
+
type GetInboxThreadEmailOptions = InboxSelector & {
|
|
2120
|
+
threadId: string;
|
|
2121
|
+
emailId: string;
|
|
2122
|
+
};
|
|
2123
|
+
type GetInboxThreadEmailResponseSuccess = InboxMessage;
|
|
2124
|
+
type GetInboxThreadEmailResponse = Response<GetInboxThreadEmailResponseSuccess>;
|
|
2125
|
+
//#endregion
|
|
2126
|
+
//#region src/inboxes/threads/interfaces/list-inbox-thread-emails.interface.d.ts
|
|
2127
|
+
type ListInboxThreadEmailsOptions = InboxSelector & {
|
|
2128
|
+
threadId: string;
|
|
2129
|
+
} & PaginationOptions;
|
|
2130
|
+
interface ListInboxThreadEmailsResponseSuccess {
|
|
2131
|
+
object: 'list';
|
|
2132
|
+
has_more: boolean;
|
|
2133
|
+
data: InboxMessage[];
|
|
2134
|
+
}
|
|
2135
|
+
type ListInboxThreadEmailsResponse = Response<ListInboxThreadEmailsResponseSuccess>;
|
|
2136
|
+
//#endregion
|
|
2137
|
+
//#region src/inboxes/threads/interfaces/list-inbox-threads.interface.d.ts
|
|
2138
|
+
type ListInboxThreadsOptions = InboxSelector & {
|
|
2139
|
+
folders?: InboxMessageFolder[];
|
|
2140
|
+
labels?: string[];
|
|
2141
|
+
read?: boolean;
|
|
2142
|
+
} & PaginationOptions;
|
|
2143
|
+
interface ListInboxThreadsResponseSuccess {
|
|
2144
|
+
object: 'list';
|
|
2145
|
+
has_more: boolean;
|
|
2146
|
+
data: InboxThread[];
|
|
2147
|
+
}
|
|
2148
|
+
type ListInboxThreadsResponse = Response<ListInboxThreadsResponseSuccess>;
|
|
2149
|
+
//#endregion
|
|
2150
|
+
//#region src/inboxes/threads/interfaces/remove-inbox-thread.interface.d.ts
|
|
2151
|
+
type RemoveInboxThreadOptions = InboxSelector & {
|
|
2152
|
+
threadId: string;
|
|
2153
|
+
};
|
|
2154
|
+
interface RemoveInboxThreadResponseSuccess {
|
|
2155
|
+
object: 'inbox_thread';
|
|
2156
|
+
id: string;
|
|
2157
|
+
deleted: boolean;
|
|
2158
|
+
}
|
|
2159
|
+
type RemoveInboxThreadResponse = Response<RemoveInboxThreadResponseSuccess>;
|
|
2160
|
+
//#endregion
|
|
2161
|
+
//#region src/inboxes/threads/interfaces/remove-inbox-thread-label.interface.d.ts
|
|
2162
|
+
type RemoveInboxThreadLabelOptions = InboxSelector & {
|
|
2163
|
+
threadId: string;
|
|
2164
|
+
labelId: string;
|
|
2165
|
+
};
|
|
2166
|
+
type RemoveInboxThreadLabelResponseSuccess = InboxThreadLabelList;
|
|
2167
|
+
type RemoveInboxThreadLabelResponse = Response<RemoveInboxThreadLabelResponseSuccess>;
|
|
2168
|
+
//#endregion
|
|
2169
|
+
//#region src/inboxes/threads/interfaces/reply-inbox-thread-email.interface.d.ts
|
|
2170
|
+
type ReplyInboxThreadEmailOptions = InboxSelector & {
|
|
2171
|
+
threadId: string;
|
|
2172
|
+
emailId: string;
|
|
2173
|
+
} & RequireAtLeastOne<{
|
|
2174
|
+
html?: string;
|
|
2175
|
+
text?: string;
|
|
2176
|
+
}> & {
|
|
2177
|
+
cc?: string | string[];
|
|
2178
|
+
bcc?: string | string[];
|
|
2179
|
+
subject?: string;
|
|
2180
|
+
replyAll?: boolean;
|
|
2181
|
+
/**
|
|
2182
|
+
* Files to attach, as on `POST /emails`. Each one needs `content` or `path`.
|
|
2183
|
+
* Up to 10 files. The `content` of all files can total at most 25 MB.
|
|
2184
|
+
* A `path` file counts toward the 10 files only, because it is fetched when the email is sent.
|
|
2185
|
+
* An empty file, a blocked file type, a `path` that is not an `http` or `https` URL or that points to `localhost`, `127.0.0.1` or `0.0.0.0`,
|
|
2186
|
+
* or a `content_type` that is not a valid MIME type returns a 422.
|
|
2187
|
+
*/
|
|
2188
|
+
attachments?: Attachment[];
|
|
2189
|
+
/**
|
|
2190
|
+
* Custom headers to add to the email.
|
|
2191
|
+
* The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here.
|
|
2192
|
+
* Sending one of them, in any letter case, returns a 422.
|
|
2193
|
+
* Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422.
|
|
2194
|
+
* `null` means no custom headers.
|
|
2195
|
+
*/
|
|
2196
|
+
headers?: Record<string, string> | null;
|
|
2197
|
+
};
|
|
2198
|
+
interface ReplyInboxThreadEmailRequestOptions extends PostOptions, IdempotentRequest {}
|
|
2199
|
+
interface ReplyInboxThreadEmailResponseSuccess {
|
|
2200
|
+
id: string;
|
|
2201
|
+
}
|
|
2202
|
+
type ReplyInboxThreadEmailResponse = Response<ReplyInboxThreadEmailResponseSuccess>;
|
|
2203
|
+
//#endregion
|
|
2204
|
+
//#region src/inboxes/threads/interfaces/search-inbox-threads.interface.d.ts
|
|
2205
|
+
type SearchInboxThreadsOptions = ListInboxThreadsOptions & {
|
|
2206
|
+
query?: string;
|
|
2207
|
+
from?: string[];
|
|
2208
|
+
to?: string[];
|
|
2209
|
+
cc?: string[];
|
|
2210
|
+
bcc?: string[];
|
|
2211
|
+
hasAttachment?: boolean;
|
|
2212
|
+
startDate?: string;
|
|
2213
|
+
endDate?: string;
|
|
2214
|
+
};
|
|
2215
|
+
type InboxThreadSearchHighlightKey = 'subject' | 'body' | 'from' | 'to' | 'cc' | 'bcc' | 'attachments';
|
|
2216
|
+
interface InboxThreadSearchResult extends InboxThread {
|
|
2217
|
+
matched_email_id: string | null;
|
|
2218
|
+
highlights: Partial<Record<InboxThreadSearchHighlightKey, string[]>>;
|
|
2219
|
+
}
|
|
2220
|
+
interface SearchInboxThreadsResponseSuccess {
|
|
2221
|
+
object: 'list';
|
|
2222
|
+
has_more: boolean;
|
|
2223
|
+
data: InboxThreadSearchResult[];
|
|
2224
|
+
}
|
|
2225
|
+
type SearchInboxThreadsResponse = Response<SearchInboxThreadsResponseSuccess>;
|
|
2226
|
+
//#endregion
|
|
2227
|
+
//#region src/inboxes/threads/interfaces/set-inbox-thread-labels.interface.d.ts
|
|
2228
|
+
type SetInboxThreadLabelsOptions = InboxSelector & {
|
|
2229
|
+
threadId: string;
|
|
2230
|
+
labels: string[];
|
|
2231
|
+
};
|
|
2232
|
+
type SetInboxThreadLabelsResponseSuccess = InboxThreadLabelList;
|
|
2233
|
+
type SetInboxThreadLabelsResponse = Response<SetInboxThreadLabelsResponseSuccess>;
|
|
2234
|
+
//#endregion
|
|
2235
|
+
//#region src/inboxes/threads/interfaces/update-inbox-thread.interface.d.ts
|
|
2236
|
+
type UpdateInboxThreadOptions = InboxSelector & {
|
|
2237
|
+
threadId: string;
|
|
2238
|
+
} & RequireAtLeastOne<{
|
|
2239
|
+
read?: boolean;
|
|
2240
|
+
folder?: MoveThreadFolder;
|
|
2241
|
+
}>;
|
|
2242
|
+
type UpdateInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2243
|
+
type UpdateInboxThreadResponse = Response<UpdateInboxThreadResponseSuccess>;
|
|
2244
|
+
//#endregion
|
|
2245
|
+
//#region src/inboxes/interfaces/create-inbox.interface.d.ts
|
|
2246
|
+
interface CreateInboxOptions {
|
|
2247
|
+
emailAddress: string;
|
|
2248
|
+
name?: string;
|
|
2249
|
+
forwarding?: boolean;
|
|
2250
|
+
fromName?: string;
|
|
2251
|
+
}
|
|
2252
|
+
interface CreateInboxRequestOptions extends PostOptions {}
|
|
2253
|
+
interface CreateInboxResponseSuccess {
|
|
2254
|
+
object: 'inbox';
|
|
2255
|
+
id: string;
|
|
2256
|
+
}
|
|
2257
|
+
type CreateInboxResponse = Response<CreateInboxResponseSuccess>;
|
|
2258
|
+
//#endregion
|
|
2259
|
+
//#region src/inboxes/interfaces/get-inbox.interface.d.ts
|
|
2260
|
+
interface GetInboxResponseSuccess {
|
|
2261
|
+
object: 'inbox';
|
|
2262
|
+
id: string;
|
|
2263
|
+
name: string;
|
|
2264
|
+
email_address: string;
|
|
2265
|
+
domain_id: string;
|
|
2266
|
+
receiving_address: string | null;
|
|
2267
|
+
from_name: string | null;
|
|
2268
|
+
unread: number;
|
|
2269
|
+
drafts: number;
|
|
2270
|
+
last_received: string | null;
|
|
2271
|
+
created_at: string;
|
|
2272
|
+
updated_at: string;
|
|
2273
|
+
}
|
|
2274
|
+
type GetInboxResponse = Response<GetInboxResponseSuccess>;
|
|
2275
|
+
//#endregion
|
|
2276
|
+
//#region src/inboxes/interfaces/list-inboxes.interface.d.ts
|
|
2277
|
+
type ListInboxesOptions = PaginationOptions;
|
|
2278
|
+
interface ListInboxesResponseSuccess {
|
|
2279
|
+
object: 'list';
|
|
2280
|
+
has_more: boolean;
|
|
2281
|
+
data: Inbox[];
|
|
2282
|
+
}
|
|
2283
|
+
type ListInboxesResponse = Response<ListInboxesResponseSuccess>;
|
|
2284
|
+
//#endregion
|
|
2285
|
+
//#region src/inboxes/interfaces/remove-inbox.interface.d.ts
|
|
2286
|
+
interface RemoveInboxResponseSuccess {
|
|
2287
|
+
object: 'inbox';
|
|
2288
|
+
id: string;
|
|
2289
|
+
deleted: boolean;
|
|
2290
|
+
}
|
|
2291
|
+
type RemoveInboxResponse = Response<RemoveInboxResponseSuccess>;
|
|
2292
|
+
//#endregion
|
|
2293
|
+
//#region src/inboxes/interfaces/update-inbox.interface.d.ts
|
|
2294
|
+
type UpdateInboxOptions = RequireAtLeastOne<{
|
|
2295
|
+
name?: string;
|
|
2296
|
+
fromName?: string;
|
|
2297
|
+
}>;
|
|
2298
|
+
interface UpdateInboxResponseSuccess {
|
|
2299
|
+
object: 'inbox';
|
|
2300
|
+
id: string;
|
|
2301
|
+
}
|
|
2302
|
+
type UpdateInboxResponse = Response<UpdateInboxResponseSuccess>;
|
|
2303
|
+
//#endregion
|
|
1763
2304
|
//#region src/logs/interfaces/log.d.ts
|
|
1764
2305
|
export interface Log {
|
|
1765
2306
|
id: string;
|
|
@@ -2009,6 +2550,83 @@ declare class Events$1 {
|
|
|
2009
2550
|
remove(identifier: string, requestOptions?: RequestOptions): Promise<RemoveEventResponse>;
|
|
2010
2551
|
}
|
|
2011
2552
|
//#endregion
|
|
2553
|
+
//#region src/inboxes/agent/agent.d.ts
|
|
2554
|
+
declare class InboxAgent {
|
|
2555
|
+
private readonly resend;
|
|
2556
|
+
constructor(resend: Resend);
|
|
2557
|
+
get(options: GetInboxAgentOptions, requestOptions?: RequestOptions): Promise<GetInboxAgentResponse>;
|
|
2558
|
+
update(options: UpdateInboxAgentOptions, requestOptions?: RequestOptions): Promise<UpdateInboxAgentResponse>;
|
|
2559
|
+
}
|
|
2560
|
+
//#endregion
|
|
2561
|
+
//#region src/inboxes/drafts/drafts.d.ts
|
|
2562
|
+
declare class InboxDrafts {
|
|
2563
|
+
private readonly resend;
|
|
2564
|
+
constructor(resend: Resend);
|
|
2565
|
+
list(options: ListInboxDraftsOptions, requestOptions?: RequestOptions): Promise<ListInboxDraftsResponse>;
|
|
2566
|
+
create(payload: CreateInboxDraftOptions, options?: CreateInboxDraftRequestOptions): Promise<CreateInboxDraftResponse>;
|
|
2567
|
+
get(options: GetInboxDraftOptions, requestOptions?: RequestOptions): Promise<GetInboxDraftResponse>;
|
|
2568
|
+
update(options: UpdateInboxDraftOptions, requestOptions?: RequestOptions): Promise<UpdateInboxDraftResponse>;
|
|
2569
|
+
remove(options: RemoveInboxDraftOptions, requestOptions?: RequestOptions): Promise<RemoveInboxDraftResponse>;
|
|
2570
|
+
send(payload: SendInboxDraftOptions, options?: SendInboxDraftRequestOptions): Promise<SendInboxDraftResponse>;
|
|
2571
|
+
}
|
|
2572
|
+
//#endregion
|
|
2573
|
+
//#region src/inboxes/labels/labels.d.ts
|
|
2574
|
+
declare class InboxLabels {
|
|
2575
|
+
private readonly resend;
|
|
2576
|
+
constructor(resend: Resend);
|
|
2577
|
+
list(options: ListInboxLabelsOptions, requestOptions?: RequestOptions): Promise<ListInboxLabelsResponse>;
|
|
2578
|
+
create(payload: CreateInboxLabelOptions, options?: CreateInboxLabelRequestOptions): Promise<CreateInboxLabelResponse>;
|
|
2579
|
+
update(options: UpdateInboxLabelOptions, requestOptions?: RequestOptions): Promise<UpdateInboxLabelResponse>;
|
|
2580
|
+
remove(options: RemoveInboxLabelOptions, requestOptions?: RequestOptions): Promise<RemoveInboxLabelResponse>;
|
|
2581
|
+
}
|
|
2582
|
+
//#endregion
|
|
2583
|
+
//#region src/inboxes/threads/emails/emails.d.ts
|
|
2584
|
+
declare class InboxThreadEmails {
|
|
2585
|
+
private readonly resend;
|
|
2586
|
+
constructor(resend: Resend);
|
|
2587
|
+
list(options: ListInboxThreadEmailsOptions, requestOptions?: RequestOptions): Promise<ListInboxThreadEmailsResponse>;
|
|
2588
|
+
get(options: GetInboxThreadEmailOptions, requestOptions?: RequestOptions): Promise<GetInboxThreadEmailResponse>;
|
|
2589
|
+
reply(payload: ReplyInboxThreadEmailOptions, options?: ReplyInboxThreadEmailRequestOptions): Promise<ReplyInboxThreadEmailResponse>;
|
|
2590
|
+
forward(payload: ForwardInboxThreadEmailOptions, options?: ForwardInboxThreadEmailRequestOptions): Promise<ForwardInboxThreadEmailResponse>;
|
|
2591
|
+
}
|
|
2592
|
+
//#endregion
|
|
2593
|
+
//#region src/inboxes/threads/labels/labels.d.ts
|
|
2594
|
+
declare class InboxThreadLabels {
|
|
2595
|
+
private readonly resend;
|
|
2596
|
+
constructor(resend: Resend);
|
|
2597
|
+
add(options: AddInboxThreadLabelsOptions, requestOptions?: RequestOptions): Promise<AddInboxThreadLabelsResponse>;
|
|
2598
|
+
set(options: SetInboxThreadLabelsOptions, requestOptions?: RequestOptions): Promise<SetInboxThreadLabelsResponse>;
|
|
2599
|
+
remove(options: RemoveInboxThreadLabelOptions, requestOptions?: RequestOptions): Promise<RemoveInboxThreadLabelResponse>;
|
|
2600
|
+
}
|
|
2601
|
+
//#endregion
|
|
2602
|
+
//#region src/inboxes/threads/threads.d.ts
|
|
2603
|
+
declare class InboxThreads {
|
|
2604
|
+
private readonly resend;
|
|
2605
|
+
readonly emails: InboxThreadEmails;
|
|
2606
|
+
readonly labels: InboxThreadLabels;
|
|
2607
|
+
constructor(resend: Resend);
|
|
2608
|
+
list(options: ListInboxThreadsOptions, requestOptions?: RequestOptions): Promise<ListInboxThreadsResponse>;
|
|
2609
|
+
search(options: SearchInboxThreadsOptions, requestOptions?: RequestOptions): Promise<SearchInboxThreadsResponse>;
|
|
2610
|
+
get(options: GetInboxThreadOptions, requestOptions?: RequestOptions): Promise<GetInboxThreadResponse>;
|
|
2611
|
+
update(options: UpdateInboxThreadOptions, requestOptions?: RequestOptions): Promise<UpdateInboxThreadResponse>;
|
|
2612
|
+
remove(options: RemoveInboxThreadOptions, requestOptions?: RequestOptions): Promise<RemoveInboxThreadResponse>;
|
|
2613
|
+
}
|
|
2614
|
+
//#endregion
|
|
2615
|
+
//#region src/inboxes/inboxes.d.ts
|
|
2616
|
+
declare class Inboxes {
|
|
2617
|
+
private readonly resend;
|
|
2618
|
+
readonly threads: InboxThreads;
|
|
2619
|
+
readonly labels: InboxLabels;
|
|
2620
|
+
readonly drafts: InboxDrafts;
|
|
2621
|
+
readonly agent: InboxAgent;
|
|
2622
|
+
constructor(resend: Resend);
|
|
2623
|
+
create(payload: CreateInboxOptions, options?: CreateInboxRequestOptions): Promise<CreateInboxResponse>;
|
|
2624
|
+
list(options?: ListInboxesOptions, requestOptions?: RequestOptions): Promise<ListInboxesResponse>;
|
|
2625
|
+
get(idOrEmail: string, requestOptions?: RequestOptions): Promise<GetInboxResponse>;
|
|
2626
|
+
update(idOrEmail: string, payload: UpdateInboxOptions, requestOptions?: RequestOptions): Promise<UpdateInboxResponse>;
|
|
2627
|
+
remove(idOrEmail: string, requestOptions?: RequestOptions): Promise<RemoveInboxResponse>;
|
|
2628
|
+
}
|
|
2629
|
+
//#endregion
|
|
2012
2630
|
//#region src/logs/logs.d.ts
|
|
2013
2631
|
declare class Logs {
|
|
2014
2632
|
private readonly resend;
|
|
@@ -2409,7 +3027,7 @@ declare class Usage {
|
|
|
2409
3027
|
}
|
|
2410
3028
|
//#endregion
|
|
2411
3029
|
//#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';
|
|
3030
|
+
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
3031
|
interface BaseEmailEventData {
|
|
2414
3032
|
broadcast_id?: string;
|
|
2415
3033
|
created_at: string;
|
|
@@ -2509,6 +3127,50 @@ interface TopicEventData {
|
|
|
2509
3127
|
created_at: string;
|
|
2510
3128
|
updated_at: string;
|
|
2511
3129
|
}
|
|
3130
|
+
type InboxEventSource = 'api' | 'dashboard' | 'agent' | 'system';
|
|
3131
|
+
type InboxEventEmail = Omit<InboxMessage, 'html' | 'text'>;
|
|
3132
|
+
type InboxEventDraft = Omit<InboxDraft, 'html' | 'text'>;
|
|
3133
|
+
interface InboxBaseEventData {
|
|
3134
|
+
source: InboxEventSource;
|
|
3135
|
+
inbox_id: string;
|
|
3136
|
+
}
|
|
3137
|
+
interface InboxEventData extends InboxBaseEventData {
|
|
3138
|
+
inbox?: GetInboxResponseSuccess;
|
|
3139
|
+
}
|
|
3140
|
+
interface InboxThreadEventData extends InboxBaseEventData {
|
|
3141
|
+
thread_id: string;
|
|
3142
|
+
thread?: InboxThreadSummary;
|
|
3143
|
+
}
|
|
3144
|
+
interface InboxThreadEmailEventData extends InboxThreadEventData {
|
|
3145
|
+
email_id: string;
|
|
3146
|
+
email?: InboxEventEmail;
|
|
3147
|
+
}
|
|
3148
|
+
interface InboxThreadFolderUpdatedEventData extends InboxThreadEventData {
|
|
3149
|
+
from: MoveThreadFolder;
|
|
3150
|
+
to: MoveThreadFolder;
|
|
3151
|
+
}
|
|
3152
|
+
interface InboxThreadAssignedEventData extends InboxThreadEventData {
|
|
3153
|
+
assignee_email: string | null;
|
|
3154
|
+
assigned_by_email: string | null;
|
|
3155
|
+
previous_assignee_email: string | null;
|
|
3156
|
+
}
|
|
3157
|
+
interface InboxThreadUnassignedEventData extends InboxThreadEventData {
|
|
3158
|
+
previous_assignee_email: string | null;
|
|
3159
|
+
}
|
|
3160
|
+
interface InboxThreadLabelsUpdatedEventData extends InboxThreadEventData {
|
|
3161
|
+
added: InboxThreadLabel[];
|
|
3162
|
+
removed: InboxThreadLabel[];
|
|
3163
|
+
}
|
|
3164
|
+
interface InboxDraftEventData extends InboxBaseEventData {
|
|
3165
|
+
thread_id?: string;
|
|
3166
|
+
draft_id: string;
|
|
3167
|
+
thread?: InboxThreadSummary;
|
|
3168
|
+
draft?: InboxEventDraft;
|
|
3169
|
+
}
|
|
3170
|
+
interface InboxDraftSentEventData extends InboxThreadEmailEventData {
|
|
3171
|
+
draft_id: string;
|
|
3172
|
+
draft?: InboxEventDraft;
|
|
3173
|
+
}
|
|
2512
3174
|
interface EmailSentEvent {
|
|
2513
3175
|
type: 'email.sent';
|
|
2514
3176
|
created_at: string;
|
|
@@ -2632,7 +3294,77 @@ interface TopicDeletedEvent {
|
|
|
2632
3294
|
created_at: string;
|
|
2633
3295
|
data: TopicEventData;
|
|
2634
3296
|
}
|
|
2635
|
-
|
|
3297
|
+
interface InboxCreatedEvent {
|
|
3298
|
+
type: 'inbox.created';
|
|
3299
|
+
created_at: string;
|
|
3300
|
+
data: InboxEventData;
|
|
3301
|
+
}
|
|
3302
|
+
interface InboxUpdatedEvent {
|
|
3303
|
+
type: 'inbox.updated';
|
|
3304
|
+
created_at: string;
|
|
3305
|
+
data: InboxEventData;
|
|
3306
|
+
}
|
|
3307
|
+
interface InboxDeletedEvent {
|
|
3308
|
+
type: 'inbox.deleted';
|
|
3309
|
+
created_at: string;
|
|
3310
|
+
data: InboxBaseEventData;
|
|
3311
|
+
}
|
|
3312
|
+
interface InboxThreadCreatedEvent {
|
|
3313
|
+
type: 'inbox.thread.created';
|
|
3314
|
+
created_at: string;
|
|
3315
|
+
data: InboxThreadEmailEventData;
|
|
3316
|
+
}
|
|
3317
|
+
interface InboxThreadFolderUpdatedEvent {
|
|
3318
|
+
type: 'inbox.thread.folder.updated';
|
|
3319
|
+
created_at: string;
|
|
3320
|
+
data: InboxThreadFolderUpdatedEventData;
|
|
3321
|
+
}
|
|
3322
|
+
interface InboxThreadAssignedEvent {
|
|
3323
|
+
type: 'inbox.thread.assigned';
|
|
3324
|
+
created_at: string;
|
|
3325
|
+
data: InboxThreadAssignedEventData;
|
|
3326
|
+
}
|
|
3327
|
+
interface InboxThreadUnassignedEvent {
|
|
3328
|
+
type: 'inbox.thread.unassigned';
|
|
3329
|
+
created_at: string;
|
|
3330
|
+
data: InboxThreadUnassignedEventData;
|
|
3331
|
+
}
|
|
3332
|
+
interface InboxThreadLabelsUpdatedEvent {
|
|
3333
|
+
type: 'inbox.thread.labels.updated';
|
|
3334
|
+
created_at: string;
|
|
3335
|
+
data: InboxThreadLabelsUpdatedEventData;
|
|
3336
|
+
}
|
|
3337
|
+
interface InboxEmailReceivedEvent {
|
|
3338
|
+
type: 'inbox.email.received';
|
|
3339
|
+
created_at: string;
|
|
3340
|
+
data: InboxThreadEmailEventData;
|
|
3341
|
+
}
|
|
3342
|
+
interface InboxEmailSentEvent {
|
|
3343
|
+
type: 'inbox.email.sent';
|
|
3344
|
+
created_at: string;
|
|
3345
|
+
data: InboxThreadEmailEventData;
|
|
3346
|
+
}
|
|
3347
|
+
interface InboxDraftCreatedEvent {
|
|
3348
|
+
type: 'inbox.draft.created';
|
|
3349
|
+
created_at: string;
|
|
3350
|
+
data: InboxDraftEventData;
|
|
3351
|
+
}
|
|
3352
|
+
interface InboxDraftUpdatedEvent {
|
|
3353
|
+
type: 'inbox.draft.updated';
|
|
3354
|
+
created_at: string;
|
|
3355
|
+
data: InboxDraftEventData;
|
|
3356
|
+
}
|
|
3357
|
+
interface InboxDraftSentEvent {
|
|
3358
|
+
type: 'inbox.draft.sent';
|
|
3359
|
+
created_at: string;
|
|
3360
|
+
data: InboxDraftSentEventData;
|
|
3361
|
+
}
|
|
3362
|
+
interface InboxDraftDeletedEvent {
|
|
3363
|
+
type: 'inbox.draft.deleted';
|
|
3364
|
+
created_at: string;
|
|
3365
|
+
data: InboxDraftEventData;
|
|
3366
|
+
}
|
|
3367
|
+
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
3368
|
//#endregion
|
|
2637
3369
|
//#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
|
|
2638
3370
|
type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
|
|
@@ -2834,6 +3566,7 @@ export declare class Resend {
|
|
|
2834
3566
|
readonly domains: Domains;
|
|
2835
3567
|
readonly emails: Emails;
|
|
2836
3568
|
readonly events: Events$1;
|
|
3569
|
+
readonly inboxes: Inboxes;
|
|
2837
3570
|
readonly logs: Logs;
|
|
2838
3571
|
readonly oauthGrants: OAuthGrants;
|
|
2839
3572
|
readonly suppressions: Suppressions;
|
|
@@ -2851,4 +3584,4 @@ export declare class Resend {
|
|
|
2851
3584
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
2852
3585
|
}
|
|
2853
3586
|
//#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 };
|
|
3587
|
+
export type { AddInboxThreadLabelsOptions, AddInboxThreadLabelsResponse, AddInboxThreadLabelsResponseSuccess, 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, GetInboxAgentOptions, GetInboxAgentResponse, GetInboxAgentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxAgentAction, InboxAgentSettings, InboxAgentTone, InboxCreatedEvent, InboxDeletedEvent, InboxDraft, InboxDraftAttachment, InboxDraftAttachmentOptions, InboxDraftCreatedEvent, InboxDraftDeletedEvent, InboxDraftListItem, InboxDraftSentEvent, InboxDraftType, InboxDraftUpdatedEvent, InboxEmailReceivedEvent, InboxEmailSentEvent, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxSelector, InboxThread, InboxThreadAssignedEvent, InboxThreadCreatedEvent, InboxThreadFolderUpdatedEvent, InboxThreadLabel, InboxThreadLabelList, InboxThreadLabelsUpdatedEvent, InboxThreadSearchHighlightKey, InboxThreadSearchResult, 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, RemoveInboxThreadLabelOptions, RemoveInboxThreadLabelResponse, RemoveInboxThreadLabelResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SearchInboxThreadsOptions, SearchInboxThreadsResponse, SearchInboxThreadsResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SetInboxThreadLabelsOptions, SetInboxThreadLabelsResponse, SetInboxThreadLabelsResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, TopicCreatedEvent, TopicDeletedEvent, TopicUpdatedEvent, UpdateInboxAgentOptions, UpdateInboxAgentResponse, UpdateInboxAgentResponseSuccess, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|