middleware('throttle:10,1') ->name('chatbot.register'); Route::post('/chatbot/send', [ChatbotApiController::class, 'sendMessage']) ->middleware('throttle:30,1') ->name('chatbot.send'); Route::post('/chatbot/end', [ChatbotApiController::class, 'endConversation']) ->middleware('throttle:10,1') ->name('chatbot.end'); Route::post('/chatbot/rate', [ChatbotApiController::class, 'rateConversation']) ->middleware('throttle:5,1') ->name('chatbot.rate'); Route::get('/chatbot/status', [ChatbotApiController::class, 'getStatus']) ->middleware('throttle:60,1') ->name('chatbot.status'); /* |-------------------------------------------------------------------------- | Chatbot Module - Admin Routes |-------------------------------------------------------------------------- */ Route::middleware(['auth', 'verified'])->prefix('admin')->name('admin.')->group(function () { // Chatbot management (permission: chatbot) Route::middleware('permission:chatbot')->group(function () { Route::get('/chatbot', [ChatbotController::class, 'index'])->name('chatbot.index'); Route::get('/chatbot/criar', [ChatbotController::class, 'create'])->name('chatbot.create'); Route::post('/chatbot', [ChatbotController::class, 'store'])->name('chatbot.store'); Route::get('/chatbot/{chatbot_knowledge}/editar', [ChatbotController::class, 'edit'])->name('chatbot.edit'); Route::put('/chatbot/{chatbot_knowledge}', [ChatbotController::class, 'update'])->name('chatbot.update'); Route::delete('/chatbot/{chatbot_knowledge}', [ChatbotController::class, 'destroy'])->name('chatbot.destroy'); // Chatbot conversations (contacts) Route::get('/chatbot/conversas', [ChatbotController::class, 'conversations'])->name('chatbot.conversations'); Route::get('/chatbot/conversas/{conversation}', [ChatbotController::class, 'showConversation'])->name('chatbot.conversation.show'); Route::delete('/chatbot/conversas/{conversation}', [ChatbotController::class, 'destroyConversation'])->name('chatbot.conversation.destroy'); // Chatbot settings Route::get('/chatbot/configuracoes', [ChatbotController::class, 'settings'])->name('chatbot.settings'); Route::post('/chatbot/configuracoes', [ChatbotController::class, 'updateSettings'])->name('chatbot.settings.update'); // Chatbot AI rules (configurable behavior rules) Route::get('/chatbot/regras', [ChatbotController::class, 'rulesIndex'])->name('chatbot.rules.index'); Route::get('/chatbot/regras/criar', [ChatbotController::class, 'rulesCreate'])->name('chatbot.rules.create'); Route::post('/chatbot/regras', [ChatbotController::class, 'rulesStore'])->name('chatbot.rules.store'); Route::get('/chatbot/regras/{rule}/editar', [ChatbotController::class, 'rulesEdit'])->name('chatbot.rules.edit'); Route::put('/chatbot/regras/{rule}', [ChatbotController::class, 'rulesUpdate'])->name('chatbot.rules.update'); Route::delete('/chatbot/regras/{rule}', [ChatbotController::class, 'rulesDestroy'])->name('chatbot.rules.destroy'); }); });