UNPKG

@lambdacurry/medusa-plugins-sdk

Version:
36 lines 1.13 kB
export class AdminProductReviewsResource { client; constructor(client) { this.client = client; } async list(query) { return this.client.fetch(`/admin/product-reviews`, { method: 'GET', query, }); } async updateStatus(productReviewId, status) { return this.client.fetch(`/admin/product-reviews/${productReviewId}/status`, { method: 'PUT', body: { status }, }); } async createResponse(productReviewId, data) { return this.client.fetch(`/admin/product-reviews/${productReviewId}/response`, { method: 'POST', body: data, }); } async updateResponse(productReviewId, data) { return this.client.fetch(`/admin/product-reviews/${productReviewId}/response`, { method: 'PUT', body: data, }); } async deleteResponse(productReviewId) { return this.client.fetch(`/admin/product-reviews/${productReviewId}/response`, { method: 'DELETE', }); } } //# sourceMappingURL=admin-product-reviews.js.map