{"_id":"@azysinovacao/todoist-client","name":"@azysinovacao/todoist-client","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@azysinovacao/todoist-client","version":"0.1.0","description":"Cliente JS da API v1 unificada do Todoist (cobertura ~100% REST + Sync; zero deps; dual CJS/ESM). Gotchas embutidos.","main":"index.cjs","module":"index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.cjs"}},"type":"commonjs","engines":{"node":">=18"},"keywords":["todoist","todoist-api","task-management","productivity","azys"],"license":"MIT","_id":"@azysinovacao/todoist-client@0.1.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-H79rr/pf9bsBx9XQZzVq3BRk9Y7qcwYbzP6iqTHfhR8bnnIrkNMGKpiNAJ/IexiU0yy8TK6UjreOrVlhURk6JQ==","shasum":"16b68f147d4d8ae264e4e4bc013239ebbac68163","tarball":"https://registry.npmjs.org/@azysinovacao/todoist-client/-/todoist-client-0.1.0.tgz","fileCount":4,"unpackedSize":22906,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAOJ99uDwe30HcHSmWiThvPabaTmBFgTEcydGbjeEnDgAiAij0H1tU0HGOaB1AGGckB43mhbBdYIpmeoA+oeaeVgSQ=="}]},"_npmUser":{"name":"denisferrari","email":"denisferrari@azys.com.br"},"directories":{},"maintainers":[{"name":"denisferrari","email":"denisferrari@azys.com.br"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/todoist-client_0.1.0_1780838470466_0.9629582470175293"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-07T13:21:10.276Z","0.1.0":"2026-06-07T13:21:10.609Z","modified":"2026-06-07T13:21:10.833Z"},"maintainers":[{"name":"denisferrari","email":"denisferrari@azys.com.br"}],"description":"Cliente JS da API v1 unificada do Todoist (cobertura ~100% REST + Sync; zero deps; dual CJS/ESM). Gotchas embutidos.","keywords":["todoist","todoist-api","task-management","productivity","azys"],"license":"MIT","readme":"# @azysinovacao/todoist-client\n\nCliente JS da **API v1 unificada do Todoist**. Cobertura **~100% do REST** (102 ops) + **Sync API** + compostos. **Zero dependências** (usa `fetch`/`FormData`/`Blob` nativos do Node 18+), **dual CJS/ESM**. Gotchas embutidos (D1–D10).\n\n> **Status:** desenvolvida e **testada de ponta a ponta contra a API real** (2026-06-07): bateria completa **74/74 métodos PASS**, ambiente descartável limpo (ver `2026-06-07_testes_todoist-api.md` §BATERIA 6). Endereça a **lacuna da Piece oficial** do Activepieces (parcial) e da camada do MCP oficial (curada). **NÃO publicada no npm** nesta rodada — ver \"Publicar\" abaixo.\n\n## Uso\n\n```js\nconst { createTodoist } = require(\"@azysinovacao/todoist-client\"); // ou: import { createTodoist } from \"@azysinovacao/todoist-client\"\nconst td = createTodoist(process.env.TODOIST_TOKEN);\n\nawait td.getUser();\nconst p = await td.addProject({ name: \"Trabalho\", color: \"blue\" });\nconst t = await td.addTask({ content: \"Comprar pão\", project_id: p.id, priority: 4, due_string: \"amanhã 9h\" });\nawait td.updateTask(t.id, { description: \"integral\" });   // patch parcial seguro (D8)\nawait td.commentWithFile({ task_id: t.id }, \"nota fiscal\", { name: \"nf.pdf\", mimeType: \"application/pdf\", base64: \"<...>\" });\n```\n\n## Gotchas embutidos\n\n- **`priority` é INVERTIDO** (D3): na API **4 = mais alta**, 1 = mais baixa. Helpers `td.uiPriority(api)` e `td.apiPriority(ui)` convertem (UI P1 = API 4).\n- **IDs são string** (D4) — Label/Filter são strings numéricas; demais são alfanuméricos. A lib trata tudo como string.\n- **`update*` é patch parcial seguro** (D8): envie só o que muda; o resto é preservado (sem GET-merge).\n- **`color`** aceita nome (`berry_red`…`taupe`) ou inteiro (30–49) (D7).\n- **`completedByCompletionDate/ByDueDate`** retornam a chave **`items`** (D5).\n- **Paginação:** métodos `getAll*` seguem `next_cursor`; ou use `td.paginate(method, path, params, listKey)`.\n- **429:** auto-retry com backoff (respeita `Retry-After`).\n- **`commentWithFile(target, content, file)`** = upload + comentário com anexo numa chamada (`target` = `{task_id}` ou `{project_id}`).\n- **Filtros salvos** só via Sync: `td.addFilter({name,query,color})` / `td.deleteFilter(id)`.\n- **Escotilha:** `td.raw(method, path, { params, json, form })` para qualquer endpoint.\n\n## Métodos (cobertura ~100%)\n\n- **Tasks:** `addTask, getTasks, getAllTasks, getTask, updateTask, deleteTask, moveTask, closeTask, reopenTask, quickAdd, getTasksByFilter, completedByCompletionDate, completedByDueDate`\n- **Projects:** `addProject, getProjects, getAllProjects, getProject, updateProject, deleteProject, archiveProject, unarchiveProject, joinProject, getProjectCollaborators, getArchivedProjects, searchProjects, getProjectPermissions`\n- **Sections:** `addSection, getSections, getSection, updateSection, deleteSection, archiveSection, unarchiveSection, searchSections`\n- **Labels:** `addLabel, getLabels, getLabel, updateLabel, deleteLabel, searchLabels, getSharedLabels, renameSharedLabel, removeSharedLabel`\n- **Comments:** `addComment, getComments, getComment, updateComment, deleteComment` · **composto** `commentWithFile`\n- **Reminders:** `addReminder, getReminders, getReminder, updateReminder, deleteReminder`\n- **Location reminders:** `addLocationReminder, getLocationReminders, getLocationReminder, updateLocationReminder, deleteLocationReminder`\n- **Folders:** `addFolder, getFolders, getFolder, updateFolder, deleteFolder`\n- **Uploads:** `uploadFile, deleteUpload`\n- **Templates:** `exportTemplateUrl, exportTemplateFile, createProjectFromFile, importIntoProjectFromFile, importFromTemplateId`\n- **User/Activity/Backups:** `getUser, getProductivityStats, updateNotificationSetting, getActivities, getBackups, downloadBackup`\n- **Emails/Ids:** `getOrCreateEmail, disableEmail, getIdMappings`\n- **Workspaces:** `createWorkspace, getWorkspaces, getWorkspace, updateWorkspace, deleteWorkspace, getWorkspaceUsers, inviteWorkspaceUsers, updateWorkspaceUser, removeWorkspaceUser, getWorkspaceActiveProjects, getWorkspaceArchivedProjects, getPlanDetails, joinWorkspace, updateWorkspaceLogo, getInvitations, getAllInvitations, deleteInvitation, acceptInvitation, rejectInvitation`\n- **Auth (destrutivo):** `migratePersonalToken, revokeAccessToken, revokeToken`\n- **Billing:** `getSubscriptionInfo, reactivatePlan, cancelPlan`\n- **Sync:** `sync, syncCommand, addFilter, deleteFilter`\n- **Utilidades:** `raw, paginate, uiPriority, apiPriority, getGotchas`\n\n## Publicar (npm)\n\n`@azysinovacao` exige a org no npm. Publicar com token **Granular Read/Write** ou **Classic Automation** (Publish dá 403 por 2FA), via `.npmrc` temporário **fora do vault**: `npm publish --access public`. 1º publish de escopo novo pode levar minutos para propagar. Ver guia §6a.\n","readmeFilename":"README.md","_rev":"1-bad9dc5801c196a63e6951c7d49df3e6"}