{"_id":"zotero-client-ts","_rev":"3-69b08cacc97dabed0ff482c1baaf42a6","name":"zotero-client-ts","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"zotero-client-ts","version":"0.1.0","keywords":["zotero","api","client","typescript","research","bibliography","reference-manager","citations","esm","cjs","type-safe","async","http-client"],"author":{"name":"Elicit"},"license":"MIT","_id":"zotero-client-ts@0.1.0","maintainers":[{"name":"vivalapanda_","email":"panda@elicit.com"}],"homepage":"https://github.com/elicit/zotero-client#readme","bugs":{"url":"https://github.com/elicit/zotero-client/issues"},"dist":{"shasum":"4605451761fa1b9b6c7156ef13060510b9e98bd2","tarball":"https://registry.npmjs.org/zotero-client-ts/-/zotero-client-ts-0.1.0.tgz","fileCount":13,"integrity":"sha512-tkG/1OBmgaGB4alQKtEgXrrN3Qei8yun7sIPV326KWuwgdyp6UXJyjsHI5Q1cPa9R/xKyvC6GpWlWWSqkA2HRA==","signatures":[{"sig":"MEUCIQDbEjDUQyxYWNlXHtjF8AM4IPWMtvJAmBvEsMe3Dq9TcgIgXz90GNe5YYsZr9brhbal3TRlb6iv3/ctnKWSsCqCsnY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84032},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a20b366b4694924618d601abae0bd0a6ca7dd716","scripts":{"lint":"tsc --noEmit","test":"bun test","build":"bun run build:esm && bun run build:cjs && bun run build:types","build:cjs":"bun build src/index.ts --target node --format cjs --external spark-md5 --outfile dist/index.cjs","build:esm":"bun build src/index.ts --outdir dist --target node --format esm --external spark-md5","test:watch":"bun test --watch","build:types":"tsc --emitDeclarationOnly --declaration --declarationMap","prepublishOnly":"bun run build"},"_npmUser":{"name":"vivalapanda_","email":"panda@elicit.com"},"repository":{"url":"git+ssh://git@github.com/elicit/zotero-client.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight, minimalistic TypeScript client for the Zotero API. Complete TypeScript re-implementation with 100% API compatibility, full type safety, and modern ESM/CJS builds.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"spark-md5":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","fetch-mock":"9.11.0","typescript":"^5.9.3","@types/spark-md5":"^3.0.5"},"_npmOperationalInternal":{"tmp":"tmp/zotero-client-ts_0.1.0_1760646828024_0.061318366717451056","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"zotero-client-ts","version":"0.1.1","keywords":["zotero","api","client","typescript","research","bibliography","reference-manager","citations","esm","cjs","type-safe","async","http-client"],"author":{"name":"Elicit"},"license":"MIT","_id":"zotero-client-ts@0.1.1","maintainers":[{"name":"vivalapanda_","email":"panda@elicit.com"}],"homepage":"https://github.com/elicit/zotero-client#readme","bugs":{"url":"https://github.com/elicit/zotero-client/issues"},"dist":{"shasum":"0fbed10019a58817abecb5d96b7e59b17dd5d0f0","tarball":"https://registry.npmjs.org/zotero-client-ts/-/zotero-client-ts-0.1.1.tgz","fileCount":13,"integrity":"sha512-aARc6hbLcTggBaOuSos/0MsnWjahDxRTbreLJ5Ca79OTJrCOP6kFlgI8JZ5O7sgOxBZdxQtlDV+cJu11nVAcOQ==","signatures":[{"sig":"MEQCIG11FU45B54Zvq0AgaftMoswrHr4ZIyBbRNBmap5ZB5KAiBq24T2opqoiJN/vNjHyGoM0vJif/iN9C/FmbQkpW5qVQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84032},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ef95659ea2cfa445191e561f9534417eef9d31e5","scripts":{"lint":"tsc --noEmit","test":"bun test","build":"bun run build:esm && bun run build:cjs && bun run build:types","build:cjs":"bun build src/index.ts --target node --format cjs --external spark-md5 --outfile dist/index.cjs","build:esm":"bun build src/index.ts --outdir dist --target node --format esm --external spark-md5","test:watch":"bun test --watch","build:types":"tsc --emitDeclarationOnly --declaration --declarationMap","prepublishOnly":"bun run build"},"_npmUser":{"name":"vivalapanda_","email":"panda@elicit.com"},"repository":{"url":"git+ssh://git@github.com/elicit/zotero-client.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight, minimalistic TypeScript client for the Zotero API. Complete TypeScript re-implementation with 100% API compatibility, full type safety, and modern ESM/CJS builds.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"spark-md5":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","fetch-mock":"9.11.0","typescript":"^5.9.3","@types/spark-md5":"^3.0.5"},"_npmOperationalInternal":{"tmp":"tmp/zotero-client-ts_0.1.1_1760647538002_0.15790093481486722","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"zotero-client-ts","version":"0.1.2","description":"A lightweight, minimalistic TypeScript client for the Zotero API. Complete TypeScript re-implementation with 100% API compatibility, full type safety, and modern ESM/CJS builds.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"bun run build:esm && bun run build:cjs && bun run build:types","build:esm":"bun build src/index.ts --outdir dist --target node --format esm --external spark-md5","build:cjs":"bun build src/index.ts --target node --format cjs --external spark-md5 --outfile dist/index.cjs","build:types":"tsc --emitDeclarationOnly --declaration --declarationMap","test":"bun test","test:watch":"bun test --watch","lint":"tsc --noEmit","prepublishOnly":"bun run build"},"keywords":["zotero","api","client","typescript","research","bibliography","reference-manager","citations","esm","cjs","type-safe","async","http-client"],"author":{"name":"Elicit"},"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/elicit/zotero-client.git"},"bugs":{"url":"https://github.com/elicit/zotero-client/issues"},"homepage":"https://github.com/elicit/zotero-client#readme","dependencies":{"spark-md5":"^3.0.2"},"devDependencies":{"@types/bun":"latest","@types/spark-md5":"^3.0.5","fetch-mock":"9.11.0","typescript":"^5.9.3"},"engines":{"node":">=18.0.0"},"_id":"zotero-client-ts@0.1.2","gitHead":"ef95659ea2cfa445191e561f9534417eef9d31e5","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-9gJH5nPse8GT5nWhfzjOgDS9Z+RLA8UnLNGweD89R9+iFSdP+u3hKgER9Pmt9EgBadLBbV1d34kJI/CM8MSJxA==","shasum":"14b544e948a7a6fe88a5d7eb39f03cbe8c7a210e","tarball":"https://registry.npmjs.org/zotero-client-ts/-/zotero-client-ts-0.1.2.tgz","fileCount":13,"unpackedSize":84152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCezW7/E78LtmHiPQPfUfYFI44JVBlJ+NLJG1in0er9MAIhAOQDViiZakndqb1eTlhKTynqEv7nO892XM0FKx79X6QW"}]},"_npmUser":{"name":"vivalapanda_","email":"panda@elicit.com"},"directories":{},"maintainers":[{"name":"vivalapanda_","email":"panda@elicit.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zotero-client-ts_0.1.2_1760649217624_0.08666834827149272"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-16T20:33:47.927Z","modified":"2025-10-16T21:13:38.085Z","0.1.0":"2025-10-16T20:33:48.326Z","0.1.1":"2025-10-16T20:45:38.189Z","0.1.2":"2025-10-16T21:13:37.859Z"},"bugs":{"url":"https://github.com/elicit/zotero-client/issues"},"author":{"name":"Elicit"},"license":"MIT","homepage":"https://github.com/elicit/zotero-client#readme","keywords":["zotero","api","client","typescript","research","bibliography","reference-manager","citations","esm","cjs","type-safe","async","http-client"],"repository":{"type":"git","url":"git+ssh://git@github.com/elicit/zotero-client.git"},"description":"A lightweight, minimalistic TypeScript client for the Zotero API. Complete TypeScript re-implementation with 100% API compatibility, full type safety, and modern ESM/CJS builds.","maintainers":[{"name":"vivalapanda_","email":"panda@elicit.com"}],"readme":"# zotero-client-ts\n\nA lightweight, minimalistic TypeScript client for the Zotero API.\n\n## Test Coverage\n\n### ✅ **159/159 Tests Passing (100%)**\n\nAll unit and integration tests passing.\n\n#### api.spec.ts - 84 tests\n\n- Request parameter handling (13 tests)\n- GET request construction (24 tests)\n- Write request construction (13 tests)\n- Attachment requests (7 tests)\n- Meta requests (9 tests)\n- Pretend calls (3 tests)\n- Access validation (1 test)\n- Invalid call handling (8 tests)\n- Extension/plugin system (5 tests)\n\n#### request.spec.ts - 69 tests\n\n- Meta read requests (4 tests)\n- Item read requests (17 tests)\n- Misc read requests (16 tests)\n- GET requests with extra params (4 tests)\n- Failing/empty/raw responses (6 tests)\n- Item write & delete requests (12 tests)\n- Failing write & delete requests (3 tests)\n- File upload (13 tests - 3-stage process, error handling)\n- File download (2 tests)\n- Configuration (1 test)\n\n#### smoke.test.ts - 6 tests\n\n- Basic functionality smoke tests\n\n### Test Commands\n\n```bash\n# Run all tests\nbun test\n# Result: 159 pass, 0 fail, 650 expect() calls\n\n# Run specific test suite\nbun test test/api.spec.ts\nbun test test/request.spec.ts\nbun test test/smoke.test.ts\n```\n\n## Development Notes\n\n### Architecture\n\nThe library follows the original's three-layer architecture:\n\n- **API Layer** (`src/api.ts`): Fluent chainable interface using closure-based state\n- **Request Layer** (`src/request.ts`): HTTP communication, retry logic, file handling\n- **Response Layer** (`src/response.ts`): Specialized response classes for different operations\n\n### Key Design Decisions\n\n- **100% API Compatibility**: Every method signature matches the original exactly\n- **Modern TypeScript**: Leveraging TypeScript's type system for better DX\n- **Bun-first**: Optimized for Bun runtime, but works in Node.js 18+\n\n### Testing Strategy\n\n1. **Unit Tests**: Each module tested in isolation\n2. **Integration Tests**: Full request/response cycles with mocks\n3. **Compatibility Tests**: Side-by-side with original library\n\n### Build Artifacts\n\n```\ndist/\n├── index.js       - ESM bundle (31.4 KB)\n├── index.cjs      - CommonJS bundle\n└── *.d.ts         - TypeScript definitions\n```\n\n## Quick Start\n\n```bash\n# Install dependencies\nbun install\n\n# Build the project\nbun run build\n\n# Run tests\nbun test\n\n# Type checking\nbun run lint\n```\n\n## Usage Example\n\n```typescript\nimport api from \"zotero-client-ts\";\n\n// Initialize with API key\nconst zotero = api(\"YOUR_API_KEY\").library(\"user\", 12345).items().top();\n\n// Fetch items\nconst response = await zotero.get();\nconsole.log(response.getData());\n\n// Chainable API\nconst item = await api(\"KEY\").library(\"user\", 123).items(\"ITEMKEY\").version(42).get();\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}