{"openapi":"3.1.0","info":{"title":"ZeroSync API","version":"1.0.0","description":"API REST pública do ZeroSync — seu hub pessoal de agenda, hábitos, finanças, listas, objetivos e notas. Use-a para ler e gravar seus dados a partir de assistentes externos, automações (n8n) ou código próprio.\n\n**Autenticação:** todas as rotas exigem um Personal Access Token (PAT) no header `Authorization: Bearer zsk_live_...`. Gere uma chave em https://app.zerosync.com.br/perfil (seção API Keys). Cada chave tem escopos `read` e/ou `write` — operações de leitura exigem `read`, operações de escrita exigem `write`.\n\n**Isolamento:** toda chave pertence a um único usuário; você só enxerga e altera os seus próprios dados.\n\n**Datas:** formato `YYYY-MM-DD`. **Horas:** `HH:MM`. **Dinheiro:** número decimal em BRL (ex: `42.9`).","contact":{"name":"ZeroSync","url":"https://app.zerosync.com.br"}},"servers":[{"url":"https://app.zerosync.com.br/api/v1","description":"Produção"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Tarefas","description":"Agenda e tarefas do dia."},{"name":"Finanças","description":"Transações, contas e resumo financeiro."},{"name":"Hábitos","description":"Hábitos e registros (check-ins)."},{"name":"Listas","description":"Compras e mídia (livros, filmes, cursos)."},{"name":"Objetivos","description":"Metas de curto, médio e longo prazo."},{"name":"Notas","description":"Diário, gratidão e reflexões."}],"paths":{"/tasks":{"get":{"tags":["Tarefas"],"summary":"Listar tarefas de um dia","description":"Retorna as tarefas de uma data (padrão: hoje). **Escopo: `read`.**","operationId":"listTasks","parameters":[{"name":"date","in":"query","required":false,"description":"Data no formato YYYY-MM-DD. Padrão: hoje.","schema":{"type":"string","format":"date","example":"2026-06-03"}}],"responses":{"200":{"description":"Lista de tarefas.","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}}}},"example":{"tasks":[{"id":"0d3f…","title":"Reunião com fornecedor","date":"2026-06-03","start_time":"09:00:00","end_time":"09:30:00","duration_minutes":30,"status":"pending"}]}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Tarefas"],"summary":"Criar tarefa","description":"Cria uma tarefa na agenda. Se `date`/`start_time` forem omitidos, usa hoje às 09:00 com 30 min. **Escopo: `write`.**","operationId":"createTask","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskInput"},"example":{"title":"Pagar fornecedor","date":"2026-06-03","start_time":"14:00","duration_minutes":45,"description":"Boleto venc. hoje","category":"Trabalho"}}}},"responses":{"201":{"description":"Tarefa criada.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEntity"},"example":{"id":"0d3f…","summary":"Tarefa \"Pagar fornecedor\" criada em 2026-06-03 às 14:00."}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"ID (UUID) da tarefa.","schema":{"type":"string","format":"uuid"}}],"patch":{"tags":["Tarefas"],"summary":"Atualizar tarefa","description":"Atualiza campos de uma tarefa existente. Todos os campos são opcionais. **Escopo: `write`.**","operationId":"updateTask","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"},"example":{"status":"completed"}}}},"responses":{"200":{"description":"Tarefa atualizada.","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/Task"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Tarefas"],"summary":"Excluir tarefa","description":"Remove uma tarefa. **Escopo: `write`.**","operationId":"deleteTask","responses":{"200":{"description":"Tarefa excluída.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/transactions":{"get":{"tags":["Finanças"],"summary":"Listar transações","description":"Lista transações com filtros opcionais. **Escopo: `read`.**","operationId":"listTransactions","parameters":[{"name":"from","in":"query","description":"Data inicial (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Data final (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","description":"Filtra por tipo.","schema":{"type":"string","enum":["income","expense","transfer"]}},{"name":"limit","in":"query","description":"Máximo de registros (1–1000, padrão 500).","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}}],"responses":{"200":{"description":"Lista de transações.","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}},"example":{"transactions":[{"id":"9a1c…","type":"expense","amount":42.9,"description":"Almoço","date":"2026-06-03","status":"cleared"}]}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Finanças"],"summary":"Lançar transação","description":"Lança uma receita (`income`) ou despesa (`expense`). A conta e a categoria são resolvidas por nome (`account`/`category`); se omitidas, usa a conta padrão e categoria 'Outros'. **Escopo: `write`.**","operationId":"createTransaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionInput"},"example":{"type":"expense","amount":42.9,"description":"Almoço","category":"Alimentação","account":"Nubank","date":"2026-06-03"}}}},"responses":{"201":{"description":"Transação lançada.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEntity"},"example":{"id":"9a1c…","summary":"Despesa de R$ 42,90 (Alimentação) lançada em Nubank. Saldo de Nubank: R$ 1.200,00."}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/finance/summary":{"get":{"tags":["Finanças"],"summary":"Resumo financeiro do mês","description":"Totais de entradas, saídas, líquido e saldo total das contas para um mês. **Escopo: `read`.**","operationId":"financeSummary","parameters":[{"name":"month","in":"query","description":"Mês no formato YYYY-MM. Padrão: mês atual.","schema":{"type":"string","example":"2026-06"}}],"responses":{"200":{"description":"Resumo do mês.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceSummary"},"example":{"month":"2026-06","income":8200,"expense":5400.5,"net":2799.5,"total_balance":14300.75}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/finance/accounts":{"get":{"tags":["Finanças"],"summary":"Listar contas","description":"Lista as contas do usuário com saldo atual. Útil para descobrir nomes válidos para o campo `account` ao lançar transações. **Escopo: `read`.**","operationId":"listAccounts","responses":{"200":{"description":"Lista de contas.","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}},"example":{"accounts":[{"id":"c0ff…","name":"Nubank","type":"checking","currency":"BRL","current_balance":1200}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/habits":{"get":{"tags":["Hábitos"],"summary":"Listar hábitos","description":"Lista os hábitos ativos do usuário. **Escopo: `read`.**","operationId":"listHabits","responses":{"200":{"description":"Lista de hábitos.","content":{"application/json":{"schema":{"type":"object","properties":{"habits":{"type":"array","items":{"$ref":"#/components/schemas/Habit"}}}},"example":{"habits":[{"id":"ab12…","name":"Beber água","frequency_type":"daily","target_quantity":2000,"unit":"ml"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Hábitos"],"summary":"Criar hábito","description":"Cria um novo hábito. **Escopo: `write`.**","operationId":"createHabit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitInput"},"example":{"name":"Beber água","frequency_type":"daily","target_quantity":2000,"unit":"ml","reminder_time":"09:00"}}}},"responses":{"201":{"description":"Hábito criado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEntity"},"example":{"id":"ab12…","summary":"Hábito \"Beber água\" criado."}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/habits/log":{"post":{"tags":["Hábitos"],"summary":"Registrar hábito (check-in)","description":"Marca um hábito como feito numa data. O hábito é localizado por nome (`habit_name`). Se a quantidade atingir a meta, é marcado como concluído. **Escopo: `write`.**","operationId":"logHabit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitLogInput"},"example":{"habit_name":"Beber água","quantity":2000,"date":"2026-06-03"}}}},"responses":{"201":{"description":"Registro criado/atualizado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEntity"},"example":{"id":"ab12…","summary":"Hábito \"Beber água\" marcado (2000ml) em 2026-06-03."}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/shopping":{"get":{"tags":["Listas"],"summary":"Listar itens de compra","description":"Lista os itens da lista de compras. **Escopo: `read`.**","operationId":"listShopping","parameters":[{"name":"horizon","in":"query","description":"Filtra pelo horizonte de compra.","schema":{"type":"string","enum":["short","medium","long"]}}],"responses":{"200":{"description":"Lista de itens.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ShoppingItem"}}}},"example":{"items":[{"id":"f00d…","title":"Café","horizon":"short","quantity":2,"bought":false}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Listas"],"summary":"Adicionar item de compra","description":"Adiciona um item à lista de compras. **Escopo: `write`.**","operationId":"createShopping","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShoppingItemInput"},"example":{"title":"Café","horizon":"short","quantity":2,"estimated_price":25.9,"category":"Mercado"}}}},"responses":{"201":{"description":"Item criado.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ShoppingItem"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/media":{"get":{"tags":["Listas"],"summary":"Listar itens de mídia","description":"Lista livros, cursos, filmes e séries. **Escopo: `read`.**","operationId":"listMedia","parameters":[{"name":"kind","in":"query","description":"Filtra por tipo de mídia.","schema":{"type":"string","enum":["book","course","movie","series"]}},{"name":"status","in":"query","description":"Filtra por status.","schema":{"type":"string","enum":["backlog","in_progress","done"]}}],"responses":{"200":{"description":"Lista de itens de mídia.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MediaItem"}}}},"example":{"items":[{"id":"b00k…","kind":"book","title":"Hábitos Atômicos","status":"in_progress"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Listas"],"summary":"Adicionar item de mídia","description":"Adiciona um livro/curso/filme/série à lista. **Escopo: `write`.**","operationId":"createMedia","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaItemInput"},"example":{"kind":"book","title":"Hábitos Atômicos","status":"backlog","rating":null}}}},"responses":{"201":{"description":"Item criado.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/MediaItem"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/goals":{"get":{"tags":["Objetivos"],"summary":"Listar objetivos","description":"Lista as metas do usuário. **Escopo: `read`.**","operationId":"listGoals","parameters":[{"name":"horizon","in":"query","description":"Filtra por horizonte.","schema":{"type":"string","enum":["short","medium","long"]}}],"responses":{"200":{"description":"Lista de objetivos.","content":{"application/json":{"schema":{"type":"object","properties":{"goals":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}}}},"example":{"goals":[{"id":"g0a1…","title":"Faturar 100k/mês","horizon":"long","status":"active","progress":40}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Objetivos"],"summary":"Criar objetivo","description":"Cria uma nova meta. **Escopo: `write`.**","operationId":"createGoal","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalInput"},"example":{"title":"Faturar 100k/mês","description":"Meta anual da Speed Full","horizon":"long","target_date":"2026-12-31"}}}},"responses":{"201":{"description":"Objetivo criado.","content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"$ref":"#/components/schemas/Goal"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/notes":{"get":{"tags":["Notas"],"summary":"Listar notas","description":"Lista notas do diário (journal/gratidão/reflexão). **Escopo: `read`.**","operationId":"listNotes","parameters":[{"name":"from","in":"query","description":"Data inicial (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Data final (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","description":"Filtra por tipo de nota.","schema":{"type":"string","enum":["journal","gratidao","reflexao"]}}],"responses":{"200":{"description":"Lista de notas.","content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}},"example":{"notes":[{"id":"n0t3…","date":"2026-06-03","title":"Dia produtivo","type":"journal","mood":4,"tags":["trabalho"]}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}},"post":{"tags":["Notas"],"summary":"Criar nota","description":"Cria uma nota no diário. **Escopo: `write`.**","operationId":"createNote","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteInput"},"example":{"date":"2026-06-03","title":"Dia produtivo","content":"Fechei 3 pedidos grandes.","type":"journal","mood":4,"tags":["trabalho","vitória"]}}}},"responses":{"201":{"description":"Nota criada.","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/Note"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"zsk_live_...","description":"Personal Access Token. Envie no header `Authorization: Bearer zsk_live_xxxxx`. Gere em https://app.zerosync.com.br/perfil."}},"responses":{"Unauthorized":{"description":"Token ausente ou inválido.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing":{"value":{"error":"missing_token"}},"invalid":{"value":{"error":"invalid_token"}}}}}},"Forbidden":{"description":"A chave não tem o escopo necessário para esta operação.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"insufficient_scope"}}}},"NotFound":{"description":"Recurso não encontrado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found"}}}},"ValidationError":{"description":"Corpo/parâmetros inválidos.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"issues":{"type":"array","description":"Detalhes da validação (formato Zod).","items":{"type":"object"}}}}]},"example":{"error":"validation_error","issues":[{"path":["title"],"message":"title é obrigatório"}]}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Código/mensagem do erro.","example":"invalid_token"}}},"CreatedEntity":{"type":"object","description":"Resposta padrão de ações de escrita do assistente.","properties":{"id":{"type":"string","description":"ID da entidade criada.","nullable":true},"summary":{"type":"string","description":"Resumo legível (PT-BR) da ação realizada."}}},"TaskInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Título da tarefa."},"date":{"type":"string","format":"date","description":"Data (YYYY-MM-DD). Padrão: hoje."},"start_time":{"type":"string","description":"Hora de início (HH:MM). Padrão: 09:00.","example":"14:00"},"duration_minutes":{"type":"integer","description":"Duração em minutos. Padrão: 30.","minimum":1},"description":{"type":"string","nullable":true},"category":{"type":"string","description":"Nome da categoria (resolvido por correspondência).","nullable":true}}},"TaskUpdate":{"type":"object","description":"Campos opcionais para atualização parcial.","properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"date":{"type":"string","format":"date"},"start_time":{"type":"string","example":"14:00"},"end_time":{"type":"string","example":"14:45"},"duration_minutes":{"type":"integer","minimum":1},"status":{"type":"string","enum":["pending","in_progress","completed","skipped"]}}},"Task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"date":{"type":"string","format":"date"},"start_time":{"type":"string","example":"09:00:00"},"end_time":{"type":"string","example":"09:30:00"},"duration_minutes":{"type":"integer"},"status":{"type":"string","enum":["pending","in_progress","completed","skipped"]},"source":{"type":"string","example":"api"}}},"TransactionInput":{"type":"object","required":["type","amount","description"],"properties":{"type":{"type":"string","enum":["income","expense"],"description":"Receita ou despesa."},"amount":{"type":"number","description":"Valor em BRL (positivo).","example":42.9},"description":{"type":"string","description":"Descrição da transação."},"category":{"type":"string","nullable":true,"description":"Nome da categoria (resolvido por correspondência)."},"account":{"type":"string","nullable":true,"description":"Nome da conta (resolvido por correspondência). Padrão: conta principal."},"date":{"type":"string","format":"date","description":"Data (YYYY-MM-DD). Padrão: hoje."}}},"Transaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["income","expense","transfer"]},"amount":{"type":"number"},"description":{"type":"string"},"date":{"type":"string","format":"date"},"status":{"type":"string","enum":["pending","cleared"]},"account_id":{"type":"string","format":"uuid","nullable":true},"category_id":{"type":"string","format":"uuid","nullable":true}}},"FinanceSummary":{"type":"object","properties":{"month":{"type":"string","example":"2026-06"},"income":{"type":"number","description":"Total de entradas no mês."},"expense":{"type":"number","description":"Total de saídas no mês."},"net":{"type":"number","description":"Líquido (entradas - saídas)."},"total_balance":{"type":"number","description":"Saldo somado de todas as contas."}}},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["checking","savings","cash","credit_card","investment","other"]},"currency":{"type":"string","example":"BRL"},"current_balance":{"type":"number"}}},"HabitInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Nome do hábito."},"frequency_type":{"type":"string","enum":["daily","weekly","custom"],"default":"daily"},"target_quantity":{"type":"number","nullable":true,"description":"Meta numérica (ex: 2000)."},"unit":{"type":"string","nullable":true,"description":"Unidade (ex: ml)."},"reminder_time":{"type":"string","nullable":true,"description":"Horário do lembrete (HH:MM).","example":"09:00"}}},"HabitLogInput":{"type":"object","required":["habit_name"],"properties":{"habit_name":{"type":"string","description":"Nome do hábito (resolvido por correspondência)."},"quantity":{"type":"number","nullable":true,"description":"Quantidade realizada. Padrão: meta do hábito."},"date":{"type":"string","format":"date","description":"Data do registro (YYYY-MM-DD). Padrão: hoje."}}},"Habit":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"frequency_type":{"type":"string","enum":["daily","weekly","custom"]},"target_quantity":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"reminder_time":{"type":"string","nullable":true},"archived":{"type":"boolean"}}},"ShoppingItemInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"horizon":{"type":"string","enum":["short","medium","long"],"default":"short"},"quantity":{"type":"integer","nullable":true,"minimum":1},"estimated_price":{"type":"number","nullable":true,"minimum":0},"category":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}}},"ShoppingItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"horizon":{"type":"string","enum":["short","medium","long"]},"quantity":{"type":"integer","nullable":true},"estimated_price":{"type":"number","nullable":true},"category":{"type":"string","nullable":true},"bought":{"type":"boolean"}}},"MediaItemInput":{"type":"object","required":["kind","title"],"properties":{"kind":{"type":"string","enum":["book","course","movie","series"]},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","in_progress","done"],"default":"backlog"},"rating":{"type":"integer","minimum":1,"maximum":5,"nullable":true},"notes":{"type":"string","nullable":true},"cover_url":{"type":"string","format":"uri","nullable":true},"external_url":{"type":"string","format":"uri","nullable":true}}},"MediaItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["book","course","movie","series"]},"title":{"type":"string"},"status":{"type":"string","enum":["backlog","in_progress","done"]},"rating":{"type":"integer","nullable":true}}},"GoalInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"horizon":{"type":"string","enum":["short","medium","long"],"default":"medium"},"status":{"type":"string","enum":["active","done","paused","cancelled"],"default":"active"},"progress":{"type":"integer","minimum":0,"maximum":100,"default":0},"target_date":{"type":"string","format":"date","nullable":true}}},"Goal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"horizon":{"type":"string","enum":["short","medium","long"]},"status":{"type":"string","enum":["active","done","paused","cancelled"]},"progress":{"type":"integer"},"target_date":{"type":"string","format":"date","nullable":true},"milestones_total":{"type":"integer"},"milestones_done":{"type":"integer"}}},"NoteInput":{"type":"object","required":["date"],"properties":{"date":{"type":"string","format":"date"},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"mood":{"type":"integer","minimum":1,"maximum":5,"nullable":true},"tags":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["journal","gratidao","reflexao"],"default":"journal"}}},"Note":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"mood":{"type":"integer","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["journal","gratidao","reflexao"]}}}}}}