Files
MeBox/web/src/api/tools.ts
T
Kiro Agent 261d342fa1 feat(web): port AI Assistant, STRM management, and admin tools pages from Vue UI
- AIAssistantPage (/ai): smart natural-language search showing parsed intent
  + matching media grid, plus history-based recommendations.
- StrmPage (/strm, admin): import streaming-only entries from URLs and
  attach/detach STRM URL on existing media.
- ToolsPage (/tools, admin): organize an entire library or single media
  item, send test notifications through configured channels.
- Wire new routes in App.tsx and add sidebar links in Layout.tsx.

Co-authored-by: Shuke <272197458+ShukeBta@users.noreply.github.com>
2026-05-16 08:41:43 +00:00

22 lines
727 B
TypeScript

import { api } from './client'
// toolsAPI groups admin-only endpoints that don't fit the other domain
// modules: organizing media files into the canonical naming layout, and
// dispatching a test notification through the configured channels.
export const toolsAPI = {
organizeMedia: (mediaID: string) =>
api
.post<{ path: string }>(`/admin/media/${mediaID}/organize`)
.then((r) => r.data),
organizeLibrary: (libraryID: string) =>
api
.post<Record<string, unknown>>(`/admin/libraries/${libraryID}/organize`)
.then((r) => r.data),
notifyTest: (title: string, body: string) =>
api
.post<{ message: string }>('/admin/notify/test', { title, body })
.then((r) => r.data),
}