refactor(frontend): regen API types — migrate consumers off dropped Geschichte schema
With create/update returning GeschichteView, no endpoint serves the raw Geschichte entity and springdoc drops its schema. Dashboard modules and the home loader now use GeschichteSummary; GeschichteEditor takes GeschichteView and maps persons into the displayName shape PersonMultiSelect renders — fixing blank person chips on story edit. PersonMultiSelect/Sidebar narrow to Pick<Person, 'id' | 'displayName'>, mirroring the DocumentOption precedent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,12 @@ import type { components } from '$lib/generated/api';
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
import { clickOutside } from '$lib/shared/actions/clickOutside';
|
||||
type Person = components['schemas']['Person'];
|
||||
// Narrow contract: only what the chips render and dedup needs. Full Person
|
||||
// objects from /api/persons remain assignable; view projections fit too.
|
||||
type PersonOption = Pick<Person, 'id' | 'displayName'>;
|
||||
|
||||
interface Props {
|
||||
selectedPersons?: Person[];
|
||||
selectedPersons?: PersonOption[];
|
||||
}
|
||||
|
||||
let { selectedPersons = $bindable([]) }: Props = $props();
|
||||
|
||||
Reference in New Issue
Block a user