v3: added password change/reset feature
This commit is contained in:
@@ -380,6 +380,27 @@ export function notificationRowToApi(row: NotificationRow): Notification {
|
||||
};
|
||||
}
|
||||
|
||||
// ── Password reset tokens ─────────────────────────────────────────────────────
|
||||
|
||||
export interface PasswordResetTokenRow {
|
||||
token: string;
|
||||
user_id: string;
|
||||
expires_at: string;
|
||||
used_at: string | null;
|
||||
[key: string]: SQLOutputValue;
|
||||
}
|
||||
|
||||
export function isPasswordResetTokenRow(
|
||||
obj: unknown,
|
||||
): obj is PasswordResetTokenRow {
|
||||
return !!obj && typeof obj === "object" &&
|
||||
"token" in obj && typeof obj.token === "string" &&
|
||||
"user_id" in obj && typeof obj.user_id === "string" &&
|
||||
"expires_at" in obj && typeof obj.expires_at === "string" &&
|
||||
"used_at" in obj &&
|
||||
(obj.used_at === null || typeof obj.used_at === "string");
|
||||
}
|
||||
|
||||
// ── Invites ───────────────────────────────────────────────────────────────────
|
||||
|
||||
export interface InviteRow {
|
||||
|
||||
Reference in New Issue
Block a user