Files
BBQ f376a2abe3 fix(channel): add wechatoa webhook delivery and proxy config (#356)
Unify webhook handling across channel adapters and add the WeChat Official Account channel so inbound routing and replies work without platform-specific handlers. Add adapter-scoped proxy support and stable config field ordering so restricted network environments can deliver WeChat and Telegram messages reliably.
2026-04-10 21:26:11 +08:00

30 lines
901 B
Go

package channel
// FieldType enumerates the supported configuration field types.
type FieldType string
const (
FieldString FieldType = "string"
FieldSecret FieldType = "secret"
FieldBool FieldType = "bool"
FieldNumber FieldType = "number"
FieldEnum FieldType = "enum"
)
// FieldSchema describes a single configuration field.
type FieldSchema struct {
Type FieldType `json:"type"`
Required bool `json:"required"`
Order int `json:"order,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Enum []string `json:"enum,omitempty"`
Example any `json:"example,omitempty"`
}
// ConfigSchema describes the structure of a channel or user-binding configuration.
type ConfigSchema struct {
Version int `json:"version"`
Fields map[string]FieldSchema `json:"fields"`
}