Adjust branding defaults and tenant presets

This commit is contained in:
Codex Agent
2026-01-30 18:15:52 +01:00
parent b3bf45482a
commit 6e19c3d7b6
9 changed files with 592 additions and 220 deletions

View File

@@ -2448,6 +2448,28 @@ export async function getTenantSettings(): Promise<TenantSettingsPayload> {
};
}
export async function updateTenantSettings(settings: Record<string, unknown>): Promise<TenantSettingsPayload> {
const response = await authorizedFetch('/api/v1/tenant/settings', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({ settings }),
});
const data = await jsonOrThrow<{ data?: { id?: number; settings?: Record<string, unknown>; updated_at?: string | null } }>(
response,
'Failed to update tenant settings',
);
const payload = (data.data ?? {}) as Record<string, unknown>;
return {
id: Number(payload.id ?? 0),
settings: (payload.settings ?? {}) as Record<string, unknown>,
updated_at: (payload.updated_at ?? null) as string | null,
};
}
export async function getTenantPackagesOverview(options?: { force?: boolean }): Promise<{
packages: TenantPackageSummary[];
activePackage: TenantPackageSummary | null;