<?php

use Illuminate\Support\Facades\Route;
use App\Modules\Integration\Controllers\ProductSyncController;
use App\Modules\Integration\Controllers\OrderSyncController;
use App\Modules\Integration\Controllers\VendingOrderSyncController;
use App\Modules\Integration\Controllers\InventorySyncController;

Route::prefix('api/v1/integration')
    ->middleware(['api', 'throttle:integration', 'integration.tenant', 'auth:sanctum'])
    ->group(function () {
        Route::post('products/upsert', [ProductSyncController::class, 'upsert']);
        Route::post('orders', [OrderSyncController::class, 'store']);
        Route::post('vending/orders', [VendingOrderSyncController::class, 'store']);
        Route::get('inventory/{warehouse_code}', [InventorySyncController::class, 'show']);
    });
