resend 6.31.0 → 6.32.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 +272 -255
- package/dist/index.d.cts +125 -124
- package/dist/index.d.mts +125 -124
- package/dist/index.mjs +272 -255
- package/package.json +1 -1
- package/readme.md +41 -0
package/dist/index.d.cts
CHANGED
|
@@ -29,11 +29,15 @@ export interface AttachmentData {
|
|
|
29
29
|
expires_at: string;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region src/common/interfaces/
|
|
33
|
-
export interface
|
|
32
|
+
//#region src/common/interfaces/request-options.interface.d.ts
|
|
33
|
+
export interface RequestOptions {
|
|
34
34
|
headers?: HeadersInit;
|
|
35
|
+
signal?: AbortSignal;
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
38
|
+
//#region src/common/interfaces/delete-option.interface.d.ts
|
|
39
|
+
export interface DeleteOptions extends RequestOptions {}
|
|
40
|
+
//#endregion
|
|
37
41
|
//#region src/domains/interfaces/domain.d.ts
|
|
38
42
|
export type DomainRegion = 'us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1';
|
|
39
43
|
export type DomainCapabilityStatus = 'enabled' | 'disabled';
|
|
@@ -167,9 +171,8 @@ export interface EmailApiOptions {
|
|
|
167
171
|
}
|
|
168
172
|
//#endregion
|
|
169
173
|
//#region src/common/interfaces/get-option.interface.d.ts
|
|
170
|
-
export interface GetOptions {
|
|
174
|
+
export interface GetOptions extends RequestOptions {
|
|
171
175
|
query?: Record<string, unknown>;
|
|
172
|
-
headers?: HeadersInit;
|
|
173
176
|
}
|
|
174
177
|
//#endregion
|
|
175
178
|
//#region src/common/interfaces/idempotent-request.interface.d.ts
|
|
@@ -208,27 +211,24 @@ export type PaginatedData<Data> = {
|
|
|
208
211
|
};
|
|
209
212
|
//#endregion
|
|
210
213
|
//#region src/common/interfaces/patch-option.interface.d.ts
|
|
211
|
-
export interface PatchOptions {
|
|
214
|
+
export interface PatchOptions extends RequestOptions {
|
|
212
215
|
query?: {
|
|
213
216
|
[key: string]: unknown;
|
|
214
217
|
};
|
|
215
|
-
headers?: HeadersInit;
|
|
216
218
|
}
|
|
217
219
|
//#endregion
|
|
218
220
|
//#region src/common/interfaces/post-option.interface.d.ts
|
|
219
|
-
export interface PostOptions {
|
|
221
|
+
export interface PostOptions extends RequestOptions {
|
|
220
222
|
query?: {
|
|
221
223
|
[key: string]: unknown;
|
|
222
224
|
};
|
|
223
|
-
headers?: HeadersInit;
|
|
224
225
|
}
|
|
225
226
|
//#endregion
|
|
226
227
|
//#region src/common/interfaces/put-option.interface.d.ts
|
|
227
|
-
export interface PutOptions {
|
|
228
|
+
export interface PutOptions extends RequestOptions {
|
|
228
229
|
query?: {
|
|
229
230
|
[key: string]: unknown;
|
|
230
231
|
};
|
|
231
|
-
headers?: HeadersInit;
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
234
|
//#region src/common/interfaces/require-at-least-one.d.ts
|
|
@@ -671,7 +671,7 @@ export type CreateBatchSuccessResponse<Options extends CreateBatchRequestOptions
|
|
|
671
671
|
}[];
|
|
672
672
|
} & (Options['batchValidation'] extends 'permissive' ? {
|
|
673
673
|
/**
|
|
674
|
-
* Only present when
|
|
674
|
+
* Only present when `batchValidation` is set to 'permissive'.
|
|
675
675
|
*/
|
|
676
676
|
errors: {
|
|
677
677
|
/**
|
|
@@ -1823,18 +1823,18 @@ type RevokeOAuthGrantResponse = Response<RevokeOAuthGrantResponseSuccess>;
|
|
|
1823
1823
|
declare class ApiKeys {
|
|
1824
1824
|
private readonly resend;
|
|
1825
1825
|
constructor(resend: Resend);
|
|
1826
|
-
create(payload: CreateApiKeyOptions,
|
|
1827
|
-
list(options?: ListApiKeysOptions): Promise<ListApiKeysResponse>;
|
|
1828
|
-
update(id: string, payload: UpdateApiKeyOptions): Promise<UpdateApiKeyResponse>;
|
|
1829
|
-
remove(id: string): Promise<RemoveApiKeyResponse>;
|
|
1826
|
+
create(payload: CreateApiKeyOptions, requestOptions?: CreateApiKeyRequestOptions): Promise<CreateApiKeyResponse>;
|
|
1827
|
+
list(options?: ListApiKeysOptions, requestOptions?: RequestOptions): Promise<ListApiKeysResponse>;
|
|
1828
|
+
update(id: string, payload: UpdateApiKeyOptions, requestOptions?: RequestOptions): Promise<UpdateApiKeyResponse>;
|
|
1829
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveApiKeyResponse>;
|
|
1830
1830
|
}
|
|
1831
1831
|
//#endregion
|
|
1832
1832
|
//#region src/automation-runs/automation-runs.d.ts
|
|
1833
1833
|
declare class AutomationRuns {
|
|
1834
1834
|
private readonly resend;
|
|
1835
1835
|
constructor(resend: Resend);
|
|
1836
|
-
get(options: GetAutomationRunOptions): Promise<GetAutomationRunResponse>;
|
|
1837
|
-
list(options: ListAutomationRunsOptions): Promise<ListAutomationRunsResponse>;
|
|
1836
|
+
get(options: GetAutomationRunOptions, requestOptions?: RequestOptions): Promise<GetAutomationRunResponse>;
|
|
1837
|
+
list(options: ListAutomationRunsOptions, requestOptions?: RequestOptions): Promise<ListAutomationRunsResponse>;
|
|
1838
1838
|
}
|
|
1839
1839
|
//#endregion
|
|
1840
1840
|
//#region src/automations/automations.d.ts
|
|
@@ -1842,57 +1842,57 @@ declare class Automations {
|
|
|
1842
1842
|
private readonly resend;
|
|
1843
1843
|
readonly runs: AutomationRuns;
|
|
1844
1844
|
constructor(resend: Resend);
|
|
1845
|
-
create(payload: CreateAutomationOptions): Promise<CreateAutomationResponse>;
|
|
1846
|
-
list(options?: ListAutomationsOptions): Promise<ListAutomationsResponse>;
|
|
1847
|
-
get(id: string): Promise<GetAutomationResponse>;
|
|
1848
|
-
remove(id: string): Promise<RemoveAutomationResponse>;
|
|
1849
|
-
update(id: string, payload: UpdateAutomationOptions): Promise<UpdateAutomationResponse>;
|
|
1850
|
-
duplicate(id: string): Promise<DuplicateAutomationResponse>;
|
|
1851
|
-
stop(id: string): Promise<StopAutomationResponse>;
|
|
1845
|
+
create(payload: CreateAutomationOptions, requestOptions?: RequestOptions): Promise<CreateAutomationResponse>;
|
|
1846
|
+
list(options?: ListAutomationsOptions, requestOptions?: RequestOptions): Promise<ListAutomationsResponse>;
|
|
1847
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetAutomationResponse>;
|
|
1848
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveAutomationResponse>;
|
|
1849
|
+
update(id: string, payload: UpdateAutomationOptions, requestOptions?: RequestOptions): Promise<UpdateAutomationResponse>;
|
|
1850
|
+
duplicate(id: string, requestOptions?: RequestOptions): Promise<DuplicateAutomationResponse>;
|
|
1851
|
+
stop(id: string, requestOptions?: RequestOptions): Promise<StopAutomationResponse>;
|
|
1852
1852
|
}
|
|
1853
1853
|
//#endregion
|
|
1854
1854
|
//#region src/batch/batch.d.ts
|
|
1855
1855
|
declare class Batch$1 {
|
|
1856
1856
|
private readonly resend;
|
|
1857
1857
|
constructor(resend: Resend);
|
|
1858
|
-
send<Options extends CreateBatchRequestOptions>(payload: CreateBatchOptions,
|
|
1859
|
-
create<Options extends CreateBatchRequestOptions>(payload: CreateBatchOptions,
|
|
1858
|
+
send<Options extends CreateBatchRequestOptions>(payload: CreateBatchOptions, requestOptions?: Options): Promise<CreateBatchResponse<Options>>;
|
|
1859
|
+
create<Options extends CreateBatchRequestOptions>(payload: CreateBatchOptions, requestOptions?: Options): Promise<CreateBatchResponse<Options>>;
|
|
1860
1860
|
}
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/broadcasts/broadcasts.d.ts
|
|
1863
1863
|
declare class Broadcasts {
|
|
1864
1864
|
private readonly resend;
|
|
1865
1865
|
constructor(resend: Resend);
|
|
1866
|
-
create(payload: CreateBroadcastOptions,
|
|
1867
|
-
send(id: string, payload?: SendBroadcastOptions): Promise<SendBroadcastResponse>;
|
|
1868
|
-
list(options?: ListBroadcastsOptions): Promise<ListBroadcastsResponse>;
|
|
1869
|
-
get(id: string): Promise<GetBroadcastResponse>;
|
|
1870
|
-
recipients<T extends BroadcastRecipientEventType>(id: string, options: ListBroadcastRecipientsOptions<T
|
|
1871
|
-
clickedLinks(id: string, options?: ListBroadcastClickedLinksOptions): Promise<ListBroadcastClickedLinksResponse>;
|
|
1872
|
-
remove(id: string): Promise<RemoveBroadcastResponse>;
|
|
1873
|
-
cancel(id: string): Promise<CancelBroadcastResponse>;
|
|
1874
|
-
duplicate(id: string): Promise<DuplicateBroadcastResponse>;
|
|
1875
|
-
update(id: string, payload: UpdateBroadcastOptions): Promise<UpdateBroadcastResponse>;
|
|
1866
|
+
create(payload: CreateBroadcastOptions, requestOptions?: CreateBroadcastRequestOptions): Promise<SendBroadcastResponse>;
|
|
1867
|
+
send(id: string, payload?: SendBroadcastOptions, requestOptions?: SendBroadcastRequestOptions): Promise<SendBroadcastResponse>;
|
|
1868
|
+
list(options?: ListBroadcastsOptions, requestOptions?: RequestOptions): Promise<ListBroadcastsResponse>;
|
|
1869
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetBroadcastResponse>;
|
|
1870
|
+
recipients<T extends BroadcastRecipientEventType>(id: string, options: ListBroadcastRecipientsOptions<T>, requestOptions?: RequestOptions): Promise<ListBroadcastRecipientsResponse<T>>;
|
|
1871
|
+
clickedLinks(id: string, options?: ListBroadcastClickedLinksOptions, requestOptions?: RequestOptions): Promise<ListBroadcastClickedLinksResponse>;
|
|
1872
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveBroadcastResponse>;
|
|
1873
|
+
cancel(id: string, requestOptions?: RequestOptions): Promise<CancelBroadcastResponse>;
|
|
1874
|
+
duplicate(id: string, requestOptions?: RequestOptions): Promise<DuplicateBroadcastResponse>;
|
|
1875
|
+
update(id: string, payload: UpdateBroadcastOptions, requestOptions?: RequestOptions): Promise<UpdateBroadcastResponse>;
|
|
1876
1876
|
}
|
|
1877
1877
|
//#endregion
|
|
1878
1878
|
//#region src/contact-properties/contact-properties.d.ts
|
|
1879
1879
|
declare class ContactProperties {
|
|
1880
1880
|
private readonly resend;
|
|
1881
1881
|
constructor(resend: Resend);
|
|
1882
|
-
create(options: CreateContactPropertyOptions): Promise<CreateContactPropertyResponse>;
|
|
1883
|
-
list(options?: ListContactPropertiesOptions): Promise<ListContactPropertiesResponse>;
|
|
1884
|
-
get(id: string): Promise<GetContactPropertyResponse>;
|
|
1885
|
-
update(payload: UpdateContactPropertyOptions): Promise<UpdateContactPropertyResponse>;
|
|
1886
|
-
remove(id: string): Promise<RemoveContactPropertyResponse>;
|
|
1882
|
+
create(options: CreateContactPropertyOptions, requestOptions?: RequestOptions): Promise<CreateContactPropertyResponse>;
|
|
1883
|
+
list(options?: ListContactPropertiesOptions, requestOptions?: RequestOptions): Promise<ListContactPropertiesResponse>;
|
|
1884
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetContactPropertyResponse>;
|
|
1885
|
+
update(payload: UpdateContactPropertyOptions, requestOptions?: RequestOptions): Promise<UpdateContactPropertyResponse>;
|
|
1886
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveContactPropertyResponse>;
|
|
1887
1887
|
}
|
|
1888
1888
|
//#endregion
|
|
1889
1889
|
//#region src/contacts/imports/contact-imports.d.ts
|
|
1890
1890
|
declare class ContactImports {
|
|
1891
1891
|
private readonly resend;
|
|
1892
1892
|
constructor(resend: Resend);
|
|
1893
|
-
create(payload: CreateContactImportOptions,
|
|
1894
|
-
list(options?: ListContactImportsOptions): Promise<ListContactImportsResponse>;
|
|
1895
|
-
get(id: string): Promise<GetContactImportResponse>;
|
|
1893
|
+
create(payload: CreateContactImportOptions, requestOptions?: CreateContactImportRequestOptions): Promise<CreateContactImportResponse>;
|
|
1894
|
+
list(options?: ListContactImportsOptions, requestOptions?: RequestOptions): Promise<ListContactImportsResponse>;
|
|
1895
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetContactImportResponse>;
|
|
1896
1896
|
private buildCreateFormData;
|
|
1897
1897
|
private buildColumnMap;
|
|
1898
1898
|
private appendField;
|
|
@@ -1902,17 +1902,17 @@ declare class ContactImports {
|
|
|
1902
1902
|
declare class ContactSegments {
|
|
1903
1903
|
private readonly resend;
|
|
1904
1904
|
constructor(resend: Resend);
|
|
1905
|
-
list(options: ListContactSegmentsOptions): Promise<ListContactSegmentsResponse>;
|
|
1906
|
-
add(options: AddContactSegmentOptions): Promise<AddContactSegmentResponse>;
|
|
1907
|
-
remove(options: RemoveContactSegmentOptions): Promise<RemoveContactSegmentResponse>;
|
|
1905
|
+
list(options: ListContactSegmentsOptions, requestOptions?: RequestOptions): Promise<ListContactSegmentsResponse>;
|
|
1906
|
+
add(options: AddContactSegmentOptions, requestOptions?: RequestOptions): Promise<AddContactSegmentResponse>;
|
|
1907
|
+
remove(options: RemoveContactSegmentOptions, requestOptions?: RequestOptions): Promise<RemoveContactSegmentResponse>;
|
|
1908
1908
|
}
|
|
1909
1909
|
//#endregion
|
|
1910
1910
|
//#region src/contacts/topics/contact-topics.d.ts
|
|
1911
1911
|
declare class ContactTopics {
|
|
1912
1912
|
private readonly resend;
|
|
1913
1913
|
constructor(resend: Resend);
|
|
1914
|
-
update(payload: UpdateContactTopicsOptions): Promise<UpdateContactTopicsResponse>;
|
|
1915
|
-
list(options: ListContactTopicsOptions): Promise<ListContactTopicsResponse>;
|
|
1914
|
+
update(payload: UpdateContactTopicsOptions, requestOptions?: UpdateContactTopicsRequestOptions): Promise<UpdateContactTopicsResponse>;
|
|
1915
|
+
list(options: ListContactTopicsOptions, requestOptions?: ListContactTopicsRequestOptions): Promise<ListContactTopicsResponse>;
|
|
1916
1916
|
}
|
|
1917
1917
|
//#endregion
|
|
1918
1918
|
//#region src/contacts/contacts.d.ts
|
|
@@ -1922,21 +1922,21 @@ declare class Contacts {
|
|
|
1922
1922
|
readonly topics: ContactTopics;
|
|
1923
1923
|
readonly segments: ContactSegments;
|
|
1924
1924
|
constructor(resend: Resend);
|
|
1925
|
-
create(payload: CreateContactOptions,
|
|
1926
|
-
create(payload: LegacyCreateContactOptions,
|
|
1927
|
-
list(options?: ListContactsOptions): Promise<ListContactsResponse>;
|
|
1928
|
-
get(options: GetContactOptions): Promise<GetContactResponse>;
|
|
1929
|
-
update(options: UpdateContactOptions): Promise<UpdateContactResponse>;
|
|
1930
|
-
remove(payload: RemoveContactOptions): Promise<RemoveContactsResponse>;
|
|
1925
|
+
create(payload: CreateContactOptions, requestOptions?: CreateContactRequestOptions): Promise<CreateContactResponse>;
|
|
1926
|
+
create(payload: LegacyCreateContactOptions, requestOptions?: CreateContactRequestOptions): Promise<CreateContactResponse>;
|
|
1927
|
+
list(options?: ListContactsOptions, requestOptions?: RequestOptions): Promise<ListContactsResponse>;
|
|
1928
|
+
get(options: GetContactOptions, requestOptions?: RequestOptions): Promise<GetContactResponse>;
|
|
1929
|
+
update(options: UpdateContactOptions, requestOptions?: RequestOptions): Promise<UpdateContactResponse>;
|
|
1930
|
+
remove(payload: RemoveContactOptions, requestOptions?: RequestOptions): Promise<RemoveContactsResponse>;
|
|
1931
1931
|
}
|
|
1932
1932
|
//#endregion
|
|
1933
1933
|
//#region src/domains/claims/domain-claims.d.ts
|
|
1934
1934
|
declare class DomainClaims {
|
|
1935
1935
|
private readonly resend;
|
|
1936
1936
|
constructor(resend: Resend);
|
|
1937
|
-
create(payload: ClaimDomainOptions,
|
|
1938
|
-
get(domainId: string): Promise<GetDomainClaimResponse>;
|
|
1939
|
-
verify(domainId: string): Promise<VerifyDomainClaimResponse>;
|
|
1937
|
+
create(payload: ClaimDomainOptions, requestOptions?: ClaimDomainRequestOptions): Promise<ClaimDomainResponse>;
|
|
1938
|
+
get(domainId: string, requestOptions?: RequestOptions): Promise<GetDomainClaimResponse>;
|
|
1939
|
+
verify(domainId: string, requestOptions?: RequestOptions): Promise<VerifyDomainClaimResponse>;
|
|
1940
1940
|
}
|
|
1941
1941
|
//#endregion
|
|
1942
1942
|
//#region src/domains/domains.d.ts
|
|
@@ -1944,28 +1944,28 @@ declare class Domains {
|
|
|
1944
1944
|
private readonly resend;
|
|
1945
1945
|
readonly claims: DomainClaims;
|
|
1946
1946
|
constructor(resend: Resend);
|
|
1947
|
-
create(payload: CreateDomainOptions,
|
|
1948
|
-
list(options?: ListDomainsOptions): Promise<ListDomainsResponse>;
|
|
1949
|
-
get(id: string): Promise<GetDomainResponse>;
|
|
1950
|
-
update(payload: UpdateDomainsOptions): Promise<UpdateDomainsResponse>;
|
|
1951
|
-
remove(id: string): Promise<RemoveDomainsResponse>;
|
|
1952
|
-
verify(id: string): Promise<VerifyDomainsResponse>;
|
|
1947
|
+
create(payload: CreateDomainOptions, requestOptions?: CreateDomainRequestOptions): Promise<CreateDomainResponse>;
|
|
1948
|
+
list(options?: ListDomainsOptions, requestOptions?: RequestOptions): Promise<ListDomainsResponse>;
|
|
1949
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetDomainResponse>;
|
|
1950
|
+
update(payload: UpdateDomainsOptions, requestOptions?: RequestOptions): Promise<UpdateDomainsResponse>;
|
|
1951
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveDomainsResponse>;
|
|
1952
|
+
verify(id: string, requestOptions?: RequestOptions): Promise<VerifyDomainsResponse>;
|
|
1953
1953
|
}
|
|
1954
1954
|
//#endregion
|
|
1955
1955
|
//#region src/emails/attachments/attachments.d.ts
|
|
1956
1956
|
declare class Attachments$1 {
|
|
1957
1957
|
private readonly resend;
|
|
1958
1958
|
constructor(resend: Resend);
|
|
1959
|
-
get(options: GetAttachmentOptions): Promise<GetAttachmentResponse>;
|
|
1960
|
-
list(options: ListAttachmentsOptions): Promise<ListAttachmentsResponse>;
|
|
1959
|
+
get(options: GetAttachmentOptions, requestOptions?: RequestOptions): Promise<GetAttachmentResponse>;
|
|
1960
|
+
list(options: ListAttachmentsOptions, requestOptions?: RequestOptions): Promise<ListAttachmentsResponse>;
|
|
1961
1961
|
}
|
|
1962
1962
|
//#endregion
|
|
1963
1963
|
//#region src/emails/receiving/attachments/attachments.d.ts
|
|
1964
1964
|
declare class Attachments {
|
|
1965
1965
|
private readonly resend;
|
|
1966
1966
|
constructor(resend: Resend);
|
|
1967
|
-
get(options: GetAttachmentOptions): Promise<GetAttachmentResponse>;
|
|
1968
|
-
list(options: ListAttachmentsOptions): Promise<ListAttachmentsResponse>;
|
|
1967
|
+
get(options: GetAttachmentOptions, requestOptions?: RequestOptions): Promise<GetAttachmentResponse>;
|
|
1968
|
+
list(options: ListAttachmentsOptions, requestOptions?: RequestOptions): Promise<ListAttachmentsResponse>;
|
|
1969
1969
|
}
|
|
1970
1970
|
//#endregion
|
|
1971
1971
|
//#region src/emails/receiving/receiving.d.ts
|
|
@@ -1973,11 +1973,12 @@ declare class Receiving {
|
|
|
1973
1973
|
private readonly resend;
|
|
1974
1974
|
readonly attachments: Attachments;
|
|
1975
1975
|
constructor(resend: Resend);
|
|
1976
|
-
get(id: string, options?: GetReceivingEmailOptions): Promise<GetReceivingEmailResponse>;
|
|
1977
|
-
list(options?: ListReceivingEmailsOptions): Promise<ListReceivingEmailsResponse>;
|
|
1976
|
+
get(id: string, options?: GetReceivingEmailOptions, requestOptions?: RequestOptions): Promise<GetReceivingEmailResponse>;
|
|
1977
|
+
list(options?: ListReceivingEmailsOptions, requestOptions?: RequestOptions): Promise<ListReceivingEmailsResponse>;
|
|
1978
1978
|
forward(options: ForwardReceivingEmailOptions, requestOptions?: ForwardReceivingEmailRequestOptions): Promise<ForwardReceivingEmailResponse>;
|
|
1979
1979
|
private forwardPassthrough;
|
|
1980
1980
|
private forwardWrapped;
|
|
1981
|
+
private downloadRaw;
|
|
1981
1982
|
}
|
|
1982
1983
|
//#endregion
|
|
1983
1984
|
//#region src/emails/emails.d.ts
|
|
@@ -1986,42 +1987,42 @@ declare class Emails {
|
|
|
1986
1987
|
readonly attachments: Attachments$1;
|
|
1987
1988
|
readonly receiving: Receiving;
|
|
1988
1989
|
constructor(resend: Resend);
|
|
1989
|
-
send(payload: CreateEmailOptions,
|
|
1990
|
-
create(payload: CreateEmailOptions,
|
|
1991
|
-
get(id: string): Promise<GetEmailResponse>;
|
|
1992
|
-
list(options?: ListEmailsOptions): Promise<ListEmailsResponse>;
|
|
1993
|
-
update(payload: UpdateEmailOptions): Promise<UpdateEmailResponse>;
|
|
1994
|
-
cancel(id: string): Promise<CancelEmailResponse>;
|
|
1995
|
-
share(id: string, payload?: ShareEmailOptions): Promise<ShareEmailResponse>;
|
|
1996
|
-
metrics(options?: GetEmailsMetricsOptions): Promise<GetEmailsMetricsResponse>;
|
|
1990
|
+
send(payload: CreateEmailOptions, requestOptions?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
1991
|
+
create(payload: CreateEmailOptions, requestOptions?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
1992
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetEmailResponse>;
|
|
1993
|
+
list(options?: ListEmailsOptions, requestOptions?: RequestOptions): Promise<ListEmailsResponse>;
|
|
1994
|
+
update(payload: UpdateEmailOptions, requestOptions?: RequestOptions): Promise<UpdateEmailResponse>;
|
|
1995
|
+
cancel(id: string, requestOptions?: RequestOptions): Promise<CancelEmailResponse>;
|
|
1996
|
+
share(id: string, payload?: ShareEmailOptions, requestOptions?: RequestOptions): Promise<ShareEmailResponse>;
|
|
1997
|
+
metrics(options?: GetEmailsMetricsOptions, requestOptions?: RequestOptions): Promise<GetEmailsMetricsResponse>;
|
|
1997
1998
|
}
|
|
1998
1999
|
//#endregion
|
|
1999
2000
|
//#region src/events/events.d.ts
|
|
2000
2001
|
declare class Events$1 {
|
|
2001
2002
|
private readonly resend;
|
|
2002
2003
|
constructor(resend: Resend);
|
|
2003
|
-
send(payload: SendEventOptions): Promise<SendEventResponse>;
|
|
2004
|
-
create(payload: CreateEventOptions): Promise<CreateEventResponse>;
|
|
2005
|
-
get(identifier: string): Promise<GetEventResponse>;
|
|
2006
|
-
list(options?: ListEventsOptions): Promise<ListEventsResponse>;
|
|
2007
|
-
update(identifier: string, payload: UpdateEventOptions): Promise<UpdateEventResponse>;
|
|
2008
|
-
remove(identifier: string): Promise<RemoveEventResponse>;
|
|
2004
|
+
send(payload: SendEventOptions, requestOptions?: RequestOptions): Promise<SendEventResponse>;
|
|
2005
|
+
create(payload: CreateEventOptions, requestOptions?: RequestOptions): Promise<CreateEventResponse>;
|
|
2006
|
+
get(identifier: string, requestOptions?: RequestOptions): Promise<GetEventResponse>;
|
|
2007
|
+
list(options?: ListEventsOptions, requestOptions?: RequestOptions): Promise<ListEventsResponse>;
|
|
2008
|
+
update(identifier: string, payload: UpdateEventOptions, requestOptions?: RequestOptions): Promise<UpdateEventResponse>;
|
|
2009
|
+
remove(identifier: string, requestOptions?: RequestOptions): Promise<RemoveEventResponse>;
|
|
2009
2010
|
}
|
|
2010
2011
|
//#endregion
|
|
2011
2012
|
//#region src/logs/logs.d.ts
|
|
2012
2013
|
declare class Logs {
|
|
2013
2014
|
private readonly resend;
|
|
2014
2015
|
constructor(resend: Resend);
|
|
2015
|
-
list(options?: ListLogsOptions): Promise<ListLogsResponse>;
|
|
2016
|
-
get(id: string): Promise<GetLogResponse>;
|
|
2016
|
+
list(options?: ListLogsOptions, requestOptions?: RequestOptions): Promise<ListLogsResponse>;
|
|
2017
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetLogResponse>;
|
|
2017
2018
|
}
|
|
2018
2019
|
//#endregion
|
|
2019
2020
|
//#region src/oauth-grants/oauth-grants.d.ts
|
|
2020
2021
|
declare class OAuthGrants {
|
|
2021
2022
|
private readonly resend;
|
|
2022
2023
|
constructor(resend: Resend);
|
|
2023
|
-
list(options?: ListOAuthGrantsOptions): Promise<ListOAuthGrantsResponse>;
|
|
2024
|
-
revoke(id: string): Promise<RevokeOAuthGrantResponse>;
|
|
2024
|
+
list(options?: ListOAuthGrantsOptions, requestOptions?: RequestOptions): Promise<ListOAuthGrantsResponse>;
|
|
2025
|
+
revoke(id: string, requestOptions?: RequestOptions): Promise<RevokeOAuthGrantResponse>;
|
|
2025
2026
|
}
|
|
2026
2027
|
//#endregion
|
|
2027
2028
|
//#region src/segments/interfaces/create-segment-options.interface.d.ts
|
|
@@ -2069,11 +2070,11 @@ export type UpdateSegmentResponse = Response<UpdateSegmentResponseSuccess>;
|
|
|
2069
2070
|
declare class Segments {
|
|
2070
2071
|
private readonly resend;
|
|
2071
2072
|
constructor(resend: Resend);
|
|
2072
|
-
create(payload: CreateSegmentOptions,
|
|
2073
|
-
list(options?: ListSegmentsOptions): Promise<ListSegmentsResponse>;
|
|
2074
|
-
get(id: string): Promise<GetSegmentResponse>;
|
|
2075
|
-
update(id: string, payload: UpdateSegmentOptions): Promise<UpdateSegmentResponse>;
|
|
2076
|
-
remove(id: string): Promise<RemoveSegmentResponse>;
|
|
2073
|
+
create(payload: CreateSegmentOptions, requestOptions?: CreateSegmentRequestOptions): Promise<CreateSegmentResponse>;
|
|
2074
|
+
list(options?: ListSegmentsOptions, requestOptions?: RequestOptions): Promise<ListSegmentsResponse>;
|
|
2075
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetSegmentResponse>;
|
|
2076
|
+
update(id: string, payload: UpdateSegmentOptions, requestOptions?: RequestOptions): Promise<UpdateSegmentResponse>;
|
|
2077
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveSegmentResponse>;
|
|
2077
2078
|
}
|
|
2078
2079
|
//#endregion
|
|
2079
2080
|
//#region src/suppressions/batch/interfaces/batch-add-suppressions.interface.d.ts
|
|
@@ -2109,8 +2110,8 @@ export type BatchRemoveSuppressionsResponse = Response<BatchRemoveSuppressionsRe
|
|
|
2109
2110
|
declare class Batch {
|
|
2110
2111
|
private readonly resend;
|
|
2111
2112
|
constructor(resend: Resend);
|
|
2112
|
-
add(options: BatchAddSuppressionsOptions): Promise<BatchAddSuppressionsResponse>;
|
|
2113
|
-
remove(options: BatchRemoveSuppressionsOptions): Promise<BatchRemoveSuppressionsResponse>;
|
|
2113
|
+
add(options: BatchAddSuppressionsOptions, requestOptions?: RequestOptions): Promise<BatchAddSuppressionsResponse>;
|
|
2114
|
+
remove(options: BatchRemoveSuppressionsOptions, requestOptions?: RequestOptions): Promise<BatchRemoveSuppressionsResponse>;
|
|
2114
2115
|
}
|
|
2115
2116
|
//#endregion
|
|
2116
2117
|
//#region src/suppressions/interfaces/add-suppression.interface.d.ts
|
|
@@ -2159,10 +2160,10 @@ declare class Suppressions {
|
|
|
2159
2160
|
private readonly resend;
|
|
2160
2161
|
readonly batch: Batch;
|
|
2161
2162
|
constructor(resend: Resend);
|
|
2162
|
-
add(options: AddSuppressionOptions): Promise<AddSuppressionResponse>;
|
|
2163
|
-
list(options?: ListSuppressionsOptions): Promise<ListSuppressionsResponse>;
|
|
2164
|
-
get(idOrEmail: string): Promise<GetSuppressionResponse>;
|
|
2165
|
-
remove(idOrEmail: string): Promise<RemoveSuppressionResponse>;
|
|
2163
|
+
add(options: AddSuppressionOptions, requestOptions?: RequestOptions): Promise<AddSuppressionResponse>;
|
|
2164
|
+
list(options?: ListSuppressionsOptions, requestOptions?: RequestOptions): Promise<ListSuppressionsResponse>;
|
|
2165
|
+
get(idOrEmail: string, requestOptions?: RequestOptions): Promise<GetSuppressionResponse>;
|
|
2166
|
+
remove(idOrEmail: string, requestOptions?: RequestOptions): Promise<RemoveSuppressionResponse>;
|
|
2166
2167
|
}
|
|
2167
2168
|
//#endregion
|
|
2168
2169
|
//#region src/templates/interfaces/template.d.ts
|
|
@@ -2230,9 +2231,9 @@ export type PublishTemplateResponse = Response<PublishTemplateResponseSuccess>;
|
|
|
2230
2231
|
declare class ChainableTemplateResult<T extends CreateTemplateResponse | DuplicateTemplateResponse> implements PromiseLike<T> {
|
|
2231
2232
|
private readonly promise;
|
|
2232
2233
|
private readonly publishFn;
|
|
2233
|
-
constructor(promise: Promise<T>, publishFn: (id: string) => Promise<PublishTemplateResponse>);
|
|
2234
|
+
constructor(promise: Promise<T>, publishFn: (id: string, requestOptions?: RequestOptions) => Promise<PublishTemplateResponse>);
|
|
2234
2235
|
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
|
|
2235
|
-
publish(): Promise<PublishTemplateResponse>;
|
|
2236
|
+
publish(requestOptions?: RequestOptions): Promise<PublishTemplateResponse>;
|
|
2236
2237
|
}
|
|
2237
2238
|
//#endregion
|
|
2238
2239
|
//#region src/templates/interfaces/get-template.interface.d.ts
|
|
@@ -2280,14 +2281,14 @@ export type UpdateTemplateResponse = Response<UpdateTemplateResponseSuccess>;
|
|
|
2280
2281
|
declare class Templates {
|
|
2281
2282
|
private readonly resend;
|
|
2282
2283
|
constructor(resend: Resend);
|
|
2283
|
-
create(payload: CreateTemplateOptions): ChainableTemplateResult<CreateTemplateResponse>;
|
|
2284
|
+
create(payload: CreateTemplateOptions, requestOptions?: CreateTemplateRequestOptions): ChainableTemplateResult<CreateTemplateResponse>;
|
|
2284
2285
|
private performCreate;
|
|
2285
|
-
remove(identifier: string): Promise<RemoveTemplateResponse>;
|
|
2286
|
-
get(identifier: string): Promise<GetTemplateResponse>;
|
|
2287
|
-
list(options?: PaginationOptions): Promise<ListTemplatesResponse>;
|
|
2288
|
-
duplicate(identifier: string): ChainableTemplateResult<DuplicateTemplateResponse>;
|
|
2289
|
-
publish(identifier: string): Promise<PublishTemplateResponse>;
|
|
2290
|
-
update(identifier: string, payload: UpdateTemplateOptions): Promise<UpdateTemplateResponse>;
|
|
2286
|
+
remove(identifier: string, requestOptions?: RequestOptions): Promise<RemoveTemplateResponse>;
|
|
2287
|
+
get(identifier: string, requestOptions?: RequestOptions): Promise<GetTemplateResponse>;
|
|
2288
|
+
list(options?: PaginationOptions, requestOptions?: RequestOptions): Promise<ListTemplatesResponse>;
|
|
2289
|
+
duplicate(identifier: string, requestOptions?: RequestOptions): ChainableTemplateResult<DuplicateTemplateResponse>;
|
|
2290
|
+
publish(identifier: string, requestOptions?: RequestOptions): Promise<PublishTemplateResponse>;
|
|
2291
|
+
update(identifier: string, payload: UpdateTemplateOptions, requestOptions?: RequestOptions): Promise<UpdateTemplateResponse>;
|
|
2291
2292
|
}
|
|
2292
2293
|
//#endregion
|
|
2293
2294
|
//#region src/topics/interfaces/topic.d.ts
|
|
@@ -2341,11 +2342,11 @@ export type UpdateTopicResponse = Response<UpdateTopicResponseSuccess>;
|
|
|
2341
2342
|
declare class Topics {
|
|
2342
2343
|
private readonly resend;
|
|
2343
2344
|
constructor(resend: Resend);
|
|
2344
|
-
create(payload: CreateTopicOptions): Promise<CreateTopicResponse>;
|
|
2345
|
-
list(): Promise<ListTopicsResponse>;
|
|
2346
|
-
get(id: string): Promise<GetTopicResponse>;
|
|
2347
|
-
update(payload: UpdateTopicOptions): Promise<UpdateTopicResponse>;
|
|
2348
|
-
remove(id: string): Promise<RemoveTopicResponse>;
|
|
2345
|
+
create(payload: CreateTopicOptions, requestOptions?: RequestOptions): Promise<CreateTopicResponse>;
|
|
2346
|
+
list(requestOptions?: RequestOptions): Promise<ListTopicsResponse>;
|
|
2347
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetTopicResponse>;
|
|
2348
|
+
update(payload: UpdateTopicOptions, requestOptions?: RequestOptions): Promise<UpdateTopicResponse>;
|
|
2349
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveTopicResponse>;
|
|
2349
2350
|
}
|
|
2350
2351
|
//#endregion
|
|
2351
2352
|
//#region src/usage/interfaces/get-usage.interface.d.ts
|
|
@@ -2404,7 +2405,7 @@ export type GetUsageResponse = Response<GetUsageResponseSuccess>;
|
|
|
2404
2405
|
declare class Usage {
|
|
2405
2406
|
private readonly resend;
|
|
2406
2407
|
constructor(resend: Resend);
|
|
2407
|
-
get(): Promise<GetUsageResponse>;
|
|
2408
|
+
get(requestOptions?: RequestOptions): Promise<GetUsageResponse>;
|
|
2408
2409
|
}
|
|
2409
2410
|
//#endregion
|
|
2410
2411
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
@@ -2704,7 +2705,7 @@ type ListWebhookEventAttemptsResponse = Response<ListWebhookEventAttemptsRespons
|
|
|
2704
2705
|
declare class Attempts {
|
|
2705
2706
|
private readonly resend;
|
|
2706
2707
|
constructor(resend: Resend);
|
|
2707
|
-
list(options: ListWebhookEventAttemptsOptions): Promise<ListWebhookEventAttemptsResponse>;
|
|
2708
|
+
list(options: ListWebhookEventAttemptsOptions, requestOptions?: RequestOptions): Promise<ListWebhookEventAttemptsResponse>;
|
|
2708
2709
|
}
|
|
2709
2710
|
//#endregion
|
|
2710
2711
|
//#region src/webhooks/events/events.d.ts
|
|
@@ -2712,9 +2713,9 @@ declare class Events {
|
|
|
2712
2713
|
private readonly resend;
|
|
2713
2714
|
readonly attempts: Attempts;
|
|
2714
2715
|
constructor(resend: Resend);
|
|
2715
|
-
list(options: ListWebhookEventsOptions): Promise<ListWebhookEventsResponse>;
|
|
2716
|
-
get(options: GetWebhookEventOptions): Promise<GetWebhookEventResponse>;
|
|
2717
|
-
replay(options: ReplayWebhookEventOptions): Promise<ReplayWebhookEventResponse>;
|
|
2716
|
+
list(options: ListWebhookEventsOptions, requestOptions?: RequestOptions): Promise<ListWebhookEventsResponse>;
|
|
2717
|
+
get(options: GetWebhookEventOptions, requestOptions?: RequestOptions): Promise<GetWebhookEventResponse>;
|
|
2718
|
+
replay(options: ReplayWebhookEventOptions, requestOptions?: RequestOptions): Promise<ReplayWebhookEventResponse>;
|
|
2718
2719
|
}
|
|
2719
2720
|
//#endregion
|
|
2720
2721
|
//#region src/webhooks/interfaces/create-webhook-options.interface.d.ts
|
|
@@ -2800,12 +2801,12 @@ declare class Webhooks {
|
|
|
2800
2801
|
private readonly resend;
|
|
2801
2802
|
readonly events: Events;
|
|
2802
2803
|
constructor(resend: Resend);
|
|
2803
|
-
create(payload: CreateWebhookOptions,
|
|
2804
|
-
get(id: string): Promise<GetWebhookResponse>;
|
|
2805
|
-
list(options?: ListWebhooksOptions): Promise<ListWebhooksResponse>;
|
|
2806
|
-
update(id: string, payload: UpdateWebhookOptions): Promise<UpdateWebhookResponse>;
|
|
2807
|
-
remove(id: string): Promise<RemoveWebhookResponse>;
|
|
2808
|
-
rotateSigningSecret(id: string): Promise<RotateWebhookSigningSecretResponse>;
|
|
2804
|
+
create(payload: CreateWebhookOptions, requestOptions?: CreateWebhookRequestOptions): Promise<CreateWebhookResponse>;
|
|
2805
|
+
get(id: string, requestOptions?: RequestOptions): Promise<GetWebhookResponse>;
|
|
2806
|
+
list(options?: ListWebhooksOptions, requestOptions?: RequestOptions): Promise<ListWebhooksResponse>;
|
|
2807
|
+
update(id: string, payload: UpdateWebhookOptions, requestOptions?: RequestOptions): Promise<UpdateWebhookResponse>;
|
|
2808
|
+
remove(id: string, requestOptions?: RequestOptions): Promise<RemoveWebhookResponse>;
|
|
2809
|
+
rotateSigningSecret(id: string, requestOptions?: RequestOptions): Promise<RotateWebhookSigningSecretResponse>;
|
|
2809
2810
|
verify(payload: VerifyWebhookOptions): WebhookEventPayload;
|
|
2810
2811
|
}
|
|
2811
2812
|
//#endregion
|