/**
 * Dashboard Response Types
 * 
 * Type definitions for API dashboard responses to replace (data as any) assertions
 */

// CBDC & FX Dashboard
export interface CBDCFXDashboard {
  cbdc?: {
    schemas: Array<{
      id: string;
      scbId: string;
      type: string;
      status: string;
      walletSchema: string;
      features: string[];
    }>;
  };
  fx?: {
    routes: Array<{
      sourceSCB: string;
      targetSCB: string;
      preferredAsset: string;
      spread: number;
      fee: number;
      status: string;
    }>;
  };
}

// GAS & QPS Dashboard
export interface GASQPSDashboard {
  gas?: {
    metrics: Array<{
      assetType: string;
      currentLimit: number;
      used: number;
      available: number;
      status: string;
    }>;
  };
  qps?: {
    mappings: Array<{
      scbId: string;
      fiId: string;
      profile: string;
      status: string;
      validationLevel: string;
    }>;
  };
}

// GRU Dashboard
export interface GRUDashboard {
  monetary?: {
    classes: Array<{
      id: string;
      name: string;
      status: string;
      inCirculation: number;
      price: number;
      volatility: number;
    }>;
  };
  indexes?: Array<{
    id: string;
    name: string;
    weight: number;
    components: Array<{ asset: string; weight: number }>;
    price: number;
    change24h: number;
  }>;
  bonds?: Array<{
    id: string;
    name: string;
    status: string;
    totalIssued: number;
    yield: number;
    maturity: string;
  }>;
}

// Metaverse & Edge Dashboard
export interface MetaverseEdgeDashboard {
  metaverse?: {
    nodes: Array<{
      id: string;
      name: string;
      region: string;
      status: 'healthy' | 'degraded' | 'down';
      onRampEnabled: boolean;
      dailyLimit: number;
      kycRequired: boolean;
      connections: number;
    }>;
  };
  edge?: {
    nodes: Array<{
      id: string;
      region: string;
      gpuCount: number;
      load: number;
      priority: string;
      status: 'healthy' | 'degraded' | 'down';
    }>;
  };
}

// Risk & Compliance Dashboard
export interface RiskComplianceDashboard {
  risk?: {
    alerts: Array<{
      id: string;
      type: string;
      severity: string;
      description: string;
      timestamp: string;
      acknowledged: boolean;
      assignedTo?: string;
    }>;
  };
  omega?: {
    incidents: Array<{
      id: string;
      type: string;
      severity: string;
      description: string;
      timestamp: string;
      status: string;
    }>;
  };
}

// SCB Dashboard Types
export interface SCBOverviewDashboard {
  domesticNetwork?: {
    fiCount: number;
    activeFIs: number;
  };
  localGRUCBDC?: {
    cbdcInCirculation: {
      rCBDC: number;
    };
  };
}

export interface CorridorPolicyDashboard {
  corridors?: Array<{
    id: string;
    targetSCB: string;
    status: string;
    dailyCap: number;
    usedToday: number;
    preferredAsset: string;
    allowedAssets: string[];
  }>;
  fxPolicies?: Array<{
    id: string;
    pair: string;
    pegType: string;
    targetRate: number;
    tolerance: number;
    status: string;
  }>;
}

export interface FIManagementDashboard {
  fis?: Array<{
    id: string;
    name: string;
    bic: string;
    status: string;
    apiProfile: string;
    dailyLimit: number;
    usedToday: number;
    lastActivity?: string;
  }>;
  nostroVostro?: Array<{
    id: string;
    counterpartySCB: string;
    accountType: string;
    balance: number;
    limit?: number;
    currencyCode?: string;
    currency?: string;
    status: string;
  }>;
}
