"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const productTypeController_js_1 = require("../controllers/productTypeController.js");
const authMiddleware_js_1 = require("../middleware/authMiddleware.js");
const validateRequest_js_1 = require("../middleware/validateRequest.js");
const asyncHandler_js_1 = require("../utils/asyncHandler.js");
const productTypeValidators_js_1 = require("../validators/productTypeValidators.js");
const router = (0, express_1.Router)();
router.use(authMiddleware_js_1.requireStaff);
router.get("/", (0, validateRequest_js_1.validateQuery)(productTypeValidators_js_1.productTypeListQuerySchema), (0, asyncHandler_js_1.asyncHandler)(productTypeController_js_1.listAdminProductTypes));
router.post("/", (0, validateRequest_js_1.validateBody)(productTypeValidators_js_1.createProductTypeSchema), (0, asyncHandler_js_1.asyncHandler)(productTypeController_js_1.createAdminProductType));
router.get("/:id", (0, validateRequest_js_1.validateParams)(productTypeValidators_js_1.productTypeIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(productTypeController_js_1.getAdminProductTypeById));
router.patch("/:id", (0, validateRequest_js_1.validateParams)(productTypeValidators_js_1.productTypeIdParamSchema), (0, validateRequest_js_1.validateBody)(productTypeValidators_js_1.updateProductTypeSchema), (0, asyncHandler_js_1.asyncHandler)(productTypeController_js_1.updateAdminProductType));
router.delete("/:id", (0, validateRequest_js_1.validateParams)(productTypeValidators_js_1.productTypeIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(productTypeController_js_1.deleteAdminProductType));
exports.default = router;
//# sourceMappingURL=adminProductTypeRoutes.js.map