milestone 16 complete
Build and verify web migration / verify (push) Waiting to run

This commit is contained in:
wolf-demon
2026-09-29 20:40:18 +01:00
parent 47178a64ce
commit 92f875621d
13 changed files with 96 additions and 19 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ export type Conversation = { id: string; from: string; subject: string; body: st
export type ConversationPage = { items: Conversation[]; nextCursor: string | null };
export type Knowledge = { id: string; title: string; category: string; answer: string; keywords: string; approved: boolean; version: number };
export type Activity = { id: string; at: string; userName: string; action: string };
export type Mailboxes = { configured: boolean; aiConfigured?: boolean; sendingConfigured?: boolean; items: { id: string; email: string; status: string; version: number; lastSyncAt: string | null; lastAttemptAt: string | null; nextAttemptAt: string | null; failureCount: number; syncErrorCode: string; catchingUp: boolean; syncError: string; canSend: boolean }[] };
export type Mailboxes = { configured: boolean; aiConfigured?: boolean; sendingConfigured?: boolean; timeZone?: string; items: { id: string; email: string; status: string; version: number; lastSyncAt: string | null; lastAttemptAt: string | null; nextAttemptAt: string | null; failureCount: number; syncErrorCode: string; catchingUp: boolean; syncError: string; canSend: boolean }[] };
let csrf = '';
export async function api<T>(path: string, method = 'GET', body?: unknown): Promise<T> {
const response = await fetch('/api' + path, { method, credentials: 'same-origin', headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': csrf }, body: body === undefined ? undefined : JSON.stringify(body) });