diff --git a/src/inbound/inbound.spec.ts b/src/inbound/inbound.spec.ts index 16366645..a50b5a0c 100644 --- a/src/inbound/inbound.spec.ts +++ b/src/inbound/inbound.spec.ts @@ -52,6 +52,9 @@ describe('Inbound', () => { bcc: null, cc: ['cc@example.com'], reply_to: ['reply@example.com'], + headers: { + example: 'value', + }, attachments: [ { id: 'att_123', @@ -93,6 +96,9 @@ describe('Inbound', () => { ], "createdAt": "2023-04-07T23:13:52.669661+00:00", "from": "sender@example.com", + "headers": { + "example": "value", + }, "html": "
hello world
", "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "object": "inbound", @@ -123,6 +129,7 @@ describe('Inbound', () => { bcc: null, cc: null, reply_to: null, + headers: {}, attachments: [], }; @@ -146,6 +153,7 @@ describe('Inbound', () => { "cc": null, "createdAt": "2023-04-07T23:13:52.669661+00:00", "from": "sender@example.com", + "headers": {}, "html": null, "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "object": "inbound", diff --git a/src/inbound/inbound.ts b/src/inbound/inbound.ts index df24cce1..9b551f42 100644 --- a/src/inbound/inbound.ts +++ b/src/inbound/inbound.ts @@ -35,6 +35,7 @@ export class Inbound { replyTo: apiResponse.reply_to, html: apiResponse.html, text: apiResponse.text, + headers: apiResponse.headers, attachments: apiResponse.attachments.map((attachment) => ({ id: attachment.id, filename: attachment.filename, diff --git a/src/inbound/interfaces/get-inbound-email.interface.ts b/src/inbound/interfaces/get-inbound-email.interface.ts index aef3ba2a..4b6ccc57 100644 --- a/src/inbound/interfaces/get-inbound-email.interface.ts +++ b/src/inbound/interfaces/get-inbound-email.interface.ts @@ -14,6 +14,7 @@ export interface GetInboundEmailApiResponse { reply_to: string[] | null; html: string | null; text: string | null; + headers: Record