<!-- source-hash: a31da27a1da7444bbcbd4a8716703941 -->
Defines the Unified Program System's TypeScript type hierarchy, providing base interfaces, database row types, program-specific extensions, configuration objects, and pure transform utilities for events, podcasts, and webinars across a single set of generic components.

## Key Components

| Export | Kind | Description |
|--------|------|-------------|
| `ProgramHost` | Interface | Host/speaker info (name, avatar, role, etc.) |
| `LumaEventRow` / `PodcastEpisodeRow` / `WebinarRow` | Interfaces | Raw DB row shapes for each program source table |
| `BaseProgramItem` | Interface | Shared contract all program items must satisfy |
| `EventItem` / `PodcastItem` / `WebinarItem` | Interfaces | Extended shapes with program-specific fields |
| `ProgramType` | Type | `'event' \| 'podcast' \| 'webinar'` discriminant |
| `ProgramConfig<T>` | Interface | Configuration object that drives generic component behavior (labels, routing, icons, sort order) |
| `ProgramLabels` | Interface | Display strings (singular, plural, archive, empty, etc.) |
| `ProgramListResponse<T>` / `ProgramItemResponse<T>` | Interfaces | Generic API response wrappers |
| `ProgramFilter` / `AdminProgramFilter` | Interfaces | Query/filter option shapes |
| `transformEventToProgram` | Function | Maps `LumaEventRow` → `EventItem` |
| `transformPodcastToProgram` | Function | Maps `PodcastEpisodeRow` → `PodcastItem` |
| `transformWebinarToProgram` | Function | Maps `WebinarRow` → `WebinarItem` |

## Usage Example

```typescript
import type {
  ProgramConfig,
  EventItem,
  ProgramLabels,
} from './program-types';
import { transformEventToProgram } from './program-types';
import { CalendarDays } from 'lucide-react';

// Define a typed config for events
const eventConfig: ProgramConfig<EventItem> = {
  type: 'event',
  table: 'luma_events',
  apiEndpoint: '/api/events',
  dateField: 'start_at',
  detailRoute: '/events',
  externalLinkLabel: 'View on Luma',
  icon: <CalendarDays />,
  sortOrder: 'asc',
  labels: {
    singular: 'Event',
    plural: 'Events',
    upcoming: 'Next Event',
    upcomingSection: 'Upcoming Events',
    archive: 'Past Events',
    empty: 'No events yet',
  },
};

// Transform a raw DB row into a typed EventItem
const row = await db.from('luma_events').select('*').single();
const eventItem: EventItem = transformEventToProgram(row);
```

> `BaseProgramItem` is the generic constraint used throughout — any new program type only needs to extend it and supply a matching `ProgramConfig` to plug into all shared components automatically.