{"_id":"@arc-core-components/content-source_retail_offer-v1","_rev":"6-65fe72ae90eb8ad7ce722fb32c7fb491","name":"@arc-core-components/content-source_retail_offer-v1","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@arc-core-components/content-source_retail_offer-v1","version":"1.0.0","description":"Content source that hooks into the subscriptions retail offers portion of the Arc Suite.","homepage":"https://github.com/wapopartners/core-components#readme","license":"ISC","main":"build/index.js","author":{"name":"Greta Krafsig"},"repository":{"type":"git","url":"git+https://github.com/wapopartners/core-components.git"},"publishConfig":{"access":"public"},"dependencies":{"@babel/runtime":"^7.4.3"},"gitHead":"11b2e40f717d47971d3faecaf357bcfbfa8d03aa","bugs":{"url":"https://github.com/wapopartners/core-components/issues"},"_id":"@arc-core-components/content-source_retail_offer-v1@1.0.0","_nodeVersion":"8.9.4","_npmVersion":"lerna/3.13.4/node@v8.9.4+x64 (darwin)","dist":{"integrity":"sha512-nZiBrl9P0Etr3/y/IyJhbJEhFFR29kjgB5g98Ut3MqsbzVKEMK/krEbeTyDlu1+/CpbLNKE9iWw1Ehdb+phzhg==","shasum":"2c5500c5e1f24a34266948afc9f5aaf4e6f47537","tarball":"https://registry.npmjs.org/@arc-core-components/content-source_retail_offer-v1/-/content-source_retail_offer-v1-1.0.0.tgz","fileCount":5,"unpackedSize":9521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd97jHCRA9TVsSAnZWagAA2nAP+wbj29Azyc2SopQZNTjf\nv7yyNC6epLhVVyGnYoMuOV/IbfSb+yqLL1/mcTerZUaegfw+8pMdnZVeAfw3\nr4PkJLkls/Obgr7M9+lhbtzCCz/OozqIRZlO68H56kS/oTceYKZGVIjLU8gL\ng4R6Ywnoc1mxbfE3oNAZ510uZwMLOwCBX8/fzg2MGUacrvV76DlkeZXpABf0\nBU9HlSZm3OJpT0uyxWpo/7Y8YDDxtgf6H4+imePsaulaBHTWnyGZQbFc6Nwh\n5jiQFZYAk7u0rt1xo7FHQ3LtYwNmAVmC4nKylQCelEEdudVNRqmTJLSGK8YH\nN2Jif8ToofgN237j+JwD06RKUeNxJaHbi/NT3qdAmqKKsDfep+J4tQzE+MIz\nP6/eJGIRaqgsjPWI96FfNqTfVBZSev+OFXh+loUfpjzCI4z+P+h4KKCKUkYV\npauNXDBxA1aw/BW7tX0iJD/PLfoQbXIX1ThOWwOzWdH7d2VWT442VP87BXCq\n4oNwpGuJVg8WBGlX2EamEc7/i6jUfSr/RGLtSu+qQV+sngnRiTfscYCfz+Bp\nnhLfpEIsvbKIcKfeNDcOAKH4h34QKtFLSbZOcKYTNhNc1NHmQLDFbdokGw5k\nrd8hZXpol+Tl8AoSaCiW4RElmGF0WbQIMd+z9mlZcpvUL9s1vN92PBmh4UnI\nVYsf\r\n=q/IB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFRlH7wTyJ9+yDmWjknLbzMARmgwbNkoHGyV35/xO4sjAiArjVVrpAQYNWCWOcZD/v8V9nxJoku5UZaQyE2VSl5qDA=="}]},"maintainers":[{"name":"npmcojocaruv","email":"victor.cojocaru@washpost.com"},{"name":"npmwbcook","email":"wbcook007@gmail.com"},{"name":"badmintonkid","email":"cm.jasonyoung@gmail.com"},{"name":"wpj","email":"w@wyatt.page"},{"name":"imaus10","email":"imaus10@gmail.com"},{"name":"dan-weaver","email":"danweaver06@gmail.com"},{"name":"yonm","email":"ymaalo@protonmail.com"},{"name":"juliebacon","email":"julie.bacon@washpost.com"},{"name":"design1online","email":"jadendreamer13@gmail.com"},{"name":"danielkim1","email":"danielkim1@protonmail.com"},{"name":"amyerz","email":"amyerz@gmail.com"},{"name":"maddoxnelson","email":"maddoxnelson@gmail.com"}],"_npmUser":{"name":"design1online","email":"jadendreamer13@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-source_retail_offer-v1_1.0.0_1576515782584_0.5812973588985444"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-16T17:03:02.401Z","1.0.0":"2019-12-16T17:03:02.687Z","modified":"2022-09-26T12:46:40.899Z"},"maintainers":[{"email":"maddoxnelson@gmail.com","name":"maddoxnelson"},{"email":"amyerz@gmail.com","name":"amyerz"},{"email":"danielkim1@protonmail.com","name":"danielkim1"},{"email":"jadendreamer13@gmail.com","name":"design1online"},{"email":"julie.bacon@washpost.com","name":"juliebacon"},{"email":"ymaalo@protonmail.com","name":"yonm"},{"email":"danweaver06@gmail.com","name":"dan-weaver"},{"email":"imaus10@gmail.com","name":"imaus10"},{"email":"w@wyatt.page","name":"wyattjohnston"},{"email":"wbcook007@gmail.com","name":"npmwbcook"},{"email":"victor.cojocaru@washpost.com","name":"npmcojocaruv"},{"email":"robin.giannattasio@washpost.com","name":"robin.giannattasio"},{"email":"merwan.rodriguez@washpost.com","name":"arcsubs"},{"email":"cheng-hsin.weng@washpost.com","name":"chenghsinw"},{"email":"styonsk@gmail.com","name":"styonsk"}],"description":"Content source that hooks into the subscriptions retail offers portion of the Arc Suite.","homepage":"https://github.com/wapopartners/core-components#readme","repository":{"type":"git","url":"git+https://github.com/wapopartners/core-components.git"},"author":{"name":"Greta Krafsig"},"bugs":{"url":"https://github.com/wapopartners/core-components/issues"},"license":"ISC","readme":"# Content Source: Subscriptions Retail API v1 endpoint\n\nThis the Arc Core Component representing a content source that hooks into the\nSubscriptions Retail API portion of the Arc Suite.\n\nThe most important part is the pattern, which defines the endpoint that\nPageBuilder Fusion uses to look up content.\n\nThis core component requires that a CDN has already been configured for the site.\n\n## Pattern:\n\n`https://api-{org}-{website}{-env}.cdn.arcpublishing.com/retail/public/v1/offer/live/{campaign}`\n\n## Parameters:\n\nThis content source takes three parameters: a website URL, the campaign code and the fusion environment.\n\n## Getting started\n\nThis Core Component must be used within a Fusion project.\n\n1. Add this schema as a dependency of the repo.\n   `npm install @arc-core-components/content-source_retail_offer-v1`\n1. Create a file of your desired content source name within the\n   `/content/sources` folder. For this content source, the suggested name is\n   `offers-v1.js`\n1. This is the name you should use when referencing this content source in any\n   content config within a custom field.\n1. Paste the following into `offers-v1.js`:\n\n```javascript\nimport { ENVIRONMENT } from 'fusion:environment';\nimport { createContentSource } from \"@arc-core-components/content-source_retail_offer-v1\";\nexport default createContentSource(ENVIRONMENT);\n```\n\n## What does this content source return?\n\nThis will return subscription and product data for a single campaign.\n\n## Overwriting the default `website`\n\nThe default export of the content source is set up for multisite deployments\nwhere a `_website` url parameter is necessary when visiting a specific page.\n`Example: http://localhost/pf/sample-page/?_website=the-gazette`. To override\nthis behavior for a single site build we provide a factory function for creating\nan otherwise unchanged content source with a user provided website.\n\n```javascript\nimport { ENVIRONMENT } from 'fusion:environment';\nimport { createContentSource } from \"@arc-core-components/content-source_retail_offer-v1\";\nexport default createContentSource(ENVIRONMENT, \"washingtonpost\");\n```\n\n# Testing & Linting\n\nWe are using Jest and XO for testing and linting.\n\nWe are using Husky to run a pre-push hook, preventing un-linted or code that\nfails tests from making it into the repo.\n\n**To test:** `npm test`\n\n**To lint:** `npm run lint` - This will also fix any simple linter errors\nautomatically.\n\n**To push without testing or linting**: `git push --no-verify` - This can often\nbe helpful if you just need to push a branch for demonstration purposes or for\nhelp.\n","readmeFilename":"README.md"}