diff --git a/src/domains/domains.ts b/src/domains/domains.ts index b35a9727..c8f71844 100644 --- a/src/domains/domains.ts +++ b/src/domains/domains.ts @@ -51,6 +51,7 @@ export class Domains { const data = await this.resend.get( `/domains/${id}`, ); + return data; } diff --git a/src/emails/emails.spec.ts b/src/emails/emails.spec.ts index e1c35a39..ceeb74c5 100644 --- a/src/emails/emails.spec.ts +++ b/src/emails/emails.spec.ts @@ -184,7 +184,7 @@ describe('Emails', () => { const payload: CreateEmailOptions = { from: 'admin@resend.com', to: 'bu@resend.com', - reply_to: ['foo@resend.com', 'bar@resend.com'], + replyTo: ['foo@resend.com', 'bar@resend.com'], subject: 'Hello World', text: 'Hello world', }; @@ -252,7 +252,7 @@ describe('Emails', () => { const payload: CreateEmailOptions = { from: 'resend.com', // Invalid from address to: 'bu@resend.com', - reply_to: ['foo@resend.com', 'bar@resend.com'], + replyTo: ['foo@resend.com', 'bar@resend.com'], subject: 'Hello World', text: 'Hello world', }; diff --git a/src/emails/emails.ts b/src/emails/emails.ts index 6b7f1a81..a9de4d6e 100644 --- a/src/emails/emails.ts +++ b/src/emails/emails.ts @@ -50,7 +50,7 @@ export class Emails { from: payload.from, headers: payload.headers, html: payload.html, - reply_to: payload.reply_to, + reply_to: payload.replyTo, scheduled_at: payload.scheduledAt, subject: payload.subject, tags: payload.tags, @@ -67,6 +67,7 @@ export class Emails { const data = await this.resend.get( `/emails/${id}`, ); + return data; } diff --git a/src/emails/interfaces/create-email-options.interface.ts b/src/emails/interfaces/create-email-options.interface.ts index e19ba31b..0e4a5921 100644 --- a/src/emails/interfaces/create-email-options.interface.ts +++ b/src/emails/interfaces/create-email-options.interface.ts @@ -60,7 +60,7 @@ interface CreateEmailBaseOptions { * * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters */ - reply_to?: string | string[]; + replyTo?: string | string[]; /** * Email subject. * @@ -111,7 +111,7 @@ interface Attachment { /** Path where the attachment file is hosted */ path?: string; /** Optional content type for the attachment, if not set will be derived from the filename property */ - content_type?: string; + contentType?: string; } export type Tag = {