feat(trigger): add supported creation methods to TriggerProviderApiEntity

- Introduced a new field `supported_creation_methods` in `TriggerProviderApiEntity` to specify the available methods for creating triggers, including OAUTH, APIKEY, and MANUAL.
- Updated the `PluginTriggerProviderController` to populate this field based on the entity's schemas, enhancing the API's clarity and usability.

These changes improve the flexibility and configurability of trigger providers within the application.
This commit is contained in:
Harry
2025-09-15 17:01:29 +08:00
parent 6857bb4406
commit c78bd492af
3 changed files with 20 additions and 0 deletions

View File

@ -282,6 +282,10 @@ class TriggerInputs(BaseModel):
"""Convert to dict (alias for model_dump)."""
return self.model_dump()
class TriggerCreationMethod(StrEnum):
OAUTH = "OAUTH"
APIKEY = "APIKEY"
MANUAL = "MANUAL"
# Export all entities
__all__ = [
@ -289,6 +293,7 @@ __all__ = [
"RequestLog",
"Subscription",
"SubscriptionBuilder",
"TriggerCreationMethod",
"TriggerDescription",
"TriggerEntity",
"TriggerEventData",