Application Load

IProductFeedbackCreateResponse

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

IProductFeedbackCreateResponse

The response contains the moderation state and a feedback array containing the saved review. Creation also returns its id separately.

app/interfaces/orionplace/products/IProductFeedbackApi.ts
TypeScript
export interface IProductFeedbackCreateResponse {
  // 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
  // containing the saved review. Creation also returns its `id` separately.
  page_data: {
    // New review ID.
    id: number;
    // 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;
}