All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
590 B
TypeScript
21 lines
590 B
TypeScript
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");
|
|
}
|