Application Load

IProductFeedbackPreloadResponse

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

IProductFeedbackPreloadResponse

page_data is your review. Someone else’s review returns the error “Feedback was not found.”

interfaces/orionplace/products/IProductFeedbackApi.ts
TypeScript
export interface IProductFeedbackPreloadResponse {
  // Field and general errors.
  form_errors: Record<string, ApiFormError[]> | null;
  // Success message or null.
  success_message: string | null;
  // `page_data` is your review. Someone else’s review returns the error
  // “Feedback was not found.”
  page_data: {
    // The owned review ID.
    id: number;
    // Saved review text.
    text: string;
    // Saved rating from 1 to 5. 0 for a reply, or for an older review saved
    // without stars: editing it then needs 1–5 stars.
    rating: number;
    // Moderation state: `int` is `EProductFeedbackStatus.PENDING`,
    // `EProductFeedbackStatus.APROOVED` or `EProductFeedbackStatus.DENIED`;
    // `text` is its label.
    status: {
      // Review status code: `EProductFeedbackStatus.PENDING` (awaiting
      // moderation), `EProductFeedbackStatus.APROOVED` (approved) or
      // `EProductFeedbackStatus.DENIED` (rejected).
      int: EProductFeedbackStatus;
      // Saved review text.
      text: string;
    };
    // Whether any direct reply exists, including non-approved replies. This is
    // broader than the edit form’s approved-reply restriction.
    got_reply: boolean;
    // True for a reply: replies have no rating (0) and no stars to choose.
    // `true` for a reply: it has no rating, and `products_feedbacks_edit` saves
    // it with 0 whatever `rating` says. `false` for a review, which needs 1–5
    // stars.
    is_reply?: boolean;
    // Up to five existing images, each with `id` and `image` URL.
    images: IProductFeedbackImage[];
  } | null;
}