feat(F-099): completed feature

This commit is contained in:
chattie
2026-08-21 07:29:07 +02:00
parent 3f1d08382f
commit 5177a851aa
41 changed files with 922 additions and 131 deletions

View File

@@ -27,10 +27,12 @@ async function request<T>(method: string, path: string, body?: unknown): Promise
if (!res.ok) {
const body = await res.json().catch(() => ({ message: 'Request failed' }));
const envelope = body as { code?: string; message?: string; error?: { code?: string; message?: string } };
const error = envelope.error ?? envelope;
throw new ApiError(
res.status,
(body as { code?: string }).code ?? 'REQUEST_FAILED',
(body as { message?: string }).message ?? 'Request failed',
error.code ?? 'REQUEST_FAILED',
error.message ?? 'Request failed',
);
}
@@ -334,6 +336,14 @@ export interface StoreSettings {
aiApiKeyConfigured?: boolean;
aiSeoTitlePrompt: string;
aiSeoDescriptionPrompt: string;
aiProductDescriptionPrompt: string;
smtpHost: string;
smtpPort: string;
smtpSecure: boolean;
smtpUser: string;
smtpPass: string;
smtpPassConfigured?: boolean;
smtpFrom: string;
}
export const settingsApi = {