package api import ( "github.com/gofiber/fiber/v2" "github.com/sentinela-go/internal/api/handlers" "github.com/sentinela-go/internal/db" ) func RegisterRoutes(app *fiber.App, database *db.DB) { h := handlers.New(database) app.Get("/health", h.Health) app.Get("/pricing", h.PricingPage) v1 := app.Group("/api/v1") // Plans endpoints (accessible to all) v1.Get("/plans", h.ListPlans) v1.Get("/plans/usage", h.PlanUsage) v1.Post("/plans/register", h.RegisterPlan) // Companies v1.Get("/companies", h.ListCompanies) v1.Get("/companies/search", h.SearchCompanies) v1.Get("/companies/:id", h.GetCompany) v1.Get("/companies/:id/filings", h.CompanyFilings) // Filings v1.Get("/filings", h.ListFilings) v1.Get("/filings/search", h.SearchFilings) v1.Get("/filings/recent", h.RecentFilings) v1.Get("/filings/:id", h.GetFiling) // Market v1.Get("/market/selic", h.ListSelic) v1.Get("/market/selic/current", h.CurrentSelic) v1.Get("/market/cdi", h.ListCDI) v1.Get("/market/cdi/current", h.CurrentCDI) v1.Get("/market/ipca", h.ListIPCA) v1.Get("/market/ipca/current", h.CurrentIPCA) v1.Get("/market/fx", h.ListFX) v1.Get("/market/fx/current", h.CurrentFX) v1.Get("/market/overview", h.MarketOverview) // Search v1.Get("/search", h.GlobalSearch) }