Skip to content

Conversation

@Boy132
Copy link
Member

@Boy132 Boy132 commented Jan 28, 2026

No description provided.

@Boy132 Boy132 requested a review from lancepioch January 28, 2026 09:14
@Boy132 Boy132 self-assigned this Jan 28, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

A new plugin management API is introduced with a controller providing six endpoints (index, view, import, install, update, uninstall). Support includes typed request classes for validation, a transformer for response formatting, model constants for resource identification, and route registration under the /api/application/plugins path.

Changes

Cohort / File(s) Summary
Plugin API Controller
app/Http/Controllers/Api/Application/Plugins/PluginController.php
Implements plugin management endpoints: index lists plugins with filtering/sorting/pagination, view displays single plugin, import validates and downloads from file (201 response), install validates non-installed status, update checks available updates, uninstall validates installed status. All delegate to PluginService and return transformed responses.
Plugin Request Classes
app/Http/Requests/Api/Application/Plugins/ReadPluginRequest.php, WritePluginRequest.php, UninstallPluginRequest.php
Defines typed request classes extending ApplicationApiRequest with resource binding and permission enforcement (READ/WRITE); UninstallPluginRequest adds delete boolean validation.
Plugin Transformer
app/Transformers/Api/Application/PluginTransformer.php
Transforms Plugin model to JSON:API response format with direct field mappings, comma-separated panel transformation, JSON-decoded composer packages, and metadata (status, status_message, load_order).
Model Constants
app/Models/Plugin.php, app/Models/ApiKey.php
Adds RESOURCE_NAME constant ('plugin') to Plugin model; includes Plugin::RESOURCE_NAME in ApiKey::DEFAULT_RESOURCE_NAMES for permission recognition.
API Routes
routes/api-application.php
Registers new /api/application/plugins route group with six endpoints: GET /index, GET /{plugin}/view, POST /import, POST /{plugin}/install, POST /{plugin}/update, POST /{plugin}/uninstall.

Possibly related PRs

  • Plugin system #1866: Adds PluginController and request/transformer classes that directly depend on Plugin model and PluginService introduced in this PR.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, making it impossible to assess relevance to the changeset. Add a meaningful description explaining the purpose and scope of the plugin API implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add basic api for plugins' directly describes the main change: introducing a new plugin API with multiple endpoints and supporting request/transformer classes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants