# PowerShell script to run vendor-report API locally with environment variables

# Set SharePoint Configuration
$env:SHAREPOINT_ENABLED = "true"
$env:SHAREPOINT_SITE_URL = "https://automationstandard.sharepoint.com/sites/2429ODF_AMZ_MTN6_25K"
$env:SHAREPOINT_FOLDER_PATH = "/Documents/General/Amazon Punchlist [EXTERNAL]"
$env:SHAREPOINT_CLIENT_ID = "5e00db88-ff96-4070-8270-e6c9ea9282f0"
$env:SHAREPOINT_CLIENT_SECRET = "tYY8Q~e6hrzNA5EsTcUtDfZ4q3vT-c134r7nkaM8"
$env:SHAREPOINT_USE_APP_AUTH = "true"

# Set API Configuration
$env:API_ENABLED = "true"
$env:API_PORT = "8080"
$env:API_HOST = "0.0.0.0"

# Set Report Configuration
$env:REPORT_OUTPUT_DIR = "output"
$env:REPORT_REPORTS_DIR = "reports"

Write-Host "Starting vendor-report API with SharePoint configuration..." -ForegroundColor Green
Write-Host "SharePoint Site: $env:SHAREPOINT_SITE_URL" -ForegroundColor Cyan
Write-Host "Folder Path: $env:SHAREPOINT_FOLDER_PATH" -ForegroundColor Cyan
Write-Host "API will run on: http://localhost:8080" -ForegroundColor Cyan
Write-Host ""

# Run the API
python api_server.py

