Application Load

IProductReview

The physical TypeScript declaration from the Nuxt starter, with linked types and field comments.

IProductReview

Product review, author, attachments and discussion state.

interfaces/orionplace/products/IProductFeedbackApi.ts
TypeScript
export interface IProductReview extends IProductFeedback {
  // Review or reply text.
  text: string;
  // Product rating from 1 to 5 stars. 0 for a reply, which does not rate, or
  // for an older review saved without stars.
  rating: number;
  // Author of the review or reply.
  user: IProductFeedbackUser;
  // Review state: `int` is `EProductFeedbackStatus.PENDING` (awaiting review),
  // `EProductFeedbackStatus.APROOVED` (approved) or
  // `EProductFeedbackStatus.DENIED` (rejected); `text` is its label.
  status: {
    // Review status code: `EProductFeedbackStatus.PENDING` (awaiting
    // moderation), `EProductFeedbackStatus.APROOVED` (approved) or
    // `EProductFeedbackStatus.DENIED` (rejected).
    int: EProductFeedbackStatus;
    // Review or reply text.
    text: string;
  };
  // Creation date and time.
  date_created: IApiDateTime;
  // Number of likes.
  total_c_likes: number;
  // Number of dislikes.
  total_c_dislikes: number;
  // A root review: approved replies in its whole discussion; a reply: its approved direct replies.
  // Number of approved replies. For the first review, all replies in its
  // discussion. For a reply, only replies directly to it.
  total_c_approved_replies: number;
  // Approved direct replies in this store group: the list reply_of_parent opens.
  // Approved direct replies in this store group: the number of items that
  // `filters.reply_of_parent` with this review ID returns. Show it on the
  // replies button; `total_c_approved_replies` of a root review counts its
  // whole discussion.
  total_c_approved_direct_replies?: number;
  // Number of all replies, including those awaiting review or rejected. This
  // can be greater than the length of `replies`. For the first review, all
  // replies in its discussion. For a reply, only replies directly to it.
  total_c_replies: number;
  // Up to five photos attached to this review.
  images: IProductFeedbackImage[];
  // Number of images attached to this review.
  c_images: number;
  // `true` — the customer liked the review; `false` — disliked it; `null` — has
  // not reacted. Absent for guests.
  user_like?: boolean | null;
  // `true` — the customer has replied directly to this review or reply; `false`
  // — has not. Includes a reply that is awaiting review or was rejected. Absent
  // for guests.
  my_reply_exist?: boolean;
  // Approved replies. Included automatically by `products_feedbacks_mine_get`,
  // or by `products_view_feedbacks_feedback_get` when `filters.id` is supplied.
  replies?: IProductReview[];
  // Discussion links: the first review ID and the direct parent ID. Both values
  // are `null` for a root review.
  reply_info: {
    // ID of the first review in the discussion; `null` for a root review.
    main_reply: number | null;
    // ID of the review or reply that this reply answers directly; `null` for a
    // root review.
    reply_to: number | null;
  };
  // Product data or `null`. Absent when `filters.reply_of_parent` is supplied.
  product?: IProduct | null;
}