import { Ok, type ProblemDetails, type Result } from '@superlist/shared' export type HealthStatus = { status: 'ok' uptimeSeconds: number timestamp: string } /** * Returns the liveness status of the process. * No dependencies and no failure mode: it must always succeed. */ export class GetStatus { constructor(private readonly now: () => Date = () => new Date()) {} execute(): Result { return Ok({ status: 'ok', uptimeSeconds: Math.round(process.uptime()), timestamp: this.now().toISOString(), }) } }