| 1 | from helpers.api import ApiHandler, Input, Output, Request |
| 2 | from helpers import plugins |
| 3 | |
| 4 | class PluginsList(ApiHandler): |
| 5 | async def process(self, input: Input, request: Request) -> Output: |
| 6 | filter = input.get("filter", {}) |
| 7 | |
| 8 | custom = filter.get("custom", False) |
| 9 | builtin = filter.get("builtin", False) |
| 10 | |
| 11 | plugin_list = plugins.get_enhanced_plugins_list(custom=custom, builtin=builtin) |
| 12 | |
| 13 | return {"ok": True, "plugins": [p.model_dump(mode="json") for p in plugin_list]} |