feat: create Bruno requests for library system API

- Add library management requests (CRUD operations)
- Create media items API requests for library content
- Implement library visibility controls
- Add user library access management
- Update deprecated ebook folder endpoints with migration guide
- Include comprehensive documentation and test cases
- Replace collection.bru with proper dashboard request

Complete Bruno collection supporting new multi-library architecture
This commit is contained in:
2026-01-28 11:15:36 -05:00
parent 84d846ae6c
commit 81fa177fe6
14 changed files with 285 additions and 48 deletions
+16 -22
View File
@@ -22,35 +22,29 @@ settings {
}
docs {
## Add Ebook Folder
## Add Ebook Folder - DEPRECATED
Adds a new ebook folder for the authenticated user.
⚠️ **This endpoint is deprecated and will return HTTP 410 Gone.**
**Method:** POST
**Use new library system instead:**
1. Create a library: `POST /api/libraries` with type "ebooks"
2. Add folder to library: `POST /api/libraries/{id}/folders`
3. Manage library visibility: `POST /api/libraries/visibility`
**Endpoint:** /api/auth/ebook-folders
**Migration Example:**
Old: POST `/api/auth/ebook-folders` with `{ "folder_path": "/path/to/books" }`
New: POST `/api/libraries` with `{ "name": "My Books", "type": "ebooks" }`
Then POST `/api/libraries/{library-id}/folders` with `{ "folder_path": "/path/to/books" }`
**Authentication:** Required (Admin only)
**Request Body:** JSON object with:
- `folder_path` (string, required): Path to the ebook folder
**Response:** Folder object with:
- `id` (string): Folder ID (UUID)
- `user_id` (string): User ID (UUID)
- `folder_path` (string): Normalized folder path
- `created_at` (string): Creation timestamp (ISO 8601)
**Response:** HTTP 410 Gone with deprecation message
**Status Codes:**
- 201: Folder created successfully
- 400: Bad request (invalid folder path)
- 410: Gone (endpoint deprecated)
- 401: Unauthorized
- 403: Forbidden (admin access required)
- 500: Internal server error
**Features:**
- Admin-only endpoint for adding ebook folders
- Path normalization for consistent storage
- Supports both absolute paths and home directory (~) paths
- Prevents duplicate folders for the same user
**Replacement Endpoints:**
- `POST /api/libraries` - Create new library
- `POST /api/libraries/{id}/folders` - Add folder to library
- `GET /api/libraries` - List all libraries (admin)
}