SesEvent: {
Records: {
eventSource: "aws:ses";
eventVersion: string;
ses: {
mail: {
commonHeaders: {
bcc?: string[];
cc?: string[];
date: string;
from: string[];
messageId: string;
"reply-to"?: string[];
returnPath: string;
sender?: string[];
subject: string;
to: string[];
};
destination: string[];
headers: { name: string; value: string }[];
headersTruncated: boolean;
messageId: string;
source: string;
timestamp: string;
};
receipt: {
action: {
functionArn: string;
invocationType: "Event";
type: "Lambda";
};
dkimVerdict: { status: "PASS"
| "FAIL"
| "GRAY"
| "PROCESSING_FAILED" };
dmarcPolicy: "none" | "quarantine" | "reject";
dmarcVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
processingTimeMillis: number;
recipients: string[];
spamVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
spfVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
timestamp: string;
virusVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
};
};
}[];
}
Type declaration
Records: {
eventSource: "aws:ses";
eventVersion: string;
ses: {
mail: {
commonHeaders: {
bcc?: string[];
cc?: string[];
date: string;
from: string[];
messageId: string;
"reply-to"?: string[];
returnPath: string;
sender?: string[];
subject: string;
to: string[];
};
destination: string[];
headers: { name: string; value: string }[];
headersTruncated: boolean;
messageId: string;
source: string;
timestamp: string;
};
receipt: {
action: {
functionArn: string;
invocationType: "Event";
type: "Lambda";
};
dkimVerdict: { status: "PASS"
| "FAIL"
| "GRAY"
| "PROCESSING_FAILED" };
dmarcPolicy: "none" | "quarantine" | "reject";
dmarcVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
processingTimeMillis: number;
recipients: string[];
spamVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
spfVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
timestamp: string;
virusVerdict: { status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" };
};
};
}[]
Zod schema for SES events from AWS.