{"_id":"@35up/js-sdk-browser","_rev":"4-f9b08fa2cc22d76a0a051a139e6a3f6e","name":"@35up/js-sdk-browser","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@35up/js-sdk-browser","version":"1.0.0","keywords":["bootstrap"],"author":{"name":"35up GmbH","email":"the.engineers@35up.com"},"license":"MIT","_id":"@35up/js-sdk-browser@1.0.0","maintainers":[{"name":"gustavoaz7","email":"gustavo_azevedo_7@hotmail.com"},{"name":"enjoythelive1","email":"enjoythelive1@gmail.com"},{"name":"drafter500","email":"vzemtsov@yahoo.com"},{"name":"schrodervictor","email":"schrodervictor@gmail.com"},{"name":"35up-npm","email":"npm@35up.com"}],"homepage":"https://github.com/35up/js-sdk#readme","bugs":{"url":"https://github.com/35up/js-sdk/issues"},"amd":"dist/35up-js-sdk.amd.min.js","dist":{"shasum":"440886cc18697d71fdf6127af3e7db0c1aca29db","tarball":"https://registry.npmjs.org/@35up/js-sdk-browser/-/js-sdk-browser-1.0.0.tgz","fileCount":11,"integrity":"sha512-hXWsrynfWEzzi3MebAeO3VrJhXqCKWlLBPl/mLr4tmKekqNlRPSRaVZFkYkLVoN49mZfg51USoZHVqMbKSwu7A==","signatures":[{"sig":"MEUCIF9uUJ+mY3zJncg4qiFdfcAXtXMTTzn/d0qp9iZB1kEKAiEA79TH3la5rYyVzz5OngCoEp3J8q6PIvQH+kE9sH0MIQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNac1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU3A/9G9WBN4B2oUiB6ayi5qBUPVaiFOfIBZF0P8JGlKvZ1qKP1DsK\r\nzlVm9rZIDfDDqSbxW3RBVlCnjPDIZFWIaOIHcm3b+m7tsAKsUnSnWDLLknQF\r\ndjt8Rk4tIdxD4vZ6dNCRWpmG+htfICD2Wjsctwyas6vixZe5chLT7MaMN6x1\r\nf6cO5Bz0JDBkM9TKOvVV3kBmloRSnq2SjA9ngzFP8ubwn9VuW1qN10hs313p\r\nb9Y67JZU/TS1F8S6S2xfkxS+uZzuxgEcGRYEnGUc7RY+AR47mcUeIQeRYM2T\r\nwg43mZVdkOQ1I8qQD5vcS7nQdv2Q0qpoYsAibZvFkToi5iKCAy/duQbSX6v7\r\nrC5hCL5Tot64H5QFAUAuhUXWDCcuVWeAm/QsWNnQz6edCjQegtOwknQXgTy2\r\n+4POo+r6DoNHcR35uiD8gqwyJuOlQYfShtJS4lqv5ljAWnbx2NHs6iKcs2wj\r\nYtFQYcjbLNPFD/q2U5ZvlMaUPTYjKHABAeuYsy1Q8yiACc99qjDyalbKUaJb\r\nbe6OG8BDrM8FBhtQay/4f+w5rOi8G8O+jRKOgRXOyTNvd2oHbpVoPcxe1Ydn\r\nBsSRrB8xus82vrQMVU2W1Sj0abObtEk1Z1d1c8GAF+QroVQ6xX44hk+35t7D\r\nQQOEyboleaDCo4LBrSX3hIjOfhdttJPhZOw=\r\n=F5xE\r\n-----END PGP SIGNATURE-----\r\n"},"iife":"dist/35up-js-sdk.iife.min.js","main":"dist/35up-js-sdk.cjs.js","types":"dist/index.d.ts","module":"dist/35up-js-sdk.esm.js","gitHead":"f885f348926e0558ecd3f664363a19e80cc3b439","scripts":{"lint":"eslint --ext .js,.ts .","test":"jest --passWithNoTests","build":"ENV=production rollup --config rollup.config.js","bootstrap":"lerna bootstrap","build:mock":"ENV=mock rollup --config rollup.config.js","test:watch":"npm test -- --watch","build:stage":"ENV=staging rollup --config rollup.config.js","bump-version":"lerna version --no-git-tag-version --no-push","test:coverage":"npm test -- --coverage","prepublishOnly":"make ci","makeTypeDeclarations":"tsc -d --skipLibCheck --declarationDir dist/types --emitDeclarationOnly index.ts"},"_npmUser":{"name":"drafter500","email":"vzemtsov@yahoo.com"},"repository":{"url":"git+https://github.com/35up/js-sdk.git","type":"git"},"_npmVersion":"9.3.1","description":"Node.js SDK library for integrating 35up into your web shop","directories":{},"_nodeVersion":"18.14.0","dependencies":{"tslib":"^2.4.0","nanoid":"^3.3.4","@35up/http-client":"^2.1.6","@35up/js-sdk-base":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.19.1","chai":"^4.3.6","jest":"^28.1.0","lerna":"^5.5.2","sinon":"^14.0.0","eslint":"^8.23.0","rollup":"^2.79.0","ts-jest":"^28.0.8","babel-jest":"^28.1.0","sinon-chai":"^3.7.0","typescript":"^4.8.2","@babel/core":"^7.18.13","@types/chai":"^4.3.3","@types/jest":"^28.0.0","chai-string":"^1.5.0","@types/sinon":"^10.0.13","jest-fetch-mock":"^3.0.3","@babel/preset-env":"^7.18.10","@types/sinon-chai":"^3.2.8","@types/chai-string":"^1.4.2","rollup-plugin-terser":"^7.0.2","@35up/tslib-test-utils":"^2.0.1","jest-environment-jsdom":"^28.1.1","@rollup/plugin-commonjs":"^22.0.2","@rollup/plugin-typescript":"^8.4.0","@typescript-eslint/parser":"^5.9.1","@rollup/plugin-node-resolve":"^13.3.0","@35up/eslint-config-35up-base":"^4.0.9","@typescript-eslint/eslint-plugin":"^5.9.1"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk-browser_1.0.0_1681237813164_0.8896696792665446","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-04-11T18:30:13.105Z","modified":"2026-04-01T20:14:29.844Z","1.0.0":"2023-04-11T18:30:13.390Z"},"bugs":{"url":"https://github.com/35up/js-sdk/issues"},"author":{"name":"35up GmbH","email":"the.engineers@35up.com"},"license":"MIT","homepage":"https://github.com/35up/js-sdk#readme","keywords":["bootstrap"],"repository":{"url":"git+https://github.com/35up/js-sdk.git","type":"git"},"description":"Node.js SDK library for integrating 35up into your web shop","maintainers":[{"email":"npm@35up.com","name":"35up-npm"},{"email":"vzemtsov@yahoo.com","name":"drafter500"}],"readme":"# 35up Javascript SDK - browser\n\nThis library is designed for browser environments providing Javascript APIs to \nintegrate 35up into your online shop.\n\n## Installation\nYou can install this package by executing the following command:\n```$xslt\nnpm i -S @35up/js-sdk-browser\n```\n\nor you can include it dynamically by adding it as your website asset and\ninserting the following tag into your HTML:\n```$xslt\n<script type=\"text/javascript\" src=\"your-site-assets/35up-js-sdk.iife.min.js\"></script>\n```\n\nIn this case all the API will be available from the global object\n`thirtyFiveUp`\n\n## How to use\n\n### Call `initialise` function\nThe library exposes `initialise` function that prepares and returns an\n`Sdk` instance that has several methods:\n\n```js\n  import { initialise } from '@35up/js-sdk-browser';\n\n  const config = {\n    seller: 'your_seller_id',\n    lang: 'de',\n    country: 'de'\n  };\n  \n  const tfup = initialise(config);\n  \n  // Getting recommendations\n  const result = await tfup.getProductRecommendations({\n    baseProduct: {title: 'Samsung Galaxy S20 Cosmic grey'},\n  });\n```\n\nFull configuration parameters list:\n\n| Parameter | Description                                                             | Optional |\n|-----------|-------------------------------------------------------------------------|----------|\n| seller    | Your seller ID (contact 35up team to get one)                           | No       |\n| lang      | Language `ISO 639-1` code (i.e. `de`, `en`)                             | Yes      |\n| country   | Country `ISO 3166` code (i.e. `us`, `fr`)                               | Yes      |\n| session   | The ID of a session (use only if you want to generate session yourself) | Yes      | \n| apiUrl    | 35up API url. A custom url can be provided for testing purposes         | Yes      |\n\n\n### Methods\n\nThis package provides following methods:\n[Reference for cross-environment methods](../base/README.md#methods)\n\n## Requirements\n\n[Reference for cross-environment requirements](../base/README.md#requirements)\n\n## About sessions\n\nWhen a session is not provided the library automatically generates a unique\nsession id which will be stored in the browser `localStorage` and used between \nclient sessions.\n\nThe _Sdk_ exposes a `resetSession` method that removes the session from\n`localStorage`, in case a new session id is desired.\n","readmeFilename":"README.md"}