Files
gomag-vending/api/.env.example
Claude Agent b69b5e7104 feat(sync): add GoMag API client with Phase 0 auto-download
- New gomag_client.py service: async httpx client that downloads orders
  from GoMag API with full pagination and 1s rate-limit sleep
- config.py: add GOMAG_API_KEY, GOMAG_API_SHOP, GOMAG_ORDER_DAYS_BACK,
  GOMAG_LIMIT, GOMAG_API_URL settings
- sync_service.py: Phase 0 downloads fresh orders before reading JSONs;
  graceful skip if API keys not configured
- start.sh: auto-detect INSTANTCLIENTPATH from .env, fallback to thin mode
- .env.example: document GoMag API variables

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 23:03:39 +00:00

87 lines
2.9 KiB
Plaintext

# =============================================================================
# GoMag Import Manager - Configurare
# Copiaza in api/.env si completeaza cu datele reale
# =============================================================================
# =============================================================================
# ORACLE MODE - Alege una din urmatoarele doua optiuni:
# =============================================================================
# THICK MODE (Oracle 10g/11g/12.1+) - Recomandat pentru compatibilitate maxima
# Necesita Oracle Instant Client instalat
INSTANTCLIENTPATH=/opt/oracle/instantclient_21_15
# THIN MODE (Oracle 12.1+ only) - Fara Instant Client, mai simplu
# Comenteaza INSTANTCLIENTPATH de sus si decommenteaza urmatoarea linie:
# FORCE_THIN_MODE=true
# =============================================================================
# ORACLE - Credentiale baza de date
# =============================================================================
ORACLE_USER=USER_ORACLE
ORACLE_PASSWORD=parola_oracle
ORACLE_DSN=TNS_ALIAS
# Calea absoluta la directorul cu tnsnames.ora
# De obicei: directorul api/ al proiectului
TNS_ADMIN=/cale/absoluta/la/gomag/api
# =============================================================================
# APLICATIE
# =============================================================================
APP_PORT=5003
LOG_LEVEL=INFO
# =============================================================================
# CALE FISIERE
# Relative: JSON_OUTPUT_DIR la project root, SQLITE_DB_PATH la api/
# Se pot folosi si cai absolute
# =============================================================================
# JSON-uri comenzi GoMag
JSON_OUTPUT_DIR=output
# SQLite tracking DB
SQLITE_DB_PATH=data/import.db
# =============================================================================
# ROA - Setari import comenzi (din vfp/settings.ini sectiunea [ROA])
# =============================================================================
# Politica de pret
ID_POL=39
# Gestiune implicita
ID_GESTIUNE=0
# Sectie implicita
ID_SECTIE=6
# =============================================================================
# GoMag API
# =============================================================================
GOMAG_API_KEY=your_api_key_here
GOMAG_API_SHOP=https://yourstore.gomag.ro
GOMAG_ORDER_DAYS_BACK=7
GOMAG_LIMIT=100
# =============================================================================
# SMTP - Notificari email (optional)
# =============================================================================
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# SMTP_USER=email@exemplu.com
# SMTP_PASSWORD=parola_app
# SMTP_TO=destinatar@exemplu.com
# =============================================================================
# AUTH - HTTP Basic Auth pentru dashboard (optional)
# =============================================================================
# API_USERNAME=admin
# API_PASSWORD=parola_sigura