Skip to content

Commit

Permalink
Compat types with apps
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 14, 2023
1 parent 07514cb commit 6c069e5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions commerce/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ export interface AggregateRating {
reviewCount?: number;
/** The rating for the content. */
ratingValue?: number;
/** The highest value allowed in this rating system. */
bestRating?: number;
/** The lowest value allowed in this rating system. */
worstRating?: number;
/** A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using ClaimReview. */
ratingExplanation?: string;
}

export declare type ItemAvailability =
Expand Down Expand Up @@ -227,6 +233,10 @@ export interface AggregateOffer {

export interface Review extends Omit<Thing, "@type"> {
"@type": "Review";
/** Author of the */
author?: Author[];
/** The date that the review was published, in ISO 8601 date format.*/
datePublished?: string;
/** The item that is being reviewed/rated. */
itemReviewed?: string;
/** Indicates, in the context of a {@link https://schema.org/Review Review} (e.g. framed as 'pro' vs 'con' considerations), negative considerations - either as unstructured text, or a list. */
Expand All @@ -241,6 +251,14 @@ export interface Review extends Omit<Thing, "@type"> {
reviewRating?: AggregateRating;
}

export interface Author extends Omit<Thing, "@type"> {
"@type": "Person" | "Organization";
/** The name of the author. */
name?: string;
/** A link to a web page that uniquely identifies the author of the article. For example, the author's social media page, an about me page, or a bio page. */
url?: string;
}

// TODO: fix this hack and use Product directly where it appears
// Hack to prevent type self referencing and we end up with an infinite loop
// deno-lint-ignore no-empty-interface
Expand Down Expand Up @@ -399,6 +417,7 @@ export interface Seo {

export interface Search {
term: string;
href?: string;
}

export interface Suggestion {
Expand Down

0 comments on commit 6c069e5

Please sign in to comment.