{"_id":"@nutrient-sdk/dws-client-typescript","_rev":"8-de2f88fe5eb3dc36d1e03996d9e3a481","name":"@nutrient-sdk/dws-client-typescript","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"@nutrient-sdk/dws-client-typescript","version":"1.0.0","keywords":["nutrient","dws","document","convert","sign","redact","digital signature","extract","optimize","compress","pdf","pdfa","pdfua","office","html","markdown","xfdf","table","layout","api","client","typescript","nodejs","ai","agent","claude code","github copilot","cursor","windsurf","context7"],"author":{"url":"https://www.nutrient.io","name":"Nutrient"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@1.0.0","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"}],"homepage":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript#readme","bugs":{"url":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript/issues"},"bin":{"dws-add-junie-rule":"scripts/add_junie_rule.cjs","dws-add-cursor-rule":"scripts/add_cursor_rule.cjs","dws-add-windsurf-rule":"scripts/add_windsurf_rule.cjs","dws-add-claude-code-rule":"scripts/add_claude_code_rule.cjs","dws-add-github-copilot-rule":"scripts/add_github_copilot_rule.cjs"},"dist":{"shasum":"297444c61ed74cb26db29ae44562aab349061364","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-1.0.0.tgz","fileCount":48,"integrity":"sha512-R9olSiJSORp6jMLHzj/e1ncgcX3njrTVcf33UKkbRemo5SNbPpV+rGKP6eQYhRC0wcLMIL3e5NS7SEj27T8mbg==","signatures":[{"sig":"MEUCIQDjpTbR5KKR/aIy0VdDkpl4DxLxOJh6GPi99LPoTNUalgIgIZaULhHaJGoO46YpB5xHSJIHYWHQnSfZrv3BrymStW0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":691665},"type":"module","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"7a4fe0fdf8a6f26c48c3a79b5b5bc60939319826","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && tsup && tsc --project tsconfig.types.json","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:unit":"jest --testPathPatterns=\"^((?!integration).)*$\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"jest --coverage","generate:types":"openapi-typescript dws-api-spec.yml -o src/generated/api-types.ts","prepublishOnly":"npm run build && npm run test","test:integration":"jest --testPathPatterns=integration.test","test:integration:verbose":"jest --testPathPatterns=integration.test --verbose"},"_npmUser":{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},"repository":{"url":"git+https://github.com/pspdfkit-labs/nutrient-dws-client-typescript.git","type":"git"},"_npmVersion":"9.6.7","description":"Node.js TypeScript client library for Nutrient Document Web Services (DWS) API","directories":{"doc":"doc","test":"tests","example":"examples"},"_nodeVersion":"18.17.1","dependencies":{"axios":"^1.10.0","form-data":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","jest":"^30.0.3","tsup":"^8.5.0","dotenv":"^17.0.0","eslint":"^9.30.0","rimraf":"^6.0.1","globals":"^16.2.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","prettier":"^3.6.2","@eslint/js":"^9.30.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.7","@eslint/eslintrc":"^3.3.1","eslint-plugin-jest":"^29.0.1","openapi-typescript":"^7.8.0","eslint-config-prettier":"^10.1.5","@typescript-eslint/parser":"^8.35.0","@typescript-eslint/eslint-plugin":"^8.35.0"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_1.0.0_1752624478224_0.27431883657205147","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@nutrient-sdk/dws-client-typescript","version":"1.0.1","keywords":["nutrient","dws","document","convert","sign","redact","digital signature","extract","optimize","compress","pdf","pdfa","pdfua","office","html","markdown","xfdf","table","layout","api","client","typescript","nodejs","ai","agent","claude code","github copilot","cursor","windsurf","context7"],"author":{"url":"https://www.nutrient.io","name":"Nutrient"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@1.0.1","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"}],"homepage":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript#readme","bugs":{"url":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript/issues"},"bin":{"dws-add-junie-rule":"scripts/add_junie_rule.cjs","dws-add-cursor-rule":"scripts/add_cursor_rule.cjs","dws-add-windsurf-rule":"scripts/add_windsurf_rule.cjs","dws-add-claude-code-rule":"scripts/add_claude_code_rule.cjs","dws-add-github-copilot-rule":"scripts/add_github_copilot_rule.cjs"},"dist":{"shasum":"8a4e872faf1c6034a08ca9d5dd8eaf577f5781c3","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-1.0.1.tgz","fileCount":52,"integrity":"sha512-5P9ig4in6b7CgXECoX25L+Gy+S3hr7frLrceTq9sNoT6Cmg+GgcMl5mX9eDMUT0JDEgXRNnS6Z57Cs3vy+j6aA==","signatures":[{"sig":"MEYCIQDMHFS8j2AxqSzJzEwdXVLOdfr7+m+Gx+y0tlgprfZPcwIhAJGYEu0xuVsI0dmJJFNz92xWejcOyxCTJhtAeto+DAp4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":693596},"type":"module","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"41bf1429e323dd30fca882eb84f85762b0bdd12f","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && tsup && tsc --project tsconfig.types.json","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:unit":"jest --testPathPatterns=\"^((?!integration).)*$\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"jest --coverage","generate:types":"openapi-typescript dws-api-spec.yml -o src/generated/api-types.ts","prepublishOnly":"npm run build && npm run test","test:integration":"jest --testPathPatterns=integration.test","test:integration:verbose":"jest --testPathPatterns=integration.test --verbose"},"_npmUser":{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},"repository":{"url":"git+https://github.com/pspdfkit-labs/nutrient-dws-client-typescript.git","type":"git"},"_npmVersion":"10.9.2","description":"Node.js TypeScript client library for Nutrient Document Web Services (DWS) API","directories":{"doc":"doc","test":"tests","example":"examples"},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.10.0","form-data":"^4.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","jest":"^30.0.3","tsup":"^8.5.0","dotenv":"^17.0.0","eslint":"^9.30.0","rimraf":"^6.0.1","globals":"^16.2.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","prettier":"^3.6.2","@eslint/js":"^9.30.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.7","@eslint/eslintrc":"^3.3.1","eslint-plugin-jest":"^29.0.1","openapi-typescript":"^7.8.0","eslint-config-prettier":"^10.1.5","@typescript-eslint/parser":"^8.35.0","@typescript-eslint/eslint-plugin":"^8.35.0"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_1.0.1_1755766297044_0.2794504419911923","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@nutrient-sdk/dws-client-typescript","version":"2.0.0","keywords":["nutrient","dws","document","convert","sign","redact","digital signature","extract","optimize","compress","pdf","pdfa","pdfua","office","html","markdown","xfdf","table","layout","api","client","typescript","nodejs","ai","agent","claude code","github copilot","cursor","windsurf","context7"],"author":{"url":"https://www.nutrient.io","name":"Nutrient"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@2.0.0","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"},{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"}],"homepage":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript#readme","bugs":{"url":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript/issues"},"bin":{"dws-add-junie-rule":"scripts/add_junie_rule.cjs","dws-add-cursor-rule":"scripts/add_cursor_rule.cjs","dws-add-windsurf-rule":"scripts/add_windsurf_rule.cjs","dws-add-claude-code-rule":"scripts/add_claude_code_rule.cjs","dws-add-github-copilot-rule":"scripts/add_github_copilot_rule.cjs"},"dist":{"shasum":"7296390a0f8d1f935defe329531df2e9a7c27d9b","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-2.0.0.tgz","fileCount":52,"integrity":"sha512-+BtcBT3CAxbK6JosRwC0L3wt6Eh0vXhl0Yi0pSqe6VyWQ2cDOKm9vJ6mvaLp4A+MsYS0RUkHFwjbGy3VZeZhIw==","signatures":[{"sig":"MEYCIQDKbOJxt9ypzzS/fUutW2fWTuyd8mEcyT1EnZwOMo1NqAIhAKuNmrewNpMt8oIzZ2Rp3uZbXqJNE6SyiQAHDB9zJHrz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":679028},"type":"module","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1517a8096f3c43d7c717fa95f2888e2038240a54","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && tsup && tsc --project tsconfig.types.json","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:unit":"jest --testPathPatterns=\"^((?!integration).)*$\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"jest --coverage","generate:types":"openapi-typescript dws-api-spec.yml -o src/generated/api-types.ts","prepublishOnly":"npm run build && npm run test","test:integration":"jest --testPathPatterns=integration.test","test:integration:verbose":"jest --testPathPatterns=integration.test --verbose"},"_npmUser":{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},"overrides":{"glob":"^11.0.4","js-yaml":"^4.1.1"},"repository":{"url":"git+https://github.com/pspdfkit-labs/nutrient-dws-client-typescript.git","type":"git"},"_npmVersion":"11.6.2","description":"Node.js TypeScript client library for Nutrient Document Web Services (DWS) API","directories":{"doc":"doc","test":"tests","example":"examples"},"_nodeVersion":"25.2.1","dependencies":{"axios":"^1.13.2","form-data":"^4.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","eslint":"^9.39.2","rimraf":"^6.1.2","globals":"^16.5.0","ts-jest":"^29.4.6","ts-node":"^10.9.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.7","@eslint/eslintrc":"^3.3.3","eslint-plugin-jest":"^29.12.1","openapi-typescript":"^7.10.1","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.53.0","@typescript-eslint/eslint-plugin":"^8.53.0"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_2.0.0_1769616791163_0.699855054823431","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@nutrient-sdk/dws-client-typescript","version":"2.1.0","keywords":["nutrient","dws","document","convert","sign","redact","digital signature","extract","optimize","compress","pdf","pdfa","pdfua","office","html","markdown","xfdf","table","layout","api","client","typescript","nodejs","ai","agent","claude code","github copilot","cursor","windsurf","context7"],"author":{"url":"https://www.nutrient.io","name":"Nutrient"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@2.1.0","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"},{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"}],"homepage":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript#readme","bugs":{"url":"https://github.com/pspdfkit-labs/nutrient-dws-client-typescript/issues"},"bin":{"dws-add-junie-rule":"scripts/add_junie_rule.cjs","dws-add-cursor-rule":"scripts/add_cursor_rule.cjs","dws-add-windsurf-rule":"scripts/add_windsurf_rule.cjs","dws-add-claude-code-rule":"scripts/add_claude_code_rule.cjs","dws-add-github-copilot-rule":"scripts/add_github_copilot_rule.cjs"},"dist":{"shasum":"2cc43fc3788cbace952ec1387e55caf81c65c326","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-2.1.0.tgz","fileCount":54,"integrity":"sha512-zCOKGlFMGPATazQoRO5Dt+X0cMSAD4xwlhjTZfFq4Nb2/XeCi+539J4P8GmB9jWS5X4u8dmB12oe+XcrxI3diA==","signatures":[{"sig":"MEUCIQC0+uB0ivCiD1HNyw73t4xsrY0ugmbP+OLrUj7hpSY6uAIgVTziZWWOFd1xvBHmWDDQab2GsZxmWxekYfAIU1bZEEc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":764969},"type":"module","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"541448f351cb4b70a9a01f3f432d232ee5169aac","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"jest","build":"npm run clean && tsup && tsc --project tsconfig.types.json","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:unit":"jest --testPathPatterns=\"^((?!integration).)*$\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"jest --coverage","generate:types":"openapi-typescript dws-api-spec.yml -o src/generated/api-types.ts","prepublishOnly":"npm run build && npm run test","test:integration":"jest --testPathPatterns=integration.test","generate:types:extract":"openapi-typescript dws-data-extraction-spec.yml -o src/generated/extract-types.ts","test:integration:verbose":"jest --testPathPatterns=integration.test --verbose"},"_npmUser":{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"},"overrides":{"glob":"^11.0.4","js-yaml":"^4.1.1"},"repository":{"url":"git+https://github.com/pspdfkit-labs/nutrient-dws-client-typescript.git","type":"git"},"_npmVersion":"11.4.2","description":"Node.js TypeScript client library for Nutrient Document Web Services (DWS) API","directories":{"doc":"doc","test":"tests","example":"examples"},"_nodeVersion":"24.4.1","dependencies":{"axios":"^1.13.2","form-data":"^4.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","tsup":"^8.5.1","dotenv":"^17.2.3","eslint":"^9.39.2","rimraf":"^6.1.2","globals":"^16.5.0","ts-jest":"^29.4.6","ts-node":"^10.9.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.7","@eslint/eslintrc":"^3.3.3","eslint-plugin-jest":"^29.12.1","openapi-typescript":"^7.10.1","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.53.0","@typescript-eslint/eslint-plugin":"^8.53.0"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_2.1.0_1780081980509_0.7160214065901704","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@nutrient-sdk/dws-client-typescript","version":"3.0.0","keywords":["nutrient","dws","document","convert","sign","redact","digital signature","extract","optimize","compress","pdf","pdfa","pdfua","office","html","markdown","xfdf","table","layout","api","client","typescript","nodejs","ai","agent","claude code","github copilot","cursor","windsurf","context7"],"author":{"url":"https://www.nutrient.io","name":"Nutrient"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@3.0.0","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"},{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"}],"homepage":"https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript#readme","bugs":{"url":"https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/issues"},"bin":{"dws-add-junie-rule":"scripts/add_junie_rule.cjs","dws-add-cursor-rule":"scripts/add_cursor_rule.cjs","dws-add-windsurf-rule":"scripts/add_windsurf_rule.cjs","dws-add-claude-code-rule":"scripts/add_claude_code_rule.cjs","dws-add-github-copilot-rule":"scripts/add_github_copilot_rule.cjs"},"dist":{"shasum":"76dc35558f0db12c9fb00cccb5bc8e452e19a5fa","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-3.0.0.tgz","fileCount":56,"integrity":"sha512-8xO1rcXJHFyqO2Xwy3xhQXZNL63KTy7ybLrf8BAw+RcOjkXjw97WRZHLRnDuwkLesJM0cDhRqdwRktX+Fr3qEQ==","signatures":[{"sig":"MEQCIATz4wodWqe+N8qNzzW8T4y0g9Lt9Fpu2UuHNIHrSd4XAiADY3A5x+EchR2wwkTzij50WxE0JhUYlrN86M9WYfmoNg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nutrient-sdk%2fdws-client-typescript@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":887717},"type":"module","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a899d9f0abd26c487aeb9084d4e00b18fef3dba7","scripts":{"dev":"tsup --watch","lint":"eslint src","test":"jest","build":"npm run clean && tsup && tsc --project tsconfig.types.json","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --fix","test:unit":"jest --testPathPatterns=\"^((?!integration).)*$\"","typecheck":"tsc --noEmit && tsc --noEmit --project src/__tests__/tsconfig.json","test:smoke":"node tools/smoke-test.mjs","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"jest --coverage","generate:types":"openapi-typescript dws-api-spec.yml --empty-objects-unknown --default-non-nullable=false -o src/generated/api-types.ts","prepublishOnly":"npm run build && npm run test","test:integration":"jest --testPathPatterns=integration.test","generate:types:extract":"openapi-typescript dws-data-extraction-spec.yml -o src/generated/extract-types.ts","test:integration:verbose":"jest --testPathPatterns=integration.test --verbose"},"_npmUser":{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"},"overrides":{"glob":"^11.0.4","js-yaml":"^4.1.1","openapi-typescript":{"typescript":"$typescript"}},"repository":{"url":"git+https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript.git","type":"git"},"_npmVersion":"12.0.2","description":"Node.js TypeScript client library for Nutrient Document Web Services (DWS) API","directories":{"doc":"doc","test":"tests","example":"examples"},"_nodeVersion":"22.23.2","dependencies":{"axios":"^1.19.0","form-data":"^4.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.11","jest":"^30.4.2","tsup":"^8.5.1","dotenv":"^17.4.2","eslint":"^10.8.1","rimraf":"^6.1.3","globals":"^17.9.0","ts-jest":"^29.4.12","ts-node":"^10.9.2","prettier":"^3.9.6","@eslint/js":"^10.0.1","typescript":"^6.0.3","@types/jest":"^30.0.0","@types/node":"^26.2.0","@eslint/eslintrc":"^3.3.6","eslint-plugin-jest":"^29.16.0","openapi-typescript":"^7.13.0","eslint-config-prettier":"^10.1.8","@typescript-eslint/parser":"^8.66.0","@typescript-eslint/eslint-plugin":"^8.66.0"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_3.0.0_1787520717990_0.48501718855050857","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@nutrient-sdk/dws-client-typescript","version":"4.0.0","keywords":["nutrient","dws","pdf","document","api","client","sdk","convert","ocr","redact","sign","data-extraction","accessibility"],"author":{"name":"PSPDFKit GmbH d/b/a Nutrient","email":"support@nutrient.io"},"license":"MIT","_id":"@nutrient-sdk/dws-client-typescript@4.0.0","maintainers":[{"name":"mbukov","email":"matej@bukovinski.com"},{"name":"zrzka","email":"rvojta@me.com"},{"name":"pspdfkit-ci","email":"services+npm-ci@pspdfkit.com"},{"name":"msch","email":"martin@schuerrer.org"},{"name":"sasha_nutrient","email":"sasha.rudenka@nutrient.io"}],"homepage":"https://www.nutrient.io/api/","bugs":{"url":"https://www.nutrient.io/support/request/"},"dist":{"shasum":"8728ea2a42032bb979dbed2bcbadd199d9065aef","tarball":"https://registry.npmjs.org/@nutrient-sdk/dws-client-typescript/-/dws-client-typescript-4.0.0.tgz","fileCount":2268,"integrity":"sha512-uoLtz2hqmjYFp1Zf60Vjac5betV7KemYNdp0XxIrsmJ0AHql2y4lh2ViUXzF8n/xxWRYx7yLBkc9TAwsrpQ2MQ==","signatures":[{"sig":"MEYCIQDdzdYoCswJC38x2scY2zMVRWBbgXzH8A4mdou6+RdBiQIhAO5gqiTcMJ1obSciamGBqjB1Dtd2BJjW/mP5ImKjYKO8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC/F1JxmzRXOdL7r6zKPm9/9+em/Frz3WwWcr5HsoWK+QIhAOvL6oqwr8TZGhqN/roqtf8oLAr+R7DO/dysRQhxG9b7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3192160},"main":"./dist/cjs/index.js","type":"commonjs","_from":"file:/home/runner/work/nutrient-platform/nutrient-platform/hosted/SDK/generated/typescript/nutrient-sdk-dws-client-typescript-4.0.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.mjs","browser":{"fs":false,"os":false,"path":false,"crypto":false,"stream":false},"engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/esm/index.d.mts","default":"./dist/esm/index.mjs"},"default":"./dist/cjs/index.js","require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./tokens":{"import":{"types":"./dist/esm/api/resources/tokens/exports.d.mts","default":"./dist/esm/api/resources/tokens/exports.mjs"},"default":"./dist/cjs/api/resources/tokens/exports.js","require":{"types":"./dist/cjs/api/resources/tokens/exports.d.ts","default":"./dist/cjs/api/resources/tokens/exports.js"}},"./account":{"import":{"types":"./dist/esm/api/resources/account/exports.d.mts","default":"./dist/esm/api/resources/account/exports.mjs"},"default":"./dist/cjs/api/resources/account/exports.js","require":{"types":"./dist/cjs/api/resources/account/exports.d.ts","default":"./dist/cjs/api/resources/account/exports.js"}},"./processor":{"import":{"types":"./dist/esm/api/resources/processor/exports.d.mts","default":"./dist/esm/api/resources/processor/exports.mjs"},"default":"./dist/cjs/api/resources/processor/exports.js","require":{"types":"./dist/cjs/api/resources/processor/exports.d.ts","default":"./dist/cjs/api/resources/processor/exports.js"}},"./extraction":{"import":{"types":"./dist/esm/api/resources/extraction/exports.d.mts","default":"./dist/esm/api/resources/extraction/exports.mjs"},"default":"./dist/cjs/api/resources/extraction/exports.js","require":{"types":"./dist/cjs/api/resources/extraction/exports.d.ts","default":"./dist/cjs/api/resources/extraction/exports.js"}},"./package.json":"./package.json","./accessibility":{"import":{"types":"./dist/esm/api/resources/accessibility/exports.d.mts","default":"./dist/esm/api/resources/accessibility/exports.mjs"},"default":"./dist/cjs/api/resources/accessibility/exports.js","require":{"types":"./dist/cjs/api/resources/accessibility/exports.d.ts","default":"./dist/cjs/api/resources/accessibility/exports.js"}},"./processor/jobs":{"import":{"types":"./dist/esm/api/resources/processor/resources/jobs/exports.d.mts","default":"./dist/esm/api/resources/processor/resources/jobs/exports.mjs"},"default":"./dist/cjs/api/resources/processor/resources/jobs/exports.js","require":{"types":"./dist/cjs/api/resources/processor/resources/jobs/exports.d.ts","default":"./dist/cjs/api/resources/processor/resources/jobs/exports.js"}},"./extraction/runs":{"import":{"types":"./dist/esm/api/resources/extraction/resources/runs/exports.d.mts","default":"./dist/esm/api/resources/extraction/resources/runs/exports.mjs"},"default":"./dist/cjs/api/resources/extraction/resources/runs/exports.js","require":{"types":"./dist/cjs/api/resources/extraction/resources/runs/exports.d.ts","default":"./dist/cjs/api/resources/extraction/resources/runs/exports.js"}},"./extraction/batches":{"import":{"types":"./dist/esm/api/resources/extraction/resources/batches/exports.d.mts","default":"./dist/esm/api/resources/extraction/resources/batches/exports.mjs"},"default":"./dist/cjs/api/resources/extraction/resources/batches/exports.js","require":{"types":"./dist/cjs/api/resources/extraction/resources/batches/exports.d.ts","default":"./dist/cjs/api/resources/extraction/resources/batches/exports.js"}},"./extraction/processors":{"import":{"types":"./dist/esm/api/resources/extraction/resources/processors/exports.d.mts","default":"./dist/esm/api/resources/extraction/resources/processors/exports.mjs"},"default":"./dist/cjs/api/resources/extraction/resources/processors/exports.js","require":{"types":"./dist/cjs/api/resources/extraction/resources/processors/exports.d.ts","default":"./dist/cjs/api/resources/extraction/resources/processors/exports.js"}}},"private":false,"scripts":{"lint":"biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none","test":"vitest","build":"pnpm build:cjs && pnpm build:esm","check":"biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none","format":"biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none","lint:fix":"biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none","build:cjs":"tsc --project ./tsconfig.cjs.json","build:esm":"tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm","check:fix":"biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none","test:unit":"vitest --project unit","test:wire":"vitest --project wire","format:check":"biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5de79915-f1e2-4f7e-bec1-0c9a701ee4e5"}},"_resolved":"/home/runner/work/nutrient-platform/nutrient-platform/hosted/SDK/generated/typescript/nutrient-sdk-dws-client-typescript-4.0.0.tgz","_integrity":"sha512-uoLtz2hqmjYFp1Zf60Vjac5betV7KemYNdp0XxIrsmJ0AHql2y4lh2ViUXzF8n/xxWRYx7yLBkc9TAwsrpQ2MQ==","_npmVersion":"11.6.2","description":"Nutrient DWS API client for the Processor, Data Extraction, and Accessibility APIs","directories":{},"nutrientDws":{"spec":"public@2026-05-25.yml","specSha256":"6b6d9effff8aae9abc94370d58b192074d87c021b2c2d7aac10e629a5dcd7852"},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"2.11.2","vitest":"^4.1.1","webpack":"^5.105.4","ts-loader":"^9.5.4","typescript":"~5.9.3","@types/node":"^20.0.0","@biomejs/biome":"2.4.10"},"_npmOperationalInternal":{"tmp":"tmp/dws-client-typescript_4.0.0_1795032714040_0.1363944135532542","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-07-16T00:07:58.138Z","modified":"2026-11-20T10:11:44.328Z","1.0.0":"2025-07-16T00:07:58.420Z","1.0.1":"2025-08-21T08:51:37.245Z","2.0.0":"2026-01-28T16:13:11.317Z","2.1.0":"2026-05-29T19:13:00.669Z","3.0.0":"2026-08-23T21:31:58.180Z","4.0.0":"2026-11-18T20:11:54.389Z"},"bugs":{"url":"https://www.nutrient.io/support/request/"},"author":{"name":"PSPDFKit GmbH d/b/a Nutrient","email":"support@nutrient.io"},"license":"MIT","homepage":"https://www.nutrient.io/api/","keywords":["nutrient","dws","pdf","document","api","client","sdk","convert","ocr","redact","sign","data-extraction","accessibility"],"description":"Nutrient DWS API client for the Processor, Data Extraction, and Accessibility APIs","maintainers":[{"email":"matej@bukovinski.com","name":"mbukov"},{"email":"services+npm-ci@pspdfkit.com","name":"pspdfkit-ci"},{"email":"martin@schuerrer.org","name":"msch"},{"email":"sasha.rudenka@nutrient.io","name":"sasha_nutrient"}],"readme":"# Nutrient TypeScript Library\n\n[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Nutrient%2FTypeScript)\n[![npm shield](https://img.shields.io/npm/v/@nutrient-sdk/dws-client-typescript)](https://www.npmjs.com/package/@nutrient-sdk/dws-client-typescript)\n\nThe Nutrient TypeScript library provides convenient access to the Nutrient APIs from TypeScript.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Reference](#reference)\n- [Usage](#usage)\n- [Environments](#environments)\n- [Request and Response Types](#request-and-response-types)\n- [Exception Handling](#exception-handling)\n- [File Uploads](#file-uploads)\n- [Binary Response](#binary-response)\n- [Advanced](#advanced)\n  - [Subpackage Exports](#subpackage-exports)\n  - [Additional Headers](#additional-headers)\n  - [Additional Query String Parameters](#additional-query-string-parameters)\n  - [Retries](#retries)\n  - [Timeouts](#timeouts)\n  - [Aborting Requests](#aborting-requests)\n  - [Access Raw Response Data](#access-raw-response-data)\n  - [Logging](#logging)\n  - [Custom Fetch](#custom-fetch)\n  - [Runtime Compatibility](#runtime-compatibility)\n- [Migrating from 3.x](#migrating-from-3x)\n- [Support](#support)\n\n## Installation\n\n```sh\nnpm i -s @nutrient-sdk/dws-client-typescript\n```\n\n## Reference\n\nEach method's TSDoc comment describes its parameters and result. The\n[DWS API reference](https://www.nutrient.io/api/reference/public/) documents every operation.\n\n## Usage\n\nThe client groups the API by product: `client.processor`, `client.extraction`, `client.accessibility`,\n`client.account`, and `client.tokens`.\n\n```typescript\nimport { writeFile } from \"node:fs/promises\";\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient(); // apiKey defaults to the NUTRIENT_API_KEY environment variable\n\n// Convert a Word document to PDF.\nconst pdf = await client.processor.convertToPdf({ file: { path: \"report.docx\" } });\nawait writeFile(\"report.pdf\", Buffer.from(await pdf.arrayBuffer()));\n\n// Merge two documents with Build instructions.\nconst merged = await client.processor.build({\n  instructions: { parts: [{ file: \"file1\" }, { file: \"file2\" }] },\n  file1: { path: \"a.pdf\" },\n  file2: { path: \"b.docx\" },\n});\nawait writeFile(\"merged.pdf\", Buffer.from(await merged.arrayBuffer()));\n```\n\n### Asynchronous Build jobs\n\nA long Build can run in the background: with `Prefer: \"respond-async\"`, DWS answers `202 Accepted` with a job\ninstead of the file. Read that answer from the raw response, wait for the job, then download its result. The job\ntoken authorizes only that job.\n\n```typescript\nimport { randomUUID } from \"node:crypto\";\nimport { setTimeout } from \"node:timers/promises\";\nimport { writeFile } from \"node:fs/promises\";\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient();\n\nconst { data, rawResponse } = await client.processor\n    .build({\n        instructions: { parts: [{ file: \"file1\" }] },\n        file1: { path: \"document.pdf\" },\n        Prefer: \"respond-async\",\n        \"Idempotency-Key\": randomUUID(), // sending the same key again returns the same job\n    })\n    .withRawResponse();\nif (rawResponse.status !== 202) throw new Error(`Expected 202 Accepted, got ${rawResponse.status}`);\nconst job = JSON.parse(Buffer.from(await data.arrayBuffer()).toString(\"utf8\")).data;\n\nconst token = { jobId: job.job_id, \"X-Async-Job-Token\": job.job_access_token };\nlet status = (await client.processor.jobs.get(token)).data;\nwhile (status.status === \"not_started\" || status.status === \"in_progress\") {\n    await setTimeout(10_000);\n    status = (await client.processor.jobs.get(token)).data;\n}\nif (status.status !== \"completed\") throw new Error(`The Build job ended ${status.status}`);\nconst result = await client.processor.jobs.getResult(token);\nawait writeFile(\"result.pdf\", Buffer.from(await result.arrayBuffer()));\n```\n\n### Build outputs\n\nBuild returns a PDF unless the instructions name another `output`: PDF/A, images, Office documents, or the\ndocument's text and tables as JSON.\n\n```typescript\nimport { writeFile } from \"node:fs/promises\";\nimport { Nutrient, NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient();\nconst outputs: Record<string, Nutrient.BuildOutput> = {\n    \"archived.pdf\": { type: \"pdfa\", conformance: \"pdfa-2b\" },\n    \"page.png\": { type: \"image\", format: \"png\", dpi: 150 },\n    \"document.docx\": { type: \"docx\" },\n};\nfor (const [name, output] of Object.entries(outputs)) {\n    const result = await client.processor.build({\n        instructions: { parts: [{ file: \"file1\" }], output },\n        file1: { path: \"document.pdf\" },\n    });\n    await writeFile(name, Buffer.from(await result.arrayBuffer()));\n}\n\n// JSON content: the text and tables of every page.\nconst json = await client.processor.build({\n    instructions: { parts: [{ file: \"file1\" }], output: { type: \"json-content\", plainText: true, tables: true } },\n    file1: { path: \"document.pdf\" },\n});\nconst content = JSON.parse(Buffer.from(await json.arrayBuffer()).toString(\"utf8\"));\nconsole.log(content.pages[0].plainText);\n```\n\n### HTML assets and image watermarks\n\nThe convenience methods upload one file each. For HTML that needs its stylesheets, images, or fonts, or for an image\nwatermark, use `processor.build`: upload the extra files as `file2`, `file3`, and so on, and refer to them by that\nname. An HTML page imports its assets by those names, for example `<link rel=\"stylesheet\" href=\"file2\">`.\n\n```typescript\nimport { writeFile } from \"node:fs/promises\";\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient();\n\nconst page = await client.processor.build({\n    instructions: { parts: [{ html: \"file1\", assets: [\"file2\"] }] },\n    file1: { path: \"page.html\" },\n    file2: { path: \"style.css\" },\n});\nawait writeFile(\"page.pdf\", Buffer.from(await page.arrayBuffer()));\n\nconst watermarked = await client.processor.build({\n    instructions: {\n        parts: [{ file: \"file1\" }],\n        // Width and height: a share of the page, as here, or a number of points.\n        actions: [{ type: \"watermark\", image: \"file2\", width: { value: 25, unit: \"%\" }, height: { value: 25, unit: \"%\" }, opacity: 0.5 }],\n    },\n    file1: { path: \"document.pdf\" },\n    file2: { path: \"logo.png\" },\n});\nawait writeFile(\"watermarked.pdf\", Buffer.from(await watermarked.arrayBuffer()));\n```\n\n### Batches\n\nA batch runs one Data Extraction operation over up to ten documents. Each document becomes a stored run; read its\nresult once the batch is done.\n\n```typescript\nimport { setTimeout } from \"node:timers/promises\";\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient();\n\nlet batch = await client.extraction.batches.submit({\n    operation: \"parse\",\n    instructions: { mode: \"text\" },\n    \"files[]\": [{ path: \"invoice.pdf\" }, { path: \"document.pdf\" }],\n});\nwhile (![\"done\", \"error\", \"canceled\"].includes(batch.status)) {\n    await setTimeout(5_000);\n    batch = await client.extraction.batches.get({ batchId: batch.id });\n}\nfor (const document of batch.documents) {\n    // After `error`, a document can still be running: check each one's status.\n    if (document.resultAvailable && document.runId) {\n        const asset = await client.extraction.runs.downloadAsset({ runId: document.runId, assetKey: \"result\" });\n        const result = JSON.parse(Buffer.from(await asset.arrayBuffer()).toString(\"utf8\"));\n        console.log(document.fileName, document.status, Object.keys(result));\n    } else {\n        console.log(document.fileName, document.status, document.error);\n    }\n}\n```\n\n## Environments\n\nThis SDK allows you to configure different environments for API requests.\n\n```typescript\nimport { NutrientClient, NutrientEnvironment } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient({\n    environment: NutrientEnvironment.Default,\n});\n```\n\n## Request and Response Types\n\nThe SDK exports all request and response types as TypeScript interfaces. Simply import them with the\nfollowing namespace:\n\n```typescript\nimport { Nutrient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst request: Nutrient.BuildProcessorRequestJson = {\n    ...\n};\n```\n\n## Exception Handling\n\nWhen the API returns a non-success status code (4xx or 5xx response), a subclass of the following error\nwill be thrown.\n\n```typescript\nimport { NutrientError } from \"@nutrient-sdk/dws-client-typescript\";\n\ntry {\n    await client.processor.buildJson(...);\n} catch (err) {\n    if (err instanceof NutrientError) {\n        console.log(err.statusCode);\n        console.log(err.message);\n        console.log(err.body);\n        console.log(err.rawResponse);\n    }\n}\n```\n\n## File Uploads\n\nYou can upload files using the client:\n\n```typescript\nimport { createReadStream } from \"fs\";\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient({ apiKey: \"YOUR_API_KEY\" });\nconst merged = await client.processor.build({\n    instructions: { parts: [{ file: \"file1\" }, { file: \"file2\" }] },\n    file1: createReadStream(\"document.pdf\"),\n    file2: { path: \"document.docx\" },\n});\n```\nThe client accepts a variety of types for file upload parameters:\n* Stream types: `fs.ReadStream`, `stream.Readable`, and `ReadableStream`\n* Buffered types: `Buffer`, `Blob`, `File`, `ArrayBuffer`, `ArrayBufferView`, and `Uint8Array`\n\n### Metadata\n\nYou can configure metadata when uploading a file:\n```typescript\nconst file: Uploadable.WithMetadata = {\n    data: createReadStream(\"path/to/file\"),\n    filename: \"my-file\",       // optional\n    contentType: \"audio/mpeg\", // optional\n    contentLength: 1949,       // optional\n};\n```\n\nAlternatively, you can upload a file directly from a file path:\n```typescript\nconst file : Uploadable.FromPath = {\n    path: \"path/to/file\",\n    filename: \"my-file\",        // optional\n    contentType: \"audio/mpeg\",  // optional\n    contentLength: 1949,        // optional\n};\n```\n\nThe metadata is used to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.\nFor example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.\n\n\n## Binary Response\n\nYou can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:\n\n```typescript\nconst response = await client.processor.buildJson(...);\nconst stream: ReadableStream<Uint8Array> = response.stream();\n// const arrayBuffer: ArrayBuffer = await response.arrayBuffer();\n// const blob: Blob = await response.blob();\n// const bytes: Uint8Array = await response.bytes();\n// You can only use the response body once, so you must choose one of the above methods.\n// If you want to check if the response body has been used, you can use the following property.\nconst bodyUsed = response.bodyUsed;\n```\n<details>\n<summary>Save binary response to a file</summary>\n\n<blockquote>\n<details>\n<summary>Node.js</summary>\n\n<blockquote>\n<details>\n<summary>ReadableStream (most-efficient)</summary>\n\n```ts\nimport { createWriteStream } from 'fs';\nimport { Readable } from 'stream';\nimport { pipeline } from 'stream/promises';\n\nconst response = await client.processor.buildJson(...);\n\nconst stream = response.stream();\nconst nodeStream = Readable.fromWeb(stream);\nconst writeStream = createWriteStream('path/to/file');\n\nawait pipeline(nodeStream, writeStream);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ArrayBuffer</summary>\n\n```ts\nimport { writeFile } from 'fs/promises';\n\nconst response = await client.processor.buildJson(...);\n\nconst arrayBuffer = await response.arrayBuffer();\nawait writeFile('path/to/file', Buffer.from(arrayBuffer));\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Blob</summary>\n\n```ts\nimport { writeFile } from 'fs/promises';\n\nconst response = await client.processor.buildJson(...);\n\nconst blob = await response.blob();\nconst arrayBuffer = await blob.arrayBuffer();\nawait writeFile('output.bin', Buffer.from(arrayBuffer));\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bytes (UIntArray8)</summary>\n\n```ts\nimport { writeFile } from 'fs/promises';\n\nconst response = await client.processor.buildJson(...);\n\nconst bytes = await response.bytes();\nawait writeFile('path/to/file', bytes);\n```\n\n</details>\n</blockquote>\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bun</summary>\n\n<blockquote>\n<details>\n<summary>ReadableStream (most-efficient)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst stream = response.stream();\nawait Bun.write('path/to/file', stream);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ArrayBuffer</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst arrayBuffer = await response.arrayBuffer();\nawait Bun.write('path/to/file', arrayBuffer);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Blob</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst blob = await response.blob();\nawait Bun.write('path/to/file', blob);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bytes (UIntArray8)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst bytes = await response.bytes();\nawait Bun.write('path/to/file', bytes);\n```\n\n</details>\n</blockquote>\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Deno</summary>\n\n<blockquote>\n<details>\n<summary>ReadableStream (most-efficient)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst stream = response.stream();\nconst file = await Deno.open('path/to/file', { write: true, create: true });\nawait stream.pipeTo(file.writable);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ArrayBuffer</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst arrayBuffer = await response.arrayBuffer();\nawait Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Blob</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst blob = await response.blob();\nconst arrayBuffer = await blob.arrayBuffer();\nawait Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bytes (UIntArray8)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst bytes = await response.bytes();\nawait Deno.writeFile('path/to/file', bytes);\n```\n\n</details>\n</blockquote>\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Browser</summary>\n\n<blockquote>\n<details>\n<summary>Blob (most-efficient)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst blob = await response.blob();\nconst url = URL.createObjectURL(blob);\n\n// trigger download\nconst a = document.createElement('a');\na.href = url;\na.download = 'filename';\na.click();\nURL.revokeObjectURL(url);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ReadableStream</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst stream = response.stream();\nconst reader = stream.getReader();\nconst chunks = [];\n\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  chunks.push(value);\n}\n\nconst blob = new Blob(chunks);\nconst url = URL.createObjectURL(blob);\n\n// trigger download\nconst a = document.createElement('a');\na.href = url;\na.download = 'filename';\na.click();\nURL.revokeObjectURL(url);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ArrayBuffer</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst arrayBuffer = await response.arrayBuffer();\nconst blob = new Blob([arrayBuffer]);\nconst url = URL.createObjectURL(blob);\n\n// trigger download\nconst a = document.createElement('a');\na.href = url;\na.download = 'filename';\na.click();\nURL.revokeObjectURL(url);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bytes (UIntArray8)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst bytes = await response.bytes();\nconst blob = new Blob([bytes]);\nconst url = URL.createObjectURL(blob);\n\n// trigger download\nconst a = document.createElement('a');\na.href = url;\na.download = 'filename';\na.click();\nURL.revokeObjectURL(url);\n```\n\n</details>\n</blockquote>\n\n</details>\n</blockquote>\n\n</details>\n</blockquote>\n\n<details>\n<summary>Convert binary response to text</summary>\n\n<blockquote>\n<details>\n<summary>ReadableStream</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst stream = response.stream();\nconst text = await new Response(stream).text();\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>ArrayBuffer</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst arrayBuffer = await response.arrayBuffer();\nconst text = new TextDecoder().decode(arrayBuffer);\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Blob</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst blob = await response.blob();\nconst text = await blob.text();\n```\n\n</details>\n</blockquote>\n\n<blockquote>\n<details>\n<summary>Bytes (UIntArray8)</summary>\n\n```ts\nconst response = await client.processor.buildJson(...);\n\nconst bytes = await response.bytes();\nconst text = new TextDecoder().decode(bytes);\n```\n\n</details>\n</blockquote>\n\n</details>\n\n## Advanced\n\n### Subpackage Exports\n\nThis SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.\n\n```typescript\nimport { ProcessorClient } from '@nutrient-sdk/dws-client-typescript/processor';\n\nconst client = new ProcessorClient({...});\n```\n\n### Additional Headers\n\nIf you would like to send additional headers as part of the request, use the `headers` request option.\n\n```typescript\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient({\n    ...\n    headers: {\n        'X-Custom-Header': 'custom value'\n    }\n});\n\nconst response = await client.processor.buildJson(..., {\n    headers: {\n        'X-Custom-Header': 'custom value'\n    }\n});\n```\n\n### Additional Query String Parameters\n\nIf you would like to send additional query string parameters as part of the request, use the `queryParams` request option.\n\n```typescript\nconst response = await client.processor.buildJson(..., {\n    queryParams: {\n        'customQueryParamKey': 'custom query param value'\n    }\n});\n```\n\n### Retries\n\nThe SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long\nas the request is deemed retryable and the number of retry attempts has not grown larger than the configured\nretry limit (default: 2).\n\nIt retries these status codes:\n- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)\n- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)\n- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500)\n\nUse the `maxRetries` request option to configure this behavior.\n\n```typescript\nconst response = await client.processor.buildJson(..., {\n    maxRetries: 0 // override maxRetries at the request level\n});\n```\n\n### Timeouts\n\nThe SDK defaults to a 660 second timeout, just past the 10 minutes DWS allows a synchronous request. Use the `timeoutInSeconds` option to configure this behavior.\n\n```typescript\nconst response = await client.processor.buildJson(..., {\n    timeoutInSeconds: 30 // override timeout to 30s\n});\n```\n\n### Aborting Requests\n\nThe SDK allows users to abort requests at any point by passing in an abort signal.\n\n```typescript\nconst controller = new AbortController();\nconst response = await client.processor.buildJson(..., {\n    abortSignal: controller.signal\n});\ncontroller.abort(); // aborts the request\n```\n\n### Access Raw Response Data\n\nThe SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.\nThe `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.\n\n```typescript\nconst { data, rawResponse } = await client.processor.buildJson(...).withRawResponse();\n\nconsole.log(data);\nconsole.log(rawResponse.headers.get(\"X-My-Header\"));\n```\n\n### Logging\n\nThe SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.\n\n```typescript\nimport { NutrientClient, logging } from \"@nutrient-sdk/dws-client-typescript\";\n\nconst client = new NutrientClient({\n    ...\n    logging: {\n        level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info\n        logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger\n        silent: false, // defaults to true, set to false to enable logging\n    }\n});\n```\nThe `logging` object can have the following properties:\n- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.\n- `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.\n- `silent`: Whether to silence the logger. Defaults to `true`.\n\nThe `level` property can be one of the following values:\n- `logging.LogLevel.Debug`\n- `logging.LogLevel.Info`\n- `logging.LogLevel.Warn`\n- `logging.LogLevel.Error`\n\nTo provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.\n\n<details>\n<summary>Custom logger examples</summary>\n\nHere's an example using the popular `winston` logging library.\n```ts\nimport winston from 'winston';\n\nconst winstonLogger = winston.createLogger({...});\n\nconst logger: logging.ILogger = {\n    debug: (msg, ...args) => winstonLogger.debug(msg, ...args),\n    info: (msg, ...args) => winstonLogger.info(msg, ...args),\n    warn: (msg, ...args) => winstonLogger.warn(msg, ...args),\n    error: (msg, ...args) => winstonLogger.error(msg, ...args),\n};\n```\n\nHere's an example using the popular `pino` logging library.\n\n```ts\nimport pino from 'pino';\n\nconst pinoLogger = pino({...});\n\nconst logger: logging.ILogger = {\n  debug: (msg, ...args) => pinoLogger.debug(args, msg),\n  info: (msg, ...args) => pinoLogger.info(args, msg),\n  warn: (msg, ...args) => pinoLogger.warn(args, msg),\n  error: (msg, ...args) => pinoLogger.error(args, msg),\n};\n```\n</details>\n\n\n### Custom Fetch\n\nThe SDK provides a low-level `fetch` method for making custom HTTP requests while still\nbenefiting from SDK-level configuration like authentication, retries, timeouts, and logging.\nThis is useful for calling API endpoints not yet supported in the SDK.\n\n```typescript\nconst response = await client.fetch(\"/v1/custom/endpoint\", {\n    method: \"GET\",\n}, {\n    timeoutInSeconds: 30,\n    maxRetries: 3,\n    headers: {\n        \"X-Custom-Header\": \"custom-value\",\n    },\n});\n\nconst data = await response.json();\n```\n\n### Runtime Compatibility\n\n\nThe SDK works in the following runtimes:\n\n\n\n- Node.js 18+\n- Vercel\n- Cloudflare Workers\n- Deno v1.25+\n- Bun 1.0+\n- React Native\n\n\n## Migrating from 3.x\n\nVersion 4 is built with a new generator and follows the DWS API reference.\nIt replaces the 3.x client and its convenience methods: each 3.x call becomes a call to the\nendpoint it used, mostly `client.processor.build` with Build instructions. The package has no runtime\ndependencies and needs Node.js 18 or newer.\n\n```typescript\nimport { NutrientClient } from \"@nutrient-sdk/dws-client-typescript\";\nimport { createReadStream, writeFileSync } from \"node:fs\";\n\nconst client = new NutrientClient({ apiKey: process.env.NUTRIENT_API_KEY });\n\n// 3.x: await client.merge([\"a.pdf\", \"b.docx\"])\nconst merged = await client.processor.build({\n  instructions: { parts: [{ file: \"file1\" }, { file: \"file2\" }] },\n  file1: createReadStream(\"a.pdf\"),\n  file2: createReadStream(\"b.docx\"),\n});\nwriteFileSync(\"merged.pdf\", Buffer.from(await merged.arrayBuffer()));\n```\n\n| 3.x                                                                                                                                              | 4.0                                                                                                                                                                                                                                   |\n| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `new NutrientClient({ apiKey, baseUrl, timeout })`                                                                                               | `new NutrientClient({ apiKey, baseUrl, timeoutInSeconds, maxRetries })`. `apiKey` falls back to the `NUTRIENT_API_KEY` environment variable.                                                                                          |\n| `extractApiKey`                                                                                                                                  | Not available. With a global DWS API key, one client covers every API; with a separate Data Extraction key, create a second client for `client.extraction`.                                                                           |\n| `workflow()`, `addFilePart`, `applyAction(s)`, `output*`, `execute`                                                                              | `processor.build({ instructions, file1, … file10 })`: the instructions object is the builder's result. Reference uploaded files by field name (`{ file: \"file1\" }`); for URLs, use `processor.buildJson({ parts, actions, output })`. |\n| `dryRun()`                                                                                                                                       | `processor.analyzeBuild({ parts, actions, output })`                                                                                                                                                                                  |\n| `convert(file, \"pdf\")`                                                                                                                           | `processor.convertToPdf({ file })` (Office, images, email), `processor.generatePdf({ html })`, `processor.markdownToPdf({ markdown })`. Other formats: `processor.build` with an `output`.                                            |\n| `merge`, `rotate`, `flatten`, `optimize`, `passwordProtect`, `setMetadata`, `setPageLabels`, `addPage`, `duplicatePages`, `deletePages`, `split` | `processor.build` with the matching parts, actions, and output.                                                                                                                                                                       |\n| `ocr(file, language)`                                                                                                                            | `processor.ocr({ file, data: { language } })`                                                                                                                                                                                         |\n| `watermarkText`, `watermarkImage`                                                                                                                | `processor.watermark({ file, data })`                                                                                                                                                                                                 |\n| `createRedactionsText/Regex/Preset`, `applyRedactions`                                                                                           | `processor.redact({ file, data })`                                                                                                                                                                                                    |\n| `createRedactionsAI`                                                                                                                             | `processor.aiRedact({ file, data })`                                                                                                                                                                                                  |\n| `applyInstantJson`, `applyXfdf`                                                                                                                  | `processor.build` with the `applyInstantJson` / `applyXfdf` action.                                                                                                                                                                   |\n| `extractText`, `extractTable`, `extractKeyValuePairs`                                                                                            | `processor.build` with a `json-content` output.                                                                                                                                                                                       |\n| `sign(pdf, data, options)`                                                                                                                       | `processor.sign({ file, data, image, graphicImage })`                                                                                                                                                                                 |\n| `parse`, `parseToMarkdown`, `parseElements`                                                                                                      | `extraction.parse({ file, instructions })`; `extraction.parseJson({ url, … })` for URLs.                                                                                                                                              |\n| `createToken`, `deleteToken`                                                                                                                     | `tokens.create(…)`, `tokens.revoke(…)`                                                                                                                                                                                                |\n| `getUsage(product)`, `getAccountInfo()`                                                                                                          | `account.getUsage({ product })`, `account.getInfo()`                                                                                                                                                                                  |\n| Results `{ buffer, mimeType, filename }`                                                                                                         | File responses are `BinaryResponse`s: `await response.arrayBuffer()`, `.blob()`, or `.stream()`. JSON responses are typed objects.                                                                                                    |\n| `NutrientError`, `ValidationError`, `APIError`, `AuthenticationError`, `NetworkError`                                                            | `NutrientError` (with `statusCode` and `body`) and one subclass per documented status, such as `Nutrient.UnauthorizedError`; `NutrientTimeoutError` for timeouts.                                                                     |\n\n## Support\n\nAsk questions and report problems through [Nutrient support](https://www.nutrient.io/support/request/). The [DWS API reference](https://www.nutrient.io/api/reference/public/) documents every operation.\n","readmeFilename":"README.md"}