/**
 * Consent SDK Types — API request/response shapes
 */

import type { ConsentCategory, ConsentState } from './core';
import type { ConsentUIConfig, TCFConfig } from './config';
import type { ConsentVendor } from './vendor';

// =============================================================================
// API Types
// =============================================================================

/**
 * API-Antwort fuer Consent-Erstellung
 */
export interface ConsentAPIResponse {
  consentId: string;
  timestamp: string;
  expiresAt: string;
  version: string;
}

/**
 * API-Antwort fuer Site-Konfiguration
 */
export interface SiteConfigResponse {
  siteId: string;
  siteName: string;
  categories: CategoryConfig[];
  ui: ConsentUIConfig;
  legal: LegalConfig;
  tcf?: TCFConfig;
}

/**
 * Kategorie-Konfiguration vom Server
 */
export interface CategoryConfig {
  id: ConsentCategory;
  name: Record<string, string>;
  description: Record<string, string>;
  required: boolean;
  vendors: ConsentVendor[];
}

/**
 * Rechtliche Konfiguration
 */
export interface LegalConfig {
  privacyPolicyUrl: string;
  imprintUrl: string;
  dpo?: {
    name: string;
    email: string;
  };
}
