/** * Generate schema.org structured data for an `Article` or `WebPage` with a * `SpeakableSpecification`. * * The `speakable` input may be an array of XPaths/CSS selectors or an * object with `xpath`/`cssSelector` arrays. The helper will produce a * `SpeakableSpecification` and attach it to the chosen page type. * * See `SpeakableOptions` for full details. * @returns A JSON-LD compatible Article/WebPage object with `speakable` * specification when provided. */ type SpeakableInput = string[] | { xpath?: string[]; cssSelector?: string[]; }; type PageType = 'Article' | 'WebPage'; interface PersonRef { name: string; url?: string; } interface PublisherRef { name: string; url?: string; logo?: { url: string; width?: number; height?: number; }; } interface RatingItem { ratingValue: number | string; bestRating?: number | string; worstRating?: number | string; } interface ReviewItem { author?: string | PersonRef; datePublished?: string; reviewBody?: string; reviewRating?: RatingItem; } interface AggregateRatingOptions { ratingValue: number | string; reviewCount?: number; ratingCount?: number; bestRating?: number | string; worstRating?: number | string; } interface SpeakableOptions { type?: PageType; headline?: string; name?: string; description?: string; url?: string; author?: string | PersonRef; publisher?: PublisherRef; speakable?: SpeakableInput; reviews?: ReviewItem[]; aggregateRating?: AggregateRatingOptions; keywords?: string[]; } declare const generateSpeakableSchema: ({ type, headline, name, description, url, author, publisher, speakable, reviews, aggregateRating, keywords, }: SpeakableOptions) => any; export { generateSpeakableSchema as default, generateSpeakableSchema };