resend 6.13.0-canary.0 → 6.13.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 +7 -4
- package/dist/index.d.cts +11 -4
- package/dist/index.d.mts +11 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
- package/readme.md +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ let postal_mime = require("postal-mime");
|
|
|
25
25
|
postal_mime = __toESM(postal_mime);
|
|
26
26
|
let standardwebhooks = require("standardwebhooks");
|
|
27
27
|
//#region package.json
|
|
28
|
-
var version = "6.13.0
|
|
28
|
+
var version = "6.13.0";
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/common/utils/build-pagination-query.ts
|
|
31
31
|
/**
|
|
@@ -435,7 +435,6 @@ var ContactImports = class {
|
|
|
435
435
|
formData.append("file", payload.file);
|
|
436
436
|
this.appendField(formData, "column_map", this.buildColumnMap(payload.columnMap ?? null));
|
|
437
437
|
this.appendField(formData, "on_conflict", payload.onConflict ?? null);
|
|
438
|
-
this.appendField(formData, "on_error", payload.onError ?? null);
|
|
439
438
|
this.appendField(formData, "segments", payload.segments ?? null);
|
|
440
439
|
this.appendField(formData, "topics", payload.topics ?? null);
|
|
441
440
|
return formData;
|
|
@@ -727,8 +726,12 @@ var Receiving = class {
|
|
|
727
726
|
this.resend = resend;
|
|
728
727
|
this.attachments = new Attachments(resend);
|
|
729
728
|
}
|
|
730
|
-
async get(id) {
|
|
731
|
-
|
|
729
|
+
async get(id, options = {}) {
|
|
730
|
+
const searchParams = new URLSearchParams();
|
|
731
|
+
if (options.html_format !== void 0) searchParams.set("html_format", options.html_format);
|
|
732
|
+
const queryString = searchParams.toString();
|
|
733
|
+
const path = queryString ? `/emails/receiving/${id}?${queryString}` : `/emails/receiving/${id}`;
|
|
734
|
+
return await this.resend.get(path);
|
|
732
735
|
}
|
|
733
736
|
async list(options = {}) {
|
|
734
737
|
const queryString = buildPaginationQuery(options);
|
package/dist/index.d.cts
CHANGED
|
@@ -966,7 +966,6 @@ interface ContactImport {
|
|
|
966
966
|
//#endregion
|
|
967
967
|
//#region src/contacts/imports/interfaces/create-contact-import.interface.d.ts
|
|
968
968
|
type ContactImportOnConflict = 'upsert' | 'skip';
|
|
969
|
-
type ContactImportOnError = 'continue' | 'abort';
|
|
970
969
|
type ContactImportPropertyType = 'string' | 'number' | 'boolean';
|
|
971
970
|
interface ContactImportPropertyMapping {
|
|
972
971
|
column: string;
|
|
@@ -990,7 +989,6 @@ interface CreateContactImportOptions {
|
|
|
990
989
|
file: Blob;
|
|
991
990
|
columnMap?: ContactImportColumnMap;
|
|
992
991
|
onConflict?: ContactImportOnConflict;
|
|
993
|
-
onError?: ContactImportOnError;
|
|
994
992
|
segments?: ContactImportSegment[];
|
|
995
993
|
topics?: ContactImportTopic[];
|
|
996
994
|
}
|
|
@@ -1418,6 +1416,15 @@ interface GetReceivingEmailResponseSuccess {
|
|
|
1418
1416
|
attachments: InboundAttachment[];
|
|
1419
1417
|
}
|
|
1420
1418
|
type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
|
|
1419
|
+
interface GetReceivingEmailOptions {
|
|
1420
|
+
/**
|
|
1421
|
+
* Controls how inline images are returned inside `html`. By default (or when
|
|
1422
|
+
* set to `'data_uri'`), inline images appear in `html` as base64 `data:` URIs.
|
|
1423
|
+
* Set to `'cid'` to keep the original `<img src="cid:..." />` references
|
|
1424
|
+
* instead, each of which matches the `content_id` of an attachment.
|
|
1425
|
+
*/
|
|
1426
|
+
html_format?: 'data_uri' | 'cid';
|
|
1427
|
+
}
|
|
1421
1428
|
//#endregion
|
|
1422
1429
|
//#region src/emails/receiving/interfaces/list-receiving-emails.interface.d.ts
|
|
1423
1430
|
type ListReceivingEmailsOptions = PaginationOptions;
|
|
@@ -1672,7 +1679,7 @@ declare class Receiving {
|
|
|
1672
1679
|
private readonly resend;
|
|
1673
1680
|
readonly attachments: Attachments;
|
|
1674
1681
|
constructor(resend: Resend);
|
|
1675
|
-
get(id: string): Promise<GetReceivingEmailResponse>;
|
|
1682
|
+
get(id: string, options?: GetReceivingEmailOptions): Promise<GetReceivingEmailResponse>;
|
|
1676
1683
|
list(options?: ListReceivingEmailsOptions): Promise<ListReceivingEmailsResponse>;
|
|
1677
1684
|
forward(options: ForwardReceivingEmailOptions): Promise<ForwardReceivingEmailResponse>;
|
|
1678
1685
|
private forwardPassthrough;
|
|
@@ -2228,4 +2235,4 @@ declare class Resend {
|
|
|
2228
2235
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
2229
2236
|
}
|
|
2230
2237
|
//#endregion
|
|
2231
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, AddToSegmentStepConfig, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationConnection, AutomationConnectionType, AutomationResponseConnection, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepStatus, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeleteStepConfig, ContactDeletedEvent, ContactImport, ContactImportColumnMap, ContactImportCounts, ContactImportOnConflict,
|
|
2238
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, AddToSegmentStepConfig, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationConnection, AutomationConnectionType, AutomationResponseConnection, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepStatus, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeleteStepConfig, ContactDeletedEvent, ContactImport, ContactImportColumnMap, ContactImportCounts, ContactImportOnConflict, ContactImportPropertyMapping, ContactImportPropertyType, ContactImportSegment, ContactImportStatus, ContactImportTopic, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdateStepConfig, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, CreateBatchEmailOptions, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactImportOptions, CreateContactImportRequestOptions, CreateContactImportResponse, CreateContactImportResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, DeleteOptions, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecordStatus, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactImportResponse, GetContactImportResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetLogResponse, GetLogResponseSuccess, GetOptions, GetReceivingEmailOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactImportsOptions, ListContactImportsResponse, ListContactImportsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListEventsOptions, ListEventsResponse, ListEventsResponseSuccess, ListLogsOptions, ListLogsResponse, ListLogsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListTemplatesOptions, ListTemplatesResponse, ListTemplatesResponseSuccess, ListTopicsResponse, ListTopicsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, Log, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PublishTemplateResponse, PublishTemplateResponseSuccess, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveAutomationResponse, RemoveAutomationResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactPropertyResponse, RemoveContactPropertyResponseSuccess, RemoveContactSegmentOptions, RemoveContactSegmentResponse, RemoveContactSegmentResponseSuccess, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveEventResponse, RemoveEventResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveTemplateResponse, RemoveTemplateResponseSuccess, RemoveTopicResponse, RemoveTopicResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type ResendOptions, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, StopAutomationResponse, StopAutomationResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, TrackingCaaRecord, TrackingRecord, TriggerStepConfig, UpdateAutomationOptions, UpdateAutomationResponse, UpdateAutomationResponseSuccess, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactPropertyApiOptions, UpdateContactPropertyOptions, UpdateContactPropertyResponse, UpdateContactPropertyResponseSuccess, UpdateContactResponse, UpdateContactResponseSuccess, UpdateContactTopicsOptions, UpdateContactTopicsRequestOptions, UpdateContactTopicsResponse, UpdateContactTopicsResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateEventOptions, UpdateEventResponse, UpdateEventResponseSuccess, UpdateTemplateOptions, UpdateTemplateResponse, UpdateTemplateResponseSuccess, UpdateTopicOptions, UpdateTopicResponse, UpdateTopicResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, WaitForEventStepConfig, Webhook, WebhookEvent, WebhookEventPayload };
|
package/dist/index.d.mts
CHANGED
|
@@ -966,7 +966,6 @@ interface ContactImport {
|
|
|
966
966
|
//#endregion
|
|
967
967
|
//#region src/contacts/imports/interfaces/create-contact-import.interface.d.ts
|
|
968
968
|
type ContactImportOnConflict = 'upsert' | 'skip';
|
|
969
|
-
type ContactImportOnError = 'continue' | 'abort';
|
|
970
969
|
type ContactImportPropertyType = 'string' | 'number' | 'boolean';
|
|
971
970
|
interface ContactImportPropertyMapping {
|
|
972
971
|
column: string;
|
|
@@ -990,7 +989,6 @@ interface CreateContactImportOptions {
|
|
|
990
989
|
file: Blob;
|
|
991
990
|
columnMap?: ContactImportColumnMap;
|
|
992
991
|
onConflict?: ContactImportOnConflict;
|
|
993
|
-
onError?: ContactImportOnError;
|
|
994
992
|
segments?: ContactImportSegment[];
|
|
995
993
|
topics?: ContactImportTopic[];
|
|
996
994
|
}
|
|
@@ -1418,6 +1416,15 @@ interface GetReceivingEmailResponseSuccess {
|
|
|
1418
1416
|
attachments: InboundAttachment[];
|
|
1419
1417
|
}
|
|
1420
1418
|
type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
|
|
1419
|
+
interface GetReceivingEmailOptions {
|
|
1420
|
+
/**
|
|
1421
|
+
* Controls how inline images are returned inside `html`. By default (or when
|
|
1422
|
+
* set to `'data_uri'`), inline images appear in `html` as base64 `data:` URIs.
|
|
1423
|
+
* Set to `'cid'` to keep the original `<img src="cid:..." />` references
|
|
1424
|
+
* instead, each of which matches the `content_id` of an attachment.
|
|
1425
|
+
*/
|
|
1426
|
+
html_format?: 'data_uri' | 'cid';
|
|
1427
|
+
}
|
|
1421
1428
|
//#endregion
|
|
1422
1429
|
//#region src/emails/receiving/interfaces/list-receiving-emails.interface.d.ts
|
|
1423
1430
|
type ListReceivingEmailsOptions = PaginationOptions;
|
|
@@ -1672,7 +1679,7 @@ declare class Receiving {
|
|
|
1672
1679
|
private readonly resend;
|
|
1673
1680
|
readonly attachments: Attachments;
|
|
1674
1681
|
constructor(resend: Resend);
|
|
1675
|
-
get(id: string): Promise<GetReceivingEmailResponse>;
|
|
1682
|
+
get(id: string, options?: GetReceivingEmailOptions): Promise<GetReceivingEmailResponse>;
|
|
1676
1683
|
list(options?: ListReceivingEmailsOptions): Promise<ListReceivingEmailsResponse>;
|
|
1677
1684
|
forward(options: ForwardReceivingEmailOptions): Promise<ForwardReceivingEmailResponse>;
|
|
1678
1685
|
private forwardPassthrough;
|
|
@@ -2228,4 +2235,4 @@ declare class Resend {
|
|
|
2228
2235
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
2229
2236
|
}
|
|
2230
2237
|
//#endregion
|
|
2231
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, AddToSegmentStepConfig, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationConnection, AutomationConnectionType, AutomationResponseConnection, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepStatus, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeleteStepConfig, ContactDeletedEvent, ContactImport, ContactImportColumnMap, ContactImportCounts, ContactImportOnConflict,
|
|
2238
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, AddToSegmentStepConfig, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationConnection, AutomationConnectionType, AutomationResponseConnection, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepStatus, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeleteStepConfig, ContactDeletedEvent, ContactImport, ContactImportColumnMap, ContactImportCounts, ContactImportOnConflict, ContactImportPropertyMapping, ContactImportPropertyType, ContactImportSegment, ContactImportStatus, ContactImportTopic, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdateStepConfig, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, CreateBatchEmailOptions, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactImportOptions, CreateContactImportRequestOptions, CreateContactImportResponse, CreateContactImportResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, DeleteOptions, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecordStatus, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactImportResponse, GetContactImportResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetLogResponse, GetLogResponseSuccess, GetOptions, GetReceivingEmailOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactImportsOptions, ListContactImportsResponse, ListContactImportsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListEventsOptions, ListEventsResponse, ListEventsResponseSuccess, ListLogsOptions, ListLogsResponse, ListLogsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListTemplatesOptions, ListTemplatesResponse, ListTemplatesResponseSuccess, ListTopicsResponse, ListTopicsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, Log, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PublishTemplateResponse, PublishTemplateResponseSuccess, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveAutomationResponse, RemoveAutomationResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactPropertyResponse, RemoveContactPropertyResponseSuccess, RemoveContactSegmentOptions, RemoveContactSegmentResponse, RemoveContactSegmentResponseSuccess, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveEventResponse, RemoveEventResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveTemplateResponse, RemoveTemplateResponseSuccess, RemoveTopicResponse, RemoveTopicResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type ResendOptions, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, StopAutomationResponse, StopAutomationResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, TrackingCaaRecord, TrackingRecord, TriggerStepConfig, UpdateAutomationOptions, UpdateAutomationResponse, UpdateAutomationResponseSuccess, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactPropertyApiOptions, UpdateContactPropertyOptions, UpdateContactPropertyResponse, UpdateContactPropertyResponseSuccess, UpdateContactResponse, UpdateContactResponseSuccess, UpdateContactTopicsOptions, UpdateContactTopicsRequestOptions, UpdateContactTopicsResponse, UpdateContactTopicsResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateEventOptions, UpdateEventResponse, UpdateEventResponseSuccess, UpdateTemplateOptions, UpdateTemplateResponse, UpdateTemplateResponseSuccess, UpdateTopicOptions, UpdateTopicResponse, UpdateTopicResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, WaitForEventStepConfig, Webhook, WebhookEvent, WebhookEventPayload };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PostalMime from "postal-mime";
|
|
2
2
|
import { Webhook } from "standardwebhooks";
|
|
3
3
|
//#region package.json
|
|
4
|
-
var version = "6.13.0
|
|
4
|
+
var version = "6.13.0";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/common/utils/build-pagination-query.ts
|
|
7
7
|
/**
|
|
@@ -411,7 +411,6 @@ var ContactImports = class {
|
|
|
411
411
|
formData.append("file", payload.file);
|
|
412
412
|
this.appendField(formData, "column_map", this.buildColumnMap(payload.columnMap ?? null));
|
|
413
413
|
this.appendField(formData, "on_conflict", payload.onConflict ?? null);
|
|
414
|
-
this.appendField(formData, "on_error", payload.onError ?? null);
|
|
415
414
|
this.appendField(formData, "segments", payload.segments ?? null);
|
|
416
415
|
this.appendField(formData, "topics", payload.topics ?? null);
|
|
417
416
|
return formData;
|
|
@@ -703,8 +702,12 @@ var Receiving = class {
|
|
|
703
702
|
this.resend = resend;
|
|
704
703
|
this.attachments = new Attachments(resend);
|
|
705
704
|
}
|
|
706
|
-
async get(id) {
|
|
707
|
-
|
|
705
|
+
async get(id, options = {}) {
|
|
706
|
+
const searchParams = new URLSearchParams();
|
|
707
|
+
if (options.html_format !== void 0) searchParams.set("html_format", options.html_format);
|
|
708
|
+
const queryString = searchParams.toString();
|
|
709
|
+
const path = queryString ? `/emails/receiving/${id}?${queryString}` : `/emails/receiving/${id}`;
|
|
710
|
+
return await this.resend.get(path);
|
|
708
711
|
}
|
|
709
712
|
async list(options = {}) {
|
|
710
713
|
const queryString = buildPaginationQuery(options);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -82,7 +82,7 @@ const { data } = await resend.emails.send({
|
|
|
82
82
|
html: '<strong>it works!</strong>',
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
console.log(`
|
|
85
|
+
console.log(`Email ${data.id} with custom HTML content has been sent.`);
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## Send email using React
|