<!-- source-hash: 110781f95cc87ef6269255e1ff54d089 -->
Brief description: Defines TypeScript types and interfaces for the Customer Interview content module, covering the full lifecycle from creation and AI processing to publishing and analytics within the Flamingo/OpenFrame platform.

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `CustomerInterview` | Interface | Core entity representing a recorded customer interview with all fields including video, AI processing state, SEO, and relations |
| `CustomerInterviewConfig` | Interface | Per-interview configuration options (highlight video duration, subtitle burning) |
| `CreateCustomerInterviewData` | Interface | Input shape for creating a new interview record |
| `UpdateCustomerInterviewData` | Type alias | Partial version of `CreateCustomerInterviewData` for patch updates |
| `CustomerInterviewFilters` | Interface | Query filter options for listing interviews (platform, industry, search, pagination) |
| `CustomerInterviewListResponse` | Interface | Paginated response wrapper for interview list queries |
| Re-exports | Types | `VideoTeaser`, `Speaker`, `VideoClip`, `TranscriptWord`, `SpeakerMapping`, `ExcludedRange` from `./video-processing` for backwards compatibility |

## Usage Example

```typescript
import type {
  CustomerInterview,
  CreateCustomerInterviewData,
  CustomerInterviewFilters,
  CustomerInterviewListResponse
} from './customer-interview'

// Creating a new interview
const payload: CreateCustomerInterviewData = {
  title: 'How Acme IT Scaled Support with Flamingo',
  slug: 'acme-it-flamingo-interview',
  status: 'draft',
  author_id: 'user-uuid-123',
  platforms: ['platform-uuid-abc'],
  user_id: 'customer-uuid-456',
  main_video_url: 'https://cdn.example.com/interviews/acme.mp4',
  config: {
    highlight_target_duration_seconds: 120,
    skipSubtitleBurning: false
  },
  custom_instructions: 'Focus on ROI and ticket volume reduction metrics.'
}

// Filtering interviews for a listing page
const filters: CustomerInterviewFilters = {
  platform: 'all',
  status: 'completed',
  search: 'managed services',
  limit: 12,
  offset: 0
}

// Consuming a list response
async function fetchInterviews(
  filters: CustomerInterviewFilters
): Promise<CustomerInterviewListResponse> {
  const response = await api.get('/interviews', { params: filters })
  return response.data
}

// Checking AI processing state
function isReadyToPublish(interview: CustomerInterview): boolean {
  return (
    interview.ai_transcript_status === 'completed' &&
    interview.ai_summary_status === 'completed' &&
    interview.status === 'draft'
  )
}
```

## Notes

- AI processing fields (`ai_transcript_status`, `ai_summary_status`, `ai_clips_status`) follow a `pending → processing → completed | failed` lifecycle driven by **AssemblyAI** (transcription) and **TwelveLabs** (video understanding).
- `speaker_mapping` maps AssemblyAI speaker labels (e.g. `"A"`, `"B"`) to real `UserProfile` identities resolved during transcription.
- `incentive_excluded_ranges` stores timestamp ranges where promotional/incentive language was detected and should be excluded from highlight clip generation.
- Relations (`user`, `msp`, `author`, `case_study`, `platforms`) are populated only when explicitly joined — treat them as optional at the call site.