resend 6.9.2 → 6.9.3
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 +3 -2
- package/dist/index.d.cts +62 -41
- package/dist/index.d.mts +62 -41
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -30,7 +31,7 @@ postal_mime = __toESM(postal_mime);
|
|
|
30
31
|
let svix = require("svix");
|
|
31
32
|
|
|
32
33
|
//#region package.json
|
|
33
|
-
var version = "6.9.
|
|
34
|
+
var version = "6.9.3";
|
|
34
35
|
|
|
35
36
|
//#endregion
|
|
36
37
|
//#region src/common/utils/build-pagination-query.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,28 @@ interface ApiKey {
|
|
|
7
7
|
name: string;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
+
//#region src/common/interfaces/attachment.interface.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Attachment returned by the signed-URL endpoints:
|
|
13
|
+
* - GET /emails/{id}/attachments
|
|
14
|
+
* - GET /emails/{id}/attachments/{id}
|
|
15
|
+
* - GET /emails/receiving/{id}/attachments
|
|
16
|
+
* - GET /emails/receiving/{id}/attachments/{id}
|
|
17
|
+
*
|
|
18
|
+
* Not to be confused with InboundAttachment, which is the raw metadata
|
|
19
|
+
* embedded inside GET /inbounds/{id} — no signed URL, nullable DB columns.
|
|
20
|
+
*/
|
|
21
|
+
interface AttachmentData {
|
|
22
|
+
id: string;
|
|
23
|
+
filename?: string;
|
|
24
|
+
size: number;
|
|
25
|
+
content_type: string;
|
|
26
|
+
content_disposition: 'inline' | 'attachment';
|
|
27
|
+
content_id?: string;
|
|
28
|
+
download_url: string;
|
|
29
|
+
expires_at: string;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
10
32
|
//#region src/domains/interfaces/domain.d.ts
|
|
11
33
|
type DomainRegion = 'us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1';
|
|
12
34
|
type DomainCapabilityStatus = 'enabled' | 'disabled';
|
|
@@ -352,7 +374,14 @@ type Tag = {
|
|
|
352
374
|
};
|
|
353
375
|
//#endregion
|
|
354
376
|
//#region src/batch/interfaces/create-batch-options.interface.d.ts
|
|
355
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Email options for batch sending. Same as CreateEmailOptions but without attachments
|
|
379
|
+
* and scheduledAt, as these are not supported in the batch API.
|
|
380
|
+
*
|
|
381
|
+
* @link https://resend.com/docs/dashboard/emails/batch-sending#limitations
|
|
382
|
+
*/
|
|
383
|
+
type CreateBatchEmailOptions = Omit<CreateEmailOptions, 'attachments' | 'scheduledAt'>;
|
|
384
|
+
type CreateBatchOptions = CreateBatchEmailOptions[];
|
|
356
385
|
interface CreateBatchRequestOptions extends PostOptions, IdempotentRequest {
|
|
357
386
|
/**
|
|
358
387
|
* @default 'strict'
|
|
@@ -939,18 +968,6 @@ type VerifyDomainsResponseSuccess = Pick<Domain, 'id'> & {
|
|
|
939
968
|
};
|
|
940
969
|
type VerifyDomainsResponse = Response<VerifyDomainsResponseSuccess>;
|
|
941
970
|
//#endregion
|
|
942
|
-
//#region src/common/interfaces/attachment.interface.d.ts
|
|
943
|
-
interface Attachment$1 {
|
|
944
|
-
id: string;
|
|
945
|
-
filename?: string;
|
|
946
|
-
size: number;
|
|
947
|
-
content_type: string;
|
|
948
|
-
content_disposition: 'inline' | 'attachment';
|
|
949
|
-
content_id?: string;
|
|
950
|
-
download_url: string;
|
|
951
|
-
expires_at: string;
|
|
952
|
-
}
|
|
953
|
-
//#endregion
|
|
954
971
|
//#region src/emails/attachments/interfaces/get-attachment.interface.d.ts
|
|
955
972
|
interface GetAttachmentOptions {
|
|
956
973
|
emailId: string;
|
|
@@ -958,22 +975,17 @@ interface GetAttachmentOptions {
|
|
|
958
975
|
}
|
|
959
976
|
type GetAttachmentResponseSuccess = {
|
|
960
977
|
object: 'attachment';
|
|
961
|
-
} &
|
|
978
|
+
} & AttachmentData;
|
|
962
979
|
type GetAttachmentResponse = Response<GetAttachmentResponseSuccess>;
|
|
963
980
|
//#endregion
|
|
964
981
|
//#region src/emails/attachments/interfaces/list-attachments.interface.d.ts
|
|
965
982
|
type ListAttachmentsOptions = PaginationOptions & {
|
|
966
983
|
emailId: string;
|
|
967
984
|
};
|
|
968
|
-
interface ListAttachmentsApiResponse {
|
|
969
|
-
object: 'list';
|
|
970
|
-
has_more: boolean;
|
|
971
|
-
data: Attachment$1[];
|
|
972
|
-
}
|
|
973
985
|
interface ListAttachmentsResponseSuccess {
|
|
974
986
|
object: 'list';
|
|
975
987
|
has_more: boolean;
|
|
976
|
-
data:
|
|
988
|
+
data: AttachmentData[];
|
|
977
989
|
}
|
|
978
990
|
type ListAttachmentsResponse = Response<ListAttachmentsResponseSuccess>;
|
|
979
991
|
//#endregion
|
|
@@ -1007,6 +1019,16 @@ interface GetEmailResponseSuccess {
|
|
|
1007
1019
|
}
|
|
1008
1020
|
type GetEmailResponse = Response<GetEmailResponseSuccess>;
|
|
1009
1021
|
//#endregion
|
|
1022
|
+
//#region src/emails/interfaces/list-emails-options.interface.d.ts
|
|
1023
|
+
type ListEmailsOptions = PaginationOptions;
|
|
1024
|
+
type ListEmail = Omit<GetEmailResponseSuccess, 'html' | 'text' | 'tags' | 'object'>;
|
|
1025
|
+
type ListEmailsResponseSuccess = {
|
|
1026
|
+
object: 'list';
|
|
1027
|
+
has_more: boolean;
|
|
1028
|
+
data: ListEmail[];
|
|
1029
|
+
};
|
|
1030
|
+
type ListEmailsResponse = Response<ListEmailsResponseSuccess>;
|
|
1031
|
+
//#endregion
|
|
1010
1032
|
//#region src/emails/interfaces/update-email-options.interface.d.ts
|
|
1011
1033
|
interface UpdateEmailOptions {
|
|
1012
1034
|
id: string;
|
|
@@ -1039,6 +1061,22 @@ interface ForwardReceivingEmailResponseSuccess {
|
|
|
1039
1061
|
type ForwardReceivingEmailResponse = Response<ForwardReceivingEmailResponseSuccess>;
|
|
1040
1062
|
//#endregion
|
|
1041
1063
|
//#region src/emails/receiving/interfaces/get-receiving-email.interface.d.ts
|
|
1064
|
+
/**
|
|
1065
|
+
* Attachment metadata embedded in the GET /inbounds/{id} response.
|
|
1066
|
+
* These are raw DB values — fields are nullable and content_disposition is
|
|
1067
|
+
* not normalized to a literal union.
|
|
1068
|
+
*
|
|
1069
|
+
* Not to be confused with AttachmentData, which is the shape returned by the
|
|
1070
|
+
* dedicated attachment endpoints (includes download_url and expires_at).
|
|
1071
|
+
*/
|
|
1072
|
+
interface InboundAttachment {
|
|
1073
|
+
id: string;
|
|
1074
|
+
filename: string | null;
|
|
1075
|
+
size: number;
|
|
1076
|
+
content_type: string;
|
|
1077
|
+
content_id: string | null;
|
|
1078
|
+
content_disposition: string | null;
|
|
1079
|
+
}
|
|
1042
1080
|
interface GetReceivingEmailResponseSuccess {
|
|
1043
1081
|
object: 'email';
|
|
1044
1082
|
id: string;
|
|
@@ -1051,20 +1089,13 @@ interface GetReceivingEmailResponseSuccess {
|
|
|
1051
1089
|
reply_to: string[] | null;
|
|
1052
1090
|
html: string | null;
|
|
1053
1091
|
text: string | null;
|
|
1054
|
-
headers: Record<string, string
|
|
1092
|
+
headers: Record<string, string> | null;
|
|
1055
1093
|
message_id: string;
|
|
1056
|
-
raw
|
|
1094
|
+
raw?: {
|
|
1057
1095
|
download_url: string;
|
|
1058
1096
|
expires_at: string;
|
|
1059
1097
|
} | null;
|
|
1060
|
-
attachments:
|
|
1061
|
-
id: string;
|
|
1062
|
-
filename: string | null;
|
|
1063
|
-
size: number;
|
|
1064
|
-
content_type: string;
|
|
1065
|
-
content_id: string | null;
|
|
1066
|
-
content_disposition: string | null;
|
|
1067
|
-
}>;
|
|
1098
|
+
attachments: InboundAttachment[];
|
|
1068
1099
|
}
|
|
1069
1100
|
type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
|
|
1070
1101
|
//#endregion
|
|
@@ -1175,16 +1206,6 @@ declare class Attachments$1 {
|
|
|
1175
1206
|
list(options: ListAttachmentsOptions): Promise<ListAttachmentsResponse>;
|
|
1176
1207
|
}
|
|
1177
1208
|
//#endregion
|
|
1178
|
-
//#region src/emails/interfaces/list-emails-options.interface.d.ts
|
|
1179
|
-
type ListEmailsOptions = PaginationOptions;
|
|
1180
|
-
type ListEmail = Omit<GetEmailResponseSuccess, 'html' | 'text' | 'tags' | 'object'>;
|
|
1181
|
-
type ListEmailsResponseSuccess = {
|
|
1182
|
-
object: 'list';
|
|
1183
|
-
has_more: boolean;
|
|
1184
|
-
data: ListEmail[];
|
|
1185
|
-
};
|
|
1186
|
-
type ListEmailsResponse = Response<ListEmailsResponseSuccess>;
|
|
1187
|
-
//#endregion
|
|
1188
1209
|
//#region src/emails/receiving/attachments/attachments.d.ts
|
|
1189
1210
|
declare class Attachments {
|
|
1190
1211
|
private readonly resend;
|
|
@@ -1726,4 +1747,4 @@ declare class Resend {
|
|
|
1726
1747
|
delete<T>(path: string, query?: unknown): Promise<Response<T>>;
|
|
1727
1748
|
}
|
|
1728
1749
|
//#endregion
|
|
1729
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess,
|
|
1750
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchEmailOptions, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListTemplatesOptions, ListTemplatesResponse, ListTemplatesResponseSuccess, ListTopicsResponse, ListTopicsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PublishTemplateResponse, PublishTemplateResponseSuccess, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactPropertyResponse, RemoveContactPropertyResponseSuccess, RemoveContactSegmentOptions, RemoveContactSegmentResponse, RemoveContactSegmentResponseSuccess, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveTemplateResponse, RemoveTemplateResponseSuccess, RemoveTopicResponse, RemoveTopicResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, Tag, Template, TemplateVariable, Topic, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactPropertyApiOptions, UpdateContactPropertyOptions, UpdateContactPropertyResponse, UpdateContactPropertyResponseSuccess, UpdateContactResponse, UpdateContactResponseSuccess, UpdateContactTopicsOptions, UpdateContactTopicsRequestOptions, UpdateContactTopicsResponse, UpdateContactTopicsResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateTemplateOptions, UpdateTemplateResponse, UpdateTemplateResponseSuccess, UpdateTopicOptions, UpdateTopicResponse, UpdateTopicResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, Webhook, WebhookEvent, WebhookEventPayload };
|
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,28 @@ interface ApiKey {
|
|
|
7
7
|
name: string;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
+
//#region src/common/interfaces/attachment.interface.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Attachment returned by the signed-URL endpoints:
|
|
13
|
+
* - GET /emails/{id}/attachments
|
|
14
|
+
* - GET /emails/{id}/attachments/{id}
|
|
15
|
+
* - GET /emails/receiving/{id}/attachments
|
|
16
|
+
* - GET /emails/receiving/{id}/attachments/{id}
|
|
17
|
+
*
|
|
18
|
+
* Not to be confused with InboundAttachment, which is the raw metadata
|
|
19
|
+
* embedded inside GET /inbounds/{id} — no signed URL, nullable DB columns.
|
|
20
|
+
*/
|
|
21
|
+
interface AttachmentData {
|
|
22
|
+
id: string;
|
|
23
|
+
filename?: string;
|
|
24
|
+
size: number;
|
|
25
|
+
content_type: string;
|
|
26
|
+
content_disposition: 'inline' | 'attachment';
|
|
27
|
+
content_id?: string;
|
|
28
|
+
download_url: string;
|
|
29
|
+
expires_at: string;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
10
32
|
//#region src/domains/interfaces/domain.d.ts
|
|
11
33
|
type DomainRegion = 'us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1';
|
|
12
34
|
type DomainCapabilityStatus = 'enabled' | 'disabled';
|
|
@@ -352,7 +374,14 @@ type Tag = {
|
|
|
352
374
|
};
|
|
353
375
|
//#endregion
|
|
354
376
|
//#region src/batch/interfaces/create-batch-options.interface.d.ts
|
|
355
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Email options for batch sending. Same as CreateEmailOptions but without attachments
|
|
379
|
+
* and scheduledAt, as these are not supported in the batch API.
|
|
380
|
+
*
|
|
381
|
+
* @link https://resend.com/docs/dashboard/emails/batch-sending#limitations
|
|
382
|
+
*/
|
|
383
|
+
type CreateBatchEmailOptions = Omit<CreateEmailOptions, 'attachments' | 'scheduledAt'>;
|
|
384
|
+
type CreateBatchOptions = CreateBatchEmailOptions[];
|
|
356
385
|
interface CreateBatchRequestOptions extends PostOptions, IdempotentRequest {
|
|
357
386
|
/**
|
|
358
387
|
* @default 'strict'
|
|
@@ -939,18 +968,6 @@ type VerifyDomainsResponseSuccess = Pick<Domain, 'id'> & {
|
|
|
939
968
|
};
|
|
940
969
|
type VerifyDomainsResponse = Response<VerifyDomainsResponseSuccess>;
|
|
941
970
|
//#endregion
|
|
942
|
-
//#region src/common/interfaces/attachment.interface.d.ts
|
|
943
|
-
interface Attachment$1 {
|
|
944
|
-
id: string;
|
|
945
|
-
filename?: string;
|
|
946
|
-
size: number;
|
|
947
|
-
content_type: string;
|
|
948
|
-
content_disposition: 'inline' | 'attachment';
|
|
949
|
-
content_id?: string;
|
|
950
|
-
download_url: string;
|
|
951
|
-
expires_at: string;
|
|
952
|
-
}
|
|
953
|
-
//#endregion
|
|
954
971
|
//#region src/emails/attachments/interfaces/get-attachment.interface.d.ts
|
|
955
972
|
interface GetAttachmentOptions {
|
|
956
973
|
emailId: string;
|
|
@@ -958,22 +975,17 @@ interface GetAttachmentOptions {
|
|
|
958
975
|
}
|
|
959
976
|
type GetAttachmentResponseSuccess = {
|
|
960
977
|
object: 'attachment';
|
|
961
|
-
} &
|
|
978
|
+
} & AttachmentData;
|
|
962
979
|
type GetAttachmentResponse = Response<GetAttachmentResponseSuccess>;
|
|
963
980
|
//#endregion
|
|
964
981
|
//#region src/emails/attachments/interfaces/list-attachments.interface.d.ts
|
|
965
982
|
type ListAttachmentsOptions = PaginationOptions & {
|
|
966
983
|
emailId: string;
|
|
967
984
|
};
|
|
968
|
-
interface ListAttachmentsApiResponse {
|
|
969
|
-
object: 'list';
|
|
970
|
-
has_more: boolean;
|
|
971
|
-
data: Attachment$1[];
|
|
972
|
-
}
|
|
973
985
|
interface ListAttachmentsResponseSuccess {
|
|
974
986
|
object: 'list';
|
|
975
987
|
has_more: boolean;
|
|
976
|
-
data:
|
|
988
|
+
data: AttachmentData[];
|
|
977
989
|
}
|
|
978
990
|
type ListAttachmentsResponse = Response<ListAttachmentsResponseSuccess>;
|
|
979
991
|
//#endregion
|
|
@@ -1007,6 +1019,16 @@ interface GetEmailResponseSuccess {
|
|
|
1007
1019
|
}
|
|
1008
1020
|
type GetEmailResponse = Response<GetEmailResponseSuccess>;
|
|
1009
1021
|
//#endregion
|
|
1022
|
+
//#region src/emails/interfaces/list-emails-options.interface.d.ts
|
|
1023
|
+
type ListEmailsOptions = PaginationOptions;
|
|
1024
|
+
type ListEmail = Omit<GetEmailResponseSuccess, 'html' | 'text' | 'tags' | 'object'>;
|
|
1025
|
+
type ListEmailsResponseSuccess = {
|
|
1026
|
+
object: 'list';
|
|
1027
|
+
has_more: boolean;
|
|
1028
|
+
data: ListEmail[];
|
|
1029
|
+
};
|
|
1030
|
+
type ListEmailsResponse = Response<ListEmailsResponseSuccess>;
|
|
1031
|
+
//#endregion
|
|
1010
1032
|
//#region src/emails/interfaces/update-email-options.interface.d.ts
|
|
1011
1033
|
interface UpdateEmailOptions {
|
|
1012
1034
|
id: string;
|
|
@@ -1039,6 +1061,22 @@ interface ForwardReceivingEmailResponseSuccess {
|
|
|
1039
1061
|
type ForwardReceivingEmailResponse = Response<ForwardReceivingEmailResponseSuccess>;
|
|
1040
1062
|
//#endregion
|
|
1041
1063
|
//#region src/emails/receiving/interfaces/get-receiving-email.interface.d.ts
|
|
1064
|
+
/**
|
|
1065
|
+
* Attachment metadata embedded in the GET /inbounds/{id} response.
|
|
1066
|
+
* These are raw DB values — fields are nullable and content_disposition is
|
|
1067
|
+
* not normalized to a literal union.
|
|
1068
|
+
*
|
|
1069
|
+
* Not to be confused with AttachmentData, which is the shape returned by the
|
|
1070
|
+
* dedicated attachment endpoints (includes download_url and expires_at).
|
|
1071
|
+
*/
|
|
1072
|
+
interface InboundAttachment {
|
|
1073
|
+
id: string;
|
|
1074
|
+
filename: string | null;
|
|
1075
|
+
size: number;
|
|
1076
|
+
content_type: string;
|
|
1077
|
+
content_id: string | null;
|
|
1078
|
+
content_disposition: string | null;
|
|
1079
|
+
}
|
|
1042
1080
|
interface GetReceivingEmailResponseSuccess {
|
|
1043
1081
|
object: 'email';
|
|
1044
1082
|
id: string;
|
|
@@ -1051,20 +1089,13 @@ interface GetReceivingEmailResponseSuccess {
|
|
|
1051
1089
|
reply_to: string[] | null;
|
|
1052
1090
|
html: string | null;
|
|
1053
1091
|
text: string | null;
|
|
1054
|
-
headers: Record<string, string
|
|
1092
|
+
headers: Record<string, string> | null;
|
|
1055
1093
|
message_id: string;
|
|
1056
|
-
raw
|
|
1094
|
+
raw?: {
|
|
1057
1095
|
download_url: string;
|
|
1058
1096
|
expires_at: string;
|
|
1059
1097
|
} | null;
|
|
1060
|
-
attachments:
|
|
1061
|
-
id: string;
|
|
1062
|
-
filename: string | null;
|
|
1063
|
-
size: number;
|
|
1064
|
-
content_type: string;
|
|
1065
|
-
content_id: string | null;
|
|
1066
|
-
content_disposition: string | null;
|
|
1067
|
-
}>;
|
|
1098
|
+
attachments: InboundAttachment[];
|
|
1068
1099
|
}
|
|
1069
1100
|
type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
|
|
1070
1101
|
//#endregion
|
|
@@ -1175,16 +1206,6 @@ declare class Attachments$1 {
|
|
|
1175
1206
|
list(options: ListAttachmentsOptions): Promise<ListAttachmentsResponse>;
|
|
1176
1207
|
}
|
|
1177
1208
|
//#endregion
|
|
1178
|
-
//#region src/emails/interfaces/list-emails-options.interface.d.ts
|
|
1179
|
-
type ListEmailsOptions = PaginationOptions;
|
|
1180
|
-
type ListEmail = Omit<GetEmailResponseSuccess, 'html' | 'text' | 'tags' | 'object'>;
|
|
1181
|
-
type ListEmailsResponseSuccess = {
|
|
1182
|
-
object: 'list';
|
|
1183
|
-
has_more: boolean;
|
|
1184
|
-
data: ListEmail[];
|
|
1185
|
-
};
|
|
1186
|
-
type ListEmailsResponse = Response<ListEmailsResponseSuccess>;
|
|
1187
|
-
//#endregion
|
|
1188
1209
|
//#region src/emails/receiving/attachments/attachments.d.ts
|
|
1189
1210
|
declare class Attachments {
|
|
1190
1211
|
private readonly resend;
|
|
@@ -1726,4 +1747,4 @@ declare class Resend {
|
|
|
1726
1747
|
delete<T>(path: string, query?: unknown): Promise<Response<T>>;
|
|
1727
1748
|
}
|
|
1728
1749
|
//#endregion
|
|
1729
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess,
|
|
1750
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchEmailOptions, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListTemplatesOptions, ListTemplatesResponse, ListTemplatesResponseSuccess, ListTopicsResponse, ListTopicsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PublishTemplateResponse, PublishTemplateResponseSuccess, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactPropertyResponse, RemoveContactPropertyResponseSuccess, RemoveContactSegmentOptions, RemoveContactSegmentResponse, RemoveContactSegmentResponseSuccess, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveTemplateResponse, RemoveTemplateResponseSuccess, RemoveTopicResponse, RemoveTopicResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, Tag, Template, TemplateVariable, Topic, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactPropertyApiOptions, UpdateContactPropertyOptions, UpdateContactPropertyResponse, UpdateContactPropertyResponseSuccess, UpdateContactResponse, UpdateContactResponseSuccess, UpdateContactTopicsOptions, UpdateContactTopicsRequestOptions, UpdateContactTopicsResponse, UpdateContactTopicsResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateTemplateOptions, UpdateTemplateResponse, UpdateTemplateResponseSuccess, UpdateTopicOptions, UpdateTopicResponse, UpdateTopicResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, Webhook, WebhookEvent, WebhookEventPayload };
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.3",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@biomejs/biome": "2.3.
|
|
55
|
+
"@biomejs/biome": "2.3.14",
|
|
56
56
|
"@pollyjs/adapter-fetch": "6.0.7",
|
|
57
57
|
"@pollyjs/core": "6.0.6",
|
|
58
58
|
"@pollyjs/persister-fs": "6.0.6",
|
|
59
59
|
"@types/mailparser": "3.4.6",
|
|
60
|
-
"@types/node": "24.10.
|
|
61
|
-
"@types/react": "19.2.
|
|
60
|
+
"@types/node": "24.10.13",
|
|
61
|
+
"@types/react": "19.2.13",
|
|
62
62
|
"cross-env": "10.1.0",
|
|
63
|
-
"dotenv": "17.2.
|
|
64
|
-
"pkg-pr-new": "0.0.
|
|
63
|
+
"dotenv": "17.2.4",
|
|
64
|
+
"pkg-pr-new": "0.0.65",
|
|
65
65
|
"react": "19.2.4",
|
|
66
66
|
"react-dom": "19.2.4",
|
|
67
67
|
"rimraf": "6.1.2",
|
|
68
|
-
"tsdown": "0.20.
|
|
68
|
+
"tsdown": "0.20.3",
|
|
69
69
|
"typescript": "5.9.3",
|
|
70
70
|
"vitest": "4.0.18",
|
|
71
71
|
"vitest-fetch-mock": "0.4.5"
|