chore: auto-commit (23 archivos)
- app.md - backend/dist/assets/index-CFDWXN9Z.js - backend/dist/index.html - backend/handlers.go - backend/main.go - backend/users.go - e2e/smoke_live.sh - frontend/src/App.tsx - frontend/src/api.ts - frontend/src/components/CardChatPanel.tsx - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,11 @@ import type {
|
||||
CardHistoryResponse,
|
||||
CardMessage,
|
||||
Column,
|
||||
KanbanModule,
|
||||
Metrics,
|
||||
MetricsFilter,
|
||||
ModuleLog,
|
||||
ModuleTestResult,
|
||||
Notification,
|
||||
Sticker,
|
||||
User,
|
||||
@@ -317,6 +320,40 @@ export function markAllNotificationsRead(): Promise<{ count: number }> {
|
||||
return fetchJSON("/notifications/read-all", { method: "POST" });
|
||||
}
|
||||
|
||||
export function listModules(): Promise<KanbanModule[]> {
|
||||
return fetchJSON("/modules");
|
||||
}
|
||||
|
||||
export interface ModuleInput {
|
||||
name: string;
|
||||
kind: string;
|
||||
enabled: boolean;
|
||||
event_filter: string[];
|
||||
config: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export function createModule(body: ModuleInput): Promise<KanbanModule> {
|
||||
return fetchJSON("/modules", { method: "POST", body: JSON.stringify(body) });
|
||||
}
|
||||
|
||||
export function updateModule(id: string, patch: Partial<ModuleInput>): Promise<KanbanModule> {
|
||||
return fetchJSON(`/modules/${id}`, { method: "PATCH", body: JSON.stringify(patch) });
|
||||
}
|
||||
|
||||
export function deleteModule(id: string): Promise<void> {
|
||||
return fetchJSON(`/modules/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export function listModuleLogs(id: string, limit = 100): Promise<ModuleLog[]> {
|
||||
return fetchJSON(`/modules/${id}/logs?limit=${limit}`);
|
||||
}
|
||||
|
||||
export function testModule(idOrDraft: string, body?: ModuleInput): Promise<ModuleTestResult> {
|
||||
const init: RequestInit = { method: "POST" };
|
||||
if (body) init.body = JSON.stringify(body);
|
||||
return fetchJSON(`/modules/${idOrDraft}/test`, init);
|
||||
}
|
||||
|
||||
// streamChat opens a WebSocket, sends the message history, and streams events
|
||||
// to onEvent. Returns a Promise that resolves when the server closes the
|
||||
// connection (after a "done" event) and rejects on transport errors.
|
||||
|
||||
Reference in New Issue
Block a user