feat(api): add AI text-to-deck generation, wallet deposit structure, and profile/notification endpoints
Fills the gaps between the admin panel screens and the backend: a full free-text + slide-count + language -> AI-generated presentation flow with new slide-cloning logic in TemplateFillService, a "my presentations" list endpoint, a swappable payment-gateway structure for wallet top-ups (fake driver for now), and avatar upload / public-profile toggle / account deletion / password change / notification preference endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Http\Controllers\Api\ProfileController;
|
||||
use App\Http\Controllers\Api\TemplateController;
|
||||
use App\Http\Controllers\Api\TemplateGenerationController;
|
||||
use App\Http\Controllers\Api\WalletController;
|
||||
use App\Http\Controllers\Api\WalletDepositController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::prefix('auth')->group(function (): void {
|
||||
@@ -22,24 +23,33 @@ Route::prefix('templates')->group(function (): void {
|
||||
|
||||
Route::middleware('auth:sanctum')->group(function (): void {
|
||||
Route::post('{template:slug}/generate', [TemplateGenerationController::class, 'store']);
|
||||
Route::post('{template:slug}/generate-from-text', [TemplateGenerationController::class, 'storeFromText']);
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('wallet/deposits/{deposit}/callback', [WalletDepositController::class, 'callback'])->name('api.wallet.deposits.callback');
|
||||
|
||||
Route::middleware('auth:sanctum')->group(function (): void {
|
||||
Route::get('profile', [ProfileController::class, 'show']);
|
||||
Route::put('profile', [ProfileController::class, 'update']);
|
||||
Route::put('profile/password', [ProfileController::class, 'changePassword']);
|
||||
Route::delete('profile', [ProfileController::class, 'destroy']);
|
||||
|
||||
Route::prefix('wallet')->group(function (): void {
|
||||
Route::get('/', [WalletController::class, 'show']);
|
||||
Route::get('transactions', [WalletController::class, 'transactions']);
|
||||
Route::post('deposits', [WalletDepositController::class, 'store']);
|
||||
});
|
||||
|
||||
Route::prefix('notifications')->group(function (): void {
|
||||
Route::get('/', [NotificationController::class, 'index']);
|
||||
Route::post('read-all', [NotificationController::class, 'markAllAsRead']);
|
||||
Route::get('preferences', [NotificationController::class, 'preferences']);
|
||||
Route::put('preferences', [NotificationController::class, 'updatePreferences']);
|
||||
});
|
||||
|
||||
Route::prefix('generations')->group(function (): void {
|
||||
Route::get('/', [TemplateGenerationController::class, 'index']);
|
||||
Route::get('{generation:uuid}', [TemplateGenerationController::class, 'show']);
|
||||
Route::get('{generation:uuid}/download', [TemplateGenerationController::class, 'download'])->name('api.generations.download');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user