"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const order_controller_1 = require("../controllers/order.controller");
const auth_middleware_1 = require("../middleware/auth.middleware");
const rbac_middleware_1 = require("../middleware/rbac.middleware");
const router = (0, express_1.Router)();
// Public / Customer Order Endpoints
router.post('/', auth_middleware_1.authenticateJWT, order_controller_1.createOrder);
router.get('/', auth_middleware_1.authenticateJWT, order_controller_1.getUserOrders);
// Admin Order Operations Endpoints
router.get('/admin/all', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), order_controller_1.getAllOrdersAdmin);
router.put('/:id/status', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), order_controller_1.updateOrderStatus);
router.get('/:id/shipping-label', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), order_controller_1.getShippingLabel);
router.get('/reports/analytics', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), order_controller_1.getOrderReports);
exports.default = router;
//# sourceMappingURL=order.routes.js.map