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
+47
View File
@@ -0,0 +1,47 @@
info:
name: Get Device Usage
type: http
seq: 2
http:
method: GET
url: '{{base_url}}/api/analytics/device-usage'
auth: inherit
body:
type: none
runtime:
scripts:
- type: tests
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
docs: |-
Get usage statistics for all devices.
**Endpoint**: GET /api/analytics/device-usage
**Auth**: Required (Bearer token)
## Response Fields
| Field | Type | Description |
|-------|------|-------------|
| devices | array | List of device usage statistics |
| devices[].id | string | Device ID |
| devices[].device_name | string | Device name |
| devices[].device_type | string | Device type (kobo, kindle, koreader) |
| devices[].sync_count | int | Number of sync operations |
| devices[].last_sync | string | Last sync timestamp |
| devices[].total_reading_minutes | int | Total reading time on device |
| devices[].books_read | int | Number of books completed on device |
## Example Response
```json
{
"devices": [
{
"id": "789e4567-e89b-12d3-a456-426614174001",
"device_name": "My Kobo Clara",
"device_type": "kobo",
"sync_count": 45,
"last_sync": "2026-02-08T17:25:00Z",
"total_reading_minutes": 1250,
"books_read": 3
+57
View File
@@ -0,0 +1,57 @@
info:
name: Get Popular Books
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/analytics/popular-books?limit=10'
auth: inherit
body:
type: none
runtime:
scripts:
- type: tests
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
docs: |-
Get popular books sorted by read count.
**Endpoint**: GET /api/analytics/popular-books
**Auth**: Required (Bearer token)
## Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|-----------|-------------|
| limit | int | No | Maximum number of books to return (default: 10) |
## Response Fields
| Field | Type | Description |
|-------|------|-------------|
| books | array | List of popular books |
| books[].media_item_id | string | Book ID |
| books[].title | string | Book title |
| books[].author | string | Book author |
| books[].read_count | int | Number of times read |
| books[].avg_completion | float | Average completion rate (0-1) |
| books[].cover_url | string | Cover image URL |
## Example Request
```
GET /api/analytics/popular-books?limit=10
```
## Example Response
```json
{
"books": [
{
"media_item_id": "323e4567-e89b-12d3-a456-426614174002",
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"read_count": 5,
"avg_completion": 0.85,
"cover_url": "/api/books/323e4567-e89b-12d3-a456-426614174002/cover"
@@ -0,0 +1,58 @@
info:
name: Get Reading Stats Date Range
type: http
seq: 3
http:
method: GET
url: '{{base_url}}/api/analytics/reading-stats?start_date=2024-01-01&end_date=2024-01-31'
auth: inherit
body:
type: none
runtime:
scripts:
- type: tests
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
docs: |-
Get reading statistics for a specific date range.
**Endpoint**: GET /api/analytics/reading-stats
**Auth**: Required (Bearer token)
## Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|-----------|-------------|
| start_date | string | No | Start date (ISO 8601 format, default: 30 days ago) |
| end_date | string | No | End date (ISO 8601 format, default: today) |
## Response Fields
| Field | Type | Description |
|-------|------|-------------|
| total_books_read | int | Total books completed in range |
| total_pages_read | int | Total pages read in range |
| total_reading_time_minutes | int | Total reading time in minutes |
| completion_rate | float | Percentage of books completed (0-1) |
| daily_reading_minutes | array | Daily reading time per day |
| daily_reading_minutes[].date | string | Date (ISO 8601) |
| daily_reading_minutes[].minutes | int | Minutes read on that date |
## Example Request
```
GET /api/analytics/reading-stats?start_date=2024-01-01&end_date=2024-01-31
```
## Example Response
```json
{
"total_books_read": 2,
"total_pages_read": 450,
"total_reading_time_minutes": 720,
"completion_rate": 0.85,
"daily_reading_minutes": [
{
"date": "2024-01-01",
"minutes": 30
+58
View File
@@ -0,0 +1,58 @@
info:
name: Get Reading Stats
type: http
seq: 4
http:
method: GET
url: '{{base_url}}/api/analytics/reading-stats'
auth: inherit
body:
type: none
runtime:
scripts:
- type: tests
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
docs: |-
Get overall reading statistics for the authenticated user.
**Endpoint**: GET /api/analytics/reading-stats
**Auth**: Required (Bearer token)
## Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|-----------|-------------|
| start_date | string | No | Start date (ISO 8601 format) |
| end_date | string | No | End date (ISO 8601 format) |
## Response Fields
| Field | Type | Description |
|-------|------|-------------|
| total_books_read | int | Total books completed |
| total_pages_read | int | Total pages read |
| total_reading_time_minutes | int | Total reading time in minutes |
| completion_rate | float | Average book completion rate (0-1) |
| daily_reading_minutes | array | Daily reading time breakdown |
| daily_reading_minutes[].date | string | Date (ISO 8601) |
| daily_reading_minutes[].minutes | int | Minutes read on that date |
## Example Request
```
GET /api/analytics/reading-stats
```
## Example Response
```json
{
"total_books_read": 12,
"total_pages_read": 3450,
"total_reading_time_minutes": 5400,
"completion_rate": 0.78,
"daily_reading_minutes": [
{
"date": "2026-01-15",
"minutes": 45