resend 6.10.0-preview-workflows.3 → 6.10.0-preview-workflows.4
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 +20 -4
- package/dist/index.d.cts +42 -5
- package/dist/index.d.mts +42 -5
- package/dist/index.mjs +20 -4
- package/package.json +17 -17
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 svix = require("svix");
|
|
27
27
|
//#region package.json
|
|
28
|
-
var version = "6.10.0-preview-workflows.
|
|
28
|
+
var version = "6.10.0-preview-workflows.4";
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/common/utils/build-pagination-query.ts
|
|
31
31
|
/**
|
|
@@ -828,6 +828,21 @@ var Events = class {
|
|
|
828
828
|
}
|
|
829
829
|
};
|
|
830
830
|
//#endregion
|
|
831
|
+
//#region src/logs/logs.ts
|
|
832
|
+
var Logs = class {
|
|
833
|
+
constructor(resend) {
|
|
834
|
+
this.resend = resend;
|
|
835
|
+
}
|
|
836
|
+
async list(options = {}) {
|
|
837
|
+
const queryString = buildPaginationQuery(options);
|
|
838
|
+
const url = queryString ? `/logs?${queryString}` : "/logs";
|
|
839
|
+
return await this.resend.get(url);
|
|
840
|
+
}
|
|
841
|
+
async get(id) {
|
|
842
|
+
return await this.resend.get(`/logs/${id}`);
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
//#endregion
|
|
831
846
|
//#region src/segments/segments.ts
|
|
832
847
|
var Segments = class {
|
|
833
848
|
constructor(resend) {
|
|
@@ -1031,20 +1046,21 @@ const userAgent = typeof process !== "undefined" && process.env ? process.env.RE
|
|
|
1031
1046
|
var Resend = class {
|
|
1032
1047
|
constructor(key) {
|
|
1033
1048
|
this.key = key;
|
|
1034
|
-
this.apiKeys = new ApiKeys(this);
|
|
1035
1049
|
this.segments = new Segments(this);
|
|
1050
|
+
this.apiKeys = new ApiKeys(this);
|
|
1036
1051
|
this.audiences = this.segments;
|
|
1037
1052
|
this.automations = new Automations(this);
|
|
1038
1053
|
this.batch = new Batch(this);
|
|
1039
1054
|
this.broadcasts = new Broadcasts(this);
|
|
1040
|
-
this.contacts = new Contacts(this);
|
|
1041
1055
|
this.contactProperties = new ContactProperties(this);
|
|
1056
|
+
this.contacts = new Contacts(this);
|
|
1042
1057
|
this.domains = new Domains(this);
|
|
1043
1058
|
this.emails = new Emails(this);
|
|
1044
1059
|
this.events = new Events(this);
|
|
1045
|
-
this.
|
|
1060
|
+
this.logs = new Logs(this);
|
|
1046
1061
|
this.templates = new Templates(this);
|
|
1047
1062
|
this.topics = new Topics(this);
|
|
1063
|
+
this.webhooks = new Webhooks(this);
|
|
1048
1064
|
if (!key) {
|
|
1049
1065
|
if (typeof process !== "undefined" && process.env) this.key = process.env.RESEND_API_KEY;
|
|
1050
1066
|
if (!this.key) throw new Error("Missing API key. Pass it to the constructor `new Resend(\"re_123\")`");
|
package/dist/index.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ import * as React$1 from "react";
|
|
|
4
4
|
interface ApiKey {
|
|
5
5
|
created_at: string;
|
|
6
6
|
id: string;
|
|
7
|
+
last_used_at: string | null;
|
|
7
8
|
name: string;
|
|
8
9
|
}
|
|
9
10
|
//#endregion
|
|
@@ -226,7 +227,7 @@ type ListApiKeysOptions = PaginationOptions;
|
|
|
226
227
|
type ListApiKeysResponseSuccess = {
|
|
227
228
|
object: 'list';
|
|
228
229
|
has_more: boolean;
|
|
229
|
-
data: Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
|
|
230
|
+
data: Pick<ApiKey, 'name' | 'id' | 'created_at' | 'last_used_at'>[];
|
|
230
231
|
};
|
|
231
232
|
type ListApiKeysResponse = Response<ListApiKeysResponseSuccess>;
|
|
232
233
|
//#endregion
|
|
@@ -1392,6 +1393,33 @@ interface UpdateEventResponseSuccess {
|
|
|
1392
1393
|
}
|
|
1393
1394
|
type UpdateEventResponse = Response<UpdateEventResponseSuccess>;
|
|
1394
1395
|
//#endregion
|
|
1396
|
+
//#region src/logs/interfaces/log.d.ts
|
|
1397
|
+
interface Log {
|
|
1398
|
+
id: string;
|
|
1399
|
+
created_at: string;
|
|
1400
|
+
endpoint: string;
|
|
1401
|
+
method: string;
|
|
1402
|
+
response_status: number;
|
|
1403
|
+
user_agent: string | null;
|
|
1404
|
+
request_body: unknown;
|
|
1405
|
+
response_body: unknown;
|
|
1406
|
+
}
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region src/logs/interfaces/get-log.interface.d.ts
|
|
1409
|
+
type GetLogResponseSuccess = {
|
|
1410
|
+
object: 'log';
|
|
1411
|
+
} & Log;
|
|
1412
|
+
type GetLogResponse = Response<GetLogResponseSuccess>;
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region src/logs/interfaces/list-logs.interface.d.ts
|
|
1415
|
+
type ListLogsOptions = PaginationOptions;
|
|
1416
|
+
type ListLogsResponseSuccess = {
|
|
1417
|
+
object: 'list';
|
|
1418
|
+
has_more: boolean;
|
|
1419
|
+
data: Pick<Log, 'id' | 'created_at' | 'endpoint' | 'method' | 'response_status' | 'user_agent'>[];
|
|
1420
|
+
};
|
|
1421
|
+
type ListLogsResponse = Response<ListLogsResponseSuccess>;
|
|
1422
|
+
//#endregion
|
|
1395
1423
|
//#region src/api-keys/api-keys.d.ts
|
|
1396
1424
|
declare class ApiKeys {
|
|
1397
1425
|
private readonly resend;
|
|
@@ -1558,6 +1586,14 @@ declare class Events {
|
|
|
1558
1586
|
remove(identifier: string): Promise<RemoveEventResponse>;
|
|
1559
1587
|
}
|
|
1560
1588
|
//#endregion
|
|
1589
|
+
//#region src/logs/logs.d.ts
|
|
1590
|
+
declare class Logs {
|
|
1591
|
+
private readonly resend;
|
|
1592
|
+
constructor(resend: Resend);
|
|
1593
|
+
list(options?: ListLogsOptions): Promise<ListLogsResponse>;
|
|
1594
|
+
get(id: string): Promise<GetLogResponse>;
|
|
1595
|
+
}
|
|
1596
|
+
//#endregion
|
|
1561
1597
|
//#region src/segments/interfaces/create-segment-options.interface.d.ts
|
|
1562
1598
|
interface CreateSegmentOptions {
|
|
1563
1599
|
name: string;
|
|
@@ -2041,8 +2077,8 @@ declare class Webhooks {
|
|
|
2041
2077
|
declare class Resend {
|
|
2042
2078
|
readonly key?: string | undefined;
|
|
2043
2079
|
private readonly headers;
|
|
2044
|
-
readonly apiKeys: ApiKeys;
|
|
2045
2080
|
readonly segments: Segments;
|
|
2081
|
+
readonly apiKeys: ApiKeys;
|
|
2046
2082
|
/**
|
|
2047
2083
|
* @deprecated Use segments instead
|
|
2048
2084
|
*/
|
|
@@ -2050,14 +2086,15 @@ declare class Resend {
|
|
|
2050
2086
|
readonly automations: Automations;
|
|
2051
2087
|
readonly batch: Batch;
|
|
2052
2088
|
readonly broadcasts: Broadcasts;
|
|
2053
|
-
readonly contacts: Contacts;
|
|
2054
2089
|
readonly contactProperties: ContactProperties;
|
|
2090
|
+
readonly contacts: Contacts;
|
|
2055
2091
|
readonly domains: Domains;
|
|
2056
2092
|
readonly emails: Emails;
|
|
2057
2093
|
readonly events: Events;
|
|
2058
|
-
readonly
|
|
2094
|
+
readonly logs: Logs;
|
|
2059
2095
|
readonly templates: Templates;
|
|
2060
2096
|
readonly topics: Topics;
|
|
2097
|
+
readonly webhooks: Webhooks;
|
|
2061
2098
|
constructor(key?: string | undefined);
|
|
2062
2099
|
fetchRequest<T>(path: string, options?: {}): Promise<Response<T>>;
|
|
2063
2100
|
post<T>(path: string, entity?: unknown, options?: PostOptions & IdempotentRequest): Promise<Response<T>>;
|
|
@@ -2067,4 +2104,4 @@ declare class Resend {
|
|
|
2067
2104
|
delete<T>(path: string, query?: unknown): Promise<Response<T>>;
|
|
2068
2105
|
}
|
|
2069
2106
|
//#endregion
|
|
2070
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationEdge, AutomationEdgeType, AutomationResponseEdge, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepItem, AutomationRunStepStatus, AutomationRunTrigger, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, 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, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, 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, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetAutomationRunStepOptions, GetAutomationRunStepResponse, GetAutomationRunStepResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunStepsOptions, ListAutomationRunStepsResponse, ListAutomationRunStepsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListEventsOptions, ListEventsResponse, ListEventsResponseSuccess, 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, 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 Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, 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 };
|
|
2107
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationEdge, AutomationEdgeType, AutomationResponseEdge, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepItem, AutomationRunStepStatus, AutomationRunTrigger, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, 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, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, 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, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetAutomationRunStepOptions, GetAutomationRunStepResponse, GetAutomationRunStepResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetLogResponse, GetLogResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunStepsOptions, ListAutomationRunStepsResponse, ListAutomationRunStepsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, 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 Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, 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
|
@@ -4,6 +4,7 @@ import * as React$1 from "react";
|
|
|
4
4
|
interface ApiKey {
|
|
5
5
|
created_at: string;
|
|
6
6
|
id: string;
|
|
7
|
+
last_used_at: string | null;
|
|
7
8
|
name: string;
|
|
8
9
|
}
|
|
9
10
|
//#endregion
|
|
@@ -226,7 +227,7 @@ type ListApiKeysOptions = PaginationOptions;
|
|
|
226
227
|
type ListApiKeysResponseSuccess = {
|
|
227
228
|
object: 'list';
|
|
228
229
|
has_more: boolean;
|
|
229
|
-
data: Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
|
|
230
|
+
data: Pick<ApiKey, 'name' | 'id' | 'created_at' | 'last_used_at'>[];
|
|
230
231
|
};
|
|
231
232
|
type ListApiKeysResponse = Response<ListApiKeysResponseSuccess>;
|
|
232
233
|
//#endregion
|
|
@@ -1392,6 +1393,33 @@ interface UpdateEventResponseSuccess {
|
|
|
1392
1393
|
}
|
|
1393
1394
|
type UpdateEventResponse = Response<UpdateEventResponseSuccess>;
|
|
1394
1395
|
//#endregion
|
|
1396
|
+
//#region src/logs/interfaces/log.d.ts
|
|
1397
|
+
interface Log {
|
|
1398
|
+
id: string;
|
|
1399
|
+
created_at: string;
|
|
1400
|
+
endpoint: string;
|
|
1401
|
+
method: string;
|
|
1402
|
+
response_status: number;
|
|
1403
|
+
user_agent: string | null;
|
|
1404
|
+
request_body: unknown;
|
|
1405
|
+
response_body: unknown;
|
|
1406
|
+
}
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region src/logs/interfaces/get-log.interface.d.ts
|
|
1409
|
+
type GetLogResponseSuccess = {
|
|
1410
|
+
object: 'log';
|
|
1411
|
+
} & Log;
|
|
1412
|
+
type GetLogResponse = Response<GetLogResponseSuccess>;
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region src/logs/interfaces/list-logs.interface.d.ts
|
|
1415
|
+
type ListLogsOptions = PaginationOptions;
|
|
1416
|
+
type ListLogsResponseSuccess = {
|
|
1417
|
+
object: 'list';
|
|
1418
|
+
has_more: boolean;
|
|
1419
|
+
data: Pick<Log, 'id' | 'created_at' | 'endpoint' | 'method' | 'response_status' | 'user_agent'>[];
|
|
1420
|
+
};
|
|
1421
|
+
type ListLogsResponse = Response<ListLogsResponseSuccess>;
|
|
1422
|
+
//#endregion
|
|
1395
1423
|
//#region src/api-keys/api-keys.d.ts
|
|
1396
1424
|
declare class ApiKeys {
|
|
1397
1425
|
private readonly resend;
|
|
@@ -1558,6 +1586,14 @@ declare class Events {
|
|
|
1558
1586
|
remove(identifier: string): Promise<RemoveEventResponse>;
|
|
1559
1587
|
}
|
|
1560
1588
|
//#endregion
|
|
1589
|
+
//#region src/logs/logs.d.ts
|
|
1590
|
+
declare class Logs {
|
|
1591
|
+
private readonly resend;
|
|
1592
|
+
constructor(resend: Resend);
|
|
1593
|
+
list(options?: ListLogsOptions): Promise<ListLogsResponse>;
|
|
1594
|
+
get(id: string): Promise<GetLogResponse>;
|
|
1595
|
+
}
|
|
1596
|
+
//#endregion
|
|
1561
1597
|
//#region src/segments/interfaces/create-segment-options.interface.d.ts
|
|
1562
1598
|
interface CreateSegmentOptions {
|
|
1563
1599
|
name: string;
|
|
@@ -2041,8 +2077,8 @@ declare class Webhooks {
|
|
|
2041
2077
|
declare class Resend {
|
|
2042
2078
|
readonly key?: string | undefined;
|
|
2043
2079
|
private readonly headers;
|
|
2044
|
-
readonly apiKeys: ApiKeys;
|
|
2045
2080
|
readonly segments: Segments;
|
|
2081
|
+
readonly apiKeys: ApiKeys;
|
|
2046
2082
|
/**
|
|
2047
2083
|
* @deprecated Use segments instead
|
|
2048
2084
|
*/
|
|
@@ -2050,14 +2086,15 @@ declare class Resend {
|
|
|
2050
2086
|
readonly automations: Automations;
|
|
2051
2087
|
readonly batch: Batch;
|
|
2052
2088
|
readonly broadcasts: Broadcasts;
|
|
2053
|
-
readonly contacts: Contacts;
|
|
2054
2089
|
readonly contactProperties: ContactProperties;
|
|
2090
|
+
readonly contacts: Contacts;
|
|
2055
2091
|
readonly domains: Domains;
|
|
2056
2092
|
readonly emails: Emails;
|
|
2057
2093
|
readonly events: Events;
|
|
2058
|
-
readonly
|
|
2094
|
+
readonly logs: Logs;
|
|
2059
2095
|
readonly templates: Templates;
|
|
2060
2096
|
readonly topics: Topics;
|
|
2097
|
+
readonly webhooks: Webhooks;
|
|
2061
2098
|
constructor(key?: string | undefined);
|
|
2062
2099
|
fetchRequest<T>(path: string, options?: {}): Promise<Response<T>>;
|
|
2063
2100
|
post<T>(path: string, entity?: unknown, options?: PostOptions & IdempotentRequest): Promise<Response<T>>;
|
|
@@ -2067,4 +2104,4 @@ declare class Resend {
|
|
|
2067
2104
|
delete<T>(path: string, query?: unknown): Promise<Response<T>>;
|
|
2068
2105
|
}
|
|
2069
2106
|
//#endregion
|
|
2070
|
-
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationEdge, AutomationEdgeType, AutomationResponseEdge, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepItem, AutomationRunStepStatus, AutomationRunTrigger, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, 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, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, 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, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetAutomationRunStepOptions, GetAutomationRunStepResponse, GetAutomationRunStepResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunStepsOptions, ListAutomationRunStepsResponse, ListAutomationRunStepsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListEmail, ListEmailsOptions, ListEmailsResponse, ListEmailsResponseSuccess, ListEventsOptions, ListEventsResponse, ListEventsResponseSuccess, 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, 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 Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, 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 };
|
|
2107
|
+
export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, AttachmentData, Automation, AutomationEdge, AutomationEdgeType, AutomationResponseEdge, AutomationResponseStep, AutomationRun, AutomationRunItem, AutomationRunStatus, AutomationRunStep, AutomationRunStepItem, AutomationRunStepStatus, AutomationRunTrigger, AutomationStatus, AutomationStep, AutomationStepType, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, ConditionRule, ConditionStepConfig, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAutomationOptions, CreateAutomationResponse, CreateAutomationResponseSuccess, 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, CreateEventOptions, CreateEventResponse, CreateEventResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DelayStepConfig, 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, Event, EventSchemaMap, EventSchemaType, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetAutomationResponse, GetAutomationResponseSuccess, GetAutomationRunOptions, GetAutomationRunResponse, GetAutomationRunResponseSuccess, GetAutomationRunStepOptions, GetAutomationRunStepResponse, GetAutomationRunStepResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetEventResponse, GetEventResponseSuccess, GetLogResponse, GetLogResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, InboundAttachment, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListAutomationRunStepsOptions, ListAutomationRunStepsResponse, ListAutomationRunStepsResponseSuccess, ListAutomationRunsOptions, ListAutomationRunsResponse, ListAutomationRunsResponseSuccess, ListAutomationsOptions, ListAutomationsResponse, ListAutomationsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, 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 Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, SendEmailStepConfig, SendEventOptions, SendEventResponse, SendEventResponseSuccess, Tag, Template, TemplateVariable, TemplateVariableValue, Topic, 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 "svix";
|
|
3
3
|
//#region package.json
|
|
4
|
-
var version = "6.10.0-preview-workflows.
|
|
4
|
+
var version = "6.10.0-preview-workflows.4";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/common/utils/build-pagination-query.ts
|
|
7
7
|
/**
|
|
@@ -804,6 +804,21 @@ var Events = class {
|
|
|
804
804
|
}
|
|
805
805
|
};
|
|
806
806
|
//#endregion
|
|
807
|
+
//#region src/logs/logs.ts
|
|
808
|
+
var Logs = class {
|
|
809
|
+
constructor(resend) {
|
|
810
|
+
this.resend = resend;
|
|
811
|
+
}
|
|
812
|
+
async list(options = {}) {
|
|
813
|
+
const queryString = buildPaginationQuery(options);
|
|
814
|
+
const url = queryString ? `/logs?${queryString}` : "/logs";
|
|
815
|
+
return await this.resend.get(url);
|
|
816
|
+
}
|
|
817
|
+
async get(id) {
|
|
818
|
+
return await this.resend.get(`/logs/${id}`);
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
//#endregion
|
|
807
822
|
//#region src/segments/segments.ts
|
|
808
823
|
var Segments = class {
|
|
809
824
|
constructor(resend) {
|
|
@@ -1007,20 +1022,21 @@ const userAgent = typeof process !== "undefined" && process.env ? process.env.RE
|
|
|
1007
1022
|
var Resend = class {
|
|
1008
1023
|
constructor(key) {
|
|
1009
1024
|
this.key = key;
|
|
1010
|
-
this.apiKeys = new ApiKeys(this);
|
|
1011
1025
|
this.segments = new Segments(this);
|
|
1026
|
+
this.apiKeys = new ApiKeys(this);
|
|
1012
1027
|
this.audiences = this.segments;
|
|
1013
1028
|
this.automations = new Automations(this);
|
|
1014
1029
|
this.batch = new Batch(this);
|
|
1015
1030
|
this.broadcasts = new Broadcasts(this);
|
|
1016
|
-
this.contacts = new Contacts(this);
|
|
1017
1031
|
this.contactProperties = new ContactProperties(this);
|
|
1032
|
+
this.contacts = new Contacts(this);
|
|
1018
1033
|
this.domains = new Domains(this);
|
|
1019
1034
|
this.emails = new Emails(this);
|
|
1020
1035
|
this.events = new Events(this);
|
|
1021
|
-
this.
|
|
1036
|
+
this.logs = new Logs(this);
|
|
1022
1037
|
this.templates = new Templates(this);
|
|
1023
1038
|
this.topics = new Topics(this);
|
|
1039
|
+
this.webhooks = new Webhooks(this);
|
|
1024
1040
|
if (!key) {
|
|
1025
1041
|
if (typeof process !== "undefined" && process.env) this.key = process.env.RESEND_API_KEY;
|
|
1026
1042
|
if (!this.key) throw new Error("Missing API key. Pass it to the constructor `new Resend(\"re_123\")`");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.10.0-preview-workflows.
|
|
3
|
+
"version": "6.10.0-preview-workflows.4",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
34
|
-
"integration:nextjs": "cd ./
|
|
34
|
+
"integration:nextjs": "cd ./e2e/nextjs && next build --turbopack",
|
|
35
35
|
"lint": "biome check .",
|
|
36
36
|
"lint:fix": "biome check . --write",
|
|
37
37
|
"prepublishOnly": "pnpm run build",
|
|
38
|
-
"test": "vitest run",
|
|
39
|
-
"test:dev": "cross-env TEST_MODE=dev vitest run",
|
|
40
|
-
"test:
|
|
41
|
-
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
42
|
-
"test:watch": "vitest",
|
|
38
|
+
"test": "vitest run --exclude e2e",
|
|
39
|
+
"test:dev": "cross-env TEST_MODE=dev vitest run --exclude e2e",
|
|
40
|
+
"test:e2e": "vitest run e2e",
|
|
41
|
+
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run --exclude e2e",
|
|
42
|
+
"test:watch": "vitest --exclude e2e",
|
|
43
43
|
"typecheck": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"repository": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://github.com/resend/resend-node#readme",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"postal-mime": "2.7.
|
|
57
|
-
"svix": "1.
|
|
56
|
+
"postal-mime": "2.7.4",
|
|
57
|
+
"svix": "1.90.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@react-email/render": "*"
|
|
@@ -65,23 +65,23 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@biomejs/biome": "2.4.
|
|
68
|
+
"@biomejs/biome": "2.4.10",
|
|
69
69
|
"@pollyjs/adapter-fetch": "6.0.7",
|
|
70
70
|
"@pollyjs/core": "6.0.6",
|
|
71
71
|
"@pollyjs/persister-fs": "6.0.6",
|
|
72
72
|
"@types/mailparser": "3.4.6",
|
|
73
|
-
"@types/node": "24.
|
|
73
|
+
"@types/node": "24.12.2",
|
|
74
74
|
"@types/react": "19.2.14",
|
|
75
75
|
"cross-env": "10.1.0",
|
|
76
|
-
"dotenv": "17.
|
|
77
|
-
"pkg-pr-new": "0.0.
|
|
76
|
+
"dotenv": "17.4.1",
|
|
77
|
+
"pkg-pr-new": "0.0.66",
|
|
78
78
|
"react": "19.2.4",
|
|
79
79
|
"react-dom": "19.2.4",
|
|
80
80
|
"rimraf": "6.1.3",
|
|
81
|
-
"tsdown": "0.21.
|
|
82
|
-
"typescript": "
|
|
83
|
-
"vitest": "4.
|
|
81
|
+
"tsdown": "0.21.4",
|
|
82
|
+
"typescript": "6.0.2",
|
|
83
|
+
"vitest": "4.1.3",
|
|
84
84
|
"vitest-fetch-mock": "0.4.5"
|
|
85
85
|
},
|
|
86
|
-
"packageManager": "pnpm@10.
|
|
86
|
+
"packageManager": "pnpm@10.33.0"
|
|
87
87
|
}
|