trypost/tests/Feature/Api
Paulo Castellano eb2b345163
feat: Asset Library list, preview, and attach via API and MCP (#282)
* feat: list, preview, and attach Asset Library media via API and MCP

Let API and MCP clients reuse workspace assets instead of re-uploading, sharing the same scoped query, signed preview, and idempotent attach path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Align Asset Library API and MCP with main media patterns.

Drop the signed-preview stack, return Storage URLs and PostResource like existing attach flows, and query medias by morph owner instead of getMedia().

Co-authored-by: Cursor <cursoragent@cursor.com>

* Paginate workspace assets with the app default page size.

Keep list pagination in the action via config('app.pagination.default') instead of a hardcoded API page size.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Move asset API and MCP input rules into FormRequests.

Keep controllers and tools free of inline field validation; MCP tools reuse the request rule definitions.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Document asset MCP tools with explicit parameters and constraints.

Spell out workspace scope, return fields, sibling tools, and rejection cases so agents can call list/get/attach without guessing.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Harden asset attach against races and keep library metadata on the post.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Relock the library asset on attach so a deleted file cannot land on the post.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Document that omitting alt on attach keeps the library alt text.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 17:08:20 -03:00
..
ApiKeyApiTest.php Scope MCP OAuth tokens to user + workspace (#222) (#245) 2026-08-06 21:59:34 -03:00
AssetApiTest.php feat: Asset Library list, preview, and attach via API and MCP (#282) 2026-08-16 17:08:20 -03:00
DiscordChannelsApiTest.php Address PR review: stream MCP uploads and close listing gaps. 2026-07-24 22:00:07 -03:00
LabelApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
LoadWorkspaceFromTokenTest.php Scope MCP OAuth tokens to user + workspace (#222) (#245) 2026-08-06 21:59:34 -03:00
PinterestBoardsApiTest.php Clamp media byte caps to upload limits and surface truncated board lists. 2026-07-24 22:49:04 -03:00
PlatformApiTest.php Enforce carousel min slides in Generate and expose min_media_count on API/MCP. 2026-07-24 23:51:10 -03:00
PostApiPlatformMetaTest.php Add optional Pinterest pin title and destination link (#232) 2026-08-05 18:15:50 -03:00
PostApiTest.php fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00
PostMediaApiTest.php feat: Asset Library list, preview, and attach via API and MCP (#282) 2026-08-16 17:08:20 -03:00
SignatureApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
SocialAccountApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
UploadControllerTest.php fix: sanitize invalid UTF-8 bytes in uploaded filenames (#265) 2026-08-09 14:29:29 -03:00
WorkspaceApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00