modified: .env
new file: __debug_bin.exe modified: bot.db modified: db/db.go modified: go.mod new file: handlers/auth.go modified: handlers/dashboard.go new file: handlers/saas.go modified: handlers/webhook.go modified: main.go new file: saas_bot.db modified: services/openrouter.go new file: services/types.go modified: services/whatsapp.go new file: static/style.css modified: templates/dashboard.html new file: templates/landing.html new file: templates/login.html new file: templates/register.html deleted: types/types.go
This commit is contained in:
27
services/types.go
Normal file
27
services/types.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package services
|
||||
|
||||
// Message: Usado para el historial del chat (OpenRouter) y dashboard
|
||||
type Message struct {
|
||||
Role string `json:"role"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
// WebhookPayload: Usado para leer el JSON que envía WhatsApp
|
||||
type WebhookPayload struct {
|
||||
Entry []struct {
|
||||
Changes []struct {
|
||||
Value struct {
|
||||
Metadata struct {
|
||||
PhoneNumberID string `json:"phone_number_id"`
|
||||
} `json:"metadata"`
|
||||
Messages []struct {
|
||||
From string `json:"from"`
|
||||
Text struct {
|
||||
Body string `json:"body"`
|
||||
} `json:"text"`
|
||||
Type string `json:"type"`
|
||||
} `json:"messages"`
|
||||
} `json:"value"`
|
||||
} `json:"changes"`
|
||||
} `json:"entry"`
|
||||
}
|
||||
Reference in New Issue
Block a user