mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 06:07:33 +08:00
- Remove triggered_by field from WorkflowWebhookTrigger model - Replace manual webhook creation/deletion APIs with automatic sync via WebhookService - Keep only GET API for retrieving webhook information - Use same webhook ID for both debug and production environments (differentiated by endpoint) - Add sync_webhook_relationships to automatically manage webhook lifecycle - Update tests to remove triggered_by references - Clean up unused imports and fix type checking issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
701 B
Python
26 lines
701 B
Python
from flask_restx import fields
|
|
|
|
trigger_fields = {
|
|
"id": fields.String,
|
|
"trigger_type": fields.String,
|
|
"title": fields.String,
|
|
"node_id": fields.String,
|
|
"provider_name": fields.String,
|
|
"icon": fields.String,
|
|
"status": fields.String,
|
|
"created_at": fields.DateTime(dt_format="iso8601"),
|
|
"updated_at": fields.DateTime(dt_format="iso8601"),
|
|
}
|
|
|
|
triggers_list_fields = {"data": fields.List(fields.Nested(trigger_fields))}
|
|
|
|
|
|
webhook_trigger_fields = {
|
|
"id": fields.String,
|
|
"webhook_id": fields.String,
|
|
"webhook_url": fields.String,
|
|
"webhook_debug_url": fields.String,
|
|
"node_id": fields.String,
|
|
"created_at": fields.DateTime(dt_format="iso8601"),
|
|
}
|