Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/tinyhumans.backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"url": "https://api.tinyhumans.ai/swagger.json",
"title": "TinyHumans API",
"version": "1.0.0",
"pathCount": 289,
"totalOperationCount": 321,
"pathCount": 294,
"totalOperationCount": 326,
"operationCount": 266,
"supplementalOperationCount": 13,
"excludedAdminOperationCount": 47,
"excludedAdminOperationCount": 52,
"excludedWebhookOperationCount": 12,
"servers": [
"https://api.tinyhumans.ai/",
Expand Down
5 changes: 5 additions & 0 deletions src/generated_public_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ pub(crate) const UNEXPOSED_ROUTES: &[(&str, &str)] = &[
("POST", "/admin/feedback/triage/{feedbackId}/merge"),
("POST", "/admin/feedback/triage/{feedbackId}/reject"),
("POST", "/admin/feedback/triage/{feedbackId}/reprocess"),
("GET", "/admin/memory/model-usage"),
("GET", "/admin/memory/overview"),
("GET", "/admin/memory/storage"),
("GET", "/admin/memory/tenants/{userId}"),
("GET", "/admin/memory/top-tenants"),
("GET", "/admin/settings"),
("PATCH", "/admin/settings/{key}"),
("POST", "/admin/users/{userId}/credits"),
Expand Down
6 changes: 5 additions & 1 deletion src/lib_exclusion_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ fn every_admin_and_webhook_route_is_rejected_by_the_raw_transport_gate() {
// The telemetry ingestion endpoint (OTEL / Langfuse) does NOT belong
// here: it takes a normal user bearer token, not a service token, so
// it stays in PUBLIC_ROUTES.
assert_eq!(UNEXPOSED_ROUTES.len(), 59);
// 59 -> 64: the five `GET /admin/memory/*` reads (`overview`, `storage`,
// `top-tenants`, `tenants/{userId}` and the new `model-usage`). The first
// four were already on backend `main` but never synced here; admin-only,
// so blocked at the raw transport and given no typed method.
assert_eq!(UNEXPOSED_ROUTES.len(), 64);
for (method, template) in UNEXPOSED_ROUTES {
let concrete_path = template
.split('/')
Expand Down
7 changes: 6 additions & 1 deletion tests/openapi_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ fn generated_rust_routes_match_the_public_manifest() {
// not name them — and the SDK refuses that whole prefix structurally. The
// Langfuse telemetry receiver is not counted here: it is ordinary public
// API (user bearer token), so it stays in the public surface above.
assert_eq!(manifest["source"]["excludedAdminOperationCount"], 47);
//
// 47 -> 52: the five `GET /admin/memory/*` reads (`overview`, `storage`,
// `top-tenants`, `tenants/{userId}`, and the new `model-usage`), the
// admin service token's memory aggregates. Four were already on backend
// `main` but never synced; none is public.
assert_eq!(manifest["source"]["excludedAdminOperationCount"], 52);
assert_eq!(manifest["source"]["excludedWebhookOperationCount"], 12);
// 206 -> 208: the two new public opencompany routes above
// (`GET /opencompany/companies` and `POST /opencompany/instances/{slug}/update`).
Expand Down
Loading