/** * Connection types, errors, and events * Centralized type definitions for connection operations */ export declare const EVENT_CONNECTION_STATE_CHANGED = "EVENT_CONNECTION_STATE_CHANGED"; export type ConnectionEventType = typeof EVENT_CONNECTION_STATE_CHANGED; export type ConnectionState = 'connecting' | 'connected' | 'disconnected'; export interface ConnectionEventPayload { [EVENT_CONNECTION_STATE_CHANGED]: { address: string; state: ConnectionState; reason?: string; }; } /** * Connection error codes - matches native error codes */ export declare enum ConnectionErrorCode { BLUETOOTH_NOT_ENABLED = "BLUETOOTH_NOT_ENABLED", BLUETOOTH_NOT_SUPPORTED = "BLUETOOTH_NOT_SUPPORTED", DEVICE_NOT_FOUND = "DEVICE_NOT_FOUND", DEVICE_BUSY = "DEVICE_BUSY", CONNECTION_FAILED = "CONNECTION_FAILED", CONNECTION_LOST = "CONNECTION_LOST", WRITE_FAILED = "WRITE_FAILED", PERMISSION_DENIED = "PERMISSION_DENIED", TIMEOUT = "TIMEOUT", INVALID_ADDRESS = "INVALID_ADDRESS", UNSUPPORTED_DEVICE = "UNSUPPORTED_DEVICE", NETWORK_ERROR = "NETWORK_ERROR" } /** * Connection error class */ export declare class ConnectionError extends Error { code: ConnectionErrorCode; constructor(code: ConnectionErrorCode, message: string); /** * Helper to create error from native error object */ static fromNative(error: any): ConnectionError; } /** * Test connection result */ export interface TestConnectionResult { success: boolean; deviceName?: string; deviceType?: string; error?: { code: string; message: string; retryable?: boolean; suggestion?: string; }; } //# sourceMappingURL=types.d.ts.map