Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resend",
"version": "6.6.0",
"version": "6.6.0-preview-raw-inbound.0",
"description": "Node.js library for the Resend API",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export interface GetReceivingEmailResponseSuccess {
text: string | null;
headers: Record<string, string>;
message_id: string;
raw: {
download_url: string;
expires_at: string;
} | null;
attachments: Array<{
id: string;
filename: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type ListReceivingEmailsOptions = PaginationOptions;

export type ListReceivingEmail = Omit<
GetReceivingEmailResponseSuccess,
'html' | 'text' | 'headers' | 'object'
'html' | 'text' | 'headers' | 'raw' | 'object'
>;

export interface ListReceivingEmailsResponseSuccess {
Expand Down
11 changes: 11 additions & 0 deletions src/emails/receiving/receiving.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ describe('Receiving', () => {
headers: {
example: 'value',
},
raw: {
download_url:
'https://example.com/emails/raw/abc123?signature=xyz789',
expires_at: '2023-04-08T00:13:52.669661+00:00',
},
attachments: [
{
id: 'att_123',
Expand Down Expand Up @@ -117,6 +122,10 @@ describe('Receiving', () => {
"id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff",
"message_id": "msg_123",
"object": "email",
"raw": {
"download_url": "https://example.com/emails/raw/abc123?signature=xyz789",
"expires_at": "2023-04-08T00:13:52.669661+00:00",
},
"reply_to": [
"[email protected]",
],
Expand Down Expand Up @@ -148,6 +157,7 @@ describe('Receiving', () => {
cc: null,
reply_to: null,
headers: {},
raw: null,
attachments: [],
message_id: 'msg_456',
};
Expand Down Expand Up @@ -176,6 +186,7 @@ describe('Receiving', () => {
"id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff",
"message_id": "msg_456",
"object": "email",
"raw": null,
"reply_to": null,
"subject": "Test inbound email",
"text": "hello world",
Expand Down
Loading