@echo off
REM API Testing Script for TrueTrucker

echo ==========================================
echo TrueTrucker API & UI Testing Script
echo ==========================================
echo.

echo TEST 1: Get Packages List
echo Command: GET /api/packages
powershell -Command "$response = (Invoke-WebRequest -Uri 'http://127.0.0.1:8000/api/packages' -Method GET); Write-Host 'Status:' $response.StatusCode; Write-Host 'Response:'; $response.Content | ConvertFrom-Json | ConvertTo-Json"
echo.

echo TEST 2: Register New User
echo Command: POST /api/auth/register
set "JSON={\"name\":\"Test Driver\",\"email\":\"testdriver123@example.com\",\"password\":\"TestPassword123\",\"password_confirmation\":\"TestPassword123\",\"role\":\"owner\"}"
powershell -Command "$body = '{\"name\":\"Test Driver\",\"email\":\"testdriver123@example.com\",\"password\":\"TestPassword123\",\"password_confirmation\":\"TestPassword123\",\"role\":\"owner\"}'; $response = (Invoke-WebRequest -Uri 'http://127.0.0.1:8000/api/auth/register' -Method POST -Headers @{'Content-Type'='application/json'} -Body $body); Write-Host 'Status:' $response.StatusCode; $data = $response.Content | ConvertFrom-Json; Write-Host 'User:' $data.data.user.name; Write-Host 'Email:' $data.data.user.email; Write-Host 'Token:' $data.data.token"
echo.

pause
