Application Load

IProductFeedbackEditResponse

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

IProductFeedbackEditResponse

Moderation state and the saved review; an edited review goes through moderation again.

src/lib/interfaces/orionplace/products/IProductFeedbackApi.ts
TypeScript
export interface IProductFeedbackEditResponse {
  // Field and general errors.
  form_errors: Record<string, ApiFormError[]> | null;
  // Success message or null.
  success_message: string | null;
  // The response contains the moderation `state` and a `feedback` array with
  // the saved review. Every edit returns the review to the store’s default
  // moderation status, usually pending.
  page_data: {
    // Moderation state of the saved review: `int` is
    // `EProductFeedbackStatus.PENDING`, `EProductFeedbackStatus.APROOVED` or
    // `EProductFeedbackStatus.DENIED`; `text` is its label. New and edited
    // reviews get the store’s default status, usually pending.
    state: {
      // Review status code: `EProductFeedbackStatus.PENDING` (awaiting
      // moderation), `EProductFeedbackStatus.APROOVED` (approved) or
      // `EProductFeedbackStatus.DENIED` (rejected).
      int: EProductFeedbackStatus;
      // Translated label of the review status.
      text: string;
    };
    // Array containing the saved review, in the same format as the review list.
    feedback: IProductReview[];
  } | null;
}