models

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Webhook

type Webhook struct {
	ID        int            `db:"id" json:"id"`
	CreatedAt time.Time      `db:"created_at" json:"created_at"`
	UpdatedAt time.Time      `db:"updated_at" json:"updated_at"`
	Name      string         `db:"name" json:"name"`
	URL       string         `db:"url" json:"url"`
	Events    pq.StringArray `db:"events" json:"events"`
	Secret    string         `db:"secret" json:"secret"`
	IsActive  bool           `db:"is_active" json:"is_active"`
}

Webhook represents a webhook configuration

type WebhookEvent

type WebhookEvent string

WebhookEvent represents an event that can trigger a webhook

const (
	// Conversation events
	EventConversationCreated       WebhookEvent = "conversation.created"
	EventConversationStatusChanged WebhookEvent = "conversation.status_changed"
	EventConversationTagsChanged   WebhookEvent = "conversation.tags_changed"
	EventConversationAssigned      WebhookEvent = "conversation.assigned"
	EventConversationUnassigned    WebhookEvent = "conversation.unassigned"

	// Message events
	EventMessageCreated WebhookEvent = "message.created"
	EventMessageUpdated WebhookEvent = "message.updated"

	// Test event
	EventWebhookTest WebhookEvent = "webhook.test"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL