mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-08 23:06:03 +00:00
feat: Add webhook push functionality for bot message events (#1768)
* Initial plan * Backend: Add webhook persistence model, service, API endpoints and message push functionality Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Frontend: Rename API Keys to API Integration, add webhook management UI with tabs Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * Fix frontend linting issues and formatting Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * chore: perf ui in api integration dialog * perf: webhook data pack structure --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> Co-authored-by: Junyan Qin <rockchinq@gmail.com>
This commit is contained in:
22
pkg/entity/persistence/webhook.py
Normal file
22
pkg/entity/persistence/webhook.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import sqlalchemy
|
||||
|
||||
from .base import Base
|
||||
|
||||
|
||||
class Webhook(Base):
|
||||
"""Webhook for pushing bot events to external systems"""
|
||||
|
||||
__tablename__ = 'webhooks'
|
||||
|
||||
id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True)
|
||||
name = sqlalchemy.Column(sqlalchemy.String(255), nullable=False)
|
||||
url = sqlalchemy.Column(sqlalchemy.String(1024), nullable=False)
|
||||
description = sqlalchemy.Column(sqlalchemy.String(512), nullable=True, default='')
|
||||
enabled = sqlalchemy.Column(sqlalchemy.Boolean, nullable=False, default=True)
|
||||
created_at = sqlalchemy.Column(sqlalchemy.DateTime, nullable=False, server_default=sqlalchemy.func.now())
|
||||
updated_at = sqlalchemy.Column(
|
||||
sqlalchemy.DateTime,
|
||||
nullable=False,
|
||||
server_default=sqlalchemy.func.now(),
|
||||
onupdate=sqlalchemy.func.now(),
|
||||
)
|
||||
Reference in New Issue
Block a user