<!-- source-hash: d2e79259f53d9d688fe3d007c1eb382a -->
Shared type definitions for video processing functionality used across multiple entities (CustomerInterview, ProductRelease, and other video-enabled features).

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `VideoTeaser` | Interface | Short video clip for previews; tracks URL, thumbnail, visibility, and origin (`manual` \| `ai_generated`) |
| `Speaker` | Interface | Speaker identification metadata from transcription |
| `VideoClip` | Interface | AI-identified video segment with time range, confidence, and optional Twelve Labs ID |
| `TranscriptWord` | Interface | Word-level transcript entry with millisecond timestamps and speaker attribution |
| `SpeakerMapping` | Interface | Maps AssemblyAI speaker labels (e.g., `"A"`, `"B"`) to names and roles |
| `ExcludedRange` | Interface | Time range exclusion (e.g., incentive mentions) in seconds |
| `VideoProcessingFields` | Interface | Base fields shared across all video-enabled entities (transcript, highlight video, thumbnails, AI confidence scores) |
| `VideoProcessingEntityType` | Union Type | Supported entity types for agent processing pipelines |

## Usage Example

```typescript
import type {
  VideoProcessingFields,
  SpeakerMapping,
  VideoTeaser,
  VideoProcessingEntityType
} from './video-processing'

const speakerMapping: SpeakerMapping = {
  A: { name: 'Jane Smith', role: 'interviewer' },
  B: { name: 'John Doe',  role: 'interviewee', userId: 'usr_123' },
}

const videoFields: VideoProcessingFields = {
  main_video_url: 'https://cdn.example.com/interviews/abc.mp4',
  transcript: 'Full transcript text...',
  transcript_words_data: [
    { text: 'Hello', start: 0, end: 450, confidence: 0.98, speaker: 'A' },
  ],
  speaker_mapping: speakerMapping,
  ai_confidence_transcript: 0.95,
  ai_confidence_summary: 0.88,
}

const teaser: VideoTeaser = {
  url: 'https://cdn.example.com/teasers/clip1.mp4',
  title: 'Key insight on onboarding',
  published: true,
  source: 'ai_generated',
  created_at: new Date().toISOString(),
}

const entityType: VideoProcessingEntityType = 'customer_interview'
```

> **Note:** `VideoProcessingFields` is intended as a base — extend it per entity rather than using it directly. `published` on `VideoTeaser` defaults to `false`; an admin must explicitly set it to `true` for public visibility.