import type { SQLOutputValue } from "node:sqlite"; export interface InviteRow { token: string; inviter_id: string; used_at: string | null; created_at: string; [key: string]: SQLOutputValue; } export function isInviteRow( obj: unknown, ): obj is InviteRow { return !!obj && typeof obj === "object" && "token" in obj && typeof obj.token === "string" && "inviter_id" in obj && typeof obj.inviter_id === "string" && "created_at" in obj && typeof obj.created_at === "string" && "used_at" in obj && (obj.used_at === null || typeof obj.used_at === "string"); }