refactor(trigger): rename trigger references to event for consistency

- Updated variable names and types from 'trigger' to 'event' across multiple files to enhance clarity and maintain consistency in the codebase.
- Adjusted related data structures and API responses to reflect the new naming convention.
- Improved type annotations and error handling in the workflow trigger run API and associated services.
This commit is contained in:
Harry
2025-10-09 03:12:35 +08:00
parent a33d04d1ac
commit 91318d3d04
22 changed files with 114 additions and 96 deletions

View File

@ -13,7 +13,7 @@ class PluginTriggerData(BaseNodeData):
desc: Optional[str] = None
plugin_id: str = Field(..., description="Plugin ID")
provider_id: str = Field(..., description="Provider ID")
trigger_name: str = Field(..., description="Trigger name")
event_name: str = Field(..., description="Event name")
subscription_id: str = Field(..., description="Subscription ID")
plugin_unique_identifier: str = Field(..., description="Plugin unique identifier")
parameters: dict[str, Any] = Field(default_factory=dict, description="Trigger parameters")

View File

@ -43,7 +43,7 @@ class TriggerPluginNode(Node):
"config": {
"plugin_id": "",
"provider_id": "",
"trigger_name": "",
"event_name": "",
"subscription_id": "",
"parameters": {},
},
@ -67,7 +67,7 @@ class TriggerPluginNode(Node):
WorkflowNodeExecutionMetadataKey.TRIGGER_INFO: {
**trigger_inputs,
"provider_id": self._node_data.provider_id,
"trigger_name": self._node_data.trigger_name,
"event_name": self._node_data.event_name,
"plugin_unique_identifier": self._node_data.plugin_unique_identifier,
},
}