Bold VideoDocs

Types

TypeScript type reference for the Bold SDK

Complete TypeScript type definitions for the Bold SDK.

Client Types

ClientOptions

interface ClientOptions {
  baseURL?: string;
  debug?: boolean;
  headers?: Record<string, string>;
}

Video Types

Video

interface Video {
  id: string;
  playbackId: string;
  title: string;
  description?: string;
  duration: number;
  status: string;
  publishedAt: string;
  createdAt: string;
  updatedAt: string;
  captions?: VideoSubtitles[];
  chapters?: Chapter[];
  attachments?: VideoAttachment[];
  transcript?: VideoTranscript;
  downloadUrls?: VideoDownloadUrls;
  metadata?: VideoMetadata;
}

VideoAttachment

interface VideoAttachment {
  id: string;
  title: string;
  fileUrl: string;
  size: number;
  type: string;
}

VideoDownloadUrls

interface VideoDownloadUrls {
  mp4?: string;
  audio?: string;
  legacyMp4?: string;
}

VideoSubtitles

interface VideoSubtitles {
  language: string;
  engine: string;
  url: string;
}

VideoTranscript

interface VideoTranscript {
  text: string;
  json: TranscriptSegment[];
}

VideoMetadata

interface VideoMetadata {
  title?: string;
  description?: string;
  image?: string;
}

Playlist Types

Playlist

interface Playlist {
  id: string;
  title: string;
  description?: string;
  videos: Video[];
  createdAt: string;
  updatedAt: string;
}

AI Types

ChatOptions

interface ChatOptions {
  prompt: string;
  stream?: boolean;
  videoId?: string;
  currentTime?: number;
  conversationId?: string;
  collectionId?: string;
  tags?: string[];
}

SearchOptions

interface SearchOptions {
  prompt: string;
  stream?: boolean;
  limit?: number;
  collectionId?: string;
  videoId?: string;
  tags?: string[];
  context?: ConversationMessage[];
}

RecommendationsOptions

interface RecommendationsOptions {
  topics: string[];
  stream?: boolean;
  limit?: number;
  collectionId?: string;
  tags?: string[];
  includeGuidance?: boolean;
  context?: ConversationMessage[];
}

AIResponse

Non-streaming response from AI methods.

interface AIResponse {
  text: string;
  sources?: Segment[];
  usage?: AIUsage;
}

AIUsage

Token usage statistics.

interface AIUsage {
  inputTokens: number;
  outputTokens: number;
}

AIEvent

Union type for all streaming events.

type AIEvent =
  | { type: 'message_start'; conversationId: string }
  | { type: 'text_delta'; text: string }
  | { type: 'sources'; sources: Segment[] }
  | { type: 'recommendations'; recommendations: Recommendation[] }
  | { type: 'message_complete'; usage: AIUsage }
  | { type: 'error'; error: string };

Segment

Video segment used as a source/citation.

interface Segment {
  videoId: string;
  videoTitle: string;
  start: number;
  end: number;
  text: string;
  speaker?: string;
}

Recommendation

Topic-based video recommendation.

interface Recommendation {
  topic: string;
  videos: RecommendationVideo[];
}

RecommendationVideo

interface RecommendationVideo {
  id: string;
  title: string;
  description?: string;
  duration: number;
  score: number;
}

Conversation Types

Conversation

interface Conversation {
  id: string;
  messages: ConversationMessage[];
  metadata: ConversationMetadata;
}

ConversationMessage

interface ConversationMessage {
  role: 'user' | 'assistant';
  content: string;
  sources?: Segment[];
}

ConversationMetadata

interface ConversationMetadata {
  query: string;
  status: string;
}

Settings Types

Settings

interface Settings {
  account: Account;
  portal: Portal;
  metadata: VideoMetadata;
  theme: ThemeConfig;
  featuredPlaylists: Playlist[];
}

Account

interface Account {
  ai: AccountAI;
  persona: Persona;
}

AccountAI

interface AccountAI {
  name?: string;
  greeting?: string;
  avatar?: string;
}

Persona

interface Persona {
  enabled: boolean;
  conversationStarters?: string[];
}

Portal

interface Portal {
  display: PortalDisplay;
  layout: PortalLayout;
  navigation: PortalNavigation;
  theme: PortalTheme;
  hero: PortalHero;
  redirects?: CustomRedirect[];
}

ThemeConfig

interface ThemeConfig {
  radius: number;
  colors: ThemeColors;
}

ThemeColors

interface ThemeColors {
  light: ColorPalette;
  dark: ColorPalette;
}

On this page