/** * Value object representing the user's authentication state with iRacing. * * This is used to track whether the user has a valid session for automation * without GridPilot ever seeing or storing credentials (zero-knowledge design). */ export const AuthenticationState = { /** Authentication status has not yet been checked */ UNKNOWN: 'UNKNOWN', /** Valid session exists and is ready for automation */ AUTHENTICATED: 'AUTHENTICATED', /** Session was valid but has expired, re-authentication required */ EXPIRED: 'EXPIRED', /** User explicitly logged out, clearing the session */ LOGGED_OUT: 'LOGGED_OUT', } as const; export type AuthenticationState = typeof AuthenticationState[keyof typeof AuthenticationState];