Files
location-mqtt-tracker-app/lib/types.ts
Joachim Hummel 7aab1ab789 Move types to lib directory for better organization
- Move types/location.ts to lib/types.ts
- Update all imports from @/types/location to @/lib/types
- Remove empty types/ directory
- Better aligns with Next.js conventions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:56:31 +00:00

31 lines
763 B
TypeScript

export interface Location {
id?: number;
latitude: number | string; // NocoDB returns string
longitude: number | string; // NocoDB returns string
timestamp: string;
user_id: number | string; // NocoDB returns string "0" for MQTT devices
first_name: string | null;
last_name: string | null;
username: string | null;
marker_label: string | null;
display_time: string | null;
chat_id: number | string; // Also string in API response
battery?: number | null;
speed?: number | null;
created_at?: string;
}
export interface LocationResponse {
success: boolean;
current: Location | null;
history: Location[];
total_points: number;
last_updated: string;
}
export interface Device {
id: string;
name: string;
color: string;
}