UNPKG

@lambdacurry/medusa-plugins-sdk

Version:
40 lines 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AdminProductReviewsResource = void 0; 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', }); } } exports.AdminProductReviewsResource = AdminProductReviewsResource; //# sourceMappingURL=admin-product-reviews.js.map