export type HealthResponse = {
  status: string;
  service: string;
  version: string;
  database?: string;
};

export type ChannelInfo = {
  channel: string;
  status: string;
  providers: string[];
};

export type CapabilitiesRawResponse = {
  service: string;
  version: string;
  channels: ChannelInfo[];
  features: string[];
  independent?: boolean;
  requires_other_modules?: boolean;
  registered_provider_kinds?: string[];
  contact_source_types?: string[];
};

export type NormalizedCapabilities = CapabilitiesRawResponse & {
  features: Record<string, boolean>;
  commercial_product: string;
  phase: string;
};

export type MetricsResponse = {
  service: string;
  version: string;
  features: Record<string, boolean> | string[];
};

export type MonitoringStats = {
  messages_by_status: Record<string, number>;
  queue_by_status: Record<string, number>;
  providers: Record<string, unknown>[];
  rate_limit_deferrals?: number;
  checked_at?: string;
};

export type MonitoringMetrics = MonitoringStats & {
  tenant_id?: string;
  provider_delivery?: Record<string, unknown>[];
};

export type FeatureLockConfig = {
  feature: string;
  title: string;
  description: string;
  phase?: string;
  icon?: string;
};

export type CommunicationListParams = Record<string, string | number | boolean | undefined | null>;
