fix(types): Add custom Express request types for station authentication

This commit is contained in:
2026-02-20 19:24:41 +01:00
parent 2da8247978
commit 778f159405
4 changed files with 111 additions and 36 deletions

8
src/types/express.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
declare namespace Express {
interface Request {
/** Set by ScanAuth when the request was authenticated via a station token. Not a header — not spoofable by clients. */
isStationAuth?: boolean;
/** The authenticated station's DB id. Only present when isStationAuth === true. */
stationId?: number;
}
}