{"openapi":"3.1.0","info":{"title":"Supramemory","description":"Personal Knowledge Graph — multi-origen, brain-like, API para agentes IA.","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["meta"],"summary":"Health","description":"Estado del servicio + counts de DB.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/notes":{"get":{"tags":["notes"],"summary":"List Notes","operationId":"list_notes_notes_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtrar por origen","title":"Source"},"description":"Filtrar por origen"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtrar por tag","title":"Tag"},"description":"Filtrar por tag"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"title":"Response List Notes Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["notes"],"summary":"Create Note","operationId":"create_note_notes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/tree":{"get":{"tags":["notes"],"summary":"Get Tree","description":"Devuelve la estructura de árbol jerárquico del vault (carpetas y archivos).","operationId":"get_tree_notes_tree_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/rename":{"post":{"tags":["notes"],"summary":"Rename Note","description":"Safe Rename: Renombra la nota y actualiza automáticamente los wikilinks en todo el vault.","operationId":"rename_note_notes_rename_post","parameters":[{"name":"note_id","in":"query","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteRenameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/daily":{"post":{"tags":["notes"],"summary":"Get Daily Note","description":"Abre o crea la nota diaria de hoy (Daily Note) basada en plantillas.","operationId":"get_daily_note_notes_daily_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/folders":{"post":{"tags":["notes"],"summary":"Create Folder","description":"Crea una carpeta dentro del vault de forma segura.","operationId":"create_folder_notes_folders_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["notes"],"summary":"Delete Folder","description":"Elimina una carpeta dentro del vault de forma segura y purga sus notas de la DB.","operationId":"delete_folder_notes_folders_delete","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Ruta de la carpeta a eliminar dentro del vault","title":"Path"},"description":"Ruta de la carpeta a eliminar dentro del vault"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/move":{"post":{"tags":["notes"],"summary":"Move Note","description":"Mueve una nota a otra carpeta del vault.","operationId":"move_note_notes_move_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/attachments":{"post":{"tags":["notes"],"summary":"Upload Attachment","description":"Sube un archivo adjunto (imagen, audio, pdf) a /vault/attachments/.","operationId":"upload_attachment_notes_attachments_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_notes_attachments_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/{note_id}":{"get":{"tags":["notes"],"summary":"Get Note","operationId":"get_note_notes__note_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["notes"],"summary":"Update Note","operationId":"update_note_notes__note_id__patch","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["notes"],"summary":"Delete Note","operationId":"delete_note_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/{note_id}/render":{"get":{"tags":["notes"],"summary":"Get Rendered","description":"Devuelve la nota con content renderizado a HTML (para el visor).","operationId":"get_rendered_notes__note_id__render_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Rendered Notes  Note Id  Render Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/{note_id}/unlinked-mentions":{"get":{"tags":["notes"],"summary":"Get Unlinked Mentions","description":"Busca menciones no enlazadas de esta nota en otras notas del vault.","operationId":"get_unlinked_mentions_notes__note_id__unlinked_mentions_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlinkedMentionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notes/{note_id}/link-mention":{"post":{"tags":["notes"],"summary":"Link Mention","description":"Convierte una mención en texto plano en la nota source_id en un [[wikilink]].","operationId":"link_mention_notes__note_id__link_mention_post","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkMentionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query":{"get":{"tags":["query"],"summary":"Query","description":"Búsqueda full-text BM25 sobre título + contenido.","operationId":"query_query_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Query de búsqueda","title":"Q"},"description":"Query de búsqueda"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"default":10,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/context":{"get":{"tags":["query"],"summary":"Context","description":"Endpoint estrella para agentes IA: contexto relevante con snippets.","operationId":"context_context_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Query de contexto","title":"Q"},"description":"Query de contexto"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"default":5,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/query/execute":{"post":{"tags":["query"],"summary":"Execute Query","description":"Ejecuta una consulta SQL de solo lectura segura (estilo Dataview).","operationId":"execute_query_query_execute_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph":{"get":{"tags":["graph"],"summary":"Get Graph","description":"Devuelve nodos y aristas para el graph view.\n\nCada nodo incluye su `degree` (cantidad de conexiones), usado para\nescalar el tamaño en el frontend.","operationId":"get_graph_graph_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtrar nodos por origen","title":"Source"},"description":"Filtrar nodos por origen"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtrar nodos por tag","title":"Tag"},"description":"Filtrar nodos por tag"},{"name":"min_degree","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Mínimo de conexiones","default":0,"title":"Min Degree"},"description":"Mínimo de conexiones"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/local/{note_id}":{"get":{"tags":["graph"],"summary":"Get Local Graph","description":"Devuelve el subgrafo local centrado en note_id a N saltos de distancia (estilo Obsidian Local Graph).","operationId":"get_local_graph_graph_local__note_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Profundidad de conexiones (1 a 5 saltos)","default":1,"title":"Depth"},"description":"Profundidad de conexiones (1 a 5 saltos)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/vault":{"post":{"tags":["ingest"],"summary":"Ingest Vault","description":"Re-indexa todos los archivos .md del vault y resuelve todas las conexiones del grafo.","operationId":"ingest_vault_ingest_vault_post","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Forzar re-indexación de todas las notas","default":false,"title":"Force"},"description":"Forzar re-indexación de todas las notas"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/feed":{"post":{"tags":["agents"],"summary":"Contribute","description":"Agente aporta una nota estructurada.\n\nCrea la nota, agrega topics como tags, y resuelve `related` como wikilinks.","operationId":"contribute_agents_feed_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNoteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"Consume","description":"Agente consulta conocimiento estructurado.\n\nCombina búsqueda por topics + query libre, devuelve snippets relevantes.","operationId":"consume_agents_feed_get","parameters":[{"name":"topics","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Topics a buscar","default":[],"title":"Topics"},"description":"Topics a buscar"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query libre adicional","title":"Q"},"description":"Query libre adicional"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"default":10,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/feed/digest":{"get":{"tags":["agents"],"summary":"Digest","description":"Resumen condensado para inyectar en prompt de agente.\n\nOptimizado para tamaño: cada item < 200 chars, máximo `limit` items.\nDevuelve un bloque de texto formateado en `meta.digest_text`.","operationId":"digest_agents_feed_digest_get","parameters":[{"name":"topics","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Topics"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"default":3,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tokens":{"post":{"tags":["tokens"],"summary":"Create","description":"Crea un nuevo token. **El token plain se muestra una sola vez** — guardalo ya.","operationId":"create_tokens_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tokens"],"summary":"List All","description":"Lista tokens existentes (sin el plain, solo metadata).","operationId":"list_all_tokens_get","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TokenInfo"},"title":"Response List All Tokens Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tokens/{name}/revoke":{"post":{"tags":["tokens"],"summary":"Revoke","description":"Revoca un token. Queda en la DB pero no se puede usar más.","operationId":"revoke_tokens__name__revoke_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tokens/{name}":{"delete":{"tags":["tokens"],"summary":"Delete","description":"Borra un token físicamente. No se puede recuperar.","operationId":"delete_tokens__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentNoteCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content","description":"Markdown con [[wikilinks]] y #tags"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","description":"Topics/tags para conectar con knowledge existente"},"kind":{"type":"string","enum":["observation","summary","link","question","answer"],"title":"Kind","default":"observation"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Qué tan confiable es el contenido (0-1)","default":0.8},"related":{"items":{"type":"string"},"type":"array","title":"Related","description":"Títulos de notas relacionadas (crea wikilinks)"}},"type":"object","required":["title","content"],"title":"AgentNoteCreate","description":"Schema para que un agente aporte una nota."},"AgentNoteResult":{"properties":{"note_id":{"type":"string","title":"Note Id"},"title":{"type":"string","title":"Title"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"related_resolved":{"items":{"type":"string"},"type":"array","title":"Related Resolved"}},"type":"object","required":["note_id","title","topics","related_resolved"],"title":"AgentNoteResult"},"Body_upload_attachment_notes_attachments_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_attachment_notes_attachments_post"},"ContextItem":{"properties":{"note_id":{"type":"string","title":"Note Id"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"source":{"type":"string","title":"Source"},"score":{"type":"number","title":"Score"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["note_id","title","snippet","source","score"],"title":"ContextItem"},"ContextResponse":{"properties":{"query":{"type":"string","title":"Query"},"items":{"items":{"$ref":"#/components/schemas/ContextItem"},"type":"array","title":"Items"}},"type":"object","required":["query","items"],"title":"ContextResponse"},"CreateFolderRequest":{"properties":{"path":{"type":"string","title":"Path"}},"type":"object","required":["path"],"title":"CreateFolderRequest"},"DailyNoteResponse":{"properties":{"note":{"$ref":"#/components/schemas/Note"},"created":{"type":"boolean","title":"Created"}},"type":"object","required":["note","created"],"title":"DailyNoteResponse"},"FeedResponse":{"properties":{"query":{"type":"object","title":"Query"},"items":{"items":{"$ref":"#/components/schemas/ContextItem"},"type":"array","title":"Items"},"meta":{"type":"object","title":"Meta"}},"type":"object","required":["query","items","meta"],"title":"FeedResponse"},"GraphEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"target_title":{"type":"string","title":"Target Title"},"weight":{"type":"number","title":"Weight","default":1.0},"kind":{"type":"string","enum":["wikilink","semantic","temporal","entity"],"title":"Kind","default":"wikilink"}},"type":"object","required":["source","target_title"],"title":"GraphEdge"},"GraphNode":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"source":{"type":"string","title":"Source"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"degree":{"type":"integer","title":"Degree","default":0}},"type":"object","required":["id","label","source"],"title":"GraphNode"},"GraphResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/GraphNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"GraphResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"notes_count":{"type":"integer","title":"Notes Count"},"links_count":{"type":"integer","title":"Links Count"}},"type":"object","required":["status","version","notes_count","links_count"],"title":"HealthResponse"},"LinkMentionRequest":{"properties":{"source_id":{"type":"string","title":"Source Id"},"target_title":{"type":"string","title":"Target Title"}},"type":"object","required":["source_id","target_title"],"title":"LinkMentionRequest"},"MoveNoteRequest":{"properties":{"note_id":{"type":"string","title":"Note Id"},"target_folder":{"type":"string","title":"Target Folder"}},"type":"object","required":["note_id","target_folder"],"title":"MoveNoteRequest"},"Note":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"source":{"type":"string","title":"Source","default":"manual"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"links":{"items":{"type":"string"},"type":"array","title":"Links"},"id":{"type":"string","title":"Id"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"backlinks":{"items":{"type":"string"},"type":"array","title":"Backlinks"}},"type":"object","required":["title","content","id","created_at","updated_at"],"title":"Note"},"NoteCreate":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"source":{"type":"string","title":"Source","default":"manual"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"links":{"items":{"type":"string"},"type":"array","title":"Links"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["title","content"],"title":"NoteCreate"},"NoteRenameRequest":{"properties":{"new_title":{"type":"string","title":"New Title"},"new_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Path"}},"type":"object","required":["new_title"],"title":"NoteRenameRequest"},"NoteRenameResponse":{"properties":{"status":{"type":"string","title":"Status"},"old_id":{"type":"string","title":"Old Id"},"new_id":{"type":"string","title":"New Id"},"old_title":{"type":"string","title":"Old Title"},"new_title":{"type":"string","title":"New Title"},"updated_files_count":{"type":"integer","title":"Updated Files Count"},"updated_links_count":{"type":"integer","title":"Updated Links Count"}},"type":"object","required":["status","old_id","new_id","old_title","new_title","updated_files_count","updated_links_count"],"title":"NoteRenameResponse"},"NoteUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"NoteUpdate"},"TokenCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Nombre humano-legible"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"Lista de scopes: read, write, admin","default":["read"]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"ISO timestamp opcional de expiración (ej: 2027-01-01T00:00:00Z)"}},"type":"object","required":["name"],"title":"TokenCreate"},"TokenInfo":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"type":"string","title":"Scopes"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"revoked":{"type":"integer","title":"Revoked"}},"type":"object","required":["name","scopes","created_at","revoked"],"title":"TokenInfo"},"UnlinkedMentionItem":{"properties":{"source_id":{"type":"string","title":"Source Id"},"source_title":{"type":"string","title":"Source Title"},"snippet":{"type":"string","title":"Snippet"},"match_text":{"type":"string","title":"Match Text"}},"type":"object","required":["source_id","source_title","snippet","match_text"],"title":"UnlinkedMentionItem"},"UnlinkedMentionsResponse":{"properties":{"note_id":{"type":"string","title":"Note Id"},"note_title":{"type":"string","title":"Note Title"},"mentions":{"items":{"$ref":"#/components/schemas/UnlinkedMentionItem"},"type":"array","title":"Mentions"}},"type":"object","required":["note_id","note_title","mentions"],"title":"UnlinkedMentionsResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}