{"_id":"@adaptive-ds/lexware-client","_rev":"4-04625d5fa8c39454409c37faea6768b4","name":"@adaptive-ds/lexware-client","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.1":{"name":"@adaptive-ds/lexware-client","version":"0.1.1","keywords":["lexware","lexware-office","api-client","typescript","result"],"license":"MIT","_id":"@adaptive-ds/lexware-client@0.1.1","maintainers":[{"name":"david1gp","email":"david1gruppenplan@gmail.com"}],"homepage":"https://github.com/david1gp/lexware-client","bugs":{"url":"https://github.com/david1gp/lexware-client/issues"},"bin":{"lexware":"dist/cli.js"},"dist":{"shasum":"8cfdad3c3b73e4b40fbed5fee2210ed5968d2147","tarball":"https://registry.npmjs.org/@adaptive-ds/lexware-client/-/lexware-client-0.1.1.tgz","fileCount":359,"integrity":"sha512-EesxMjs/RsZtwrNi7iet6tgRadJR30hBod/xnMRC1b2+EJSrFYUAV+rSmhZUFxkhKjnhf6AwBjAhAx6DcNs5Ag==","signatures":[{"sig":"MEUCIQDDxGvha8458fPTPY2xKan37L7TMul0VNE1zIH8Nw9RjAIgOnldRMXAEXtYbsT/FujWeqKg1ANKaaj8Z3rKvwHhQoM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":817861},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./*":{"types":"./dist/*.d.ts","import":"./dist/*.js"}},"gitHead":"3f3a82fd37035b6b567e34d5c567c2152fa8ebb4","imports":{"#result":"@adaptive-ds/result"},"private":false,"scripts":{"test":"bun run build && bun test","build":"rm -rf ./dist && bun tsc -p ./tsconfig.lib.json && chmod +x ./dist/cli.js","check":"bun tsc --noEmit","clean":"rm -rf ./dist","reset":"rm -rf ./node_modules","format":"biome format --write src package.json tsconfig.json tsconfig.lib.json biome.json","test:w":"bun test --watch","update":"bun update","release":"bash ./ops/release.sh"},"_npmUser":{"name":"david1gp","email":"david1gruppenplan@gmail.com"},"prettier":{"semi":false,"printWidth":120,"trailingComma":"all"},"repository":{"url":"git+https://github.com/david1gp/lexware-client.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript Result-based API clients for Lexware Office.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"@stricli/core":"^1.2.5"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@biomejs/biome":"^2.5.2"},"peerDependencies":{"valibot":"^1.2.0","@adaptive-ds/result":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/lexware-client_0.1.1_1787030940978_0.8096968762462549","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@adaptive-ds/lexware-client","version":"0.2.0","keywords":["lexware","lexware-office","api-client","typescript","result"],"license":"MIT","_id":"@adaptive-ds/lexware-client@0.2.0","maintainers":[{"name":"david1gp","email":"david1gruppenplan@gmail.com"}],"homepage":"https://github.com/david1gp/lexware-client","bugs":{"url":"https://github.com/david1gp/lexware-client/issues"},"bin":{"lexware":"dist/cli.js"},"dist":{"shasum":"84443365c13d35c394902f43d30ec1be664bc0b5","tarball":"https://registry.npmjs.org/@adaptive-ds/lexware-client/-/lexware-client-0.2.0.tgz","fileCount":367,"integrity":"sha512-Wn8BCzANFht2splSFT1PTiJ8MmqIjWh8PH21IuWsHddQ7Xy8LhV0WcnWH+RE0EFBIpaDzWOu5pSccLHc3kO1bg==","signatures":[{"sig":"MEMCICDQVzFSVyfXS3Vc7i04xqBDORVuLbA+4mGunXEcoOewAh8W0/FBp/8CTOHIfDhKHonAApJPGmV/KwfMe2wdBlqS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaptive-ds%2flexware-client@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":834123},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./*":{"types":"./dist/*.d.ts","import":"./dist/*.js"}},"gitHead":"4bd6b0d7497f95c199eba9970acf19511df9c30b","imports":{"#result":"@adaptive-ds/result"},"private":false,"scripts":{"test":"bun run build && bun test","build":"rm -rf ./dist && bun tsc -p ./tsconfig.lib.json && chmod +x ./dist/cli.js","check":"bun tsc --noEmit","clean":"rm -rf ./dist","reset":"rm -rf ./node_modules","format":"biome format --write src package.json tsconfig.json tsconfig.lib.json biome.json","test:w":"bun test --watch","update":"bun update","release":"bash ./ops/release.sh"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:dc682079-ee95-4766-9dd9-bef282f08318"}},"prettier":{"semi":false,"printWidth":120,"trailingComma":"all"},"repository":{"url":"git+https://github.com/david1gp/lexware-client.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript Result-based API clients for Lexware Office.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@stricli/core":"^1.2.5"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@biomejs/biome":"^2.5.2"},"peerDependencies":{"valibot":"^1.2.0","@adaptive-ds/result":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/lexware-client_0.2.0_1787733166323_0.2639147829552688","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@adaptive-ds/lexware-client","version":"0.3.0","keywords":["lexware","lexware-office","api-client","typescript","result"],"license":"MIT","_id":"@adaptive-ds/lexware-client@0.3.0","maintainers":[{"name":"david1gp","email":"david1gruppenplan@gmail.com"}],"homepage":"https://github.com/david1gp/lexware-client","bugs":{"url":"https://github.com/david1gp/lexware-client/issues"},"bin":{"lexware":"dist/cli.js"},"dist":{"shasum":"95ab2a311bfa1c1b1157dc985f92c18a6e346c1a","tarball":"https://registry.npmjs.org/@adaptive-ds/lexware-client/-/lexware-client-0.3.0.tgz","fileCount":423,"integrity":"sha512-CsXIAkHZ5gnLApRScGZFquqWwURSo+7FS1U9042DP19UNIMkipF1tj1U2+xMvPSJlYh39RfvuEabH1Tr1Xys8Q==","signatures":[{"sig":"MEUCIFtdLOOoV4hhYMZYI6MrK/x2XSpF9ThKCxmE+FfWZuQbAiEArcYZeiTnEaKUUpu3SJTo1aw/yEcO1P0SgY40zDJ/rg0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaptive-ds%2flexware-client@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":896977},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./*":{"types":"./dist/*.d.ts","import":"./dist/*.js"}},"gitHead":"f49e40ad6eb1892cdaa5b3de7928ad3c65889b57","imports":{"#result":"@adaptive-ds/result"},"private":false,"scripts":{"test":"bun run build && bun test","build":"rm -rf ./dist && bun tsc -p ./tsconfig.lib.json && chmod +x ./dist/cli.js","check":"bun tsc --noEmit","clean":"rm -rf ./dist","reset":"rm -rf ./node_modules","format":"biome format --write src package.json tsconfig.json tsconfig.lib.json biome.json","test:w":"bun test --watch","update":"bun update","release":"bash ./ops/release.sh"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:dc682079-ee95-4766-9dd9-bef282f08318"}},"prettier":{"semi":false,"printWidth":120,"trailingComma":"all"},"repository":{"url":"git+https://github.com/david1gp/lexware-client.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript Result-based API clients for Lexware Office.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@stricli/core":"^1.2.5"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@biomejs/biome":"^2.5.2"},"peerDependencies":{"valibot":"^1.2.0","@adaptive-ds/result":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/lexware-client_0.3.0_1787760919189_0.060833645698190164","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@adaptive-ds/lexware-client","version":"0.4.0","scripts":{"build":"rm -rf ./dist && bun tsc -p ./tsconfig.lib.json && chmod +x ./dist/cli.js","check":"bun tsc --noEmit","format":"biome format --write src package.json tsconfig.json tsconfig.lib.json biome.json","test":"bun run build && bun test","test:e2e":"bun run build && bun --env-file=.env test ./e2e/*.e2e.ts","test:e2e:credit-note-dunning":"bun run build && bun --env-file=.env test ./e2e/creditNoteDunning.e2e.ts","test:e2e:down-payment-invoice-payment":"bun run build && bun --env-file=.env test ./e2e/downPaymentInvoicePayment.e2e.ts","test:e2e:order-confirmation-delivery-note":"bun run build && bun --env-file=.env test ./e2e/orderConfirmationDeliveryNote.e2e.ts","test:e2e:bookkeeping-voucher-voucherlist":"bun run build && bun --env-file=.env test ./e2e/bookkeepingVoucherVoucherlist.e2e.ts","test:w":"bun test --watch","release":"bash ./ops/release.sh","update":"bun update","clean":"rm -rf ./dist","reset":"rm -rf ./node_modules"},"peerDependencies":{"@adaptive-ds/result":"^0.6.0","valibot":"^1.2.0"},"devDependencies":{"@biomejs/biome":"^2.5.2","@types/bun":"^1.3.13","typescript":"^6.0.3"},"imports":{"#result":"@adaptive-ds/result"},"prettier":{"semi":false,"printWidth":120,"trailingComma":"all"},"type":"module","main":"dist/index.js","bin":{"lexware":"dist/cli.js"},"private":false,"license":"MIT","description":"TypeScript Result-based API clients for Lexware Office.","keywords":["lexware","lexware-office","api-client","typescript","result"],"homepage":"https://github.com/david1gp/lexware-client","repository":{"type":"git","url":"git+https://github.com/david1gp/lexware-client.git"},"bugs":{"url":"https://github.com/david1gp/lexware-client/issues"},"types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./*":{"types":"./dist/*.d.ts","import":"./dist/*.js"}},"dependencies":{"@stricli/core":"^1.2.5"},"gitHead":"0544f174553d3405ffa85b536c2c89940b41e6ea","_id":"@adaptive-ds/lexware-client@0.4.0","_nodeVersion":"24.19.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-A7olbEKlRA6x+pWQEqfWO29Ynpj+O2MyDP37EslZmOVBZ4xyZjZXpfPC0ep7NrZ0r/muSHslg31LaqwXq4V/JQ==","shasum":"5a01ae6ef78db7439178f46906ea6c6f1e89ec63","tarball":"https://registry.npmjs.org/@adaptive-ds/lexware-client/-/lexware-client-0.4.0.tgz","fileCount":543,"unpackedSize":1169630,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaptive-ds%2flexware-client@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDGj2qUjbpkgO+3jr2YE4IBkWWbT2a6bnidkvSu5BfjCAIgAoz+anFNoarKxBybNheW/LJYDfC8K+K+NznuGFu8Xqs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:dc682079-ee95-4766-9dd9-bef282f08318"}},"directories":{},"maintainers":[{"name":"david1gp","email":"david1gruppenplan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lexware-client_0.4.0_1787782577175_0.585284700440257"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-18T05:29:00.783Z","modified":"2026-08-26T22:16:17.730Z","0.1.1":"2026-08-18T05:29:01.122Z","0.2.0":"2026-08-26T08:32:46.475Z","0.3.0":"2026-08-26T16:15:19.347Z","0.4.0":"2026-08-26T22:16:17.345Z"},"bugs":{"url":"https://github.com/david1gp/lexware-client/issues"},"license":"MIT","homepage":"https://github.com/david1gp/lexware-client","keywords":["lexware","lexware-office","api-client","typescript","result"],"repository":{"type":"git","url":"git+https://github.com/david1gp/lexware-client.git"},"description":"TypeScript Result-based API clients for Lexware Office.","maintainers":[{"name":"david1gp","email":"david1gruppenplan@gmail.com"}],"readme":"# @adaptive-ds/lexware-client\n\nResult-based TypeScript API clients for Lexware Office.\n\n```ts\nimport { articleList, lexwareClientCreate } from \"@adaptive-ds/lexware-client\"\n\nconst client = lexwareClientCreate({ accessToken: process.env.LEXWARE_TOKEN ?? \"\" })\nif (!client.success) throw new Error(client.errorMessage)\n\nconst articles = await articleList(client.data, { type: \"PRODUCT\" })\nif (!articles.success) {\n  console.error(articles.errorMessage)\n}\n```\n\nFallible functions return `Result<T>` or `PromiseResult<T>` from `#result`. Runtime inputs and JSON responses are validated with Valibot.\n\n## Sales voucher downloads\n\nSales voucher files use format-specific functions. Every function accepts `(client, id)` and downloads the resource's `/file` subresource:\n\n- PDF: `invoicePdfDownload`, `creditNotePdfDownload`, `downPaymentInvoicePdfDownload`, `quotationPdfDownload`, `orderConfirmationPdfDownload`, `deliveryNotePdfDownload`, and `dunningPdfDownload`.\n- XML: `invoiceXmlDownload`, `creditNoteXmlDownload`, and `downPaymentInvoiceXmlDownload`.\n\nPDF functions send `Accept: application/pdf` and return `PromiseResult<LexwarePdfResponse>`, whose `contentType` is the literal `\"application/pdf\"`. XML functions send `Accept: application/xml` and return `PromiseResult<LexwareXmlResponse>`, whose `contentType` is the literal `\"application/xml\"`. Successful responses with a missing or unexpected `Content-Type` return a `Result` error; media-type parameters are ignored and the media type is matched case-insensitively.\n\nFor XRechnung invoices, the PDF result is only a visual preview and must not be used as the XRechnung document. Use `invoiceXmlDownload` for the machine-readable XML representation.\n\nThe generic `fileDownload` function remains for bookkeeping files only. It returns the untyped `LexwareBinaryResponse` and does not replace the sales-voucher format-specific functions.\n\n## CLI\n\nInstall the package and run the `lexware` executable:\n\n```bash\nbun add --global @adaptive-ds/lexware-client\nlexware --help\n```\n\nWhen invoking the CLI directly with Bun, use `bun --no-env-file` so the CLI controls environment loading (for example, `bun --no-env-file ./dist/cli.js --help`). Node execution does not require this flag.\n\nThe CLI prints one JSON result per invocation. Successes go to stdout. Help also returns a successful JSON result. Failures go to stderr and exit with status 1.\n\nCommands accept named options only. Positional values and JSON input are rejected. The CLI automatically loads `.env` from the current directory when it exists. Use the global `--env-path <path>` option to select another environment file; inherited process environment values take precedence over values from the file. A missing default `.env` is ignored, but an explicitly selected file must be readable.\n\nAuthentication is resolved in this order: `--access-token`, `LEXWARE_TOKEN`, `LEXWARE_API_KEY`, then `LEXWARE_ACCESS_TOKEN`. `LEXWARE_API_KEY` and the legacy `LEXWARE_ACCESS_TOKEN` remain supported as environment aliases.\n\n```bash\nexport LEXWARE_TOKEN=your-token\nlexware article list --page 1 --type PRODUCT\nlexware article get --id article-id\nlexware article create --type PRODUCT --title \"Desk\" --leading-price NET --net-price 99\n\n# Or select an environment file explicitly.\nlexware --env-path ./production.env article list\n```\n\nUse `--base-url` to target another API endpoint. Nested fields use prefixed option names. Variadic fields can be repeated, which keeps each line item typed without accepting a JSON document:\n\n```bash\nlexware invoice create \\\n  --base-url https://api.example.test \\\n  --voucher-date 2026-08-16T00:00 \\\n  --address-name \"Example customer\" --address-country-code DE \\\n  --line-item-type custom \\\n  --line-item-name Consulting \\\n  --line-item-quantity 1 \\\n  --line-item-unit-name Hours \\\n  --line-item-unit-price-currency EUR \\\n  --line-item-unit-price-net-amount 100 \\\n  --line-item-unit-price-tax-rate-percentage 19 \\\n  --total-price-currency EUR \\\n  --tax-conditions-tax-type net \\\n  --shipping-conditions-shipping-type none\n```\n\nFile commands return metadata as JSON. Upload reads the local path. Download keeps binary data out of the JSON result unless `--output` is supplied, in which case it writes the file there.\n\n```bash\nlexware file upload --type PDF --filename invoice.pdf --content-type application/pdf --path ./invoice.pdf\nlexware file download --id file-id\nlexware file download --id file-id --output ./downloaded.pdf\n```\n","readmeFilename":"README.md"}