refactor(bruno): reorganize file structure from bruno-yaml to flat bruno directory

- Move all files from bruno-yaml/* to bruno/*
- Maintains existing directory structure within categories
- Updates bruno/user/auth files with OAuth2 refresh token flow
- Updates bruno/user/profile files for user profile management
- Adds bruno/dashboard/ directory with dashboard API tests
- Preserves all existing test scenarios and OpenCollection YAML format
- No functional changes - file reorganization only
This commit is contained in:
2026-02-17 20:22:21 -05:00
parent 96730d9475
commit f859b2714d
221 changed files with 0 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
info:
name: Add Library Folder
type: http
seq: 1
http:
method: POST
url: '{{base_url}}/api/libraries/{{library_id}}/folders'
auth: inherit
body:
type: json
jsonBody: "{\n \"folder_path\": {{library_folder"
headers:
- key: Content-Type
value: application/json
docs: |-
## Add Library Folder
Adds a new folder path to a library for media scanning and indexing.
**Method:** POST
**Endpoint:** /api/libraries/{id
+52
View File
@@ -0,0 +1,52 @@
info:
name: Create Library
type: http
seq: 1
http:
method: POST
url: '{{base_url}}/api/libraries'
auth: inherit
body:
type: json
jsonBody: "{\n \"name\": \"My Ebook Library\",\n \"description\": \"A collection\
\ of technical books and novels\",\n \"type\": \"ebooks\""
headers:
- key: Content-Type
value: application/json
docs: |-
## Create Library
Creates a new library for organizing media items.
**Method:** POST
**Endpoint:** /api/libraries
**Authentication:** Required (Bearer token)
**Request Body:**
- `name` (string, required): Library name
- `description` (string, optional): Library description
- `type` (string, required): Library type
- `"ebooks"`: Electronic books
- `"audiobooks"`: Audio books
- `"videos"`: Video content
- `"other"`: Other media types
**Response:** Library object
- `id` (string): Library UUID
- `name` (string): Library name
- `description` (string, optional): Library description
- `type` (string): Library type
- `is_visible` (boolean): Library visibility status
- `created_at` (string): Creation timestamp
- `updated_at` (string): Last update timestamp
**Status Codes:**
- 201: Library created successfully
- 400: Invalid request data
- 401: Unauthorized
- 403: Forbidden (insufficient permissions)
- 409: Library name already exists
- 500: Internal server error
+29
View File
@@ -0,0 +1,29 @@
info:
name: Delete Library Folder
type: http
seq: 4
http:
method: DELETE
url: '{{base_url}}/api/libraries/{{library_id}}/folders'
auth: inherit
body:
type: json
json:
folder_path: /path/to/folder
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_delete_library_folder_success(status, headers, body) {\n if (status\
\ !== 204) {\n throw new Error(\"Expected status 204, got \" + status);"
docs: |-
## Delete Library Folder
Removes a folder from a library's scanning configuration.
**Method:** DELETE
**Endpoint:** /api/libraries/{id
+27
View File
@@ -0,0 +1,27 @@
info:
name: Delete Library
type: http
seq: 3
http:
method: DELETE
url: '{{base_url}}/api/libraries/{{library_id}}'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_delete_library_success(status, headers, body) {\n if (status !==\
\ 204) {\n throw new Error(\"Expected status 204, got \" + status);"
docs: |-
## Delete Library
Deletes a library and all associated media items.
**Method:** DELETE
**Endpoint:** /api/libraries/{id
+41
View File
@@ -0,0 +1,41 @@
info:
name: Get Libraries (Admin)
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/libraries'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
docs: |-
## Get Libraries (Admin)
Retrieves all libraries in the system (admin access required).
**Method:** GET
**Endpoint:** /api/libraries
**Authentication:** Required (Bearer token, admin permissions)
**Response:** Array of library objects
- `id` (string): Library UUID
- `name` (string): Library name
- `description` (string, optional): Library description
- `type` (string): Library type (ebooks, audiobooks, videos, other)
- `is_visible` (boolean): Library visibility to users
- `media_count` (number): Number of media items in library
- `folder_count` (number): Number of folders associated
- `created_at` (string): Creation timestamp
- `updated_at` (string): Last update timestamp
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 403: Forbidden (admin access required)
- 500: Internal server error
+22
View File
@@ -0,0 +1,22 @@
info:
name: Get Library Folders
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/libraries/{{library_id}}/folders'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
docs: |-
## Get Library Folders
Retrieves all folders associated with a specific library.
**Method:** GET
**Endpoint:** /api/libraries/{id
+27
View File
@@ -0,0 +1,27 @@
info:
name: Get Library Stats
type: http
seq: 5
http:
method: GET
url: '{{base_url}}/api/libraries/{{library_id}}/stats'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_get_library_stats_success(status, headers, body) {\n if (status\
\ !== 200) {\n throw new Error(\"Expected status 200, got \" + status);"
docs: |-
## Get Library Stats
Retrieves statistical information about a library's media items.
**Method:** GET
**Endpoint:** /api/libraries/{id
+34
View File
@@ -0,0 +1,34 @@
info:
name: Get Library Types
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/libraries/types'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
docs: |-
## Get Library Types
Retrieves all available library types that can be used when creating libraries.
**Method:** GET
**Endpoint:** /api/libraries/types
**Authentication:** Required (Bearer token)
**Response:** Array of library type objects
- `id` (string): Type identifier (e.g., "ebooks", "audiobooks", "videos", "other")
- `name` (string): Display name for the type (e.g., "Ebooks", "Audiobooks", "Videos", "Other")
- `description` (string, optional): Description of what this type is used for
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 500: Internal server error
+27
View File
@@ -0,0 +1,27 @@
info:
name: Get Library
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/libraries/{{library_id}}'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_get_library_success(status, headers, body) {\n if (status !== 200)\
\ {\n throw new Error(\"Expected status 200, got \" + status);"
docs: |-
## Get Library
Retrieves detailed information about a specific library by ID.
**Method:** GET
**Endpoint:** /api/libraries/{id
+37
View File
@@ -0,0 +1,37 @@
info:
name: Get Scan Settings
type: http
seq: 2
http:
method: GET
url: '{{base_url}}/api/library/scan-settings'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
docs: |-
## Get Scan Settings
Retrieves the user's current library scanning settings.
**Method:** GET
**Endpoint:** /api/library/scan-settings
**Authentication:** Required (Bearer token)
**Response:**
- `scan_frequency_minutes` (number): Minutes between automatic scans (minimum 1)
- `auto_scan_enabled` (boolean): Whether automatic scanning is enabled
- `last_scan_at` (string, optional): Timestamp of last scan
- `next_scan_at` (string, optional): Timestamp of next scheduled scan
- `library_id` (string, optional): Library ID for context
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 403: Forbidden (access denied)
- 500: Internal server error
@@ -0,0 +1,38 @@
info:
name: Get User Visible Libraries
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/libraries/visible'
auth: inherit
body:
type: none
headers:
- key: Content-Type
value: application/json
docs: |-
## Get User Visible Libraries
Retrieves all libraries that are visible to regular users.
**Method:** GET
**Endpoint:** /api/libraries/visible
**Authentication:** Required (Bearer token)
**Response:** Array of visible library objects
- `id` (string): Library UUID
- `name` (string): Library name
- `description` (string, optional): Library description
- `type` (string): Library type (ebooks, audiobooks, videos, other)
- `is_visible` (boolean): Always true for this endpoint
- `media_count` (number): Number of media items in library
- `created_at` (string): Creation timestamp
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 500: Internal server error
+44
View File
@@ -0,0 +1,44 @@
info:
name: Set Library Visibility
type: http
seq: 1
http:
method: POST
url: '{{base_url}}/api/libraries/visibility'
auth: inherit
body:
type: json
jsonBody: "{\n \"library_id\": \"{{library_id"
headers:
- key: Content-Type
value: application/json
docs: |-
## Set Library Visibility
Updates the visibility status of a library for regular users.
**Method:** POST
**Endpoint:** /api/libraries/visibility
**Authentication:** Required (Bearer token, admin permissions)
**Request Body:**
- `library_id` (string, required): Library UUID
- `is_visible` (boolean, required): Visibility status
- `true`: Library visible to all users
- `false`: Library hidden from regular users
**Response:** Updated library visibility object
- `library_id` (string): Library UUID
- `is_visible` (boolean): Updated visibility status
- `updated_at` (string): Update timestamp
**Status Codes:**
- 200: Visibility updated successfully
- 400: Invalid request data
- 401: Unauthorized
- 403: Forbidden (admin access required)
- 404: Library not found
- 500: Internal server error
+30
View File
@@ -0,0 +1,30 @@
info:
name: Update Library
type: http
seq: 2
http:
method: PUT
url: '{{base_url}}/api/libraries/{{library_id}}'
auth: inherit
body:
type: json
json:
name: Updated Library Name
description: Updated library description
headers:
- key: Content-Type
value: application/json
runtime:
scripts:
- type: tests
code: "test_update_library_success(status, headers, body) {\n if (status !==\
\ 200) {\n throw new Error(\"Expected status 200, got \" + status);"
docs: |-
## Update Library
Updates an existing library's information.
**Method:** PUT
**Endpoint:** /api/libraries/{id
+38
View File
@@ -0,0 +1,38 @@
info:
name: Update Scan Settings
type: http
seq: 1
http:
method: PUT
url: '{{base_url}}/api/library/scan-settings'
auth: inherit
body:
type: json
jsonBody: "{\n \"scan_frequency_minutes\": 60,\n \"auto_scan_enabled\":\
\ true"
headers:
- key: Content-Type
value: application/json
docs: |-
## Update Scan Settings
Updates the user's media scanning settings.
**Method:** PUT
**Endpoint:** /api/library/scan-settings
**Authentication:** Required
**Request Body:**
- `scan_frequency_minutes` (integer, required): Minutes between automatic scans (15-1440)
- `auto_scan_enabled` (boolean, required): Whether automatic scanning is enabled
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Invalid settings
- 401: Unauthorized