{"_id":"@acuris-geo/commercetools-checkout","_rev":"3-b945b56f5fe535e6c8b980bab1fd1c6e","name":"@acuris-geo/commercetools-checkout","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@acuris-geo/commercetools-checkout","version":"0.1.0","keywords":["acuris","commercetools","headless-commerce","address-validation","geocoding","react","checkout","alokai","composable-commerce"],"author":{"name":"Acuris GmbH","email":"engineering@acuris-geo.com"},"license":"MIT","_id":"@acuris-geo/commercetools-checkout@0.1.0","maintainers":[{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"}],"homepage":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/tree/main/packages/acuris-commercetools-checkout#readme","bugs":{"url":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/issues"},"dist":{"shasum":"6048c9a9c50cfe822218fec469641a438d777b4f","tarball":"https://registry.npmjs.org/@acuris-geo/commercetools-checkout/-/commercetools-checkout-0.1.0.tgz","fileCount":39,"integrity":"sha512-oVZZemRYVFGPVLOGbhTY79RG4CVf7JX1tprDLcpoKFMp8K+W7IeNgVqaFR96QHavYmIhTqUFqjSHf/1M5bmPMA==","signatures":[{"sig":"MEUCIGT5UGUuLITVMPeKFKbasAFGy/elJ24L4R6V+M/6+I/YAiEAwD6W+BIj1E61Uf08SrRDrNv5KwPrQ3QTEZu9TJud5/Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68590},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"464b42c71c83d8a50baac4bb70cf83f6ad51de71","scripts":{"test":"vitest run --coverage","build":"tsc -p tsconfig.json && node ./build-cjs.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"},"repository":{"url":"git+https://github.com/Acuris-GmbH/acuris-commercetools-connector.git","type":"git","directory":"packages/acuris-commercetools-checkout"},"_npmVersion":"10.9.7","description":"React components for integrating Acuris Address Validation & Geocoding into commercetools storefronts.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@acuris-geo/av-sdk":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.0","react":"^18.3.1","vitest":"^2.1.4","react-dom":"^18.3.1","typescript":"^5.5.4","@types/node":"^20.14.10","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitest/coverage-v8":"^2.1.4","@testing-library/react":"^16.0.0","@testing-library/jest-dom":"^6.4.8"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/commercetools-checkout_0.1.0_1778692483970_0.8999857143455292","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@acuris-geo/commercetools-checkout","version":"0.1.1","keywords":["acuris","commercetools","headless-commerce","address-validation","geocoding","react","checkout","alokai","composable-commerce"],"author":{"name":"Acuris GmbH","email":"engineering@acuris-geo.com"},"license":"MIT","_id":"@acuris-geo/commercetools-checkout@0.1.1","maintainers":[{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"}],"homepage":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/tree/main/packages/acuris-commercetools-checkout#readme","bugs":{"url":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/issues"},"dist":{"shasum":"bba9cf4e849f82baac9f6f0297d16573b7adea28","tarball":"https://registry.npmjs.org/@acuris-geo/commercetools-checkout/-/commercetools-checkout-0.1.1.tgz","fileCount":39,"integrity":"sha512-HobE9BBdmWZ9g1+yEWnSIoWWlbMgyYwwagl8l4KE4bqpjGb+q/bMNB7qLu3hbXFJ3ZRjn6aI4KusqGxth0bELw==","signatures":[{"sig":"MEYCIQD/3zb3RbDWaLFX8fROgffQogTyUdtP1VBq7+gncKxe7QIhAOGK6Rd6Av4lfFHldzMaRLoWT3I4hEQ/7uqCiRR0SF5K","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70163},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"cdbb590175b6d41cec93d28561cb06c84660a555","scripts":{"test":"vitest run --coverage","build":"tsc -p tsconfig.json && node ./build-cjs.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"},"repository":{"url":"git+https://github.com/Acuris-GmbH/acuris-commercetools-connector.git","type":"git","directory":"packages/acuris-commercetools-checkout"},"_npmVersion":"10.9.7","description":"React components for integrating Acuris Address Validation & Geocoding into commercetools storefronts.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@acuris-geo/av-sdk":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.0","react":"^18.3.1","vitest":"^2.1.4","react-dom":"^18.3.1","typescript":"^5.5.4","@types/node":"^20.14.10","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitest/coverage-v8":"^2.1.4","@testing-library/react":"^16.0.0","@testing-library/jest-dom":"^6.4.8"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/commercetools-checkout_0.1.1_1778699167784_0.23786230373536466","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@acuris-geo/commercetools-checkout","version":"0.1.2","description":"React components for integrating Acuris Address Validation & Geocoding into commercetools storefronts.","keywords":["acuris","commercetools","headless-commerce","address-validation","geocoding","react","checkout","alokai","composable-commerce"],"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsc -p tsconfig.json && node ./build-cjs.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run --coverage","test:watch":"vitest"},"engines":{"node":">=18.17.0"},"license":"MIT","author":{"name":"Acuris GmbH","email":"engineering@acuris-geo.com"},"homepage":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/tree/main/packages/acuris-commercetools-checkout#readme","repository":{"type":"git","url":"git+https://github.com/Acuris-GmbH/acuris-commercetools-connector.git","directory":"packages/acuris-commercetools-checkout"},"bugs":{"url":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/issues"},"publishConfig":{"access":"public"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"dependencies":{"@acuris-geo/av-sdk":"^0.3.0"},"devDependencies":{"@testing-library/jest-dom":"^6.4.8","@testing-library/react":"^16.0.0","@types/node":"^20.14.10","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitest/coverage-v8":"^2.1.4","jsdom":"^25.0.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.5.4","vitest":"^2.1.4"},"_id":"@acuris-geo/commercetools-checkout@0.1.2","gitHead":"615dc7d445cf4c2373d488e46b6706e6b760b9b5","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-cx0LoME6NaWf7IYPsJW/timQg5Cv5vJ8dJ5rfU23brUbrsPTNuaTK4LNBDsZ71AkjTlHWvUGQtuv2BHFBhMJzg==","shasum":"31154910d1bfcce5f64bfaed3bbab915f7e4e69f","tarball":"https://registry.npmjs.org/@acuris-geo/commercetools-checkout/-/commercetools-checkout-0.1.2.tgz","fileCount":39,"unpackedSize":70163,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEYEOcUeASBiJdTrbi0CeswSEg/sxRwoloB3EjELJgBAAiAJTQk1A67W0TIuMSvQxNMJfdjl94yBfxW/ITIU+uVfbA=="}]},"_npmUser":{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"},"directories":{},"maintainers":[{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commercetools-checkout_0.1.2_1781298377931_0.3747007918086165"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T17:14:43.776Z","modified":"2026-06-12T21:06:18.185Z","0.1.0":"2026-05-13T17:14:44.111Z","0.1.1":"2026-05-13T19:06:07.962Z","0.1.2":"2026-06-12T21:06:18.075Z"},"bugs":{"url":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/issues"},"author":{"name":"Acuris GmbH","email":"engineering@acuris-geo.com"},"license":"MIT","homepage":"https://github.com/Acuris-GmbH/acuris-commercetools-connector/tree/main/packages/acuris-commercetools-checkout#readme","keywords":["acuris","commercetools","headless-commerce","address-validation","geocoding","react","checkout","alokai","composable-commerce"],"repository":{"type":"git","url":"git+https://github.com/Acuris-GmbH/acuris-commercetools-connector.git","directory":"packages/acuris-commercetools-checkout"},"description":"React components for integrating Acuris Address Validation & Geocoding into commercetools storefronts.","maintainers":[{"name":"acurisgeo","email":"l.kandemir@acuris-geo.com"}],"readme":"# @acuris-geo/commercetools-checkout\n\n> React components + hooks for integrating Acuris Address Validation &\n> Geocoding into commercetools storefronts. SSR-safe, unstyled by default,\n> no monkey-patching of `@commercetools/platform-sdk`.\n\n**Status:** beta (`0.1.0`).\n\n## Install\n\n```bash\nnpm install @acuris-geo/commercetools-checkout\n```\n\n`react` and `react-dom` are peer dependencies (`^18` or `^19`).\n\n## Why this package\n\ncommercetools speaks ISO-2 country codes, split `streetName`/`streetNumber`\nfields, and `postalCode` (lowercase `p`). Acuris's address-validation API\nspeaks ISO-3 lowercase, single-field street, and `postcode`. The mapping\nis the work this package exists to do — your storefront stays in\ncommercetools-native vocabulary throughout.\n\n## Security model\n\n**Do not embed an Acuris API key in the browser.** Components call _your_\nproxy endpoints, which forward to `api.acuris-geo.com` with the API key\nattached server-side. A working pair of Next.js API routes lives in\n`examples/commercetools-storefront/`.\n\n```\nBrowser ──► /api/acuris/validate  ──►  acuris-av-sdk  ──►  api.acuris-geo.com\n            (your backend; converts                       (lives server-side)\n             ISO-2 → ISO-3 via iso2ToIso3)\n```\n\n## Components\n\n### `<AcurisAddressInput>`\n\nControlled input with debounced typeahead. Country is ISO-2 (`\"DE\"`,\n`\"US\"`, …).\n\n```tsx\nimport { AcurisAddressInput, suggestionToBaseAddress } from \"@acuris-geo/commercetools-checkout\";\nimport { useState } from \"react\";\n\nconst ENDPOINTS = { validate: \"/api/acuris/validate\", suggest: \"/api/acuris/suggest\" };\n\nconst [value, setValue] = useState(\"\");\nconst [picked, setPicked] = useState<SuggestionHit | null>(null);\n\n<AcurisAddressInput\n  endpoints={ENDPOINTS}\n  country=\"DE\"\n  value={value}\n  onChange={setValue}\n  onSelect={(hit) => setPicked(hit)}\n/>\n\n// Hand the picked hit to your cart mutation as a BaseAddress.\nconst baseAddress = picked ? suggestionToBaseAddress(picked, { country: \"DE\" }) : null;\n```\n\n### `<AcurisAddressValidator>`\n\nRender-prop wrapper that validates an address on blur, submit, or\nmanually. The `address` prop accepts a `BaseAddress` (preferred — gives\nAcuris the structured form) or a fallback free-text string.\n\n```tsx\n<AcurisAddressValidator\n  endpoints={ENDPOINTS}\n  country=\"DE\"\n  address={pickedBaseAddress}\n  trigger=\"submit\"\n>\n  {({ status, result, error, formProps }) => (\n    <form {...formProps}>\n      {/* your fields */}\n      {status === \"ok\" && (\n        <p>✓ {result?.standardized?.formatted_address}</p>\n      )}\n    </form>\n  )}\n</AcurisAddressValidator>\n```\n\n## Boundary mappers\n\n| Function | Direction |\n|---|---|\n| `toAcurisInput(addr: BaseAddress)` | commercetools → Acuris fielded input |\n| `toBaseAddress(result, base?)` | Acuris validate result → commercetools `BaseAddress` |\n| `suggestionToBaseAddress(hit, base?)` | Acuris suggestion → commercetools `BaseAddress` |\n| `iso2ToIso3(\"DE\")` → `\"deu\"` | Country mapping |\n| `iso3ToIso2(\"deu\")` → `\"DE\"` | Country mapping |\n| `adaptWireToSdk({country, input})` | Proxy-side helper: ISO-2 → ISO-3 + pass through Acuris fielded input |\n\nIdentity fields (`firstName`, `lastName`, `company`, `phone`, …) are\npreserved verbatim by `toBaseAddress` and `suggestionToBaseAddress` —\nAcuris doesn't see them, and we don't lose them.\n\n## Hooks\n\n```ts\nimport { useAcurisValidation, useAcurisSuggest } from \"@acuris-geo/commercetools-checkout\";\n\nconst { status, result, validate } = useAcurisValidation({ endpoints, country: \"DE\" });\nconst { suggestions } = useAcurisSuggest({ endpoint: \"/api/acuris/suggest\", country: \"DE\", q, debounceMs: 200 });\n```\n\nBoth hooks abort inflight requests automatically so the latest user\ninteraction always wins.\n\n## Use with the API Extension\n\nFor enterprise hardening, pair this package with\n[`@acuris-geo/commercetools-extension`](../acuris-commercetools-extension)\nto gate Cart updates server-side. The React component guides the buyer;\nthe extension closes the bypass.\n\n## License\n\nMIT © Acuris GmbH\n","readmeFilename":"README.md"}