<!-- source-hash: 5421df27f5f23a658e7a9769d35c1b32 -->
Brief description of the file's purpose in 1-2 sentences.

Defines the shared TypeScript wire types for the onboarding guide feature, covering the full row shape returned by `/api/onboarding-guides` and the chat onboarding-guide card. These types are intentionally client-safe — DAL mutations stay hub-side.

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `OnboardingGuide` | `interface` | Full row shape: identity, ordering, body content, video pipeline, images, SEO, workflow, and audit fields |
| `OnboardingGuideFilters` | `interface` | Query parameters for list endpoints (`status`, `search`, `section`, `platform`, pagination, `ids`) |
| `OnboardingGuideListResponse` | `interface` | Paginated list response wrapping `OnboardingGuide[]` with a total `count` |
| `OnboardingGuideSectionSummary` | `interface` | Lightweight section rollup: name, ordering, and guide count |

## Usage Example

```typescript
import type {
  OnboardingGuide,
  OnboardingGuideFilters,
  OnboardingGuideListResponse,
} from './onboarding-guide';

// Fetch guides for a specific platform section
async function fetchGuides(
  filters: OnboardingGuideFilters
): Promise<OnboardingGuideListResponse> {
  const params = new URLSearchParams({
    ...(filters.status && { status: filters.status }),
    ...(filters.platform && { platform: filters.platform }),
    ...(filters.section && { section: filters.section }),
    limit: String(filters.limit ?? 20),
    offset: String(filters.offset ?? 0),
  });

  const res = await fetch(`/api/onboarding-guides?${params}`);
  return res.json() as Promise<OnboardingGuideListResponse>;
}

// Resolve video source (Mux/MP4 preferred, YouTube as fallback)
function resolveVideoUrl(guide: OnboardingGuide): string | null {
  return guide.main_video_url ?? guide.youtube_url ?? null;
}
```

## Notes

- **Video pipeline**: `main_video_url` (Mux/MP4) and `youtube_url` are independent columns — consumers should use whichever is populated, matching the `<VideoSourceSelector>` admin toggle.
- **Multi-platform**: `onboarding_guide_platforms` is a junction array; a single guide can be featured across multiple platforms with independent `featured_order` values.
- **Ordering**: Use `section_order` + `step_order` together for deterministic sort within a section.