{"components":{"schemas":{"AccessInput":{"properties":{"disabled":{"type":"boolean"},"role":{"enum":["reader","editor","admin"],"type":"string"}},"required":["role","disabled"],"type":"object"},"AskAnswer":{"properties":{"answer":{"type":"string"},"citations":{"items":{"properties":{"authority":{"type":"string"},"id":{"type":"string"},"perspectiveId":{"type":"string"},"snippet":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"title":{"type":"string"},"url":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"lang":{"type":"string"},"placeholder":{"type":"boolean"},"question":{"type":"string"}},"type":"object"},"AskRequest":{"properties":{"lang":{"type":"string"},"question":{"type":"string"},"topK":{"maximum":10,"minimum":1,"type":"integer"}},"required":["question"],"type":"object"},"AuthResponse":{"properties":{"expiresIn":{"type":"integer"},"token":{"type":"string"},"tokenType":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"CategoryNode":{"properties":{"children":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array"},"count":{"type":"integer"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"DiscoveryResponse":{"properties":{"category":{"nullable":true,"type":"string"},"date":{"type":"string"},"entities":{"items":{"nullable":true,"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"type":"array"},"hasStats":{"type":"boolean"},"hits":{"items":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"highlight":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"snippet":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"nullable":true,"type":"array"},"kind":{"type":"string"},"lang":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"},"windowDays":{"type":"integer"}},"type":"object"},"EditorialEntityInput":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"description":"Markdown: HTTPS/root-relative images ![alt](url); mermaid fenced flowcharts; map fenced JSON with center [latitude,longitude], zoom 1..19, basemap street/topographic/none, grid and fit booleans, title, and inline RFC 7946 GeoJSON (longitude,latitude). GeoJSON Polygon/MultiPolygon boundaries, points, and LineString/MultiLineString contours with numeric properties.elevation or ele (metres). See docs/rich-content.md for limits. Raw HTML is escaped.","type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"description":"Distinguishing label for same-name entries, e.g. Beijing.","type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"description":"Shared source/translation revision. Send the current value to reject stale writes.","minimum":0,"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["draft","published","archived","deleted"],"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"enum":["person","place","event","organization","work","concept"],"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"required":["id","type","slug","title","revision"],"type":"object"},"EditorialEntityResponse":{"properties":{"baseStatus":{"type":"string"},"entity":{"$ref":"#/components/schemas/Entity"},"lang":{"type":"string"},"languages":{"items":{"$ref":"#/components/schemas/EditorialLanguage"},"type":"array"},"translationExists":{"type":"boolean"}},"type":"object"},"EditorialLanguage":{"properties":{"code":{"type":"string"},"exists":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"EmbeddingStatus":{"properties":{"dimensions":{"type":"integer"},"enabled":{"type":"boolean"},"indexed":{"type":"integer"},"lastError":{"type":"string"},"model":{"type":"string"},"pending":{"type":"integer"},"total":{"type":"integer"},"updatedAt":{"format":"date-time","type":"string"}},"type":"object"},"Entity":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"description":"Markdown: HTTPS/root-relative images ![alt](url); mermaid fenced flowcharts; map fenced JSON with center [latitude,longitude], zoom 1..19, basemap street/topographic/none, grid and fit booleans, title, and inline RFC 7946 GeoJSON (longitude,latitude). GeoJSON Polygon/MultiPolygon boundaries, points, and LineString/MultiLineString contours with numeric properties.elevation or ele (metres). See docs/rich-content.md for limits. Raw HTML is escaped.","type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"description":"Distinguishing label for same-name entries, e.g. Beijing.","type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"description":"Shared source/translation revision. Send the current value to reject stale writes.","minimum":0,"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["draft","published","archived","deleted"],"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"enum":["person","place","event","organization","work","concept"],"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"EntityInput":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"description":"Markdown: HTTPS/root-relative images ![alt](url); mermaid fenced flowcharts; map fenced JSON with center [latitude,longitude], zoom 1..19, basemap street/topographic/none, grid and fit booleans, title, and inline RFC 7946 GeoJSON (longitude,latitude). GeoJSON Polygon/MultiPolygon boundaries, points, and LineString/MultiLineString contours with numeric properties.elevation or ele (metres). See docs/rich-content.md for limits. Raw HTML is escaped.","type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"description":"Distinguishing label for same-name entries, e.g. Beijing.","type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"description":"Shared source/translation revision. Send the current value to reject stale writes.","minimum":0,"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["draft","published","archived","deleted"],"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"enum":["person","place","event","organization","work","concept"],"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"required":["id","type","slug","title"],"type":"object"},"EntityList":{"properties":{"category":{"nullable":true,"type":"string"},"entities":{"items":{"nullable":true,"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"type":"array"},"hits":{"items":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"highlight":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"snippet":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"nullable":true,"type":"array"},"lang":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"EntityPatch":{"properties":{"adminArea":{"type":"string"},"aliases":{"items":{"type":"string"},"type":"array"},"availableLangs":{"items":{"type":"string"},"type":"array"},"birth":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"body":{"description":"Markdown: HTTPS/root-relative images ![alt](url); mermaid fenced flowcharts; map fenced JSON with center [latitude,longitude], zoom 1..19, basemap street/topographic/none, grid and fit booleans, title, and inline RFC 7946 GeoJSON (longitude,latitude). GeoJSON Polygon/MultiPolygon boundaries, points, and LineString/MultiLineString contours with numeric properties.elevation or ele (metres). See docs/rich-content.md for limits. Raw HTML is escaped.","type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"conceptKind":{"type":"string"},"coordinates":{"nullable":true,"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"created":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"createdAt":{"type":"string"},"creators":{"items":{"type":"string"},"type":"array"},"customFields":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"dateNote":{"type":"string"},"death":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"deathEvent":{"type":"string"},"disambiguation":{"description":"Distinguishing label for same-name entries, e.g. Beijing.","type":"string"},"dissolved":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"established":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"eventKind":{"type":"string"},"fallback":{"type":"boolean"},"founded":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"headquartersNote":{"type":"string"},"id":{"type":"string"},"isFictional":{"nullable":true,"type":"boolean"},"lang":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"locationNote":{"type":"string"},"medium":{"type":"string"},"nativePlace":{"type":"string"},"occupations":{"items":{"type":"string"},"type":"array"},"orgKind":{"type":"string"},"orgStatus":{"type":"string"},"personCategory":{"type":"string"},"perspectives":{"items":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"type":"array"},"placeKind":{"type":"string"},"previousSlugs":{"items":{"type":"string"},"type":"array"},"published":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"relatedTerms":{"items":{"type":"string"},"type":"array"},"revision":{"description":"Shared source/translation revision. Send the current value to reject stale writes.","minimum":0,"type":"integer"},"scopeNote":{"type":"string"},"slug":{"type":"string"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["draft","published","archived","deleted"],"type":"string"},"summary":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"type":{"enum":["person","place","event","organization","work","concept"],"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"url":{"type":"string"},"workKind":{"type":"string"}},"type":"object"},"EntityType":{"properties":{"directory":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"}},"type":"object"},"Error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"HistoricalDate":{"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"HistoryEntry":{"properties":{"from":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"sources":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"to":{"type":"string"}},"type":"object"},"LoginInput":{"anyOf":[{"required":["login"]},{"required":["username"]},{"required":["email"]}],"properties":{"email":{"type":"string"},"login":{"type":"string"},"password":{"format":"password","type":"string","writeOnly":true},"username":{"type":"string"}},"required":["password"],"type":"object"},"PanelLoginInput":{"properties":{"login":{"type":"string"},"password":{"format":"password","type":"string","writeOnly":true}},"required":["login","password"],"type":"object"},"Perspective":{"properties":{"authority":{"type":"string"},"body":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"regions":{"items":{"type":"string"},"type":"array"},"sources":{"items":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"}},"type":"object"},"PerspectivesResponse":{"properties":{"fallback":{"type":"boolean"},"id":{"type":"string"},"lang":{"type":"string"},"perspectives":{"items":{"$ref":"#/components/schemas/Perspective"},"type":"array"},"total":{"type":"integer"}},"type":"object"},"PreviewInput":{"properties":{"body":{"type":"string"},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"}},"required":["body"],"type":"object"},"ProfileInput":{"properties":{"bio":{"type":"string"},"displayName":{"type":"string"}},"type":"object"},"PublicProfile":{"properties":{"bio":{"type":"string"},"displayName":{"type":"string"},"id":{"type":"integer"},"username":{"type":"string"}},"type":"object"},"RegisterInput":{"properties":{"displayName":{"type":"string"},"email":{"format":"email","type":"string"},"password":{"format":"password","type":"string","writeOnly":true},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"Relation":{"properties":{"fromId":{"type":"string"},"id":{"type":"string"},"note":{"type":"string"},"period":{"nullable":true,"properties":{"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"}},"type":"object"},"relationType":{"type":"string"},"role":{"type":"string"},"sourceRefs":{"items":{"properties":{"entityId":{"type":"string"},"sourceId":{"type":"string"}},"type":"object"},"type":"array"},"toId":{"type":"string"}},"type":"object"},"RelationDoc":{"properties":{"body":{"type":"string"},"entityId":{"type":"string"},"sections":{"items":{"properties":{"hubId":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"memberIds":{"items":{"type":"string"},"type":"array"},"note":{"type":"string"}},"type":"object"},"type":"array"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"type":"object"},"RelationGroup":{"properties":{"hubId":{"type":"string"},"hubTitle":{"type":"string"},"hubUrl":{"type":"string"},"items":{"items":{"properties":{"fromId":{"type":"string"},"id":{"type":"string"},"incoming":{"type":"boolean"},"label":{"type":"string"},"note":{"type":"string"},"period":{"nullable":true,"properties":{"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"}},"type":"object"},"relationType":{"type":"string"},"role":{"type":"string"},"sourceRefs":{"items":{"properties":{"entityId":{"type":"string"},"sourceId":{"type":"string"}},"type":"object"},"type":"array"},"targetId":{"type":"string"},"targetTitle":{"type":"string"},"targetUrl":{"type":"string"},"toId":{"type":"string"}},"type":"object"},"type":"array"},"label":{"type":"string"},"pageTitle":{"type":"string"},"pageUrl":{"type":"string"},"type":{"type":"string"}},"type":"object"},"RelationInput":{"properties":{"fromId":{"type":"string"},"id":{"type":"string"},"note":{"type":"string"},"period":{"nullable":true,"properties":{"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"}},"type":"object"},"relationType":{"type":"string"},"role":{"type":"string"},"sourceRefs":{"items":{"properties":{"entityId":{"type":"string"},"sourceId":{"type":"string"}},"type":"object"},"type":"array"},"toId":{"type":"string"}},"required":["fromId","toId","relationType","sourceRefs"],"type":"object"},"RelationType":{"properties":{"label":{"type":"string"},"name":{"type":"string"},"pairs":{"items":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"reverse":{"type":"string"}},"type":"object"},"RelationView":{"properties":{"fromId":{"type":"string"},"id":{"type":"string"},"incoming":{"type":"boolean"},"label":{"type":"string"},"note":{"type":"string"},"period":{"nullable":true,"properties":{"end":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"},"start":{"nullable":true,"properties":{"calendarNote":{"type":"string"},"day":{"type":"integer"},"display":{"type":"string"},"month":{"type":"integer"},"precision":{"type":"string"},"qualifier":{"type":"string"},"year":{"nullable":true,"type":"integer"}},"type":"object"}},"type":"object"},"relationType":{"type":"string"},"role":{"type":"string"},"sourceRefs":{"items":{"properties":{"entityId":{"type":"string"},"sourceId":{"type":"string"}},"type":"object"},"type":"array"},"targetId":{"type":"string"},"targetTitle":{"type":"string"},"targetUrl":{"type":"string"},"toId":{"type":"string"}},"type":"object"},"RevisionMeta":{"properties":{"author":{"type":"string"},"hasSnapshot":{"type":"boolean"},"message":{"type":"string"},"revision":{"type":"integer"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"type":"object"},"SearchRequest":{"properties":{"category":{"type":"string"},"lang":{"type":"string"},"limit":{"nullable":true,"type":"integer"},"offset":{"nullable":true,"type":"integer"},"page":{"nullable":true,"type":"integer"},"pageSize":{"nullable":true,"type":"integer"},"q":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"type":"object"},"SiteTextInput":{"properties":{"lang":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"},"revision":{"type":"integer"},"values":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["revision","lang","values"],"type":"object"},"Source":{"properties":{"author":{"type":"string"},"date":{"type":"string"},"id":{"type":"string"},"locator":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"TemplateFieldsInput":{"properties":{"revision":{"type":"integer"},"types":{"additionalProperties":{"items":{"properties":{"custom":{"type":"boolean"},"editor":{"type":"boolean"},"key":{"type":"string"},"kind":{"type":"string"},"labels":{"additionalProperties":{"type":"string"},"type":"object"},"property":{"type":"string"},"public":{"type":"boolean"},"required":{"type":"boolean"}},"type":"object"},"type":"array"},"type":"object"}},"required":["revision","types"],"type":"object"},"TemplateSettings":{"properties":{"revision":{"type":"integer"},"siteText":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object"},"types":{"additionalProperties":{"items":{"properties":{"custom":{"type":"boolean"},"editor":{"type":"boolean"},"key":{"type":"string"},"kind":{"type":"string"},"labels":{"additionalProperties":{"type":"string"},"type":"object"},"property":{"type":"string"},"public":{"type":"boolean"},"required":{"type":"boolean"}},"type":"object"},"type":"array"},"type":"object"}},"type":"object"},"TemplateSettingsResponse":{"properties":{"defaults":{"additionalProperties":{"type":"string"},"type":"object"},"lang":{"type":"string"},"languages":{"items":{"type":"string"},"type":"array"},"settings":{"$ref":"#/components/schemas/TemplateSettings"},"siteTextKeys":{"items":{"type":"string"},"type":"array"}},"type":"object"},"Term":{"properties":{"count":{"type":"integer"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"TermInput":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string"},"slug":{"type":"string"}},"required":["name"],"type":"object"},"User":{"properties":{"bio":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"disabled":{"type":"boolean"},"displayName":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"role":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"username":{"type":"string"}},"type":"object"},"Version":{"properties":{"build":{"type":"string"},"contentStorage":{"type":"string"},"contentUpdatedAt":{"type":"string"},"defaultLanguage":{"type":"string"},"entityCount":{"type":"integer"},"git":{"type":"string"},"languages":{"items":{"type":"string"},"type":"array"},"sourceLanguage":{"type":"string"},"version":{"type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT or API_TOKEN","scheme":"bearer","type":"http"},"studioCookie":{"in":"cookie","name":"wiki_session","type":"apiKey"}}},"info":{"description":"Public reads are anonymous and include only published content. Language priority: explicit lang, supported Accept-Language, English. Chinese remains the content source and public fallback. Editorial reads/writes include drafts and require an editor/admin JWT or API_TOKEN. Admin endpoints require administrator privileges as described per route. PostgreSQL stores production content; reindex reloads the authoritative backend. Embeddings are asynchronous 768-dimensional vectors; keyword search is unchanged.","title":"knowledge API","version":"0.7.1"},"openapi":"3.0.3","paths":{"/api/v1/admin/embeddings":{"get":{"operationId":"get_api_v1_admin_embeddings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingStatus"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Embedding progress (administrator JWT or API_TOKEN)"},"post":{"operationId":"post_api_v1_admin_embeddings","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingStatus"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Schedule incremental embedding scan (administrator JWT or API_TOKEN)"}},"/api/v1/admin/import":{"post":{"operationId":"post_api_v1_admin_import","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Batch-import content documents in one validated commit: create absent paths, replace only when expectSha256 matches, report conflicts (administrator JWT or API_TOKEN)"}},"/api/v1/admin/templates":{"put":{"operationId":"put_api_v1_admin_templates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateFieldsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Configure field labels, order, visibility and custom fields (administrator JWT or API_TOKEN)"}},"/api/v1/ask":{"post":{"operationId":"post_api_v1_ask","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskAnswer"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Ask with citations (placeholder without LLM key)"}},"/api/v1/auth/login":{"post":{"operationId":"post_api_v1_auth_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Login; returns JWT"}},"/api/v1/auth/logout":{"post":{"operationId":"post_api_v1_auth_logout","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Logout (client discards JWT)"}},"/api/v1/auth/register":{"post":{"operationId":"post_api_v1_auth_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Register user"}},"/api/v1/backoffice/admin/embeddings":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_admin_embeddings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingStatus"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get admin/embeddings"},"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_admin_embeddings","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingStatus"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post admin/embeddings"}},"/api/v1/backoffice/admin/overview":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_admin_overview","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contentStorage":{"type":"string"},"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"updatedAt":{"type":"string"},"version":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get admin/overview"}},"/api/v1/backoffice/admin/reindex":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_admin_reindex","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Reload content from the authoritative backend"}},"/api/v1/backoffice/admin/templates":{"put":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"put_api_v1_backoffice_admin_templates","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateFieldsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice put admin/templates"}},"/api/v1/backoffice/admin/users":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_admin_users","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"users":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get admin/users"},"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_admin_users","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post admin/users"}},"/api/v1/backoffice/admin/users/{id}":{"patch":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"patch_api_v1_backoffice_admin_users_id","parameters":[{"description":"Entity or user ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice patch admin/users/{id}"}},"/api/v1/backoffice/entities":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_entities","parameters":[{"description":"Source title, ID or summary","in":"query","name":"q","schema":{"type":"string"}},{"description":"Entity type","in":"query","name":"type","schema":{"type":"string"}},{"description":"draft, published, archived or deleted","in":"query","name":"status","schema":{"type":"string"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"Page size, 1-200","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get entities"},"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_entities","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post entities"}},"/api/v1/backoffice/entities/{id}":{"delete":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"delete_api_v1_backoffice_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice delete entities/{id}"},"get":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"get_api_v1_backoffice_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get entities/{id}"},"put":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"put_api_v1_backoffice_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice put entities/{id}"}},"/api/v1/backoffice/login":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_login","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelLoginInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[],"summary":"Backoffice post login"}},"/api/v1/backoffice/logout":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_logout","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[],"summary":"Backoffice post logout"}},"/api/v1/backoffice/me":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_me","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get me"}},"/api/v1/backoffice/preview":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_preview","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"html":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post preview"}},"/api/v1/backoffice/site-text":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_site-text","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get site-text"},"put":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"put_api_v1_backoffice_site-text","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteTextInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice put site-text"}},"/api/v1/backoffice/taxonomy/categories":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_taxonomy_categories","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"term":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post taxonomy/categories"}},"/api/v1/backoffice/taxonomy/tags":{"post":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"post_api_v1_backoffice_taxonomy_tags","parameters":[{"description":"Required and same-origin for cookie-authenticated writes; not required with Bearer JWT.","in":"header","name":"Origin","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"term":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice post taxonomy/tags"}},"/api/v1/backoffice/templates":{"get":{"description":"See docs/backoffice.md. Cookie-authenticated writes require a matching Origin. Admin routes require role=admin; other authenticated routes require editor/admin.","operationId":"get_api_v1_backoffice_templates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"studioCookie":[]},{"bearerAuth":[]}],"summary":"Backoffice get templates"}},"/api/v1/categories":{"get":{"operationId":"get_api_v1_categories","parameters":[{"description":"1 for flat list","in":"query","name":"flat","schema":{"type":"string"}},{"description":"0 to force flat","in":"query","name":"tree","schema":{"type":"string"}},{"description":"Flat page size (default 50, max 200)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Flat offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"Flat 1-based page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias of limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array"},"mode":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Category tree (or flat with ?flat=1; the flat list is paged with total/offset/limit)"},"post":{"operationId":"post_api_v1_categories","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"term":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Create categories"}},"/api/v1/categories/{id}":{"get":{"operationId":"get_api_v1_categories_id","parameters":[{"description":"Category id or slug","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"category":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Get category by id or slug"}},"/api/v1/discover":{"get":{"operationId":"get_api_v1_discover","parameters":[{"description":"new (default), today (Asia/Shanghai), or hot; hot uses the configured stats window with curated/relation fallback when no stats exist","in":"query","name":"kind","schema":{"type":"string"}},{"description":"Reading language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Result offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"Page size, 1-200 (default 50)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"One-based page, used when offset is absent","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias for limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Browse published new, today or hot content"}},"/api/v1/editorial/entities":{"get":{"operationId":"get_api_v1_editorial_entities","parameters":[{"description":"Source title, ID or summary","in":"query","name":"q","schema":{"type":"string"}},{"description":"Entity type","in":"query","name":"type","schema":{"type":"string"}},{"description":"draft, published, archived or deleted","in":"query","name":"status","schema":{"type":"string"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"Page size, 1-200","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"List editable source entries, including drafts"},"post":{"operationId":"post_api_v1_editorial_entities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Create source entry"}},"/api/v1/editorial/entities/{id}":{"delete":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"delete_api_v1_editorial_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Soft-delete source and hide its published translations"},"get":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"get_api_v1_editorial_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Read exact editable locale"},"put":{"description":"Exact locale with no fallback, including drafts. lang defaults to zh (content source), independent of visitor language. PUT requires the current shared revision. DELETE supports only the source; mark a translation deleted using PUT.","operationId":"put_api_v1_editorial_entities_id","parameters":[{"description":"Entity ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Exact editing locale; defaults to zh","in":"query","name":"lang","schema":{"enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorialEntityResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Save exact editable locale with shared revision"}},"/api/v1/editorial/preview":{"post":{"operationId":"post_api_v1_editorial_preview","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"html":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Preview Markdown, maps, flowcharts, images and citations (editor/admin JWT or API_TOKEN)"}},"/api/v1/editorial/site-text":{"get":{"operationId":"get_api_v1_editorial_site-text","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Read page text for editing"},"put":{"operationId":"put_api_v1_editorial_site-text","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteTextInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Replace one locale of page text with revision check (editor/admin JWT or API_TOKEN)"}},"/api/v1/entities":{"get":{"operationId":"get_api_v1_entities","parameters":[{"description":"Keyword","in":"query","name":"q","schema":{"type":"string"}},{"description":"Entity type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Tag id or slug","in":"query","name":"tag","schema":{"type":"string"}},{"description":"Category id or slug","in":"query","name":"category","schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Page size","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias of limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"List/search entities"},"post":{"operationId":"post_api_v1_entities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Create entity"}},"/api/v1/entities/{id}":{"delete":{"description":"Edits the Chinese source only; visitor language does not select a translation. Use /api/v1/editorial/entities/{id}?lang=xx for exact multilingual editing with mandatory shared revision. Requires editor/admin JWT or API_TOKEN.","operationId":"delete_api_v1_entities_id","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Soft-delete entity (status=deleted)"},"get":{"operationId":"get_api_v1_entities_id","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"},"infoFields":{"items":{"type":"object"},"type":"array"},"lang":{"type":"string"},"relations":{"items":{"$ref":"#/components/schemas/RelationView"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Get entity; relations holds at most 50 edges, relationsTotal the full count (page the rest via /relation)"},"patch":{"description":"Edits the Chinese source only; visitor language does not select a translation. Use /api/v1/editorial/entities/{id}?lang=xx for exact multilingual editing with mandatory shared revision. Requires editor/admin JWT or API_TOKEN.","operationId":"patch_api_v1_entities_id","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Patch entity fields"},"put":{"description":"Edits the Chinese source only; visitor language does not select a translation. Use /api/v1/editorial/entities/{id}?lang=xx for exact multilingual editing with mandatory shared revision. Requires editor/admin JWT or API_TOKEN.","operationId":"put_api_v1_entities_id","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Replace entity"}},"/api/v1/entities/{id}/history":{"get":{"operationId":"get_api_v1_entities_id_history","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"history":{"items":{"$ref":"#/components/schemas/HistoryEntry"},"type":"array"},"id":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Factual timeline (not content revisions)"}},"/api/v1/entities/{id}/perspectives":{"get":{"operationId":"get_api_v1_entities_id_perspectives","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Reading language, independent of perspective","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Optional exact region filter; no visitor-region inference","in":"query","name":"region","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspectivesResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Read published attributed regional/institutional perspectives"}},"/api/v1/entities/{id}/perspectives/{perspectiveId}":{"get":{"operationId":"get_api_v1_entities_id_perspectives_perspectiveId","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Reading language, independent of perspective","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Optional exact region filter; no visitor-region inference","in":"query","name":"region","schema":{"type":"string"}},{"description":"Perspective id","in":"path","name":"perspectiveId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspectivesResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Read published attributed regional/institutional perspectives"}},"/api/v1/entities/{id}/relation":{"delete":{"operationId":"delete_api_v1_entities_id_relation","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Delete relation doc"},"get":{"operationId":"get_api_v1_entities_id_relation","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Relation type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Direction: in or out","in":"query","name":"dir","schema":{"type":"string"}},{"description":"Page size (default 50, max 200)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias of limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"lang":{"type":"string"},"relationDoc":{"$ref":"#/components/schemas/RelationDoc"},"relationGroups":{"items":{"$ref":"#/components/schemas/RelationGroup"},"type":"array"},"relations":{"items":{"$ref":"#/components/schemas/RelationView"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Editable relation page + groups; relations paged with total/offset/limit"},"patch":{"description":"Replace the complete relation document. POST, PUT and PATCH currently have identical upsert semantics.","operationId":"patch_api_v1_entities_id_relation","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationDoc"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"relationDoc":{"$ref":"#/components/schemas/RelationDoc"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Upsert relation doc"},"post":{"description":"Replace the complete relation document. POST, PUT and PATCH currently have identical upsert semantics.","operationId":"post_api_v1_entities_id_relation","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationDoc"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"relationDoc":{"$ref":"#/components/schemas/RelationDoc"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Upsert relation doc"},"put":{"description":"Replace the complete relation document. POST, PUT and PATCH currently have identical upsert semantics.","operationId":"put_api_v1_entities_id_relation","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationDoc"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"relationDoc":{"$ref":"#/components/schemas/RelationDoc"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Upsert relation doc"}},"/api/v1/entities/{id}/versions":{"get":{"operationId":"get_api_v1_entities_id_versions","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"availableLangs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"lang":{"type":"string"},"revision":{"type":"integer"},"versions":{"items":{"$ref":"#/components/schemas/RevisionMeta"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Content edit revisions"}},"/api/v1/entities/{id}/versions/{n}":{"get":{"operationId":"get_api_v1_entities_id_versions_n","parameters":[{"description":"Entity id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Revision number","in":"path","name":"n","required":true,"schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entity":{"$ref":"#/components/schemas/Entity"},"infoFields":{"items":{"type":"object"},"type":"array"},"lang":{"type":"string"},"revision":{"type":"integer"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Revision snapshot"}},"/api/v1/me":{"get":{"operationId":"get_api_v1_me","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Current user"},"patch":{"operationId":"patch_api_v1_me","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Update profile"}},"/api/v1/openapi.json":{"get":{"operationId":"get_api_v1_openapi_json","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"This document"}},"/api/v1/reindex":{"post":{"description":"Requires API_TOKEN, not a user JWT. Reloads PostgreSQL when CONTENT_STORAGE=postgres; otherwise reloads files.","operationId":"post_api_v1_reindex","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Reload content from the authoritative backend"}},"/api/v1/relation-types":{"get":{"description":"Pairs describe entity types. Metro relations also require the metro fields and endpoint constraints documented in SCHEMA.md.","operationId":"get_api_v1_relation-types","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"relationTypes":{"items":{"$ref":"#/components/schemas/RelationType"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"List relation rules and directed [fromType,toType] pairs; labels use the Chinese source language"}},"/api/v1/relations":{"delete":{"description":"Sourced factual edges, persisted in the configured authoritative content backend.","operationId":"delete_api_v1_relations","parameters":[{"description":"Relation id (or JSON body {id})","in":"query","name":"id","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"string"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Delete factual relation edge by id"},"get":{"description":"Sourced factual edges, persisted in the configured authoritative content backend.","operationId":"get_api_v1_relations","parameters":[{"description":"Entity id","in":"query","name":"entity","schema":{"type":"string"}},{"description":"Relation type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Page size (default 50, max 200)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias of limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"type":"integer"},"relations":{"items":{"$ref":"#/components/schemas/RelationView"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"List relation edges (?entity=\u0026type=); paged with total/offset/limit, count equals total"},"post":{"description":"Sourced factual edges, persisted in the configured authoritative content backend.","operationId":"post_api_v1_relations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"relation":{"$ref":"#/components/schemas/Relation"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Create factual relation edge"}},"/api/v1/same-names":{"get":{"operationId":"get_api_v1_same-names","parameters":[{"description":"Exact title or alias; required unless id is supplied","in":"query","name":"q","schema":{"type":"string"}},{"description":"Published entry id; takes precedence over q","in":"query","name":"id","schema":{"type":"string"}},{"description":"Reading language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Result offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"Page size, 1-200","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Find published same-name entries"}},"/api/v1/search":{"get":{"operationId":"get_api_v1_search","parameters":[{"description":"Keyword (also matches tag names)","in":"query","name":"q","schema":{"type":"string"}},{"description":"Entity type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Tag","in":"query","name":"tag","schema":{"type":"string"}},{"description":"Category","in":"query","name":"category","schema":{"type":"string"}},{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Limit","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Search entities (same filters as list; includes highlight hits)"},"post":{"operationId":"post_api_v1_search","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Search with JSON body filters"}},"/api/v1/stats/hot":{"get":{"operationId":"get_api_v1_stats_hot","parameters":[{"description":"Language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}},{"description":"Days window","in":"query","name":"window","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"cache":{"type":"string"},"entities":{"items":{"properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"views":{"type":"integer"}},"type":"object"},"type":"array"},"hasStats":{"type":"boolean"},"lang":{"type":"string"},"total":{"type":"integer"},"windowDays":{"type":"integer"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Hot entities"}},"/api/v1/stats/summary":{"get":{"operationId":"get_api_v1_stats_summary","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"cache":{"type":"string"},"dataDir":{"type":"string"},"entitiesWithViews":{"type":"integer"},"hotCacheTTLSec":{"type":"integer"},"storage":{"type":"string"},"totalEvents":{"type":"integer"},"windowDays":{"type":"integer"},"windowEntities":{"type":"integer"},"windowViews":{"type":"integer"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Stats summary"}},"/api/v1/tags":{"get":{"operationId":"get_api_v1_tags","parameters":[{"description":"Page size (default 50, max 200)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Alias of limit","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"tags":{"items":{"$ref":"#/components/schemas/Term"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"List tags with counts; paged with total/offset/limit"},"post":{"operationId":"post_api_v1_tags","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"term":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"security":[{"bearerAuth":[]}],"summary":"Create tags"}},"/api/v1/tags/{id}":{"get":{"operationId":"get_api_v1_tags_id","parameters":[{"description":"Tag id or slug","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"tag":{"$ref":"#/components/schemas/Term"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Get tag by id or slug"}},"/api/v1/templates":{"get":{"operationId":"get_api_v1_templates","parameters":[{"description":"Default page text language","in":"query","name":"lang","schema":{"default":"en","enum":["zh","zh-hant","en","ja","ko","es","fr","de","pt","ru","ar","hi","id","th","vi","ms","tr","it","nl"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSettingsResponse"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Read template fields and multilingual page text"}},"/api/v1/types":{"get":{"operationId":"get_api_v1_types","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"types":{"items":{"$ref":"#/components/schemas/EntityType"},"type":"array"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"List supported entity types and directories; labels use the Chinese source language"}},"/api/v1/users/{id}":{"get":{"operationId":"get_api_v1_users_id","parameters":[{"description":"User id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/PublicProfile"}},"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Public user profile"}},"/api/v1/version":{"get":{"operationId":"get_api_v1_version","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Build and content version"}},"/mcp":{"post":{"operationId":"post_mcp","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient role or invalid Origin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict or stale revision"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal failure"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"MCP Streamable HTTP (anonymous reads; Bearer for writes)"}}}}
