{"_id":"@amboras-dev/omnisend","_rev":"2-de6c16241fc5c63e838b6c2fca659183","name":"@amboras-dev/omnisend","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@amboras-dev/omnisend","version":"1.0.0","_id":"@amboras-dev/omnisend@1.0.0","maintainers":[{"name":"amboras-vaibhav","email":"vaibhav@amboras.com"},{"name":"azaanatamboras","email":"azaan@amboras.com"},{"name":"syazah","email":"thesyazah@gmail.com"}],"dist":{"shasum":"2ebd6aea14cd17ed0ac0a63a0965024f563cc879","tarball":"https://registry.npmjs.org/@amboras-dev/omnisend/-/omnisend-1.0.0.tgz","fileCount":22,"integrity":"sha512-e8twLNSfTDZ5NYH4dGtm3ayyLrLVQO62cWJ3o6hjeX6sR2ousXdex2kuOvQT36Lps2Q9yNmGiwS1ti5VVSgH6Q==","signatures":[{"sig":"MEUCIQCc6eZB3HjtpZ9Eg5ZrS6sQUEZxg1TAxZml/AMlWAuV2QIgLb97dL8v0mAdu4wLZUdVXiHezGnmrwWYGRFh3mqz1z8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101548},"main":"dist/index.js","_from":"file:amboras-dev-omnisend-1.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./get-config":{"types":"./dist/get-config.d.ts","import":"./dist/get-config.mjs","require":"./dist/get-config.js"},"./package.json":"./package.json","./slot-components":{"types":"./dist/slot-components/index.d.ts","import":"./dist/slot-components/index.mjs","require":"./dist/slot-components/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syazah","email":"thesyazah@gmail.com"},"_resolved":"/tmp/b6bfb0706af528c82224876d0dc4c074/amboras-dev-omnisend-1.0.0.tgz","_integrity":"sha512-e8twLNSfTDZ5NYH4dGtm3ayyLrLVQO62cWJ3o6hjeX6sR2ousXdex2kuOvQT36Lps2Q9yNmGiwS1ti5VVSgH6Q==","_npmVersion":"10.8.2","description":"Omnisend browser events + slot components for Amboras storefronts","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.1.0","typescript":"^5.0.0","@types/node":"^20.0.0","@types/react":"^19.0.0"},"peerDependencies":{"next":">=14","react":">=19"},"_npmOperationalInternal":{"tmp":"tmp/omnisend_1.0.0_1784275484169_0.8440454700202922","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@amboras-dev/omnisend","version":"1.0.1","description":"Omnisend browser events + slot components 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","vitest":"^2.1.0"},"publishConfig":{"access":"public"},"scripts":{"build":"node scripts/clean.mjs && tsup && node scripts/check-exports.mjs","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@amboras-dev/omnisend@1.0.1","_integrity":"sha512-nxQS1DIYM7XGZ5gFI3+i5SY6Wx8xGdnNQkULvyB3dhJD1Ws3YTVRKswzITxqHG81AMfZyrcHmeTR0GOwXPxiwA==","_resolved":"/tmp/e5ef70fb92cf1eef17fe78fd0489e66c/amboras-dev-omnisend-1.0.1.tgz","_from":"file:amboras-dev-omnisend-1.0.1.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-nxQS1DIYM7XGZ5gFI3+i5SY6Wx8xGdnNQkULvyB3dhJD1Ws3YTVRKswzITxqHG81AMfZyrcHmeTR0GOwXPxiwA==","shasum":"a044e9e7e66131e199ee93e851c679ed6cdbc91c","tarball":"https://registry.npmjs.org/@amboras-dev/omnisend/-/omnisend-1.0.1.tgz","fileCount":24,"unpackedSize":107702,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDNo+zkjn+FQHpIr3Dk1bJ6FiPJ9kXWlqBNSP3vS9rqWgIgBZSbs12+mxUPxAP4QBiVRA7bgJmZdnIFBpbr9Amp3Pk="}]},"_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/omnisend_1.0.1_1784394147024_0.6352721294228025"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T08:04:44.021Z","modified":"2026-07-18T17:02:27.474Z","1.0.0":"2026-07-17T08:04:44.317Z","1.0.1":"2026-07-18T17:02:27.270Z"},"description":"Omnisend browser events + slot components for Amboras storefronts","maintainers":[{"name":"amboras-vaibhav","email":"vaibhav@amboras.com"},{"name":"azaanatamboras","email":"azaan@amboras.com"},{"name":"syazah","email":"thesyazah@gmail.com"}],"readme":"# @amboras-dev/omnisend\n\nOmnisend browser events + slot components for Amboras storefronts.\n\nThis package follows the **slot-based (Class A)** plugin convention: its\ncomponents are bound to named storefront plugin slots via the catalog manifest\nand compiled into the storefront's generated registry. It mirrors\n`@amboras-dev/pinterest`.\n\n## Exports\n\n| Entry | Purpose | Runtime |\n| --- | --- | --- |\n| `.` | Public types + `getOmnisendConfig` + low-level `track` / `identifyContact` accessors | server-safe |\n| `./slot-components` | `OmnisendProvider`, `OmnisendViewItem`, `OmnisendAddToCart` | client (`\"use client\"`) |\n| `./get-config` | `getOmnisendConfig()` on its own | server-safe |\n\n## Slot components\n\n### `OmnisendProvider` — `rootProviders` slot\n\nProps (via `propsFromConfig`): `{ brandID?: string }`.\n\n- Renders `null` when no `brandID` (Omnisend disabled).\n- Injects the bootstrap snippet once via an inline `next/script`\n  (`id=\"omnisend-bootstrap\"`), consent-gated on `amboras_consent` and\n  re-checked on `amboras-consent-changed`:\n\n  ```js\n  window.omnisend = window.omnisend || [];\n  omnisend.push([\"brandID\",\"<brandID>\"]);\n  omnisend.push([\"track\",\"$pageViewed\"]);\n  !function(){var e=document.createElement(\"script\");e.type=\"text/javascript\",e.async=!0,e.src=\"https://omnisnippet1.com/inshop/launcher-v2.js\";var t=document.getElementsByTagName(\"script\")[0];t.parentNode.insertBefore(e,t)}();\n  ```\n\n- Fetches the authenticated customer (on mount + `amboras-auth-changed`) and\n  calls `identifyContact({ email, phone })`. Omnisend **rejects events from\n  anonymous visitors**, so the identify is what makes the other slots' events\n  land.\n\n### `OmnisendViewItem` — `pdpAnalytics` slot\n\nProps (via `propsFromContext`): `{ productId?, productName?, sku?, price?, currency?, imageUrl?, url?, categories? }`.\n\nFires `viewed product` (`eventVersion:\"v4\"`, `origin:\"api\"`) once per\n`productId`. **Money: `price` is passed through unchanged** — Medusa minor\nunits (cents) == Omnisend viewed-product cents.\n\n### `OmnisendAddToCart` — `cartUpdate` slot\n\nProps (via `propsFromContext`): `{ cartId?, itemCount?, total?, currency? }`.\n\nFires `added product to cart` (`origin:\"api\"`, `eventVersion:\"\"`) when the\ncart signature changes. **Money: `value = toMajorUnits(total, currency)`\n(decimal major units)** — unlike the viewed-product event. The cart slot only\nexposes cart-level context, so the event carries cart `value`, not per-product\ndetail.\n\n## Config\n\n`getOmnisendConfig()` reads the generic `/store/integrations/active` route\n(with `x-publishable-api-key` + optional `X-Store-Environment-ID`) and returns\n`{ enabled, brandID } | null` from the response's `omnisend` key. Fail-closed\n`null` on any error. The Omnisend secret API key never leaves the Medusa side.\n","readmeFilename":"README.md"}