export interface StreamConnectionOptions {
  url: string;
  options?: {
    username?: string;
    password?: string;
    clientId?: string;
    keepalive?: number;
    clean?: boolean;
    reconnectPeriod?: number;
    connectTimeout?: number;
  };
}

export interface TopicSubscription<T = any> {
  topic: string;
  qos?: 0 | 1 | 2;
  dataType?: T; // For type inference
}

export interface StreamState {
  isConnected: boolean;
  isConnecting: boolean;
  error: Error | null;
  subscriptions: Map<string, TopicSubscription>;
  lastMessages: Map<string, any>;
}
