{"_id":"@amboras-dev/trustpilot","name":"@amboras-dev/trustpilot","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@amboras-dev/trustpilot","version":"2.0.0","description":"Trustpilot TrustBox widget + invitation hooks for Amboras storefronts","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./slot-components":{"types":"./dist/slot-components/index.d.ts","import":"./dist/slot-components/index.mjs","require":"./dist/slot-components/index.js"},"./get-config":{"types":"./dist/get-config.d.ts","import":"./dist/get-config.mjs","require":"./dist/get-config.js"},"./package.json":"./package.json"},"peerDependencies":{"react":">=19","next":">=14"},"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/react":"^19.0.0","@types/node":"^20.0.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_id":"@amboras-dev/trustpilot@2.0.0","_integrity":"sha512-hzCuvPbxSzFb2k0PGI2BiVLq8MlJpMSHQUDESLWJ9nBsfR/ldmtbnV6NEmmG5mvYrsP7WpOpSjkkicn2zdqXzA==","_resolved":"/tmp/c908dd8e9c1a266c46bcde272a297a83/amboras-dev-trustpilot-2.0.0.tgz","_from":"file:amboras-dev-trustpilot-2.0.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-hzCuvPbxSzFb2k0PGI2BiVLq8MlJpMSHQUDESLWJ9nBsfR/ldmtbnV6NEmmG5mvYrsP7WpOpSjkkicn2zdqXzA==","shasum":"77a298021864766b5b30fb2b9109f7d34da99aa4","tarball":"https://registry.npmjs.org/@amboras-dev/trustpilot/-/trustpilot-2.0.0.tgz","fileCount":22,"unpackedSize":59792,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBmn4kuDsLwqi/Ez18JABIWnwFFC3TxPd/sdFZWxc0PcAiEAlQBi6keicen6Mt7eVqOQvnFYDZhahbdl3FyB+A/4KZg="}]},"_npmUser":{"name":"syazah","email":"thesyazah@gmail.com"},"directories":{},"maintainers":[{"name":"amboras-vaibhav","email":"vaibhav@amboras.com"},{"name":"azaanatamboras","email":"azaan@amboras.com"},{"name":"syazah","email":"thesyazah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trustpilot_2.0.0_1785231631749_0.9503142299714951"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-28T09:40:31.659Z","2.0.0":"2026-07-28T09:40:31.884Z","modified":"2026-07-28T09:40:32.042Z"},"maintainers":[{"name":"amboras-vaibhav","email":"vaibhav@amboras.com"},{"name":"azaanatamboras","email":"azaan@amboras.com"},{"name":"syazah","email":"thesyazah@gmail.com"}],"description":"Trustpilot TrustBox widget + invitation hooks for Amboras storefronts","readme":"# @amboras-dev/trustpilot\n\nTrustpilot integration for Amboras storefronts. Ships the TrustBox widget\nbootloader, the TrustBox slot component, domain-verification `<meta>` tag\ninjection, and a typed `getTrustpilotConfig` helper for reading non-secret\nplugin config from Medusa.\n\n## Exports\n\n- `.` - server-safe entry: types + config helpers.\n- `./get-config` - `getTrustpilotConfig({ baseUrl?, publishableApiKey?, storeId? })`.\n- `./slot-components` - client-only React components:\n  - `TrustpilotBootstrap` - `rootProviders` slot component. Idempotently\n    injects the TrustBox bootloader script and renders the\n    `trustpilot-one-time-domain-verification-id` meta tag.\n  - `TrustBox` - the widget renderer. Renders `<div class=\"trustpilot-widget\">`\n    and calls `window.Trustpilot.loadFromElement(el, true)` once the\n    bootloader resolves.\n\n## Notes\n\n- Storefronts are Next.js 15+/React 19 only. React 19's built-in `<meta>`\n  hoisting is required for the domain-verification tag to reach `<head>`.\n- Trustpilot has NO test mode. Any `sendInvitation` call triggers a real\n  customer email. The invitation dispatch itself lives in the Medusa module\n  (`medusa-backend-orchestrator`), not this package.\n- The invitations API has no server-side dedup on `referenceNumber`. Dedup\n  is enforced by the `trustpilot_invitations (store_id, order_id) UNIQUE`\n  outbox in the Medusa module.\n\n## Config shape\n\n`getTrustpilotConfig` returns the non-secret subset. Secrets (`api_key`,\n`api_secret`, `business_user_id`, `sender_email`) never cross the\nstorefront boundary.\n","readmeFilename":"README.md","_rev":"1-7540206a480a331577c656df347c18af"}