import { ApiErrorResponse, ApiResponse } from './Api'; export type GetProfileDevicesResponse = ApiResponse; export type GetProfileDevicesRequest = { email: string; mac: string; earliest_registered_at: string; page: string; page_size: string; }; export type ProfileDeviceResponse = { total_count: number; has_next: boolean; next_page: number; has_prev: boolean; prev_page: number; profile_device: ProfileDevice[]; }; export type ProfileDevice = { name: string; email: string; legacyUsername: string | null; devices: DeviceDetails; }; export type DeviceDetails = { deviceId: string | null; deviceName: string | null; macAddress: string | null; registrationStatus: string | null; publishedAt: string | null; registeredAt: string | null; lastHeartbeatAt: string | null; isDisabled: boolean; }; export type GetProfileDevicesErrorResponse = ApiErrorResponse< GetProfileDevicesError >; export type GetProfileDevicesError = Error; export type GetProfilesByRecentDevicesResponse = ApiResponse< ProfilesByRecentDevicesResponse >; export type GetProfilesByRecentDevicesRequest = { earliest_heartbeat_at: string; page: string; page_size: string; }; export type ProfilesByRecentDevicesResponse = { total_count: number; has_next: boolean; next_page: number; has_prev: boolean; prev_page: number; profiles_by_recent_devices: ProfilesByRecentDevices[]; }; export type ProfilesByRecentDevices = { email: string; name: string; last_heartbeat_at: string; }; export type GetProfilesByRecentDevicesErrorResponse = ApiErrorResponse< GetProfileDevicesError >; export type GetProfilesByRecentDevicesError = Error; export type DisableDeviceResponse = ApiResponse; export type DisableDeviceErrorResponse = ApiErrorResponse; export type DisableDeviceError = Error; export type EnableDeviceResponse = ApiResponse; export type EnableDeviceErrorResponse = ApiErrorResponse; export type EnableDeviceError = Error; export type AdminDeviceRequest = { device_id: string; }; export type AdminDeviceResponse = { success: boolean; message: string; }; export type GetDeviceByMacAddressRequest = { mac_address: string; }; export type DeviceByMacAddressResponse = { device_id: string; device_name: string | null; mac_address: string | null; registration_status: string; published_at: string | null; registered_at: string | null; last_hearbeat_at: string | null; is_disabled: boolean; email: string | null; }; export type GetDeviceByMacAddressResponse = ApiResponse< DeviceByMacAddressResponse >; export type GetDeviceByMacAddressError = Error; export type GetDeviceByMacAddressErrorResponse = ApiErrorResponse< GetDeviceByMacAddressError >; export type UpdateAdminDeviceRequest = { alert_strategy: 'default' | 'force-off'; }; export type UpdateAdminDeviceResponse = { id: string; alert_strategy: 'default' | 'force-off'; created_at: string; updated_at: string; };