Add person-detail page with events timeline and relationships

New /trees/[id]/persons/[personId] view: life-events timeline with add/remove, and relationships grouped into parents/children/partners/siblings with an add form (kind + person picker + qualifier). People in the tree list now link here. Regenerated the OpenAPI client for the new endpoints.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Paul <justin@jpaul.me>
This commit is contained in:
2026-06-06 12:10:56 -04:00
parent d6e2df4a61
commit 1f25eb2f21
4 changed files with 1531 additions and 5 deletions
+768
View File
@@ -484,10 +484,646 @@
}
}
}
},
"/api/v1/trees/{tree_id}/persons/{person_id}": {
"get": {
"tags": [
"persons"
],
"summary": "Get Person",
"operationId": "get_person_api_v1_trees__tree_id__persons__person_id__get",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
},
{
"name": "person_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Person Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PersonRead"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/events": {
"post": {
"tags": [
"events"
],
"summary": "Create Event",
"operationId": "create_event_api_v1_trees__tree_id__events_post",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventRead"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/persons/{person_id}/events": {
"get": {
"tags": [
"events"
],
"summary": "List Person Events",
"operationId": "list_person_events_api_v1_trees__tree_id__persons__person_id__events_get",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
},
{
"name": "person_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Person Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventRead"
},
"title": "Response List Person Events Api V1 Trees Tree Id Persons Person Id Events Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/events/{event_id}": {
"delete": {
"tags": [
"events"
],
"summary": "Delete Event",
"operationId": "delete_event_api_v1_trees__tree_id__events__event_id__delete",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
},
{
"name": "event_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Event Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/relationships": {
"post": {
"tags": [
"relationships"
],
"summary": "Create Relationship",
"operationId": "create_relationship_api_v1_trees__tree_id__relationships_post",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RelationshipCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RelationshipRead"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/persons/{person_id}/relationships": {
"get": {
"tags": [
"relationships"
],
"summary": "List Person Relationships",
"operationId": "list_person_relationships_api_v1_trees__tree_id__persons__person_id__relationships_get",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
},
{
"name": "person_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Person Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RelationshipRead"
},
"title": "Response List Person Relationships Api V1 Trees Tree Id Persons Person Id Relationships Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/trees/{tree_id}/relationships/{relationship_id}": {
"delete": {
"tags": [
"relationships"
],
"summary": "Delete Relationship",
"operationId": "delete_relationship_api_v1_trees__tree_id__relationships__relationship_id__delete",
"parameters": [
{
"name": "tree_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
}
},
{
"name": "relationship_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Relationship Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"EventCreate": {
"properties": {
"event_type": {
"type": "string",
"title": "Event Type"
},
"person_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Person Id"
},
"relationship_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Relationship Id"
},
"place_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Place Id"
},
"date_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Date Value"
},
"date_start": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Date Start"
},
"date_end": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Date End"
},
"date_precision": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Date Precision"
},
"calendar": {
"type": "string",
"title": "Calendar",
"default": "gregorian"
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Detail"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Notes"
}
},
"type": "object",
"required": [
"event_type"
],
"title": "EventCreate"
},
"EventRead": {
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"tree_id": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
},
"event_type": {
"type": "string",
"title": "Event Type"
},
"person_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Person Id"
},
"relationship_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Relationship Id"
},
"place_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Place Id"
},
"date_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Date Value"
},
"date_start": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Date Start"
},
"date_end": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Date End"
},
"date_precision": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Date Precision"
},
"calendar": {
"type": "string",
"title": "Calendar"
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Detail"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Notes"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"tree_id",
"event_type",
"person_id",
"relationship_id",
"place_id",
"date_value",
"date_start",
"date_end",
"date_precision",
"calendar",
"detail",
"notes",
"created_at"
],
"title": "EventRead"
},
"HTTPValidationError": {
"properties": {
"detail": {
@@ -519,6 +1155,19 @@
],
"title": "LoginRequest"
},
"ParentChildQualifier": {
"type": "string",
"enum": [
"biological",
"adoptive",
"step",
"foster",
"donor",
"guardian"
],
"title": "ParentChildQualifier",
"description": "Qualifies a parent_child edge so adoption/donor/blended families are\nfirst-class rather than edge cases (ARCHITECTURE \u00a75)."
},
"PasswordResetConfirm": {
"properties": {
"token": {
@@ -721,6 +1370,125 @@
],
"title": "RegisterRequest"
},
"RelationshipCreate": {
"properties": {
"type": {
"$ref": "#/components/schemas/RelationshipType"
},
"person_from_id": {
"type": "string",
"format": "uuid",
"title": "Person From Id"
},
"person_to_id": {
"type": "string",
"format": "uuid",
"title": "Person To Id"
},
"qualifier": {
"anyOf": [
{
"$ref": "#/components/schemas/ParentChildQualifier"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Notes"
}
},
"type": "object",
"required": [
"type",
"person_from_id",
"person_to_id"
],
"title": "RelationshipCreate"
},
"RelationshipRead": {
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"tree_id": {
"type": "string",
"format": "uuid",
"title": "Tree Id"
},
"type": {
"$ref": "#/components/schemas/RelationshipType"
},
"person_from_id": {
"type": "string",
"format": "uuid",
"title": "Person From Id"
},
"person_to_id": {
"type": "string",
"format": "uuid",
"title": "Person To Id"
},
"qualifier": {
"anyOf": [
{
"$ref": "#/components/schemas/ParentChildQualifier"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Notes"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"tree_id",
"type",
"person_from_id",
"person_to_id",
"qualifier",
"notes",
"created_at"
],
"title": "RelationshipRead"
},
"RelationshipType": {
"type": "string",
"enum": [
"parent_child",
"partnership",
"sibling"
],
"title": "RelationshipType"
},
"SessionRead": {
"properties": {
"user": {