Skip to content

RecordingMailer

readonly sent: AuthMailEvent[]

last<T>(type): Extract<{ code?: string; dedupeKey: string; expiresAt: Date; to: string; type: "verify-email"; url?: string; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; expiresAt: Date; meta?: MailRequestMeta; to: string; type: "password-reset"; url: string; userId: string; }, { type: T; }> | Extract<{ code: string; dedupeKey: string; expiresAt: Date; meta?: MailRequestMeta; to: string; type: "password-reset-code"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "password-changed"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; meta?: MailRequestMeta; to: string; type: "account-exists"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; meta?: MailRequestMeta; permanent?: true; to: string; type: "lockout"; until: Date; userId: string; }, { type: T; }> | Extract<{ code?: string; dedupeKey: string; expiresAt: Date; to: string; type: "email-change-confirm"; url?: string; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; to: string; type: "email-change-in-use"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; newEmail: string; revertExpiresAt: Date; revertUrl: string; to: string; type: "email-changed"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "email-change-reverted"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "two-factor-enabled"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; reset?: true; to: string; type: "two-factor-disabled"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; remaining: number | null; to: string; type: "recovery-code-used"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; expiresAt: Date; inviterId: string; scope: string; to: string; type: "invitation"; url: string; }, { type: T; }> | undefined

The most recent event of a type.

T extends "password-reset" | "verify-email" | "password-reset-code" | "password-changed" | "account-exists" | "lockout" | "email-change-confirm" | "email-change-in-use" | "email-changed" | "email-change-reverted" | "two-factor-enabled" | "two-factor-disabled" | "recovery-code-used" | "invitation"

T

Extract<{ code?: string; dedupeKey: string; expiresAt: Date; to: string; type: "verify-email"; url?: string; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; expiresAt: Date; meta?: MailRequestMeta; to: string; type: "password-reset"; url: string; userId: string; }, { type: T; }> | Extract<{ code: string; dedupeKey: string; expiresAt: Date; meta?: MailRequestMeta; to: string; type: "password-reset-code"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "password-changed"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; meta?: MailRequestMeta; to: string; type: "account-exists"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; meta?: MailRequestMeta; permanent?: true; to: string; type: "lockout"; until: Date; userId: string; }, { type: T; }> | Extract<{ code?: string; dedupeKey: string; expiresAt: Date; to: string; type: "email-change-confirm"; url?: string; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; to: string; type: "email-change-in-use"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; newEmail: string; revertExpiresAt: Date; revertUrl: string; to: string; type: "email-changed"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "email-change-reverted"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; to: string; type: "two-factor-enabled"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; reset?: true; to: string; type: "two-factor-disabled"; userId: string; }, { type: T; }> | Extract<{ at: Date; dedupeKey: string; meta?: MailRequestMeta; remaining: number | null; to: string; type: "recovery-code-used"; userId: string; }, { type: T; }> | Extract<{ dedupeKey: string; expiresAt: Date; inviterId: string; scope: string; to: string; type: "invitation"; url: string; }, { type: T; }> | undefined


send(event): Promise<void>

AuthMailEvent

Promise<void>

Mailer.send