{"_id":"@billinglogix/billinglogix-api","_rev":"3-20bd4a9c61af756f52778da8d1005231","name":"@billinglogix/billinglogix-api","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@billinglogix/billinglogix-api","version":"1.0.0","description":"Billing Logix API wrapper for the account APIs.","author":{"name":"Todd Schlomer","email":"todd@billinglogix.com","url":"https://billinglogix.com"},"license":"MIT","type":"module","main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","types":"./dist/types.d.ts","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js","types":"./dist/types.d.ts"}},"repository":{"type":"git","url":"git+https://github.com/billinglogix/node-billinglogix-api.git"},"bugs":{"url":"https://github.com/billinglogix/node-billinglogix-api/issues"},"homepage":"https://github.com/billinglogix/node-billinglogix-api#readme","scripts":{"build":"rm -rf dist && node esbuild.js && tsc","watch":"npm run build -- --watch src","test":"mocha --recursive -t 10000","prepublishOnly":"npm run build"},"dependencies":{"jsonwebtoken":"^9.0.2","node-fetch":"^3.3.2"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.5.0","@types/prettier":"^3.0.0","chai":"^5.1.0","dotenv":"^16.4.5","esbuild":"^0.20.2","esbuild-node-externals":"^1.13.0","mocha":"^10.4.0","prettier":"^3.2.5","typescript":"^5.1.6","uuid":"9.0.1"},"keywords":["Billing Logix","BillingLogix","Billing"],"engines":{"node":">=v14.21.0"},"gitHead":"4b0c520c997de74a70041a44ba5fecd14bdbc438","_id":"@billinglogix/billinglogix-api@1.0.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-RDjDZMVLKlbofz0w/gULBMl+gYVtAx/jRBwyHW4QvcBqiqmFWEDWoVpj9LPY57Y5CF8B68qTfWoxFHaAHEQKEw==","shasum":"83454915da91c19aebb4dbfc75aa84bee87abf68","tarball":"https://registry.npmjs.org/@billinglogix/billinglogix-api/-/billinglogix-api-1.0.0.tgz","fileCount":6,"unpackedSize":23384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLGRRzy3iMYofm1fNz4kIIP86uE30zAdiM1qnIOHyyowIhAPCl+OJbS3G0VE56szVVI2Bih44iRAIYHdD40TOgbGLn"}]},"_npmUser":{"name":"tschlomer","email":"todd@toddschlomer.com"},"directories":{},"maintainers":[{"name":"tschlomer","email":"todd@toddschlomer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/billinglogix-api_1.0.0_1713654273372_0.5932960396924265"},"_hasShrinkwrap":false},"1.0.3":{"name":"@billinglogix/billinglogix-api","version":"1.0.3","description":"Billing Logix API wrapper for the account APIs.","author":{"name":"Todd Schlomer","email":"todd@billinglogix.com","url":"https://billinglogix.com"},"license":"MIT","type":"module","main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","types":"./dist/types.d.ts","exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js","types":"./dist/types.d.ts"}},"repository":{"type":"git","url":"git+https://github.com/billinglogix/node-billinglogix-api.git"},"bugs":{"url":"https://github.com/billinglogix/node-billinglogix-api/issues"},"homepage":"https://github.com/billinglogix/node-billinglogix-api#readme","scripts":{"build":"rm -rf dist && node esbuild.js && tsc","watch":"npm run build -- --watch src","test":"mocha --recursive -t 10000","prepublishOnly":"npm run build"},"dependencies":{"jsonwebtoken":"^9.0.2","node-fetch":"^3.3.2"},"devDependencies":{"chai":"^5.1.0","dotenv":"^16.4.5","esbuild":"^0.20.2","esbuild-node-externals":"^1.13.0","mocha":"^10.4.0","prettier":"^3.2.5","typescript":"^5.1.6","uuid":"9.0.1"},"keywords":["Billing Logix","BillingLogix","Billing"],"engines":{"node":">=v14.21.0"},"_id":"@billinglogix/billinglogix-api@1.0.3","gitHead":"5babb2f27d14aa69c350d042ae142a8e4dae77ff","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-MjLLpGjcifEEAsuldChznjQjwq+7OGRhZFspb8ofwT5Jx5XM0K8wGQAHBaV4cUhkMJJCfYFMl5AoagKmNGtsJg==","shasum":"744e8b347c13379e01de00dd137814131be7554e","tarball":"https://registry.npmjs.org/@billinglogix/billinglogix-api/-/billinglogix-api-1.0.3.tgz","fileCount":6,"unpackedSize":23734,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOEZyxOfNRgwcGc2qhbTIGx2QjVRsSsZXQb3w67AQRgAIgFJ/al4db8h+ip5m3cNGofnFcWXFm5xViEL/uGdOxMs4="}]},"_npmUser":{"name":"tschlomer","email":"todd@toddschlomer.com"},"directories":{},"maintainers":[{"name":"tschlomer","email":"todd@toddschlomer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/billinglogix-api_1.0.3_1713659717063_0.7057439917779833"},"_hasShrinkwrap":false},"1.0.4":{"name":"@billinglogix/billinglogix-api","version":"1.0.4","description":"Billing Logix API wrapper for the account APIs.","author":{"name":"Todd Schlomer","email":"todd@billinglogix.com","url":"https://billinglogix.com"},"license":"MIT","type":"module","main":"./dist/cjs/index.cjs","module":"./dist/mjs/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/mjs/index.js","require":"./dist/cjs/index.cjs"}},"repository":{"type":"git","url":"git+https://github.com/billinglogix/node-billinglogix-api.git"},"bugs":{"url":"https://github.com/billinglogix/node-billinglogix-api/issues"},"homepage":"https://github.com/billinglogix/node-billinglogix-api#readme","scripts":{"build":"rm -rf dist && node esbuild.js && tsc","watch":"npm run build -- --watch src","test":"mocha --recursive -t 10000","prepublishOnly":"npm run build"},"dependencies":{"jsonwebtoken":"^9.0.2","node-fetch":"^3.3.2"},"devDependencies":{"chai":"^5.1.0","dotenv":"^16.4.5","esbuild":"^0.20.2","esbuild-node-externals":"^1.13.0","mocha":"^10.4.0","prettier":"^3.2.5","typescript":"^5.1.6","uuid":"9.0.1"},"keywords":["Billing Logix","BillingLogix","Billing"],"engines":{"node":">=v14.21.0"},"_id":"@billinglogix/billinglogix-api@1.0.4","gitHead":"2c182982fc4ea6d9a5eb7a2a8b213206d742cd58","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-O90GPTermjNq7GQRxQezNAyvlaxtuJYzPLFBO5UJaenxj4ccGYu+bEej8kfHJ8+q16b080X9oGhMRgEaLAP9nA==","shasum":"2b45c3a5e8bb8264778ad99fcec79ceebb942de7","tarball":"https://registry.npmjs.org/@billinglogix/billinglogix-api/-/billinglogix-api-1.0.4.tgz","fileCount":6,"unpackedSize":23910,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/cYo39U+wNrWpUpk36/QU6Hm41yTTybpqVq/UjtAbyQIhAPRMS81cxkNtOVeTkWMwjGg/Kz04tx1G+FeVwubKzV2M"}]},"_npmUser":{"name":"tschlomer","email":"todd@toddschlomer.com"},"directories":{},"maintainers":[{"name":"tschlomer","email":"todd@toddschlomer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/billinglogix-api_1.0.4_1713678065935_0.016765739404479563"},"_hasShrinkwrap":false},"1.0.5":{"name":"@billinglogix/billinglogix-api","version":"1.0.5","description":"Billing Logix API wrapper for the account APIs.","author":{"name":"Todd Schlomer","email":"todd@billinglogix.com","url":"https://billinglogix.com"},"license":"MIT","type":"module","main":"./dist/cjs/index.cjs","module":"./dist/mjs/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/mjs/index.js","require":"./dist/cjs/index.cjs"}},"repository":{"type":"git","url":"git+https://github.com/billinglogix/node-billinglogix-api.git"},"bugs":{"url":"https://github.com/billinglogix/node-billinglogix-api/issues"},"homepage":"https://github.com/billinglogix/node-billinglogix-api#readme","scripts":{"build":"rm -rf dist && node esbuild.js && tsc","watch":"npm run build -- --watch src","test":"mocha --recursive -t 10000","prepublishOnly":"npm run build"},"dependencies":{"jsonwebtoken":"^9.0.2","node-fetch":"^3.3.2"},"devDependencies":{"chai":"^5.1.0","dotenv":"^16.4.5","esbuild":"^0.20.2","esbuild-node-externals":"^1.13.0","mocha":"^10.4.0","prettier":"^3.2.5","typescript":"^5.1.6","uuid":"9.0.1"},"keywords":["Billing Logix","BillingLogix","Billing"],"engines":{"node":">=v14.21.0"},"_id":"@billinglogix/billinglogix-api@1.0.5","gitHead":"b9769ef293643ea50b02db12ab4173a659b07837","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-N1nHYR6g/Ke395GZPiaZkZt3B9Xh59wnEx7NnHbe0B2cV2EuXAmvMk87sS9J7RiIvN5JqzjgoJtgt8ZVOD3cjA==","shasum":"06954a2fec1e929f0c5221535b7b2c3e0fa8ed9e","tarball":"https://registry.npmjs.org/@billinglogix/billinglogix-api/-/billinglogix-api-1.0.5.tgz","fileCount":6,"unpackedSize":23973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUMdTG6gP/Pl/NR5xnzFLFmFfTBD0hnHmUuEjvllRtoAiEAxa0HmR+OaqYZnQAqVsqQ+A7RwXmQYOi3o9o9tQdG6ZQ="}]},"_npmUser":{"name":"tschlomer","email":"todd@toddschlomer.com"},"directories":{},"maintainers":[{"name":"tschlomer","email":"todd@toddschlomer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/billinglogix-api_1.0.5_1713679094668_0.6728991108451445"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-20T23:04:33.272Z","1.0.0":"2024-04-20T23:04:33.506Z","modified":"2024-04-21T05:58:15.015Z","1.0.3":"2024-04-21T00:35:17.198Z","1.0.4":"2024-04-21T05:41:06.148Z","1.0.5":"2024-04-21T05:58:14.812Z"},"maintainers":[{"name":"tschlomer","email":"todd@toddschlomer.com"}],"description":"Billing Logix API wrapper for the account APIs.","homepage":"https://github.com/billinglogix/node-billinglogix-api#readme","keywords":["Billing Logix","BillingLogix","Billing"],"repository":{"type":"git","url":"git+https://github.com/billinglogix/node-billinglogix-api.git"},"author":{"name":"Todd Schlomer","email":"todd@billinglogix.com","url":"https://billinglogix.com"},"bugs":{"url":"https://github.com/billinglogix/node-billinglogix-api/issues"},"license":"MIT","readme":"# billinglogix-api\n\n[![Tests](https://github.com/billinglogix/node-billinglogix-api/actions/workflows/tests.yml/badge.svg)](https://github.com/billinglogix/node-billinglogix-api/actions/workflows/tests.yml)\n[![NPM Version][npm-version-image]][npm-url]\n[![NPM Install Size][npm-install-size-image]][npm-install-size-url]\n\nBillingLogix API wrapper for the account APIs. This is designed to be a minimal client wrapper around the BillingLogix API to make it easier to make requests to the API.\n\nThere are only two small dependencies, `jsonwebtoken` and `node-fetch`, which are used to make signed requests and handle the API requests, respectively.\n\n## Installation\n\n```shell\n$ npm i @billinglogix/billinglogix-api\n```\n\n## Quick Start\n\nThe module exports the client, `BillingLogixClient`, which is used to make requests to the BillingLogix API. It supports both callback and promise handling along with both CommonJS and ES6 module imports.\n\n```javascript\n// const { BillingLogixClient } = require(\"@billinglogix/billinglogix-api\"); // CommonJS\nimport { BillingLogixClient } from \"@billinglogix/billinglogix-api\"; // ES6\n\nconst blxClient = new BillingLogixClient(ACCOUNT_SUB, ACCESS_KEY, SECRET_KEY);\n\n// Callback style\nblxClient.get(\"/accounts/member/:member_id\", {}, function (err, result) {\n    if (err) {\n        // error handling\n    } else {\n        // success handling\n    }\n});\n\n// Promise style\nblxClient\n    .get(\"/accounts/member/:member_id\", {})\n    .then(function (result) {\n        // success handling\n    })\n    .catch(function (err) {\n        // error handling\n    });\n\n// Using async/await\ntry {\n    const result = await blxClient.get(\"/accounts/member/:member_id\", {});\n\n    // success handling\n} catch (err) {\n    // error handling\n}\n```\n\n## Usage\n\nFor details on the possible calls, refer to the BillingLogix API documentation at\n[https://help.billinglogix.com](https://help.billinglogix.com/guides/api-documentation).\n\n### Promise and Callback Support\n\nIn all calls you can omit the callback, and a promise will be returned instead.\n\n### Initialization\n\n```javascript\nimport { BillingLogixClient } from \"@billinglogix/billinglogix-api\";\n\nconst blxClient = new BillingLogixClient(ACCOUNT_SUB, ACCESS_KEY, SECRET_KEY, {\n    // Optional configuration\n    version: \"v1\",\n    timeout: 10000,\n    headers: {\n        \"X-Custom-Header\": \"Custom Value\",\n    },\n});\n```\n\n### Full Request Calls\n\n```javascript\n// Full request support - Promise\nblxClient\n    .request({\n        method: \"GET\", // GET, POST, PUT, PATCH, DELETE\n        path: \"/accounts/member/:member_id\",\n        query: {\n            test: \"test-query-param\",\n        },\n        body: {\n            // POST/PUT/PATCH body\n        },\n        headers: {\n            // Custom headers\n        },\n        timeout: 10000, // Override default timeout\n    })\n    .then(function (result) {\n        // success handling\n    })\n    .catch(function (err) {\n        // error handling\n    });\n\n// Full request support - Callback\nblxClient.request(\n    {\n        method: \"GET\", // GET, POST, PUT, PATCH, DELETE\n        path: \"/accounts/member/:member_id\",\n        query: {\n            test: \"test-query-param\",\n        },\n        body: {\n            // POST/PUT/PATCH body\n        },\n        headers: {\n            // Custom headers\n        },\n        timeout: 10000, // Override default timeout\n    },\n    function (err, result) {\n        if (err) {\n            // error handling\n        } else {\n            // success handling\n        }\n    }\n);\n```\n\n### Specific Method Calls\n\nFor each request method type, functions exists to make common calls. The options and callback are optional for each call.\n\n```javascript\nblxClient.get(path, [options], [callback]);\nblxClient.post(path, body, [options], [callback]);\nblxClient.put(path, body, [options], [callback]);\nblxClient.patch(path, body, [options], [callback]);\nblxClient.delete(path, [options], [callback]);\n```\n\nThis allows shorthand forms like:\n\n```javascript\nblxClient\n    .get(\"/accounts/member/:member_id\")\n    .then(function (results) {\n        // success handling\n    })\n    .catch(function (err) {\n        // error handling\n    });\n\nblxClient\n    .post(\"/accounts/member\", {\n        email: \"testme@test.com\",\n        fistName: \"Test\",\n        lastName: \"Me\",\n    })\n    .then(function (results) {\n        // success handling\n    })\n    .catch(function (err) {\n        // error handling\n    });\n```\n\n[npm-install-size-image]: https://badgen.net/packagephobia/publish/@billinglogix/billinglogix-api\n[npm-install-size-url]: https://packagephobia.com/result?p=%40billinglogix%2Fbillinglogix-api\n[npm-url]: https://www.npmjs.com/package/@billinglogix/billinglogix-api\n[npm-version-image]: https://badgen.net/npm/v/@billinglogix/billinglogix-api\n","readmeFilename":"README.md"}