{"_id":"@blueink360/blueink-client-js","_rev":"7-936eb0a901a47b50c5f0b4e4b3375851","name":"@blueink360/blueink-client-js","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@blueink360/blueink-client-js","version":"1.0.0","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.0.0","maintainers":[{"name":"thanh.blueink","email":"thanh.tong@blueink.com"},{"name":"zlove.blueink","email":"packages@blueink.com"}],"dist":{"shasum":"9f38de649f1a896b9eaf416082e80f643763b9ec","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.0.0.tgz","fileCount":35,"integrity":"sha512-eVRiMAqlXXode+mdpuEs6JAFx8L4V0G33W+AMrSm9/sG/mZPJVj0mpY/QBT6mFBawi01hvncgVlIkgG6741cxQ==","signatures":[{"sig":"MEQCIBHVrbQVGlk46XHeSm8h38pIjpjpcHOYFyTej+wh1Ye7AiBuSGjflDBJjaLgnX7OZUiyUi6Ul9rATvoXGr/nAUBnQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236641},"main":"index.js","gitHead":"d5c471a3b914bc2c1bfc62e6e9b7ad5f321f0c89","scripts":{"test":"jest","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"thanh.blueink","email":"thanh.tong@blueink.com"},"_npmVersion":"6.14.16","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"_nodeVersion":"12.22.12","dependencies":{"axios":"^0.24.0","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","babel-jest":"^29.7.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.0.0_1696950548259_0.6656465960109104","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@blueink360/blueink-client-js","version":"1.0.1","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.0.1","maintainers":[{"name":"thanh.blueink","email":"thanh.tong@blueink.com"},{"name":"zlove.blueink","email":"packages@blueink.com"}],"dist":{"shasum":"1ee6325e7dd35987fd90b18f326c0a67364532db","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.0.1.tgz","fileCount":35,"integrity":"sha512-npnoJCMY3+kKs1JOIZepCZMVt84xucfMcfMAw8Uuh1pDWxl0HYWK8bQPvh1Be/qqh3zztwoB2ox3p7JO79+j9A==","signatures":[{"sig":"MEQCIE/eUI7oc2nyZT9Wclt31FeZfkFLNhCB5HYWOp6DXdKLAiBYDYE2fqemVorUrXNZQ5BLy7Hdz8H07YrjQliGqF0pyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236653},"main":"index.js","gitHead":"d5c471a3b914bc2c1bfc62e6e9b7ad5f321f0c89","scripts":{"test":"jest","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"thanh.blueink","email":"thanh.tong@blueink.com"},"_npmVersion":"6.14.16","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"_nodeVersion":"12.22.12","dependencies":{"axios":"^0.24.0","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","babel-jest":"^29.7.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.0.1_1696951058712_0.9625390411402408","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@blueink360/blueink-client-js","version":"1.1.0","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.1.0","maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"homepage":"https://github.com/blueinkhq/blueink-client-js#readme","bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"dist":{"shasum":"01f4c0360e229e58071b4638d32d263dfc793315","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.1.0.tgz","fileCount":45,"integrity":"sha512-hm2VdJWvAcQFM6Wbcc7AKIoG75Rx82jqTzrW5PGnGIDR1xEgIcApyLehdv6Mp3IPRQQ6/Guj9fS1H2zTVG8YQQ==","signatures":[{"sig":"MEUCIAhgw3F3UWTC9tHHjXl3dMrGQ2hUahJs9x+7qF5YfJ5tAiEA+9HE0V0XXwnJ9FRF/c2ObiZsG5iUWGOKaovA1abS1h8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":283362},"main":"index.js","gitHead":"74281470bef92873ca9d7e7fe69b00a66a470fd5","scripts":{"lint":"standard --fix","test":"jest","prepare":"husky install","precommit":"lint-staged","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:375422f9-bb9a-42f2-b925-639ace0a2e9b"}},"standard":{"env":["jest"],"ignore":["src/example/"]},"repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"_npmVersion":"11.18.0","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"lint-staged":{"*.js":"standard --fix"},"_nodeVersion":"22.23.1","dependencies":{"axios":"^1.18.1","husky":"^8.0.3","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","standard":"^17.1.0","babel-jest":"^29.7.0","lint-staged":"^16.4.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.1.0_1784908329658_0.023736841603490433","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@blueink360/blueink-client-js","version":"1.1.1","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.1.1","maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"homepage":"https://github.com/blueinkhq/blueink-client-js#readme","bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"dist":{"shasum":"4d19d84827e12e6fc9250de38a829d2e0113f1c2","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.1.1.tgz","fileCount":21,"integrity":"sha512-HdRdNOafo2f5tphXgSF5ma7w1LMpTGcARgmJrbjNtTmGoHOCrlPn4FsXFbS540GXHqxjUqnfa/Ku/lKvHk20yw==","signatures":[{"sig":"MEQCIHcd976o+S3qZ5AzLNHfCL61/UMrt8fDW8gFDVUMMnRUAiBlBhwM8EmGtEcUkCmTMTlskSPuM0IdYff3+hV2vgi2iw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75625},"main":"index.js","gitHead":"9ef00b4cc101459cca1429f8d034a46fbd6e583f","scripts":{"lint":"standard --fix","test":"jest","prepare":"husky install","precommit":"lint-staged","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:375422f9-bb9a-42f2-b925-639ace0a2e9b"}},"standard":{"env":["jest"],"ignore":["src/example/"]},"repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"_npmVersion":"11.18.0","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"lint-staged":{"*.js":"standard --fix"},"_nodeVersion":"22.23.1","dependencies":{"axios":"^1.18.1","husky":"^8.0.3","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","standard":"^17.1.0","babel-jest":"^29.7.0","lint-staged":"^16.4.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.1.1_1784912832006_0.5915728377016067","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@blueink360/blueink-client-js","version":"1.2.0","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.2.0","maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"homepage":"https://github.com/blueinkhq/blueink-client-js#readme","bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"dist":{"shasum":"4b957e1fe95393d689d1975e87f5875058f8d97f","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.2.0.tgz","fileCount":21,"integrity":"sha512-6ZHO09D7y526VqnUEyI9d2M7URjPlPm2hZzz/6gtfJm8h5DDtG2xpZSF4qT9ECPC8vhgNaimmWq+MUItdumNjA==","signatures":[{"sig":"MEUCIC9Ai/fVSt3tsCKJosWdR3eDxUOEeqyg+jEvyZncdBrkAiEAt8qRFUes2i/qoHzQ4HrOwTO9O+E+JkiM7KiDb2eL4Vs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75721},"main":"index.js","gitHead":"3fb9ad766b490ae486c52d35b36e58b6a54903c6","scripts":{"lint":"standard --fix","test":"jest","prepare":"husky install","precommit":"lint-staged","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:375422f9-bb9a-42f2-b925-639ace0a2e9b"}},"standard":{"env":["jest"],"ignore":["src/example/"]},"repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"_npmVersion":"11.19.0","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"lint-staged":{"*.js":"standard --fix"},"_nodeVersion":"22.23.2","dependencies":{"axios":"^1.18.1","husky":"^8.0.3","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","standard":"^17.1.0","babel-jest":"^29.7.0","lint-staged":"^16.4.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.2.0_1787304362358_0.42703017026444257","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@blueink360/blueink-client-js","version":"1.3.0","author":{"name":"Blueink"},"license":"MIT","_id":"@blueink360/blueink-client-js@1.3.0","maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"homepage":"https://github.com/blueinkhq/blueink-client-js#readme","bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"dist":{"shasum":"328f0220228dc610a69e3a7231ac185aa28a4169","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.3.0.tgz","fileCount":21,"integrity":"sha512-OnOs8KiAYj/kmNVTV4AqUcam7DFIDt611FdoSG6mC04GUf6S3pg67XjNRYsNFH1HOgIUQSnvJDu0IHPn38l1DA==","signatures":[{"sig":"MEUCIQDMieFtwMQ5fqPjUg/yxT+NS+bHIgkOHEAu2wqrFwxWuAIgGL52YQR8cmMdeTmdpfrOWrgoVVCOQMAOh2ssQaYjMK0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC1cAIRUnfZZDaX2z+wBy4KvRvq83jWaYnER8VpimRMRAIhAJzInAGWLVtCVAHw2dd05XpXABNBUDsBEL2iu5tg2H2A","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76187},"main":"index.js","gitHead":"b1b96e90dc7571142b65438e0cae38e82002e0b4","scripts":{"lint":"standard --fix","test":"jest","prepare":"husky install","precommit":"lint-staged","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:375422f9-bb9a-42f2-b925-639ace0a2e9b"}},"standard":{"env":["jest"],"ignore":["src/example/"]},"repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"_npmVersion":"11.19.1","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"lint-staged":{"*.js":"standard --fix"},"_nodeVersion":"22.23.2","dependencies":{"axios":"^1.18.1","husky":"^8.0.3","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","standard":"^17.1.0","babel-jest":"^29.7.0","lint-staged":"^16.4.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"tmp":"tmp/blueink-client-js_1.3.0_1789961645758_0.9088990093393321","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"_id":"@blueink360/blueink-client-js@1.4.0","bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"dist":{"shasum":"02fd723c94036ea97ee99d62f5476cb2dc37b2e9","tarball":"https://registry.npmjs.org/@blueink360/blueink-client-js/-/blueink-client-js-1.4.0.tgz","fileCount":21,"integrity":"sha512-IG4CHs+jj5uTvvJR8txzC+7vBbMt74ox6a+eqsk+EEh3W+sIgzGVN8KPK97XIOGT3V5m4E/llQCrk3MukivRmg==","signatures":[{"sig":"MEUCIQDgnfgeWHxjnZn7b4duH1cIzvZYpzLwI2wekFJZSnQejQIgI1hNwoWTtyDoICP1IDJsiLP65/Wm3Er5bHAwmCOFxko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEkISXF8bUxPrNjFEj3eGP2HK6OQayBL6jBJJAtP6yRhAiEAlZLWjbBphDMVj22/rO9nOaXpXxXLW4Q/h2AbPNygLjM="}],"unpackedSize":77495},"main":"index.js","name":"@blueink360/blueink-client-js","author":{"name":"Blueink"},"gitHead":"216b55ceb082dc41444bfa709b9b7693268b6c5f","license":"MIT","scripts":{"lint":"standard --fix","test":"jest","prepare":"husky install","precommit":"lint-staged","list-bundles":"node src/example/list_bundles.js","interact-persons":"node src/example/interact_persons.js","interact-webhooks":"node src/example/interact_webhooks.js","create-bundle-from-b64":"node src/example/create_bundle_from_b64.js","create-bundle-from-url":"node src/example/create_bundle_from_url.js","create-bundle-from-path":"node src/example/create_bundle_from_path.js","create-bundle-from-template":"node src/example/create_bundle_from_template.js"},"version":"1.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:375422f9-bb9a-42f2-b925-639ace0a2e9b"}},"homepage":"https://github.com/blueinkhq/blueink-client-js#readme","standard":{"env":["jest"],"ignore":["src/example/"]},"repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"_npmVersion":"11.19.1","description":"A Javascript client library for the Blueink eSignature REST API","directories":{},"lint-staged":{"*.js":"standard --fix"},"maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"_nodeVersion":"22.23.2","dependencies":{"axios":"^1.18.1","husky":"^8.0.3","form-data":"^4.0.0","lodash.get":"^4.4.2","lodash.has":"^4.5.2","node-fetch":"^2.6.7","formdata-node":"^4.3.2","lodash.isempty":"^4.4.0","form-data-encoder":"^1.7.1"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^4","dotenv":"^16.0.0","inquirer":"^8.2.1","standard":"^17.1.0","babel-jest":"^29.7.0","lint-staged":"^16.4.0","@babel/preset-env":"^7.16.11"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blueink-client-js_1.4.0_1789987867762_0.5850846335318218"}}},"time":{"created":"2023-10-10T15:09:08.088Z","modified":"2026-09-21T10:51:08.077Z","1.0.0":"2023-10-10T15:09:08.827Z","1.0.1":"2023-10-10T15:17:39.010Z","1.1.0":"2026-07-24T15:52:09.882Z","1.1.1":"2026-07-24T17:07:12.206Z","1.2.0":"2026-08-21T09:26:02.497Z","1.3.0":"2026-09-21T03:34:05.859Z","1.4.0":"2026-09-21T10:51:07.863Z"},"bugs":{"url":"https://github.com/blueinkhq/blueink-client-js/issues"},"author":{"name":"Blueink"},"license":"MIT","homepage":"https://github.com/blueinkhq/blueink-client-js#readme","repository":{"url":"git+https://github.com/blueinkhq/blueink-client-js.git","type":"git"},"description":"A Javascript client library for the Blueink eSignature REST API","maintainers":[{"name":"zlove.blueink","email":"packages@blueink.com"},{"name":"thanh.blueink","email":"thanh.tong@blueink.com"}],"readme":"# blueink-client-js\n\nJavascript Client for the Blueink API\n\n## Overview\n\nThis README provides a narrative overview of using the Blueink Javascript client, and\nincludes examples for many common use cases.\n\nAdditional resources that might be useful include:\n\n- Examples at [blueink-client-js-examples](https://github.com/blueinkhq/blueink-api-examples-js)\n  repo on GitHub.\n- The detailed [Blueink API Documentation](https://blueink.com/r/api-docs/), for\n  details on the data returned by each API call.\n\nFor detailed documentation for each method call, please consult the source code,\nor rely on auto-complete in your favorite editor / IDE. The code is well commented and\nincludes Javascript type annotations, which most IDEs understand.\n\n## Installation\n\nUse `npm` to install the Blueink Javascript Library\n\n```\nnpm install @blueink360/blueink-client-js\n```\n\n## How do I import the client and other helpers from the Library?\n\n**Recommended:** You can import the client in ES module style if your environment supports it:\n\n```js\nimport { Client } from '@blueink360/blueink-client-js';\n```\n\nOr you can import the client in CommonJS style:\n\n```js\nconst { Client } = require('@blueink360/blueink-client-js');\n```\n\n## How do I initialize the client?\n\n```js\nimport { Client } from '@blueink360/blueink-client-js';\n\nconst client = new Client('Your-Blueink-Private-Api-Key');\n```\n\nIf your **Blueink Private API Key** is not provided, the library will look for `BLUEINK_PRIVATE_API_KEY`\nin the environment or in a file named `.env` in the local directory.\n\nYou can also pass a custom Bluink API URL when intializing the client:\n\n```js\nconst client = new Client('Your-Blueink-Private-Api-Key', 'Blueink-URL');\n```\n\nYou can also specify the Blueink API URL via the environment or a `.env` file as a variable named `BLUEINK_API_URL`.\n\n**Note**: setting a custom Blueink API URL is not required for most use cases, as the default URL is configured for Blueink's production environment.\n\n## Usage\n\n```js\nimport { Client } from '@blueink360/blueink-client-js';\n\n/*\nCreate an instance of the API Client\nand initialize it with the credentials\n*/\nconst client = new Client(process.env.BLUEINK_PRIVATE_API_KEY);\n\n//Create wrapper async function\nconst listAllBundles = async () => {\n  // The try/catch statement needs to be called from within an asynchronous function\n  try {\n    // Call bundles.list methods to get all bundles in the Blueink account\n    const bundleList = await client.bundles.list();\n\n    console.log('Here is your all bundles: ', bundleList);\n\n    // Get the bundles with status co (complete)\n    const completedBundleList = await client.bundles.list({\n      status: 'co',\n    });\n\n    console.log('Here is your all completed bundles: ', completedBundleList);\n  } catch (error) {\n    if (error.response) {\n      console.log('There was an error in your request: ', error.response);\n    } else {\n      console.log('Unexpected Error: ', error);\n    }\n  }\n};\n\n// Invokes the async function\nlistAllBundles();\n```\n\nWe provide the paged list where it has a generator function so you can fetch the next or previous page just using `nextPage` or `previousPage` methods\n\n```js\nimport { BlueInkClient } from '@blueink360/blueink-client-js';\n\nconst client = new BlueInkClient(process.env.BLUEINK_PRIVATE_API_KEY);\n\nconst pagedListAllBundles = async () => {\n  try {\n    // Call bundles.list methods to get all bundles in the Blueink account\n    // Passing the related_data will fetch bundle's events, data, files at once\n    const pagedList = await client.bundles.pagedList({\n      page: 5,\n      per_page: 10,\n      related_data: true,\n    });\n\n    console.log(\n      'Here is your all bundles with related data at page 5: ',\n      pagedList\n    );\n\n    // To get the rest of the pages, we use iterator\n    for (let page of pagedList.pages) {\n      const currentPageData = await page;\n      console.log('Your current page: ', currentPageData);\n    }\n\n    // Simply and fast fetch the next page using nextPage method\n    const nextPageData = await pagedList.nextPage();\n\n    console.log('Here is your next page data: ', nextPageData);\n\n    // Similarly, fetching previous page is simple enough\n    const previousPageData = await pagedList.previousPage();\n\n    console.log('Here is your previous page data: ', previousPageData);\n  } catch (error) {\n    // Error handling\n    if (error.response) {\n      console.log('There was an error in your request: ', error.response);\n    } else {\n      console.log('Unexpected Error: ', error);\n    }\n  }\n};\n\n// Invokes the async function\npagedListAllBundles();\n```\n\nCreating a new Bundle can be tedious and complex. Therefore, we provide `BundleHelper` which helps you to create a new bundle with less error prone.\nTo create a new bundle, we can either use `addDocumentByPath`, `addDocumentByUrl`, `addDocumentByFile`.\n\n```js\nimport { Client, BundleHelper } from '@blueink360/blueink-client-js';\n\nconst client = new Client(process.env.BLUEINK_PRIVATE_API_KEY);\n\nconst createNewBundle = async () => {\n  try {\n    // Initialize the BundleHelper with basic bundle information\n    const bundleHelper = new BundleHelper({\n      label: 'New Bundle Created Using File Path',\n      requester_email: 'example@email.com',\n      requester_name: 'Mr. Example',\n      email_subject: 'Yay First Bundle',\n      email_message: 'This is your first bundle.',\n    });\n\n    // Adding a new document is easy with addDocument* method\n    const docKey = bundleHelper.addDocumentByPath('path-to-your-file.pdf', {\n      key: 'DOC-1', // key will be generated automatically if not provided\n    });\n\n    /* Adding a new document url\n    const docKey = bundleHelper.addDocumentByUrl(\"url-to-pdf-file\", {\n      key: \"DOC-1\", // key will be generated automatically if not provided\n    });\n    */\n\n    /* Adding a new document file\n    const docKey = bundleHelper.addDocumentByFile(file, {\n      key: \"DOC-1\", // key will be generated automatically if not provided\n    });\n    */\n\n    // Add a new signer to your bundle\n    const signerKey = bundleHelper.addSigner({\n      name: 'The Signer One',\n      email: 'peter.gibbons@example.com',\n    });\n\n    // Add a new field to your document and assign it to the signer\n    bundleHelper.addField(docKey, {\n      label: 'Your Name',\n      page: 1,\n      kind: 'txt',\n      editors: [signerKey],\n      x: 15,\n      y: 60,\n      w: 20,\n      h: 3,\n    });\n\n    // We also provide addDocumentTemplate\n    const templateKey = bundleHelper.addDocumentTemplate({\n      template_id: 'Your-template-id-here',\n    });\n\n    bundleHelper.assignRole(signerKey, templateKey, 'your-role-id');\n\n    // Finally, call create method from the client to create a new bundle\n    const newBundleData = await client.bundles.create(bundleHelper.asData());\n\n    console.log('Creating a new bundle is easy: ', newBundleData);\n  } catch (error) {\n    if (error.response) {\n      console.log('There was an error in your request: ', error.response);\n    } else {\n      console.log('Unexpected Error: ', error);\n    }\n  }\n};\n\n// Invokes the async function\ncreateNewBundle();\n```\n\n## Client Method Index\n\nParameters can be found using autocomplete within your IDE. Creates/Updates take a\nJavascript dictionary as the data field.\n\n### Bundle Related\n\n- Create via `client.bundles.create(...)` or `client.bundles.createFromBundleHelper(...)`\n- List via `client.bundles.list(...)` or `client.bundles.pagedList(...)`\n- Retrieve via `client.bundles.retrieve(...)`\n- Cancel via `client.bundles.cancel(...)`\n- List Events via `client.bundles.listEvents(...)`\n- List Files via `client.bundles.listFiles(...)`\n- List Data via `client.bundles.listData(...)`\n\n### Person Related\n\n- Create via `client.persons.create(...)` or `client.persons.createFromPersonHelper(...)`\n- List via `client.persons.list(...)` or `client.persons.pagedList(...)`\n- Retrieve via `client.persons.retrieve(...)`\n- Delete via `client.persons.delete(...)`\n- Update via `client.persons.update(...)`\n\n### Packet Related\n\n- Update via `client.packets.update(...)`\n- Create Embedded Signing URL via `client.packets.embedUrl(...)`\n- Retrieve COE via `client.packets.retrieveCOE(...)`\n- Remind via `client.packets.remind(...)`\n\n### Template Related\n\n- List via `client.templates.list(...)` or `client.templates.pagedList(...)`\n- Retrieve via `client.templates.retrieve(...)`\n- Delete via `client.templates.delete(...)`\n- Create Preparation Session via `client.templates.createPreparationSession(...)`\n\n### Webhook Related\n\n#### Webhook Client Methods\n\n- Create via `client.webhooks.create(...)`\n- List via `client.webhooks.list(...)`\n- Retrieve via `client.webhooks.retrieve(...)`\n- Delete via `client.webhooks.delete(...)`\n- Update via `client.webhooks.update(...)`\n\n#### WebhookExtraHeader Client Methods\n\n- Create via `client.webhooks.createHeader(...)`\n- List via `client.webhooks.listHeaders(...)`\n- Retrieve via `client.webhooks.retrieveHeader(...)`\n- Delete via `client.webhooks.deleteHeader(...)`\n- Update via `client.webhooks.updateHeader(...)`\n\n#### WebhookEvent Client Methods\n\n- List via `client.webhooks.listEvents(...)`\n- Retrieve via `client.webhooks.retrieveEvent(...)`\n\n#### WebhookDelivery Client Methods\n\n- List via `client.webhooks.listDeliveries(...)`\n- Retrieve via `client.webhooks.retrieveDelivery(...)`\n\n## Detailed Guide and Examples\n\n### Bundles\n\n#### Creating Bundles with the BundleHelper\n\nWhen creating a Bundle via the API, you need to pass quite a bit of data in the\n`client.bundle.create(...)` request. To ease the construction of that data, this\nlibrary provides a `BundleHelper` class.\n\nBelow is an example of using `BundleHelper` to create a Bundle with 1 document,\nand 1 signers. In this example, the uploaded document is specified via a URL. [View full example](https://github.com/blueinkhq/blueink-client-js/tree/main/src/example)\n\n```js\nconst client = new Client(BLUEINK_API_KEY);\n\nconst createBundleFromUrl = async () => {\n  try {\n    const bundleHelper = new BundleHelper({\n      label: 'New Bundle Created Using File URL',\n      requester_email: 'peter.griffin@gmail.com',\n      requester_name: 'Mr. Peter',\n      email_subject: 'Yay First Bundle',\n      email_message: 'This is your first bundle.',\n      // reminder_offset: 0,\n      // reminder_interval: 0,\n      // reminder_expires: 0\n      // cc_sender: false,\n      // status: 'dr',\n    });\n\n    // # Add a document to the Bundle by providing a publicly accessible URL where\n    // # the Blueink platform can download the document to include in the Bundle\n    const fileUrl = 'https://www.irs.gov/pub/irs-pdf/fw9.pdf';\n    const docKey1 = bundleHelper.addDocumentByUrl(fileUrl, {\n      key: 'DOC-1',\n    });\n\n    const signer1 = bundleHelper.addSigner({\n      name: 'The Signer One',\n      email: 'glenn.quagmire@gmail.com',\n    });\n\n    const field = bundleHelper.addField(docKey1, {\n      label: 'Your Name',\n      page: 1,\n      kind: 'txt',\n      editors: [signer1],\n      x: 15,\n      y: 60,\n      w: 20,\n      h: 3,\n    });\n\n    const response = await client.bundles.create(bundleHelper.asData());\n    console.log(response.data);\n  } catch (error) {\n    if (error.response) {\n      console.log(error.response);\n    } else {\n      console.log(error);\n    }\n  }\n};\n```\n\nUsing the BundleHelper, you can add files to a Bundle in multiple ways:\n\n```js\nconst bh = new BundleHelper(...)\n\n// 1) Add a document using a URL to a web resource:\nconst docKey01 = bh.addDocumentByUrl(\"https://www.example.com/example.pdf\")\n\n// 2) Add a document using a path to the file in the local filesystem\nconst docKey02 = bh.addDocumentByPath(\"/path/to/file/example.pdf\")\n\n// 3) Add a document using a UTF-8 encoded Base64 string:\nconst filename = 'test-sample'\nconst pdfB64 = 'JVBERi0xLjMKMyAwI...'\nconst docKey03 = bh.addDocumentByB64(filename, pdfB64)\n```\n\n#### Retrieval\n\nGetting a single bundle is fairly easy. They can be accessed with a single call. To get\nthe additional data (events, files, data), set the related_data flag to true.\n\n```js\nconst response = client.bundles.retrieve(bundleId, { related_data: true });\nconst bundle = response.data;\n\n// # additional data fields (only exist if related_data is true)\nconst events = bundle.events;\nconst files = bundle.files;\nconst data = bundle.data;\n```\n\n#### Listing\n\nListing has several options regarding pagination. You can also choose to append the\nadditional data on each retrieved\nbundle as you can with single fetches. `client.bundles.pagedList()` returns an\niterator object that lazy loads\nsubsequent pages. If no parameters are set, it will start at page 0 and have up to 50\nbundles per page.\n\n```js\n// EXAMPLE: Collecting all bundle IDs\nconst pageIterator = client.bundles.pagedList({\n  related_data, //bool\n  page: pagination.page,\n  per_page: pagination.per_page,\n});\n```\n\n### Persons\n\nCreating a person is similar to a creating a Bundle. There is a PersonHelper to help\ncreate a person\n\n```js\nconst client = new Client(BLUEINK_API_KEY)\nconst ph = new PersonHelper();\n\nconst personSampleUpdate = {\n  name: 'Stewie Griffin',\n  channels: []\n};\n\n// CREATE PERSON\nfunction createPerson() {\n  // Make up some metadata to add to the person\n  const metadata = {\n    number: 1,\n    string: \"stringy\",\n    dict: { number: 2 },\n    list: [3]\n  }\n  //# Set the metadata of the person\n  ph.setMetadata(metadata);\n\n  // Set the persons name\n  ph.setName(\"Brian Griffin\");\n  // Add email contacts for the person\n  ph.addEmail(\"brian.griffin@gmail.com\");\n  ph.addEmail(\"stewie.griffin@gmail.com\");\n\n  // Get all of the emails for the person\n  let allCurrentEmails = ph.getEmails();\n  console.log(\"All Current Emails:\", allCurrentEmails)\n\n  // Remove an email from the list\n  allCurrentEmails.splice(allCurrentEmails.indexOf(\"test@email.com\"), 1);\n\n  // Overwrite the existing email list with this new list\n  // Effectively removing test@email.com list\n  ph.setEmails(allCurrentEmails);\n\n  // Add phone number contact for the person\n  ph.addPhone(\"5055551212\");\n  ph.addPhone(\"5055551213\");\n  ph.addPhone(\"5055551214\");\n\n  // Get all of the phone numbers for the person\n  let allCurrentPhones = ph.getPhones();\n  console.log(\"All Current Phones:\", allCurrentPhones)\n  // Remove a phone number from the list\n  allCurrentPhones.pop();\n\n  // Overwrite the existing phone list with this new list\n  // Effectively removing last phone number\n  ph.setPhones(allCurrentPhones);\n\n  createResp = await client.persons.createFromPersonHelper(ph);\n  person = createResp.data;\n  console.log(`Created person ${person.id}`);\n}\n// UPDATE PERSON\nfunction updatePerson(personId) {\n  const updateResp = await client.persons.update(\n    personId,\n    personSampleUpdate\n  );\n  person = updateResp.data;\n  console.log(`Updated person ${JSON.stringify(person)}`);\n}\n// RETRIEVE PERSON\nfunction retrievePerson(personId) {\n  const retrieveResp = await client.persons.retrieve(personId);\n  person = retrieveResp.data;\n  console.log(`Retrieved person ${JSON.stringify(person)}`);\n}\n// DELETE PERSON\nfunction deletePerson(personId) {\n  const deleteResp = await client.persons.delete(personId);\n  console.log(`Deleted person ${personId}`);\n}\n```\n\n### Packets\n\nPackets can be updated. Reminders may be triggered, and COEs can be retrieve using the\nclient:\n\n```js\n// Retrieve\nclient.packets.retrieve(packetId);\n\n// Update\nclient.packets.update(packetId, payload);\n\n// Remind\nclient.packets.remind(packetId);\n\n// Get COE\nclient.packets.retrieveCOE(packetId);\n```\n\n### Templates\n\nTemplates can be listed (non-paged), listed (paged) or retrieved singly:\n\n```js\n// Non paged\nconst templatesListResponse = await client.templates.list();\n\n// Paged\nfor await (const page of client.templates.pagedList()) {\n  const templatesInPage = page.data;\n  // Do something with templatesInPage\n}\n\n// Single\nconst templateResponse = await client.templates.retrieve(templateId);\n```\n\n### Webhooks\n\nWebhooks can be interacted with via several methods. Webhooks also have related objects, such as\n`WebhookExtraHeaders`, `WebhookEvents`, and `WebhookDeliveries` which have their own\nmethods to interact with.\n\n```js\nconst client = new Client(BLUEINK_API_KEY)\nconst webHookSample = {\n  url: \"https://www.example.com/01/\",\n  enable: true,\n  json: true,\n  event_types: [\n    EVENT_TYPE.EVENT_BUNDLE_LAUNCHED,\n    EVENT_TYPE.EVENT_PACKET_COMPLETE,\n  ],\n};\n\nconst webHookSampleUpdate = {\n  url: \"https://www.example.com/01/\",\n  enabled: false,\n  event_types: [EVENT_TYPE.EVENT_PACKET_VIEWED],\n};\n\nconst webHookSampleExtraHeader = {\n  name: \"Courage_The_Cowardly_Webhook\",\n  value: \"Muriel Bagge\",\n  order: 0,\n};\n\nfunction createWebhook() {\n\tconst createResp = await client.webhooks.create(webHookSample);\n\tconst webhook = createResp.data;\n\tconsole.log(`Created webhook ${webhook.id}`);\n}\n\nfunction updateWebhook(webhookId) {\n  const updateResp = await client.webhooks.update(\n    webhookId,\n    webHookSampleUpdate\n  );\n  const webhook = updateResp.data;\n  console.log(`Updated webhook ${webhook.id}`);\n}\n\nfunction createExtraHeader(webhookId) {\n  const extraHeaderData = { ...webHookSampleExtraHeader };\n  extraHeaderData[\"webhook\"] = webhookId;\n  const createHeaderResp = await client.webhooks.createHeader(\n    extraHeaderData\n  );\n  const header = createHeaderResp.data;\n  console.log(\n    `Added ExtraHeader ${JSON.stringify(header)} to ${header.webhook}`\n  );\n}\n\nfunction listWebhooks() {\n  const listResp = await client.webhooks.list();\n  const webhookList = listResp.data;\n  console.log(`Found ${webhookList.length} Webhooks`);\n  for (wh of webhookList) {\n    console.log(` - Webhook ID: ${wh.id} to ${wh.url}`);\n  }\n}\n\nfunction deleteWebhook(webhookId) {\n  const webhookId = await askWebhookId();\n  const deleteResp = await client.webhooks.delete(webhookId);\n  console.log(`Deleted Webhook ${webhookId}`);\n}\n```\n\n## Full Examples\n\nTo run the example:\n\n```bash\nnpm run create-bundle-from-path\nnpm run create-bundle-from-url\nnpm run create-bundle-from-template\nnpm run create-bundle-from-b64\nnpm run list-bundles\nnpm run interact-persons\nnpm run interact-webhooks\n```\n","readmeFilename":"README.md"}