Commit Graph

11 Commits

Author SHA1 Message Date
Jedrzej Kosinski
357b48982f Align local asset/tag endpoints with cloud API
Phase 2.1/2.4: Add include_public param to GET /api/assets and GET /api/tags
Phase 2.3: Update PUT /api/assets/{id} with mime_type and preview_id fields, remove separate preview endpoint
Phase 2.2: Add JSON URL upload schema (returns 501 - deferred)
Phase 1.3: Add GET /api/assets/tags/refine endpoint for tag histogram
Phase 1.1/1.2: Add stub endpoints for remote-metadata and download (501)
Phase 4: Add comprehensive tests for all schema changes

Amp-Thread-ID: https://ampcode.com/threads/T-019befd9-1a77-70eb-808d-c83aa0c26515
Co-authored-by: Amp <amp@ampcode.com>
2026-01-24 04:38:29 -08:00
Jedrzej Kosinski
63f9f1b11b Finish @ROUTES.delete(f"/api/assets/{{id:{UUID_RE}}}/tags") 2026-01-16 00:50:13 -08:00
Jedrzej Kosinski
9e3f559189 Finished @ROUTES.post(f"/api/assets/{{id:{UUID_RE}}}/tags") 2026-01-16 00:45:36 -08:00
Jedrzej Kosinski
63c98d0c75 Finished @ROUTES.delete(f"/api/assets/{{id:{UUID_RE}}}") 2026-01-16 00:31:06 -08:00
Jedrzej Kosinski
e69a5aa1be Finished @ROUTES.put(f"/api/assets/{{id:{UUID_RE}}}/preview") 2026-01-16 00:14:03 -08:00
Jedrzej Kosinski
e0c063f93e Finished @ROUTES.put(f"/api/assets/{{id:{UUID_RE}}}") 2026-01-15 23:57:23 -08:00
Jedrzej Kosinski
6db4f4e3f1 Finished @ROUTES.post("/api/assets") 2026-01-15 23:41:19 -08:00
Jedrzej Kosinski
41d364030b Finished @ROUTES.post("/api/assets/from-hash") 2026-01-15 23:09:54 -08:00
Jedrzej Kosinski
e527b72b09 more progress 2026-01-15 18:16:00 -08:00
Jedrzej Kosinski
f14129947c in progress GET /api/assets/{uuid}/content endpoint support 2026-01-14 22:54:21 -08:00
Jedrzej Kosinski
1dc3da6314 Add most basic Asset support for models (#11315)
* Brought over minimal elements from PR 10045 to reproduce seed_assets and register_assets_system without adding anything to the DB or server routes yet, for now making everything sync (can introduce async once everything is cleaned up and brought over)

* Added db script to insert assets stuff, cleaned up some code; assets (models) now get added/rescanned

* Added support for 5 http endpoints for assets

* Replaced Optional with | None in schemas_in.py and schemas_out.py

* Remove two routes that will not be relevant yet in this PR: HEAD /api/assets/hash/<hash> and PUT /api/assets/<id>/preview

* Remove some functions the two deleted endpoints were using

* Don't show assets scan message upon calling /object_info endpoint

* removed unsued import to satisfy ruff

* Simplified hashing function tpye hint and _hash_file_obj

* Satisfied ruff
2026-01-08 22:21:51 -05:00