ProductReviewModule
Product reviews on commercetools' own reviews: the approved ones and how their ratings spread on a product, and writing one from a delivered order line.
import { ProductReviewModule } from "@evolve-framework/commercetools";Serves the Product review part of the GraphQL API: productReviewCreate, productReviewPhotoUpload.
new ProductReviewModule(options?: ProductReviewModuleOptions)| Option | Type | Description |
|---|---|---|
customTypeKey? | string | The review type with |
photos? | AttachmentStore | Where buyers upload a review's photos, such as |
rejectedStateKey? | string | The state a moderator moves a refused review to. Defaults to |
AttachmentStore3The fields of photos.
| Field | Type | Description |
|---|---|---|
contentTypes | string[] | The content types it accepts, such as |
createUpload | (request: { filename: string; contentType: string; customerId: string; }) => Promise<{ attachmentId: string; uploadUrl: string; expiresAt: string; }> | |
read | (attachmentId: string, customerId: string) => Promise<StoredAttachment | undefined> | Undefined when the id is unknown, was never uploaded, or is not the customer's. |
Extends AbstractModule<CommercetoolsLoaderContext>.

