resend 6.33.0 → 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 +161 -57
- package/dist/index.d.cts +143 -114
- package/dist/index.d.mts +143 -114
- package/dist/index.mjs +161 -58
- package/package.json +1 -1
- package/readme.md +11 -0
package/dist/index.d.cts
CHANGED
|
@@ -1761,29 +1761,58 @@ export interface UpdateEventResponseSuccess {
|
|
|
1761
1761
|
export type UpdateEventResponse = Response<UpdateEventResponseSuccess>;
|
|
1762
1762
|
//#endregion
|
|
1763
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", "
|
|
1764
|
+
export declare const INBOX_AGENT_ACTIONS: readonly ["draft_reply", "forward_thread", "add_labels", "assign_thread", "mark_as_spam", "archive", "move_to_trash"];
|
|
1765
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];
|
|
1766
1768
|
interface InboxAgentSettings {
|
|
1767
1769
|
object: 'inbox_agent';
|
|
1768
1770
|
instructions: string | null;
|
|
1769
|
-
tone:
|
|
1770
|
-
|
|
1771
|
+
tone: InboxAgentTone | null;
|
|
1772
|
+
actions: InboxAgentAction[];
|
|
1771
1773
|
}
|
|
1772
1774
|
//#endregion
|
|
1773
|
-
//#region src/inboxes/
|
|
1774
|
-
|
|
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. */
|
|
1775
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;
|
|
1776
1804
|
}
|
|
1805
|
+
//#endregion
|
|
1806
|
+
//#region src/inboxes/agent/interfaces/get-inbox-agent.interface.d.ts
|
|
1807
|
+
type GetInboxAgentOptions = InboxSelector;
|
|
1777
1808
|
type GetInboxAgentResponseSuccess = InboxAgentSettings;
|
|
1778
1809
|
type GetInboxAgentResponse = Response<GetInboxAgentResponseSuccess>;
|
|
1779
1810
|
//#endregion
|
|
1780
1811
|
//#region src/inboxes/agent/interfaces/update-inbox-agent.interface.d.ts
|
|
1781
|
-
type UpdateInboxAgentOptions = {
|
|
1782
|
-
inboxId: string;
|
|
1783
|
-
} & RequireAtLeastOne<{
|
|
1812
|
+
type UpdateInboxAgentOptions = InboxSelector & RequireAtLeastOne<{
|
|
1784
1813
|
instructions?: string | null;
|
|
1785
|
-
tone?:
|
|
1786
|
-
|
|
1814
|
+
tone?: InboxAgentTone | null;
|
|
1815
|
+
actions?: InboxAgentAction[];
|
|
1787
1816
|
}>;
|
|
1788
1817
|
interface UpdateInboxAgentResponseSuccess {
|
|
1789
1818
|
object: 'inbox_agent';
|
|
@@ -1850,9 +1879,7 @@ type CreateInboxDraftContent = RequireAtLeastOne<{
|
|
|
1850
1879
|
*/
|
|
1851
1880
|
attachments?: InboxDraftAttachmentOptions[];
|
|
1852
1881
|
}>;
|
|
1853
|
-
type CreateInboxDraftOptions = {
|
|
1854
|
-
inboxId: string;
|
|
1855
|
-
} & CreateInboxDraftContent & ({
|
|
1882
|
+
type CreateInboxDraftOptions = InboxSelector & CreateInboxDraftContent & ({
|
|
1856
1883
|
threadId: string;
|
|
1857
1884
|
replyToEmailId: string;
|
|
1858
1885
|
} | {
|
|
@@ -1867,17 +1894,14 @@ interface CreateInboxDraftResponseSuccess {
|
|
|
1867
1894
|
type CreateInboxDraftResponse = Response<CreateInboxDraftResponseSuccess>;
|
|
1868
1895
|
//#endregion
|
|
1869
1896
|
//#region src/inboxes/drafts/interfaces/get-inbox-draft.interface.d.ts
|
|
1870
|
-
|
|
1871
|
-
inboxId: string;
|
|
1897
|
+
type GetInboxDraftOptions = InboxSelector & {
|
|
1872
1898
|
draftId: string;
|
|
1873
|
-
}
|
|
1899
|
+
};
|
|
1874
1900
|
type GetInboxDraftResponseSuccess = InboxDraft;
|
|
1875
1901
|
type GetInboxDraftResponse = Response<GetInboxDraftResponseSuccess>;
|
|
1876
1902
|
//#endregion
|
|
1877
1903
|
//#region src/inboxes/drafts/interfaces/list-inbox-drafts.interface.d.ts
|
|
1878
|
-
type ListInboxDraftsOptions =
|
|
1879
|
-
inboxId: string;
|
|
1880
|
-
} & PaginationOptions;
|
|
1904
|
+
type ListInboxDraftsOptions = InboxSelector & PaginationOptions;
|
|
1881
1905
|
interface ListInboxDraftsResponseSuccess {
|
|
1882
1906
|
object: 'list';
|
|
1883
1907
|
has_more: boolean;
|
|
@@ -1886,10 +1910,9 @@ interface ListInboxDraftsResponseSuccess {
|
|
|
1886
1910
|
type ListInboxDraftsResponse = Response<ListInboxDraftsResponseSuccess>;
|
|
1887
1911
|
//#endregion
|
|
1888
1912
|
//#region src/inboxes/drafts/interfaces/remove-inbox-draft.interface.d.ts
|
|
1889
|
-
|
|
1890
|
-
inboxId: string;
|
|
1913
|
+
type RemoveInboxDraftOptions = InboxSelector & {
|
|
1891
1914
|
draftId: string;
|
|
1892
|
-
}
|
|
1915
|
+
};
|
|
1893
1916
|
interface RemoveInboxDraftResponseSuccess {
|
|
1894
1917
|
object: 'inbox_draft';
|
|
1895
1918
|
id: string;
|
|
@@ -1898,8 +1921,7 @@ interface RemoveInboxDraftResponseSuccess {
|
|
|
1898
1921
|
type RemoveInboxDraftResponse = Response<RemoveInboxDraftResponseSuccess>;
|
|
1899
1922
|
//#endregion
|
|
1900
1923
|
//#region src/inboxes/drafts/interfaces/send-inbox-draft.interface.d.ts
|
|
1901
|
-
|
|
1902
|
-
inboxId: string;
|
|
1924
|
+
type SendInboxDraftOptions = InboxSelector & {
|
|
1903
1925
|
draftId: string;
|
|
1904
1926
|
/**
|
|
1905
1927
|
* Custom headers to add to the email.
|
|
@@ -1909,7 +1931,7 @@ interface SendInboxDraftOptions {
|
|
|
1909
1931
|
* `null` means no custom headers.
|
|
1910
1932
|
*/
|
|
1911
1933
|
headers?: Record<string, string> | null;
|
|
1912
|
-
}
|
|
1934
|
+
};
|
|
1913
1935
|
interface SendInboxDraftRequestOptions extends PostOptions, IdempotentRequest {}
|
|
1914
1936
|
interface SendInboxDraftResponseSuccess {
|
|
1915
1937
|
id: string;
|
|
@@ -1917,8 +1939,7 @@ interface SendInboxDraftResponseSuccess {
|
|
|
1917
1939
|
type SendInboxDraftResponse = Response<SendInboxDraftResponseSuccess>;
|
|
1918
1940
|
//#endregion
|
|
1919
1941
|
//#region src/inboxes/drafts/interfaces/update-inbox-draft.interface.d.ts
|
|
1920
|
-
type UpdateInboxDraftOptions = {
|
|
1921
|
-
inboxId: string;
|
|
1942
|
+
type UpdateInboxDraftOptions = InboxSelector & {
|
|
1922
1943
|
draftId: string;
|
|
1923
1944
|
} & RequireAtLeastOne<{
|
|
1924
1945
|
to?: string | string[] | null;
|
|
@@ -1937,27 +1958,11 @@ type UpdateInboxDraftOptions = {
|
|
|
1937
1958
|
type UpdateInboxDraftResponseSuccess = InboxDraft;
|
|
1938
1959
|
type UpdateInboxDraftResponse = Response<UpdateInboxDraftResponseSuccess>;
|
|
1939
1960
|
//#endregion
|
|
1940
|
-
//#region src/inboxes/interfaces/inbox.d.ts
|
|
1941
|
-
export declare const INBOX_MESSAGE_FOLDERS: readonly ["inbox", "archive", "spam", "sent", "trash"];
|
|
1942
|
-
type InboxMessageFolder = (typeof INBOX_MESSAGE_FOLDERS)[number];
|
|
1943
|
-
export declare const MOVE_THREAD_FOLDERS: readonly ["inbox", "archive", "spam", "trash"];
|
|
1944
|
-
type MoveThreadFolder = (typeof MOVE_THREAD_FOLDERS)[number];
|
|
1945
|
-
type InboxLabelColor = `#${string}`;
|
|
1946
|
-
interface Inbox {
|
|
1947
|
-
id: string;
|
|
1948
|
-
name: string | null;
|
|
1949
|
-
email_address: string;
|
|
1950
|
-
from_name: string | null;
|
|
1951
|
-
unread: number;
|
|
1952
|
-
last_received: string | null;
|
|
1953
|
-
}
|
|
1954
|
-
//#endregion
|
|
1955
1961
|
//#region src/inboxes/labels/interfaces/create-inbox-label.interface.d.ts
|
|
1956
|
-
|
|
1957
|
-
inboxId: string;
|
|
1962
|
+
type CreateInboxLabelOptions = InboxSelector & {
|
|
1958
1963
|
name: string;
|
|
1959
1964
|
color?: InboxLabelColor;
|
|
1960
|
-
}
|
|
1965
|
+
};
|
|
1961
1966
|
interface CreateInboxLabelRequestOptions extends PostOptions {}
|
|
1962
1967
|
interface CreateInboxLabelResponseSuccess {
|
|
1963
1968
|
object: 'inbox_label';
|
|
@@ -1974,9 +1979,7 @@ interface InboxLabel {
|
|
|
1974
1979
|
}
|
|
1975
1980
|
//#endregion
|
|
1976
1981
|
//#region src/inboxes/labels/interfaces/list-inbox-labels.interface.d.ts
|
|
1977
|
-
|
|
1978
|
-
inboxId: string;
|
|
1979
|
-
}
|
|
1982
|
+
type ListInboxLabelsOptions = InboxSelector;
|
|
1980
1983
|
interface ListInboxLabelsResponseSuccess {
|
|
1981
1984
|
object: 'list';
|
|
1982
1985
|
data: InboxLabel[];
|
|
@@ -1984,10 +1987,9 @@ interface ListInboxLabelsResponseSuccess {
|
|
|
1984
1987
|
type ListInboxLabelsResponse = Response<ListInboxLabelsResponseSuccess>;
|
|
1985
1988
|
//#endregion
|
|
1986
1989
|
//#region src/inboxes/labels/interfaces/remove-inbox-label.interface.d.ts
|
|
1987
|
-
|
|
1988
|
-
inboxId: string;
|
|
1990
|
+
type RemoveInboxLabelOptions = InboxSelector & {
|
|
1989
1991
|
labelId: string;
|
|
1990
|
-
}
|
|
1992
|
+
};
|
|
1991
1993
|
interface RemoveInboxLabelResponseSuccess {
|
|
1992
1994
|
object: 'inbox_label';
|
|
1993
1995
|
id: string;
|
|
@@ -1996,60 +1998,27 @@ interface RemoveInboxLabelResponseSuccess {
|
|
|
1996
1998
|
type RemoveInboxLabelResponse = Response<RemoveInboxLabelResponseSuccess>;
|
|
1997
1999
|
//#endregion
|
|
1998
2000
|
//#region src/inboxes/labels/interfaces/update-inbox-label.interface.d.ts
|
|
1999
|
-
|
|
2000
|
-
inboxId: string;
|
|
2001
|
+
type UpdateInboxLabelOptions = InboxSelector & {
|
|
2001
2002
|
labelId: string;
|
|
2002
2003
|
name?: string;
|
|
2003
2004
|
color?: InboxLabelColor;
|
|
2004
|
-
}
|
|
2005
|
+
};
|
|
2005
2006
|
interface UpdateInboxLabelResponseSuccess {
|
|
2006
2007
|
object: 'inbox_label';
|
|
2007
2008
|
id: string;
|
|
2008
2009
|
}
|
|
2009
2010
|
type UpdateInboxLabelResponse = Response<UpdateInboxLabelResponseSuccess>;
|
|
2010
2011
|
//#endregion
|
|
2011
|
-
//#region src/inboxes/threads/interfaces/forward-inbox-thread-email.interface.d.ts
|
|
2012
|
-
interface ForwardInboxThreadEmailOptions {
|
|
2013
|
-
inboxId: string;
|
|
2014
|
-
threadId: string;
|
|
2015
|
-
emailId: string;
|
|
2016
|
-
to: string | string[];
|
|
2017
|
-
cc?: string | string[];
|
|
2018
|
-
bcc?: string | string[];
|
|
2019
|
-
html?: string;
|
|
2020
|
-
text?: string;
|
|
2021
|
-
subject?: string;
|
|
2022
|
-
/**
|
|
2023
|
-
* Files to attach, as on `POST /emails`. Each one needs `content` or `path`.
|
|
2024
|
-
* They share one limit with the attachments of the original message, which the forward also sends.
|
|
2025
|
-
* Together they can have up to 10 files and at most 25 MB of `content`.
|
|
2026
|
-
* A `path` file counts toward the 10 files only, because it is fetched when the email is sent.
|
|
2027
|
-
* 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`,
|
|
2028
|
-
* or a `content_type` that is not a valid MIME type returns a 422.
|
|
2029
|
-
* An original attachment that was sent from a URL (`path`) cannot be forwarded, and the request returns a 422.
|
|
2030
|
-
*/
|
|
2031
|
-
attachments?: Attachment[];
|
|
2032
|
-
/**
|
|
2033
|
-
* Custom headers to add to the email.
|
|
2034
|
-
* The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here.
|
|
2035
|
-
* Sending one of them, in any letter case, returns a 422.
|
|
2036
|
-
* Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422.
|
|
2037
|
-
* `null` means no custom headers.
|
|
2038
|
-
*/
|
|
2039
|
-
headers?: Record<string, string> | null;
|
|
2040
|
-
}
|
|
2041
|
-
interface ForwardInboxThreadEmailRequestOptions extends PostOptions, IdempotentRequest {}
|
|
2042
|
-
interface ForwardInboxThreadEmailResponseSuccess {
|
|
2043
|
-
id: string;
|
|
2044
|
-
}
|
|
2045
|
-
type ForwardInboxThreadEmailResponse = Response<ForwardInboxThreadEmailResponseSuccess>;
|
|
2046
|
-
//#endregion
|
|
2047
2012
|
//#region src/inboxes/threads/interfaces/thread.d.ts
|
|
2048
2013
|
interface InboxThreadLabel {
|
|
2049
2014
|
id: string;
|
|
2050
2015
|
name: string;
|
|
2051
2016
|
color: InboxLabelColor;
|
|
2052
2017
|
}
|
|
2018
|
+
interface InboxThreadLabelList {
|
|
2019
|
+
object: 'list';
|
|
2020
|
+
data: InboxThreadLabel[];
|
|
2021
|
+
}
|
|
2053
2022
|
interface InboxThread {
|
|
2054
2023
|
id: string;
|
|
2055
2024
|
subject: string | null;
|
|
@@ -2095,26 +2064,67 @@ interface InboxMessage {
|
|
|
2095
2064
|
received_at: string;
|
|
2096
2065
|
}
|
|
2097
2066
|
//#endregion
|
|
2098
|
-
//#region src/inboxes/threads/interfaces/
|
|
2099
|
-
|
|
2100
|
-
inboxId: string;
|
|
2067
|
+
//#region src/inboxes/threads/interfaces/add-inbox-thread-labels.interface.d.ts
|
|
2068
|
+
type AddInboxThreadLabelsOptions = InboxSelector & {
|
|
2101
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;
|
|
2102
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
|
+
};
|
|
2103
2115
|
type GetInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2104
2116
|
type GetInboxThreadResponse = Response<GetInboxThreadResponseSuccess>;
|
|
2105
2117
|
//#endregion
|
|
2106
2118
|
//#region src/inboxes/threads/interfaces/get-inbox-thread-email.interface.d.ts
|
|
2107
|
-
|
|
2108
|
-
inboxId: string;
|
|
2119
|
+
type GetInboxThreadEmailOptions = InboxSelector & {
|
|
2109
2120
|
threadId: string;
|
|
2110
2121
|
emailId: string;
|
|
2111
|
-
}
|
|
2122
|
+
};
|
|
2112
2123
|
type GetInboxThreadEmailResponseSuccess = InboxMessage;
|
|
2113
2124
|
type GetInboxThreadEmailResponse = Response<GetInboxThreadEmailResponseSuccess>;
|
|
2114
2125
|
//#endregion
|
|
2115
2126
|
//#region src/inboxes/threads/interfaces/list-inbox-thread-emails.interface.d.ts
|
|
2116
|
-
type ListInboxThreadEmailsOptions = {
|
|
2117
|
-
inboxId: string;
|
|
2127
|
+
type ListInboxThreadEmailsOptions = InboxSelector & {
|
|
2118
2128
|
threadId: string;
|
|
2119
2129
|
} & PaginationOptions;
|
|
2120
2130
|
interface ListInboxThreadEmailsResponseSuccess {
|
|
@@ -2125,8 +2135,7 @@ interface ListInboxThreadEmailsResponseSuccess {
|
|
|
2125
2135
|
type ListInboxThreadEmailsResponse = Response<ListInboxThreadEmailsResponseSuccess>;
|
|
2126
2136
|
//#endregion
|
|
2127
2137
|
//#region src/inboxes/threads/interfaces/list-inbox-threads.interface.d.ts
|
|
2128
|
-
type ListInboxThreadsOptions = {
|
|
2129
|
-
inboxId: string;
|
|
2138
|
+
type ListInboxThreadsOptions = InboxSelector & {
|
|
2130
2139
|
folders?: InboxMessageFolder[];
|
|
2131
2140
|
labels?: string[];
|
|
2132
2141
|
read?: boolean;
|
|
@@ -2139,10 +2148,9 @@ interface ListInboxThreadsResponseSuccess {
|
|
|
2139
2148
|
type ListInboxThreadsResponse = Response<ListInboxThreadsResponseSuccess>;
|
|
2140
2149
|
//#endregion
|
|
2141
2150
|
//#region src/inboxes/threads/interfaces/remove-inbox-thread.interface.d.ts
|
|
2142
|
-
|
|
2143
|
-
inboxId: string;
|
|
2151
|
+
type RemoveInboxThreadOptions = InboxSelector & {
|
|
2144
2152
|
threadId: string;
|
|
2145
|
-
}
|
|
2153
|
+
};
|
|
2146
2154
|
interface RemoveInboxThreadResponseSuccess {
|
|
2147
2155
|
object: 'inbox_thread';
|
|
2148
2156
|
id: string;
|
|
@@ -2150,9 +2158,16 @@ interface RemoveInboxThreadResponseSuccess {
|
|
|
2150
2158
|
}
|
|
2151
2159
|
type RemoveInboxThreadResponse = Response<RemoveInboxThreadResponseSuccess>;
|
|
2152
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
|
|
2153
2169
|
//#region src/inboxes/threads/interfaces/reply-inbox-thread-email.interface.d.ts
|
|
2154
|
-
type ReplyInboxThreadEmailOptions = {
|
|
2155
|
-
inboxId: string;
|
|
2170
|
+
type ReplyInboxThreadEmailOptions = InboxSelector & {
|
|
2156
2171
|
threadId: string;
|
|
2157
2172
|
emailId: string;
|
|
2158
2173
|
} & RequireAtLeastOne<{
|
|
@@ -2209,17 +2224,20 @@ interface SearchInboxThreadsResponseSuccess {
|
|
|
2209
2224
|
}
|
|
2210
2225
|
type SearchInboxThreadsResponse = Response<SearchInboxThreadsResponseSuccess>;
|
|
2211
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
|
|
2212
2235
|
//#region src/inboxes/threads/interfaces/update-inbox-thread.interface.d.ts
|
|
2213
|
-
type UpdateInboxThreadOptions = {
|
|
2214
|
-
inboxId: string;
|
|
2236
|
+
type UpdateInboxThreadOptions = InboxSelector & {
|
|
2215
2237
|
threadId: string;
|
|
2216
2238
|
} & RequireAtLeastOne<{
|
|
2217
2239
|
read?: boolean;
|
|
2218
2240
|
folder?: MoveThreadFolder;
|
|
2219
|
-
/** Label IDs to apply to the thread. Between 1 and 10 IDs. */
|
|
2220
|
-
addLabelIds?: string[];
|
|
2221
|
-
/** Label IDs to remove from the thread. Between 1 and 10 IDs. The labels themselves are kept. */
|
|
2222
|
-
removeLabelIds?: string[];
|
|
2223
2241
|
}>;
|
|
2224
2242
|
type UpdateInboxThreadResponseSuccess = InboxThreadSummary;
|
|
2225
2243
|
type UpdateInboxThreadResponse = Response<UpdateInboxThreadResponseSuccess>;
|
|
@@ -2251,6 +2269,7 @@ interface GetInboxResponseSuccess {
|
|
|
2251
2269
|
drafts: number;
|
|
2252
2270
|
last_received: string | null;
|
|
2253
2271
|
created_at: string;
|
|
2272
|
+
updated_at: string;
|
|
2254
2273
|
}
|
|
2255
2274
|
type GetInboxResponse = Response<GetInboxResponseSuccess>;
|
|
2256
2275
|
//#endregion
|
|
@@ -2571,10 +2590,20 @@ declare class InboxThreadEmails {
|
|
|
2571
2590
|
forward(payload: ForwardInboxThreadEmailOptions, options?: ForwardInboxThreadEmailRequestOptions): Promise<ForwardInboxThreadEmailResponse>;
|
|
2572
2591
|
}
|
|
2573
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
|
|
2574
2602
|
//#region src/inboxes/threads/threads.d.ts
|
|
2575
2603
|
declare class InboxThreads {
|
|
2576
2604
|
private readonly resend;
|
|
2577
2605
|
readonly emails: InboxThreadEmails;
|
|
2606
|
+
readonly labels: InboxThreadLabels;
|
|
2578
2607
|
constructor(resend: Resend);
|
|
2579
2608
|
list(options: ListInboxThreadsOptions, requestOptions?: RequestOptions): Promise<ListInboxThreadsResponse>;
|
|
2580
2609
|
search(options: SearchInboxThreadsOptions, requestOptions?: RequestOptions): Promise<SearchInboxThreadsResponse>;
|
|
@@ -2594,8 +2623,8 @@ declare class Inboxes {
|
|
|
2594
2623
|
create(payload: CreateInboxOptions, options?: CreateInboxRequestOptions): Promise<CreateInboxResponse>;
|
|
2595
2624
|
list(options?: ListInboxesOptions, requestOptions?: RequestOptions): Promise<ListInboxesResponse>;
|
|
2596
2625
|
get(idOrEmail: string, requestOptions?: RequestOptions): Promise<GetInboxResponse>;
|
|
2597
|
-
update(
|
|
2598
|
-
remove(
|
|
2626
|
+
update(idOrEmail: string, payload: UpdateInboxOptions, requestOptions?: RequestOptions): Promise<UpdateInboxResponse>;
|
|
2627
|
+
remove(idOrEmail: string, requestOptions?: RequestOptions): Promise<RemoveInboxResponse>;
|
|
2599
2628
|
}
|
|
2600
2629
|
//#endregion
|
|
2601
2630
|
//#region src/logs/logs.d.ts
|
|
@@ -3555,4 +3584,4 @@ export declare class Resend {
|
|
|
3555
3584
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
3556
3585
|
}
|
|
3557
3586
|
//#endregion
|
|
3558
|
-
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, GetInboxAgentOptions, GetInboxAgentResponse, GetInboxAgentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxAgentAction, InboxAgentSettings, InboxCreatedEvent, InboxDeletedEvent, InboxDraft, InboxDraftAttachment, InboxDraftAttachmentOptions, InboxDraftCreatedEvent, InboxDraftDeletedEvent, InboxDraftListItem, InboxDraftSentEvent, InboxDraftType, InboxDraftUpdatedEvent, InboxEmailReceivedEvent, InboxEmailSentEvent, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadAssignedEvent, InboxThreadCreatedEvent, InboxThreadFolderUpdatedEvent, InboxThreadLabel, 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, 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, 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 };
|
|
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 };
|