{"_id":"@chetodb/business-central","_rev":"6-da55487adacab337d24cd4e02e94cb90","name":"@chetodb/business-central","dist-tags":{"latest":"0.3.0"},"versions":{"0.0.0":{"name":"@chetodb/business-central","version":"0.0.0","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"author":{"url":"ChetoDB","name":"David Cheto"},"license":"MIT","_id":"@chetodb/business-central@0.0.0","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"dist":{"shasum":"b96a1cf04ddfb178bd00a3830d68848486f870e1","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.0.0.tgz","fileCount":148,"integrity":"sha512-aWHwwyTEphVfNmSjbQGrBAv8u6UXFX5pOp7R4tkGmRQxKjiGwVn3GE8SKLGC18TwIQbCIgfKmofoqViSLnKAJQ==","signatures":[{"sig":"MEQCID1ocxfScO6vEfbD3hQhHdlubc0elvsSYXGlr4dgp5CnAiAfWXB/WH6l8+8a+UpLYXCV91UNHo4fnc2Rs56sAbDX8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181623},"main":"./dist/index.js","type":"module","_from":"file:chetodb-business-central-0.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"dev":"tsc --build --watch","test":"vitest run","build":"tsc --build","clean":"tsc --build --clean","test:watch":"vitest"},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"_resolved":"/tmp/0ac031a5e9338448c3a9668bfb270a86/chetodb-business-central-0.0.0.tgz","_integrity":"sha512-aWHwwyTEphVfNmSjbQGrBAv8u6UXFX5pOp7R4tkGmRQxKjiGwVn3GE8SKLGC18TwIQbCIgfKmofoqViSLnKAJQ==","repository":{"url":"git+https://github.com/ChetoDB/ts-business-central.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/business-central_0.0.0_1772487858248_0.15873646846983958","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@chetodb/business-central","version":"0.1.0","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"author":{"url":"ChetoDB","name":"David Cheto"},"license":"MIT","_id":"@chetodb/business-central@0.1.0","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"dist":{"shasum":"f1c022721c5b97ef350d8ab01d7d338606bb7f17","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.1.0.tgz","fileCount":148,"integrity":"sha512-uQxEsdSEpMt7Q6QWFYIaxqkOb+DPurd6N9PIHxaKZ6S66ZY6k8jIFujmao6DyZ74eiGfci0AQ9C5i6AnG5vo4Q==","signatures":[{"sig":"MEUCIDDH4jdzdAH0hGz+UTJ4OffRb8wUr3iXGehve86RaN2fAiEAwn+H4n0+WJslpzr1OusDe0dbXYW7PIU8zukWzFNyszM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181623},"main":"./dist/index.js","type":"module","_from":"file:chetodb-business-central-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"dev":"tsc --build --watch","test":"vitest run","build":"tsc --build","clean":"tsc --build --clean","test:watch":"vitest"},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"_resolved":"/tmp/4e0bcd0b3af4ff34a4947c2e94140db7/chetodb-business-central-0.1.0.tgz","_integrity":"sha512-uQxEsdSEpMt7Q6QWFYIaxqkOb+DPurd6N9PIHxaKZ6S66ZY6k8jIFujmao6DyZ74eiGfci0AQ9C5i6AnG5vo4Q==","repository":{"url":"git+https://github.com/ChetoDB/ts-business-central.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/business-central_0.1.0_1772490825928_0.04262776771225374","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@chetodb/business-central","version":"0.1.1","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"author":{"url":"ChetoDB","name":"David Cheto"},"license":"MIT","_id":"@chetodb/business-central@0.1.1","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"dist":{"shasum":"f0632587dcd066609ce351806a5dac92532698bd","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.1.1.tgz","fileCount":148,"integrity":"sha512-Zh9GHT+N6U/f0st0hnoh9pjetHflblB0DOo6to23kppu9fkuBUP3gGT5UTV9CROpbER2dskRiCNmJfa1qEhWUg==","signatures":[{"sig":"MEYCIQCSsL4tOepY8dWkUbw3wQ2KvYIJWsoLoLrCaWWo8FTS3wIhAL5V3YTZt8MoCsitA/oqCA2nYIajmnMF4yF+Y5V/x/EO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181659},"main":"./dist/index.js","type":"module","_from":"file:chetodb-business-central-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js"}},"scripts":{"dev":"tsc --build --watch","test":"vitest run","build":"tsc --build","clean":"tsc --build --clean","test:watch":"vitest"},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"_resolved":"/tmp/b8c90209ecb84109b503d541ffcdea75/chetodb-business-central-0.1.1.tgz","_integrity":"sha512-Zh9GHT+N6U/f0st0hnoh9pjetHflblB0DOo6to23kppu9fkuBUP3gGT5UTV9CROpbER2dskRiCNmJfa1qEhWUg==","repository":{"url":"git+https://github.com/ChetoDB/ts-business-central.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/business-central_0.1.1_1773182387621_0.7408186153878562","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@chetodb/business-central","version":"0.1.2","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"author":{"url":"ChetoDB","name":"David Cheto"},"license":"MIT","_id":"@chetodb/business-central@0.1.2","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"dist":{"shasum":"d722c61ba7d46ec42c321b92b35c68211459ba42","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.1.2.tgz","fileCount":148,"integrity":"sha512-pTVHGCxO8m0zmRHMOF6WwuHyPyocgQYGBMzllCxqLeknenMORJz4tANVWM1VomWHeLmGnEFPk2y5rw1kQQWyLw==","signatures":[{"sig":"MEQCIGE9fsz2MKIY3PcDy3zDjTC9qGVdUqHfswA+oauJDxsqAiA8bh0uiK+MeAt4uVDGyGpNBWhk0hA4+Usrtp2dOWGgXw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181628},"main":"./dist/index.js","type":"module","_from":"file:chetodb-business-central-0.1.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsc --build --watch","test":"vitest run","build":"tsc --build","clean":"tsc --build --clean","test:watch":"vitest"},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"_resolved":"/tmp/c733e3eb5699c634a0ed09cc6e867a0c/chetodb-business-central-0.1.2.tgz","_integrity":"sha512-pTVHGCxO8m0zmRHMOF6WwuHyPyocgQYGBMzllCxqLeknenMORJz4tANVWM1VomWHeLmGnEFPk2y5rw1kQQWyLw==","repository":{"url":"git+https://github.com/ChetoDB/ts-business-central.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/business-central_0.1.2_1773259362893_0.11526659449791321","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@chetodb/business-central","version":"0.2.0","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"author":{"url":"ChetoDB","name":"David Cheto"},"license":"MIT","_id":"@chetodb/business-central@0.2.0","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"dist":{"shasum":"3c8fa9fb68d53d6017808e7a23f11de4b58f6dc1","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.2.0.tgz","fileCount":148,"integrity":"sha512-IATMOaabNWYnLmrICo5OzQs7iLo+WG12rTLMWJzUIqZlaPKbJaf0yW/mqFVAbGkr7l3tBDlieWWJsv9rL3AqcQ==","signatures":[{"sig":"MEQCIFTYpOmY5FugifAo3lPD2Qp2csaBokbqdPYdEPow7WdCAiBcIhmxatmV0TBM3zU3Z3ch6thm6RZGrEimlESxTy664Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185837},"main":"./dist/index.js","type":"module","_from":"file:chetodb-business-central-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsc --build --watch","test":"vitest run","build":"tsc --build","clean":"tsc --build --clean","test:watch":"vitest"},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"_resolved":"/tmp/6166fa0ce502e30d503b7fcad2a8333c/chetodb-business-central-0.2.0.tgz","_integrity":"sha512-IATMOaabNWYnLmrICo5OzQs7iLo+WG12rTLMWJzUIqZlaPKbJaf0yW/mqFVAbGkr7l3tBDlieWWJsv9rL3AqcQ==","repository":{"url":"git+https://github.com/ChetoDB/ts-business-central.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/business-central_0.2.0_1776710718995_0.21213837516961798","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@chetodb/business-central","version":"0.3.0","type":"module","description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","license":"MIT","author":{"name":"David Cheto","url":"ChetoDB"},"homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","repository":{"type":"git","url":"git+https://github.com/ChetoDB/ts-business-central.git","directory":"packages/core"},"bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"devDependencies":{"typescript":"^5.7.0"},"scripts":{"build":"tsc --build","dev":"tsc --build --watch","clean":"tsc --build --clean","test":"vitest run","test:watch":"vitest"},"_id":"@chetodb/business-central@0.3.0","_integrity":"sha512-xdd0VcyflS+ggebzbRTTajsIWWNWXtqu1To9Upp6eRdFLF3liOl2OZKDtZuCrmG165Zlvhp0KePOEzCKRgYS2w==","_resolved":"/tmp/5f85680f6a09de4f032f5be75f94d94a/chetodb-business-central-0.3.0.tgz","_from":"file:chetodb-business-central-0.3.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xdd0VcyflS+ggebzbRTTajsIWWNWXtqu1To9Upp6eRdFLF3liOl2OZKDtZuCrmG165Zlvhp0KePOEzCKRgYS2w==","shasum":"02e08412933034ae3b4922e02db63b4d1c85fcc9","tarball":"https://registry.npmjs.org/@chetodb/business-central/-/business-central-0.3.0.tgz","fileCount":148,"unpackedSize":199258,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrgrboKjXLqq6ACWADTYzvKoR0z8ZaQf+9dH54kfvhPQIgD0Aox0hSn/ZxLQmGg+CMkpIiP/+ukMrmZP2HSDaASlA="}]},"_npmUser":{"name":"chetodb","email":"chetodb@gmail.com"},"directories":{},"maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/business-central_0.3.0_1776797358302_0.1984076986342056"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-02T21:44:18.132Z","modified":"2026-04-21T18:49:18.585Z","0.0.0":"2026-03-02T21:44:18.415Z","0.1.0":"2026-03-02T22:33:46.074Z","0.1.1":"2026-03-10T22:39:47.769Z","0.1.2":"2026-03-11T20:02:43.054Z","0.2.0":"2026-04-20T18:45:19.145Z","0.3.0":"2026-04-21T18:49:18.457Z"},"bugs":{"url":"https://github.com/ChetoDB/ts-business-central/issues"},"author":{"name":"David Cheto","url":"ChetoDB"},"license":"MIT","homepage":"https://github.com/ChetoDB/ts-business-central/tree/main/packages/core#readme","keywords":["business-central","dynamics","sdk","api","typescript","erp","microsoft"],"repository":{"type":"git","url":"git+https://github.com/ChetoDB/ts-business-central.git","directory":"packages/core"},"description":"Modern, resilient and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.","maintainers":[{"name":"chetodb","email":"chetodb@gmail.com"}],"readme":"# Business Central SDK Core\n\n[![NPM Version](https://img.shields.io/npm/v/@chetodb/business-central.svg)](https://www.npmjs.com/package/@chetodb/business-central)\n[![NPM Downloads](https://img.shields.io/npm/dm/@chetodb/business-central.svg)](https://www.npmjs.com/package/@chetodb/business-central)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n**Modern, resilient, and type-safe TypeScript SDK for Microsoft Dynamics 365 Business Central.**\n\n[Español (README.es.md)](./README.es.md) | [**Return to Monorepo Root**](../../README.md)\n\n---\n\nThis is the Core SDK of the project, designed to be lightweight, framework-agnostic, and extremely robust for production environments.\n\n### ✨ Key Features\n\n- 🔄 **Native Resilience**: Automatic retries with *exponential backoff* for transient errors.\n- 🔑 **Key Rotation**: Supports multiple `azureKeys` to handle failed credentials.\n- 🏗️ **Fluent OData**: Type-safe filter builder (`BcFilter`).\n- 📦 **Pure ESM**: Built leveraging modern JavaScript module standards.\n\n### 🚀 Installation\n\n```bash\npnpm add @chetodb/business-central\n```\n\n### 🛠️ Basic Usage\n\n```ts\nimport { BcFilter, BusinessCentralClient } from '@chetodb/business-central';\n\nconst client = new BusinessCentralClient({\n  tenantId: 'your-tenant-id',\n  companyName: 'CRONUS',\n  azureKeys: [\n    { name: 'main', clientId: '...', clientSecret: '...' }\n  ],\n});\n\n// Type-safe query with complex filters\ninterface Customer {\n  id: string;\n  displayName: string;\n}\n\nconst customers = await client.get<Customer>('customers', {\n  filter: BcFilter.where('balance').gt(0),\n  select: ['id', 'displayName'],\n  top: 10,\n});\n```\n\n### 📖 API Reference & Examples\n\nThe `BusinessCentralClient` provides a full set of methods for interacting with the BC API.\n\n#### `get<T>(endpoint, options)`\n\nRetrieves records with automatic pagination and OData support.\n\n```ts\n// Example: Using BcFilter and standard OData options\nconst filter = new BcFilter().eq('Item_No', 'item-001');\nconst items = await client.get('item', {\n  filter: filter,\n  top: 5\n});\n```\n\n#### `post<T>(endpoint, body)`\n\nCreates a new record.\n\n```ts\nconst newItem = {\n  Item_No: 'item-001',\n  Description: 'SDK-TEST'\n};\nconst created = await client.post('item', newItem);\n```\n\n#### `patch<T>(endpoint, criteria, data)`\n\nPartially updates an existing record. It handles the OData key predicate and includes `If-Match: *` by default.\n\n```ts\nconst criteria = { Item_No: 'item-001', Description: 'SDK-TEST' };\nconst newData = { Description: 'Updated via SDK' };\n\nawait client.patch('item', criteria, newData);\n```\n\n#### `put<T>(endpoint, criteria, data)`\n\nReplaces an existing record entirely. It also includes `If-Match: *` by default.\n\n```ts\nconst criteria = { Item_No: 'item-001', Description: 'SDK-TEST' };\nconst fullData = {\n  Item_No: 'item-001',\n  Description: 'Full replacement via SDK'\n};\n\nawait client.put('item', criteria, fullData);\n```\n\n#### `delete(endpoint, criteria)`\n\nDeletes a record based on key criteria.\n\n```ts\nconst criteria = { Item_No: 'item-001', Description: 'SDK-TEST' };\nawait client.delete('item', criteria);\n```\n\n#### `executeAction<T>(endpoint, data)`\n\nExecutes an **unbound** OData action. Note: In Business Central, unbound actions use a specific route (`ODataV4/ActionName`).\n\n```ts\nawait client.executeAction('MyCustomAction', {\n  documentNo: '123'\n});\n```\n\n### ⚙️ Advanced Configuration\n\n```ts\nconst client = new BusinessCentralClient({\n  requestOptions: {\n    maxRetries: 5,\n    timeout: 30000,\n  },\n  debugOptions: {\n    duration: true,\n  }\n});\n```\n\n---\n\n- **License**: [MIT](./LICENSE) © 2026 David Cheto (ChetoDB)\n","readmeFilename":"README.md"}