| 7078 | ); |
| 7079 | |
| 7080 | const rowToAdminSubject = (row: CoreRow<"subject">): AdminSubject => ({ |
| 7081 | externalId: row.external_id, |
| 7082 | createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at), |
| 7083 | // bigint on drivers that return one, and a blob on SQLite — hence the |
| 7084 | // ORM read rather than raw SQL (see `subject-registry.ts`). |
| 7085 | lastSeenAt: row.last_seen_at == null ? null : Number(row.last_seen_at), |
| 7086 | status: row.status ?? null, |
| 7087 | }); |
| 7088 | |
| 7089 | const rowToAdminConnection = (row: ConnectionRow): AdminConnection => { |
| 7090 | const owner = row.owner as Owner; |