mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 06:07:33 +08:00
- Refactor trigger provider classes to improve naming consistency and clarity - Introduce new methods for managing trigger subscriptions, including validation and dispatching - Update API endpoints to reflect changes in subscription handling - Implement logging and request management for endpoint interactions - Enhance data models to support subscription attributes and lifecycle management Co-authored-by: Claude <noreply@anthropic.com>
27 lines
736 B
Python
27 lines
736 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,
|
|
"triggered_by": fields.String,
|
|
"created_at": fields.DateTime(dt_format="iso8601"),
|
|
}
|