// ============================================================================
// ANYMAILFINDER TYPES
// Browser-safe type definitions for the Anymailfinder email finder API (v5.1)
// ============================================================================

// ---------------------------------------------------------------------------
// findCompanyEmail - POST /find-email/company
// ---------------------------------------------------------------------------

export interface FindCompanyEmailParams {
  domain: string
  company_name?: string
  email_type?: 'personal' | 'generic' | 'all'
}

export interface FindCompanyEmailResult {
  email_status: 'valid' | 'risky' | 'not_found' | 'blacklisted'
  emails: string[]
  valid_emails: string[]
  [key: string]: unknown
}

// ---------------------------------------------------------------------------
// findPersonEmail - POST /find-email/person
// ---------------------------------------------------------------------------

export interface FindPersonEmailParams {
  domain: string
  company_name?: string
  full_name?: string
  first_name?: string
  last_name?: string
}

export interface FindPersonEmailResult {
  email: string
  email_status: 'valid' | 'risky' | 'not_found' | 'blacklisted'
  valid_email: string
  [key: string]: unknown
}

// ---------------------------------------------------------------------------
// findDecisionMakerEmail - POST /find-email/decision-maker
// ---------------------------------------------------------------------------

export interface FindDecisionMakerEmailParams {
  domain?: string
  company_name?: string
  decision_maker_category: string[]
}

export interface FindDecisionMakerEmailResult {
  email: string
  email_status: 'valid' | 'risky' | 'not_found' | 'blacklisted'
  valid_email: string
  person_full_name: string
  person_job_title: string
  person_linkedin_url: string
  decision_maker_category: string
  [key: string]: unknown
}

// ---------------------------------------------------------------------------
// verifyEmail - POST /verify-email
// ---------------------------------------------------------------------------

export interface VerifyEmailParams {
  email: string
}

export interface VerifyEmailResult {
  email_status: 'valid' | 'risky' | 'not_found' | 'blacklisted'
  [key: string]: unknown
}
