mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
feat(trigger): enhance trigger subscription management and processing
- 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>
This commit is contained in:
@ -143,12 +143,19 @@ class Subscription(BaseModel):
|
||||
Contains all information needed to manage the subscription lifecycle.
|
||||
"""
|
||||
|
||||
expire_at: int = Field(
|
||||
expires_at: int = Field(
|
||||
..., description="The timestamp when the subscription will expire, this for refresh the subscription"
|
||||
)
|
||||
|
||||
metadata: dict[str, Any] = Field(
|
||||
..., description="Metadata about the subscription in the external service, defined in subscription_schema"
|
||||
endpoint: str = Field(..., description="The webhook endpoint URL allocated by Dify for receiving events")
|
||||
|
||||
parameters: dict[str, Any] | None = Field(
|
||||
default=None,
|
||||
description="""The parameters of the subscription, this is the creation parameters.
|
||||
Only available when creating a new subscription by credentials(auto subscription), not manual subscription""",
|
||||
)
|
||||
properties: dict[str, Any] = Field(
|
||||
..., description="Subscription data containing all properties and provider-specific information"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user