{"_rev":"4-bd4a74e22f78c4ac6b871872080eb2f9","time":{"created":"2026-01-05T05:11:04.552Z","modified":"2026-01-05T05:11:05.141Z","1.0.0":"2026-01-05T04:09:24.171Z","1.0.1":"2026-01-05T05:11:04.814Z"},"_id":"@carrara88/n8n-nodes-couchdb","name":"@carrara88/n8n-nodes-couchdb","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@carrara88/n8n-nodes-couchdb","version":"1.0.1","description":"n8n community node for Apache CouchDB","keywords":["n8n-community-node-package","couchdb","n8n"],"license":"MIT","author":{"name":"https://github.com/carrara88"},"repository":{"type":"git","url":"git+https://github.com/carrara88/n8n-nodes-couchdb.git"},"homepage":"https://github.com/carrara88/n8n-nodes-couchdb","bugs":{"url":"https://github.com/carrara88/n8n-nodes-couchdb/issues"},"main":"dist/index.js","types":"dist/index.d.ts","n8n":{"n8nNodesApiVersion":1,"nodes":["dist/nodes/CouchDb/CouchDb.node.js"],"credentials":["dist/credentials/CouchDbApi.credentials.js"]},"publishConfig":{"access":"public"},"scripts":{"clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","build":"tsc && npm run copy-assets","copy-assets":"node scripts/copy-assets.js","prepublishOnly":"npm run build","pack":"npm run build && npm pack","lint":"echo \"add eslint and run lint\"","test":"npm run build"},"peerDependencies":{"n8n-workflow":">=1.0.0","n8n-core":">=1.0.0"},"devDependencies":{"@types/node":"^25.0.3","typescript":"^5.3.3"},"engines":{"node":">=18"},"_id":"@carrara88/n8n-nodes-couchdb@1.0.1","gitHead":"168cf7cc329fe6cdb67682d8a239843c4d28a557","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-iY4aihqnR8Jso3Y+HYsh4EK9CFBl98GFX3+qFYwv2YR/SPRlkUwrri/Qve4Ox6Vbs+C6HScm2HXexvOkGMBNZA==","shasum":"af20eeca37e617abd80a9755c561b4d8a0491451","tarball":"https://registry.npmjs.org/@carrara88/n8n-nodes-couchdb/-/n8n-nodes-couchdb-1.0.1.tgz","fileCount":15,"unpackedSize":69110,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDVuKUZDpf4gJLd0bTiQYCWkMGDLf8V5HCCR4gpUraqtAIgH/DscuJ/ysgLOhkwxKUIsydu8uV/tL6s3AwB91jatms="}]},"_npmUser":{"name":"carrara88","email":"carrara88@gmail.com"},"directories":{},"maintainers":[{"name":"carrara88","email":"carrara88@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-couchdb_1.0.1_1767589864689_0.19901157587002083"},"_hasShrinkwrap":false}},"maintainers":[{"name":"carrara88","email":"carrara88@gmail.com"}],"description":"n8n community node for Apache CouchDB","homepage":"https://github.com/carrara88/n8n-nodes-couchdb","keywords":["n8n-community-node-package","couchdb","n8n"],"repository":{"type":"git","url":"git+https://github.com/carrara88/n8n-nodes-couchdb.git"},"author":{"name":"https://github.com/carrara88"},"bugs":{"url":"https://github.com/carrara88/n8n-nodes-couchdb/issues"},"license":"MIT","readme":"# n8n CouchDB Community Node (`n8n-nodes-couchdb`)\r\n\r\n[![npm](https://img.shields.io/npm/v/%40carrara88%2Fn8n-nodes-couchdb?logo=npm&logoColor=white)](https://www.npmjs.com/package/@carrara88/n8n-nodes-couchdb)\r\n[![npm downloads](https://img.shields.io/npm/dm/%40carrara88%2Fn8n-nodes-couchdb?logo=npm&logoColor=white)](https://www.npmjs.com/package/@carrara88/n8n-nodes-couchdb)\r\n[![GitHub repo](https://img.shields.io/badge/GitHub-carrara88%2Fn8n--nodes--couchdb-181717?logo=github&logoColor=white)](https://github.com/carrara88/n8n-nodes-couchdb)\r\n[![CouchDB](https://img.shields.io/badge/Apache%20CouchDB-0B5FFF?logo=apache&logoColor=white)](https://github.com/apache/couchdb)\r\n\r\nCustom n8n nodes for Apache CouchDB with:\r\n\r\n- DB and document full CRUD\r\n- Mango query selectors\r\n- Paging\r\n- **Attachments** management (base64 I/O)\r\n- Bulk updates/deletes\r\n- Purge\r\n- Replace/merge update modes\r\n\r\n\r\n## Links\r\n\r\n- GitHub: https://github.com/carrara88/n8n-nodes-couchdb\r\n- npm: https://www.npmjs.com/package/@carrara88/n8n-nodes-couchdb\r\n\r\n\r\n\r\n## What’s included\r\n- Database: list (`{ name }`), create, delete.\r\n- Document operations: create, get, find (Mango), list (_all_docs with paging), update, delete, purge.\r\n- Attachments: get, put (base64), delete with automatic revision handling.\r\n- Filters: Mango selector plus Simple Filters (field = value, dot notation) merged automatically; when no selector is provided, Document ID is required for get/update/delete.\r\n- Pagination & sorting: page/pageSize, includeDocs toggle, optional metadata wrapper `{ docs, count, total }`, sort field/direction (server-side when selector allows, in-memory otherwise), extraFields when not returning full docs.\r\n- Safety & normalization: empty selectors ignored; bodies must be valid JSON objects; returned docs are normalized to avoid character-spread errors; invalid docs raise clear errors.\r\n- Update modes: merge by default; “Replace Document (override)” fully overwrites doc keeping `_id`/`_rev`.\r\n- Delete modes: `_bulk_docs` delete with optional `_purge` of the same revisions (`Purge After Delete` on by default); standalone `purge` operation available.\r\n- Get options: return only `_id`/`_rev` if desired; fetch specific revisions; include attachments, encoding info, `atts_since`, `_revisions`, `_revs_info`.\r\n\r\n## Installation (n8n)\r\n\r\n### Install a community node via the n8n GUI (recommended)\r\n\r\nFollow the official guide:\r\nhttps://docs.n8n.io/integrations/community-nodes/installation/gui-install/#install-a-community-node\r\n\r\nWhen prompted for the package name, install:\r\n- `@carrara88/n8n-nodes-couchdb`\r\n\r\n### Install via npm\r\n\r\n- `npm i @carrara88/n8n-nodes-couchdb`\r\n\r\nThen restart n8n so it loads the newly installed node.\r\n\r\n\r\n## Usage notes\r\n- Leave Filter empty/`{}` to rely on Document ID; use Simple Filters for quick equals, or a full Mango selector for complex queries.\r\n- Bulk update uses `_find` + `_bulk_docs`; replace mode overwrites everything except `_id`/`_rev`.\r\n- Bulk delete uses `_find` + `_bulk_docs` and, if enabled, `_purge` with the same revision map.\r\n- Purge expects `{ docId: [rev] }`; the delete flow builds this automatically when purge is enabled.\r\n- If CouchDB returns non-object documents, the node raises a clear error instead of emitting character-keyed objects.\r\n\r\n## Operations & key parameters (Document)\r\n- Operation: create | get | find | list documents | update | delete | purge | get attachment | put attachment | delete attachment.\r\n- Database: target DB name (loadOptions lists DBs via `_all_dbs`).\r\n- Document ID: required when no selector is provided for get/update/delete/purge/attachments.\r\n- Filter (Mango selector): JSON selector; overrides Document ID for get/find/update/delete.\r\n- Simple Filters: quick equals filters (dot notation) merged into the selector.\r\n- Pagination: Page Size + Page for find/list; includeDocs toggle; Wrap Response With Metadata (docs/count/total) or raw array.\r\n- Sorting: sortField + sortDirection (server-side when the selector includes the field; otherwise sorted client-side); extraFields when returning metadata-only rows.\r\n- Get options: returnFullDocument toggle; getRev to fetch a specific revision; attachments/attEncodingInfo/attsSince/revs/revsInfo flags.\r\n- Update: Body JSON + Body Fields (dot notation merge); Replace Document (override) to fully overwrite.\r\n- Delete: Purge After Delete to also `_purge` the deleted revisions.\r\n- Purge (standalone): expects docId + rev.\r\n- Attachments: get/put/delete with automatic revision fetch when not provided; put requires base64 data and content type.\r\n\r\n\r\n### Attachments\r\n\r\n- CouchDB attachments are stored under the document `_attachments` object.\r\n- Downloading an attachment typically uses `GET /{db}/{docId}/{attachmentName}`.\r\n\r\n### Delete vs purge (safety)\r\n\r\n- `_bulk_docs` delete marks documents as deleted (tombstones) and keeps history.\r\n- `_purge` is **irreversible** and bypasses normal revisioning/replication semantics.\r\n- In this custom node, **\"Purge After Delete\" defaults to true** for the Document → Delete operation. If you want safer behavior, disable it and reserve purge for explicit maintenance tasks.\r\n\r\n## Examples\r\n- Simple Filters (equals, dot notation): Field `metadata.category`, Value `news`; empty Mango selector ⇒ `{ \"metadata.category\": { \"$eq\": \"news\" } }`.\r\n- Mango selector: Filter `{ \"type\": \"workflow\", \"active\": true }`.\r\n- List documents with paging: Operation `List Documents`, Page Size `25`, Page `2`, Include Docs `true`, Wrap With Metadata `true`.\r\n- Replace update: Operation `Update`, Replace Document `true`, Body `{ \"name\": \"New Name\" }` ⇒ keeps only `_id`, `_rev`, `name`.\r\n- Delete with purge: Operation `Delete`, Purge After Delete `true`, Filter `{ \"type\": \"old\" }` ⇒ bulk delete + purge matching docs.\r\n- Attachment upload: Operation `Put Attachment`, set Document ID, Attachment Name, base64 data, content type; revision auto-fetched if not provided.\r\n\r\n## Development Quickstart\r\nThis section is for local development/contributing.\r\n\r\n1) Install deps: `npm install`\r\n2) Build: `npm run build` (copies logo.svg into dist)\r\n3) Make n8n load the node (for self-hosted n8n):\r\n  - Option A (recommended): install the package in n8n as a Community Node (GUI)\r\n  - Option B (advanced): use `N8N_CUSTOM_EXTENSIONS` and mount/copy this package into `/home/node/.n8n/custom`\r\n4) Restart n8n/worker and find the node under Custom.\r\n\r\n### Install via npm (when published)\r\n- `npm i @carrara88/n8n-nodes-couchdb`\r\n- If you run n8n in Docker and install the package on the host, ensure n8n can access it (e.g., install inside the container image, or mount `node_modules` appropriately).\r\n\r\n\r\n### Workflow snippet (list paginated)\r\n```json\r\n{\r\n  \"nodes\": [\r\n    {\r\n      \"parameters\": {\r\n        \"resource\": \"document\",\r\n        \"operation\": \"listDocs\",\r\n        \"db\": \"n8n_workflows\",\r\n        \"pageSize\": 25,\r\n        \"page\": 2,\r\n        \"includeDocs\": true\r\n      },\r\n      \"name\": \"CouchDB List\",\r\n      \"type\": \"@carrara88/n8n-nodes-couchdb.couchDb\",\r\n      \"typeVersion\": 1,\r\n      \"credentials\": {\r\n        \"couchDbApi\": {\r\n          \"id\": \"YOUR-CREDENTIAL-ID\"\r\n        }\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n## Credentials\r\n- Type: `couchDbApi`\r\n- Fields: Base URL (default `http://localhost:5984`), Username, Password\r\n","readmeFilename":"README.md"}