/** * Generate schema.org structured data for `VideoObject`, `Clip`, or * `BroadcastEvent`. * * The `VideoOptions` input controls which type is produced and supports * optional fields like `aggregateRating`, `reviews`, thumbnails and * associated `Clip` or `BroadcastEvent` metadata. The result is a plain * object ready to be stringified as JSON-LD for inclusion in a page. * * See `VideoOptions` below for accepted fields and shapes. * @returns A JSON-LD compatible Video/Clip/BroadcastEvent object */ interface ImageRef { url: string; width?: number; height?: number; } interface PersonRef { name: string; url?: string; } interface OrgRef { name: string; url?: string; } interface RatingItem { ratingValue: number | string; bestRating?: number | string; worstRating?: number | string; } interface ReviewItem { author?: string | PersonRef; datePublished?: string; reviewBody?: string; reviewRating?: RatingItem; } interface ClipOptions { name?: string; startOffset?: number; endOffset?: number; url?: string; } interface BroadcastEventOptions { name?: string; startDate?: string; endDate?: string; isLiveBroadcast?: boolean; url?: string; } interface AggregateRatingOptions { ratingValue: number | string; reviewCount?: number; ratingCount?: number; bestRating?: number | string; worstRating?: number | string; } interface VideoOptions { type?: 'VideoObject' | 'Clip' | 'BroadcastEvent'; name: string; description?: string; thumbnail?: string | ImageRef | (string | ImageRef)[]; uploadDate?: string; duration?: string; contentUrl?: string; embedUrl?: string; clip?: ClipOptions; broadcastEvent?: BroadcastEventOptions; publisher?: string | OrgRef; author?: string | PersonRef; reviews?: ReviewItem[]; aggregateRating?: AggregateRatingOptions; } declare const generateVideoSchema: ({ type, name, description, thumbnail, uploadDate, duration, contentUrl, embedUrl, clip, broadcastEvent, publisher, author, reviews, aggregateRating, }: VideoOptions) => any; export { generateVideoSchema as default, generateVideoSchema };